* { box-sizing: border-box; }
:root { color-scheme: light; --ink: #253f32; --green: #31583f; --line: #ccd1bf; --paper: #faf8ef; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 system-ui, 'PingFang SC', sans-serif; }
header { border-bottom: 1px solid var(--line); }
.bar, main { width: min(1200px, calc(100% - 80px)); margin: auto; }
.bar, .brand, nav, .actions { display: flex; align-items: center; }
.bar { min-height: 84px; justify-content: space-between; gap: 12px; }
.brand { gap: 10px; text-decoration: none; }
.mark { width: 36px; height: 36px; }
.word { width: 138px; height: auto; }
.short { display: none; }
nav { gap: 4px; }
a { color: var(--green); text-underline-offset: 4px; }
nav a { padding: 9px 16px; text-decoration: none; border-radius: 5px; }
nav [aria-current] { background: #e3ead9; font-weight: 650; }
.spread { display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); gap: clamp(40px,6vw,92px); padding-block: 68px; align-items: start; }
h1, h2, .short { font-family: 'Songti SC','STSong',serif; }
h1 { font-size: 48px; line-height: 1.2; margin: 0; letter-spacing: .025em; }
h2 { font-size: 24px; line-height: 1.4; margin: 0; }
.subtitle { margin: 12px 0 34px; color: #59695b; font-size: 18px; }
form { border-top: 1px solid var(--line); padding-top: 24px; }
label { display: block; font-weight: 600; margin-bottom: 8px; }
input, button { font: inherit; color: inherit; }
input { width: 100%; min-width: 0; padding: 12px; border: 1px solid #98a591; border-radius: 5px; background: #fffef8; }
input[aria-invalid=true] { border-color: #9b4633; }
small { display: block; color: #913d2b; font-size: 14px; margin-top: 4px; }
.numbers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 20px 0 24px; }
.numbers > div, .spread > section { min-width: 0; }
button { border: 1px solid #82977b; border-radius: 5px; padding: 9px 16px; background: #edf0e2; cursor: pointer; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.primary { flex: 1 1 140px; background: var(--green); color: white; border: 0; padding: 14px; font-weight: 650; }
button:hover:enabled { filter: brightness(.94); }
button:disabled { opacity: .64; cursor: default; }
:focus-visible { outline: 3px solid #344bc1; outline-offset: 3px; }
figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 4px; }
.result, #empty { padding: 24px; background: #eef0e2; border-left: 3px solid #83976e; margin-top: 22px; }
.actions { flex-wrap: wrap; gap: 18px; }
h2, .details, strong { overflow-wrap: anywhere; }
.library { max-width: 900px; padding-block: 60px; }
.library ul { list-style: none; padding: 0; margin: 0; }
.library li { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 24px 0; border-top: 1px solid var(--line); }
li > div { min-width: 0; }
.time { display: block; margin-top: 6px; }
.details, time { font-size: 14px; color: #536350; }
.details { margin: 6px 0 2px; }
.remove { flex: none; }
#empty a { display: inline-block; margin-top: 16px; }
#status:empty { margin: 0; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .spread { grid-template-columns: minmax(0,1fr); gap: 32px; padding-block: 44px; }
  .spread, .library { max-width: 650px; }
  figure { max-width: 560px; width: 100%; justify-self: center; }
}
@media (max-width: 600px) {
  .bar, main { width: calc(100% - 36px); }
  .bar { min-height: 68px; }
  .mark { width: 28px; height: 28px; }
  .word { display: none; }
  .short { display: inline; font-weight: bold; font-size: 18px; }
  .brand { gap: 5px; }
  nav a { padding: 9px 7px; font-size: 14px; }
  h1 { font-size: 32px; }
  .spread, .library { padding-block: 34px; }
  .subtitle { margin-bottom: 24px; font-size: 16px; }
  .numbers { gap: 10px; }
  .library li { align-items: flex-start; }
  .result, #empty { padding: 16px; }
}
