/* Name That Book: "The Lamp-Lit Bookshop". Walnut shelves, amber lamp light, cloth-bound spines,
   library-card reveals. The game stage is always dark (a shop after hours); the guide below follows the
   site light/dark theme on parchment. Everything is scoped to .ntb / .ntb-page. */

/* ---------- One shared column for the page head, the game and the guide ---------- */
.ntb-page { --col: 960px; }
.ntb-page .page-head { flex: 1 1 100%; width: 100%; }
.ntb-page .page-head .wrap { max-width: calc(var(--col) + 32px); margin-inline: auto; }
.ntb-page .page-head h1 { font-family: "IM Fell English", Georgia, serif; font-weight: 400; letter-spacing: -.01em; }
.ntb-page .page-head .eyebrow { color: #9a5b1e; }
.backlink { font-weight: 800; font-size: 14px; text-decoration: none; justify-self: start; }
.backlink:hover { text-decoration: underline; }
.ntb-main > .wrap { max-width: calc(var(--col) + 32px); padding-block: 8px 64px; }

.ntb {
  --wood-0: #1a0f08; --wood-1: #2a180d; --wood-2: #3d2414; --wood-3: #5a3520;
  --amber: #f2b45a; --amber-2: #ffd38a; --paper: #f6ecd6; --paper-2: #efe0bf; --ink: #2b1a10; --ink-soft: #6a5038;
  --buff: #f3e3b8; --rule-red: #b8342c; --rule-blue: #9fb5d0;
  --oxblood: #7a2430; --bottle: #2f5a43; --navy: #24395f; --mustard: #a8781f; --plum: #5b2f52; --teal: #23605f;
  --gilt: #e9c46a; --ok: #2f7d4a; --ok-ink: #1e5a33; --bad: #b3261e; --bad-ink: #8f1d17;
  --fell: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --fellsc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --serif: "Crimson Pro", "Iowan Old Style", Georgia, serif;
  --type: "Courier Prime", "Courier New", monospace;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(242,180,90,.22), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 2px, transparent 2px 120px),
    linear-gradient(180deg, var(--wood-1), var(--wood-0));
  color: var(--paper);
  padding: clamp(14px, 3vw, 32px) max(16px, env(safe-area-inset-left, 0px)) clamp(22px, 4vw, 44px);
  border-block: 6px solid #120a05;
  box-shadow: inset 0 10px 30px rgba(0,0,0,.45);
}
.ntb [hidden] { display: none !important; }
.ntb-stage { max-width: var(--col); margin: 0 auto; }
.ntb button { font: inherit; }
.ntb :focus-visible { outline: 3px solid var(--amber-2); outline-offset: 3px; }
.ntb [tabindex="-1"]:focus { outline: none; }
.ntb .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Start screen: hero with a centered bookplate ---------- */
.ntb .hero { position: relative; border-radius: 16px; overflow: hidden; min-height: clamp(520px, 62vw, 600px); display: grid; place-items: center; padding: clamp(110px, 14vw, 136px) 16px 52px; isolation: isolate; box-shadow: 0 0 0 1px rgba(255,220,160,.12), 0 24px 60px rgba(0,0,0,.55); }
.ntb .hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.ntb .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 55% 60% at 50% 55%, rgba(26,15,8,.15), rgba(26,15,8,.6)); pointer-events: none; }
.ntb .hero-art .bulb { animation: ntb-flicker 6s infinite; }
@keyframes ntb-flicker { 0%, 100% { opacity: 1; } 47% { opacity: 1; } 48% { opacity: .75; } 50% { opacity: 1; } 72% { opacity: .9; } }

