/* Department of Christmas Intelligence — styles
   Palette and type follow the approved ChatGPT build: deep evergreen, cream, gold, bronze, cranberry; Georgia + system UI. */
:root {
  --night: #0d211d; --ink: #142e28; --ink-light: #1c3d34; --cream: #fbefd6; --muted: #c9c7ad;
  --gold: #efc780; --bronze: #8f7248; --red: #872437; --red-dark: #5e1826; --line: #d5ad6654; --line-strong: #d5ad66a8;
  --paper: #f6ead0; --paper-ink: #2a1f14; --alert: #a3263a; --signal: #7fd6c2;
  --serif: Georgia, 'Times New Roman', serif; --ui: system-ui, -apple-system, 'Segoe UI', sans-serif; --type: 'Special Elite', 'Courier New', monospace;
  --stardust: var(--gold);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--night); color: var(--cream); font: 17px/1.55 var(--ui); }
#sky { position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse 90% 50% at 50% -10%, #1c3d3480, transparent 70%), var(--night); }
a { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: .1em 0 .45em; }
h1 { font-size: clamp(2rem, 5.5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3.6vw, 2rem); }
h3 { font-size: 1.2rem; color: var(--gold); }
p { margin: .35em 0 .8em; }
.label, .kicker { font: 700 .72rem/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 .5rem; }
.small, .small-print { font-size: .88rem; color: var(--muted); }
.center { text-align: center; }
.opt { font: 400 .78rem var(--ui); color: var(--muted); letter-spacing: 0; text-transform: none; }
.ico { width: 1.1em; height: 1.1em; flex: none; }

/* buttons: rectangular plates, not pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; font: 600 .95rem var(--ui); padding: .7em 1.25em; border-radius: 2px;
  border: 1px solid var(--line-strong); cursor: pointer; text-decoration: none; color: var(--cream); background: transparent; min-height: 44px; transition: background .15s, border-color .15s; }
.btn.primary { background: var(--red); border-color: var(--gold); box-shadow: inset 0 0 0 1px #0004; }
.btn.primary:hover { background: #9a2a40; }
.btn.ghost:hover { border-color: var(--gold); background: #ffffff08; }
.btn.small { font-size: .85rem; padding: .4em .85em; min-height: 36px; }
.btn.big { font: 400 1.15rem var(--serif); padding: .8em 1.8em; letter-spacing: .02em; }
.btn.sworn { background: var(--ink-light); border-color: var(--signal); }
.btn[disabled] { opacity: .55; cursor: default; }
.actions { display: flex; justify-content: center; margin: 1.3rem 0; }
.row-btns { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .8rem 0; }

/* crest */
.crest { display: block; height: auto; }
.crest.xs { width: 20px; } .crest.sm { width: 34px; } .crest.md { width: 76px; margin: 0 auto .6rem; } .crest.lg { width: 120px; margin: 0 auto .4rem; }

/* panels: square, hairline frame with an inset rule */
.panel { position: relative; background: linear-gradient(#1a3a3240, transparent 40%), var(--ink); border: 1px solid var(--line); border-radius: 2px;
  padding: 1.4rem 1.5rem; margin: 0 0 1rem; outline: 1px solid #d5ad6626; outline-offset: -7px; }
.panel.inset { outline: none; background: #0003; }
.panel.narrow { max-width: 460px; margin: 0 auto; text-align: center; }
.panel.wide { max-width: 680px; margin: 0 auto; }
.gate { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.gate h1 { text-align: center; }
.gate .panel.wide > p { text-align: center; }

/* forms */
label { display: block; font-weight: 600; font-size: .92rem; }
input, select { display: block; width: 100%; margin-top: .3rem; font: 400 1.05rem var(--ui); padding: .65em .8em; border-radius: 2px; border: 1px solid var(--line); background: var(--night); color: var(--cream); }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { width: auto; display: inline-block; margin: 0 .55em 0 0; accent-color: var(--red); transform: scale(1.2); }
[hidden] { display: none !important; }
.stack { display: grid; gap: 1rem; text-align: left; }
.narrow-form { max-width: 280px; margin: 0 auto; text-align: center; }
.help { display: block; font-weight: 400; font-size: .84rem; color: var(--muted); margin-top: .3rem; }
.pin-input { text-align: center; font-size: 1.8rem; letter-spacing: .5em; }
fieldset { border: 1px solid var(--line); border-radius: 2px; padding: .8rem 1rem 1rem; margin: 0; }
legend { font: 700 .72rem var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); padding: 0 .5em; }
.agent-row { display: grid; gap: .7rem; grid-template-columns: 1fr 1fr; align-items: end; }
.agent-row legend { grid-column: 1 / -1; }
.msg { color: var(--gold); min-height: 1.2em; font-weight: 600; }
.success { color: var(--signal); font-weight: 600; }

/* top bar (shared with entrance) */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .7rem max(1rem, calc((100vw - 1040px) / 2)); background: var(--night);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--cream); font: 400 .82rem/1.15 var(--serif); letter-spacing: .05em; font-variant: small-caps; font-size: 1rem; }
.who { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; justify-content: flex-end; font: 700 .7rem var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.net i, .plaque i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 6px var(--signal); margin-right: .5em; vertical-align: 1px; }
.est { border-left: 1px solid var(--line); padding-left: .7rem; }
.chip { font: 600 .82rem var(--ui); letter-spacing: 0; text-transform: none; color: var(--cream); }
.chip em { font-style: normal; color: var(--muted); font-family: var(--type); margin-left: .3em; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1040px; margin: 1rem auto 0; border: 1px solid var(--line); }
.tabs a { text-align: center; text-decoration: none; color: var(--cream); padding: .8em .5em; font-size: .92rem; border-right: 1px solid var(--line); background: var(--ink); }
.tabs a:last-child { border-right: 0; }
.tabs a.on { background: var(--ink-light); box-shadow: inset 0 -2px 0 var(--gold); }
.page { max-width: 1040px; margin: 0 auto; padding: 1.2rem 1rem 2rem; }
.foot { display: flex; gap: .6rem; justify-content: center; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 1rem; padding: 1.2rem 1rem 2rem;
  font: 700 .7rem var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.foot a { color: var(--muted); }
@media (max-width: 620px) {
  .net, .est, .chip { display: none; }
  .tabs { margin: .6rem .6rem 0; } .tabs a { font-size: .85rem; }
  .panel { padding: 1.1rem 1rem; outline-offset: -5px; }
  .agent-row { grid-template-columns: 1fr; }
}

/* entrance: the painting is the page */
.entrance { position: relative; min-height: calc(100vh - 60px); min-height: calc(100dvh - 60px); display: flex; align-items: center; overflow: hidden;
  padding: 2rem max(1.2rem, calc((100vw - 1040px) / 2)); border-bottom: 1px solid var(--bronze); }
.entrance-art { position: absolute; inset: 0; z-index: -1;
  background: url('../assets/img/observatory.webp') center 51% / cover no-repeat, url('../assets/img/entrance.jpg') center / cover no-repeat, url('../assets/observatory.svg') center bottom / cover no-repeat, var(--ink); }
.entrance-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0d211dee 0%, #0d211db0 32%, #0d211d10 62%); }
.entrance-copy { max-width: 470px; }
.entrance h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: .98; color: var(--cream); margin: .2rem 0 1rem; }
.entrance h1 span { display: block; font-size: .55em; color: var(--gold); margin-bottom: .1em; }
.sub { color: var(--cream); margin-bottom: 1.4rem; }
.buy { font-size: .88rem; margin-top: 1rem; color: var(--muted); }
.plaque { position: absolute; right: max(1.2rem, calc((100vw - 1040px) / 2)); bottom: 1.4rem; background: #0d211de6; border: 1px solid var(--line-strong); padding: .55rem .9rem;
  font: 700 .7rem/1.5 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); display: none; }
