@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
}

:root {
    color-scheme: dark;
    --bg: #101a19;
    --panel: #192725;
    --raised: #22322f;
    --ink: #faf1df;
    --soft: #b9c6bd;
    --muted: #a9b9ad;
    --line: #435950;
    --gold: #f6bc82;
    --gold-soft: #ffe0b8;
    --green: #bde4c9;
    --rust: #ffac90;
    --sans: Avenir Next, Avenir, system-ui, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
    --serif: Georgia, 'Times New Roman', serif;
    color: var(--ink);
    background: var(--bg);
    font: 1rem/1.55 var(--sans);
}

*, *::after, *::before { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { width: min(100% - 4rem, 75rem); margin-inline: auto; }
.masthead { border-bottom: 1px solid #33463f; }
.masthead-inner { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand, .masthead-label, .eyebrow, .cover-ref { font: 650 .73rem/1.35 var(--mono); letter-spacing: .12em; }
.brand { display: flex; align-items: center; gap: .65rem; white-space: nowrap; }
.mark { width: 1.14rem; aspect-ratio: 1; display: inline-block; border: 1px solid var(--gold); border-radius: 50%; background: linear-gradient(90deg,var(--gold) 50%,transparent 50%); }
.masthead-label, .eyebrow { color: var(--gold); }
.eyebrow { margin: 0 0 .85rem; }
.footer { padding: 1.6rem 0 2rem; color: var(--muted); font: .74rem var(--mono); }

.cover { isolation: isolate; position: relative; background: #151e1b; overflow: hidden; min-height: min(55rem, 84svh); display: grid; align-items: stretch; }
.cover-art { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#101a19fa 0%,#101a19e8 26%,#101a1960 55%,#101a1915 84%), linear-gradient(0deg,#101a19c9,transparent 35%), url('werkstatt.webp') 69% 58%/cover no-repeat; }
.cover-inner { display: grid; align-items: center; position: relative; padding-block: clamp(3.5rem, 9vw, 8rem); }
.cover-content { max-width: 47rem; }
.location { display: flex; align-items: center; gap: .65rem; }
.location span { width: .5rem; height: .5rem; background: var(--gold); border-radius: 100%; box-shadow: 0 0 12px #f6bc8280; }
.cover h1 { font: 400 clamp(4.4rem, 10.4vw, 9.4rem)/.84 var(--serif); letter-spacing: -.086em; margin: .1em 0 .28em -.04em; text-wrap: balance; }
.cover h1 em { font-weight: 400; color: var(--gold); }
.cover-copy { color: #e4e6d9; font-size: clamp(1.04rem, 2vw, 1.24rem); max-width: 28rem; margin: 0 0 2.1rem; }
.access { border-top: 1px solid #acb7a559; padding-top: 1.1rem; width: min(100%, 28rem); }
.access > p:last-child { margin-bottom: 0; }
.access label { display: block; }
.access-row { display: flex; gap: .55rem; }
.access input { min-width: 0; flex: 1; padding-inline: .8rem; letter-spacing: .06em; background: #111b19ed; }
.cover-ref { position: absolute; right: 0; bottom: 1.25rem; display: flex; gap: 1.15rem; color: #f9e4c3; text-shadow: 0 1px 8px black; }

.primary { display: inline-flex; align-items: center; justify-content: center; gap: 1.1rem; padding: .65rem 1.08rem; min-height: 2.95rem; border: 1px solid #f6bc82; border-radius: .35rem; color: #211b15; background: var(--gold); font-weight: 760; text-decoration: none; white-space: nowrap; }
.primary span { font-size: 1.14em; line-height: 1; }
.primary:hover { background: var(--gold-soft); }
.primary:disabled { background: #34413a; color: #c1c8bd; border-color: #52645a; cursor: default; }
input:not([type=hidden]):not([type=radio]), select { border: 1px solid #63776b; border-radius: .3rem; color: var(--ink); background-color: #12201d; min-height: 2.95rem; }
input::placeholder { color: #b1bdb3; opacity: 1; }
.feedback { color: var(--rust); font-size: .94rem; font-weight: 650; padding-left: .8rem; border-left: 2px solid var(--rust); margin: .9rem 0 0; }

.case { max-width: 66rem; padding: clamp(1.25rem, 3vw, 2.75rem) 0 0; }
.trail { display: flex; flex-wrap: wrap; gap: .75rem 1.7rem; padding: 0 0 1rem; margin: 0 0 clamp(1.5rem, 4vw, 3.25rem); border-bottom: 1px solid var(--line); list-style: none; font: 650 .75rem/1.4 var(--mono); color: var(--muted); }
.trail li { display: flex; gap: .42rem; align-items: center; }
.trail li span { width: .48rem; height: .48rem; display: inline-block; border: 1px solid currentColor; border-radius: 50%; }
.trail li[aria-current] { color: var(--gold); }
.trail li[aria-current] span { background: currentColor; box-shadow: 0 0 10px #f6bc8260; }
.trail li.passed { color: var(--green); }
.trail li.passed span { border-radius: 0; width: .49rem; height: .31rem; border-width: 0 0 1px 1px; transform: rotate(-45deg); }
.scene-head { max-width: 53rem; margin-bottom: 1.55rem; }
.scene h1 { font: 400 clamp(3rem, 7.4vw, 5.8rem)/.98 var(--serif); letter-spacing: -.07em; margin: 0 0 .22em -.025em; }
.scene-head p:last-child { margin: 0; max-width: 48rem; color: #d5dfd4; font-size: clamp(1rem, 2vw, 1.12rem); }
.scene-panel { border: 1px solid var(--line); border-radius: .75rem; background: var(--panel); overflow: hidden; }
.urgent { color: var(--rust); }
.panel-action { padding: .8rem 1.15rem 1.05rem; display: flex; justify-content: flex-end; }
.scene-panel > .feedback { margin-inline: 1.15rem; }
.hint { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: 1rem; color: var(--soft); }
.hint summary { font-weight: 700; cursor: pointer; width: fit-content; max-width: 100%; }
.hint p { margin: .6rem 0 0; max-width: 53rem; }

.map-surface { width: 100%; aspect-ratio: 900 / 420; position: relative; background: radial-gradient(ellipse at 50% 48%,#233c38,#182c29); overflow: hidden; }
.map-surface::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(to right,#d7eee312 1px,transparent 1px),linear-gradient(to bottom,#d7eee312 1px,transparent 1px); background-size: 10% 20%; }
.map-surface img { position: absolute; inset: 0; width: 100%; height: 100%; }
.equator { position: absolute; inset: 59.3% 0 auto; border-top: 1px dashed #f6bc82a0; }
.equator span { position: absolute; bottom: .2rem; left: .7rem; color: var(--gold-soft); font: .62rem var(--mono); }
.map-pin { position: absolute; display: flex; align-items: center; gap: .3rem; background: #111c1a; border: 1px solid #7a9d89; border-radius: .33rem; padding: .4rem .52rem; min-height: 2.75rem; color: var(--ink); font-size: .84rem; line-height: 1.2; text-align: left; box-shadow: 0 2px 8px #0006; }
.map-pin:hover, .map-pin.is-active, .map-pin.is-drop-target { border-color: var(--gold); color: var(--gold-soft); }
.map-pin.is-assigned { border-color: var(--green); }
.pin-germany { left: 53%; top: 22%; }
.pin-australia { right: 12%; top: 78%; }
.pin-mark { width: .55rem; height: .55rem; border: 1px solid var(--gold); border-radius: 100%; background: #584129; }
.map-pin [data-map-value] { color: var(--green); font: .68rem var(--mono); border-left: 1px solid #4b6257; padding-left: .31rem; }
.map-dock { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.15rem; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); }
.dock-title { font-weight: 760; margin: 0; }
.dock-copy { font-size: .87rem; margin: .18rem 0 0; }
.muted { color: var(--muted); }
.tokens { display: flex; gap: .55rem; }
.season, .counter button { border: 1px solid #70847a; background: #253831; color: var(--ink); border-radius: .3rem; min-height: 2.75rem; font-weight: 680; }
.season { padding: .43rem .75rem; white-space: nowrap; cursor: grab; }
.season span { color: var(--gold); }
.season.is-active, .season:hover { color: #271d13; background: var(--gold); border-color: var(--gold); }
.season.is-active span, .season:hover span { color: inherit; }
.seasons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1rem 1.15rem; }
.seasons label { font-weight: 680; }
.seasons select { display: block; width: 100%; margin-top: .3rem; padding: .4rem; }

.mission-strip { display: grid; grid-template-columns: .8fr .8fr .8fr 1.5fr; margin: 0 0 1rem; padding: .8rem 0; border-block: 1px solid var(--line); }
.mission-strip > div { padding: .05rem .85rem; min-width: 0; }
.mission-strip > div + div { border-left: 1px solid var(--line); }
.mission-strip dt { color: var(--soft); font: .73rem var(--mono); }
.mission-strip dd { color: var(--gold-soft); font: 500 clamp(1.02rem, 2vw, 1.5rem)/1.25 var(--mono); margin: .4rem 0 0; }
.mission-strip small { font: .71rem var(--sans); color: var(--soft); }
.order-panel { padding: clamp(.9rem, 3vw, 1.45rem); }
.order-panel > .feedback { margin-inline: 0; }
.offer-field, .evidence-field { border: 0; margin: 0; min-width: 0; padding: 0; }
.offer-field legend, .evidence-field legend { width: 100%; font-weight: 760; padding: 0 0 .65rem; }
.unit { color: var(--muted); font: .69rem var(--mono); float: right; margin-top: .3rem; }
.offer-grid, .evidence-grid { display: grid; gap: .65rem; }
.offer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.evidence-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.offer-card, .evidence-card { position: relative; display: flex; flex-direction: column; min-width: 0; color: var(--ink); border: 1px solid #597165; background: var(--raised); border-radius: .4rem; cursor: pointer; padding: clamp(.65rem, 2vw, 1.05rem); transition: border-color .18s, background-color .18s; }
.offer-card:has(input:checked), .offer-card.is-picked, .evidence-card:has(input:checked), .evidence-card.is-picked { border-color: var(--gold); background: #41372b; }
.offer-card:focus-within, .evidence-card:focus-within { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.offer-card:hover, .evidence-card:hover { border-color: var(--gold); }
.offer-card input, .evidence-card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.offer-top { display: flex; align-items: center; gap: .42rem; margin-bottom: .6rem; color: var(--gold); font: 700 .86rem var(--mono); }
.offer-symbol { font: 1.35rem/1 var(--sans); }
.pick-dot { margin-left: auto; height: .72rem; width: .72rem; flex: 0 0 .72rem; border: 1px solid #9bb3a5; border-radius: 50%; }
:is(.offer-card,.evidence-card):has(input:checked) .pick-dot, .is-picked .pick-dot { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 2px #41372b; }
.offer-price { font-size: clamp(.97rem, 2vw, 1.23rem); font-weight: 760; }
.offer-shipping { color: var(--soft); font-size: .88rem; }
.offer-time { margin-top: .6rem; padding-top: .55rem; border-top: 1px solid #77918365; font: .83rem var(--mono); color: var(--gold-soft); }
.prior { margin: 0 0 1rem; color: var(--soft); font-size: .93rem; }
.prior strong { color: var(--ink); }
.evidence-field { margin-bottom: 1.25rem; }
.evidence-card { background: #2b332b; border-top: 2px solid #8f846d; }
.evidence-card .pick-dot { position: absolute; bottom: .75rem; right: .72rem; pointer-events: none; }
.evidence-date { color: var(--soft); font: .71rem var(--mono); margin-bottom: .22rem; }
.evidence-card strong { color: var(--gold-soft); font: 700 1.04rem var(--mono); }
.order-console { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .95rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.console-cost label { display: block; font-weight: 720; margin-bottom: .3rem; }
.counter, .console-action { display: flex; align-items: center; gap: .38rem; }
.counter button { width: 2.7rem; padding: 0; font-size: 1.2rem; }
.counter button:hover { background: #41584a; }
.counter input { width: 3.55rem; padding: 0 .3rem; text-align: center; appearance: textfield; }
.counter input::-webkit-inner-spin-button { appearance: none; }
.counter-unit, .pick-status { color: var(--soft); font: .72rem var(--mono); }
.counter-unit { margin-left: .2rem; }
.console-action { gap: .8rem; }

.finale { text-align: center; padding: clamp(1rem, 3vw, 2.2rem); background: radial-gradient(ellipse at 50% 28%,#413323 0%,#1b2824 58%); }
.lamps { display: flex; justify-content: center; align-items: center; gap: clamp(.9rem, 4vw, 2.4rem); margin: .5rem 0 1.6rem; }
.lamps span { display: block; position: relative; width: clamp(1.6rem, 5vw, 2.8rem); height: clamp(2.2rem, 6vw, 3.35rem); border: 2px solid #d49865; border-block-width: .27rem; border-radius: 37% 37% 30% 30%; background: #725138; box-shadow: inset 0 0 .6rem #1b201a; }
.lamps span::before { content: ''; position: absolute; left: 24%; right: 24%; height: .55rem; border: 1px solid #d49865; border-bottom: 0; border-radius: .7rem .7rem 0 0; bottom: 100%; }
.finale:has(.reward[open]) .lamps span { background: #ffce83; box-shadow: inset 0 0 .75rem #e88b46, 0 0 1.6rem #ffa34ac4; animation: ignite .45s ease-out both; }
.finale:has(.reward[open]) .lamps span:nth-child(2) { animation-delay: .09s; }
.finale:has(.reward[open]) .lamps span:nth-child(3) { animation-delay: .18s; }
.finale:has(.reward[open]) .lamps span:nth-child(4) { animation-delay: .27s; }
@keyframes ignite { from { opacity: .45; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
.reward summary { width: fit-content; max-width: 100%; margin-inline: auto; cursor: pointer; }
.reward summary::-webkit-details-marker { display: none; }
.reward .word { padding: 1.25rem 0 0; }
.word p { margin: 0 0 .35rem; }
.word .next-word { font: 400 clamp(2.7rem, 10vw, 5.8rem)/1.03 var(--serif); letter-spacing: .04em; color: var(--gold-soft); }

@media (max-width: 46rem) {
    .wrap { width: calc(100% - 2rem); }
    .cover-art { background-position: center, center, 69% 50%; background-image: linear-gradient(90deg,#101a19e9,#101a1966 68%,#101a1930), linear-gradient(0deg,#101a19c9,transparent 55%), url('werkstatt.webp'); }
    .masthead-inner { min-height: 3.5rem; }
    .map-pin { flex-wrap: wrap; font-size: .76rem; }
    .pin-germany { left: 51%; top: 16%; }
    .pin-australia { right: 4%; top: 68%; }
    .console-action { flex-direction: column; align-items: flex-end; gap: .2rem; }
    .pick-status { margin: 0; }
    .mission-strip small { display: block; }
}
@media (max-width: 32rem) {
    .masthead-label { font-size: .62rem; letter-spacing: .045em; }
    .cover { min-height: calc(100svh - 7rem); }
    .cover-inner { align-items: end; padding-top: 10.5rem; padding-bottom: 3.25rem; }
    .cover-art { background-position: center, 66% 26%; background-image: linear-gradient(0deg,#101a19 4%,#101a19ed 25%,#101a198d 62%,#101a1917 100%),url('werkstatt.webp'); }
    .cover h1 { font-size: clamp(3.75rem, 14.6vw, 5.2rem); }
    .cover-copy { margin-bottom: 1.1rem; }
    .cover-ref { display: none; }
    .trail { column-gap: .85rem; font-size: .67rem; }
    .scene h1 { font-size: clamp(2.8rem, 11vw, 4.15rem); }
    .map-dock { align-items: flex-start; flex-direction: column; padding-inline: .85rem; }
    .map-pin [data-map-value] { flex-basis: 100%; border: 0; padding-left: 0; font-size: .62rem; }
    .pin-germany { width: min(8rem, 47%); left: 51%; top: 9%; }
    .pin-australia { width: min(8rem, 47%); right: 9%; bottom: 4%; top: auto; }
    .pin-australia .pin-mark { order: 1; margin-left: auto; }
    .pin-australia [data-map-value] { order: 2; }
    .offer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .mission-strip { grid-template-columns: 1fr 1fr; row-gap: .65rem; }
    .mission-strip > div:nth-child(3) { border-left: 0; }
    .evidence-grid { gap: .35rem; }
    .evidence-card { padding: .52rem .35rem .55rem; }
    .evidence-card .pick-dot { bottom: .55rem; right: .35rem; width: .55rem; height: .55rem; }
    .evidence-date { font-size: .61rem; }
    .order-console { flex-direction: column; align-items: stretch; gap: .7rem; }
    .console-action { flex-direction: row; justify-content: space-between; align-items: center; gap: .45rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
