:root {
  color-scheme: light;
  --paper: #f6f5f0;
  --ink: #202b25;
  --muted: #898e87;
  --green: #2f5945;
  --line: #e4e3dc;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
.page-shell { width: min(1120px, calc(100% - 64px)); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.topbar { height: 83px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; gap: 9px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -1px; }
.brand-mark { width: 27px; height: 27px; border-radius: 8px; background: var(--green); color: white; display: grid; place-items: center; font: 700 19px var(--serif); letter-spacing: -2px; padding-right: 2px; }
.daily-label, .eyebrow, .quote-label, .quote-footer, .input-label, .attempts-heading, .side-note > p, .side-bottom, .page-footer, .result-caption, .dialog-kicker { font-size: 10px; font-weight: 700; letter-spacing: 1.15px; }
.daily-label { display: flex; align-items: center; gap: 9px; color: #777e75; letter-spacing: 1.35px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #75a481; box-shadow: 0 0 0 3px #75a48120; }
.help-button { width: 30px; height: 30px; border: 1px solid #dcded6; background: transparent; border-radius: 50%; color: #656d65; font-size: 14px; cursor: pointer; transition: background .2s, color .2s; }
.help-button:hover { background: var(--green); color: white; }
.game-layout { display: grid; grid-template-columns: minmax(0, 620px) 250px; justify-content: center; gap: 112px; flex: 1; padding: 66px 0 58px; }
.game-column { min-width: 0; }
.eyebrow { color: #898e87; display: flex; align-items: center; gap: 12px; font-size: 9px; letter-spacing: 1.3px; }
.eyebrow-line { width: 28px; height: 1px; background: #c9cbc3; }
h1 { margin: 20px 0 11px; font: 500 clamp(43px, 5vw, 61px)/1.07 var(--serif); letter-spacing: -1.7px; }
h1 em { color: var(--green); font-weight: 500; }
.intro { margin: 0; color: #777e77; font-size: 14px; }
.quote-card { margin-top: 37px; min-height: 235px; padding: 22px 26px 18px; border: 1px solid #e6e5de; border-radius: 5px; background: #fbfaf6; box-shadow: 0 7px 23px #26362a09; display: flex; flex-direction: column; }
.quote-topline { display: flex; justify-content: space-between; align-items: center; }
.quote-label { color: #515c53; font-size: 9px; letter-spacing: 1.1px; }
.quote-of { color: #a4a79f; }
.difficulty { display: inline-flex; align-items: center; gap: 7px; color: #92958d; font-size: 10px; }
.difficulty-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #b38755; }
blockquote { max-width: 520px; margin: auto 0; padding: 25px 0 22px; font: 500 clamp(19px, 2.2vw, 25px)/1.48 var(--serif); color: #29352e; letter-spacing: -.3px; }
.quote-animated.is-typing::after { content: '▏'; display: inline-block; margin-left: 2px; color: #6d8d70; animation: caret-blink .8s steps(2, start) infinite; }
@keyframes caret-blink { to { visibility: hidden; } }
.quote-footer { color: #a1a39c; display: flex; align-items: center; gap: 8px; font-size: 8px; letter-spacing: 1.05px; }
.quote-ornament { color: #b5c3b4; font: 24px var(--serif); line-height: 10px; }
.guess-area { margin-top: 26px; }
.input-label { display: block; margin-bottom: 10px; color: #47544b; font-size: 9px; }
.input-label span { color: #999c95; font-weight: 500; letter-spacing: .15px; }
.search-wrap { position: relative; z-index: 3; }
.search-wrap input { width: 100%; height: 52px; border: 1px solid #ddded7; border-radius: 4px; background: #fbfaf7; padding: 0 48px 0 44px; outline: none; font-size: 13px; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.search-wrap input::placeholder { color: #a0a29b; }
.search-wrap input:focus { border-color: #66836d; box-shadow: 0 0 0 3px #52775b16; }
.search-icon { position: absolute; top: 16px; left: 15px; width: 19px; height: 19px; color: #838b82; pointer-events: none; }
.shortcut-hint { position: absolute; right: 15px; top: 15px; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #e5e5de; border-radius: 4px; color: #a3a59e; font-size: 12px; pointer-events: none; }
.input-note { min-height: 16px; margin: 8px 0 0; color: #999c95; font-size: 10px; }
.search-results { position: absolute; z-index: 5; top: calc(100% + 5px); left: 0; right: 0; max-height: 260px; overflow-y: auto; margin: 0; padding: 5px; list-style: none; border: 1px solid #e1e2db; border-radius: 5px; background: #fffefa; box-shadow: 0 12px 30px #17251c1c; }
.search-results[hidden] { display: none; }
.result-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; border-radius: 3px; background: transparent; padding: 11px 12px; text-align: left; cursor: pointer; }
.result-option:hover, .result-option:focus-visible { background: #edf1e9; outline: none; }
.result-option strong { display: block; color: #2b382f; font: 500 14px var(--serif); }
.result-option small { display: block; margin-top: 4px; color: #8c928a; font-size: 11px; }
.result-option .arrow { color: #89978a; font-size: 16px; }
.attempts { margin-top: 26px; }
.attempts-heading { display: flex; justify-content: space-between; color: #858a82; font-size: 8px; letter-spacing: 1px; }
#attempts-remaining { color: #a0a39c; font-weight: 500; letter-spacing: .15px; }
.attempt-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 11px; }
.attempt-step { height: 4px; border-radius: 5px; background: #e4e4dd; transition: background .35s; }
.attempt-step.active { background: var(--green); }
.attempt-step.missed { background: #d7a076; }
.toast { margin-top: 15px; color: #a85b42; font-size: 12px; }
.side-column { position: relative; padding-top: 119px; display: flex; flex-direction: column; }
.side-note { padding-left: 17px; border-left: 1px solid #d9ddd4; }
.note-icon { margin-bottom: 20px; color: #6b886e; font-size: 18px; }
.side-note > p { margin: 0 0 12px; color: #8d938b; font-size: 8px; letter-spacing: 1.4px; }
.side-note h2 { margin: 0 0 13px; font: 500 25px/1.28 var(--serif); letter-spacing: -.4px; }
.side-note > span { display: block; max-width: 198px; color: #858a83; font-size: 12px; line-height: 1.7; }
.side-divider { height: 1px; margin: 31px 0 22px; background: var(--line); }
.side-meta { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 19px; }
.meta-icon { width: 18px; padding-top: 1px; color: #718574; font-size: 17px; text-align: center; }
.book-icon { font-size: 16px; }
.side-meta strong, .side-meta small { display: block; }
.side-meta strong { margin-bottom: 4px; font-size: 11px; font-weight: 600; }
.side-meta small { color: #949890; font-size: 10px; line-height: 1.45; }
.side-bottom { display: flex; justify-content: space-between; margin-top: auto; color: #a6a8a0; font-size: 7px; letter-spacing: 1px; }
.side-bottom span:last-child { color: #759078; font-size: 11px; }
.page-footer { display: flex; justify-content: space-between; align-items: center; height: 58px; border-top: 1px solid var(--line); color: #a0a29b; font-size: 8px; letter-spacing: 1.05px; }
.footer-dot { margin: 0 4px; color: #c4c6bf; }
.page-footer button { border: 0; padding: 8px 0 8px 8px; background: transparent; color: #727d72; font-size: 8px; letter-spacing: 1.05px; cursor: pointer; }
.page-footer button span { margin-left: 4px; font-size: 11px; }
.dialog-card { position: fixed; width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; padding: 34px 36px 30px; border: 1px solid #e5e5de; border-radius: 7px; background: #fbfaf6; color: var(--ink); box-shadow: 0 24px 80px #10201533; }
.dialog-card::backdrop { background: #17231db3; backdrop-filter: blur(3px); }
.dialog-card form { position: absolute; top: 13px; right: 14px; }
.dialog-close { border: 0; background: transparent; color: #8e948c; font-size: 26px; line-height: 1; cursor: pointer; }
.dialog-mark { color: #68866d; font-size: 21px; }
.dialog-kicker { margin: 16px 0 8px; color: #829083; font-size: 8px; }
.dialog-card h2 { margin: 0; font: 500 31px/1.2 var(--serif); letter-spacing: -.5px; }
.dialog-card ol { margin: 24px 0 20px; padding: 0; list-style: none; }
.dialog-card li { display: grid; grid-template-columns: 35px 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); color: #737b73; font-size: 12px; line-height: 1.6; }
.dialog-card li span { color: #9baa9b; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.dialog-footnote { margin: 0; color: #9a9e97; font-size: 10px; }
.result-dialog { text-align: center; }
.result-confetti { color: #729379; font-size: 25px; animation: spin-in .7s ease both; }
@keyframes spin-in { from { opacity: 0; transform: rotate(-80deg) scale(.3); } to { opacity: 1; transform: rotate(0) scale(1); } }
.result-dialog .dialog-kicker { margin-top: 10px; }
.result-dialog h2 { font-size: 29px; }
.share-score { margin: 20px 0 17px; padding: 17px 18px 15px; border: 1px solid #e3e5dc; border-radius: 6px; background: linear-gradient(135deg, #f3f5ef, #f8f6ef); text-align: left; }
.share-score-heading { display: flex; justify-content: space-between; color: #8d958a; font-size: 8px; font-weight: 700; letter-spacing: 1.15px; }
.share-score-heading span:last-child { color: #a4a89f; font-weight: 600; }
.score-label { margin: 11px 0 2px; color: #29382e; font: 600 18px/1.3 var(--serif); }
.score-detail { margin: 0; color: #888f86; font-size: 10px; }
.score-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 13px; }
.score-tile { min-height: 48px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; border-radius: 4px; }
.score-tile > span { font-size: 7px; font-weight: 700; letter-spacing: .6px; opacity: .7; }
.score-tile strong { font-size: 17px; line-height: 1; }
.score-tile.miss { background: #f0e2d5; color: #a45e3b; }
.score-tile.solved { background: #dce9dc; color: #2f6848; box-shadow: inset 0 0 0 1px #b8d0b9; }
.score-tile.unused { background: #e9e9e2; color: #9da198; }
.book-result { display: flex; align-items: center; gap: 19px; margin: 24px 0 17px; padding: 17px; background: #f2f1eb; text-align: left; }
.book-result img { width: 75px; height: 108px; flex: none; object-fit: cover; background: #e5e3d9; box-shadow: 0 4px 10px #29372a21; }
.result-caption { margin: 0 0 8px; color: #90978e; font-size: 7px; }
.book-result h3 { margin: 0 0 5px; font: 600 18px/1.25 var(--serif); }
.book-author, .book-year { margin: 0 0 5px; color: #747d74; font-size: 11px; }
.book-year { color: #a0a39c; font-size: 10px; }
.book-description { margin: 0 0 20px; color: #757c75; font-size: 12px; line-height: 1.7; text-align: left; }
.buy-link { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--green); color: white; text-decoration: none; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.buy-link:hover { background: #244634; }
.share-result { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 10px 14px; border: 1px solid #dfe3da; border-radius: 4px; background: #f4f5ef; color: #506b55; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s; }
.share-result:hover { border-color: #b7c8b7; background: #eaf0e8; }
.share-result span { font-size: 13px; }
.share-feedback { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 11px auto 0; color: #3e7651; font-size: 11px; animation: reveal .25s ease both; }
.share-feedback > span:first-child { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: #deecdf; font-size: 10px; font-weight: 700; }
.share-feedback.copy-failed { color: #a85b42; }
.share-feedback.copy-failed > span:first-child { background: #f3e5da; }
.share-feedback[hidden] { display: none; }
body.game-over .search-wrap { opacity: .55; pointer-events: none; }

@media (max-width: 850px) {
  .page-shell { width: min(650px, calc(100% - 48px)); }
  .game-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 53px 0 42px; }
  .side-column { display: none; }
}
@media (max-width: 520px) {
  .page-shell { width: calc(100% - 36px); }
  .topbar { height: 68px; }
  .daily-label { font-size: 8px; letter-spacing: .8px; }
  .game-layout { padding: 38px 0 32px; }
  h1 { margin-top: 17px; font-size: clamp(42px, 12vw, 54px); }
  .intro { font-size: 12px; }
  .quote-card { margin-top: 27px; min-height: 226px; padding: 19px 18px 16px; }
  blockquote { font-size: 21px; }
  .difficulty { font-size: 9px; }
  .guess-area { margin-top: 23px; }
  .search-wrap input { height: 50px; font-size: 12px; }
  .page-footer { height: 52px; font-size: 7px; }
  .page-footer button { font-size: 7px; }
  .dialog-card { padding: 30px 24px 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}