.ntb .gallery { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ntb .frame { position: absolute; display: block; width: 62px; height: 78px; border-radius: 50% / 46%; overflow: hidden; background: #3b2a1c; border: 4px solid #c9962e; box-shadow: 0 0 0 2px #5c3f14, 0 8px 18px rgba(0,0,0,.6); }
.ntb .frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: sepia(.35) contrast(1.05); display: block; }
.ntb .frame .mono { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--fellsc); font-size: 22px; color: var(--gilt); background: radial-gradient(circle at 50% 35%, #5a3f28, #2b1a10); }
.ntb .gallery .g0 { left: 5%; top: 18px; transform: rotate(-3deg); }
.ntb .gallery .g1 { left: calc(5% + 84px); top: 30px; transform: rotate(2deg); }
.ntb .gallery .g2 { right: calc(5% + 84px); top: 30px; transform: rotate(-2deg); }
.ntb .gallery .g3 { right: 5%; top: 18px; transform: rotate(3deg); }
@media (max-width: 560px) { .ntb .gallery .g1, .ntb .gallery .g2 { display: none; } .ntb .frame { width: 50px; height: 64px; } }

.ntb .plate { position: relative; width: min(100%, 440px); background: var(--paper); color: var(--ink); border-radius: 6px; padding: 34px clamp(18px, 4vw, 34px) 22px; text-align: center;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px #b08a52, 0 0 0 12px var(--paper), 0 30px 60px rgba(0,0,0,.6);
  background-image: radial-gradient(circle at 20% 10%, rgba(176,138,82,.12), transparent 40%), radial-gradient(circle at 85% 90%, rgba(176,138,82,.16), transparent 45%); }
.ntb .pill { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); background: var(--oxblood); color: #fbefd9; font-family: var(--fellsc); font-size: 16px; letter-spacing: .06em; padding: 4px 16px 5px; border-radius: 4px; box-shadow: 0 3px 0 #4d1219; white-space: nowrap; }
.ntb .wordmark { display: grid; justify-items: center; gap: 0; color: var(--ink); font-weight: 400; }
.ntb .emblem { width: 58px; height: 44px; margin-bottom: 4px; }
.ntb .wm-small { font-family: var(--fellsc); font-size: 20px; letter-spacing: .32em; color: var(--oxblood); line-height: 1; padding-left: .32em; }
.ntb .wm-big { font-family: var(--fell); font-style: italic; font-size: clamp(58px, 15vw, 82px); line-height: .92; letter-spacing: -.01em; background: linear-gradient(180deg, #3a2312, #6b3d1c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ntb .tagline { margin: 6px 0 18px; font-family: var(--fell); font-style: italic; color: var(--ink-soft); font-size: 16px; }
.ntb .tagline::before, .ntb .tagline::after { content: "\2767"; color: #b08a52; margin: 0 8px; font-style: normal; }

.ntb .btn-play { display: flex; width: 100%; align-items: center; justify-content: center; min-height: 64px; border: 0; border-radius: 6px; cursor: pointer;
  background: linear-gradient(180deg, #8c2a37, var(--oxblood)); color: #fbefd9; font-family: var(--fellsc); font-size: 30px; letter-spacing: .08em;
  box-shadow: inset 0 0 0 2px rgba(233,196,106,.55), inset 0 0 0 5px var(--oxblood), inset 0 0 0 6px rgba(233,196,106,.45), 0 5px 0 #4d1219, 0 10px 18px rgba(0,0,0,.25);
  transition: transform .12s, box-shadow .12s, filter .12s; touch-action: manipulation; }
.ntb .btn-play:hover:not(:disabled) { filter: brightness(1.1); }
.ntb .btn-play:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(233,196,106,.55), inset 0 0 0 5px var(--oxblood), inset 0 0 0 6px rgba(233,196,106,.45), 0 2px 0 #4d1219; }
.ntb .btn-play:disabled { opacity: .7; cursor: progress; font-size: 20px; }
.ntb .btn-play:focus-visible, .ntb .plate :focus-visible { outline-color: var(--oxblood); }
.ntb .btn-play.small { width: auto; min-height: 52px; padding: 8px 26px; font-size: 22px; }

.ntb .metarow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); }
.ntb .tbonus { display: inline-flex; align-items: center; gap: 10px; }
.ntb .switch { position: relative; width: 52px; height: 30px; border-radius: 999px; border: 2px solid #6b5232; background: #d9c8a3; cursor: pointer; padding: 0; transition: background .2s; flex: none; }
.ntb .switch i { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fffaf0; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .2s; }
.ntb .switch[aria-checked="true"] { background: var(--bottle); border-color: #173126; }
.ntb .switch[aria-checked="true"] i { transform: translateX(22px); }
.ntb .bestline { margin: 10px 0 0; font-family: var(--serif); font-size: 15px; color: var(--ink-soft); min-height: 1.3em; }
.ntb .bestline b { color: var(--ink); }
.ntb .bestline.err { color: var(--bad-ink); font-weight: 700; }
.ntb .opt-toggle { margin-top: 10px; background: none; border: 0; padding: 8px 4px; min-height: 40px; cursor: pointer; color: var(--oxblood); font-family: var(--serif); font-weight: 700; font-size: 15px; text-decoration: underline dotted; text-underline-offset: 4px; }
.ntb .opt-toggle::after { content: " \25BE"; text-decoration: none; display: inline-block; transition: transform .2s; }
.ntb .opt-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.ntb .opt-toggle span { color: var(--ink-soft); font-weight: 600; }
.ntb .opts { text-align: left; display: grid; gap: 14px; margin-top: 8px; padding-top: 14px; border-top: 1px dashed #b08a52; }
.ntb .group { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.ntb .group legend { font-family: var(--fellsc); font-size: 15px; letter-spacing: .08em; color: var(--oxblood); padding: 0; margin-bottom: 8px; }
.ntb .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ntb .chip { min-height: 40px; padding: 6px 12px; border-radius: 3px; border: 1.5px solid #b08a52; background: #fbf4e3; color: var(--ink); cursor: pointer; font-family: var(--serif); font-size: 16px; font-weight: 600; }
.ntb .chip:hover { border-color: var(--ink); }
.ntb .chip[aria-pressed="true"] { background: var(--bottle); border-color: var(--bottle); color: #fbefd9; }
.ntb .levelnote { margin: 0; font-family: var(--serif); font-size: 14.5px; color: var(--ink-soft); line-height: 1.4; }
.ntb .hero-credit { position: absolute; left: 14px; bottom: 8px; right: 14px; margin: 0; font-family: var(--fell); font-style: italic; font-size: 13px; color: rgba(246,236,214,.75); text-align: left; text-shadow: 0 1px 2px #000; }

/* ---------- Play: the reading desk ---------- */
.ntb .desk { background: var(--paper); color: var(--ink); border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px #c8a970, 0 24px 60px rgba(0,0,0,.55);
  background-image: radial-gradient(circle at 0 0, rgba(176,138,82,.14), transparent 30%), radial-gradient(circle at 100% 100%, rgba(176,138,82,.18), transparent 35%); }
.ntb .deskbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px clamp(14px, 3vw, 24px); background: linear-gradient(180deg, #3d2414, #2a180d); color: var(--paper); border-bottom: 3px solid #c9962e; }
.ntb .dk-title { font-family: var(--fell); font-style: italic; font-size: 22px; color: var(--amber-2); }
@media (max-width: 520px) { .ntb .dk-title { display: none; } .ntb .dk-right { margin-left: 0; width: 100%; justify-content: flex-end; } }
.ntb .dk-right { display: inline-flex; align-items: center; gap: 14px; position: relative; font-family: var(--serif); font-size: 18px; font-weight: 600; margin-left: auto; }
.ntb .dk-of b, .ntb .dk-score b { font-variant-numeric: tabular-nums; }
.ntb .dk-score { background: rgba(255,255,255,.08); border: 1px solid rgba(233,196,106,.35); padding: 3px 12px; border-radius: 4px; }
.ntb .dk-score b { color: var(--amber-2); }
.ntb .ring { position: relative; width: 44px; height: 44px; display: inline-grid; place-items: center; }
.ntb .ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ntb .ring circle { fill: none; stroke-width: 3.5; }
.ntb .ring .r-bg { stroke: rgba(246,236,214,.18); }
.ntb .ring .r-fg { stroke: var(--amber); stroke-linecap: round; transition: stroke-dashoffset .2s linear, stroke .3s; }
.ntb .ring.low .r-fg { stroke: #ff7a66; }
.ntb .ring b { font-size: 16px; font-variant-numeric: tabular-nums; }
.ntb .ptsfly { position: absolute; right: 100%; margin-right: 8px; top: 50%; transform: translateY(-50%); background: var(--ok); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 15px; padding: 1px 10px; border-radius: 999px; opacity: 0; pointer-events: none; white-space: nowrap; }
.ntb .ptsfly.pop { animation: ntb-pop 1.4s ease-out forwards; }
@keyframes ntb-pop { 0% { opacity: 0; transform: translateY(-50%) scale(.6); } 15% { opacity: 1; transform: translateY(-50%) scale(1.12); } 30% { transform: translateY(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-120%); } }
.ntb .progress { height: 5px; background: #e2d2ae; }
.ntb .progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--oxblood), #c9962e); transition: width .35s; }

.ntb .page { padding: clamp(18px, 4vw, 34px) clamp(16px, 5vw, 48px) 8px; }
.ntb .qlabel { margin: 0 0 10px; font-family: var(--fellsc); font-size: 17px; letter-spacing: .04em; color: var(--oxblood); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ntb .tag { font-family: var(--serif); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fbefd9; background: var(--bottle); padding: 2px 9px; border-radius: 3px; }
.ntb .summary { margin: 0; font-family: var(--serif); font-size: clamp(19px, 2.4vw, 23px); line-height: 1.55; color: var(--ink); outline: none; text-wrap: pretty; }
.ntb .summary::first-letter { font-family: var(--fell); float: left; font-size: 3.1em; line-height: .82; padding: 6px 8px 0 0; color: var(--oxblood); }
.ntb .hintrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; clear: both; }
.ntb .hintbtn { min-height: 44px; padding: 6px 14px; border-radius: 4px; border: 1.5px dashed #9a7a48; background: transparent; color: var(--ink-soft); font-family: var(--serif); font-size: 16px; font-weight: 600; cursor: pointer; }
.ntb .hintbtn:hover:not(:disabled) { border-style: solid; color: var(--ink); background: #fbf4e3; }
.ntb .hinttext { margin: 0; font-family: var(--type); font-size: 15px; padding: 6px 12px; background: #fff3c4; color: #5c4300; border-left: 4px solid #c9962e; transform: rotate(-.6deg); box-shadow: 0 2px 4px rgba(0,0,0,.12); }

/* Book spines lying on the desk */
.ntb .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; padding: 18px clamp(16px, 5vw, 48px) 8px; }
@media (max-width: 600px) { .ntb .choices { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.ntb .spine { --c: var(--oxblood); position: relative; display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 10px 40px 10px 14px; text-align: left; cursor: pointer; border: 0; border-radius: 3px 8px 8px 3px; color: #fbefd9;
  background:
    linear-gradient(90deg, transparent 0 22px, rgba(233,196,106,.85) 22px 24px, transparent 24px 27px, rgba(233,196,106,.6) 27px 28px, transparent 28px),
    linear-gradient(270deg, transparent 0 16px, rgba(233,196,106,.6) 16px 17px, transparent 17px),
    linear-gradient(180deg, rgba(255,255,255,.16), transparent 30%, transparent 70%, rgba(0,0,0,.28)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 2px, transparent 2px 4px),
    var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 4px 0 rgba(0,0,0,.28), 0 8px 14px rgba(43,26,16,.25);
  font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere;
  transition: transform .14s, opacity .25s, filter .25s; touch-action: manipulation; }
.ntb .spine:hover:not(:disabled) { transform: translateY(-3px) rotate(-.4deg); filter: brightness(1.08); }
.ntb .spine:active:not(:disabled) { transform: translateY(1px); }
.ntb .spine:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.ntb .spine .n { flex: none; width: 30px; height: 30px; margin-left: 30px; display: grid; place-items: center; border-radius: 3px; background: rgba(0,0,0,.25); border: 1px solid rgba(233,196,106,.7); color: var(--gilt); font-size: 15px; }
.ntb .spine .t { text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.ntb .s-oxblood { --c: #7a2430; } .ntb .s-bottle { --c: #2f5a43; } .ntb .s-navy { --c: #24395f; }
.ntb .s-mustard { --c: #8a5f12; } .ntb .s-plum { --c: #5b2f52; } .ntb .s-teal { --c: #1f5756; }
.ntb .spine:disabled { cursor: default; }
.ntb .spine.dim { opacity: .38; filter: saturate(.3); }
.ntb .spine.right { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ok), 0 8px 14px rgba(43,26,16,.25); }
.ntb .spine.wrong { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--bad), 0 8px 14px rgba(43,26,16,.25); }
.ntb .spine .mark { position: absolute; top: -12px; right: -10px; width: 30px; height: 30px; border-radius: 50%; display: none; place-items: center; color: #fff; box-shadow: 0 0 0 3px var(--paper), 0 2px 6px rgba(0,0,0,.3); }
.ntb .spine.right .mark { display: grid; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.ntb .spine.wrong .mark { display: grid; background: var(--bad) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7L7 17' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/16px no-repeat; }
@media (prefers-reduced-motion: no-preference) {
  .ntb .shake { animation: ntb-shake .42s cubic-bezier(.36,.07,.19,.97); }
  @keyframes ntb-shake { 10%, 90% { translate: -2px 0; } 20%, 80% { translate: 4px 0; } 30%, 50%, 70% { translate: -7px 0; } 40%, 60% { translate: 7px 0; } }
  .ntb .reveal:not([hidden]) .libcard { animation: ntb-slide .45s cubic-bezier(.2,.8,.3,1.1); }
  @keyframes ntb-slide { from { opacity: 0; transform: translateY(18px) rotate(-1.5deg); } to { opacity: 1; transform: rotate(-.5deg); } }
  .ntb .reveal:not([hidden]) .stamp { animation: ntb-stamp .5s .25s cubic-bezier(.3,1.6,.5,1) both; }
  @keyframes ntb-stamp { from { opacity: 0; transform: rotate(-14deg) scale(2.2); } to { opacity: .88; transform: rotate(-14deg) scale(1); } }
}

/* Reveal: a library card and a lightbulb note */
.ntb .reveal { padding: 14px clamp(16px, 5vw, 48px) 8px; display: grid; gap: 14px; }
.ntb .libcard { position: relative; background: var(--buff); color: var(--ink); border-radius: 3px; transform: rotate(-.5deg); padding: 0 0 14px; font-family: var(--type);
  background-image: repeating-linear-gradient(180deg, transparent 0 29px, var(--rule-blue) 29px 30px); background-position: 0 44px;
  box-shadow: 0 1px 0 #d6c08c, 0 12px 26px rgba(43,26,16,.3); border-top: 3px solid var(--rule-red); }
.ntb .lc-head { display: flex; justify-content: space-between; gap: 10px; padding: 8px 16px; font-family: var(--fellsc); font-size: 16px; letter-spacing: .1em; color: var(--oxblood); background: var(--buff); border-bottom: 2px solid var(--rule-red); }
.ntb .lc-no { font-family: var(--type); letter-spacing: 0; font-size: 14px; color: var(--ink-soft); }
.ntb .lc-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 14px 16px 0; align-items: start; }
.ntb .lc-photo { margin: 0; display: grid; justify-items: center; gap: 6px; width: 112px; }
.ntb .frame.big { position: relative; width: 104px; height: 132px; border-width: 5px; }
.ntb .frame.big .mono { font-size: 34px; }
.ntb .lc-photo figcaption { font-family: var(--serif); font-size: 12px; line-height: 1.25; color: var(--ink-soft); text-align: center; overflow-wrap: anywhere; }
.ntb .lc-photo figcaption a { color: inherit; }
.ntb .lc-fields { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; align-items: baseline; line-height: 30px; }
.ntb .lc-fields dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--rule-red); white-space: nowrap; }
.ntb .lc-fields dd { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.ntb .lc-fields .lc-title { font-family: var(--fell); font-size: clamp(22px, 3vw, 28px); line-height: 1.15; padding: 2px 0 4px; color: var(--ink); }
.ntb .libcard.ok #rVerdictLine { color: var(--ok-ink); font-weight: 700; }
.ntb .libcard.half #rVerdictLine { color: #6b4e00; font-weight: 700; }
.ntb .libcard.bad #rVerdictLine { color: var(--bad-ink); font-weight: 700; }
.ntb .stamp { position: absolute; right: 14px; top: 46px; transform: rotate(-14deg); padding: 4px 12px; border: 3px double currentColor; border-radius: 6px; font-family: var(--type); font-weight: 700; font-size: 17px; letter-spacing: .1em; text-transform: uppercase; opacity: .88; pointer-events: none; mix-blend-mode: multiply; background: rgba(243,227,184,.35); }
.ntb .libcard.ok .stamp { color: #23703f; } .ntb .libcard.half .stamp { color: #8a6400; } .ntb .libcard.bad .stamp { color: #b3261e; }
@media (max-width: 520px) {
  .ntb .lc-body { grid-template-columns: minmax(0, 1fr); }
  .ntb .lc-photo { width: auto; grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: end; }
  .ntb .frame.big { width: 76px; height: 96px; }
  .ntb .lc-fields { grid-template-columns: minmax(0, 1fr); line-height: 1.4; gap: 0; }
  .ntb .lc-fields dt { margin-top: 6px; }
  .ntb .stamp { top: auto; bottom: 18px; right: 10px; font-size: 14px; }
}
.ntb .bulb-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border-radius: 6px; background: #fff7e2; border: 1px solid #e3c98f; box-shadow: inset 4px 0 0 var(--amber); }
.ntb .bulb-ic { width: 26px; height: 26px; color: #a8781f; margin-top: 2px; }
.ntb .rwhy { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.5; color: var(--ink); }
.ntb .nextrow { display: flex; justify-content: center; padding: 4px 0 10px; }
.ntb .btn-next { min-height: 52px; min-width: 180px; padding: 8px 26px; border: 0; border-radius: 6px; cursor: pointer; background: var(--bottle); color: #fbefd9; font-family: var(--fellsc); font-size: 22px; letter-spacing: .05em; box-shadow: inset 0 0 0 2px rgba(233,196,106,.5), 0 4px 0 #173126; touch-action: manipulation; }
.ntb .btn-next:hover { filter: brightness(1.1); }
.ntb .btn-next:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px rgba(233,196,106,.5), 0 2px 0 #173126; }
.ntb .btn-next:focus-visible, .ntb .desk :focus-visible { outline-color: var(--ink); }
@media (max-width: 600px) { .ntb .btn-next { width: 100%; } }
.ntb .keys { margin: 6px 0 0; padding: 10px 16px 14px; font-family: var(--serif); font-size: 14px; color: var(--ink-soft); text-align: center; border-top: 1px dashed #d4bd8a; }
.ntb kbd { font-family: var(--type); font-size: 13px; border: 1px solid #b08a52; border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; background: #fbf4e3; color: var(--ink); }
@media (hover: none) { .ntb .keys { display: none; } }

/* ---------- End of round: a due-date slip ---------- */
.ntb .end { background: var(--paper); }
.ntb .receipt { padding: clamp(20px, 4vw, 36px) clamp(16px, 5vw, 48px); display: grid; gap: 14px; }
.ntb .r-kicker { margin: 0; font-family: var(--type); text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: var(--rule-red); }
.ntb .receipt h2 { font-family: var(--fell); font-weight: 400; font-size: clamp(34px, 6vw, 48px); color: var(--ink); }
.ntb .receipt h3 { font-family: var(--fellsc); font-weight: 400; font-size: 20px; color: var(--oxblood); margin-top: 6px; }
.ntb .sub { margin: 0; font-family: var(--serif); font-size: 17px; color: var(--ink-soft); }
.ntb .scorebig { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ntb .scorebig b { font-family: var(--fell); font-size: clamp(64px, 14vw, 96px); line-height: 1; color: var(--oxblood); font-variant-numeric: tabular-nums; }
.ntb .scorebig span { font-family: var(--serif); font-size: 18px; color: var(--ink-soft); }
.ntb .endmsg { margin: 0; font-family: var(--serif); font-size: 19px; font-style: italic; color: var(--ink); }
.ntb .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ntb .stat { text-align: center; padding: 12px 6px; background: var(--buff); border-top: 3px solid var(--rule-red); border-radius: 2px; box-shadow: 0 3px 8px rgba(43,26,16,.15); }
.ntb .stat b { display: block; font-family: var(--type); font-size: 26px; color: var(--ink); line-height: 1.2; }
.ntb .stat span { font-family: var(--serif); font-size: 14px; color: var(--ink-soft); }
.ntb .review { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; background: var(--buff); border-radius: 2px; border-top: 3px solid var(--rule-red); box-shadow: 0 3px 8px rgba(43,26,16,.15); }
.ntb .review li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--rule-blue); }
.ntb .review li:last-child { border-bottom: 0; }
.ntb .review .mk { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 15px; margin-top: 2px; }
.ntb .review .mk.ok { background: var(--ok); } .ntb .review .mk.half { background: #a8781f; } .ntb .review .mk.bad { background: var(--bad); }
.ntb .review .t { font-family: var(--fell); font-size: 19px; color: var(--ink); overflow-wrap: anywhere; }
.ntb .review .m { font-family: var(--type); font-size: 13.5px; color: var(--ink-soft); }
.ntb .acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ntb .btn-ghost { min-height: 52px; padding: 8px 20px; border-radius: 6px; border: 1.5px solid #9a7a48; background: transparent; color: var(--ink); cursor: pointer; font-family: var(--serif); font-size: 17px; font-weight: 700; }
.ntb .btn-ghost:hover { background: #fbf4e3; }
@media (max-width: 480px) { .ntb .acts > * { flex: 1 1 100%; } }

@media (prefers-reduced-motion: reduce) { .ntb *, .ntb *::before, .ntb *::after { animation: none !important; transition: none !important; } }

/* ---------- Guide: parchment pages that follow the site theme ---------- */
.ntb-page .guide { --g-bg: #f7efdc; --g-fg: #2b1a10; --g-acc: #7a2430; --g-line: #dcc89c;
  max-width: none; margin-top: 36px; background: var(--g-bg); color: var(--g-fg); border: 1px solid var(--g-line); border-radius: 8px;
  box-shadow: 0 1px 0 var(--g-line), 0 10px 30px rgba(43,26,16,.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ntb-page .guide { --g-bg: #221810; --g-fg: #efe3c8; --g-acc: #f0a98a; --g-line: #4a3522; } }
:root[data-theme="dark"] .ntb-page .guide { --g-bg: #221810; --g-fg: #efe3c8; --g-acc: #f0a98a; --g-line: #4a3522; }
.ntb-page .guide h2 { font-family: "IM Fell English", Georgia, serif; font-weight: 400; font-size: clamp(28px, 3.4vw, 36px); color: var(--g-fg); }
.ntb-page .guide h3 { font-family: "IM Fell English SC", Georgia, serif; font-weight: 400; font-size: 21px; color: var(--g-acc); }
.ntb-page .guide p, .ntb-page .guide li { font-family: "Crimson Pro", Georgia, serif; font-size: 19px; line-height: 1.6; max-width: 72ch; }
.ntb-page .guide .faq h3 { font-family: "Crimson Pro", Georgia, serif; font-weight: 700; font-size: 19px; color: var(--g-fg); }