.plaque span { color: var(--cream); padding-left: 1.25em; }
@media (min-width: 900px) { .plaque { display: block; } }
@media (max-width: 700px) {
  .entrance { align-items: flex-end; padding-bottom: 2.2rem; }
  .entrance-art { background-position: 70% 50%, center, center bottom, 0 0; }
  .entrance-art::after { background: linear-gradient(0deg, #0d211df5 0%, #0d211dc0 45%, #0d211d20 75%); }
}

/* HQ */
.hq-grid { display: grid; gap: 1rem; }
@media (min-width: 820px) { .hq-grid { grid-template-columns: 1.55fr 1fr; align-items: start; } }
.mission-card h2 { font-size: clamp(1.9rem, 4.6vw, 2.6rem); }
.mc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.mc-num { font-family: var(--type); color: var(--muted); }
.stamp { display: inline-block; font-family: var(--type); text-transform: uppercase; letter-spacing: .14em; color: #e4687a; border: 2px solid currentColor; padding: .12em .55em;
  transform: rotate(-2.5deg); font-size: .85rem; }
.stamp.small { font-size: .62rem; }
.stamp.gold { color: var(--gold); }
.stamp.big { font-size: 1.5rem; padding: .2em .7em; margin-bottom: .7rem; }
.atlas-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.atlas-head h2 { margin: 0; }
.meter-num { font: 400 1.7rem var(--serif); color: var(--gold); }
.meter { height: 8px; background: var(--night); border: 1px solid var(--line); margin: .7rem 0 .5rem; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--bronze), var(--gold)); transition: width .8s; }
.stations { list-style: none; margin: .6rem 0 0; padding: 0; }
.stations li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.stations li span { flex: 1; }
.stations li em { font-style: normal; font-size: .82rem; color: var(--muted); }
.stations li.got em { color: var(--signal); }
.core-icon.earned { filter: drop-shadow(0 0 6px #efc78066); }
.done-list { list-style: none; padding: 0; margin: 0; }
.done-list li { padding: .45rem 0; border-top: 1px solid var(--line); }
.check { color: var(--signal); font-weight: 700; }
.small-link { font-size: .85rem; margin-left: .4rem; }
.acts { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.acts label { font-weight: 400; display: flex; align-items: center; }

/* Case Notes + evidence papers */
.notes { list-style: none; padding: 0; margin: 0; }
.notes li { padding: .7rem 0; border-top: 1px solid var(--line); }
.notes small { color: var(--muted); }
.tag { display: inline-block; font: 700 .66rem var(--ui); text-transform: uppercase; letter-spacing: .1em; padding: .2em .55em; border: 1px solid currentColor; margin-right: .4rem; vertical-align: 1px; color: var(--muted); }
.tag.confirmed { color: var(--signal); } .tag.provisional { color: var(--gold); } .tag.not-proven-yet { color: var(--gold); } .tag.ruled-out { color: #9b9b8c; text-decoration: line-through; }
.tag.lead { color: #9fc4ff; } .tag.still-possible { color: #d6b8ff; }
.doc { background: var(--paper); color: var(--paper-ink); border-radius: 1px; padding: 1.15rem 1.25rem; margin: 0 0 1rem; font-family: var(--type);
  box-shadow: 0 10px 26px #0008; background-image: linear-gradient(#0000 96%, #b8a06b33 96%); background-size: 100% 1.6em; }
.doc h3 { color: var(--red); font-family: var(--serif); font-size: 1.2rem; }
.doc-head { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.doc .stamp { color: var(--alert); }
.doc-meta { font-size: .85rem; opacity: .75; }
.doc-note { font-size: .95rem; }
.log { width: 100%; border-collapse: collapse; font-size: 1rem; }
.log td { padding: .3rem .4rem; border-bottom: 1px dotted #b8a37a; vertical-align: top; }
.log td:first-child { width: 4.5em; font-weight: 700; }
.log tr.alert td { color: var(--alert); font-weight: 700; }
.notice { margin-top: .8rem; padding: .7rem .8rem; background: #f3dc8f; border: 2px dashed #9c7a2c; }
.report { border-left: 3px solid var(--ink-light); padding: .2rem .8rem; margin: .7rem 0; background: #ffffff55; }
.report h4 { margin: .2rem 0; color: var(--ink-light); font-family: var(--type); }
.cipher-text { font-size: 2.4rem; letter-spacing: .3em; text-align: center; color: var(--red); margin: .4rem 0; }
.password { font-size: 1.3rem; text-align: center; color: var(--ink-light); }
.ev-item, .ev-inline { margin: .6rem 0; }
.ev-item summary, .ev-inline summary { cursor: pointer; font-weight: 600; padding: .65rem .1rem; }
.ev-item summary small { color: var(--muted); font-weight: 400; margin-left: .3rem; }
.ev-inline > summary { color: var(--gold); }

/* mission */
.in-mission .tabs { display: none; }
.mission-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 1rem; background: var(--night); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.mh-title { text-align: center; line-height: 1.15; }
.mh-title small { display: block; font: 700 .66rem var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.mh-title b { font: 400 1.15rem var(--serif); }
.progress { display: flex; gap: 3px; padding: .6rem 1rem; max-width: 780px; margin: 0 auto; }
.progress span { flex: 1; height: 3px; background: #ffffff1f; }
.progress .done { background: var(--bronze); } .progress .now { background: var(--gold); }
.mission { max-width: 780px; }
.back-row { text-align: center; padding-bottom: 2rem; }
.preview-bar { background: repeating-linear-gradient(-45deg, #872437, #872437 14px, #7a1f31 14px, #7a1f31 28px); color: var(--cream); text-align: center; padding: .5rem 1rem;
  display: flex; gap: .8rem; justify-content: center; align-items: center; flex-wrap: wrap; font-size: .9rem; border-bottom: 1px solid var(--gold); }
.preview-bar b { font: 700 .72rem var(--ui); letter-spacing: .18em; text-transform: uppercase; background: var(--gold); color: var(--red-dark); padding: .2em .6em; }
.preview-bar.replay { background: var(--ink-light); }
.speaker { display: flex; align-items: center; gap: .85rem; margin-bottom: .7rem; }
.avatar { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, var(--ink-light), var(--night)); border: 2px solid var(--bronze);
  box-shadow: 0 0 0 3px var(--night), 0 0 0 4px var(--line); position: relative; overflow: hidden; flex: none; color: color-mix(in srgb, var(--c) 55%, #d9c9a0); }
.avatar svg { position: absolute; inset: 8px 8px 0; width: calc(100% - 16px); height: calc(100% - 8px); opacity: .55; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sp-name { font: 400 1.1rem var(--serif); color: var(--cream); }
.sp-role { font: 700 .66rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.story.letter { background: var(--paper); color: var(--paper-ink); font-family: var(--serif); border: 1px solid var(--bronze); outline: 1px solid #8f724855; outline-offset: -8px; font-size: 1.05rem; }
.story.letter h2 { color: var(--red); text-align: center; }
.story.letter .sign { font-style: italic; text-align: right; }
.story.transmission { border-top: 3px solid var(--signal); }
.tx-head { font: .78rem var(--type); color: var(--signal); text-transform: uppercase; letter-spacing: .14em; display: flex; align-items: center; gap: .5em; margin-bottom: .3rem; }
.blink { width: 8px; height: 8px; border-radius: 50%; background: #e4687a; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.after { border-top: 1px solid var(--line); padding-top: .8rem; }
.big-q { display: block; font: 400 1.3rem/1.35 var(--serif); color: var(--gold); margin: .6rem 0; }
.story.letter .big-q { color: var(--red); }
.docs { margin: 0 0 1rem; }
.options { display: grid; gap: 0; border-top: 1px solid var(--line); }
.option { display: flex; gap: .9rem; align-items: baseline; text-align: left; font: 400 1.02rem var(--ui); color: var(--cream); background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: .95rem .4rem; cursor: pointer; min-height: 52px; }
.option b { font: 400 1.1rem var(--serif); color: var(--gold); width: 1.4em; flex: none; }
.option:hover:not([disabled]) { background: #efc7800d; }
.option.picked, .option.right { background: #7fd6c214; box-shadow: inset 3px 0 0 var(--signal); }
.option.wrong { box-shadow: inset 3px 0 0 #e4687a; }
.option[disabled] { cursor: default; }
.hints { margin-top: .9rem; }
.hint { background: var(--paper); color: var(--paper-ink); font-family: var(--type); padding: .6rem .8rem; transform: rotate(-.4deg); box-shadow: 2px 3px 0 #0005; margin: .5rem 0; }
.hint b { color: var(--red); }
.code-form { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.code-form label { flex: 1 1 220px; }
.code-form input { font: 1.3rem var(--type); letter-spacing: .1em; text-transform: uppercase; }
.oath blockquote { font: italic 1.2rem/1.6 var(--serif); margin: 1rem 0; padding: 1rem 1.2rem; color: var(--paper-ink); background: var(--paper); border: 1px solid var(--bronze); }
.oath-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.cn-row { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.cn-row label { flex: 1 1 220px; }
.reward { text-align: center; }
.glow { display: inline-block; padding: 1.4rem; border-radius: 50%; background: radial-gradient(circle, #efc78033, transparent 70%); animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.debrief { text-align: center; }
.debrief ul { text-align: left; max-width: 560px; margin: .3rem auto 1rem; }
.debrief .wonder li { color: var(--muted); font-style: italic; }
.lead-box { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .9rem 0; font: italic 1.05rem var(--serif); }
.meter-line { font: 700 .72rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.contact .bubble { background: var(--paper); color: var(--paper-ink); padding: .8rem 1rem; margin: .5rem 0; font: 1.08rem var(--serif); max-width: 540px; border-left: 3px solid var(--gold); }

/* recruitment hunt */
.tray { display: flex; gap: .45rem; justify-content: center; margin-top: .7rem; }
.slot { width: 50px; height: 60px; border: 1px dashed var(--line-strong); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font: 400 1.6rem var(--serif); color: var(--cream); background: var(--night); cursor: default; padding: 0; border-radius: 1px; }
button.slot { cursor: pointer; }
.slot small { font: 400 .62rem var(--ui); color: var(--muted); }
.slot.got { border-style: solid; border-color: var(--gold); background: var(--red); color: var(--gold); }
.modal { position: fixed; inset: 0; background: #000b; display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal-in { text-align: center; animation: pop .2s ease-out; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.spark-card { width: min(300px, 86vw); margin: 0 auto 1rem; background: var(--paper); color: var(--paper-ink); border: 1px solid var(--bronze); outline: 1px solid var(--red); outline-offset: -7px;
  padding: 1.1rem; text-align: center; font-family: var(--type); }
.sc-top { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.sc-letter { font: 400 5rem/1 var(--serif); color: var(--red); margin: .5rem 0; }
.sc-ps { font-size: .8rem; opacity: .7; font-style: italic; }

/* cipher strip */
.shift-ctl { display: flex; align-items: center; gap: 1rem; justify-content: center; font-size: 1.1rem; margin-bottom: .4rem; }
.strip { display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px; }
.pair { display: flex; flex-direction: column; text-align: center; border: 1px solid var(--line); }
.pair b { background: var(--paper); color: var(--red); font: 1rem var(--type); padding: .2rem 0; }
.pair span { background: var(--ink-light); color: var(--cream); font: 1rem var(--type); padding: .2rem 0; }

/* badge: an issued credential */
.badge { position: relative; max-width: 390px; margin: .5rem auto 1rem; background: var(--paper); color: var(--paper-ink); border: 1px solid var(--bronze); outline: 1px solid #8f724866; outline-offset: -6px; box-shadow: 0 12px 30px #0009; }
.slot-hole { position: absolute; top: 9px; left: 50%; width: 46px; height: 8px; margin-left: -23px; border-radius: 4px; background: var(--night); z-index: 2; }
.badge-top { display: flex; gap: .6rem; align-items: center; background: var(--red); color: var(--cream); padding: 1.4rem .9rem .6rem; border-bottom: 2px solid var(--gold); }
.badge-top b { font: 400 .95rem var(--serif); display: block; line-height: 1.2; font-variant: small-caps; }
.badge-top small { font-size: .68rem; letter-spacing: .08em; opacity: .9; }
.badge-body { display: flex; gap: 1rem; padding: 1rem .9rem .6rem; }
.badge-photo { position: relative; width: 112px; height: 138px; flex: none; border: 1px solid var(--bronze); background: #e9dbbb; display: flex; align-items: center; justify-content: center; overflow: visible; }
.badge-photo > img:not(.pin-seal) { width: 100%; height: 100%; object-fit: cover; }
.badge-photo > span { display: flex; flex-direction: column; align-items: center; text-align: center; font: 700 .55rem var(--ui); letter-spacing: .1em; text-transform: uppercase; color: #8f7248; padding: .3rem; }
.badge-photo > span svg { width: 60px; color: #c7b48c; }
.badge-photo .pin-seal { position: absolute; right: -12px; bottom: -10px; width: 30px; height: auto; filter: drop-shadow(0 2px 2px #0006); }
.badge-info small { display: block; font: 700 .6rem var(--ui); text-transform: uppercase; letter-spacing: .14em; color: var(--red); margin-top: .35rem; }
.badge-info div { font-family: var(--type); font-size: .98rem; }
.badge-code { font: 400 1.3rem var(--serif) !important; color: var(--ink-light); min-height: 1.5em; }
.blank-line { display: inline-block; width: 160px; border-bottom: 1px solid var(--paper-ink); height: 1.3em; }
.badge-sign { padding: 0 .9rem .7rem; text-align: right; }
.badge-sign span { display: inline-block; font: italic 1.15rem var(--serif); border-bottom: 1px solid var(--paper-ink); padding: 0 .4rem; }
.badge-sign small { display: block; font: 700 .55rem var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #8f7248; margin-top: .2rem; }
.badge-foot { background: var(--ink); color: var(--gold); text-align: center; font: 700 .66rem var(--ui); letter-spacing: .2em; text-transform: uppercase; padding: .45rem; }

/* parent area */
.parent .pm { border-top: 1px solid var(--line); }
.parent .pm summary { cursor: pointer; display: flex; gap: .7rem; align-items: center; padding: .7rem 0; flex-wrap: wrap; }
.pm-date { font-family: var(--type); width: 4.5em; color: var(--muted); }
.pm-title { flex: 1; font-family: var(--serif); font-size: 1.05rem; }
.pm-body { padding: 0 0 1rem 1rem; }
.pm-body select { display: inline-block; width: auto; margin-left: .4rem; }
.pm-body label { display: inline-block; }
.key summary { color: var(--gold); cursor: pointer; }
.hunt-form { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.danger { border-color: #e4687a55; }

/* login */
.agent-pick { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: 1rem 0; }
.agent-card { width: 150px; background: var(--night); border: 1px solid var(--line); padding: 1rem .5rem; color: var(--cream); cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; gap: .3rem; border-radius: 2px; }
.agent-card:hover { border-color: var(--gold); }
.agent-card .photo { width: 70px; height: 70px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--ink); border: 1px solid var(--bronze); }
.agent-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.agent-card b { font: 400 1.05rem var(--serif); }
.agent-card small { color: var(--muted); font-family: var(--type); }

/* toast */
#toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 150%); background: var(--ink-light); color: var(--cream); border: 1px solid var(--gold);
  padding: .7rem 1.2rem; font-weight: 600; transition: transform .25s, visibility .25s; z-index: 99; max-width: 92vw; text-align: center; visibility: hidden; }
#toast.show { transform: translate(-50%, 0); visibility: visible; }

/* printables */
.print-body #sky, .entrance-body #sky { display: none; }
.print-body { background: #efe8da; color: var(--paper-ink); }
.print-bar { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .7rem 1rem; background: var(--night); color: var(--cream); position: sticky; top: 0; flex-wrap: wrap; }
.sheet { max-width: 8in; margin: 1rem auto; background: #fff; padding: .5in; color: var(--paper-ink); }
.cut { border: 1px dashed #999; padding: .5rem; margin: 0 0 .25in; break-inside: avoid; page-break-inside: avoid; }
.cards-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: .15in; }
.cards-sheet .cut { margin: 0; }
.spark-card.print { width: auto; margin: 0; }
.where { font: .75rem var(--ui); text-align: center; color: #777; margin: .3rem 0 0; }
.badge-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: .2in; }
.badge-sheet .badge { box-shadow: none; margin: 0; }
.letter-sheet { font-family: var(--serif); font-size: 1.1rem; border: 1px solid var(--bronze); outline: 1px solid #8f724866; outline-offset: -10px; text-align: left; }
.letter-sheet h1 { color: var(--red); text-align: center; }
.letter-sheet .kicker { color: var(--ink-light); text-align: center; }
.letter-sheet .sign { font-style: italic; text-align: right; }
.jar-sheet { display: grid; gap: .3in; }
.jar-label { display: flex; flex-direction: column; align-items: center; text-align: center; border-color: var(--red); padding: 1rem; font-family: var(--serif); }
.jar-label b { font-size: 1.6rem; font-weight: 400; color: var(--red); font-variant: small-caps; } .jar-label span { font-family: var(--type); } .jar-label small { font-family: var(--ui); color: #666; }
.tag-cut .doc { box-shadow: none; margin: 0; }
.strip-print { display: flex; padding: 0; overflow: hidden; }
.strip-print span { flex: 0 0 .27in; text-align: center; font: 14px var(--type); border-right: 1px solid #bbb; padding: .1in 0; }
.contact-card { font-family: var(--ui); }
.contact-card h2 { color: var(--red); }
.cores-print { display: grid; grid-template-columns: 1fr 1fr; gap: .2in; }
.core-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .2rem; font-family: var(--serif); }
.core-card b { font-size: 1.3rem; font-weight: 400; color: #8a6a22; font-variant: small-caps; }
.core-card span, .core-card small { font-family: var(--ui); font-size: .8rem; color: #555; }
.print-body .doc { background-image: none; }
@media print {
  @page { margin: .4in; }
  .no-print, #toast { display: none !important; }
  body, .print-body { background: #fff; }
  .sheet { margin: 0; padding: 0; max-width: none; }
  .letter-sheet { padding: .5in; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== Mission 1 build (story session, Nov 30): Courier Cards, theory, HQ counter, parent hunt intake, Case File ===== */
.center-btns { justify-content: center; }
.bubble { background: var(--paper); color: var(--paper-ink); padding: .8rem 1rem; margin: .8rem 0 0; font: 1.08rem var(--serif); max-width: 560px; border-left: 3px solid var(--gold); }
/* Courier Cards (screen + print). Black-and-white safe: no fills needed to read them. */
.courier-card { width: min(300px, 86vw); margin: 0 auto 1rem; background: var(--paper); color: var(--paper-ink); border: 1px solid var(--bronze); outline: 1px solid var(--red); outline-offset: -7px;
  padding: 1rem 1.1rem 1.1rem; text-align: center; font-family: var(--type); }
.cc-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.cc-top .crest.xs { width: 26px; }
.cc-num { font: 400 4.6rem/1 var(--serif); color: var(--red); margin: .35rem 0 .45rem; }
.cc-riddle { font: 1.05rem/1.4 var(--serif); margin: 0 0 .5rem; }
.cc-code { font-size: .95rem; letter-spacing: .04em; margin: .2rem 0 0; border-top: 1px dotted #8f7248; padding-top: .4rem; }
.cc-code small { display: block; font: 700 .6rem var(--ui); letter-spacing: .14em; text-transform: uppercase; }
.cc-missing { opacity: .6; font-size: .85rem; }
.courier-card.decoy { outline: 1px dashed #555; border-style: dashed; }
.courier-card.decoy .cc-top { justify-content: center; font-weight: 700; }
.penguin-stamp { width: 56px; height: auto; display: block; margin: .4rem auto 0; color: #222; transform: rotate(4deg); }
/* hunt tray */
.slot.next { border-style: solid; border-color: var(--gold); cursor: pointer; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px #efc78033; } }
.slot.got b { font: 400 1.4rem var(--serif); }
.find-panel { max-width: 420px; text-align: center; margin: 0 auto; }
.find-panel .hints { text-align: left; }
.modal-in { max-height: 92vh; overflow-y: auto; }
/* oath certificate */
.certificate { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--bronze); outline: 1px solid #8f724866; outline-offset: -8px; padding: 1.2rem 1.2rem 1.4rem; margin: 1rem 0; text-align: center; }
.certificate .kicker { color: var(--ink-light); }
.oath .certificate blockquote { background: none; border: 0; padding: .4rem .2rem; margin: .3rem 0 1rem; }
.sig-lines { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; justify-content: center; }
.sig { min-width: 180px; }
.sig-name { display: block; min-height: 1.6em; border-bottom: 1px solid var(--paper-ink); font: italic 1.3rem var(--serif); }
.sig small { font: 700 .6rem var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #8f7248; }
/* evidence rows you can point at */
.ev-rows th { text-align: left; font: 700 .7rem var(--ui); text-transform: uppercase; letter-spacing: .1em; padding: .3rem .4rem; border-bottom: 1px solid #b8a37a; }
.ev-rows td:first-child { width: 4em; }
.ev-rows tr.tap { cursor: pointer; }
.ev-rows tr.tap:hover td, .ev-rows tr.tap:focus td { background: #efc78040; }
.ev-rows tr.picked td { background: #efc780; font-weight: 700; }
.ev-rows tr.picked td:last-child::after { content: '  ← this one'; font-weight: 400; }
.theory-done .stamp.big { margin: .2rem 0 .6rem; }
/* theory board */
.tb-q { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .6rem; }
.tb-list { list-style: none; padding: 0; margin: 0; }
.tb-list li { padding: .5rem 0; border-top: 1px dotted var(--line); }
.tb-list li.mine { box-shadow: inset 3px 0 0 var(--gold); padding-left: .6rem; }
.yours { font: 700 .66rem var(--ui); text-transform: uppercase; letter-spacing: .1em; color: var(--gold); margin-left: .4rem; }
/* HQ */
.kc-num { font: 400 2rem var(--type); color: var(--signal); letter-spacing: .04em; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--muted); flex: none; }
.stations li.got .st-dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 6px var(--gold); }
/* debrief */
.lead-box .speaker, .signoff .speaker { justify-content: center; margin-bottom: .3rem; }
.lead-box .avatar, .signoff .avatar { width: 56px; height: 56px; }
.signoff { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; font: italic 1.08rem var(--serif); }
.trend { color: var(--muted); font-weight: 400; letter-spacing: .06em; }
/* parent area */
.parent ol.steps li { margin: .25rem 0; }
.elf-set { display: grid; gap: .7rem; }
.elf-names { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.pron { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-weight: 600; font-size: .92rem; }
label.radio { display: flex; gap: .2rem; align-items: baseline; font-weight: 400; margin: .35rem 0; }
.hunt-spot { margin: 0 0 1rem; display: grid; gap: .7rem; }
.hunt-spot select { max-width: 100%; }
.rp-label { font-weight: 600; font-size: .92rem; margin: 0; }
.hunt-spot textarea { width: 100%; font: 1rem var(--ui); padding: .6em .7em; border-radius: 2px; border: 1px solid var(--line); background: var(--night); color: var(--cream); margin-top: .3rem; }
.tips { font-size: .84rem; color: var(--muted); border-left: 2px solid var(--gold); padding-left: .7rem; margin: .5rem 0; }
.warn { color: #ffb4a8; font-size: .86rem; font-weight: 600; margin: .2rem 0; }
.code-out { font-family: var(--type); margin: 0; }
.code-out:empty { display: none; }
.tip, .note { font-size: .86rem; color: var(--muted); margin: 0; }
.hunt-preview { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.hunt-preview .courier-card { width: auto; margin: 0; }
.pv-card .where { color: var(--muted); }
.table-wrap { overflow-x: auto; }
.cheat-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cheat-table th, .cheat-table td { text-align: left; vertical-align: top; padding: .45rem .5rem; border-bottom: 1px solid var(--line); }
.cheat-table th { font: 700 .68rem var(--ui); text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
/* printables */
.cards-sheet .card-cell .cut { margin: 0; }
.cards-sheet .where { text-align: left; margin: 0 0 .1in; }
.courier-card.print { width: auto; margin: 0; background: #fff; outline-color: #555; border-color: #333; }
.courier-card.print .cc-num { color: #111; }
.liaison-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25in; }
.liaison-id { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .1rem; padding: .25in .15in; border-color: #333; font-family: var(--serif); }
.liaison-id .crest.md { width: 1in; margin: 0 auto .1in; }
.liaison-id b { font: 400 1.25rem var(--serif); font-variant: small-caps; letter-spacing: .06em; }
.li-name { font: 1.1rem var(--type); border-bottom: 1px solid #333; padding: 0 .4rem; }
.liaison-id small { font: .7rem var(--ui); color: #444; }
.li-no { font: 700 .6rem var(--ui); letter-spacing: .14em; text-transform: uppercase; margin-top: .1in; }
/* Case File: two landscape pages, panels side by side, fold in the middle */
.cf-pagelabel { max-width: 10in; margin: 1rem auto -.6rem; font: 700 .75rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: #6b5a3a; }
.cf-page { max-width: 10.2in; display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; padding: .3in; color: #1a1a1a; font-family: var(--serif); }
.cf-fold { border-left: 1px dashed #999; margin: 0 .3in; }
.cf-panel { border: 2px solid #222; outline: 1px solid #222; outline-offset: -7px; padding: .35in .35in .3in; min-height: 7in; display: flex; flex-direction: column; }
.cf-panel h2 { font-size: 1.35rem; text-align: center; color: #1a1a1a; margin-bottom: .15in; }
.cf-front { align-items: center; text-align: center; }
.cf-front .crest.lg { width: 1.3in; }
.cf-front h1 { font-size: 2.6rem; letter-spacing: .18em; margin: .05in 0; color: #1a1a1a; }
.cf-op { font-style: italic; font-size: 1.15rem; margin: 0; }
.cf-class { font: 700 .78rem var(--ui); letter-spacing: .14em; text-transform: uppercase; border: 2px solid #222; padding: .25em .7em; transform: rotate(-2deg); margin: .15in 0 .05in; }
.cf-case { font-family: var(--type); margin: 0 0 .15in; }
.cf-lines { width: 100%; display: grid; gap: .12in; margin-bottom: .2in; }
.cf-line { display: flex; gap: .6rem; align-items: baseline; text-align: left; }
.cf-line small { font: 700 .62rem var(--ui); letter-spacing: .14em; text-transform: uppercase; width: 4.5em; }
.cf-line span { flex: 1; border-bottom: 1px solid #222; min-height: 1.4em; font-family: var(--type); }
.cf-stations { width: 100%; margin-top: auto; }
.cf-label { font: 700 .62rem var(--ui); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .06in; }
.cf-st-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: .06in; }
.cf-st { border: 1.5px solid #222; padding: .08in .02in; display: flex; flex-direction: column; align-items: center; }
.cf-st b { font: 700 .58rem var(--ui); letter-spacing: .04em; }
.cf-st span { font: .7rem var(--type); }
.cf-rules { padding-left: 1.2em; font-size: .98rem; line-height: 1.45; }
.cf-rules li { margin-bottom: .1in; }
.cf-found { margin-top: auto; text-align: center; font-style: italic; }
.cf-back .crest.sm { margin: .05in auto 0; }
.cf-ref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .15in; }
.cf-box { border: 1px solid #222; padding: .08in .1in; margin-bottom: .1in; font-size: .9rem; }
.cf-box p { margin: 0; }
.cf-map { width: 100%; height: auto; color: #222; font-family: var(--ui); }
.cf-map text { fill: #222; }
.cf-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-bottom: .1in; }
.cf-table th, .cf-table td { border: 1px solid #222; padding: .04in .08in; text-align: left; }
.cf-table th { font: 700 .6rem var(--ui); letter-spacing: .12em; text-transform: uppercase; }
.cf-strip { margin-top: auto; border-top: 3px double #222; padding-top: .08in; }
.cf-strip-row { display: grid; grid-template-columns: repeat(13, 1fr); border: 1px solid #222; }
.cf-strip-row span { text-align: center; font: .82rem var(--type); padding: .03in 0; border-right: 1px solid #999; border-bottom: 1px solid #999; }
.cf-sub { text-align: center; font: 700 .72rem var(--ui); letter-spacing: .16em; text-transform: uppercase; margin: -.1in 0 .15in; }
.cf-roster td:first-child { font-family: var(--type); width: 3em; }
.cf-roster td { padding: .07in .08in; font-size: .95rem; }
.cf-write { display: inline-block; min-width: 2.2in; border-bottom: 1px solid #222; }
@media screen and (max-width: 760px) {
  .cf-page { grid-template-columns: 1fr; padding: .15in; }
  .cf-fold { border-left: 0; border-top: 1px dashed #999; margin: .2in 0; }
  .cf-panel { min-height: 0; padding: .25in; }
  .cf-ref-grid { grid-template-columns: 1fr; }
  .cards-sheet { grid-template-columns: 1fr; }
  .liaison-sheet { grid-template-columns: 1fr 1fr; }
  .badge-sheet { grid-template-columns: 1fr; }
  .sheet { padding: .25in; }
}
@media print {
  .cf-page { page-break-after: always; break-after: page; max-width: none; height: 7.6in; padding: 0; }
  .cf-page:last-child { page-break-after: auto; break-after: auto; }
  .cf-panel { min-height: 0; height: 7.6in; }
  .cards-sheet { gap: .12in; }
  .courier-card.print .cc-num { font-size: 3.6rem; }
}
.modal-in.still { animation: none; }
.find-panel { width: min(440px, 92vw); }
.story.letter .kicker { color: var(--ink-light); }
.topbar .brand b, .topbar .brand small { display: block; }
.topbar .brand small { font-size: .78rem; }
.liaison-sheet { grid-template-columns: repeat(4, 1fr); gap: .2in; }
.liaison-id .crest.md { width: .8in; }
.cf-roster td:last-child { width: 38%; font-size: .85rem; }
@media screen and (max-width: 760px) {
  .cf-page { grid-template-columns: minmax(0, 1fr); }
  .cf-panel { min-width: 0; padding: .2in .15in; }
  .cf-strip-row span { font-size: .62rem; }
  .cf-st b { font-size: .5rem; }
  .cf-write { min-width: 1.2in; }
}
@media screen and (max-width: 760px) { .liaison-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Print-all + legibility pass (story session, Nov 30 evening) ===== */
.pb-text { flex: 1 1 320px; font-size: .92rem; line-height: 1.45; }
.pb-list { margin: .3rem 0 .4rem; padding-left: 1.2rem; }
.pb-list li { margin: .15rem 0; }
.pb-warn { margin-top: .5rem; padding: .5rem .7rem; border: 1px solid #ffb4a8; color: #ffd2ca; }
.pb-warn ul { margin: .2rem 0 0; padding-left: 1.1rem; }
.print-bar .small { color: var(--muted); }
/* Nothing on paper smaller than about 9pt, and no pale grey ink. */
.sheet { overflow-wrap: break-word; }
.sheet .where { font-size: .8rem; color: #333; }
.courier-card .cc-top { font-size: .78rem; }
.courier-card .cc-code { font-size: 1rem; }
.courier-card .cc-code small { font-size: .74rem; }
.courier-card.print { color: #111; }
.badge-info small { font-size: .72rem; }
.badge-top small { font-size: .75rem; }
.badge-sign small { font-size: .68rem; color: #5a4526; }
.badge-foot { font-size: .75rem; }
.badge-photo > span { font-size: .66rem; color: #5a4526; }
.liaison-id small { font-size: .8rem; color: #222; }
.li-no { font-size: .74rem; color: #111; }
.li-name { max-width: 100%; }
.cf-label { font-size: .75rem; }
.cf-line small { font-size: .75rem; width: 5em; }
.cf-st b { font-size: .7rem; }
.cf-st span { font-size: .78rem; }
.cf-table th { font-size: .72rem; }
.cf-strip-row span { font-size: .92rem; }
.cf-mapbox { text-align: center; }
.cf-mapbox .cf-map { width: 100%; max-width: 3.3in; }
.cf-ref-grid { margin-top: .05in; }
@media screen and (max-width: 760px) { .cf-strip-row span { font-size: .66rem; } .cf-st b { font-size: .55rem; } }
@media print {
  @page { size: letter portrait; margin: .4in; }
  .print-doc + .print-doc { break-before: page; page-break-before: always; }
  .card-cell { break-inside: avoid; page-break-inside: avoid; }
  .letter-sheet { font-size: 1.15rem; }
  /* Case File: each landscape page is turned to fit a normal portrait page. */
  .cf-rot { position: relative; width: 7.5in; height: 10in; overflow: hidden; break-inside: avoid; page-break-inside: avoid; }
  .cf-rot + .cf-rot, .cf-pagelabel + .cf-rot-b { break-before: page; page-break-before: always; }
  .cf-rot .cf-page { position: absolute; top: 0; left: 0; width: 10in; height: 7.5in; max-width: none; margin: 0; padding: 0; transform-origin: 0 0; page-break-after: auto; break-after: auto; }
  .cf-rot-a .cf-page { transform: translate(0, 10in) rotate(-90deg); }
  .cf-rot-b .cf-page { transform: translate(7.5in, 0) rotate(90deg); }
  .cf-rot .cf-panel { height: 7.5in; overflow: hidden; }
}
.cf-strip-row { grid-template-columns: repeat(9, 1fr); }
.cf-line small { width: 5.8em; white-space: nowrap; flex: none; }
.cf-st { min-width: 0; }
.cf-st b { font-size: .66rem; letter-spacing: 0; }
.cf-front.many .crest.lg { width: .8in; margin-bottom: 0; }
.cf-front.many h1 { font-size: 2rem; }
.cf-front.many .cf-class { margin: .08in 0 .03in; }
.cf-front.many .cf-case { margin-bottom: .08in; }
.cf-front.many .cf-lines { gap: .06in; margin-bottom: .12in; }
@media screen and (max-width: 760px) { .cf-strip-row span { font-size: .8rem; } }
.cf-mapbox .cf-map { max-width: 2.5in; }
.cf-mapbox { margin-bottom: .08in; padding-bottom: .02in; }
.cf-ref h2 { margin-bottom: .1in; }
.cf-write { min-width: 1.4in; }
.print-bar { position: static; }

/* ===== Print styles: Detailed (painted art) / Plain (saves ink) — story session, Nov 30 ===== */
.pb-style { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .5rem 0 .3rem; }
.pb-style span { font-weight: 600; }
.pd-only { display: none !important; }
.style-detailed .pd-only { display: block !important; }
.style-detailed .pl-only { display: none !important; }
/* letter */
.style-detailed .letter-sheet { padding-top: 0; overflow: hidden; }
.style-detailed .letter-banner { width: calc(100% + 1in); max-width: none; margin: 0 -.5in .05in; height: auto; }
/* courier cards */
.style-detailed .courier-card.print { background: url('../assets/img/print/courier-card.jpg') center / 100% 100% no-repeat; border: 0; outline: 0; padding: .3in .42in .32in; }
.style-detailed .courier-card.print .cc-code { border-top-color: #5a4526; }
.style-detailed .courier-card.decoy.print { background-image: url('../assets/img/print/decoy-card.jpg'); padding-left: .62in; padding-right: .35in; }
.style-detailed .penguin-img { width: .7in; height: auto; margin: .02in auto 0; transform: rotate(4deg); }
/* elf liaison ID */
.style-detailed .liaison-id { background: url('../assets/img/print/liaison-id.jpg') center / 100% 100% no-repeat; aspect-ratio: 2 / 3; padding: 36% .14in .12in; justify-content: flex-start; gap: 0; }
.style-detailed .liaison-id .crest.md { width: .5in; margin-bottom: .04in; }
.style-detailed .liaison-id b { font-size: 1.05rem; }
.style-detailed .liaison-id small { font-size: .72rem; }
/* case file */
.style-detailed .cf-front, .style-detailed .cf-back { background: url('../assets/img/print/casefile-frame.jpg') center / 100% 100% no-repeat; border: 0; outline: 0; padding: .62in .6in .55in; }
.style-detailed .cf-st img { height: .42in; width: auto; margin: 0 auto .03in; }
.style-detailed .cf-st { background: #fffdf7; }
.style-detailed .cf-line span { border-bottom-color: #3b2d1a; }
.cf-mapart { position: relative; line-height: 0; }
.cf-mapart img { width: 100%; height: auto; display: block; }
.mlabel { position: absolute; transform: translate(-50%, 0); white-space: nowrap; line-height: 1.2; background: #fffaf0f0; color: #1a1a1a; border: 1px solid #5a4526;
  border-radius: 2px; padding: .015in .06in; font: 700 .72rem var(--ui); }
.mstamp { position: absolute; left: 86.9%; top: 84.1%; transform: translate(-50%, -50%) rotate(-3deg); line-height: 1; font: .78rem var(--type); letter-spacing: .14em; color: #872437; }
.style-detailed .cf-mapbox { padding: .06in; }
.style-detailed .courier-card.print { padding: .42in .5in .42in; }
.style-detailed .courier-card.decoy.print { padding: .3in .4in .55in .66in; }
.style-detailed .cf-class { font-size: .7rem; letter-spacing: .08em; white-space: nowrap; }
.style-detailed .cf-st { padding: .05in 0; }
.style-detailed .cf-st b { font-size: .64rem; letter-spacing: -.01em; }
.style-detailed .cf-back { padding-bottom: .75in; }
.style-detailed .cf-back > .crest { width: 26px; }
.mstamp { top: 86.3%; font-size: .66rem; letter-spacing: .1em; }
@media print { .style-detailed .courier-card.print { padding: .36in .46in .36in; } .style-detailed .courier-card.print .cc-num { font-size: 3.2rem; margin: .15rem 0 .25rem; } }
.cc-code .cw { white-space: nowrap; }
@media print { .style-detailed .courier-card.print { padding: .4in .46in .5in; } }
/* Frames keep their garland/ice edges at a fixed size; only the plain middle stretches with longer text. */
.style-detailed .courier-card.print { background: none; border-style: solid; border-color: transparent; outline: 0;
  border-image: url('../assets/img/print/courier-card.jpg') 190 80 190 80 fill / .55in .24in .55in .24in stretch;
  border-width: .55in .24in .55in .24in; padding: .02in .16in; }
.style-detailed .courier-card.decoy.print { background: none;
  border-image: url('../assets/img/print/decoy-card.jpg') 110 90 210 250 fill / .3in .24in .6in .7in stretch;
  border-width: .3in .24in .6in .7in; padding: .02in .08in; }
@media print { .style-detailed .courier-card.print { padding: .02in .16in; } .style-detailed .courier-card.decoy.print { padding: .02in .08in; } }
.style-detailed .courier-card.print .cc-top { margin-top: -.12in; }
/* slices as percentages so a re-export of the art at another size still lines up */
.style-detailed .courier-card.print { border-image-source: url('../assets/img/print/courier-card.jpg'); border-image-slice: 23.75% 6.7% 23.75% 6.7% fill; }
.style-detailed .courier-card.decoy.print { border-image-source: url('../assets/img/print/decoy-card.jpg'); border-image-slice: 13.75% 7.5% 26.25% 20.8% fill; }

/* ===== Kindness missions + HQ atlas map (Mission 1 experience session, Nov 29) ===== */
.stamp.kind { color: var(--gold); }
.kind-card { border-top: 3px solid var(--gold); }
.kind-card .speaker { margin: .2rem 0 .5rem; }
.kind-card h2 { margin-top: .2rem; }
.kind-orders .orders { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--bronze); outline: 1px dashed #8f724877; outline-offset: -6px; padding: .9rem 1.1rem; margin: .9rem 0; font: 1.12rem/1.45 var(--serif); }
.kind-orders .orders .label { color: var(--red); }
.kind-orders .orders p:last-child { margin-bottom: 0; }
.kind-page textarea, .kind-own textarea, .parent textarea { display: block; width: 100%; margin-top: .3rem; font: 400 1rem var(--ui); padding: .6em .8em; border-radius: 2px; border: 1px solid var(--line); background: var(--night); color: var(--cream); }
.who-did { border: 1px solid var(--line); padding: .6rem .9rem; }
.who-did .radio { display: block; margin: .3rem 0; font-weight: 400; }
.kind-logged .speaker { justify-content: center; margin-top: .4rem; }
.kind-logged .bubble { margin: .6rem auto 1rem; text-align: left; }
.kind-logged .field-note { font: italic 1rem var(--serif); color: var(--cream); }
.kind-logged .kc-num { margin-bottom: .2rem; }
.kind-row { border: 1px solid var(--line); padding: .7rem .9rem .5rem; margin: 0 0 .8rem; }
.kind-row legend { font: 700 .78rem var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); padding: 0 .3rem; }
.kind-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kind-preview { font-size: .92rem; margin: .6rem 0 .3rem; }
.kind-own { display: grid; gap: .6rem; margin: .6rem 0 .3rem; }
.kind-reports { padding-left: 1.1rem; font-size: .92rem; }
.kind-reports li { margin-bottom: .5rem; }
/* printed orders */
.kind-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: .25in; }
.kind-order { border: 1.5px dashed #555; padding: .18in .22in; font-family: var(--serif); color: #1a1a1a; break-inside: avoid; page-break-inside: avoid; }
.kind-order .ko-top { display: flex; justify-content: space-between; align-items: center; font: 700 .7rem var(--ui); letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid #444; padding-bottom: .06in; }
.kind-order .ko-top .crest.xs { width: 24px; }
.kind-order h3 { color: #872437; font-size: 1.3rem; margin: .1in 0 .06in; text-align: center; }
.kind-order .ko-brief { font-style: italic; font-size: .98rem; }
.kind-order .ko-orders { font-size: 1.05rem; }
.kind-order .ko-foot { font: .78rem var(--ui); color: #333; border-top: 1px dotted #666; padding-top: .05in; margin: .08in 0 0; }
@media screen and (max-width: 760px) { .kind-sheet { grid-template-columns: 1fr; } }
/* HQ atlas map: the stations sit dark until a core relights them */
.atlas-map { position: relative; margin: .8rem 0 .4rem; line-height: 0; border: 1px solid var(--line-strong); }
.atlas-map img { width: 100%; height: auto; display: block; filter: brightness(.85) saturate(.9); }
.am-st { position: absolute; width: 13%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.am-st i { position: absolute; inset: -20%; border-radius: 50%; opacity: 0; }
.am-st b { position: absolute; top: 88%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; line-height: 1.1;
  font: 700 .6rem var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--cream); background: #0d211dd9; padding: 2px 5px; white-space: nowrap; border-radius: 2px; }
.am-st b::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #6d756c; flex: none; }
.am-st.lit i { opacity: 1; background: radial-gradient(circle, #fff3c4dd 0%, #efc78088 38%, #efc78000 70%); mix-blend-mode: screen; animation: amGlow 2.4s ease-in-out infinite; }
.am-st.lit b { color: var(--gold); }
.am-st.lit b::before { background: var(--gold); box-shadow: 0 0 5px var(--gold); }
.am-st.ready b::before { background: var(--gold); } /* core found, station still dark */
@keyframes amGlow { 50% { opacity: .65; } }
@media (max-width: 420px) { .am-st b { font-size: .52rem; padding: 1px 4px; } }
/* Kindness Mission orders in Detailed (color) print: same garland frame as the Courier Cards */
.style-detailed .kind-order { border-style: solid; border-color: transparent;
  border-image: url('../assets/img/print/courier-card.jpg') 23.75% 6.7% 23.75% 6.7% fill / .5in .22in .5in .22in stretch;
  border-width: .5in .22in .5in .22in; padding: 0 .14in; }
.style-detailed .kind-order .ko-top { margin-top: -.1in; }
/* On-screen Courier Cards wear the same painted frame as the printed ones, so a lost card looks familiar */
.courier-card:not(.print) { border-style: solid; border-color: transparent; outline: 0; background: none;
  border-image: url('../assets/img/print/courier-card.jpg') 23.75% 6.7% 23.75% 6.7% fill / 46px 20px 46px 20px stretch;
  border-width: 46px 20px 46px 20px; padding: 0 .8rem .1rem; }
.courier-card:not(.print) .cc-top { margin-top: -.6rem; }
/* New decoy art (Oliver's South Pole delivery card) has the same layout as the Courier Card frame */
.courier-card.decoy:not(.print) { outline: 0; border-image: url('../assets/img/print/decoy-card.jpg') 23.75% 6.7% 23.75% 6.7% fill / 46px 20px 46px 20px stretch;
  border-width: 46px 20px 46px 20px; padding: 0 .8rem .1rem; }
.modal-in > .small { color: var(--cream); }
/* On-screen Dispatch letterhead */
.story.letter .letter-banner-screen { display: block; width: calc(100% + 3rem); max-width: none; margin: -1.4rem -1.5rem .4rem; height: auto; }

.parent-link { word-break: break-all; }
/* Codenames: parent "Suggest one" and HQ-assigned names in Mission 1 */
.cn-parent { display: flex; gap: .6rem; align-items: flex-end; }
.cn-parent label { flex: 1; }
.cn-assigned { border: 1px solid var(--line-strong); padding: .6rem .9rem; display: block; }
.cn-assigned .label { margin-bottom: .2rem; }
.cn-assigned .cn-name { font: 400 1.5rem var(--type); color: var(--gold); margin: 0; }
/* Decoy = Oliver's South Pole delivery card: a twin of the Courier Card; the round penguin seals are the tell. */
.courier-card.decoy { outline: 1px solid var(--red); outline-offset: -7px; border-style: solid; }
.courier-card.decoy .cc-top { justify-content: space-between; font-weight: 400; }
.pg-seal { width: 26px; height: 26px; flex: none; color: #1f3a4d; }
.pg-foot { width: 1.3em; height: 1.3em; vertical-align: -.3em; color: #1f3a4d; transform: rotate(-12deg); }
.sig-foot { display: inline-block; border-bottom: 1px solid currentColor; padding: 0 .35em; }
.style-detailed .courier-card.decoy.print { border-image-source: url('../assets/img/print/decoy-card.jpg'); border-image-slice: 23.75% 6.7% 23.75% 6.7% fill;
  border-width: .55in .24in .55in .24in; padding: .02in .16in; }
@media print { .style-detailed .courier-card.decoy.print { padding: .02in .16in; } }
.style-detailed .courier-card.decoy.print { border-image-width: .55in .24in .55in .24in; border-image-outset: 0; }
.style-detailed .courier-card.print { border-image-width: .55in .24in .55in .24in; }
.courier-card.decoy { outline-color: #1f3a4d; }
.kind-via { border: 1px solid var(--line-strong); padding: .6rem .9rem; margin: .4rem 0 .9rem; }
.kind-via legend { font: 700 .78rem var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); padding: 0 .3rem; }
.kind-via .radio { display: block; font-weight: 400; margin: .35rem 0; }
.kind-card .small-link { margin-left: .8rem; }

/* ===== Fewer pages + breathing room (story session, Nov 30 night) ===== */
@media print {
  .print-doc.same-page { break-before: auto !important; page-break-before: auto !important; margin-top: .22in; }
  .print-doc.doc-badges, .print-doc.doc-liaison { break-inside: avoid; page-break-inside: avoid; }
  /* compact letter so the credentials fit under it */
  .letter-sheet { padding: .32in .45in .3in; font-size: 1.02rem; }
  .letter-sheet .crest.lg { width: .8in; }
  .letter-sheet h1 { font-size: 1.9rem; margin: .04in 0 .12in; }
  .letter-sheet p { margin: 0 0 .55em; line-height: 1.5; }
  .style-detailed .letter-sheet { padding-top: 0; }
  .style-detailed .letter-banner { width: calc(100% + .9in); margin: 0 -.45in .08in; height: 1.15in; object-fit: cover; object-position: center top; }
  .liaison-sheet { grid-template-columns: repeat(auto-fill, 1.6in); justify-content: center; gap: .25in; }
}
/* elf ID: space the lines out */
.liaison-id b { margin-top: .05in; }
.li-name { margin: .05in 0 .06in; }
.liaison-id small { margin: .02in 0 .06in; line-height: 1.3; }
/* courier cards: a little air between number and riddle */
.courier-card .cc-top { margin-bottom: .04in; }
.courier-card .cc-num { margin: .08rem 0 .3rem; }
/* Case File: spread each panel's content instead of bunching it at the top */
.cf-back .cf-rules { margin: auto 0; }
.cf-rules li { margin-bottom: .15in; }
.cf-back .cf-found { margin-top: .1in; }
.cf-ref { justify-content: space-between; }
.cf-ref .cf-strip { margin-top: 0; }
.cf-ref .cf-ref-grid { gap: .2in; }
.cf-ref .cf-box { padding: .1in .12in; }
.cf-ref .cf-table td { padding: .06in .1in; }
.cf-agents .cf-sub { margin-bottom: .25in; }
.cf-agents .cf-roster td { padding: .11in .1in; font-size: 1rem; }
.cf-front:not(.many) .cf-lines { gap: .22in; margin: .15in 0 .25in; }
.cf-front:not(.many) .cf-case { margin-bottom: .1in; }
@media print {
  .style-detailed .letter-banner { height: .85in; }
  .style-detailed .letter-sheet .crest.lg { width: .62in; margin-bottom: .02in; }
  .style-detailed .letter-sheet h1 { font-size: 1.7rem; margin: 0 0 .1in; }
  .print-doc.same-page { margin-top: .16in; }
  .cards-sheet { gap: .08in; }
  .style-detailed .courier-card.print { border-width: .44in .22in .44in .22in; border-image-width: .44in .22in .44in .22in; }
  .style-detailed .courier-card.decoy.print { border-width: .44in .22in .44in .22in; border-image-width: .44in .22in .44in .22in; }
  .style-detailed .courier-card.print .cc-num { font-size: 2.8rem; margin: 0 0 .15rem; }
  .style-detailed .courier-card.print .cc-top { margin-top: -.08in; }
  .style-detailed .liaison-sheet { grid-template-columns: repeat(auto-fill, 1.45in); }
}
@media print {
  .style-detailed .liaison-sheet { grid-template-columns: repeat(auto-fill, 1.4in); gap: .2in; }
  .style-detailed .liaison-id { padding: 31% .1in .08in; margin: 0; }
  .style-detailed .liaison-id .crest.md { width: .42in; margin-bottom: .02in; }
  .style-detailed .liaison-id b { font-size: .95rem; margin-top: .02in; }
  .style-detailed .li-name { font-size: .95rem; margin: .03in 0 .04in; }
  .style-detailed .liaison-id small { font-size: .68rem; margin: 0 0 .03in; }
  .style-detailed .li-no { font-size: .66rem; }
  .style-detailed .courier-card.print, .style-detailed .courier-card.decoy.print { border-width: .4in .22in .4in .22in; border-image-width: .4in .22in .4in .22in; }
  .print-doc.doc-liaison .liaison-sheet, .print-doc.doc-liaison .cut { margin-bottom: 0; }
}
/* bigger families: keep every agent row on the Active Agents page */
.cf-agents.many .cf-sub { margin-bottom: .12in; }
.cf-agents.many .cf-roster td { padding: .05in .08in; font-size: .92rem; line-height: 1.25; }
.cf-agents.many .cf-roster td:last-child { font-size: .8rem; }
.cf-agents.many .cf-roster td { padding: .08in .08in; }

/* ===== Dispatch on its own page, equal cards, credentials together (story session, Nov 30 late) ===== */
.sign-block { margin-top: .3in; text-align: right; }
.sig-hand { display: inline-block; font: 600 2.1rem/1 'Caveat', 'Bradley Hand', 'Segoe Script', cursive; color: #1d2b4a; transform: rotate(-4deg); padding: 0 .3in .02in 0; }
.letter-sheet .sign-block .sign { margin-top: .02in; border-top: 1px solid #8f7248; display: inline-block; padding-top: .04in; }
.sign-block .sign { display: block; }
@media print {
  /* Dispatch 1: a full page with room to breathe */
  .letter-sheet { padding: .7in .8in .6in; font-size: 1.14rem; min-height: 10.1in; }
  .letter-sheet .crest.lg { width: 1.05in; margin: .1in auto .12in; }
  .letter-sheet h1 { font-size: 2.5rem; margin: 0 0 .3in; }
  .letter-sheet p { margin: 0 0 .95em; line-height: 1.7; }
  .style-detailed .letter-sheet { padding-top: 0; }
  .style-detailed .letter-banner { width: calc(100% + 1.6in); margin: 0 -.8in .15in; height: 1.55in; }
  .style-detailed .letter-sheet .crest.lg { width: 1.05in; margin: .05in auto .12in; }
  .style-detailed .letter-sheet h1 { font-size: 2.5rem; margin: 0 0 .3in; }
  /* Courier Cards: every card (penguin card too) the same size */
  .cards-sheet { grid-auto-rows: 1fr; gap: .16in; }
  .card-cell { display: flex; flex-direction: column; }
  .card-cell > .cut { flex: 1; display: flex; }
  .card-cell .courier-card { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 2.55in; }
  .style-detailed .courier-card.print .cc-num { font-size: 3.2rem; margin: .04in 0 .1in; }
  /* kid credentials + elf IDs on one page */
  .print-doc.doc-liaison.same-page { margin-top: .3in; }
  .style-detailed .liaison-sheet, .liaison-sheet { grid-template-columns: repeat(auto-fill, 1.5in); gap: .25in; justify-content: center; }
}
@media print {
  .letter-sheet { font-size: 1.3rem; padding: .75in .85in .6in; }
  .letter-sheet p { line-height: 1.75; margin-bottom: 1em; }
  .letter-sheet .crest.lg, .style-detailed .letter-sheet .crest.lg { width: 1.3in; margin: .15in auto .18in; }
  .letter-sheet h1, .style-detailed .letter-sheet h1 { font-size: 2.9rem; margin: 0 0 .35in; }
  .style-detailed .letter-banner { width: calc(100% + 1.7in); margin: 0 -.85in .2in; height: 1.7in; }
  .sign-block { margin-top: .45in; }
  .sig-hand { font-size: 2.5rem; }
  .badge-sheet { gap: .15in; }
  .badge-sheet .cut { margin: 0; }
  .print-doc.doc-liaison.same-page { margin-top: .2in; }
}
@media print {
  .letter-sheet { min-height: 9.9in; }
  .style-detailed .letter-banner { height: 1.25in; margin-bottom: .1in; }
  .style-detailed .letter-sheet .crest.lg { width: 1.05in; margin: .05in auto .12in; }
  .style-detailed .letter-sheet h1 { margin-bottom: .28in; }
}
@media print {
  .letter-sheet { font-size: 1.22rem; padding-bottom: .4in; min-height: 9.6in; }
  .style-detailed .letter-sheet { overflow: visible; }
  .sign-block { margin-top: .32in; break-inside: avoid; }
}
@media print { .style-detailed .liaison-sheet, .liaison-sheet { grid-template-columns: repeat(auto-fill, 1.35in); gap: .22in; } .print-doc.doc-liaison.same-page { margin-top: .16in; } }
@media print { .badge-sheet .cut { padding: .04in; } .badge-sheet .badge { zoom: .95; } }

/* Case File without the kids: cover + roster are the same for every family (Nov 30 late) */
.cf-front-simple { justify-content: space-evenly; }
.cf-front-simple .crest.lg, .style-detailed .cf-front-simple .crest.lg { width: 1.7in; margin: 0 auto; }
.cf-front-simple h1 { font-size: 3rem; margin: .1in 0; }
.cf-front-simple .cf-op { font-size: 1.3rem; }
.cf-front-simple .cf-class { font-size: .85rem; margin: .1in 0; }
.cf-front-simple .cf-case { font-size: 1.05rem; margin: 0; }
.cf-front-simple .cf-lines { width: 85%; margin: 0; }
.cf-front-simple .cf-line small { font-size: .8rem; }
.cf-front-simple .cf-line span { font-size: 1.15rem; }
.cf-ref .cf-stations { margin: 0; }
.cf-ref .cf-st { padding: .06in .02in; }
.cf-ref .cf-st em { font: 700 .66rem var(--ui); font-style: normal; }
.cf-ref .cf-st img { height: .5in; width: auto; margin: 0 auto .03in; }
.cf-ref .cf-ref-grid { grid-template-columns: 1fr 1fr; }
.cf-agents .cf-roster td { padding: .2in .1in; font-size: 1.05rem; }
.cf-agents .cf-roster { margin-top: .1in; }
.cf-st b, .cf-st em, .cf-st span { display: block; line-height: 1.2; text-align: center; }
.cf-ref .cf-st img, .style-detailed .cf-ref .cf-st img { height: .38in; }
.style-detailed .cf-mapbox .cf-mapart { max-width: 3.3in; margin: 0 auto; }
.cf-ref .cf-box { padding: .07in .1in; font-size: .88rem; }
.cf-ref .cf-ref-grid { gap: .12in; }
.cf-agents .cf-roster td:nth-child(2) { width: 42%; }
.cf-agents .cf-roster td:last-child { width: 40%; font-size: .95rem; }

/* ===== Credentials sized for a standard 3 x 4 in. vertical badge holder; elf IDs share the rows (Nov 30 late) ===== */
.creds-sheet { display: flex; flex-wrap: wrap; gap: .15in; justify-content: center; align-items: flex-start; }
.creds-sheet .badge-cut { width: 3in; height: 4in; padding: 0; margin: 0; flex: none; border: 1px dashed #888; background: #fff; }
.creds-sheet .liaison-id { width: 1.35in; flex: none; margin: 0; }
.creds-sheet .badge { width: 100%; height: 100%; max-width: none; margin: 0; box-shadow: none; zoom: 1 !important; display: flex; flex-direction: column; overflow: hidden; }
.creds-sheet .slot-hole { top: .09in; width: .5in; height: .08in; margin-left: -.25in; }
.creds-sheet .badge-top { padding: .26in .1in .07in; gap: .08in; }
.creds-sheet .badge-top .crest.sm { width: .36in; }
.creds-sheet .badge-top b { font-size: .8rem; }
.creds-sheet .badge-top small { font-size: .75rem; letter-spacing: 0; }
.creds-sheet .badge-body { flex: 1; gap: .1in; padding: .14in .12in .04in; align-items: flex-start; }
.creds-sheet .badge-photo { width: .95in; height: 1.2in; }
.creds-sheet .badge-photo > span { font-size: .75rem; letter-spacing: 0; line-height: 1.15; padding: .03in; }
.creds-sheet .badge-photo > span svg { width: .45in; }
.creds-sheet .badge-photo .pin-seal { width: .3in; right: -.1in; bottom: -.08in; }
.creds-sheet .badge-info { min-width: 0; }
.creds-sheet .badge-info small { font-size: .75rem; margin-top: .05in; letter-spacing: .03em; }
.creds-sheet .badge-info div { font-size: .8rem; }
.creds-sheet .badge-code { font-size: 1rem !important; min-height: 1.25em; }
.creds-sheet .blank-line { width: 1.55in; }
.creds-sheet .badge-sign { padding: 0 .12in .08in; }
.creds-sheet .badge-sign span { font-size: 1rem; }
.creds-sheet .badge-sign small { font-size: .75rem; letter-spacing: .02em; }
.creds-sheet .badge-foot { font-size: .75rem; letter-spacing: .12em; padding: .07in; }
@media print { .creds-sheet { gap: .15in; } .creds-sheet .badge { zoom: 1 !important; } }

/* ===== Case File folder version: each panel on its own page, to glue on a manila folder ===== */
.cf-folder-page { margin: 1rem auto; display: flex; justify-content: center; }
.cf-folder-page .cf-panel { width: 5.1in; height: 6.8in; min-height: 0; background-color: #fff; }
@media screen and (max-width: 760px) { .cf-folder-page .cf-panel { width: 100%; height: auto; } }
@media print {
  .cf-folder-page { margin: 0; width: 7.7in; height: 10.2in; align-items: center; }
  .cf-folder-page ~ .cf-folder-page { break-before: page; page-break-before: always; }
  .cf-folder-page .cf-panel { zoom: 1.5; }
}
/* inside the shared credentials row, % padding would use the whole sheet's width, so use inches */
.style-detailed .creds-sheet .liaison-id { padding: .42in .1in .08in; height: 2.03in; aspect-ratio: auto; }
.creds-sheet .liaison-id { align-self: flex-start; }
.cf-folder-page { font-family: var(--serif); color: #1a1a1a; }

/* ===== ID-card size credentials (2.125 x 3.375 in), vertical or horizontal — slim layout (Nov 30 late) ===== */
.creds-sheet.shape-vertical .badge-cut { width: 2.125in; height: 3.375in; }
.creds-sheet.shape-horizontal .badge-cut { width: 3.375in; height: 2.125in; }
.shape-vertical .badge-top small, .shape-horizontal .badge-top small { display: none; }
.shape-vertical .badge-top b, .shape-horizontal .badge-top b { font-size: .64rem; line-height: 1.1; }
.shape-vertical .badge-photo > span, .shape-horizontal .badge-photo > span { font-size: 0; padding: 0; }
.shape-vertical .badge-photo > span svg, .shape-horizontal .badge-photo > span svg { width: .42in; }
.shape-vertical .badge-info > :nth-child(n+5), .shape-horizontal .badge-info > :nth-child(n+5) { display: none; }
.shape-vertical .badge-sign, .shape-horizontal .badge-sign { display: none; }
.shape-vertical .badge-info small, .shape-horizontal .badge-info small { font-size: .75rem; margin-top: .03in; color: #6b1a28; }
.shape-vertical .badge-info div, .shape-horizontal .badge-info div { font-size: .82rem; }
.shape-vertical .badge-code, .shape-horizontal .badge-code { font-size: .9rem !important; min-height: 1.3em; }
.shape-vertical .badge-foot, .shape-horizontal .badge-foot { font-size: .75rem; letter-spacing: .02em; padding: .05in .02in; }
/* vertical: everything stacked */
.shape-vertical .slot-hole { top: .07in; width: .4in; height: .07in; margin-left: -.2in; }
.shape-vertical .badge-top { padding: .2in .08in .06in; gap: .06in; }
.shape-vertical .badge-top .crest.sm { width: .3in; }
.shape-vertical .badge-body { flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: .06in; padding: .08in .1in .04in; }
.shape-vertical .badge-photo { width: .78in; height: .92in; }
.shape-vertical .badge-photo .pin-seal { width: .24in; right: -.08in; bottom: -.06in; }
.shape-vertical .badge-info { width: 100%; text-align: center; }
.shape-vertical .blank-line { width: 1.6in; }
/* horizontal: photo left, codename and ID right */
.shape-horizontal .slot-hole { top: .05in; width: .45in; height: .07in; margin-left: -.225in; }
.shape-horizontal .badge-top { padding: .16in .12in .05in; gap: .08in; }
.shape-horizontal .badge-top .crest.sm { width: .28in; }
.shape-horizontal .badge-body { flex: 1; align-items: center; gap: .14in; padding: .06in .14in .04in; }
.shape-horizontal .badge-photo { width: .74in; height: .88in; }
.shape-horizontal .badge-photo .pin-seal { width: .24in; right: -.08in; bottom: -.06in; }
.shape-horizontal .blank-line { width: 1.9in; }

/* Penguin card sign-off (story session, Nov 30) */
.courier-card.decoy .cc-sign { text-align: right; font-style: italic; margin-top: .25rem; }
/* Gumdrop's thank-you note on the penguin card: smaller (still 9pt+) so the card stays the same size as the others */
.courier-card.decoy .cc-riddle { font-size: .8rem; line-height: 1.32; margin-bottom: .1rem; }
.courier-card.decoy .cc-sign { font-size: .78rem; margin-top: .08rem; }
.courier-card.decoy .cc-num { font-size: 2.6rem; margin: 0 0 .06rem; }
@media print { .style-detailed .courier-card.decoy.print .cc-num { font-size: 2.6rem; margin: 0 0 .06rem; } .courier-card.decoy.print .cc-top { margin-bottom: .02in; } }

/* ===== Case File inside pages: quieter parchment frame to match the covers (design session, Nov 29) ===== */
.style-detailed .cf-ref, .style-detailed .cf-agents { background: url('../assets/img/print/casefile-inside.jpg') center / 100% 100% no-repeat;
  border: 0; outline: 0; padding: .34in .36in .78in; color: #2a1f14; }
.style-detailed .cf-ref h2, .style-detailed .cf-agents h2 { color: #2a1f14; margin-top: .02in; }
.style-detailed .cf-ref .cf-box, .style-detailed .cf-ref .cf-st, .style-detailed .cf-agents .cf-table th,
.style-detailed .cf-agents .cf-table td, .style-detailed .cf-ref .cf-strip-row { border-color: #5a4526; }
.style-detailed .cf-ref .cf-strip { border-top-color: #5a4526; }
.style-detailed .cf-ref .cf-strip-row span { border-color: #a08660; }
.style-detailed .cf-ref .cf-label, .style-detailed .cf-agents .cf-sub, .style-detailed .cf-agents .cf-table th { color: #5a4526; }
.style-detailed .cf-agents .cf-table th { background: #5a452612; }
.style-detailed .cf-ref .cf-st { background: #fffaf0cc; }

/* ===== Parent area tabs (design session, Nov 29) ===== */
.ptabs { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 1040px; margin: 1rem auto 0; border: 1px solid var(--line); }
.ptabs button { appearance: none; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--ink); color: var(--cream);
  font: 500 .92rem var(--ui); padding: .8em .4em; cursor: pointer; }
.ptabs button:last-child { border-right: 0; }
.ptabs button:hover { background: var(--ink-light); }
.ptabs button.on { background: var(--ink-light); box-shadow: inset 0 -2px 0 var(--gold); color: var(--gold-light, var(--gold)); }
.ptabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; }
.parent .pt-mission { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .8rem 0 .3rem; }
@media (max-width: 640px) {
  .ptabs { grid-template-columns: repeat(3, 1fr); margin: .6rem .6rem 0; }
  .ptabs button { font-size: .82rem; border-bottom: 1px solid var(--line); }
}
/* tabs now sit inside .page, so they share the panels' width */
.parent .ptabs { max-width: none; margin: 0 0 1rem; }
@media (max-width: 640px) { .parent .ptabs { margin: 0 0 .8rem; } }
.tablink { appearance: none; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--gold); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Fill-in areas: light paper so the parts parents type into read like a form (design session, Nov 29) */
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) {
  background: #f8eedb; color: #2a1f14; border: 1px solid #b89a63; border-radius: 2px; padding: .9rem 1rem 1rem; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row) > legend {
  background: #f8eedb; color: #872437; border: 1px solid #b89a63; padding: .2em .6em; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) :is(input:not([type=radio]):not([type=checkbox]), select, textarea) {
  background-color: #fffdf8; color: #2a1f14; border-color: #a08660; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) :is(.small, .opt, .help, .note, .tips) { color: #5f4c32; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) a { color: #872437; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) .btn.ghost { color: #2a1f14; border-color: #8f7248; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) .btn.ghost:hover { background: #2a1f140d; border-color: #5a4526; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) fieldset { border-color: #c9b48a; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) fieldset legend { color: #872437; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) .warn { color: #a3263a; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) input:focus,
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) select:focus { outline-color: #872437; }
.parent .agent-row { margin-bottom: .9rem; }

/* Folder version: the painted station map fills its outlined box */
.style-detailed .cf-folder-page .cf-mapbox .cf-mapart { max-width: none; }
.parent .hunt-spot .tip { color: #5f4c32; }
.parent .hunt-spot .tip b { color: #2a1f14; }
/* bigger folder map: win the space back on that page only */
.style-detailed .cf-folder-page .cf-ref { padding-top: .24in; padding-bottom: .7in; }
.style-detailed .cf-folder-page .cf-ref h2 { margin-bottom: .08in; }
.style-detailed .cf-folder-page .cf-ref .cf-mapbox { margin-bottom: .05in; }
.style-detailed .cf-folder-page .cf-ref .cf-st img { height: .32in; }
.style-detailed .cf-folder-page .cf-ref .cf-box { margin-bottom: .05in; }
.style-detailed .cf-folder-page .cf-ref .cf-ref-grid p:not(.cf-label) { font-size: .82rem; line-height: 1.35; }
.style-detailed .cf-folder-page .cf-ref .cf-strip-row { grid-template-columns: repeat(13, 1fr); }
.style-detailed .cf-folder-page .cf-ref .cf-strip-row span { font-size: .74rem; padding: .02in 0; }
.style-detailed .cf-folder-page .cf-ref .cf-strip > .cf-label { display: none; }
.style-detailed .cf-folder-page .cf-ref .cf-label { letter-spacing: .08em; }

/* ===== Field Reference cleanup (design session, Nov 29) ===== */
/* painted map: no box or label around it, just the map */
.style-detailed .cf-ref .cf-mapbox { border: 0; padding: 0; background: none; }
.style-detailed .cf-ref .cf-mapbox > .cf-label { display: none; }
.cf-mapart { container-type: inline-size; }
/* small names under each landmark, with a paper halo instead of a box */
.style-detailed .mlabel { background: none; border: 0; padding: 0; color: #2a1f14; font: 700 clamp(8.5px, 2.3cqw, 11px)/1.1 var(--ui); letter-spacing: .02em;
  text-shadow: 0 0 2px #fff8ea, 0 0 2px #fff8ea, 0 0 3px #fff8ea, 0 0 4px #fff8ea; }
/* CLASSIFIED centered in the painted stamp box, sized to the map */
.mstamp { left: 87.2%; top: 89.3%; font-size: 2.5cqw; letter-spacing: .1em; }
/* station status: heading, then a smaller instruction line */
.cf-hint { margin: -.02in 0 .07in; font: italic .78rem var(--serif); color: inherit; }
.style-detailed .cf-ref .cf-hint { color: #5f4c32; }
.cf-ref .cf-label { margin-bottom: .04in; }
/* meter readings / backward messages: room between the heading and the text */
.cf-ref .cf-box .cf-label { margin-bottom: .07in; }
.cf-ref .cf-ref-grid .cf-box { padding: .09in .12in .1in; }
.parent .before-print { border-left: 3px solid var(--gold); background: #ffffff08; padding: .55rem .8rem; margin: .8rem 0; }

/* ===== Parent area welcome card (design session, Nov 29) ===== */
.parent .welcome { border-left: 4px solid var(--gold); font-size: 1.02rem; line-height: 1.55; }
.parent .welcome h2 { margin-bottom: .6rem; }
.parent .welcome h3 { margin: 1.1rem 0 .5rem; font-size: 1.1rem; }
.wl-how { margin: 0; padding-left: 1.2rem; }
.wl-how li { margin: .35rem 0; }
.wl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.wl-steps li { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; background: #f8eedb; color: #2a1f14;
  border: 1px solid #b89a63; border-radius: 2px; padding: .6rem .8rem; }
.wl-n { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font: 700 1rem var(--ui); }
.wl-steps .btn.ghost { color: #2a1f14; border-color: #8f7248; white-space: nowrap; }
.wl-steps .btn.ghost:hover { background: #2a1f140d; border-color: #5a4526; }
.wl-save { margin-top: 1rem; padding: .7rem .9rem; border: 1px dashed var(--line-strong, var(--line)); }
.wl-save p { margin: 0 0 .35rem; }
.wl-link { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0; }
.wl-link span { font: 1rem var(--type); color: var(--gold); word-break: break-all; }
.parent .welcome .row-btns { margin-top: .9rem; }
@media (max-width: 640px) {
  .wl-steps li { grid-template-columns: auto 1fr; }
  .wl-steps li .btn { grid-column: 2; justify-self: start; }
}
.parent .wl-sub { font: italic 1.1rem var(--serif); color: var(--gold); margin: -.3rem 0 .6rem; }
.parent .pt-date { font: 600 .95rem var(--ui); color: var(--cream); opacity: .85; }

/* ===== Drop-downs on brand (design session, Nov 29) ===== */
select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.4em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23d8ac50' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85em center; background-size: .85em auto;
  font-family: var(--serif); }
select:hover { border-color: var(--gold); }
select option { background: #fbf4e4; color: #2a1f14; font-family: var(--ui); }
/* on the light paper fill-in areas: brown arrow, white field, red focus */
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) select {
  background-color: #fffdf8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23872437' stroke-width='2'/%3E%3C/svg%3E");
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 0 #b89a6333; }
.parent :is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) select:hover { border-color: #872437; }
.parent .kind-row select { font-size: .95rem; padding-left: .6em; padding-right: 2em; background-position: right .6em center; }

/* ===== To prepare: one numbered list of steps (design session, Nov 29) ===== */
.parent .prep-time { margin: .9rem 0 .4rem; }
.prep-steps { list-style: none; margin: .6rem 0 1.2rem; padding: 0; display: grid; gap: .7rem; }
.prep-steps li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; padding: .85rem 1rem;
  border: 1px solid var(--line); background: #ffffff06; line-height: 1.55; }
.ps-n { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font: 700 1rem var(--ui); margin-top: -.1rem; }
.ps-body { padding-top: .15rem; }
.ps-title { display: block; margin-bottom: .2rem; font-size: 1.03rem; }
.ps-body .row-btns { margin: .55rem 0 .4rem; }
.ps-body .small { display: block; }
.parent .prep-after { margin: 0 0 .9rem; }

/* ===== Hiding spots: pick the mission first (design session, Nov 29) ===== */
.hm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; margin: .8rem 0 .5rem; }
.hm { appearance: none; text-align: left; cursor: pointer; display: grid; gap: .2rem; padding: .75rem .9rem; border-radius: 2px;
  background: var(--ink); color: var(--cream); border: 1px solid var(--line); font: inherit; }
.hm b { font: 600 1.02rem var(--serif); }
.hm span { font-size: .85rem; color: var(--muted); }
.hm:hover { border-color: var(--gold); }
.hm.on { border: 2px solid var(--gold); background: var(--ink-light); box-shadow: inset 4px 0 0 var(--gold); }
.hm.on span { color: var(--cream); }

/* ===== Courier cards: every card on the sheet is the same size (design session, Nov 29) ===== */
/* Rows match the tallest card; each card stretches to fill its cell, with its text centered. */
.cards-sheet { grid-auto-rows: 1fr; }
.cards-sheet .card-cell { display: flex; flex-direction: column; }
.cards-sheet .card-cell > .cut { flex: 1; display: flex; }
.cards-sheet .card-cell > .cut > .courier-card { flex: 1; display: flex; flex-direction: column; }
/* header stays at the top; the number and riddle sit centered in the space below it */
.cards-sheet .courier-card > .cc-top + * { margin-top: auto; }
.cards-sheet .courier-card > :last-child { margin-bottom: auto; }
/* Hiding spots preview: same treatment, so every card matches the tallest one */
.hunt-preview { grid-auto-rows: 1fr; }
.hunt-preview .pv-card { display: flex; flex-direction: column; }
.hunt-preview .pv-card > .courier-card { flex: 1; display: flex; flex-direction: column; }
.hunt-preview .courier-card > .cc-top + * { margin-top: auto; }
.hunt-preview .courier-card > :last-child { margin-bottom: auto; }

/* ===== Print page header: short and calm (design session, Nov 29) ===== */
.print-bar { display: block; padding: .8rem max(1rem, calc((100vw - 1040px) / 2)); }
.pb-head { display: flex; align-items: center; gap: 1rem; }
.pb-title { flex: 1; margin: 0; font: 400 1.35rem var(--serif); color: var(--cream); }
.pb-title span { color: var(--muted); font-size: 1rem; }
.pb-opts { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin: .7rem 0 .2rem; }
.pb-opt { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; }
.pb-opt select { width: auto; margin: 0; padding-top: .4em; padding-bottom: .4em; font-size: .95rem; background-color: var(--ink); }
.pb-how { margin-top: .5rem; font-size: .9rem; }
.pb-how summary { cursor: pointer; color: var(--gold); }
.pb-how .pb-list, .pb-how p { margin: .4rem 0; }
.print-bar .pb-warn { margin: .7rem 0 .2rem; padding: .6rem .8rem; border: 1px solid #ffb4a8; background: #a3263a33; color: #ffe1db; }
.print-bar .pb-warn .btn { margin-top: .4rem; }
@media (max-width: 640px) { .pb-head { flex-wrap: wrap; } .pb-title { order: 3; flex-basis: 100%; font-size: 1.15rem; } }

/* in-page confirm box */
.ask-modal { z-index: 80; }
.ask-box { max-width: 440px; text-align: left; padding: 1.2rem 1.3rem; }
.ask-box p { margin: 0 0 1rem; font-size: 1.02rem; line-height: 1.5; }
.ask-box .row-btns { justify-content: flex-end; margin: 0; }

/* ===== Branded drop-down (search + scroll) for long lists (design session, Nov 29) ===== */
.dd { position: relative; margin-top: .3rem; }
.dd-native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px; margin: 0 !important; padding: 0 !important; }
.dd-btn { display: block; width: 100%; text-align: left; cursor: pointer; font: 400 1.02rem var(--serif); color: #2a1f14;
  padding: .62em 2.4em .62em .8em; border: 1px solid #a08660; border-radius: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: #fffdf8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23872437' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .85em center / .85em auto; }
.dd-btn:hover, .dd-btn[aria-expanded="true"] { border-color: #872437; }
.dd-btn:focus-visible { outline: 2px solid #872437; outline-offset: 2px; }
.dd-panel { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: #fffaf0; border: 1px solid #8f7248;
  border-radius: 2px; box-shadow: 0 12px 28px #0007; padding: .4rem; min-width: 220px; }
.dd-search { display: block; width: 100%; margin: 0 0 .35rem; padding: .5em .65em; font: 400 .95rem var(--ui); color: #2a1f14;
  background: #fff; border: 1px solid #a08660; border-radius: 2px; }
.dd-search:focus { outline: 2px solid #872437; outline-offset: 0; }
.dd-list { list-style: none; margin: 0; padding: 0; max-height: 15rem; overflow-y: auto; overscroll-behavior: contain; }
.dd-list:focus { outline: none; }
.dd-group { position: sticky; top: 0; background: #fffaf0; padding: .55rem .6rem .2rem; font: 700 .68rem var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #872437; }
.dd-opt { padding: .45rem .7rem; cursor: pointer; color: #2a1f14; font: 400 1rem var(--serif); border-radius: 2px; display: flex; justify-content: space-between; gap: .5rem; }
.dd-opt.act { background: #f1e0bf; }
.dd-opt.sel { font-weight: 700; }
.dd-opt.sel::after { content: '✓'; color: #872437; }
.dd-opt.off { color: #9a8a70; cursor: default; font-style: italic; }
.dd-none { padding: .5rem .7rem; color: #6b5a3a; font-style: italic; }
.parent .kind-row .dd-btn { font-size: .95rem; padding-left: .6em; padding-right: 2em; background-position: right .6em center; }

/* ===== Footer sits at the bottom of the screen on short pages (design session, Nov 30) ===== */
#app:has(> .foot) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
#app:has(> .foot) > .page { width: 100%; box-sizing: border-box; }
#app > .foot { margin-top: auto; }
/* tabs line up with the panels below them */
#app:has(> .foot) > .tabs { width: min(1040px - 2rem, 100% - 2rem); box-sizing: border-box; }

/* ===== Agent File: show the real printed credential, scaled up, so the shape always matches what prints (design session, Nov 30) ===== */
.agent-badge { display: flex; justify-content: center; margin: .6rem 0 1.1rem; }
.agent-badge .badge-cut { border: 0 !important; background: none !important; padding: 0 !important; box-shadow: 0 12px 30px #0009; }
.agent-badge.shape-large { zoom: 1.3; }
.agent-badge.shape-vertical { zoom: 1.6; }
.agent-badge.shape-horizontal { zoom: 1.3; }
@media (max-width: 480px) { .agent-badge.shape-large { zoom: 1.05; } .agent-badge.shape-vertical { zoom: 1.4; } .agent-badge.shape-horizontal { zoom: 1; } }
.agent-file .panel > .row-btns { justify-content: center; }
.agent-file .panel > .row-btns + .small { text-align: center; }

/* ===== Large (3 × 4 in.) credential: photo centered on top, details as a neat table (design session, Nov 30) ===== */
.creds-sheet.shape-large .badge-body { flex-direction: column; align-items: center; justify-content: flex-start; gap: .12in; padding: .16in .2in .04in; }
.creds-sheet.shape-large .badge-photo { width: 1.1in; height: 1.35in; }
.creds-sheet.shape-large .badge-info { width: 100%; display: grid; grid-template-columns: auto 1fr; column-gap: .14in; row-gap: .05in; align-items: baseline; }
.creds-sheet.shape-large .badge-info small { margin: 0; text-align: right; white-space: nowrap; }
.creds-sheet.shape-large .badge-info div { text-align: left; }
.creds-sheet.shape-large .badge-code { min-height: 0; font-size: 1.05rem !important; }
.creds-sheet.shape-large .badge-sign { margin-top: auto; padding: 0 .2in .08in; }
.creds-sheet.shape-large .badge-foot { white-space: nowrap; letter-spacing: .1em; font-size: .7rem; }
.creds-sheet.shape-large .badge-body { gap: .09in; padding-top: .12in; }
.creds-sheet.shape-large .badge-photo { width: 1in; height: 1.22in; }
.creds-sheet.shape-large .badge-info { row-gap: .03in; }
.creds-sheet.shape-large .badge-sign { padding-bottom: .05in; }
.creds-sheet.shape-large .badge-sign span { font-size: 1rem; }
.creds-sheet.shape-large .blank-line { width: 100%; max-width: 1.5in; }
.creds-sheet.shape-large .badge-body { padding-left: .16in; padding-right: .16in; }
.creds-sheet.shape-large .badge-photo { width: .95in; height: 1.15in; }
.creds-sheet.shape-large .badge-info small { font-size: .68rem; letter-spacing: .02em; }
.creds-sheet.shape-large .badge-info div { white-space: nowrap; font-size: .8rem; }

/* ===== Courier cards: same layout on every card (design session, Nov 30) =====
   Header at the top, the big number at the same height on every card, and the riddle centered
   in the space under it, so a sheet of cards lines up and each card looks balanced. */
:is(.cards-sheet, .hunt-preview) .courier-card > .cc-top + * { margin-top: .06in; }
:is(.cards-sheet, .hunt-preview) .courier-card > :last-child { margin-bottom: 0; }
:is(.cards-sheet, .hunt-preview) .courier-card:not(.decoy) > .cc-riddle,
:is(.cards-sheet, .hunt-preview) .courier-card.decoy > .cc-riddle:not(.cc-sign) {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; margin: 0; }
:is(.cards-sheet, .hunt-preview) .courier-card.decoy > .cc-sign { margin: 0 0 .04in; }
/* penguin card: its header fits on one line like the DCI cards */
.courier-card.decoy .cc-top span { white-space: nowrap; letter-spacing: .06em; font-size: .68rem; }
:is(.cards-sheet, .hunt-preview) .where { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* card headers size themselves to the card, so they stay on one line in the narrow preview too */
.courier-card { container-type: inline-size; }
.courier-card .cc-top span { white-space: nowrap; min-width: 0; font-size: clamp(.55rem, 3.9cqw, .78rem); letter-spacing: .1em; }
.courier-card.decoy .cc-top span { font-size: clamp(.5rem, 3cqw, .7rem); letter-spacing: .04em; }
.courier-card .cc-top span { font-size: clamp(.64rem, 4.6cqw, .8rem); letter-spacing: .08em; }
.courier-card .cc-top .crest.xs { flex: none; }
.courier-card.decoy .cc-top span { white-space: normal; font-size: clamp(.6rem, 3.8cqw, .72rem); letter-spacing: .06em; line-height: 1.25; }
.courier-card.decoy .cc-top .pg-seal { flex: none; }
.courier-card:not(.decoy) .cc-top span { font-size: clamp(.64rem, 5.2cqw, .8rem); }

/* ===== Branded drop-down everywhere: dark fields on dark screens, light on the paper fill-in areas ===== */
.dd-btn { background-color: var(--night); color: var(--cream); border-color: var(--line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23d8ac50' stroke-width='2'/%3E%3C/svg%3E"); }
.dd-btn:hover, .dd-btn[aria-expanded="true"] { border-color: var(--gold); }
.dd-btn:focus-visible { outline-color: var(--gold); }
:is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) .dd-btn { background-color: #fffdf8; color: #2a1f14; border-color: #a08660;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23872437' stroke-width='2'/%3E%3C/svg%3E"); }
:is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) .dd-btn:hover,
:is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) .dd-btn[aria-expanded="true"] { border-color: #872437; }
:is(.hunt-spot, .kind-row, .kind-via, .agent-row, .kind-own, form[data-form="family"]) .dd-btn:focus-visible { outline-color: #872437; }
.pb-opt .dd { margin: 0; min-width: 12.5rem; }
.pb-opt .dd-btn { padding-top: .4em; padding-bottom: .4em; font-size: .95rem; }

/* ===== Kindness Missions: December at a glance (design session, Nov 30) ===== */
.kc-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; max-width: 460px; margin: .6rem 0 .4rem; }
.kc-wd { text-align: center; font: 700 .7rem var(--ui); color: var(--muted); letter-spacing: .1em; }
.kc-cell { appearance: none; aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 0; border-radius: 2px; border: 1px solid var(--line);
  background: var(--ink); color: var(--cream); font: inherit; padding: 0; line-height: 1.1; }
.kc-cell b { font: 600 .95rem var(--serif); }
.kc-cell small { font: 700 .62rem var(--ui); min-height: .8em; }
.kc-cell.blank { border: 0; background: none; }
.kc-cell.off { opacity: .35; }
.kc-cell.mission { background: var(--red); border-color: #c9485c; color: #fff; }
.kc-cell.kind { background: #f8eedb; color: #2a1f14; border-color: #b89a63; cursor: pointer; }
.kc-cell.kind small { color: #872437; font-size: .75rem; }
.kc-cell.free { cursor: pointer; }
.kc-cell.free:hover { border-color: var(--gold); background: var(--ink-light); }
.kc-cell.free:hover small::before { content: '+'; color: var(--gold); font-size: .8rem; }
.kc-cell.today { outline: 2px solid var(--gold); outline-offset: 1px; }
.kc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; font-size: .82rem; color: var(--muted); margin: 0 0 1rem; }
.kc-key { display: inline-grid; place-items: center; width: 1.5rem; height: 1.2rem; border-radius: 2px; border: 1px solid var(--line); font: 700 .6rem var(--ui); }
.kc-key.mission { background: var(--red); color: #fff; border-color: #c9485c; }
.kc-key.kind { background: #f8eedb; color: #872437; border-color: #b89a63; }
.kc-key.free { background: var(--ink); }

/* ===== Mission dates (All missions tab) ===== */
.mdates { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .5rem .9rem; margin: .8rem 0; }
.md-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .35rem .6rem; font-weight: 400; background: #f8eedb; color: #2a1f14;
  border: 1px solid #b89a63; border-radius: 2px; padding: .55rem .7rem; }
/* mission cards: name on top, date picker underneath, so long names never push the picker out of the card */
.md-row .md-n { grid-row: 1 / span 2; align-self: center; }
.md-row .dd { grid-column: 2; width: 100%; }
.md-row .md-fixed { grid-column: 2; font: 400 .95rem var(--serif); color: #2a1f14; padding: .4em 0; }
.md-row.md-finale { grid-template-columns: auto minmax(0, 1fr) auto; }
.md-row.md-finale .dd { width: 17rem; max-width: 100%; }
.md-row.md-finale .md-n { grid-row: auto; }
.md-row.md-finale .dd { grid-column: auto; }
.md-n { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font: 700 .85rem var(--ui); }
.md-t { font: 400 .98rem var(--serif); }
.md-t em { color: #6b5a3a; font-size: .85rem; }
.md-row .dd { margin: 0; }
.md-row .dd-btn { background-color: #fffdf8; color: #2a1f14; border-color: #a08660; padding-top: .4em; padding-bottom: .4em; font-size: .95rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23872437' stroke-width='2'/%3E%3C/svg%3E"); }
.md-row .dd-btn:hover, .md-row .dd-btn[aria-expanded="true"] { border-color: #872437; }
@media (max-width: 520px) { .md-row, .md-row.md-finale { grid-template-columns: auto minmax(0, 1fr); } .md-row .md-n { grid-row: auto; } .md-row .dd, .md-row.md-finale .dd { grid-column: 1 / -1; } }
/* six tabs: four numbered setup steps, then the extras */
.ptabs { grid-template-columns: repeat(6, 1fr); }
.ptabs button[data-t="kind"], .ptabs button[data-t="missions"] { color: var(--muted); }
.ptabs button[data-t="kind"].on, .ptabs button[data-t="missions"].on { color: var(--gold); }
@media (max-width: 640px) { .ptabs { grid-template-columns: repeat(3, 1fr); } }
.parent .next-step { display: flex; justify-content: flex-end; margin: 0 0 1.2rem; }

/* ===== Kindness calendar, compact version (design session, Nov 30) ===== */
.kc-wrap { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; margin: .6rem 0 1.2rem; }
.kc-card { background: #f8eedb; color: #2a1f14; border: 1px solid #b89a63; border-radius: 2px; padding: .7rem .8rem .8rem; width: 100%; max-width: 330px; box-sizing: border-box; }
.kc-month { margin: 0 0 .4rem; text-align: center; font: 400 1.05rem var(--serif); color: #872437; letter-spacing: .04em; }
.kc-cal { max-width: none; margin: 0; gap: .15rem; }
.kc-wd { color: #8f7248; font-size: .62rem; padding-bottom: .15rem; }
.kc-cell { aspect-ratio: auto; height: 2.35rem; border: 1px solid transparent; background: none; color: #2a1f14; border-radius: 50%; width: 2.35rem; justify-self: center; }
.kc-cell b { font: 500 .9rem var(--serif); }
.kc-cell small { font-size: .52rem; line-height: 1; min-height: 0; }
.kc-cell.off { opacity: .3; }
.kc-cell.mission { background: none; border-color: transparent; color: #872437; }
.kc-cell.mission b { font-weight: 700; }
.kc-cell.mission small { color: #872437; letter-spacing: .04em; }
.kc-cell.kind { background: #fff; border-color: #c9a35a; color: #2a1f14; box-shadow: 0 1px 0 #b89a6355; }
.kc-cell.kind small { color: #b23a48; font-size: .6rem; }
.kc-cell.free { color: #2a1f14; }
.kc-cell.free:hover { background: #fff; border-color: #a08660; }
.kc-cell.free:hover small::before { content: '+'; color: #872437; font-size: .7rem; }
.kc-cell.today { outline: 2px solid var(--gold); outline-offset: 0; }
.kc-side { flex: 1; min-width: 220px; }
.kc-side p { margin: 0 0 .5rem; }
.kc-legend { list-style: none; display: grid; gap: .35rem; padding: 0; margin: 0 0 .6rem; font-size: .9rem; color: var(--cream); }
.kc-legend li { display: flex; align-items: center; gap: .55rem; }
.kc-key { width: 1.7rem; height: 1.7rem; border-radius: 50%; font: 700 .72rem var(--serif); border: 1px solid transparent; }
.kc-key.mission { background: #f8eedb; color: #872437; }
.kc-key.kind { background: #fff; color: #b23a48; border-color: #c9a35a; }
.kc-key.free { background: #f8eedb; color: #2a1f14; font-weight: 500; }
.parent .kind-empty { padding: .8rem 1rem; border: 1px dashed var(--line); margin: 0 0 .8rem; }

/* ===== Talking messages (stand-in for video until voice + mouth art arrive) ===== */
.tmsg { position: relative; overflow: hidden; }
.tm-stage { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1rem; align-items: center; margin: .6rem 0 .4rem; }
.tm-face { grid-row: 1 / 3; position: relative; width: 120px; height: 120px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--c) 30%, var(--ink));
  border: 3px solid var(--c); display: grid; place-items: center; color: #ffffff55; animation: tmSway 6s ease-in-out infinite; }
.tm-face svg { width: 70%; }
.tm-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tmsg.talking .tm-face { box-shadow: 0 0 0 4px #d8ac5033, 0 0 22px #d8ac5055; }
.tm-who b { display: block; font: 400 1.15rem var(--serif); color: var(--cream); }
.tm-who span { font-size: .85rem; color: var(--muted); }
.tm-wave { display: flex; align-items: center; gap: 3px; height: 34px; }
.tm-wave i { width: 4px; height: 6px; border-radius: 2px; background: var(--signal); opacity: .5; }
.tmsg.talking .tm-wave i { animation: tmBar .9s ease-in-out infinite; opacity: .9; }
.tmsg.talking .tm-wave i:nth-child(3n) { animation-delay: -.3s; } .tmsg.talking .tm-wave i:nth-child(3n+1) { animation-delay: -.6s; } .tmsg.talking .tm-wave i:nth-child(4n) { animation-duration: .7s; }
.tm-captions { min-height: 4.5rem; }
.tm-line { margin: 0 0 .6rem; font-size: 1.08rem; line-height: 1.6; opacity: 0; }
.tm-line.on { opacity: 1; }
.tm-ctl { margin-top: .4rem; }
@keyframes tmBar { 0%, 100% { height: 6px; } 50% { height: 30px; } }
@keyframes tmSway { 0%, 100% { transform: rotate(-1.2deg) translateY(0); } 50% { transform: rotate(1.2deg) translateY(-2px); } }
/* weak signal: static and a little flicker */
.tmsg.garbled::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .18; mix-blend-mode: screen;
  background: repeating-linear-gradient(0deg, #fff2 0 1px, transparent 1px 3px); animation: tmStatic .25s steps(2) infinite; }
.tmsg.garbled .tm-line { font-family: var(--type); letter-spacing: .02em; }
.tmsg.garbled.talking .tm-face { animation: tmSway 6s ease-in-out infinite, tmFlicker 1.7s steps(1) infinite; }
@keyframes tmStatic { 50% { transform: translateY(1px); } }
@keyframes tmFlicker { 0%, 92%, 100% { filter: none; } 94% { filter: brightness(1.6) hue-rotate(40deg); } 96% { filter: grayscale(1); } }
/* Jasper's takeover: icy blue and purple inside the game only, a black snowflake that spreads, typed words */
.tmsg.hijack { background: radial-gradient(circle at 80% 10%, #3b2a6b 0, #142846 45%, #0b1426 100%); border-color: #7fb3ff66; }
.tmsg.hijack .tx-head { color: #a9c8ff; }
.tmsg.hijack .tm-line { color: #dfe9ff; font-family: var(--type); }
.tmsg.hijack .tm-wave i { background: #b3a1f2; }
.tm-flake { position: absolute; right: -10px; top: -10px; font-size: 140px; line-height: 1; color: #000; opacity: .35; text-shadow: 0 0 18px #7fb3ff88;
  animation: tmSpread 6s ease-out forwards; pointer-events: none; }
@keyframes tmSpread { from { transform: scale(.2) rotate(0); opacity: 0; } to { transform: scale(1.4) rotate(40deg); opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .tm-face, .tmsg.talking .tm-wave i, .tm-flake, .tmsg.garbled::after { animation: none !important; } }
@media (max-width: 520px) { .tm-face { width: 88px; height: 88px; } }

/* ===== The Humbug's hijack: the game screen gets taken over (in-game only, no fast flashing) ===== */
body.hijacked { overflow: hidden; }
#app.hj-glitch { animation: hjGlitch 1.1s ease-in-out forwards; }
@keyframes hjGlitch {
  0% { transform: none; filter: none; }
  30% { transform: translateX(-5px) skewX(-1.5deg); filter: hue-rotate(150deg) saturate(.7); }
  60% { transform: translateX(4px); filter: hue-rotate(210deg) contrast(1.15); clip-path: inset(8% 0 12% 0); }
  100% { transform: none; filter: hue-rotate(230deg) saturate(.3) brightness(.6); clip-path: none; } }
.hijack-takeover { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1.5rem; overflow-y: auto; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, #232a55 0%, #0d1330 55%, #04060e 100%); color: #dfe9ff; transition: opacity .9s ease, filter .7s ease; }
.hijack-takeover.on { opacity: 1; pointer-events: auto; }
.hijack-takeover.thaw { opacity: 0; filter: blur(6px) brightness(1.4); }
.hj-frost { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 140px 50px #a9c8ff40, inset 0 0 40px 10px #e6f0ff55;
  background: radial-gradient(ellipse at center, transparent 45%, #b3a1f222 75%, #cfe0ff44 100%); animation: hjFrost 4s ease-out both; }
@keyframes hjFrost { from { opacity: 0; transform: scale(1.35); } to { opacity: 1; transform: scale(1); } }
.hj-scan { position: absolute; inset: 0; pointer-events: none; opacity: .12; background: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 4px); animation: hjDrift 8s linear infinite; }
@keyframes hjDrift { to { background-position: 0 120px; } }
.hj-in { position: relative; max-width: 620px; text-align: center; }
.hj-flake { width: 150px; height: 150px; margin: 0 auto .6rem; color: #000; filter: drop-shadow(0 0 14px #8fb6ff) drop-shadow(0 0 2px #cfe0ff);
  animation: hjGrow 2.6s ease-out both, hjSpin 24s linear 2.6s infinite; }
@keyframes hjGrow { from { transform: scale(.1) rotate(-90deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes hjSpin { to { transform: rotate(360deg); } }
.hj-tag { margin: 0 0 .4rem; font: 700 .78rem var(--ui); letter-spacing: .3em; text-transform: uppercase; color: #b3a1f2; }
.hj-title { margin: 0 0 1.2rem; font: 400 clamp(1.8rem, 5vw, 2.6rem)/1.15 var(--serif); color: #eef3ff; text-shadow: 0 0 18px #7fb3ff88; }
.hj-lines { min-height: 5rem; }
.hj-line { margin: 0 0 .8rem; font: 1.2rem/1.55 var(--type); color: #d6e4ff; text-shadow: 0 0 8px #7fb3ff55; }
.hj-sign { margin: 1rem 0 0; font: italic 1.05rem var(--serif); color: #b3a1f2; }
.hj-ctl { margin-top: 1.6rem; }
.hj-btn { background: transparent; color: #eef3ff; border: 1px solid #b3a1f2; padding: .75em 1.6em; font: 600 1.02rem var(--ui); letter-spacing: .04em; border-radius: 2px; cursor: pointer; }
.hj-btn:hover { background: #b3a1f222; border-color: #eef3ff; }
.hijack-takeover.still .hj-frost, .hijack-takeover.still .hj-scan, .hijack-takeover.still .hj-flake { animation: none; }
@media (prefers-reduced-motion: reduce) { #app.hj-glitch { animation: none; } .hj-frost, .hj-scan, .hj-flake { animation: none !important; } }
@media (max-width: 520px) { .hj-flake { width: 110px; height: 110px; } .hj-line { font-size: 1.05rem; } }
.hj-scan { opacity: .07; }

/* ===== Missions 2–12 (Nov 30 night build): Dispatch Key, case boards, cores, finale, printables ===== */
.tag.suspected { color: #e4687a; } .tag.cleared { color: var(--signal); text-decoration: line-through; } .tag.named { color: var(--gold); border-width: 2px; }
.ev-rows.cols-3 td:first-child, .ev-rows.cols-4 td:first-child, .ev-rows.cols-5 td:first-child { width: 3.2em; }
.ev-rows.cols-4, .ev-rows.cols-5 { font-size: .92rem; }
@media (max-width: 520px) { .ev-rows.cols-4, .ev-rows.cols-5 { font-size: .8rem; } .ev-rows.cols-4 td, .ev-rows.cols-5 td { padding: .25rem .2rem; } }
.doc.handwritten { font-family: var(--serif); font-size: 1.05rem; }
.doc .doc-sign { font: 600 1.6rem/1 'Caveat', 'Bradley Hand', cursive; color: #1d2b4a; text-align: right; margin: .4rem 0 0; }
.doc .postmark { display: inline-block; border: 2px solid var(--alert); color: var(--alert); font: 700 .78rem var(--ui); letter-spacing: .12em; text-transform: uppercase; padding: .25em .6em; transform: rotate(-5deg); margin: .3rem 0; }
.doc .addr { font: 1.25rem var(--serif); text-align: center; margin: 1rem 0; }
.doc .scratched { background: #1a1a1a; color: #1a1a1a; padding: 0 .4em; border-radius: 1px; }
.doc .smudge { filter: blur(.6px); opacity: .55; }
.doc .frost-flake { width: 220px; max-width: 70%; margin: .4rem auto; display: block; color: #111; }
.doc .frost-flake text { fill: #111; font-family: var(--ui); font-weight: 700; }

/* Dispatch Key gate */
.key-gate .crest { margin: 0 auto .4rem; }
.key-gate .code-form { justify-content: center; }
.key-gate .stamp { margin-bottom: .6rem; }

/* lost clue */
.lost-clue { border-top: 1px dashed var(--line); margin-top: .8rem; }
.lost-card { max-width: 380px; margin: .4rem auto; }

/* check your theories / suspects */
.ck-list { display: grid; gap: .8rem; margin-top: .6rem; }
.ck-item { border: 1px solid var(--line); padding: .7rem .9rem; }
.ck-item.on { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.ck-item.decided { background: #ffffff06; }
.ck-label { margin: 0 0 .2rem; font-size: 1.02rem; }
.ck-item .row-btns { margin: .4rem 0 0; }
.ck-ask { color: var(--gold); font-weight: 600; margin: .5rem 0 0; }
.ck-ev.pointing { outline: 2px solid var(--gold); outline-offset: -2px; }
.ck-board .tb-q { margin-bottom: .6rem; }
.tb-list li.ruled-out { opacity: .7; }
.sus-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem; margin: .4rem 0 1rem; }
.sus { border: 1px solid var(--line); padding: .7rem .8rem; background: #0002; }
.sus.cleared { opacity: .75; } .sus.named { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.sus-name { font: 400 1.25rem var(--serif); margin: 0 0 .3rem; }
.sus p.small { margin: .4rem 0 0; }
.sus-card.added { border-color: var(--signal); }

/* cores: the back carries one letter, written backward */
.core-back { display: inline-flex; align-items: center; justify-content: center; width: 92px; height: 104px; border: 1px solid #8f7248; background: var(--paper); color: var(--paper-ink); }
.core-back .cb-in { display: flex; flex-direction: column; align-items: center; transform: scaleX(-1); transition: transform .5s; }
.core-back.flipped .cb-in { transform: none; }
.core-back .cb-letter { font: 700 3rem/1 var(--serif); color: #5e1826; }
.core-back small { font: 700 .55rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: #8f7248; margin-top: .2rem; }
.cb-peek { margin: 1rem auto 0; }
.cb-peek .small { margin-bottom: .5rem; }
.core-mirror .cm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .7rem; margin: .6rem 0; }
.cm-core { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; border: 1px solid var(--line); padding: .6rem .3rem; }
.cm-core b { font: 400 .95rem var(--serif); } .cm-core small { color: var(--muted); font-size: .72rem; margin-bottom: .3rem; }
@media (prefers-reduced-motion: reduce) { .core-back .cb-in { transition: none; } }

/* finale */
.fin-map .am-st b { opacity: .85; }
.restore .rs-badge { width: 150px; height: 150px; margin: .4rem auto; opacity: .12; transition: opacity 2.2s ease, filter 2.2s ease; filter: none; }
.restore .rs-badge.restored { opacity: 1; filter: drop-shadow(0 0 16px #f3cf7a) drop-shadow(0 0 3px #fff3cf); }
.restore .rs-no { font: 700 .8rem var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.certificate.award .aw-title { color: var(--red); font-size: 1.6rem; margin: .2rem 0; }
.certificate.award .aw-name { font: 400 1.7rem var(--type); color: var(--red-dark); margin: .1rem 0 .4rem; }
.certificate.award .aw-cite { max-width: 520px; margin: 0 auto 1rem; font: italic 1.02rem var(--serif); }
@media (prefers-reduced-motion: reduce) { .restore .rs-badge { transition: none; } }

/* printables */
.dispatch-sheet .dkey { margin: .3in auto 0; max-width: 4.6in; border: 2px dashed #8f7248; padding: .12in .2in; text-align: center; font-family: var(--ui); }
.dispatch-sheet .dkey small { display: block; font: 700 .7rem var(--ui); letter-spacing: .2em; text-transform: uppercase; color: #8f7248; }
.dispatch-sheet .dkey b { display: block; font: 400 2rem/1.2 var(--type); letter-spacing: .18em; color: #872437; }
.dispatch-sheet .dkey span { font-size: .8rem; color: #444; }
.doc-intro { font: .95rem var(--ui); color: #333; margin: 0 0 .15in; }
.docs-sheet .tag-cut { margin-bottom: .2in; }
.docs-sheet.two { display: grid; grid-template-columns: 1fr 1fr; gap: .2in; } .docs-sheet.two .doc-intro { grid-column: 1 / -1; }
.strips-sheet .strip-cut { padding: .14in .2in; margin: 0 0 .16in; font: 1.25rem var(--type); letter-spacing: .04em; color: #1a1a1a; border: 1.5px dashed #555; }
.core-row { display: flex; flex-wrap: wrap; gap: .25in; align-items: stretch; margin-top: .2in; }
.core-fold { display: flex; padding: 0; width: 4.6in; height: 2.7in; border: 1.5px dashed #555; }
.core-fold .kf-face { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: .1in; font-family: var(--serif); color: #1a1a1a; }
.core-fold .kf-back { border-left: 1px dashed #999; }
.core-fold .kf-front b { font: 400 1.15rem var(--serif); color: #8a6a22; font-variant: small-caps; margin-top: .05in; }
.core-fold .kf-front span, .core-fold .kf-front small { font: .72rem var(--ui); color: #555; }
.core-fold .core-back { width: 1.5in; height: 1.9in; border: 1px solid #8f7248; background: #fff; }
.core-fold .core-back .cb-letter { font-size: 4.2rem; }
.seal-card { width: 2.3in; height: 2.7in; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .05in; border: 1.5px dashed #555; font-family: var(--serif); color: #1a1a1a; padding: .15in; margin: 0; }
.seal-card b { font: 700 1rem var(--ui); letter-spacing: .3em; text-transform: uppercase; color: #872437; border: 2px solid #872437; padding: .04in .14in; }
.seal-card p { font-size: 1rem; margin: .06in 0; } .seal-card small { font: .62rem var(--ui); letter-spacing: .1em; text-transform: uppercase; color: #666; }
.core-sheet .contact-card { margin-bottom: .1in; }
.atlas-sheet .ak-svg { width: 100%; height: auto; color: #1a1a1a; font-family: var(--serif); margin-top: .3in; }
.atlas-sheet .ak-svg text { fill: #1a1a1a; }
.cert-sheet .cert { text-align: center; font-family: var(--serif); color: #1a1a1a; padding: .35in .4in; margin: 0 0 .25in; border: 1.5px dashed #555; outline: 1px solid #8f724866; outline-offset: -.12in; break-inside: avoid; page-break-inside: avoid; }
.cert-sheet .cert-star { width: .9in; height: .9in; }
.cert-sheet .cert h2 { color: #872437; font-size: 1.9rem; margin: .05in 0; }
.cert-sheet .cert-name { font: 1.6rem var(--type); min-height: 1.4em; margin: .05in 0 .1in; }
.cert-sheet .cert-name .blank-line { width: 3.2in; }
.cert-sheet .cert-cite { font-style: italic; max-width: 5.6in; margin: 0 auto .2in; }
.cert-sheet .sig-hand { font-size: 1.7rem; border-bottom: 1px solid #333; }
.cert-sheet .kicker { color: #8f7248; }
.cert-sheet .sig-lines { gap: .1in .35in; }
.cert-sheet .sig { display: flex; flex-direction: column; align-items: center; min-width: 1.8in; }
.cert-sheet .sig-name.sig-hand { display: block; font-size: 1.6rem; transform: rotate(-3deg); padding: 0 .12in; border-bottom: 1px solid #333; min-height: 0; }
.cert-sheet .sig small { display: block; margin-top: .05in; }
.strip-print span { flex: 0 0 .21in; font-size: 13px; }
.print-docs .sheet > h3 { color: #5e1826; }
@media print {
  .letter-sheet.dispatch-sheet { min-height: 9.7in; font-size: 1.1rem; padding: .45in .7in .3in; }
  .letter-sheet.dispatch-sheet p { line-height: 1.55; margin: 0 0 .7em; }
  .letter-sheet.dispatch-sheet h1, .style-detailed .letter-sheet.dispatch-sheet h1 { font-size: 2.2rem; margin: 0 0 .18in; }
  .letter-sheet.dispatch-sheet .crest.lg, .style-detailed .letter-sheet.dispatch-sheet .crest.lg { width: .85in; margin: .04in auto .08in; }
  .style-detailed .letter-sheet.dispatch-sheet { padding-top: 0; }
  .dispatch-sheet .dkey { margin-top: .18in; padding: .08in .2in; }
  .dispatch-sheet .dkey b { font-size: 1.7rem; }
}
.print-docs .frost-flake { width: 3.2in; max-width: 80%; }
.doc .strip-line { font: 1.05rem var(--type); border: 1px dashed #8f7248; padding: .35rem .6rem; margin: .4rem 0; background: #fff8; }
.doc .file-photo { position: relative; width: 160px; margin: .3rem auto .5rem; line-height: 0; }
.doc .file-photo svg { width: 100%; height: auto; }
.doc .file-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.restore .rs-badge img { width: 100%; height: 100%; object-fit: contain; }

/* ---- Nov 30 (night): access screen choices, forgot-PIN, grown-up skip */
.access-pick { display: grid; gap: 1rem; margin: 1rem 0; text-align: left; }
.access-pick .ap-opt { border: 1px solid var(--line, rgba(239,199,128,.28)); padding: 1rem; }
.access-pick h2 { font-size: 1.15rem; margin: 0 0 .3rem; }
.access-pick .ap-opt > p { margin: 0 0 .7rem; font-size: .95rem; }
.access-pick .btn { width: 100%; text-align: center; }
details.forgot { margin: 1rem auto 0; max-width: 280px; text-align: center; }
details.forgot summary { cursor: pointer; font-size: .9rem; color: var(--gold, #efc780); min-height: 44px; display: flex; align-items: center; justify-content: center; }
details.forgot form { margin-top: .6rem; }

/* ---- Nov 30 (late): hunts for Missions 3, 5, 7, 8, 10 */
.trail-card .cc-chunk { font-size: 2.6rem; letter-spacing: .04em; word-spacing: .1em; }
.trail-card .cc-use, .shelf-mark small { display: block; font: 700 .72rem var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #8f7248; margin: -.2rem 0 .5rem; }
.courier-card.print.trail-card .cc-num.cc-chunk { font-size: 2.4rem; }
.riddle-block { background: var(--paper); color: var(--paper-ink); border: 1px solid #8f7248; padding: .7rem .9rem; text-align: center; }
.riddle-block .rb-head { font: 700 .75rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: #5e1826; margin: 0 0 .35rem; }
.riddle-block .rb-riddle { font: 1.1rem/1.4 var(--serif); margin: 0 0 .3rem; }
.shelf-mark .sm-code { font: 1.4rem var(--type); letter-spacing: .05em; margin: .2rem 0 .3rem; }
.shelf-mark .cw, .riddle-block .cw { white-space: nowrap; }
.dispatch-riddle { margin: .2in auto 0; max-width: 4.6in; }
.dispatch-riddle .riddle-block { background: #fff8; border-style: dashed; }
.find-panel .riddle-block { margin: .6rem 0; }
.hunt-sheet .riddle-cut, .hunt-sheet .shelf-cut { max-width: 4.6in; margin: 0 auto .25in; }
.hunt-sheet .backing-cut { min-height: 4in; display: flex; align-items: flex-end; justify-content: center; padding: .4in; }
.hunt-sheet .backing-cut .riddle-block { border: 0; background: none; }
.hunt-sheet .backing-cut .rb-riddle { font-size: 1.35rem; font-weight: 700; }
.print-docs .riddle-block { background: #fff; color: #111; }
.hunt-off { display: flex; align-items: center; gap: .55rem; min-height: 44px; font-size: 1.05rem; cursor: pointer; }
.hunt-off input { width: 22px; height: 22px; }
.hunt-ask { display: block; margin: .6rem 0; }
.hunt-gen .hunt-preview .riddle-block { margin: 0; }
/* takeover: the channel header line and the Skip control */
.hj-header { margin: 0 0 .35rem; font: 600 .8rem var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #9fb8e8; }
.hj-skip { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 3; min-height: 44px; min-width: 64px; padding: .4em 1em;
  background: transparent; color: #d6e4ff; border: 1px solid #b3a1f288; border-radius: 2px; font: 600 .9rem var(--ui); cursor: pointer; }
.hj-skip:hover { border-color: #eef3ff; }
/* Mission 2 lock tag: nine blanks under the top code line */
.cipher-text.cipher-blanks { margin-top: -.2em; opacity: .75; }
/* D10 / H22: phones get 44px tap targets and nothing under 12px */
@media screen and (max-width: 620px) {
  .btn.small, .small-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .ev-rows tr.tap td { height: 44px; }
  .stamp.small, .slot small, .core-back small, .kc-wd, .kc-cell small, .kc-cell.kind small, .am-st b, .badge-top small, .badge-sign small, .badge-photo > span,
  .shape-vertical .badge-top b, .shape-horizontal .badge-top b, .courier-card.decoy .cc-top span, .hj-tag, .hj-header, .cc-code small, .trail-card .cc-use,
  .hunt-spot legend, .shelf-mark small, .cheat-table th, .rb-head { font-size: 12px; }
}
@media print {
  .dispatch-sheet .dispatch-riddle { margin-top: .1in; }
  .dispatch-sheet .dispatch-riddle .riddle-block { padding: .06in .2in; }
  .dispatch-sheet .dispatch-riddle .rb-riddle { font-size: 1rem; line-height: 1.3; margin: 0; }
  .ledger-shelf { margin-top: .1in; }
}

/* ---- Wave 3 (Dec 1): kid-side mission mechanics ---- */
/* Mission 4: pick the suspects (lineup) */
.lu-list { display: flex; flex-direction: column; margin-top: .4rem; }
.lu-row { display: grid; grid-template-columns: 3.2em 1fr auto; grid-template-areas: "no name tag" "no job tag"; align-items: center; column-gap: .7rem; min-height: 48px; padding: .45rem .6rem; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--cream); font: 1rem var(--ui); cursor: pointer; }
.lu-row:hover { background: #efc7800d; }
.lu-no { grid-area: no; font: 400 1.15rem var(--type); color: var(--gold); }
.lu-name { grid-area: name; font: 400 1.05rem var(--serif); }
.lu-job { grid-area: job; font-size: .8rem; color: var(--muted); }
.lu-row .tag { grid-area: tag; margin: 0; }
.lu-row.gap { border: 1.5px dashed var(--line-strong); background: #0003; }
.lu-row.gap .lu-name i { color: var(--muted); }
.lu-row.picked { background: #efc78026; box-shadow: inset 4px 0 0 var(--gold); }
.lu-row.onboard { box-shadow: inset 4px 0 0 #e4687a; }
.lu-say { display: flex; gap: .8rem; align-items: flex-start; }
.lu-say .bubble { margin: 0; flex: 1; }
.lu-say > :first-child { flex: none; max-width: 64px; }
/* Mission 12: the code goes in through the Atlas Key */
.ak-screen { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin: .6rem 0; }
.ak-slot { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .5rem .2rem; border: 1.5px dashed var(--line-strong); background: #0003; text-align: center; min-width: 0; }
.ak-slot .ak-n { font: 700 .7rem var(--ui); color: var(--muted); }
.ak-slot input { width: 2.4em; height: 2.4em; padding: 0; text-align: center; font: 400 1.6rem var(--type); text-transform: uppercase; }
.ak-slot small { font: 700 .62rem var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); max-width: 100%; }
.ak-slot.bad { border-color: #e4687a; border-style: solid; background: #e4687a1a; }
.ak-slot.on { border-style: solid; border-color: var(--gold); box-shadow: 0 0 10px #efc78055; }
.ak-slot .ak-l { font: 400 1.9rem var(--type); color: var(--gold); line-height: 1.2; }
@media (max-width: 420px) { .ak-screen { gap: .15rem; } .ak-slot { padding: .45rem 0; } .ak-slot input { width: 1.9em; height: 1.9em; font-size: 1.4rem; } .ak-slot small { font-size: .56rem; letter-spacing: 0; text-transform: none; } }
/* Mission 12: case closed */
.cc-stamp { text-align: center; margin: .8rem 0; }
.cc-stamp .stamp { transform: rotate(-6deg) scale(1.6); opacity: 0; transition: transform .45s cubic-bezier(.3,1.6,.5,1), opacity .3s; }
.cc-stamp.on .stamp { transform: rotate(-6deg) scale(1); opacity: 1; }
.case-closed-top .stamp { transform: rotate(-4deg); margin-bottom: .3rem; }
@media (prefers-reduced-motion: reduce) { .cc-stamp .stamp { transition: none; } }
/* HQ after Mission 12: every station shining */
.stations li.shine em { color: var(--gold); font-weight: 700; }
.stations li.shine .st-dot { box-shadow: 0 0 10px var(--gold), 0 0 3px #fff; }
/* Mission 12 finale (D3): meter stays in view, stations flash on and keep glowing, then a short celebration */
.fin-stick { position: sticky; top: 4rem; z-index: 5; background: var(--ink); padding: .4rem .6rem .2rem; margin: 0 -.6rem; border-bottom: 1px solid var(--line); }
.fin-stick .meter-num { font-size: 2.1rem; }
.fin-stick .meter { height: 12px; }
.fin-map .am-st.lit i { background: radial-gradient(circle, #fffbe8 0%, #f5d78ecc 30%, #efc78055 55%, #efc78000 72%); inset: -45%; }
.fin-map .am-st.flash i { animation: amFlash 1.1s ease-out, amGlow 2.4s 1.1s ease-in-out infinite; }
@keyframes amFlash { 0% { opacity: 0; transform: scale(.3); } 18% { opacity: 1; transform: scale(2.4); filter: brightness(2); } 100% { opacity: 1; transform: scale(1); } }
.fin-cele { position: fixed; inset: 0; z-index: 200; overflow: hidden; pointer-events: auto; background: radial-gradient(ellipse at 50% 120%, #0d211dee, #050d0bf2); animation: fcLife 4.2s ease forwards; }
.fc-aurora { position: absolute; left: -20%; right: -20%; top: -10%; height: 70%; background: linear-gradient(100deg, transparent 10%, #7fd6c288 30%, #b3a1f277 50%, #75d8ff66 65%, transparent 85%); filter: blur(28px); transform-origin: 50% 0; animation: fcWave 4.2s ease-in-out infinite alternate; }
.fc-aurora.fc-b { top: 5%; opacity: .7; background: linear-gradient(80deg, transparent 15%, #2e9e6a88 35%, #efc78055 55%, transparent 80%); animation-duration: 3.1s; animation-direction: alternate-reverse; }
.fc-fall i { position: absolute; top: -2rem; color: #fff; text-shadow: 0 0 8px #efc780; font-style: normal; animation-name: fcFall; animation-timing-function: linear; animation-iteration-count: infinite; }
.fc-fall i:nth-child(3n+1) { color: var(--gold); }
.fc-word { position: absolute; left: 0; right: 0; top: 40%; margin: 0; text-align: center; font: 400 clamp(3.5rem, 18vw, 8rem) var(--serif); color: var(--gold); text-shadow: 0 0 30px #efc780aa, 0 0 4px #fff; animation: fcWord 4.2s ease forwards; }
@keyframes fcLife { 0% { opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fcWave { 0% { transform: skewX(-12deg) scaleY(.9) translateX(-4%); } 100% { transform: skewX(10deg) scaleY(1.15) translateX(4%); } }
@keyframes fcFall { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(110vh) rotate(220deg); } }
@keyframes fcWord { 0% { transform: scale(.6); opacity: 0; } 25% { transform: scale(1.08); opacity: 1; } 40% { transform: scale(1); } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fin-cele { display: none; } .fin-map .am-st.flash i { animation: none; } }
/* Mission 11: the printed Atlas Key, full page. Slots are bigger than a folded core card (2.3 × 2.7 in). */
.atlas-sheet .ak-page { border: 2px dashed #555; padding: .25in .05in .2in; margin: 0; color: #1a1a1a; font-family: var(--serif); }
.ak-top { text-align: center; margin-bottom: .2in; }
.ak-top h2 { margin: 0; font: 700 1.7rem var(--serif); letter-spacing: .2em; text-transform: uppercase; color: #1a1a1a; }
.ak-top p { margin: .05in 0 0; font-style: italic; color: #333; }
.ak-grid { display: grid; grid-template-columns: repeat(3, 2.4in); gap: .25in .08in; justify-content: center; }
.ak-cell { display: flex; flex-direction: column; align-items: center; }
.ak-hole { width: 2.4in; height: 2.8in; border: 2px solid #1a1a1a; outline: 1px dashed #777; outline-offset: -.12in; display: flex; align-items: flex-start; justify-content: flex-start; padding: .08in; box-sizing: border-box; }
.ak-hole span { font: 700 .9rem var(--ui); color: #555; }
.ak-name { display: flex; align-items: center; gap: .1in; margin-top: .08in; }
.ak-name b { font: 700 .95rem var(--ui); letter-spacing: .12em; text-transform: uppercase; }
.ak-box { display: inline-block; width: .55in; height: .55in; border: 2px solid #1a1a1a; }
.ak-bow { justify-content: center; text-align: center; color: #1a1a1a; }
.ak-bow svg { width: 1.6in; height: 1.6in; }
.ak-bow small { font: .62rem var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #555; margin-top: .08in; }
@media screen { .sheet.atlas-sheet { max-width: 8.5in; padding: .4in; overflow-x: auto; } }
.atlas-map .am-st.lit i { mix-blend-mode: normal; border-radius: 50%; background: radial-gradient(circle, #fffbe8 0%, #ffe9a8ee 22%, #efc780aa 42%, #efc78000 68%); box-shadow: 0 0 26px 10px #ffe9a866; }
.fin-map .am-st.lit b { background: var(--gold); color: #1a1a1a; box-shadow: 0 0 14px var(--gold); opacity: 1; }
.fin-map .am-st.lit b::before { background: #fff; }

/* Phone width: the "On the board" tag sits under the name so long names stay on one line */
@media (max-width: 420px) {
  .lu-row { grid-template-columns: 3.2em 1fr; grid-template-areas: "no name" "no job" "no tag"; }
  .lu-row .tag { justify-self: start; margin-top: .25rem; }
  .ak-slot small { font-size: .5rem; }
}

/* Letters: the handwritten signature sits on the signature line, not beside it */
.sign-block { display: grid; justify-content: end; justify-items: center; text-align: center; }
.sign-block .sig-hand { display: block; padding: 0 .1in; margin-bottom: -.05in; position: relative; z-index: 1; }
.sign-block .sign { display: block; min-width: 2.6in; margin-top: 0; padding-top: .05in; border-top: 1px solid #8f7248; text-align: center; }

/* On-screen letters: the crest sits up in the banner's faded edge instead of below an empty gap (Tara, Dec 2).
   A percent margin follows the banner's width, so it scales on phones. */
.story.letter .letter-banner-screen + .crest { position: relative; margin-top: -10%; }
