:root {
  color-scheme: dark;
  --navy: #091725; --ink: #101722; --paper: #f7e2c6; --gold: #ffcc55;
  --red: #df201d; --teal: #146c68; --snow: #fffaf0; --nav-gold: #ffdf92;
  --warm-border: #e7d9bd; --paper-muted: #eddfc9; --header-line: #b4c0c557;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  font-family: 'Roboto Condensed', sans-serif; color: var(--paper); background: var(--navy);
  font-synthesis: none; scrollbar-color: #b48c52 var(--navy); scrollbar-gutter: stable;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; position: relative; isolation: isolate; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url('assets/plates/winter-workspace.webp') center top / cover no-repeat; }
button, input { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a, input { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--gold); }
.paper :focus-visible, .field-tool :focus-visible { outline-color: #123f67; }
a { color: inherit; text-underline-offset: .18em; }
::selection { background: #a02822; color: #fff8e5; }
[hidden] { display: none !important; }
svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: none; flex-shrink: 0; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; padding: 12px; background: var(--paper); color: var(--ink); transform: translateY(-160%); z-index: 10; }
.skip-link:focus { transform: translateY(0); }
.app-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 8px 2.7%; gap: 20px; background: #071422a8; border-bottom: 1px solid var(--header-line); }
.brand { display: inline-flex; align-items: center; gap: 14px; font-size: 46px; font-weight: 800; line-height: 1; text-decoration: none; white-space: nowrap; color: var(--snow); }
.brand b { color: var(--red); }
.brand-icon { width: 48px; height: 48px; color: var(--gold); }
/* KB-ADV-011: Logo 1 (Siegel) statt Text-Schriftzug; feste Masse gegen Layoutsprung */
.brand-logo { display: block; width: 300px; height: auto; aspect-ratio: 1200 / 255; filter: drop-shadow(0 3px 6px #0008); }
nav { display: flex; gap: 18px; }
.nav-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 8px 24px; border: 1px solid var(--warm-border); border-radius: 15px; color: var(--nav-gold); background: #071524ce; font-size: 28px; font-weight: 700; text-decoration: none; }
.nav-button svg { width: 30px; height: 30px; }
.nav-button[aria-current] { background: #ffcf62; color: var(--ink); }
main { min-height: calc(100vh - 145px); }
main:focus, h1:focus, #discovery-title:focus, #puzzle-heading:focus, #task-result:focus { outline: none; }
.mission-banner { padding: 14px 5.8% 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 101px; background: #061424b8; }
.title-and-date { display: flex; gap: 25px; align-items: center; }
h1 { font-size: clamp(34px, 4.166vw, 64px); line-height: 1.05; margin: 0; font-weight: 700; text-wrap: balance; letter-spacing: -.015em; position: relative; }
.mission-banner:has(.steps) h1::after { content: ''; display: block; width: 100%; height: 3px; margin-top: 7px; background: #eebd49; transform: rotate(-1deg); }
.date { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--ink); font-size: 28px; font-weight: 700; white-space: nowrap; transform: rotate(-2deg); }
.date::before { content: ''; position: absolute; inset: -5px -10px; z-index: -1; background: url('assets/plates/number-ticket.webp') center / 100% 130% no-repeat; }
.steps { display: flex; align-items: center; padding: 0; margin: 0; list-style: none; width: 540px; min-width: 470px; }
.steps li { position: relative; z-index: 0; display: grid; justify-items: center; gap: 6px; flex: 1; white-space: nowrap; font-size: 22px; font-weight: 700; }
.steps li:not(:last-child)::after { content: ''; position: absolute; width: 100%; height: 2px; left: 50%; top: 19px; background: #8297ac; z-index: -1; }
.steps li>span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #c6d0dc; background: #71869e; color: #071629; font-size: 25px; }
.steps li[aria-current] { color: #ffe19c; }
.steps li[aria-current]>span { background: #ffce52; border-color: #fff0be; }
/* Real paper rendered in nine slices: edges retain their dimensions as content changes. */
.paper { position: relative; isolation: isolate; color: var(--ink); width: min(1150px, 76%); margin: 0 auto; padding: 26px 72px 38px 84px; overflow-anchor: none; }
.paper::before { content: ''; position: absolute; inset: -8px 0; z-index: -1; pointer-events: none; border: 30px solid transparent; border-image: url('assets/plates/letter-paper.webp') 70 fill / 38px / 0 stretch; filter: drop-shadow(0 12px 18px #0006); }
.briefing { display: grid; grid-template-columns: 44% 1fr; gap: 42px; align-items: center; margin-bottom: 6px; }
.lab-photo { margin: 0; }
.lab-photo>img { display: block; width: 100%; height: auto; aspect-ratio: 1.618; object-fit: fill; }
.letter-copy { position: relative; align-self: stretch; padding-bottom: 8px; }
.salutation, .signature { font-family: 'Dancing Script', cursive; font-weight: 500; }
.salutation { font-size: clamp(30px, 2.9vw, 44px); margin: 0 0 10px; line-height: 1.15; }
.letter-text { font: clamp(20px, 1.85vw, 29px)/1.3 Georgia, serif; margin: 0; letter-spacing: -.02em; }
.signature { text-align: center; font-size: 46px; color: #152c4b; margin: 12px 70px 0 0; line-height: 1.2; transform: rotate(-3deg); }
.wax-seal { position: absolute; bottom: 0; right: 8px; width: 116px; height: 116px; object-fit: contain; }
h2 { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.1; margin: 0 0 12px; font-weight: 700; text-wrap: balance; }
.quest-panel { min-height: 415px; }
#quest-form>h2 { display: flex; align-items: center; justify-content: center; gap: 15px; text-align: center; }
#quest-form>h2::before, #quest-form>h2::after { content: ''; height: 1px; flex: 0 1 75px; background: #9b7748; }
.task-lead { margin: 0 auto 10px; text-align: center; font-size: 17px; line-height: 1.3; max-width: 760px; }
.quest-playfield { min-height: 204px; }
.cipher { border: 0; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; max-width: 810px; }
.cipher-cell { min-width: 0; display: grid; gap: 12px; text-align: center; }
.number { position: relative; isolation: isolate; line-height: 1; font-size: 64px; font-weight: 700; font-style: italic; padding: 8px 0; }
.number::before { content: ''; position: absolute; inset: -8px -4px; z-index: -1; background: url('assets/plates/number-ticket.webp') center / 100% 100% no-repeat; }
.letter-input { color-scheme: light; background: #fff5e180; width: 100%; height: 85px; min-width: 0; border: 2px solid #9c672f; border-radius: 13px; color: var(--ink); font-size: 47px; font-weight: 700; text-align: center; caret-color: #153e5a; text-transform: uppercase; }
.letter-input[aria-invalid] { border-color: #9a2d26; background: #ffe9dc; }
.tools { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 6px; }
.tool-button { display: inline-flex; gap: 9px; align-items: center; justify-content: center; min-height: 52px; padding: 8px 18px; border: 1px solid #183047; border-radius: 13px; background: #fff6e7e6; color: #10253a; font-size: 24px; font-weight: 700; text-decoration: none; box-shadow: 0 2px 3px #0003; }
.tool-button:disabled { cursor: not-allowed; opacity: .55; }
.alphabet-example { font-size: 28px; font-weight: 700; white-space: nowrap; padding-left: 20px; border-left: 1px solid #a87a47; }
.primary { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 78px; padding: 12px 40px; border: 0; border-radius: 40px; color: #09121a; background: transparent; font-size: 32px; font-weight: 700; text-decoration: none; }
.primary::before { content: ''; position: absolute; inset: -8px -24px; z-index: -1; pointer-events: none; background: url('assets/plates/gold-action.webp') center / 100% 140% no-repeat; }
.primary svg { width: 30px; height: 30px; }
.check-answer { display: flex; margin: 0 auto; width: 454px; max-width: 100%; font-size: 40px; }
.feedback-space { min-height: 36px; position: relative; display: flex; align-items: center; justify-content: center; gap: 15px; }
.answer-feedback { margin: 4px auto; max-width: 740px; color: #84241c; text-align: center; font-size: 17px; font-weight: 600; }
.answer-feedback:empty { display: none; }
.clear-selection { border: 0; background: transparent; color: #4e3d28; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; min-height: 32px; padding: 4px 8px; }
.field-tool { position: fixed; inset: 0; margin: auto; width: min(760px, calc(100vw - 36px)); height: fit-content; max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid #806541; border-radius: 12px; padding: 24px; color: var(--ink); background: #fff0d5; box-shadow: 0 12px 45px #0008; }
.field-tool::backdrop { background: transparent; }
.field-tool header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.field-tool h2 { font-size: 29px; margin: 0; }
.tool-close { border: 1px solid #81633c; border-radius: 8px; color: var(--ink); background: #fff8e9; min-height: 44px; padding: 7px 14px; font-size: 18px; }
.field-tool dl { display: grid; grid-template-columns: repeat(13, 1fr); gap: 6px; margin: 0; }
.field-tool dl>div { padding: 6px 2px; text-align: center; border: 1px solid #aa8551; border-radius: 5px; background: #fff8e8; }
.field-tool dt { font-size: 26px; font-weight: 700; }
.field-tool dd { margin: 0; font-size: 18px; }
.hint-tool p { font-size: 22px; line-height: 1.5; }
.word-search { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; width: min(460px, 100%); margin: 0 auto; }
.search-cell { height: 44px; min-width: 44px; padding: 4px; border: 1px solid #9c7544; border-radius: 7px; color: var(--ink); background: #fff2d9; font-size: 26px; font-weight: 700; }
.search-cell[aria-pressed=true], .order-card[aria-pressed=true] { background: #ffcf69; border-color: #734613; box-shadow: inset 0 0 0 1px #734613; }
.selection-readout { margin: 5px 0; text-align: center; color: #61482b; font-size: 16px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.order-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 0 auto; max-width: 840px; }
.order-card { min-height: 138px; position: relative; border: 1px solid #9c7544; border-radius: 9px; padding: 10px 8px; background: #fff2d9; color: var(--ink); display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; }
.order-card b { font-size: 31px; }
.entry-time { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-card>span:not(.entry-time):not(.entry-position) { font-size: 15px; }
.entry-position { position: absolute; top: -10px; right: -4px; border-radius: 50%; background: #183b4e; color: #fff7e6; min-width: 23px; font-size: 16px; line-height: 23px; }
.entry-position:empty { display: none; }
.clue-result { text-align: center; padding: 18px 0; }
.clue-result h2 { color: #125854; font-size: 66px; margin: 10px 0; }
.clue-result>p:not(.salutation) { font-size: 22px; line-height: 1.5; margin: 8px 0; }
.clue-result .primary { margin-top: 12px; }
.discovery { text-align: center; }
.clue-chain { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0; }
.clue-ticket { position: relative; isolation: isolate; padding: 15px 25px; font-size: 36px; font-weight: 700; color: #125854; }
.clue-ticket::before { content: ''; position: absolute; inset: -5px -8px; z-index: -1; background: url('assets/plates/number-ticket.webp') center / 100% 130% no-repeat; }
.discovery .next-story { font: 22px/1.5 Georgia, serif; }
.result-actions { display: flex; justify-content: center; align-items: center; gap: 22px; flex-wrap: wrap; }
.small-note { color: #63482e; font-size: 14px; line-height: 1.5; }
.clue-teaser { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 10px 20px; text-align: center; font-size: 30px; font-weight: 700; text-shadow: 0 2px 4px #000; }
.clue-teaser svg { color: #f4c47a; width: 32px; height: 32px; }
.prototype-note { padding: 12px 20px 16px; text-align: center; color: var(--paper-muted); font-size: 13px; background: #071422c2; }
.calendar-paper, .casebook-paper, .preview-paper { margin-top: 20px; }
.calendar-intro { margin-bottom: 24px; }
.calendar-intro>p:not(.salutation) { font-size: 18px; }
.chapter+.chapter { margin-top: 28px; }
.chapter h2 { font-size: 26px; }
.doors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.door { padding: 12px 9px; text-align: center; border: 1px solid #946b3e; border-radius: 10px; background: #fff0d5ba; color: #2e342f; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.door.playable { background: #ffd274; border-color: #905212; }
.door-number { font-size: 40px; font-weight: 800; line-height: 1; }
.door-title { font-size: 15px; line-height: 1.25; font-weight: 700; min-height: 38px; }
.door-status { font-size: 11px; margin-top: auto; }
.casebook, .day-preview { padding: 28px 16px; }
.casebook>p, .day-preview>p { font-size: 20px; line-height: 1.5; }
.evidence { display: flex; gap: 26px; align-items: flex-start; margin: 24px 0; padding: 22px; border: 1px solid #84653e; background: #fff1d5; }
.evidence-number { font-size: 45px; color: #71572f; }
.evidence h3 { font-size: 34px; color: #125854; margin: 0 0 10px; }
.evidence p { font-size: 20px; line-height: 1.5; margin: 0; }
.preview-day { font-size: 80px; color: #71572f; font-weight: 800; }
.back-link { display: flex; align-items: center; gap: 8px; width: fit-content; margin-top: 24px; }
@media (hover: hover) and (pointer: fine) {
  .primary:hover { filter: brightness(1.06); }
  .tool-button:not(:disabled):hover, .search-cell:hover, .order-card:hover, .door:hover { background-color: #fff7e5; }
  .nav-button:not([aria-current]):hover { background: #28435a; }
}
.primary:active, .tool-button:not(:disabled):active { transform: translateY(1px); }
@media (prefers-reduced-motion: no-preference) {
  .discovery { animation: discovery-in 220ms var(--ease-out); }
  .primary { transition: filter 140ms ease; }
  @keyframes discovery-in { from { opacity: .5; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 1250px) {
  .mission-banner { flex-wrap: wrap; gap: 18px; }
  .steps { min-width: 350px; width: 440px; }
  .paper { width: 85%; padding: 32px 48px 40px; }
  .letter-text { font-size: 24px; }
  .briefing { gap: 28px; }
  .brand { font-size: 40px; }
  .nav-button { font-size: 24px; padding-inline: 18px; }
  .signature { font-size: 40px; }
  .wax-seal { width: 76px; height: 76px; }
  .tools { gap: 14px; }
  .tool-button { padding-inline: 12px; font-size: 22px; }
  .alphabet-example { font-size: 23px; padding-left: 12px; }
}
@media (max-width: 900px) {
  .app-header { flex-wrap: wrap; }
  .paper { width: calc(100% - 24px); padding: 32px 32px 38px; }
  .mission-banner { padding: 20px 24px; }
  .title-and-date { gap: 15px; }
  .steps { width: 100%; min-width: 0; max-width: 490px; }
  .steps li { font-size: 18px; }
  .date { font-size: 22px; padding: 8px; }
  .letter-text { font-size: 22px; }
  .salutation { font-size: 35px; }
  .signature { margin-right: 55px; font-size: 38px; }
  .tools { gap: 10px; justify-content: center; }
  .alphabet-example { display: none; }
  .doors { grid-template-columns: repeat(3, 1fr); }
  #quest-form>h2::before, #quest-form>h2::after { display: none; }
}
@media (max-width: 600px) {
  .app-header { padding: 12px 16px; gap: 15px; }
  .brand { font-size: 35px; gap: 10px; }
  .brand-icon { width: 35px; height: 35px; }
  .brand-logo { width: 200px; }
  nav { width: 100%; gap: 10px; }
  .nav-button { flex: 1; min-width: 0; min-height: 44px; padding: 7px 10px; font-size: 20px; gap: 7px; }
  .nav-button svg { width: 22px; height: 22px; }
  .mission-banner { padding: 19px 20px; gap: 18px; }
  .title-and-date { flex-wrap: wrap; gap: 12px; }
  h1 { font-size: 36px; }
  .date { font-size: 19px; padding: 6px 9px; }
  .date svg { width: 18px; height: 18px; }
  .steps li { font-size: 16px; }
  .steps li>span { width: 32px; height: 32px; font-size: 20px; }
  .steps li:not(:last-child)::after { top: 15px; }
  .paper { padding: 25px 23px 35px; width: calc(100% - 12px); }
  .paper::before { border-image-width: 24px; }
  .briefing { grid-template-columns: 1fr; gap: 18px; margin-bottom: 25px; }
  .lab-photo { max-width: 370px; margin-inline: auto; }
  .letter-copy { padding: 0 5px 5px; }
  .salutation { font-size: 33px; }
  .letter-text { font-size: 20px; line-height: 1.4; }
  .signature { text-align: left; margin: 10px 70px 0 22px; font-size: 38px; }
  .wax-seal { width: 69px; height: 69px; right: 0; bottom: -4px; }
  h2 { font-size: 28px; }
  .quest-panel { min-height: 390px; }
  .cipher { gap: 5px; }
  .cipher-cell { gap: 8px; }
  .number { font-size: 36px; padding: 7px 0; }
  .letter-input { font-size: 28px; height: 51px; border-radius: 8px; }
  .quest-playfield { min-height: 185px; }
  .tools { gap: 7px; flex-wrap: wrap; }
  .tool-button { padding: 8px 10px; font-size: 18px; min-height: 44px; gap: 5px; }
  .tool-button svg { width: 21px; height: 21px; }
  .audio-pending { min-height: 44px; }
  .primary { min-height: 62px; font-size: 27px; padding: 9px 20px; gap: 12px; }
  .check-answer { width: 100%; font-size: 29px; }
  .feedback-space { min-height: 35px; flex-wrap: wrap; }
  .answer-feedback { font-size: 16px; }
  .field-tool { padding: 18px; }
  .field-tool h2 { font-size: 24px; }
  .field-tool dl { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .field-tool dt { font-size: 22px; }
  .field-tool dd { font-size: 16px; }
  .hint-tool p { font-size: 20px; }
  .task-lead { font-size: 16px; margin-bottom: 12px; }
  .search-cell { min-width: 0; height: 44px; font-size: 25px; }
  .selection-readout { font-size: 14px; }
  .order-cards { grid-template-columns: repeat(3, 1fr); gap: 9px; }
  .order-card { min-height: 108px; padding: 8px 5px; gap: 2px; }
  .order-card b { font-size: 24px; }
  .entry-time { font-size: 18px; }
  .order-card>span:not(.entry-time):not(.entry-position) { font-size: 13px; }
  .clue-result h2 { font-size: 56px; }
  .clue-result>p:not(.salutation) { font-size: 20px; }
  .clue-chain { gap: 6px; flex-wrap: wrap; }
  .clue-ticket { padding: 10px 14px; font-size: 28px; }
  .clue-chain svg { width: 18px; height: 18px; }
  .discovery .next-story { font-size: 19px; }
  .clue-teaser { font-size: 21px; margin-block: 14px; gap: 10px; }
  .clue-teaser svg { width: 25px; height: 25px; }
  .prototype-note { font-size: 12px; line-height: 1.6; }
  .casebook, .day-preview { padding: 14px 4px; }
  .chapter h2 { font-size: 23px; }
  .door { padding: 11px 7px; }
  .door-number { font-size: 34px; }
  .door-title { font-size: 13px; }
  .door-status { font-size: 10px; }
  .evidence { padding: 14px; gap: 14px; }
  .evidence p { font-size: 18px; }
}
/* Approved calendar composition: 65% world / 35% mission, then four six-day groups. */
.adventure { height: calc(100vh - 76px); min-height: 850px; display: grid; grid-template-rows: minmax(0,1fr) 186px; }
.adventure-stage { display: grid; grid-template-columns: 65.4% 34.6%; min-height: 0; }
.world-map { position: relative; min-width: 0; overflow: hidden; }
.world-art { display: block; width: 100%; height: 100%; object-fit: cover; }
.place-label { position: absolute; isolation: isolate; color: #121719; font: italic 700 clamp(20px,1.9vw,30px)/1.1 Georgia,serif; padding: 10px 15px; white-space: nowrap; }
.place-label::before, .mission-tab::before, .day-group>h2::before { content: ''; position: absolute; inset: -3px -6px; z-index: -1; background: url('assets/plates/number-ticket.webp') center / 100% 140% no-repeat; }
.headquarters { left: 17%; top: 36%; }.station { right: 6%; top: 26%; }.island { left: 19%; top: 75%; }.factory { right: 5%; top: 78%; }
.paper.map-mission { width: calc(100% - 24px); margin: 22px 12px 24px 0; padding: 32px 35px 27px; display: flex; flex-direction: column; min-height: 0; }
.map-mission::before { inset: -3px; }
.mission-tab { display: block; width: fit-content; isolation: isolate; position: relative; font: italic 700 40px/1.2 Georgia,serif; padding: 3px 10px; margin: 0 100px 38px 0; white-space: nowrap; }
.map-seal { position: absolute; width: 108px; height: 108px; object-fit: contain; top: 8px; right: 17px; }
.map-mission h2 { font: 700 clamp(30px,2.65vw,42px)/1.13 Georgia,serif; padding-bottom: 12px; margin: 0 0 12px; border-bottom: 3px solid #b18437; }
.map-summary { font: 22px/1.35 Georgia,serif; margin: 0 0 12px; }
.map-photo { margin: auto 0; min-height: 0; }
.map-photo img { display: block; width: 100%; max-height: 270px; object-fit: contain; }
.mission-duration { display: flex; align-items:center; justify-content:center; gap: 10px; font-size: 28px; margin: 14px 0 12px; }
.map-start { width: 100%; font-size: 36px; min-height: 70px; white-space: nowrap; }
.day-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 30px; padding: 14px 4% 26px; background: #071b30db; border-top: 1px solid #b4c0c5; }
.day-group { min-width: 0; position: relative; }
.day-group>h2 { position: relative; isolation: isolate; width: fit-content; padding: 2px 15px; margin: 0 auto 9px; font: italic 700 24px/1.2 Georgia,serif; color: #1a1d1e; }
.day-doors { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 2px; }
.day-doors .door { position: relative; border: 0; border-radius: 0; background: url('assets/plates/calendar-door.webp') center / 100% 100% no-repeat; color: #fff1d0; min-width: 0; height: 94px; padding: 0; display: grid; place-items:center; }
.day-doors .door.selected { filter: sepia(.9) saturate(2.5); outline: 2px solid #ffd46d; outline-offset: -3px; border-radius: 45% 45% 5px 5px; }
.day-doors .door-number { font: 30px/1 Georgia,serif; margin-top: 7px; }
.door-solved { position: absolute; bottom: 5px; color:#fff9dd; }
/* Approved dossier: tabs above leather cover, case/photo header, three distinct scraps. */
.dossier { position: relative; isolation: isolate; width: calc(100% - 130px); max-width: 1430px; margin: 54px auto 30px; color: var(--ink); padding: 52px 75px 42px 110px; min-height: 830px; }
.dossier::before { content:''; position:absolute; inset:0; z-index:-1; background:url('assets/plates/open-dossier.webp') center / 100% 100% no-repeat; pointer-events:none; filter:drop-shadow(0 10px 18px #0007); }
.file-tabs { position:absolute; top:-31px; left:8%; display:flex; gap:6px; z-index:-1; }
.file-tabs button { position:relative; isolation:isolate; color:var(--ink); border:0; background:transparent; min-width:185px; height:67px; padding:8px 24px 20px; display:flex; align-items:center; justify-content:center; gap:9px; font-size:27px; font-weight:700; }
.file-tabs button::before { content:'';position:absolute;inset:0;z-index:-1;background:url('assets/plates/number-ticket.webp') center / 100% 140% no-repeat; }
.file-tabs button[aria-current] { font-style:italic; text-decoration:underline; text-decoration-color:#8f2721; text-underline-offset:6px; }
.case-overview { display:grid; grid-template-columns: 49% 29% 18%; gap:2%; align-items:start; margin-bottom:26px; }
.case-overview h1 { font-size:clamp(32px,3.3vw,51px); line-height:1.03; margin:9px 0 24px; white-space:nowrap; letter-spacing:-.025em; }
.case-overview>div>p { font:25px/1.28 Georgia,serif; margin:0; max-width:570px; }
.case-photo { margin:-18px -6px 0; transform:rotate(-4deg); }
.case-photo img { width:100%; display:block; }
.missing-note { text-align:center; padding-top:0; }
.missing-note>img { width:108px; height:108px; object-fit:contain; }
.case-overview .missing-note>p { font:35px/1.05 'Dancing Script',cursive; color:#172d48; transform:rotate(-5deg); }
.case-evidence>h2 { display:flex; gap:18px; align-items:center; justify-content:center; font-size:34px; margin:0 0 32px; }
.case-evidence>h2::before,.case-evidence>h2::after { content:'';height:1px;background:#876241;flex:1; }
.case-evidence>h2>span { white-space:nowrap; }
.evidence-chain { display:grid;grid-template-columns:29% 29% 36%;gap:3%; }
.evidence-chain>article { position:relative;isolation:isolate;min-width:0;margin:0;padding:22px 22px 16px;display:block;border:0;background:transparent; }
.evidence-chain>article::before { content:'';position:absolute;inset:-10px -5px;z-index:-1;border:20px solid transparent;border-image:url('assets/plates/letter-paper.webp') 70 fill / 23px / 0 stretch;filter:drop-shadow(1px 5px 3px #0005); }
.evidence-chain>article::after { content:'';position:absolute;top:-34px;left:calc(50% - 23px);width:46px;height:48px;background:url('assets/brass-clip.svg') center / contain no-repeat; }
.evidence-chain .evidence:not(:last-child)>header::after { content:'→'; position:absolute;right:-10%;top:47%;font:38px 'Dancing Script',cursive;color:#17334e; }
.evidence header { display:flex;align-items:center;gap:12px;margin-bottom:10px; }
.evidence-number { font-size:30px;color:#83251f;border:2px solid #83251f;border-radius:50%;width:44px;height:44px;display:inline-grid;place-items:center;flex-shrink:0;font-style:italic; }
.evidence h3,.evidence-locked h3 { color:var(--ink);font-size:32px;margin:0; }
.evidence h3 { border-bottom:2px solid #8f2721; }
.evidence p,.evidence-locked p { font:20px/1.25 Georgia,serif;margin:0 0 12px; }
.temperature-chart { display:block;width:100%;height:auto;stroke:#76664d;stroke-width:1;fill:none;background:#fff0d3;transform:rotate(2deg); }
.temperature-chart .chart-line { stroke:#17394c;stroke-width:4; }
.temperature-chart text { font:14px 'Roboto Condensed',sans-serif;fill:#162132;stroke:none; }
.sensor-photo { margin:10px -6px 0;transform:rotate(-4deg);padding:7px;background:#fff4df;box-shadow:1px 3px 3px #0005; }
.sensor-photo img { display:block;width:100%;height:165px;object-fit:cover; }
.ramp-evidence { display:grid;grid-template-columns:57% 43%;align-items:center; }
.transport-note { padding:8px 6px;background:#fff3dd;transform:rotate(-3deg);box-shadow:1px 3px 3px #0003; }
.transport-note h4 { margin:0 0 8px;font-size:18px;text-decoration:underline; }
.transport-note p { font:13px/1.4 'Roboto Condensed',sans-serif;margin:0 0 3px; }
.transport-note time { font-weight:700; }
.ramp-plan { margin:0 -7px 0 0;transform:rotate(4deg);background:#e8e4d5; }
.ramp-plan svg { width:100%;height:auto;stroke:#193a57;stroke-width:2; }
.ramp-plan figcaption { font:22px 'Dancing Script',cursive;text-align:center; }
.evidence-locked { text-align:center; }
.evidence-locked h3 { font-size:25px;margin:12px 0; }
.evidence-locked p { font-size:19px; }
.undiscovered { display:block;font:100px 'Dancing Script',cursive;opacity:.4; }
.case-next { display:flex;align-items:center;justify-content:space-between;gap:25px;margin-top:38px;padding-top:15px;border-top:1px solid #aa8251; }
.case-next>p { font:40px/1.2 'Dancing Script',cursive;color:#17334e;margin:0; }
.case-next .primary { min-width:35%;font-size:32px; }
/* A key remains visible while the child types; no document resize or scroll lock. */
#alphabet-popover { inset:12px 18px auto auto;margin:0;max-height:36dvh; }
.signature { white-space:nowrap;font-size:clamp(30px,3vw,46px);padding-right:0;margin-right:110px; }
@media(max-width:1250px) {
  .paper.map-mission { padding:30px 23px 24px; }
  .mission-tab { font-size:29px;margin-bottom:30px; }
  .map-seal { width:82px;height:82px; }
  .map-summary { font-size:19px; }
  .map-start { font-size:28px; }
  .place-label { font-size:23px; }
  .day-strip { gap:16px;padding-inline:2%; }
  .dossier { width:calc(100% - 60px);padding:45px 50px 35px; }
  .case-overview>div>p { font-size:21px; }
  .case-overview .missing-note>p { font-size:28px; }
  .case-overview h1 { font-size:40px; }
  .evidence-chain>article { padding-inline:14px; }
  .evidence h3 { font-size:27px; }
  .evidence p { font-size:18px; }
  .evidence-number { width:35px;height:35px;font-size:25px; }
  .case-next>p { font-size:32px; }
}
@media(max-width:900px) {
  .adventure { height:auto;min-height:0;display:block; }
  .adventure-stage { grid-template-columns:1fr; }
  .world-map { aspect-ratio:1.32; }
  .paper.map-mission { width:calc(100% - 40px);margin:15px auto 24px;display:grid;grid-template-columns:1fr 1fr;gap:8px 25px;padding:30px; }
  .map-mission .mission-tab { grid-column:1/-1;margin-bottom:10px; }
  .map-mission h2,.map-summary { grid-column:1; }
  .map-photo { grid-column:2;grid-row:2/5;margin:auto 0; }
  .map-start { grid-column:1/-1;max-width:450px;justify-self:center; }
  .day-strip { grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding:20px; }
  .day-doors .door { height:95px; }
  .dossier { padding:40px 40px 35px; }
  .case-overview { grid-template-columns:55% 40%;gap:5%; }
  .case-overview h1 { white-space:normal;font-size:36px; }
  .missing-note { display:none; }
  .case-photo { margin-top:12px; }
  .evidence-chain { grid-template-columns:1fr;gap:40px; }
  .evidence-chain>article { padding:25px; }
  .sensor-photo { max-width:320px;margin-inline:auto; }
  .evidence-chain .evidence:not(:last-child)>header::after { display:none; }
  .temperature-chart { max-width:350px;margin-inline:auto; }
  .ramp-evidence { max-width:440px;margin-inline:auto; }
  .transport-note p { font-size:17px; }
  .case-next { flex-wrap:wrap;justify-content:center; }
  .case-next>p { text-align:center; }
  .file-tabs button { min-width:140px;font-size:23px;padding-inline:15px; }
}
@media(max-width:600px) {
  .signature { font-size:30px;margin-left:0;margin-right:60px; }
  .place-label { font-size:15px;padding:5px 7px; }
  .headquarters { left:14%; }.station{right:4%;}.factory{right:3%;}.island{left:17%;}
  .paper.map-mission { display:flex;width:calc(100% - 20px);padding:28px 24px; }
  .map-mission h2 { font-size:31px; }
  .map-summary { font-size:19px; }
  .map-photo img { max-height:230px; }
  .map-photo { margin:4px 0; }
  .mission-duration { font-size:23px;margin:10px; }
  .map-start { font-size:29px;width:100%; }
  .day-strip { gap:18px 10px;padding:20px 10px; }
  .day-group>h2 { font-size:20px;margin-bottom:8px; }
  .day-doors { gap:0; }
  .day-doors .door { height:69px;min-height:44px; }
  .day-doors .door-number { font-size:21px; }
  .dossier { width:calc(100% - 12px);padding:30px 25px;margin:48px auto 24px; }
  .dossier::before { background-size:100% 100%; }
  .file-tabs { left:5%;gap:1px;top:-28px; }
  .file-tabs button { min-width:0;font-size:20px;height:57px;padding:5px 13px 16px; }
  .file-tabs button svg { width:19px;height:19px; }
  .case-overview { display:flex;flex-direction:column;margin-bottom:28px; }
  .case-overview h1 { font-size:34px;margin-bottom:16px; }
  .case-overview>div>p { font-size:19px; }
  .case-photo { width:90%;margin:15px auto 5px; }
  .case-evidence>h2 { font-size:25px;gap:8px; }
  .case-evidence>h2>span { white-space:normal;text-align:center; }
  .evidence-chain>article { padding:20px 15px; }
  .evidence h3 { font-size:30px; }
  .evidence p { font-size:19px; }
  .case-next>p { font-size:30px; }
  .case-next .primary { font-size:24px;min-width:0;width:100%;text-align:center; }
  #alphabet-popover { right:12px;top:8px;max-height:36dvh;padding:12px; }
  #alphabet-popover header { margin-bottom:8px; }
  #alphabet-popover dl>div { padding:2px; }
}
/* Preserve leather edges at narrow/tall sizes instead of stretching the full cover. */
.dossier::before { background:none;border:60px solid transparent;border-image:url('assets/plates/open-dossier.webp') 160 fill / 60px / 0 stretch; }
@media(max-width:600px) {
  .dossier { padding-top:47px; }
  .dossier::before { border-width:32px;border-image-width:32px; }
  .sensor-photo { margin-inline:0;transform:rotate(-2deg); }
  .case-photo { transform:rotate(-2deg); }
  .ramp-evidence { grid-template-columns:1fr;gap:12px; }
  .ramp-plan { width:160px;justify-self:center;margin:0; }
  .transport-note p { font-size:16px; }
  .case-next { gap:14px; }
  .case-next .primary { font-size:22px; }
  .day-strip { grid-template-columns:1fr;padding:20px 14px; }
  .day-doors { gap:4px; }
  .day-doors .door { height:96px; }
  .day-doors .door-number { font-size:27px; }
}
@media(max-width:600px) {
  .dossier { background:#59391d;border:2px dashed #a87a47;border-radius:18px; }
  .dossier::before { inset:8px;border:24px solid transparent;border-image:url('assets/plates/letter-paper.webp') 70 fill / 24px / 0 stretch; }
}
/* Defined tool edge with a restrained elevation. */
.field-tool { box-shadow:0 5px 14px #0006; }
/* Reserve a real row for signature and seal at every breakpoint. */
.letter-copy { display:grid;grid-template-columns:minmax(0,1fr) 110px;align-content:start;padding:0; }
.letter-copy .salutation,.letter-copy .letter-text { grid-column:1/-1; }
.letter-copy .signature { grid-column:1;grid-row:3;align-self:center;margin:10px 0; }
.letter-copy .wax-seal { grid-column:2;grid-row:3;position:static;width:110px;height:110px;align-self:center; }
.paper.map-mission { margin-top:2px;margin-bottom:8px;padding-top:46px; }
.mission-tab { margin-bottom:32px; }
.map-summary { font-size:21px;letter-spacing:-.035em; }
.mission-duration { gap:14px; }
.mission-duration>span { display:inline-flex;align-items:center;gap:9px;border:2px solid #634b30;border-radius:7px;padding:4px 12px;white-space:nowrap; }
.mission-duration::before,.mission-duration::after { content:'';height:1px;background:#876241;flex:1; }
.case-photo img { max-height:230px;object-fit:contain; }
.case-evidence>h2>span { position:relative;isolation:isolate;padding:3px 20px; }
.case-evidence>h2>span::before { content:'';position:absolute;inset:-5px -10px;z-index:-1;background:url('assets/plates/number-ticket.webp') center / 100% 160% no-repeat; }
.case-evidence>h2 { margin-bottom:26px; }
.missing-note { position:relative;isolation:isolate; }
.missing-note::before { content:'';position:absolute;inset:48px -8px -14px;z-index:-1;border:16px solid transparent;border-image:url('assets/plates/letter-paper.webp') 70 fill / 18px / 0 stretch;transform:rotate(4deg); }
.ramp-plan { max-width:150px; }
.case-next>p { display:flex;align-items:center;gap:28px; }
.footprint-mark { display:grid;place-items:center;width:115px;flex-shrink:0;border-right:1px solid #aa8251;padding-right:20px; }
.footprint-mark svg { width:80px;height:85px;fill:#17334e;stroke:#e9d8b7;stroke-width:1; }
@media(max-width:1250px) {
  .letter-copy { grid-template-columns:minmax(0,1fr) 90px; }
  .letter-copy .wax-seal { width:90px;height:90px; }
  .paper.map-mission { padding-top:40px; }
  .map-summary { font-size:19px; }
  .case-next>p { gap:15px; }
  .footprint-mark { width:80px;padding-right:10px; }
}
@media(max-width:900px) {
  .paper.map-mission { margin:15px auto 24px;padding:30px; }
  .case-photo img { max-height:none; }
}
@media(max-width:600px) {
  .letter-copy { grid-template-columns:minmax(0,1fr) 69px; }
  .letter-copy .wax-seal { width:69px;height:69px; }
  .paper.map-mission { padding:28px 24px; }
  .map-summary { font-size:19px;letter-spacing:0; }
  .footprint-mark { display:none; }
  .case-evidence>h2>span { padding:3px 0; }
  .case-evidence>h2::before,.case-evidence>h2::after { display:none; }
}
@media(min-width:901px) {
  .dossier { margin-left:max(7%,(100% - 1430px) / 2);margin-right:0; } /* 7 % bis etwa 1660 px, darueber mittig (Buch ist hoechstens 1430 px breit) */
  .case-overview { margin-bottom:12px; }
  .case-next { margin-top:28px; }
  .ramp-plan { max-width:140px; }
  .map-photo { margin:4px 0; }
  .map-photo img { max-height:250px; }
  .map-start { margin-top:auto; }
}
.primary::before { background-size:100% 165%; }
@media(min-width:1251px) {
  main:has(.day-4) .mission-banner h1,
  main:has(.day-16) .mission-banner h1,
  main:has(.day-21) .mission-banner h1 { font-size:52px; }
  .mission-paper { margin-top:-8px; }
  .letter-copy { grid-template-columns:minmax(0,1fr) 100px; }
  .letter-copy .wax-seal { width:100px;height:100px; }
  .tools { display:grid;grid-template-columns:161px 165px 235px minmax(0,1fr);gap:39px; }
  .alphabet-example { position:relative;padding:6px 8px 6px 38px; }
  .alphabet-example::after { content:'';position:absolute;inset:0 0 0 38px;border:1px solid #a87a47;border-radius:12px;pointer-events:none; }
  .feedback-space { min-height:23px; }
  .number { font-style:normal;font-weight:800; }
}
@media(min-width:901px) {
  .map-photo { margin:29px 0 4px; }
  .map-photo img { max-height:240px; }
  .map-start { margin-top:0; }
  .place-label { font-size:clamp(20px,1.7vw,26px); }
  .station { right:4%;top:28%; }
  .island { top:76%; }
}
body:has(.adventure) .nav-button[aria-current] { background:#071524ce;color:var(--nav-gold);border-color:#ffcc55;box-shadow:0 0 0 2px #926c31; }
.day-doors .door.selected { background-color:#ad7515;background-blend-mode:screen; }
#alphabet-button { white-space:nowrap;padding-inline:12px;font-size:22px; }
@media(max-width:600px) { #alphabet-button { font-size:18px; } }

/* Browser review 06.11: keep approved composition, anchor tools and map chapters. */
.lab-photo { overflow: hidden; }
.lab-photo > img {
  clip-path: polygon(2.5% 7.5%, 91.5% .5%, 97.5% 90.5%, 6.5% 99%);
  transform: scale(1.025);
}
.alphabet-example {
  display: inline-flex;
  align-items: center;
  justify-content: space-around;
  gap: clamp(18px, 2vw, 34px);
  padding: 7px 14px 7px 28px;
}
.alphabet-example > span { display: inline-block; }
.field-tool,
#alphabet-popover,
#hint-popover {
  inset: auto;
  right: auto;
  bottom: auto;
  margin: 0;
  max-height: min(420px, calc(100dvh - 24px));
}
#alphabet-popover { width: min(760px, calc(100vw - 24px)); }
#hint-popover { width: min(560px, calc(100vw - 24px)); }

.adventure-stage { grid-template-columns: 1fr; place-items: stretch center; background: #061424d9; }
.adventure-stage:not(.has-selection) .world-map { height: 100%; width: min(100%, 1060px); }
.adventure-stage:not(.has-selection) .world-art { object-fit: contain; }
.adventure-stage.has-selection { grid-template-columns: 65.4% 34.6%; place-items: stretch; }
.chapter-pin {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 3px solid #fff1bf;
  border-radius: 50% 50% 50% 8px;
  color: #111a24;
  background: #f5b921;
  box-shadow: 0 0 0 3px #8b4b09, 0 6px 12px #001a;
  transform: rotate(-45deg);
}
.chapter-pin > span { transform: rotate(45deg); font-size: 15px; font-weight: 800; white-space: nowrap; }
.chapter-pin.is-active { background: #fff2a8; box-shadow: 0 0 0 4px #f4b51d, 0 7px 12px #001a; }
.chapter-pin:focus-visible { outline-color: #fff; outline-offset: 5px; }
.chapter-headquarters { left: 22%; top: 16%; }
.chapter-island { left: 25%; top: 66%; }
.chapter-factory { right: 17%; top: 66%; }
.chapter-station { right: 18%; top: 17%; }
.map-card-close {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid #6f5130;
  border-radius: 50%;
  color: #162133;
  background: #fff5df;
  font: 32px/1 Georgia, serif;
}

.ramp-plan {
  max-width: 225px;
  padding: 7px 8px 3px;
  border: 1px solid #b4a37d;
  background-color: #ece8d9;
  background-image: linear-gradient(#a8b8bd55 1px, transparent 1px), linear-gradient(90deg, #a8b8bd55 1px, transparent 1px);
  background-size: 12px 12px;
  box-shadow: 1px 4px 7px #0004;
}
.ramp-plan svg { display: block; }
.ramp-plan .blueprint-building,
.ramp-plan .blueprint-ramp,
.ramp-plan .blueprint-arrow { fill: none; stroke: #143d61; stroke-width: 3; }
.ramp-plan .blueprint-ramp { stroke-width: 2.5; }
.ramp-plan .blueprint-arrow { stroke-width: 4; }
.ramp-plan figcaption { color: #143d61; font-size: 28px; transform: rotate(-3deg); }
.ramp-plan figcaption span { font-family: Georgia, serif; }

@media (min-width: 1251px) {
  .tools { grid-template-columns: 161px 165px 235px minmax(250px, 1fr); gap: 24px; }
  .alphabet-example { padding-left: 28px; }
  .alphabet-example::after { inset: 0 0 0 22px; }
}
@media (max-width: 900px) {
  .adventure-stage.has-selection { grid-template-columns: 1fr; }
  .adventure-stage:not(.has-selection) .world-map { width: 100%; height: auto; aspect-ratio: 1.32; }
}
@media (max-width: 600px) {
  .alphabet-example { display: none; }
  .chapter-pin { width: 42px; height: 42px; border-width: 2px; }
  .chapter-pin > span { font-size: 12px; }
  .map-card-close { top: 9px; right: 10px; width: 40px; height: 40px; }
  .ramp-plan { width: 220px; max-width: 100%; }
}

/* Chapter one: five real mechanics inside the approved open-letter composition. */
.compact-briefing { margin-bottom: 18px; }
.compact-briefing .lab-photo img { aspect-ratio: 1.75; object-fit: cover; }
.compact-briefing .surveillance-detail { aspect-ratio:1.75; background:#142d3e; }
.compact-briefing .surveillance-detail img { width:280%; height:100%; max-width:none; object-fit:cover; object-position:left center; }
.chapter-playfield { min-height: 225px; display: grid; align-items: center; }
.chapter-tools { justify-content: center; }
.compact-steps { width: 470px; }
.day-success { text-align: center; padding: 34px 12px 24px; }
.day-success h2 { color: var(--teal); font-size: clamp(38px, 4vw, 62px); }
.day-success>p:not(.salutation) { max-width: 680px; margin: 12px auto 24px; font: 22px/1.45 Georgia, serif; }
.chapter-findings { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin-top:24px; }
.chapter-findings>h3 { grid-column:1/-1; margin:0; font-size:24px; }
.chapter-findings article { display:flex; align-items:center; gap:12px; padding:12px; border:1px solid #8c6a42; border-radius:12px; background:#fff3dc; }
.chapter-findings article>span { width:42px; height:42px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%; color:#fffaf0; background:#146c68; font-weight:800; }
.chapter-findings h4 { margin:0; font-size:20px; }.chapter-findings p { margin:3px 0 0; font:15px/1.3 Georgia,serif; }
.track-board { max-width: 900px; margin: 0 auto; }
.snow-route-map { display:block; width:100%; height:auto; color:#283f4e; background:#e7edf0; border:1px solid #8c6a42; border-radius:12px; }
.snow-route-map .route { fill:none; stroke:#697c86; stroke-width:18; stroke-linecap:round; stroke-dasharray:2 13; }
.snow-route-map .route-triangles { stroke:#2d5264; }
.snow-route-map .route-marks text { fill:#132b3b; font:700 22px Georgia,serif; letter-spacing:5px; }
.snow-route-map .destinations text { fill:#101722; font:700 20px 'Roboto Condensed',sans-serif; }
.track-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:10px; }
.track-route { min-height:76px; padding:10px 16px; border:1px solid #8c6a42; border-radius:12px; color:var(--ink); background:#fff3dc; display:grid; gap:5px; text-align:center; }
.track-route[aria-checked="true"] { background: #ffdf91; box-shadow: inset 0 0 0 3px #734613; }
.track-name { font-size: 24px; font-weight: 800; }
.track-marks { font: 24px/1 Georgia,serif; letter-spacing: .14em; }
.difference-board { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; margin: 0 auto; }
.difference-board figure { margin: 0; }
.difference-board figcaption { margin-bottom: 5px; text-align: center; font-size: 18px; font-weight: 800; }
.difference-investigation { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.difference-investigation figure { position:relative; min-width:0; margin:0; padding:7px 7px 26px; background:#fff8e9; box-shadow:0 4px 10px #15293b47; transform:rotate(-.4deg); }
.difference-investigation figure+figure { transform:rotate(.4deg); }
.difference-investigation figcaption { position:absolute; z-index:2; right:12px; bottom:4px; font:700 15px/1.1 Georgia,serif; color:#263c4a; }
.difference-investigation img { display:block; width:100%; height:225px; object-fit:cover; }
.difference-spots { position:absolute; inset:7px 7px 26px; }
.difference-spots button { position:absolute; left:var(--spot-x); top:var(--spot-y); width:38px; height:38px; padding:0; border:2px solid #ffe094; border-radius:50%; background:#0b3b59d9; color:#fff7df; box-shadow:0 2px 8px #06172480; transform:translate(-50%,-50%); font:800 16px/1 'Roboto Condensed',sans-serif; cursor:pointer; }
.difference-spots button:hover,.difference-spots button:focus-visible { scale:1.12; }
.difference-spots button[aria-pressed="true"] { border-color:#fff; background:#08786f; box-shadow:0 0 0 3px #efb52e; }
.lab-scene { position: relative; aspect-ratio: 1.5; overflow: hidden; border: 7px solid #fff4df; background:#102a40; box-shadow: 1px 4px 8px #0005; }
.lab-scene>img { display:block; width:200%; height:100%; max-width:none; object-fit:cover; }
.lab-scene.after>img { transform:translateX(-50%); }
.difference-zone { position:absolute; min-width:44px; min-height:44px; border:2px dashed transparent; border-radius:50%; background:transparent; }
.difference-zone[aria-pressed="true"] { border-color:#ffcf52; box-shadow:0 0 0 4px #17394c; }
.zone-egg { left:33%; top:22%; width:31%; height:47%; }.zone-blanket { left:1%; bottom:1%; width:33%; height:28%; }.zone-pip { right:16%; bottom:3%; width:22%; height:35%; }.zone-hatch { right:0; bottom:0; width:22%; height:43%; }
.photo-puzzle { display:grid; grid-template-columns: 40% 1fr; gap:28px; width:min(900px,100%); margin:0 auto; }
.piece-bank,.puzzle-slots { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.photo-piece,.puzzle-slot { min-width:0; aspect-ratio:1.5; border:2px solid #8e673c; border-radius:7px; background-image:url('assets/plates/loading-ramp-surveillance.webp'); background-size:300% 200%; color:var(--ink); font-size:24px; font-weight:800; }
.photo-piece.selected { outline:4px solid #17394c; outline-offset:2px; }
.photo-piece:disabled { opacity:.25; cursor:not-allowed; }
.puzzle-slot:not([class*="piece-"]) { background:#f9e6c4b8; }
.piece-A { background-position:0 0; }.piece-B { background-position:50% 0; }.piece-C { background-position:100% 0; }.piece-D { background-position:0 100%; }.piece-E { background-position:50% 100%; }.piece-F { background-position:100% 100%; }
.crate-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; max-width:850px; margin:0 auto; }
.shipping-crate { position:relative; min-height:190px; border:0; padding:52px 18px 18px; color:#181611; background:linear-gradient(90deg,#b8792b,#e1a34b 10% 90%,#a76524); box-shadow:0 8px 12px #0004; display:grid; place-items:center; gap:8px; }
.shipping-crate::before,.shipping-crate::after { content:''; position:absolute; inset-block:0; width:12px; background:#6e431c; }.shipping-crate::before { left:13%; }.shipping-crate::after { right:13%; }
.shipping-crate[aria-checked="true"] { outline:5px solid #17394c; outline-offset:4px; }
.crate-lid { position:absolute; inset:14px -5px auto; height:24px; background:#7e4a20; }
.shipping-crate strong { font-size:34px; z-index:1; }.shipping-crate>span:last-child { z-index:1; font-size:18px; font-weight:800; }
.conveyor-plan { position:relative; display:grid; gap:14px; max-width:950px; margin:0 auto; padding:20px; border:2px solid #8a6a42; border-radius:14px; background:#1a3241; color:#fff7e6; overflow:hidden; }
.belt { position:relative; z-index:1; min-height:70px; display:grid; place-items:center; padding:8px 12px; border:5px double #e6a83d; border-radius:14px; background:#233f4e; font-weight:800; text-align:center; }
.switch-sequence { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.switch-node { display:grid; gap:8px; justify-items:stretch; position:relative; padding:12px 8px; border:1px solid #c59543; border-radius:12px; background:#233f4e; }
.switch-node b { width:48px; height:48px; border-radius:50%; display:grid; place-items:center; color:#101722; background:#ffd364; border:4px solid #fff1b9; z-index:1; }
.branch-options { display:grid; grid-template-columns:1fr 1fr; gap:7px; min-height:64px; }
.branch-options span { padding:7px 5px; border:1px solid #d79832; color:#ffd364; font-size:15px; font-weight:800; }
.branch-options small { color:#fff7e6; font:13px/1.2 Georgia,serif; }
.branch-left { text-align:left; }
.branch-right { text-align:right; }
.switch-node button { min-height:48px; border:1px solid #fff2ba; border-radius:9px; padding:8px 12px; color:#fff8e8; background:#0f6d69; font-size:15px; font-weight:800; z-index:1; }
.return-note { margin:0; padding-top:10px; border-top:3px dashed #8f6a34; color:#fff7e6; font:15px/1.35 Georgia,serif; text-align:center; }
@media (hover:hover) and (pointer:fine) {
  .track-route:hover,.shipping-crate:hover { filter:brightness(1.05); }
  .difference-zone:hover { border-color:#ffcf52; }
  .switch-node button:hover { background:#16817c; }
}
@media (prefers-reduced-motion:no-preference) {
  .day-success { animation:discovery-in 220ms var(--ease-out); }
  .track-route,.shipping-crate,.difference-zone,.switch-node button { transition:filter 140ms ease,box-shadow 140ms ease,border-color 140ms ease; }
}
.chapter-one .check-answer { width:min(540px,100%); font-size:34px; white-space:nowrap; }
@media (max-width:900px) {
  .photo-puzzle { grid-template-columns:1fr; }
  .switch-sequence { grid-template-columns:1fr; }
}
@media (max-width:600px) {
  .compact-steps { min-width:0;width:100%; }
  .track-choices,.crate-grid,.difference-board { grid-template-columns:1fr; }
  .track-route { min-height:64px; }
  .difference-board { gap:14px; }
  .photo-puzzle { gap:16px; }
  .piece-bank,.puzzle-slots { gap:5px; }
  .conveyor-plan { padding:12px; }
  .belt { min-height:56px; border-width:3px; font-size:15px; }
  .switch-node { padding:10px; }
  .switch-node b { width:44px; height:44px; border-width:3px; }
  .branch-options span { font-size:14px; }
  .branch-options small { font-size:13px; }
  .switch-node button { min-height:48px; font-size:15px; }
  .return-note { font-size:14px; }
}

.graph-legend { display:inline-flex; gap:7px; align-items:center; margin-left:14px; font-weight:700; }
.connect-rounds { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.connect-rounds>section { padding:12px; border:1px solid #6e8491; background:#edf2ef; }
.connect-rounds h3 { margin:0 0 9px; font-size:18px; text-align:center; }
.connect-rounds .connect-board { width:100%; }
.connect-rounds .answer-row { grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; margin-top:8px; }
.connect-rounds .answer-row button { min-width:0; padding:8px 4px; }

@media (max-width:900px) {
  .connect-rounds { grid-template-columns:1fr; }
}

/* Chapters 2–4: distinct worlds, shared interaction contract. */
.chapter-later .later-playfield { min-height:260px; padding:18px; border:1px solid #80643e; }
.chapter-later .check-answer { width:min(560px,100%); }
.chapter-2 .quest-panel { background:#eef0d8; }
.chapter-3 .quest-panel { background:#eaf0f4; }
.chapter-4 .quest-panel { background:#e5edf2; }
.chapter-2 .later-playfield { background:#dfe5c7; box-shadow:inset 0 0 0 5px #c4cfaa; }
.chapter-3 .later-playfield { background:#dbe7ee; box-shadow:inset 0 0 0 5px #bdced9; }
.chapter-4 .later-playfield { background:#d6e4ec; box-shadow:inset 0 0 0 5px #b5cbd8; }
.world-label { margin:0 0 8px; color:#526546; font-size:14px; font-weight:800; letter-spacing:.08em; text-align:center; text-transform:uppercase; }
.chapter-3 .world-label { color:#365c78; }.chapter-4 .world-label { color:#315b72; }
.later-briefing .lab-photo img { aspect-ratio:1.75; object-fit:cover; }
.hint-target { outline:4px solid #e2a62d !important; outline-offset:3px; }
.point-board { position:relative; width:min(860px,100%); aspect-ratio:2.3; margin:0 auto; overflow:hidden; border:2px solid #80643e; border-radius:12px; background:#e5ddbd; }
.point-board svg { position:absolute; inset:0; width:100%; height:100%; }
.point-board polyline { fill:none; stroke:#146c68; stroke-width:1.3; stroke-linecap:round; stroke-linejoin:round; }
.point-board::before { content:''; position:absolute; inset:12% 20%; border:1px dashed #a58a5f; opacity:.45; }
.star-board { background:#122c42; }
.star-board polyline { stroke:#ffd364; }
.number-dot { position:absolute; z-index:1; width:44px; height:44px; translate:-50% -50%; border:2px solid #6e542f; border-radius:50%; color:#142433; background:#fff4d8; font-weight:800; }
.number-dot.is-next { box-shadow:0 0 0 4px #e2a62d; }
.number-dot.is-done { color:#fff; background:#146c68; }
.figure-choices,.answer-row { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:12px; }
.figure-choices button,.answer-row button { min-width:110px; min-height:48px; padding:8px 12px; border:1px solid #80643e; border-radius:9px; color:#142433; background:#fff4d8; font-weight:800; }
.figure-choices button[aria-checked="true"],.answer-row button[aria-checked="true"] { background:#ffd364; box-shadow:inset 0 0 0 2px #6e542f; }
.figure-choices svg { display:block; width:78px; height:58px; margin:auto; fill:none; stroke:#17394c; stroke-width:4; stroke-linecap:round; stroke-linejoin:round; }
.sequence-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; width:min(800px,100%); margin:0 auto; }
.sequence-cards button { min-height:130px; display:grid; place-items:center; gap:4px; padding:12px; border:1px solid #80643e; border-radius:12px; color:#142433; background:#fff4d8; }
.sequence-cards button[aria-pressed="true"] { background:#ffd364; }
.sequence-cards button>span { font-size:34px; }.sequence-cards button>b { font-size:21px; }.sequence-cards small { min-height:18px; }
.scanner-puzzle { display:grid; gap:15px; width:min(850px,100%); margin:0 auto; }
.scanner-puzzle h3 { margin:0; text-align:center; }
.scanner-modules,.scanner-sockets { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.scanner-modules button,.scanner-sockets button { min-height:92px; display:grid; place-items:center; gap:4px; padding:9px; border:1px solid #516b59; color:#18372b; background:#f5f0dc; font-weight:800; }
.scanner-modules button>span,.scanner-sockets button>span { font-size:28px; }
.scanner-modules button:disabled { opacity:.38; }.scanner-sockets .socket { background:#c8d5bc; }
.connector-rund { border-radius:30px !important; }.connector-eckig { border-radius:3px !important; }.connector-dreieckig { clip-path:polygon(50% 0,100% 100%,0 100%); padding-top:28px !important; }
.maze-game { width:min(620px,100%); margin:0 auto; }
.maze-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:4px; padding:10px; border:2px solid #6e542f; background:#b8a77e; }
.maze-cell { aspect-ratio:1; display:grid; place-items:center; border:1px solid #9b8155; color:#142433; background:#fff4d8; font-size:22px; font-weight:800; }
.maze-cell.wall { background:#243d3d; }.maze-cell.visited { background:#dbeaa7; }.maze-cell.player { color:#fff; background:#146c68; }
.direction-pad { display:grid; grid-template-columns:repeat(4,56px); justify-content:center; gap:8px; margin-top:12px; }
.direction-pad button { min-width:52px; min-height:52px; border:1px solid #80643e; border-radius:9px; background:#fff4d8; font-size:25px; }
.matching-board { display:grid; grid-template-columns:1fr 1fr; gap:28px; width:min(760px,100%); margin:0 auto; }
.matching-board>div { display:grid; gap:10px; }
.matching-board button { min-height:78px; display:grid; grid-template-columns:50px 1fr; align-items:center; padding:8px 14px; border:1px solid #80643e; border-radius:9px; color:#142433; background:#fff4d8; text-align:left; }
.matching-board button[aria-pressed="true"] { background:#ffd364; }.matching-board button>span { font-size:30px; }.matching-board small { grid-column:2; }
.animal-card b { font-size:19px; }.animal-card small { font-family:Georgia,serif; }.track-cast { filter:drop-shadow(2px 3px 0 #98764b); }
.memory-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; width:min(690px,100%); margin:0 auto; }
.memory-grid button { aspect-ratio:1.25; min-height:72px; display:grid; place-items:center; border:1px solid #80643e; border-radius:9px; color:#142433; background:#9b6b39; }
.memory-grid button[aria-pressed="true"],.memory-grid button:disabled { background:#fff4d8; opacity:1; }
.memory-grid span { font-size:31px; }.memory-grid small { min-height:16px; }
.pattern-puzzle { display:grid; gap:10px; width:min(820px,100%); margin:0 auto; text-align:center; }
.pattern-puzzle>p { margin:8px 0 0; padding:9px; border:1px solid #a58a5f; background:#fff4d8; font-size:21px; font-weight:800; letter-spacing:.04em; }
.pattern-unit { display:inline-block; padding:4px 7px; border:2px solid #c18a2d; border-radius:5px; background:#fff8e7; }
.module-puzzle { display:grid; grid-template-columns:1fr 1fr; gap:22px; width:min(820px,100%); margin:0 auto; }
.module-bank,.module-slots { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.module-bank button,.module-slot { min-height:100px; padding:10px; border:1px solid #5b6d7d; border-radius:8px; color:#132b3b; background:#f4f0dd; font-weight:800; }
.module-bank button>b,.module-slot>b { display:block; font-size:28px; }
.module-bank button[aria-pressed="true"] { background:#ffd364; }.module-bank button:disabled { opacity:.35; }
.module-slot { border-style:dashed; background:#dce7ec; }
.module-slot.is-empty b { opacity:.38; }
.blueprint-slots { position:relative; padding:8px; background:#315b72; }.blueprint-slots::before { content:''; position:absolute; left:8px; right:8px; top:calc(50% - 1.5px); height:3px; background:#ffd364; }.blueprint-slots::after { content:''; position:absolute; top:8px; bottom:8px; left:calc(50% - 1.5px); width:3px; background:#ffd364; }.blueprint-slots button { position:relative; z-index:1; }
.sender-slots { padding:8px; border:6px solid #8f9da6; border-radius:18px; background:#b9c6cd; }
.machine-compare { display:grid; grid-template-columns:1fr 1fr; gap:18px; width:min(900px,100%); margin:0 auto; }
.machine-compare section { padding:12px; border:1px solid #5b6d7d; background:#dce7ec; }
.machine-compare h3 { margin:0 0 8px; text-align:center; }
.machine-schematic { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.machine-schematic span,.machine-schematic button { min-height:90px; display:grid; place-items:center; gap:3px; padding:8px; border:1px solid #607786; color:#132b3b; background:#f4f0dd; text-align:center; }
.machine-schematic b { font-size:29px; }.machine-schematic button[aria-pressed="true"] { background:#ffd364; }
.number-network { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; width:min(780px,100%); margin:0 auto; }
.number-network button { aspect-ratio:1; position:relative; border:2px solid #5b6d7d; border-radius:50%; color:#132b3b; background:#f4f0dd; font-size:22px; font-weight:800; }
.number-network button[aria-pressed="true"] { color:#fff; background:#146c68; }.number-network small { position:absolute; right:4px; bottom:2px; }
.connect-game { width:min(560px,100%); margin:0 auto; }
.connect-board { display:grid; grid-template-columns:repeat(5,1fr); gap:7px; padding:13px; border:2px solid #365c78; border-radius:12px; background:#2b6f9a; }
.connect-board span { aspect-ratio:1; display:grid; place-items:center; border-radius:50%; color:#132b3b; background:#f4f0dd; font-weight:800; }
.connect-board .player-disc { background:#ffd364; }.connect-board .robot-disc { color:#fff; background:#c84c35; }
.column-buttons { display:grid; grid-template-columns:repeat(5,1fr); gap:7px; margin-top:8px; }.column-buttons button { min-height:48px; border:1px solid #365c78; border-radius:8px; background:#f4f0dd; }
.measurement-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; width:min(850px,100%); margin:0 auto; }
.measurement-grid button { min-height:140px; display:grid; gap:9px; place-items:center; padding:12px; border:1px solid #5b6d7d; border-radius:10px; color:#132b3b; background:#f4f0dd; }
.measurement-grid button[aria-checked="true"] { background:#ffd364; }.measurement-grid b { font-size:28px; }.measurement-grid.compact button { min-height:80px; }
.pipe-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:2px; width:min(650px,100%); margin:0 auto; padding:3px; border:2px solid #617e91; background:#617e91; }
.pipe-frame { display:grid; grid-template-columns:88px 1fr; align-items:stretch; gap:4px; width:min(760px,100%); margin:0 auto; color:#17394c; font-weight:800; }
.pipe-labels { display:grid; grid-template-rows:1fr 1fr; align-items:center; text-align:right; }
.pipe-grid button { min-height:130px; display:grid; place-items:center; gap:5px; border:1px solid #617e91; border-radius:10px; background:#17394c; color:#fff4d8; }
.pipe { position:relative; width:70px; height:70px; display:block; }
.pipe::before,.pipe::after { content:''; position:absolute; background:#d9a33e; }
.pipe.straight::before { left:0; right:0; top:29px; height:12px; }.pipe.straight::after { display:none; }
.pipe.corner::before { left:29px; right:0; top:29px; height:12px; }.pipe.corner::after { left:29px; top:29px; bottom:0; width:12px; }
.archive-math { display:grid; gap:9px; width:min(620px,100%); margin:0 auto; }
.archive-math p,.archive-math label { margin:0; display:flex; justify-content:center; align-items:center; gap:14px; padding:10px; border:1px solid #617e91; background:#f4f0dd; font-size:25px; }
.archive-math p span { font-size:33px; color:#bd7d16; }.archive-math input { width:90px; min-height:52px; font:800 26px inherit; text-align:center; }
.network-route { position:relative; width:min(760px,100%); aspect-ratio:2.3; margin:0 auto; }
.network-route svg { position:absolute; inset:0; width:100%; height:100%; }.network-route path { fill:none; stroke:#607f92; stroke-width:7; }
.network-route button { position:absolute; z-index:1; width:72px; height:52px; border:1px solid #617e91; border-radius:50%; color:#132b3b; background:#f4f0dd; font-weight:800; }
.network-route button[aria-pressed="true"] { color:#fff; background:#146c68; }.network-route .broken { background:#d7a69d; }.network-route small { display:block; }
.network-route .start { left:0; top:40%; opacity:1; }.node-a { left:25%; top:8%; }.node-b { left:25%; bottom:8%; }.node-c { left:52%; top:40%; }.node-d { left:68%; bottom:8%; }.node-z { right:0; top:40%; }
.general-check { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }.general-check>section { padding:10px; border:1px solid #617e91; background:#e8eef1; }.general-check h3 { margin:0 0 8px; text-align:center; }.general-check .sequence-cards { grid-template-columns:1fr; }.general-check .sequence-cards button { min-height:66px; grid-template-columns:40px 1fr; }.general-check .measurement-grid { grid-template-columns:1fr; }
.final-controls { display:grid; grid-template-columns:1fr 1fr; gap:24px; width:min(800px,100%); margin:0 auto; }.final-controls section { padding:12px; border:1px solid #617e91; background:#e8eef1; }.final-controls h3 { margin:0 0 12px; text-align:center; }.heat-levels { display:grid; grid-template-columns:repeat(5,1fr); gap:7px; }.heat-levels button { min-height:86px; border:1px solid #617e91; border-radius:8px; color:#142433; background:#f4f0dd; font-size:25px; }.heat-levels button[aria-checked="true"] { background:#ffd364; }.heat-levels small { display:block; font-size:13px; }
.measurement-card,.signal-card { display:grid; gap:4px; margin-bottom:12px; padding:10px; border:1px solid #617e91; color:#14374b; background:#f4f0dd; text-align:center; }.measurement-card span { color:#a35d22; font-size:20px; }.signal-card b { color:#146c68; }

@media (max-width:900px) {
  .general-check { grid-template-columns:1fr; }
  .later-briefing .lab-photo { max-width:none; }
}
@media (max-width:600px) {
  .later-playfield { min-width:0; }
  .point-board { aspect-ratio:1.25; }
  .number-dot { width:44px; height:44px; font-size:12px; }
  .sequence-cards,.measurement-grid,.matching-board,.module-puzzle,.machine-compare,.final-controls { grid-template-columns:1fr; }
  .scanner-modules,.scanner-sockets { grid-template-columns:1fr; }
  .sequence-cards button { min-height:82px; }
  .memory-grid { grid-template-columns:repeat(3,1fr); }
  .number-network { grid-template-columns:repeat(4,1fr); }
  .pipe-grid { grid-template-columns:repeat(3,1fr); }
  .pipe-frame { grid-template-columns:70px 1fr; }
  .pipe-grid button { min-height:92px; padding:4px; }
  .pipe { width:54px; height:54px; }
  .pipe.straight::before { top:22px; height:10px; }
  .pipe.corner::before { left:22px; top:22px; height:10px; }
  .pipe.corner::after { left:22px; top:22px; width:10px; }
  .network-route { aspect-ratio:1.35; }
  .network-route button { width:56px; height:48px; }
  .archive-math p,.archive-math label { gap:8px; font-size:19px; }
  .chapter-later .check-answer { white-space:normal; font-size:28px; }
}

/* Quality pass 06.11: one coherent evidence world, clearer games, real iPad canvas. */
.lab-photo.polaroid { position:relative; overflow:visible; margin:0; padding:11px 11px 30px; background:#fff8ea; box-shadow:2px 8px 14px #24170855; transform:rotate(-1.2deg); }
.lab-photo.polaroid::before { content:''; position:absolute; z-index:2; top:-12px; left:38%; width:45px; height:42px; background:url('assets/brass-clip.svg') center/contain no-repeat; }
.lab-photo .photo-window,.map-photo .photo-window { position:relative; overflow:hidden; width:100%; aspect-ratio:1.7; background:#10283c; }
.lab-photo .photo-window>img,.map-photo .photo-window>img { display:block; width:100%; height:100%; object-fit:cover; clip-path:none; transform:none; }
.lab-photo.reference-crop .photo-window>img,.map-photo.reference-crop .photo-window>img { width:330%; height:auto; max-width:none; transform:translate(-16%,-18%); }
.lab-photo figcaption { position:absolute; left:18px; right:18px; bottom:7px; color:#27394a; font:18px/1 'Dancing Script',cursive; text-align:center; }
.compact-briefing .lab-photo { max-width:46%; }
.compact-briefing .lab-photo .photo-window { aspect-ratio:1.72; }
.word-search { padding:4px; overflow:visible; }
.search-cell { box-sizing:border-box; outline-offset:2px; }
.chapter-tools { gap:16px; margin:20px 0 4px; }
.chapter-tools .tool-button { min-width:150px; min-height:52px; padding-inline:18px; }

.adventure { height:auto; min-height:calc(100vh - 76px); grid-template-rows:auto auto; }
.adventure-stage { position:relative; isolation:isolate; min-height:0; padding:26px clamp(12px,3vw,48px); overflow:hidden; background:#07182a; }
.adventure-stage::before { content:''; position:absolute; inset:-28px; z-index:-2; background:url('assets/plates/adventure-world.webp') center/cover no-repeat; filter:blur(24px) brightness(.45) saturate(.85); transform:scale(1.08); }
.adventure-stage::after { content:''; position:absolute; inset:0; z-index:-1; background:#06152499; }
.adventure-stage:not(.has-selection) .world-map,.adventure-stage.has-selection .world-map { width:min(100%,1366px); height:auto; aspect-ratio:1.32; margin:auto; box-shadow:0 14px 38px #0009; }
.adventure-stage:not(.has-selection) .world-art,.adventure-stage.has-selection .world-art { object-fit:cover; }
.place-label { padding:12px 24px; }
.place-label::before { inset:-5px -10px; }
.adventure-stage.has-selection { display:block; }
.paper.map-mission { position:absolute; z-index:8; top:50%; right:clamp(20px,4vw,74px); width:min(430px,calc(100% - 40px)); max-height:calc(100% - 44px); margin:0; padding:40px 34px 28px; overflow-x:hidden; overflow-y:auto; transform:translateY(-50%); box-shadow:0 20px 60px #000b; }
.map-mission .mission-tab { margin-bottom:20px; font-size:30px; }
.map-mission h2 { font-size:clamp(28px,2.2vw,38px); }
.map-summary { font-size:18px; }
.map-photo { margin:8px 0; padding:7px 7px 18px; background:#fff7e7; box-shadow:1px 5px 8px #0005; transform:rotate(-1deg); }
.map-photo .photo-window { aspect-ratio:1.65; }
.mission-duration { margin:8px 0; font-size:21px; }
.map-start { min-height:58px; font-size:27px; }
.day-strip { position:relative; z-index:2; }

.file-tabs { z-index:3; }
.file-tabs button { cursor:pointer; }
.file-tabs button[aria-current="false"] { opacity:.72; }
.file-tabs button[aria-current="page"] { opacity:1; font-style:normal; text-decoration:none; transform:translateY(4px); }
.case-panel[hidden] { display:none !important; }
.case-panel { min-height:650px; }
.case-overview { grid-template-columns:48% 34% 14%; gap:2%; }
.case-overview h2 { font-size:clamp(34px,3.2vw,50px); line-height:1.04; margin:8px 0 20px; }
.case-overview .lab-photo { width:100%; }
.case-status { display:flex; gap:12px; margin:25px 0 0; }
.case-status>div { min-width:145px; padding:12px 14px; border:1px solid #9c7645; background:#fff1d4; }
.case-status dt { font-size:15px; font-weight:700; }
.case-status dd { margin:3px 0 0; font:700 25px Georgia,serif; }
.case-timeline>h2 { font-size:38px; margin:0 0 24px; }
.timeline-list { display:grid; gap:9px; max-height:470px; overflow:auto; padding-right:8px; }
.timeline-list article { display:grid; grid-template-columns:150px 1fr; gap:18px; padding:13px 16px; border-bottom:1px solid #af8c5f; font:19px/1.35 Georgia,serif; }
.timeline-list b { font-family:'Roboto Condensed',sans-serif; }
.case-empty { margin-top:28px; padding:24px; border:1px dashed #9a744a; background:#fff0d0aa; text-align:center; }
.chapter-findings { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:35px; }
.chapter-findings>h3 { font:700 30px/1.1 Georgia,serif; text-align:center; }
.chapter-findings article { position:relative; min-height:120px; padding:20px 18px 18px 76px; border:0; border-radius:0; background:#fff2d8; box-shadow:2px 7px 12px #2b1b0e44; transform:rotate(-.35deg); }
.chapter-findings article:nth-of-type(even) { transform:rotate(.4deg); }
.chapter-findings article>span { position:absolute; left:18px; top:18px; border:2px solid #7d281f; color:#7d281f; background:transparent; }
.chapter-findings h4 { font:700 22px/1.15 Georgia,serif; }
.chapter-findings p { font-size:17px; }
.ramp-plan { max-width:300px; padding:5px; background:#e9edf0; }
.ramp-plan svg { stroke:#143d61; }
.ramp-plan .blueprint-grid-line { fill:none; stroke:#7a9bb055; stroke-width:1; }
.ramp-plan .blueprint-building,.ramp-plan .blueprint-ramp,.ramp-plan .blueprint-arrow,.ramp-plan .blueprint-dimensions { fill:none; stroke:#143d61; stroke-width:3; }
.ramp-plan .blueprint-dimensions { stroke-width:1.4; }
.ramp-plan .blueprint-dimensions text,.ramp-plan .blueprint-label { fill:#143d61; stroke:none; font:700 12px 'Roboto Condensed',sans-serif; letter-spacing:.08em; }
.ramp-plan .blueprint-arrowhead { fill:#143d61; stroke:none; }
.ramp-plan figcaption { font:700 18px/1.2 'Roboto Condensed',sans-serif; transform:none; }

.puzzle-instruction,.placement-instruction,.matching-instruction { max-width:780px; margin:0 auto 15px; padding:12px 15px; border:1px solid #9d8157; background:#fff4dd; font:18px/1.35 Georgia,serif; }
.track-investigation { max-width:950px; margin:auto; }
.track-case-note { display:grid; grid-template-columns:110px 1fr; gap:15px; align-items:center; margin-bottom:14px; padding:13px 16px; color:#f7eed9; background:#1c3b4d; }
.track-case-note b { color:#ffd364; font-size:21px; }
.track-stages { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0; padding:0; list-style:none; }
.track-stages li { padding:10px; border:1px solid #8c6a42; background:#edf1f0; }
.track-stages h3 { display:flex; gap:8px; align-items:center; margin:0 0 9px; font-size:19px; }
.track-stages h3>span { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#31576d; }
.track-stages li>div { display:grid; gap:6px; }
.track-stages button { min-height:60px; display:grid; grid-template-columns:1fr; place-items:center; padding:7px; border:1px solid #9a7a50; color:#122839; background:#fff8e9; }
.track-stages button[aria-checked="true"] { background:#ffd979; box-shadow:inset 0 0 0 2px #6c501e; }
.track-stages button b { font:700 19px Georgia,serif; letter-spacing:.08em; }
.inventory-investigation { display:grid; grid-template-columns:minmax(240px,.75fr) 1.4fr; gap:25px; align-items:start; max-width:980px; margin:auto; }
.inventory-photo { margin:0; padding:9px 9px 28px; background:#fff8e8; box-shadow:2px 7px 12px #0005; transform:rotate(-1deg); }
.inventory-photo img { width:100%; aspect-ratio:1.15; object-fit:cover; }
.inventory-photo figcaption { margin-top:8px; font:18px 'Dancing Script',cursive; text-align:center; }
.inventory-check h3 { margin:0 0 5px; font-size:25px; }
.inventory-check>p { margin:0 0 12px; font:17px Georgia,serif; }
.evidence-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.evidence-options button { min-height:82px; display:grid; grid-template-columns:26px 1fr; gap:2px 9px; align-items:center; padding:10px; border:1px solid #8c6a42; color:#142433; background:#fff6e4; text-align:left; }
.evidence-options button[aria-pressed="true"] { background:#ffdb80; box-shadow:inset 0 0 0 2px #6f501f; }
.evidence-checkmark { grid-row:1/3; width:22px; height:22px; border:2px solid #31576d; }
.evidence-options button[aria-pressed="true"] .evidence-checkmark::after { content:'✓'; display:grid; place-items:center; color:#17394c; font-weight:800; }
.evidence-options small { line-height:1.25; }
.manifest-puzzle { display:grid; grid-template-columns:220px 1fr; gap:22px; align-items:stretch; max-width:980px; margin:auto; }
.shipping-order { padding:18px; border:2px solid #7e2a22; background:#fff4df; box-shadow:2px 6px 10px #0004; transform:rotate(-1deg); }
.shipping-order h3 { margin:0 0 12px; color:#7e2a22; font:700 25px Georgia,serif; }
.shipping-order dl,.shipping-crate dl { margin:0; }
.shipping-order dl>div,.shipping-crate dl>div { display:grid; grid-template-columns:78px 1fr; gap:7px; padding:5px 0; border-bottom:1px solid #96764d; }
.shipping-order dt,.shipping-crate dt { font-size:14px; font-weight:700; }
.shipping-order dd,.shipping-crate dd { margin:0; font:15px/1.25 Georgia,serif; }
.shipping-crate { padding-top:50px; }
.shipping-crate strong { font-size:25px; }
.shipping-crate dl { z-index:1; width:100%; padding:8px; background:#f4c271dd; }
.nikolaus-scan { max-width:950px; margin:auto; }
.scan-tools { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.scan-tools button { min-height:130px; display:grid; gap:7px; padding:14px; border:1px solid #836137; color:#10283a; background:#fff5df; text-align:left; }
.scan-tools button[aria-pressed="true"] { background:#dfe9dc; box-shadow:inset 0 0 0 3px #386b65; }
.scan-tools b { font-size:22px; }.scan-tools span { font:16px/1.3 Georgia,serif; }.scan-tools small { min-height:38px; }
.scan-conclusion { margin-top:15px; padding:15px; background:#1b3b4b; color:#fff8e8; text-align:center; }
.scan-conclusion h3 { margin:0 0 4px; font-size:24px; }.scan-conclusion p { margin:0 0 12px; }
.suspect-crates { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.suspect-crates button { min-height:54px; border:1px solid #f0ca72; color:#112536; background:#fff3d2; font-weight:800; }
.suspect-crates button[aria-checked="true"] { background:#ffd05f; box-shadow:inset 0 0 0 3px #6e4a14; }

.memory-route { max-width:900px; margin:auto; }
.memory-fragments { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.memory-fragments button { position:relative; min-height:220px; display:grid; grid-template-rows:90px auto auto; gap:6px; padding:12px; border:1px solid #6f7659; color:#18372b; background:#fff4d9; text-align:left; }
.memory-fragments button[aria-pressed="true"] { background:#ffdc7f; box-shadow:inset 0 0 0 3px #65501d; }
.fragment-order { position:absolute; top:7px; right:7px; width:32px; height:32px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#173e4e; font-weight:800; }
.fragment-art { display:block; border:1px solid #70806e; background-color:#b8d3a5; background-position:center; background-repeat:no-repeat; }
.fragment-peak { background-image:linear-gradient(135deg,transparent 45%,#566a63 46% 54%,transparent 55%),linear-gradient(45deg,transparent 45%,#405c55 46% 54%,transparent 55%); }
.fragment-waterfall { background-image:linear-gradient(90deg,transparent 38%,#d9f7ff 39% 61%,transparent 62%),linear-gradient(#668c6c 45%,#7dc5d0 46%); }
.fragment-fossil { background-image:radial-gradient(circle at 50% 50%,transparent 18%,#80633c 19% 25%,transparent 26% 36%,#80633c 37% 43%,transparent 44%); }
.fragment-cave { background-image:radial-gradient(ellipse at 50% 80%,#17394c 0 35%,#526a58 36% 50%,transparent 51%),linear-gradient(#6e8c6b,#b8d3a5); }
.memory-fragments b { font-size:21px; }.memory-fragments small { font:15px/1.3 Georgia,serif; }
.scanner-puzzle { gap:22px; }
.scanner-puzzle>section { padding:14px; border:1px solid #657b65; background:#edf0dc; }
.scanner-puzzle h3 { display:flex; align-items:center; justify-content:center; gap:9px; font-size:24px; }
.scanner-puzzle h3>span { width:34px; height:34px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#31576d; }
.scanner-puzzle section>p { margin:0 0 12px; text-align:center; }
.scanner-workbench { display:grid; grid-template-columns:1fr 1.1fr; gap:15px; }
.scanner-modules { display:grid; grid-template-columns:1fr; gap:8px; }
.scanner-module { min-height:76px; display:grid; grid-template-columns:70px 1fr 48px; grid-template-rows:auto auto; align-items:center; padding:9px; border:1px solid #596d62; color:#163127; background:#fff8e7; text-align:left; }
.scanner-module .module-code { grid-row:1/3; font-weight:800; }.scanner-module small { grid-column:2; }.connector-mark { display:block; justify-self:center; width:28px; height:28px; border:4px solid #31576d; background:#fff8e7; }
.connector-mark.rund { border-radius:50%; }.connector-mark.eckig { border-radius:2px; }.connector-mark.dreieckig { width:0; height:0; border:16px solid transparent; border-bottom:28px solid #31576d; background:transparent; transform:translateY(-8px); }
.scanner-device { padding:14px; border:5px solid #d19a34; background:#17394c; }
.scanner-screen { display:flex; justify-content:space-between; margin-bottom:13px; padding:11px; color:#bceee7; background:#0a252d; font-weight:800; }
.scanner-sockets { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.scanner-sockets button { min-height:92px; display:grid; place-items:center; border:1px solid #a5bbc2; color:#ecf4e8; background:#294b5b; }
.scanner-sockets .connector-mark { background:#294b5b; border-color:#ffd364; }
.scanner-sockets .connector-mark.dreieckig { border-bottom-color:#ffd364; border-left-color:transparent; border-right-color:transparent; border-top-color:transparent; }
.maze-brief { display:flex; justify-content:space-between; gap:12px; margin-bottom:10px; padding:11px 14px; color:#f8eed9; background:#234553; }
.maze-layout { display:grid; grid-template-columns:1fr 150px; gap:12px; }
.maze-cell { position:relative; }
.maze-cell small { display:block; font-size:10px; }.maze-cell.player b { font-size:13px; }
.maze-legend { padding:12px; border:1px solid #8e744f; background:#fff3d7; }
.maze-legend p { display:flex; align-items:center; gap:8px; margin:0 0 10px; font-weight:700; }
.maze-legend i { width:25px; height:25px; border:1px solid #6f624b; }.legend-free { background:#fff4d8; }.legend-wall { background:#243d3d; }.legend-trail { background:#dbeaa7; }
.direction-pad { grid-template-columns:repeat(3,56px); grid-template-rows:repeat(2,56px); }
.direction-pad .up { grid-column:2; }.direction-pad .left { grid-column:1; grid-row:2; }.direction-pad .down { grid-column:2; grid-row:2; }.direction-pad .right { grid-column:3; grid-row:2; }
.matching-board { grid-template-columns:.9fr 1.3fr; }
.matching-board>div { align-content:start; }.matching-board h3 { margin:0 0 8px; font-size:21px; }
.matching-board button { grid-template-columns:64px 1fr; min-height:84px; }
.matching-board svg { width:52px; height:52px; fill:none; stroke:#17394c; stroke-width:4; stroke-linecap:round; stroke-linejoin:round; }
.animal-options { grid-template-columns:repeat(2,1fr); }.animal-options h3 { grid-column:1/-1; }
.animal-card { text-align:center !important; }.animal-card .animal-name { font-size:19px; font-weight:800; }.animal-card small { grid-column:1/-1; }
.pattern-puzzle { grid-template-columns:repeat(3,1fr); align-items:start; }
.pattern-puzzle section { padding:11px; border:1px solid #9a7f59; background:#eef0df; }
.pattern-puzzle h3 { margin:0 0 8px; font-size:20px; }
.pattern-puzzle section>p { min-height:80px; display:grid; place-items:center; margin:0 0 9px; padding:9px; border:1px solid #a58a5f; background:#fff4d8; font-size:17px; font-weight:800; }
.pattern-puzzle .answer-row { margin-top:0; }.pattern-puzzle .answer-row button { min-width:0; }
.placement-instruction { text-align:center; }
.module-bank button,.module-slot { min-height:118px; }
.piece-connector { display:block; width:64px; height:12px; margin:0 auto 8px; border:2px solid #31576d; border-radius:3px; background:repeating-linear-gradient(90deg,#ffd364 0 8px,#31576d 8px 11px); }
.module-bank button>b { font-size:20px; }.module-bank button>small { display:block; margin-top:4px; }
.socket-mark { display:block; min-height:30px; color:#31576d; font:700 14px/1.25 Georgia,serif; }
.module-slot.is-empty b { opacity:.65; font-size:17px; }
.measurement-task>.puzzle-instruction { text-align:center; }
.measurement-grid button svg { width:100%; height:78px; background:#e9f0ed; }
.measurement-grid polyline { fill:none; stroke-width:5; stroke-linecap:round; stroke-linejoin:round; }.warm-line { stroke:#b45d32; }.light-line { stroke:#236a7b; }
.measurement-grid button>span { display:flex; align-items:center; gap:7px; }.measurement-grid i { width:18px; height:4px; }.warm-key { background:#b45d32; }.light-key { background:#236a7b; }

@media(max-width:1000px) {
  .paper.map-mission { right:24px; }
  .track-stages { grid-template-columns:repeat(2,1fr); }
  .pattern-puzzle { grid-template-columns:1fr; }
  .case-overview { grid-template-columns:1fr 1fr; }.case-overview .missing-note { display:none; }
}
@media(max-width:900px) {
  .adventure-stage.has-selection .world-map { filter:brightness(.5); }
  .paper.map-mission { position:absolute; top:50%; right:50%; width:min(520px,calc(100% - 30px)); display:flex; transform:translate(50%,-50%); }
  .compact-briefing .lab-photo { max-width:none; }
  .inventory-investigation,.manifest-puzzle,.scanner-workbench,.maze-layout { grid-template-columns:1fr; }
  .maze-legend { display:flex; flex-wrap:wrap; justify-content:center; }.maze-legend p { margin:0 8px; }
  .chapter-findings { grid-template-columns:1fr; }
}
@media(max-width:600px) {
  .adventure-stage { padding:10px 5px; }
  .adventure-stage:not(.has-selection) .world-map,.adventure-stage.has-selection .world-map { width:100%; aspect-ratio:1.05; }
  .place-label { padding:7px 10px; }
  .paper.map-mission { max-height:calc(100% - 18px); padding:28px 22px 20px; }
  .track-stages,.scan-tools,.memory-fragments,.evidence-options,.case-overview { grid-template-columns:1fr; }
  .crate-grid { grid-template-columns:1fr; }
  .inventory-photo { max-width:330px; margin:auto; }
  .scanner-sockets { grid-template-columns:repeat(3,1fr); }
  .scanner-sockets button { min-width:0; }
  .matching-board { grid-template-columns:1fr; }.animal-options { grid-template-columns:repeat(2,1fr); }
  .case-status { flex-direction:column; }.timeline-list article { grid-template-columns:1fr; gap:3px; }
  .chapter-tools { justify-content:stretch; }.chapter-tools .tool-button { flex:1 1 140px; }
  .difference-investigation { grid-template-columns:1fr; }
  .difference-investigation img { height:auto; aspect-ratio:1.7; }
}

/* Reference rebuild: Mission A proportions are the shared desktop contract. */
.compact-briefing .lab-photo {
  width:100%;
  max-width:none;
  align-self:center;
}
.chapter-one .quest-playfield,
.chapter-later .quest-playfield {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:#f3ead8;
}
.chapter-one .quest-playfield::before,
.chapter-later .quest-playfield::before {
  content:'';
  position:absolute;
  inset:0;
  z-index:-1;
  background-image:linear-gradient(#f8edda75,#f8edda75),var(--daily-scene);
  background-position:center;
  background-size:cover;
  filter:saturate(.9);
}

@media(min-width:1251px) {
  .mission-paper.chapter-one,
  .mission-paper.chapter-later {
    display:grid;
    grid-template-rows:220px minmax(0,1fr);
    width:1180px;
    height:770px;
    min-height:0;
    padding:22px 48px 24px;
    overflow:hidden;
  }
  .mission-paper.chapter-one .compact-briefing,
  .mission-paper.chapter-later .compact-briefing {
    height:220px;
    margin:0;
    gap:42px;
  }
  .compact-briefing .lab-photo.polaroid {
    height:208px;
    padding:8px 8px 24px;
  }
  .compact-briefing .lab-photo .photo-window {
    height:100%;
    aspect-ratio:auto;
  }
  .compact-briefing .lab-photo img {
    height:100%;
    aspect-ratio:auto;
  }
  .compact-briefing .letter-copy {
    height:100%;
    align-content:center;
  }
  .compact-briefing .salutation {
    margin-bottom:4px;
    font-size:38px;
  }
  .compact-briefing .letter-text {
    font-size:22px;
    line-height:1.25;
  }
  .compact-briefing .signature {
    font-size:34px;
    margin-block:4px;
  }
  .compact-briefing .wax-seal {
    width:82px;
    height:82px;
  }
  .mission-paper.chapter-one .quest-panel,
  .mission-paper.chapter-later .quest-panel {
    min-height:0;
    padding-top:4px;
  }
  .mission-paper.chapter-one form,
  .mission-paper.chapter-later form {
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto auto auto;
    width:100%;
    height:100%;
    align-content:stretch;
  }
  .mission-paper.chapter-later form {
    grid-template-rows:auto auto minmax(0,1fr) auto auto auto;
  }
  .mission-paper.chapter-one form>h2,
  .mission-paper.chapter-later form>h2 {
    margin:0 0 6px;
    font-size:30px;
  }
  .mission-paper.chapter-one .quest-playfield,
  .mission-paper.chapter-later .quest-playfield {
    min-height:0;
    padding:10px 12px;
  }
  .mission-paper.chapter-one .chapter-tools,
  .mission-paper.chapter-later .chapter-tools {
    margin:8px 0 2px;
  }
  .mission-paper.chapter-one .feedback-space,
  .mission-paper.chapter-later .feedback-space {
    min-height:20px;
  }
  .mission-paper.chapter-one .check-answer,
  .mission-paper.chapter-later .check-answer {
    min-height:54px;
    margin-top:2px;
    font-size:28px;
  }

  .track-case-note { padding:8px 14px; }
  .track-stages { gap:8px; }
  .track-stages li { padding:8px; }
  .track-stages h3 { margin-bottom:6px; font-size:17px; }
  .track-stages button { min-height:48px; padding:5px 7px; }
  .track-stages button b { font-size:17px; }
  .track-stages button span { font-size:13px; }

  .day-8 .scanner-puzzle {
    grid-template-columns:1.35fr .65fr;
    width:100%;
    gap:10px;
  }
  .day-8 .scanner-puzzle>section { padding:8px; }
  .day-8 .scanner-puzzle h3 { font-size:18px; }
  .day-8 .scanner-puzzle h3>span { width:26px; height:26px; }
  .day-8 .scanner-puzzle section>p { margin-bottom:6px; font-size:13px; }
  .day-8 .scanner-workbench { gap:8px; }
  .day-8 .scanner-modules { gap:5px; }
  .day-8 .scanner-module { min-height:49px; grid-template-columns:48px 1fr 34px; padding:3px 7px; }
  .day-8 .scanner-module .connector-mark { scale:.72; }
  .day-8 .scanner-device { padding:8px; border-width:3px; }
  .day-8 .scanner-screen { margin-bottom:7px; padding:7px; }
  .day-8 .scanner-sockets { gap:5px; }
  .day-8 .scanner-sockets button { min-height:54px; padding:3px; }
  .day-8 .sequence-cards { grid-template-columns:1fr; gap:5px; }
  .day-8 .sequence-cards button { min-height:52px; grid-template-columns:40px 1fr; padding:3px; }
  .day-8 .sequence-cards button>span { font-size:24px; }
  .day-8 .sequence-cards button>b { font-size:16px; }

  .day-9 .maze-game { display:grid; grid-template-columns:minmax(0,1fr) 210px; grid-template-rows:auto minmax(0,1fr) auto; gap:8px 14px; width:min(790px,100%); }
  .day-9 .maze-brief { grid-column:1/-1; margin:0; padding:7px 10px; }
  .day-9 .maze-layout { grid-row:2/4; grid-template-columns:1fr 120px; gap:8px; min-height:0; }
  .day-9 .maze-grid { width:360px; padding:6px; }
  .day-9 .maze-cell { min-height:38px; aspect-ratio:auto; }
  .day-9 .maze-legend { padding:7px; }
  .day-9 .maze-legend p { margin-bottom:6px; font-size:12px; }
  .day-9 .maze-legend i { width:18px; height:18px; }
  .day-9 .direction-pad { grid-column:2; grid-row:2; align-self:center; grid-template-columns:repeat(3,48px); grid-template-rows:repeat(2,48px); gap:6px; margin:0; }
  .day-9 .direction-pad button { min-width:44px; min-height:44px; }
  .day-9 .selection-readout { grid-column:2; grid-row:3; margin:0; }

  .day-7 .memory-fragments button { min-height:190px; grid-template-rows:70px auto auto; padding:8px; }
  .day-7 .memory-fragments b { font-size:18px; }
  .day-7 .memory-fragments small { font-size:13px; }

  .day-10 .matching-board { display:grid; grid-template-columns:1fr; gap:8px; width:min(940px,100%); }
  .day-10 .matching-board>div { gap:6px; }
  .day-10 .track-sources { grid-template-columns:repeat(3,1fr); }
  .day-10 .animal-options { grid-template-columns:repeat(5,1fr); }
  .day-10 .matching-board h3 { grid-column:1/-1; margin:0; text-align:center; }
  .day-10 .matching-board button { min-height:70px; display:grid; grid-template-columns:44px 1fr; padding:4px 7px; }
  .day-10 .animal-options button { grid-template-columns:1fr; place-items:center; }
  .day-10 .matching-board svg { width:40px; height:40px; }
  .day-10 .animal-card .animal-name { font-size:16px; }
  .day-10 .matching-board small { font-size:11px; }

  .day-11 .memory-grid { gap:6px; }
  .day-11 .memory-grid button { min-height:66px; height:66px; aspect-ratio:auto; }
  .day-11 .memory-grid span { font-size:25px; }

  .day-14 .machine-schematic span,
  .day-14 .machine-schematic button { min-height:58px; padding:4px; }
  .day-14 .machine-schematic b { font-size:22px; }

  .day-13 .module-bank button,
  .day-13 .module-slot,
  .day-16 .module-bank button,
  .day-16 .module-slot { min-height:82px; padding:6px; }
  .day-16 .module-bank button,
  .day-16 .module-slot { height:76px; min-height:0; padding:3px; }
  .day-16 .placement-instruction { padding:6px; font-size:15px; }
  .day-16 .module-bank button>small,
  .day-16 .module-slot small,
  .day-16 .socket-mark { font-size:10px; line-height:1.1; }
  .day-13 .piece-connector,
  .day-16 .piece-connector { margin-bottom:3px; }
  .day-13 .module-bank button>b,
  .day-16 .module-bank button>b { font-size:17px; }
  .day-13 .module-bank button>small,
  .day-16 .module-bank button>small { font-size:12px; }

  .day-17 .connect-rounds { gap:8px; }
  .day-17 .connect-rounds>section { padding:7px; }
  .day-17 .connect-rounds h3 { margin-bottom:5px; font-size:15px; }
  .day-17 .connect-board { gap:4px; padding:7px; }
  .day-17 .connect-board span { height:42px; aspect-ratio:auto; font-size:12px; }
  .day-17 .connect-rounds .answer-row { gap:3px; margin-top:5px; }
  .day-17 .connect-rounds .answer-row button { min-height:34px; padding:3px; }

  .day-21 .point-board { width:min(600px,100%); aspect-ratio:3.4; }
  .day-21 .number-dot { width:34px; height:34px; }
  .day-21 .figure-choices { margin-top:6px; }
  .day-21 .figure-choices button { min-height:62px; padding:3px 8px; }
  .day-21 .figure-choices svg { width:58px; height:34px; }

  .day-22 .network-route { width:min(650px,100%); aspect-ratio:3; }
  .day-22 .network-route button { width:64px; height:44px; }

  .day-23 .general-check { gap:7px; }
  .day-23 .general-check>section { padding:6px; }
  .day-23 .general-check .sequence-cards button { min-height:40px; padding:3px; }
  .day-23 .general-check .sequence-cards button>span { font-size:18px; }
  .day-23 .general-check .sequence-cards button>b { font-size:14px; }
  .day-23 .general-check .sequence-cards small { min-height:0; font-size:10px; }
  .day-23 .general-check .measurement-grid button { min-height:42px; padding:3px; }
  .day-23 .general-check .measurement-grid b { font-size:18px; }
  .day-23 .general-check .answer-row button { min-height:38px; padding:4px 7px; }

  .day-24 .final-controls { gap:12px; }
  .day-24 .final-controls section { padding:8px; }
  .day-24 .final-controls h3 { margin-bottom:6px; }
  .day-24 .measurement-card,
  .day-24 .signal-card { margin-bottom:6px; padding:7px; }
  .day-24 .answer-row { gap:6px; margin-top:5px; }
  .day-24 .answer-row button { min-height:40px; padding:4px 8px; }
  .day-24 .heat-levels button { min-height:68px; }
}

/* KB-ADV-005 / bauer-4: gemeinsamer Missionsrahmen der Tage 02-24 gegen die v2-Referenzen.
   Nur Rahmen (Banner, Phasenleiste, Brief, Polaroid, Werkzeugzeile, Hauptknopf, Fusszeile). Spielfelder und Tagesdateien bleiben unberuehrt. */

/* Banner: Datumsband | Trennstrich | Phasenleiste */
.mission-banner:has(.compact-steps) h1 { font-size:clamp(34px,3.9vw,60px); }
.mission-banner:has(.compact-steps) .date { font-size:clamp(20px,1.65vw,25px); }
.compact-steps { position:relative; }
.compact-steps li[aria-current]:not(:last-child)::after { background:linear-gradient(90deg,#ffce52,#8297ac); }
.compact-steps li[aria-current]>span { box-shadow:0 0 14px #ffce5299; }
.compact-steps li[aria-current]>span svg { color:#071629; }
@media (min-width:1251px) {
  .mission-banner:has(.compact-steps) { padding-right:3.4%; }
  .mission-banner:has(.compact-steps) .compact-steps { width:620px; min-width:0; flex:0 0 620px; }
  .compact-steps::before { content:''; position:absolute; left:-26px; top:-2px; height:62px; width:2px; background:#b7c3d1b0; }
}

/* Brief: Polaroid mit Stahlklammer, eigene Brieftext-Groessen */
.compact-briefing .lab-photo.polaroid::before { content:none; }
.compact-briefing .lab-photo figcaption { display:none; }
.compact-briefing .lab-photo.polaroid { padding:9px; transform:rotate(-3.4deg); transform-origin:50% 60%; box-shadow:3px 9px 16px #24170866; }
.compact-briefing .lab-photo>img.paperclip { position:absolute; z-index:3; left:15%; top:-40px; width:52px; height:78px; aspect-ratio:auto; clip-path:none; transform:none; filter:drop-shadow(1px 3px 2px #1a120866); pointer-events:none; }
.compact-briefing .lab-photo .photo-window { aspect-ratio:2.1; }
.compact-briefing .letter-text { letter-spacing:0; }
.compact-briefing .letter-text strong { font-weight:700; }
@media (min-width:1251px) {
  .compact-briefing { grid-template-columns:490px minmax(0,1fr); gap:44px; }
  .compact-briefing .lab-photo.polaroid { width:480px; max-width:none; height:196px; margin:-8px 0 0 -10px; padding:9px; transform:rotate(-3deg); }
  .compact-briefing .salutation { font-size:38px; margin:0 0 4px; line-height:1.05; } /* Brief muss in die feste 220px-Zeile passen (Regie) */
  .compact-briefing .letter-text { font-size:25px; line-height:1.2; }
  .compact-briefing .signature { font-size:40px; margin-block:0; line-height:1.05; }
  .compact-briefing .letter-copy { grid-template-columns:minmax(0,1fr) 92px; }
  .compact-briefing .wax-seal { width:92px; height:92px; }
  .compact-briefing .letter-copy.is-long .letter-text { font-size:22px; line-height:1.18; }
  .compact-briefing .letter-copy.is-long .salutation { font-size:34px; }
  .compact-briefing .letter-copy.is-tight .letter-text { font-size:20px; line-height:1.15; }
  .compact-briefing .letter-copy.is-tight .salutation { font-size:30px; }
  .compact-briefing .letter-copy.is-tight .signature { font-size:34px; }
}
@media (max-width:1250px) {
  .compact-briefing .lab-photo.polaroid { max-width:min(520px,94%); margin-top:20px; }
  .compact-briefing .letter-text { font-size:clamp(21px,2.3vw,26px); }
}
@media (max-width:700px) {
  .compact-briefing .lab-photo.polaroid { max-width:92%; margin-inline:auto; }
  .compact-briefing .lab-photo>img.paperclip { width:42px; height:63px; top:-30px; }
}

/* Welt-Zeile gibt es in der Referenz nicht; fuer Vorlesegeraete bleibt sie erhalten */
.quest-panel .world-label { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }

/* Werkzeugzeile: Vorlesen + Hinweis links, gelber Hauptknopf mit Play-Dreieck rechts daneben */
.chapter-tools .tool-button { font-size:22px; min-height:50px; padding-inline:14px; min-width:0; border-radius:14px; border-width:2px; gap:10px; }
.chapter-tools .tool-button svg { width:28px; height:28px; }
.primary .play-icon { width:28px; height:28px; fill:currentColor; stroke:none; }
@media (min-width:1251px) {
  /* Tage 7, 10, 14, 16, 17, 23 legen ihre Werkzeugzeile in styles/days/ selbst fest und sind hier ausgenommen. */
  .mission-paper:is(.chapter-one,.chapter-later):not(.day-7,.day-10,.day-14,.day-16,.day-17,.day-23) form { grid-template-columns:max-content minmax(0,1fr); grid-template-rows:auto minmax(0,1fr) auto auto; column-gap:34px; }
  .mission-paper:is(.chapter-one,.chapter-later):not(.day-7,.day-10,.day-14,.day-16,.day-17,.day-23) form>* { grid-column:1 / -1; }
  .mission-paper:is(.chapter-one,.chapter-later):not(.day-7,.day-10,.day-14,.day-16,.day-17,.day-23) .feedback-space { order:1; }
  .mission-paper:is(.chapter-one,.chapter-later):not(.day-7,.day-10,.day-14,.day-16,.day-17,.day-23) .chapter-tools { order:2; grid-column:1; display:flex; justify-content:flex-start; align-self:center; gap:18px; margin:6px 0 0; }
  .mission-paper:is(.chapter-one,.chapter-later):not(.day-7,.day-10,.day-14,.day-16,.day-17,.day-23) .check-answer { order:3; grid-column:2; justify-self:start; width:460px; max-width:100%; min-height:62px; margin:6px 0 0 24px; font-size:36px; }
}
@media (max-width:1250px) {
  .chapter-tools { flex-wrap:wrap; }
}

/* Fusszeile unter dem Papier: Satz zwischen zwei feinen Linien mit Fussspur */
.footer-line { display:flex; align-items:center; justify-content:center; gap:20px; width:min(900px,calc(100% - 32px)); margin:14px auto 8px; font-size:clamp(20px,1.75vw,26px); line-height:1.15; text-shadow:0 2px 4px #000c; }
.footer-line .footprints { width:46px; height:46px; fill:#f6d596; stroke:none; filter:drop-shadow(0 1px 2px #0008); }
.footer-rule { flex:1 1 40px; max-width:200px; height:2px; background:linear-gradient(90deg,#0000,#f2e6c8cc 25%,#f2e6c8cc 75%,#0000); }
.footer-line.is-silent { margin:0; height:0; }
.footer-line.is-solved .footprints { fill:#7ed6a2; }
.prototype-note { padding:6px 20px 10px; font-size:11px; opacity:.55; }
@media (max-width:700px) { .footer-line { gap:12px; text-align:center; } .footer-line .footprints { width:32px; height:32px; } }

/* KB-ADV-005 / bauer-11: Rahmenbefunde Tage 02-24 (Kapitelwelten, Titel, Polaroid, Brief, Werkzeugzeile, Hinweis). */

/* Kapitelwelt: Seitenhintergrund je Kapitel (body[data-world] setzt render() in main.js); Kapitel 1, Kalender und Akte bleiben Winter. */
body[data-world="dino"]::before { background-image: url('assets/plates/dino-island-camp.webp'); }
body[data-world="brick"]::before { background-image: url('assets/plates/brick-factory.webp'); }
body[data-world="polar"]::before { background-image: url('assets/plates/polar-archive.webp'); }

/* Titel einzeilig, Phasenleiste flexibel, Abstand zur Trennlinie */
@media (min-width:1251px) {
  .mission-banner:has(.compact-steps) { gap: 56px; }
  .mission-banner:has(.compact-steps) .title-and-date { flex: 0 0 auto; }
  .mission-banner:has(.compact-steps) h1 { white-space: nowrap; text-wrap: nowrap; font-size: clamp(34px, 3.6vw, 56px); }
  .mission-banner.title-s1:has(.compact-steps) h1 { font-size: 48px; }
  .mission-banner.title-s2:has(.compact-steps) h1 { font-size: 42px; }
  .mission-banner.title-s3:has(.compact-steps) h1 { font-size: 36px; }
  .mission-banner:has(.compact-steps) .compact-steps { width: auto; min-width: 440px; flex: 0 1 560px; }
}

/* Datumsticket unverzerrt: Ecken bleiben, nur die Kanten dehnen sich */
.date::before { inset: -9px -16px; border: 18px solid transparent; border-image: url('assets/plates/number-ticket.webp') 70 fill / 18px stretch; background: none; }

/* Polaroid: Foto aus der Referenz, ca. 500 x 232, Klammer sichtbar unter der Papierkante */
.compact-briefing .letter-text { max-width: 24em; }
@media (min-width:1251px) {
  .compact-briefing { grid-template-columns: 510px minmax(0, 1fr); gap: 40px; }
  .compact-briefing .lab-photo.polaroid { width: 500px; height: 216px; margin: -4px 0 0 -6px; }
  .compact-briefing .lab-photo > img.paperclip { top: -16px; left: 6%; }
}
@media (max-width:1250px) { .compact-briefing .lab-photo > img.paperclip { top: -22px; left: 6%; } }

/* Werkzeugzeile als Ganzes mittig: Vorlesen + Hinweis, daneben der Hauptknopf */
@media (min-width:1251px) {
  .mission-paper:is(.chapter-one,.chapter-later):not(.day-6,.day-7,.day-8,.day-10,.day-14,.day-16,.day-17,.day-23) form { grid-template-columns: minmax(0,1fr) max-content minmax(0,460px) minmax(0,1fr); column-gap: 0; }
  .mission-paper:is(.chapter-one,.chapter-later):not(.day-6,.day-7,.day-8,.day-10,.day-14,.day-16,.day-17,.day-23) .chapter-tools { grid-column: 2; margin: 6px 34px 0 0; }
  .mission-paper:is(.chapter-one,.chapter-later):not(.day-6,.day-7,.day-8,.day-10,.day-14,.day-16,.day-17,.day-23) .check-answer { grid-column: 3; margin: 6px 0 0; }
}
.read-aloud[aria-pressed="true"] { background: #ffe6a6; }

/* "Auswahl löschen": kleiner Textlink rechts unten im Papier, 44 px Trefferfläche, per Tastatur erreichbar */
.clear-link { min-width: 44px; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: #4e3d28; font-size: 17px; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width:1251px) { .mission-paper .clear-link { position: absolute; right: 36px; bottom: 0; } }
@media (max-width:1250px) { .clear-link { display: block; margin: 6px auto 0; } }

/* Prototyp-Hinweis: unauffällig unter dem Papier, lesbar (Kontrast > 4,5:1); auf Desktop entfällt er, damit das Papier samt Fußzeile ohne Scrollen passt */
.prototype-note { opacity: 1; color: #d6cab2; font-size: 13px; }
@media (min-width:1251px) { .prototype-note { display: none; } }

/* Fußzeile lesbar auf den Kapitelwelten */
.footer-line { padding: 6px 28px; background: radial-gradient(ellipse at center, #050d17cc 40%, #050d1700 100%); }
@media (min-width:1251px) { .footer-line { margin: 8px auto 4px; } }

/* WCAG 1.4.12: Brieftext darf bei vergroessertem Textabstand wachsen (normal bleibt die Zeile 220 px; fitBriefing misst gegen 220) */
@media (min-width:1251px) {
  .mission-paper.chapter-one:not(.day-7,.day-10,.day-17,.day-23), .mission-paper.chapter-later:not(.day-7,.day-10,.day-17,.day-23) { grid-template-rows: minmax(220px, auto) minmax(0, 1fr); }
  .mission-paper.chapter-one:not(.day-7,.day-10,.day-17,.day-23) .compact-briefing, .mission-paper.chapter-later:not(.day-7,.day-10,.day-17,.day-23) .compact-briefing { height: auto; min-height: 220px; }
}

/* Kalenderseite (KB-ADV-011, Karte B "Schatzkarte auf dem Detektivtisch"): die 24 Kreise sind im Kartenbild gemalt (1536x1024);
   die Tuerchen sind echte Knoepfe genau auf den Kreisen (Mittelpunkte und Durchmesser aus calendar-logic.mjs, Prozent der Karte). Eigene Klassen cal-*. */
body:has(.cal) .nav-button[aria-current] { background:#071524ce; color:var(--nav-gold); border-color:#ffcc55; box-shadow:0 0 0 2px #926c31; }
.cal { --mh:max(560px,calc(100svh - 108px)); display:flex; justify-content:center; padding:10px clamp(8px,1.6vw,32px) 8px; }
.cal-board { width:min(100%,calc(var(--mh)*1.5)); }
.cal-stage { position:relative; }
.cal-map { position:relative; overflow:hidden; aspect-ratio:1536/1024; container-type:inline-size; -webkit-mask-image:linear-gradient(90deg,transparent,#000 3.5%,#000 96.5%,transparent),linear-gradient(180deg,transparent,#000 5%,#000 95%,transparent); -webkit-mask-composite:source-in; mask-image:linear-gradient(90deg,transparent,#000 3.5%,#000 96.5%,transparent),linear-gradient(180deg,transparent,#000 5%,#000 95%,transparent); mask-composite:intersect; }
.cal-art { display:block; width:100%; height:100%; object-fit:cover; }
.cal-doors { display:none; }
.cal-dot { display:none; }

/* Nebel: vier gemalte Nebelschleier (Codex), je einer ueber einem Kapitelbereich; Lage und Groesse als Prozentbox aus calendar-logic.mjs */
.cal-fog { position:absolute; z-index:2; pointer-events:none; background:center/100% 100% no-repeat; animation:cal-drift 42s ease-in-out infinite alternate; }
.fog-0 { background-image:url('assets/calendar/nebel-zentrale.webp'); } .fog-1 { background-image:url('assets/calendar/nebel-dino.webp'); animation-delay:-9s; }
.fog-2 { background-image:url('assets/calendar/nebel-fabrik.webp'); animation-delay:-17s; } .fog-3 { background-image:url('assets/calendar/nebel-polar.webp'); animation-delay:-26s; }
.cal-fog.is-lifting { animation:cal-lift 1.9s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes cal-drift { from { translate:-1.2% 0; } to { translate:1.2% .8%; } }
@keyframes cal-lift { 0%,12% { opacity:1; } 100% { opacity:0; scale:1.14; translate:2% -3%; visibility:hidden; } }
.cal-lock { width:.95em; height:.95em; stroke-width:2.2; }

/* Tuerchen = die gemalten Kreise: --d ist der Kreisdurchmesser (px, aus der gemessenen Kartenbreite), Trefferflaeche mindestens 44 px; Mitte per translate-Eigenschaft (kein transform) */
.cal-door { position:absolute; z-index:4; display:grid; place-items:center; width:max(44px,var(--d)); height:max(44px,var(--d)); translate:-50% -50%; padding:0; border:0; border-radius:50%; background:none; color:#5a3512; }
.cal-disc { position:absolute; left:50%; top:50%; width:var(--d); height:var(--d); translate:-50% -50%; border-radius:50%; transition:box-shadow 180ms ease,background-color 180ms ease; }
.cal-door-num { position:relative; top:.04em; font:700 calc(var(--d)*.54)/1 'Roboto Condensed',sans-serif; font-variant-numeric:lining-nums tabular-nums; letter-spacing:-.01em; text-shadow:0 1px 0 #fff5d8aa; pointer-events:none; }
.cal-door.is-gesperrt .cal-disc { background:#4a3a2a85; box-shadow:inset 0 0 0 1px #2c1f1455; }
.cal-door.is-gesperrt .cal-door-num { color:#f4e6c6; text-shadow:0 1px 1px #000a; }
.cal-door.is-fogged.is-offen .cal-disc { background:#fff3d2e8; box-shadow:0 0 0 2px #e5b54a,0 0 12px 2px #fff1c6; }
.cal-door.is-fogged.is-gesperrt .cal-disc { background:#ece3cfc4; box-shadow:0 0 0 1px #6f6150; }
.cal-door.is-fogged.is-gesperrt .cal-door-num { color:#3a2814; text-shadow:0 1px 0 #fff9; }
.cal-door.is-today .cal-disc { box-shadow:0 0 0 2px #ffe08a,0 0 12px 3px #ffb43a99; animation:cal-glow 3.2s ease-in-out infinite; }
.cal-door.is-today .cal-door-num { color:#8a1c10; }
.cal-door.is-selected .cal-disc { box-shadow:0 0 0 3px #fff,0 0 14px 4px #ffd46d; }
@keyframes cal-glow { 50% { box-shadow:0 0 0 3px #fff0b0,0 0 20px 7px #ffb43acc; } }
.cal-badge { position:absolute; right:-24%; bottom:-12%; display:grid; place-items:center; width:calc(var(--d)*.46); height:calc(var(--d)*.46); border-radius:50%; background:#3b2c1c; color:#f6e3b8; box-shadow:0 1px 3px #000a,0 0 0 1px #f6e3b866; pointer-events:none; }
.cal-badge svg { width:66%; height:66%; stroke-width:2.4; }
.cal-seal { position:absolute; right:-22%; top:-30%; width:calc(var(--d)*.78); height:calc(var(--d)*.78); filter:drop-shadow(0 2px 2px #0008); pointer-events:none; }
.cal-seal img { display:block; width:100%; height:100%; object-fit:contain; }
.cal-check { position:absolute; left:20%; top:16%; width:60%; height:60%; stroke:#ffe9a8; stroke-width:3.400; filter:drop-shadow(0 1px 0 #5a0d0a); }
.cal-door:focus-visible { outline:none; }
.cal-door:focus-visible .cal-disc { outline:3px solid #fff; outline-offset:3px; box-shadow:0 0 0 3px #0b2a48,0 0 0 8px #fff0; }
@media (hover:hover) { .cal-door:hover .cal-disc { box-shadow:0 0 0 3px #fff8,0 0 14px 3px #ffd46dbb; } .cal-door.is-gesperrt:hover .cal-disc { box-shadow:0 0 0 2px #fff7; } }

/* Overlay: gemaltes Papier ueber der Karte, Karte dahinter abgedunkelt */
.cal-map[inert] { filter:brightness(.5) saturate(.8); transition:filter 220ms ease; }
.cal-overlay { position:absolute; inset:0; z-index:6; display:grid; place-items:center; padding:2.5%; animation:cal-fade 160ms ease-out; }
.cal-card.paper { position:relative; width:min(660px,100%); max-height:100%; margin:0; padding:30px 34px 28px; display:flex; flex-direction:column; animation:cal-rise 220ms cubic-bezier(.16,1,.3,1); }
.cal-card.paper::before { inset:-4px; filter:drop-shadow(0 14px 22px #000a); }
.cal-scroll { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; min-height:0; overflow-y:auto; overflow-x:hidden; padding:8px 10px 10px; margin:-8px -10px -10px; scrollbar-width:thin; scrollbar-color:#b18437 transparent; }
.cal-scroll>* { grid-column:1; grid-row:auto; }
.cal-close { position:absolute; right:10px; top:6px; z-index:2; width:48px; height:48px; border:0; border-radius:50%; background:#f3e3c0; color:#4a3722; font:700 34px/1 Georgia,serif; box-shadow:0 0 0 2px #b18437,0 2px 5px #0006; cursor:pointer; }
.cal-close:focus-visible { outline:3px solid #123f67; outline-offset:2px; }
.cal-card-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding-right:52px; }
.cal .mission-tab { margin:0; font-size:clamp(22px,1.9vw,30px); padding:3px 14px; }
.cal-chip { display:inline-flex; white-space:nowrap; align-items:center; min-height:30px; padding:2px 12px; border-radius:6px; font:700 15px/1 'Roboto Condensed',sans-serif; letter-spacing:.06em; text-transform:uppercase; color:#111a24; background:#f5b921; box-shadow:0 1px 0 #fff8 inset,0 2px 4px #0005; }
.cal-chip.is-geloest { background:#2f6b4a; color:#f4ffe9; }
.cal-chip.is-gesperrt { background:#51657a; color:#f2f7fb; }
.cal-chip.is-today { background:#a02822; color:#fff6e2; }
.cal-card h2 { margin:0; padding:0 0 8px; border-bottom:3px solid #b18437; font:700 clamp(24px,2.1vw,34px)/1.15 Georgia,serif; outline:none; }
.cal-chapter { margin:0; font:italic 18px/1.3 Georgia,serif; color:#4a3722; }
.cal-card .map-photo { position:relative; margin:0; aspect-ratio:16/8; transform:rotate(-1deg); }
.cal-card .map-photo .photo-window { position:absolute; inset:0; aspect-ratio:auto; width:auto; height:auto; padding:6px 6px 14px; background:#fff7e7; box-shadow:1px 5px 8px #0005; }
.cal-card .map-photo img { display:block; width:100%; height:100%; max-height:none; object-fit:cover; }
.cal-teaser { margin:0; font:19px/1.35 Georgia,serif; }
.cal-meta { margin:0; display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; min-height:44px; font:700 18px/1.2 'Roboto Condensed',sans-serif; color:#2b3340; }
.cal-meta>span:first-child { display:inline-flex; align-items:center; gap:8px; border:2px solid #634b30; border-radius:7px; padding:3px 10px; }
.cal-note { font-weight:400; font-style:italic; }
.cal .cal-start { width:100%; min-height:60px; font-size:clamp(24px,1.9vw,30px); white-space:nowrap; }
.cal-start-locked { display:flex; align-items:center; justify-content:center; gap:12px; border:2px dashed #7b6a55; border-radius:40px; color:#4a3722; font-weight:700; }
@keyframes cal-fade { from { opacity:0; } }
@keyframes cal-rise { from { opacity:0; transform:translateY(10px) scale(.98); } }
@media (max-height:760px) and (min-width:900px) { .cal-card .map-photo { display:none; } }

/* Handy und kleines Tablet: Karte oben (Tuerchen als Punkte, nur Anzeige), darunter die Tuerchenliste; Overlay als Blatt von unten */
@media (max-width:899px) {
  .cal { display:block; padding:8px 6px 24px; }
  .cal-board { width:100%; }
  .cal-door { display:none; }
  .cal-dot { display:block; position:absolute; z-index:4; width:var(--d); height:var(--d); translate:-50% -50%; border-radius:50%; pointer-events:none; background:#fff3d299; box-shadow:0 0 0 1px #5a3512aa; }
  .cal-dot.is-gesperrt { background:#4a3a2aa0; box-shadow:none; }
  .cal-dot.is-geloest { background:#2f8a58; box-shadow:0 0 0 1px #fff8; }
  .cal-dot.is-today { background:#ff6a4a; box-shadow:0 0 0 2px #ffe08a,0 0 8px 2px #ffb43a; }
  .cal-doors { display:grid; gap:14px; padding:12px 2px 0; }
  .cal-group>h2 { display:flex; align-items:center; gap:8px; margin:0 0 8px; font:italic 700 20px/1.2 Georgia,serif; color:#f1d89a; }
  .cal-group>h2 span { font:700 15px 'Roboto Condensed',sans-serif; color:#c9d5e2; letter-spacing:.05em; }
  .cal-group.is-fogged>h2::after { content:'· Nebel'; font:400 15px 'Roboto Condensed',sans-serif; opacity:.75; }
  .cal-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .cal-item { position:relative; display:flex; align-items:center; gap:10px; min-height:60px; padding:6px 10px 6px 8px; border:0; border-radius:10px; background:#0a1c2de6; color:#eaf1f8; text-align:left; font:600 14px/1.15 'Roboto Condensed',sans-serif; box-shadow:inset 0 0 0 2px #6f87a0b0,0 2px 4px #0006; }
  .cal-item b { flex:none; font:700 18px Georgia,serif; color:#ffe08a; }
  .cal-item span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-width:0; }
  .cal-item.is-gesperrt { color:#aebccb; }
  .cal-item.is-geloest { box-shadow:inset 0 0 0 2px #4aa46f,0 2px 4px #0006; }
  .cal-item.is-today { box-shadow:inset 0 0 0 2px #ffd46d,0 0 10px #ffd46d88; }
  .cal-item:focus-visible { outline:3px solid #fff; outline-offset:2px; }
  .cal-overlay { position:fixed; inset:0; z-index:50; place-items:end center; padding:0; background:#04101ecc; }
  .cal-card.paper { width:100%; max-height:90svh; padding:28px 22px 22px; animation:cal-sheet 260ms cubic-bezier(.16,1,.3,1); }
  .cal-card h2 { font-size:24px; }
  .cal-card .map-photo { aspect-ratio:16/7; }
  .cal-teaser { font-size:18px; }
  .cal-meta { min-height:0; }
  @keyframes cal-sheet { from { transform:translateY(40px); opacity:0; } }
}
@media (prefers-reduced-motion:reduce) {
  .cal-fog, .cal-door.is-today .cal-disc, .cal-overlay, .cal-card.paper { animation:none; }
  .cal-fog.is-lifting { animation-duration:.01ms; }
  .cal-disc { transition:none; }
}


/* ===== KB-ADV-011 / bauer-53: Tagesrahmen neu (Titel im Logo-Stil, Datum als Wachssiegel, Fortschritt als Stempelfelder, Brief als eigener Zettel) =====
   Gilt fuer alle Tage 01-24. Der Zettel (.compact-briefing) hat eine feste Hoehe, das Spielfeld sitzt immer darunter.
   Praefix P = .mission-paper.mission-paper .compact-briefing.compact-briefing (schlaegt die Tagesregeln aus den Runden davor). */

/* --- Titel: cremefarbene Buchstaben mit dunkler Kontur wie im Logo --- */
.mission-banner { background:linear-gradient(180deg,#061424d6,#061424a6); }
.mission-banner h1 { color:#f8e8c0; font-weight:800; letter-spacing:.01em; -webkit-text-stroke:9px #0a2230; paint-order:stroke fill; text-shadow:0 4px 0 #0a2230,0 8px 14px #0008; }
.mission-banner h1::after, .mission-banner:has(.steps) h1::after { content:none; }

/* --- Datum: Papier-Etikett mit Kalendersymbol (Stil der Basis-Regeln .date) --- */
.mission-banner .date { flex:none; margin-left:6px; }

/* --- Fortschritt: drei Stempelfelder --- */
.mission-banner .steps { display:flex; gap:10px; align-items:stretch; width:100%; max-width:680px; min-width:0; }
.mission-banner:has(.compact-steps) .compact-steps { width:680px; min-width:0; flex:0 1 680px; }
.compact-steps::before { content:none !important; }
.mission-banner .steps li { position:relative; flex:1 1 0; min-width:0; display:flex; align-items:center; gap:10px; min-height:62px; padding:6px 12px 6px 9px; border-radius:10px; background:#0a1c2de6; color:#c8d4e1; font-size:20px; line-height:1.05; white-space:normal; text-align:left; box-shadow:inset 0 0 0 2px #6f87a0b0,0 2px 4px #0006; }
.mission-banner .steps li:not(:last-child)::after { content:none; }
.mission-banner .steps li::before { content:''; position:absolute; inset:4px; border:1.5px dashed #8aa3bb4d; border-radius:7px; pointer-events:none; }
.mission-banner .steps li>span:first-child { width:38px; height:38px; flex:none; display:grid; place-items:center; border-radius:50%; border:2px solid #8aa0b8; background:transparent; color:#c8d4e1; font-size:23px; font-weight:800; box-shadow:none; }
.mission-banner .steps li>span:first-child svg { width:22px; height:22px; stroke-width:3; }
.mission-banner .steps .sr-only { width:1px; height:1px; border:0; background:none; }
.mission-banner .steps li:has(.sr-only) { background:#11293c; color:#f6e6bf; box-shadow:inset 0 0 0 2px #d9ae4a,0 2px 4px #0006; }
.mission-banner .steps li:has(.sr-only) >span:first-child { background:#e8b948; border-color:#fff0be; color:#071629; }
.mission-banner .steps li[aria-current]:not(:has(.sr-only)) { background:linear-gradient(180deg,#ffdc6e,#f2b830); color:#1a1205; box-shadow:inset 0 0 0 2px #fff0be,0 0 18px #ffce5266,0 3px 0 #8a5d10; }
.mission-banner .steps li[aria-current]:not(:has(.sr-only))::before { border-color:#7a550f66; }
.mission-banner .steps li[aria-current]:not(:has(.sr-only))>span:first-child { background:#0a1c2d; border-color:#0a1c2d; color:#ffd766; box-shadow:none; }
@media (prefers-reduced-motion:no-preference) {
  .mission-banner .steps li[aria-current] { animation:stamp-in 260ms var(--ease-out); }
  @keyframes stamp-in { from { transform:scale(1.08); opacity:.55; } to { transform:none; opacity:1; } }
}
@media (min-width:1251px) {
  .mission-banner { min-height:101px; padding-block:12px; }
}
@media (max-width:1250px) {
  .mission-banner .steps { flex:1 1 100%; max-width:none; }
}
@media (max-width:700px) {
  .mission-banner h1 { -webkit-text-stroke-width:7px; }
  .mission-banner .steps { gap:6px; }
  .mission-banner .steps li { flex-direction:column; justify-content:center; gap:3px; min-height:70px; padding:6px 4px; font-size:15px; text-align:center; }
  .mission-banner .steps li>span:first-child { width:30px; height:30px; font-size:19px; }
  .mission-banner .steps li>span:first-child svg { width:18px; height:18px; }
}

/* --- Zettel (Brief): feste Hoehe, Polaroid, Text, Siegel und Unterschrift immer am selben Platz --- */
.mission-paper.mission-paper .compact-briefing.compact-briefing { position:relative; padding:12px 22px 12px 20px; border-radius:8px; background:linear-gradient(180deg,#fff8e7,#f6e8c8); box-shadow:0 0 0 1px #b48a4f80,inset 0 1px 0 #fff,0 6px 12px -4px #4a2f1270; margin-bottom:14px; }
.mission-paper.mission-paper .compact-briefing.compact-briefing .lab-photo.polaroid { transform:rotate(-2deg); margin:0 auto; }
.mission-paper.mission-paper .compact-briefing.compact-briefing .lab-photo>img.paperclip { top:-16px; left:8%; }
.mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto 1fr auto; align-content:stretch; padding:0; }
.mission-paper.mission-paper .compact-briefing.compact-briefing .salutation { grid-column:1/-1; margin:0 0 4px; line-height:1.05; }
.mission-paper.mission-paper .compact-briefing.compact-briefing .letter-text { grid-column:1/-1; max-width:none; align-self:start; }
.mission-paper.mission-paper .compact-briefing.compact-briefing .signature { grid-column:1; grid-row:3; justify-self:end; align-self:end; margin:6px 24px 0 0; line-height:1; transform:rotate(-3deg); }
.mission-paper.mission-paper .compact-briefing.compact-briefing .wax-seal { position:static; grid-column:2; grid-row:3; align-self:end; width:62px; height:62px; margin:0; filter:drop-shadow(0 3px 3px #4a2f1299); }
@media (min-width:1251px) {
  .mission-paper.mission-paper .compact-briefing.compact-briefing { display:grid; grid-template-columns:410px minmax(0,1fr); gap:30px; align-items:center; height:206px; min-height:206px; margin:0 0 14px; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .lab-photo.polaroid { width:410px; max-width:none; height:182px; padding:8px; margin:0; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy { height:182px; grid-template-columns:minmax(0,1fr); }
  /* Siegel sitzt immer an der oberen rechten Ecke des Zettels, nie im Text */
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy { position:static; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .wax-seal { position:absolute; grid-area:auto; top:-16px; right:-12px; bottom:auto; width:72px; height:72px; z-index:2; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .salutation { font-size:36px; padding-right:60px; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-text { font-size:24px; line-height:1.22; }
  :is(.day-4,.day-6,.day-10,.day-11,.day-12,.day-13,.day-15,.day-16,.day-21,.day-22,.day-23,.day-24) .letter-text { padding-right:46px; } /* Diese Briefe laufen sonst in der ersten Zeile unter das Siegel. */
  .mission-paper.mission-paper .compact-briefing.compact-briefing .signature { grid-column:1; font-size:38px; margin:4px 40px 0 0; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .salutation.is-wide { font-size:30px; white-space:nowrap; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy.is-long .salutation { font-size:34px; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy.is-long .letter-text { font-size:22px; line-height:1.18; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy.is-tight .salutation { font-size:30px; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy.is-tight .letter-text { font-size:20px; line-height:1.15; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy.is-tight .signature { font-size:32px; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy.is-tiny .letter-text { font-size:18px; line-height:1.12; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy.is-tiny .salutation { font-size:27px; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .letter-copy.is-tiny .signature { font-size:28px; }
}
@media (max-width:1250px) {
  .mission-paper.mission-paper .compact-briefing.compact-briefing { display:grid; grid-template-columns:1fr; gap:16px; height:auto; min-height:0; }
  .mission-paper.mission-paper .compact-briefing.compact-briefing .lab-photo.polaroid { width:min(480px,100%); max-width:100%; height:auto; margin:14px auto 0; }
}

/* --- Tag 01 gehoert zum gleichen Rahmen wie Tag 02-24 --- */
@media (min-width:1251px) {
  .mission-paper.day-1 { display:grid; grid-template-rows:220px minmax(0,1fr); width:1180px; height:770px; min-height:0; padding:22px 48px 24px; overflow:hidden; }
  .mission-paper.day-1 .quest-panel { min-height:0; padding-top:4px; display:flex; flex-direction:column; }
  .mission-paper.day-1 #quest-form { display:flex; flex-direction:column; flex:1; min-height:0; }
  .mission-paper.day-1 .quest-playfield { flex:1; min-height:0; display:flex; flex-direction:column; justify-content:center; }
}
/* Das Labor-Foto von Tag 01 hat Rand und Klammer schon eingebacken: auf das Bild selbst zuschneiden */
.mission-paper.day-1 .compact-briefing .lab-photo .photo-window>img { object-fit:cover; object-position:50% 56%; transform:scale(1.32); transform-origin:48% 52%; }
/* Werkzeugzeile Tag 01: Hinweis, Alphabet und Beispiel sitzen sauber im Rahmen */
.mission-paper.day-1 .tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:14px; grid-template-columns:none; }
.mission-paper.day-1 .tools .tool-button { min-height:50px; padding:6px 18px; font-size:22px; white-space:nowrap; flex:none; }
.mission-paper.day-1 .tools .alphabet-example { display:inline-flex; align-items:center; gap:20px; min-height:50px; padding:6px 20px; border:2px solid #a87a47; border-radius:13px; background:#fff6e766; font-size:24px; }
.mission-paper.day-1 .tools .alphabet-example::after { content:none; }
.mission-paper.day-1 .tools .alphabet-example span { display:inline-block; }
@media (max-width:700px) { .mission-paper.day-1 .tools .alphabet-example { display:none; } }
@media (min-width:1251px) and (max-width:1480px) {
  .mission-banner .steps { gap:8px; }
  .mission-banner .steps li { gap:7px; padding:5px 6px 5px 6px; font-size:16px; }
  .mission-banner .steps li>span:first-child { width:30px; height:30px; font-size:18px; }
  .mission-banner .steps li>span:first-child svg { width:18px; height:18px; }
}

/* Ermittlerakte KB-ADV-011: Fallübersicht, Beweise, Verlauf. Alle drei Reiter liegen in einer Rasterzelle, die Akte springt beim Wechsel nicht. */
.akte-v2 .dossier-pages { display:grid; }
.akte-v2 .case-panel { grid-area:1/1; min-height:0; min-width:0; position:relative; }
.akte-v2 .case-panel[hidden] { display:block !important; visibility:hidden; pointer-events:none; }
.akte-v2 h2,.akte-v2 h3,.akte-v2 h4 { margin:0; }
.akte-seite { min-width:0; }
.akte-bogen,.akte-seiten { display:grid; grid-template-columns:1fr 1fr; gap:7%; align-items:start; }
.akte-links h2 { font-size:clamp(32px,3vw,46px); line-height:1.04; letter-spacing:-.02em; margin:6px 0 14px; }
.akte-frage { margin:0 0 12px; font:500 clamp(28px,2.4vw,36px)/1.1 'Dancing Script',cursive; color:#17334e; }
.akte-text { margin:0; font:clamp(17px,1.4vw,20px)/1.35 Georgia,serif; max-width:36em; }
.akte-foto { display:flex; align-items:flex-start; gap:12px; margin:18px 0 20px; }
.akte-foto .lab-photo { flex:0 0 auto; width:min(300px,56%); margin:0; transform:rotate(-3deg); }
.akte-foto .lab-photo img { max-height:none; }
.akte-foto .missing-note { flex:1 1 0; min-width:0; padding-top:4px; }
.akte-foto .missing-note>img { width:70px; height:70px; }
.akte-foto .missing-note>p { margin:0; font:clamp(24px,2vw,30px)/1.05 'Dancing Script',cursive; color:#172d48; transform:rotate(-5deg); }
.akte-notiz,.akte-kapitel { position:relative; isolation:isolate; }
.akte-notiz::before,.akte-kapitel::before { content:''; position:absolute; inset:-6px -4px; z-index:-1; border:16px solid transparent; border-image:url('assets/plates/letter-paper.webp') 70 fill / 18px / 0 stretch; filter:drop-shadow(1px 4px 3px #0005); }
.akte-notiz { display:flex; align-items:center; gap:14px; padding:10px 14px; margin:0 6px; transform:rotate(-.6deg); }
.akte-notiz img { width:84px; height:84px; object-fit:contain; flex:0 0 auto; }
.akte-notiz h3 { font:700 22px/1.1 'Roboto Condensed',sans-serif; color:#83251f; margin-bottom:4px; }
.akte-notiz p { margin:0; font:17px/1.3 Georgia,serif; }
.akte-titel { font:700 clamp(24px,2.1vw,32px)/1.1 'Roboto Condensed',sans-serif; margin:8px 0 26px !important; text-align:center; }
.akte-kapitel-raster { display:grid; grid-template-columns:1fr 1fr; gap:46px 24px; }
.akte-kapitel { padding:26px 6px 6px; text-align:center; min-width:0; }
.akte-kapitel::after { content:''; position:absolute; top:-30px; left:calc(50% - 23px); width:46px; height:48px; background:url('assets/brass-clip.svg') center / contain no-repeat; }
.akte-kapitel h4 { font:700 23px/1.1 'Roboto Condensed',sans-serif; color:#83251f; }
.akte-kapitel>p { margin:2px 0 12px; font:15px/1.2 Georgia,serif; min-height:2.4em; }
.akte-stempel { list-style:none; margin:0; padding:0 4px 10px; display:grid; grid-template-columns:repeat(3,1fr); gap:12px 6px; justify-items:center; }
.akte-stempel li { width:50px; height:50px; display:grid; place-items:center; border-radius:50%; border:2px dashed #8a765699; color:#8a7656aa; font:italic 700 20px 'Roboto Condensed',sans-serif; }
.akte-stempel li.is-gesichert { border:3px double #a3261f; color:#a3261f; background:#a3261f1c; transform:rotate(-8deg); box-shadow:inset 0 0 0 2px #a3261f22; }
.akte-stempel li.is-gesichert:nth-child(even) { transform:rotate(7deg); }
.akte-kapitel .akte-siegel { position:absolute; top:-18px; right:-12px; width:64px; height:64px; transform:rotate(12deg); filter:drop-shadow(1px 3px 2px #0006); }
.akte-weiter { display:flex; width:fit-content; margin:44px auto 0; min-height:56px; font-size:26px; }
.akte-kap+.akte-kap { margin-top:16px; }
.akte-kap h3 { font:700 clamp(17px,1.4vw,20px)/1.2 Georgia,serif; padding-bottom:5px; border-bottom:1px solid #876241; margin-bottom:8px; }
.akte-slots { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 8px; }
.akte-beweis,.akte-fach { width:100%; height:100%; min-height:134px; padding:6px 3px 5px; display:grid; grid-template-rows:auto auto auto; justify-items:center; align-content:start; gap:1px; border:0; color:var(--ink); font:inherit; text-align:center; }
.akte-beweis { cursor:pointer; background:#fff7e7; box-shadow:1px 4px 7px #2b1b0e55; transform:rotate(-.8deg); }
.akte-slots li:nth-child(even) .akte-beweis { transform:rotate(.9deg); }
.akte-fach { filter:saturate(.55); opacity:.8; }
.akte-bild { width:82px; height:82px; display:grid; }
.akte-bild img { width:100%; height:100%; object-fit:contain; }
.akte-beweis b,.akte-fach b { font:700 14px/1.15 Georgia,serif; min-height:2.3em; display:grid; align-items:center; }
.akte-beweis time,.akte-fach time { font:600 20px/1 'Dancing Script',cursive; color:#83251f; }
.akte-fach time { color:#5b4a31; }
.akte-beweis:focus-visible,.akte-zu:focus-visible,.akte-los:focus-visible,.akte-weiter:focus-visible { outline:3px solid #146c68; outline-offset:3px; }
.akte-detail { position:fixed; inset:0; z-index:60; display:grid; place-items:center; padding:16px; background:#140d07b8; }
.akte-blatt { position:relative; isolation:isolate; display:grid; grid-template-columns:240px 1fr; gap:28px; align-items:center; width:min(720px,100%); max-height:calc(100dvh - 32px); overflow:auto; padding:44px 46px 40px; color:var(--ink); }
.akte-blatt::before { content:''; position:absolute; inset:0; z-index:-1; border:26px solid transparent; border-image:url('assets/plates/letter-paper.webp') 70 fill / 28px / 0 stretch; filter:drop-shadow(0 8px 14px #000a); }
.akte-gross img { width:100%; height:auto; display:block; transform:rotate(-2deg); }
.akte-gross-text h3 { font:700 34px/1.05 'Roboto Condensed',sans-serif; }
.akte-datum { margin:8px 0 14px; font:600 26px/1.1 'Dancing Script',cursive; color:#83251f; }
.akte-gross-text p:last-child { margin:0; font:21px/1.35 Georgia,serif; }
.akte-zu { position:absolute; top:14px; right:16px; width:48px; height:48px; display:grid; place-items:center; border:2px solid #81633c; border-radius:8px; background:#fff8e9; color:var(--ink); font:700 30px/1 'Roboto Condensed',sans-serif; cursor:pointer; }
.akte-zeit { list-style:none; margin:0; padding:0; display:grid; grid-auto-flow:column; grid-template-rows:repeat(12,minmax(57px,auto)); column-gap:7%; }
.akte-zeit li { display:grid; grid-template-columns:88px minmax(0,1fr) 50px; gap:10px; align-items:center; padding:3px 4px; border-bottom:1px solid #4d6e9a55; }
.akte-zeit time { white-space:nowrap; font:600 23px/1 'Dancing Script',cursive; color:#17334e; }
.akte-zeit b { display:block; font:700 19px/1.15 'Roboto Condensed',sans-serif; }
.akte-zeit span { display:block; font:15px/1.2 Georgia,serif; }
.akte-zeit img { width:50px; height:50px; object-fit:contain; }
.akte-zeit .is-offen b,.akte-zeit .is-offen span { color:#4a3a26; }
.akte-zeit .is-offen span { font-style:italic; }
.akte-zeit .is-gesichert time { color:#83251f; }
.akte-zeit .is-naechster b { display:inline; padding:0 4px; margin-left:-4px; background:linear-gradient(transparent 58%,#ffcf5a 58%); -webkit-box-decoration-break:clone; box-decoration-break:clone; } /* Textmarker auf dem Titel, kein Kasten (KB-ADV-016) */
.akte-zeit .is-naechster time { color:#83251f; }
.akte-zeit .akte-rest { grid-template-columns:1fr; justify-items:center; align-content:center; text-align:center; gap:10px; padding:16px; border-bottom:0; }
.akte-zeit .akte-rest img { width:120px; height:120px; }
.akte-zeit .akte-rest b { font-size:28px; line-height:1.1; color:#17334e; }
.akte-zeit .akte-rest span { font-size:18px; line-height:1.3; color:#4a3a26; }
.akte-zeit .akte-rest.ist-klein { grid-template-columns:50px minmax(0,1fr); justify-items:start; text-align:left; padding:3px 4px; }
.akte-zeit .akte-rest.ist-klein img { width:48px; height:48px; }
.akte-zeit .akte-rest.ist-klein b { font-size:19px; }
.akte-zeit .akte-rest.ist-klein span { font-size:15px; }
@media(min-width:901px) {
  .akte-zeit { grid-template-columns:repeat(2,minmax(0,1fr)); } /* Beide Spalten gleich breit: sonst schiebt ein schmaler Siegelblock die linke Spalte ueber den Buchfalz */
  .akte-zeit .akte-rest { grid-row:span var(--zeilen); }
  .akte-zeit .akte-rest.ganze-seite { grid-column:2; grid-row:1 / -1; }
  .akte-zeit .akte-rest.ganze-seite img { width:150px; height:150px; }
}
.akte-los { width:44px; height:44px; display:grid; place-items:center; border-radius:50%; background:#ffcc55; color:var(--ink); border:2px solid #81633c; }
.akte-los svg { width:20px; height:20px; }
@media(prefers-reduced-motion:no-preference) {
  .akte-beweis { transition:transform .18s var(--ease-out), box-shadow .18s var(--ease-out); }
  .akte-beweis:hover { transform:translateY(-3px) rotate(0deg); box-shadow:1px 8px 12px #2b1b0e66; }
  .akte-detail { animation:akte-ein .22s var(--ease-out); }
  .akte-blatt { animation:akte-blatt .26s var(--ease-out); }
  @keyframes akte-ein { from { opacity:0; } }
  @keyframes akte-blatt { from { opacity:0; transform:translateY(14px) rotate(-1deg); } }
}
@media(max-width:1250px) {
  .akte-slots { gap:12px 6px; }
  .akte-bild { width:68px; height:68px; }
  .akte-beweis b,.akte-fach b { font-size:13px; }
  .akte-zeit li { grid-template-columns:70px minmax(0,1fr) 40px; }
  .akte-zeit img { width:40px; height:40px; }
  .akte-zeit b { font-size:17px; }
  .akte-zeit span { font-size:13.5px; }
}
@media(max-width:900px) {
  .akte-bogen,.akte-seiten { grid-template-columns:1fr; gap:26px; }
  .akte-zeit { grid-auto-flow:row; grid-template-rows:none; }
  .akte-blatt { grid-template-columns:1fr; padding:40px 28px 28px; gap:14px; }
  .akte-gross { width:150px; justify-self:center; }
}
@media(max-width:600px) {
  .akte-foto { flex-direction:column; align-items:center; }
  .akte-foto .lab-photo { width:min(280px,90%); }
  .akte-foto .missing-note { display:none; }
  .akte-kapitel-raster { grid-template-columns:1fr 1fr; gap:40px 14px; }
  .akte-kapitel { padding-inline:2px; }
  .akte-kapitel h4 { font-size:20px; }
  .akte-kapitel>p { font-size:13px; }
  .akte-stempel { gap:8px 2px; padding:0 2px 8px; }
  .akte-stempel li { width:40px; height:40px; font-size:17px; }
  .akte-kapitel .akte-siegel { width:46px; height:46px; top:-14px; right:-8px; }
  .akte-notiz { flex-direction:column; text-align:center; }
  .akte-bild { width:62px; height:62px; }
  .akte-zeit li { grid-template-columns:66px minmax(0,1fr) 40px; }
  .akte-weiter { font-size:22px; }
}

/* KB-ADV-002: Speicherstatus in der Kopfzeile (nur sichtbar, wenn er etwas zu sagen hat) und Register „Geheimcode“ */
.save-status { margin:0 auto 0 0; display:inline-flex; align-items:center; gap:8px; padding:6px 14px; border:1px solid var(--header-line); border-radius:12px; background:#071422cc; color:var(--snow); font:600 17px/1.2 'Roboto Condensed',sans-serif; }
.save-status[hidden] { display:none; }
.save-status svg { width:20px; height:20px; flex:none; }
.save-status.is-gespeichert { color:var(--nav-gold); }
.save-status.is-offline,.save-status.is-fehler { background:#5a1512eb; border-color:var(--red); }
@media (prefers-reduced-motion:no-preference) { .save-status { animation:save-ein .22s var(--ease-out); } @keyframes save-ein { from { opacity:0; transform:translateY(-6px); } } }
@media (max-width:900px) { .save-status { position:fixed; z-index:70; left:16px; right:16px; top:10px; justify-content:center; margin:0; box-shadow:0 6px 16px #0007; pointer-events:none; } } /* oben ueber der Kopfzeile und durchklickbar: verdeckt keinen Spielknopf (Befund Siegwege 10.11.) */
.tab-kurz { display:none; }
@media (max-width:600px) { .akte-v2 .file-tabs .tab-lang { display:none; } .akte-v2 .file-tabs .tab-kurz { display:inline; } }
@media (max-width:900px) { .akte-v2 .case-panel[hidden] { display:none !important; } } /* Am Handy endet das Papier mit dem Reiter, sonst bleibt es so hoch wie der laengste */
/* Waechst bis zum Fenster mit, wenn Breite und Hoehe es erlauben. 914 = Buch 830 + Abstaende, 170 = Kopf und Fuss der Seite. */
.dossier.akte-v2 { zoom:max(1,min(tan(atan2(100vw - 130px,1430px)),tan(atan2(100vh - 170px,914px)))); }
@media (min-width:1561px) and (min-height:1085px) { main:has(.akte-v2) { display:flow-root; } } /* Nur wenn sie waechst: sonst schiebt der vergroesserte Rand die Seite ueber das Fenster hinaus */
.code-karte { position:relative; isolation:isolate; width:fit-content; max-width:100%; margin:22px 0 18px; padding:20px 34px; transform:rotate(-1.2deg); }
.code-karte::before { content:''; position:absolute; inset:-6px -10px; z-index:-1; background:url('assets/plates/number-ticket.webp') center / 100% 130% no-repeat; filter:drop-shadow(1px 4px 3px #0004); }
.code-wert { display:flex; flex-wrap:wrap; gap:4px 22px; font:800 clamp(32px,3.4vw,50px)/1 'Roboto Condensed',sans-serif; letter-spacing:.07em; color:#125854; font-variant-numeric:tabular-nums; }
.code-aktionen { display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; }
.code-aktionen .tool-button { font-size:21px; min-height:50px; }
.code-tipp { margin:0; font:15px/1.35 Georgia,serif; color:#5b4a31; }
.code-form { display:grid; gap:10px; }
.code-form label { font:700 21px/1.2 'Roboto Condensed',sans-serif; color:var(--ink); }
.code-zeile { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px 30px; align-items:center; }
.code-form input { width:100%; min-height:64px; padding:8px 16px; border:2px solid #806541; border-radius:13px; background:#fff6e7; color:var(--ink); font:700 28px/1 'Roboto Condensed',sans-serif; letter-spacing:.08em; text-transform:uppercase; }
.code-form input::placeholder { color:#8a7656; letter-spacing:.06em; }
.code-form input:focus-visible,.akte-code .tool-button:focus-visible,.code-holen:focus-visible,.code-note:focus-visible { outline:3px solid #146c68; outline-offset:3px; }
.code-holen { min-height:64px; padding:8px 30px; font-size:26px; gap:14px; }
.code-holen svg { width:24px; height:24px; }
.code-note { margin:16px 0 0; padding:10px 14px; border-radius:12px; font:18px/1.35 Georgia,serif; overflow-wrap:anywhere; }
.code-note.is-ok { background:#146c681c; color:#0e4f4c; }
.code-note.is-fehler { background:#a3261f17; color:#83251f; }
.code-verwalten { margin-top:38px; padding-top:18px; border-top:1px solid #876241; }
.code-verwalten h3 { font:700 23px/1.1 'Roboto Condensed',sans-serif; color:#83251f; margin-bottom:6px; }
.code-verwalten>p { margin:0 0 14px; font:17px/1.35 Georgia,serif; max-width:36em; }
.code-loeschen.is-scharf { border-color:#a3261f; color:#a3261f; background:#fff0ea; }
.code-warnung { margin:10px 0 0; font:italic 16px/1.35 Georgia,serif; color:#83251f; }
@media (max-width:600px) {
  .code-zeile { grid-template-columns:1fr; }
  .code-holen { justify-self:center; }
  .code-karte { padding:16px 22px; }
  .code-wert { gap:2px 14px; }
}
/* KB-ADV-012: versiegelte Karte eines gesperrten Tages – nur das Siegel, direkt auf dem Pergament */
.cal-card .map-photo.cal-sealed { background:none; border:0; box-shadow:none; padding:0; transform:none; rotate:none; aspect-ratio:auto; display:grid; place-items:center; margin:clamp(12px,3vh,32px) 0; }
.cal-card .map-photo.cal-sealed img { width:clamp(112px,34%,176px); height:auto; max-height:none; aspect-ratio:1; object-fit:contain; rotate:-6deg; filter:drop-shadow(0 8px 10px rgb(60 30 0 / .4)); }
/* KB-ADV-007: Fusszeile traegt jetzt Impressum und Datenschutz: lesbar und antippbar */
.prototype-note { opacity:.8; }
.prototype-note a { display:inline-block; padding:8px 2px; color:var(--paper-muted); text-underline-offset:3px; }
.prototype-note a:focus-visible { outline:3px solid var(--gold); outline-offset:2px; border-radius:3px; }
/* Desktop passt ohne Scrollen in den Bildschirm (Fusszeile dort sonst aus): Rechtslinks klein und fest in der Ecke, ohne Layoutwirkung */
@media (min-width:1251px) {
  .prototype-note { display:block; position:fixed; right:14px; bottom:4px; z-index:5; padding:0 10px; border-radius:8px; background:#071422b3; font-size:13px; }
  .prototype-note .fuss-text { display:none; }
  .prototype-note a { padding:4px 2px; }
}
