/*
 * Kulturschatzsuche PWA v1.1 - production stylesheet of the participant app.
 *
 * Ported from the approved prototype: its app.css, then its theme.css, merged in
 * that order because the cascade between them is load-bearing (later rules win).
 * Removed: the desktop design-studio wrapper, the .fullscreen duplicates, the
 * prototype's @font-face rules (fonts come from /fonts/fonts.css) and the CSS the
 * design no longer renders. The prototype's mobile layout applies at every width.
 * Production adaptations: the document scrolls (sticky header, bottom navigation
 * and toast fixed to the 540px column), color-scheme per palette, and everything
 * the prototype set through inline style attributes now comes from classes or
 * custom properties (CSP: style-src 'self', style-src-attr 'none').
 */

/* ===== app.css ===== */

:root {
    --paper: #F8F6ED;
    --surface: #FFFEF8;
    --ink: #173F38;
    --muted: #64756A;
    --line: #DEE3D6;
    --green: #17483F;
    --green-soft: #DCE8D5;
    --coral: #C84D30;
    --sun: #F1D782;
    --danger: #9D4333;
    --focus: #A45134;
    --safe: env(safe-area-inset-bottom,0px);
    font-family: Manrope,sans-serif;
    color: var(--ink);
    background: var(--frame-bg);
    font-synthesis: none;
    color-scheme: light;
    scrollbar-width: thin;
    scrollbar-color: var(--field-line) transparent;
    scroll-behavior: smooth;
}

@media (max-width:540px) {
    :root {
        background: var(--paper);
    }
}

:root.sheet-open {
    overflow: hidden;
    padding-right: var(--sheet-lock-gap,0px);
}

:root.sheet-open .bottom-nav,
:root.sheet-open .bottom-sheet {
    right: var(--sheet-lock-gap,0px);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 280px;
}

button,
input,
select,
textarea,
a {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: default;
}

button,
a,
input,
select,
textarea,
summary {
    outline-offset: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--focus);
}

a {
    color: inherit;
}

button {
    color: inherit;
}

h1,
h2,
h3,
p {
    margin: 0;
}

.icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.fox {
    width: auto;
    height: auto;
}

.sr-only,
.skip {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip:focus {
    width: auto;
    height: auto;
    clip-path: none;
    z-index: 1000;
    background: var(--surface);
    padding: 15px;
    left: 15px;
    top: 15px;
}

.overline {
    font-size: 10px;
    letter-spacing: 1.7px;
    line-height: 1.7;
    font-weight: 700;
}

.brand-signet {
    display: block;
    flex: none;
    width: auto;
    height: 34px;
}

.app-shell {
    position: relative;
    width: 100%;
    max-width: 540px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    background: var(--paper);
    overflow-x: clip;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

.app-top {
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex: none;
    padding: 20px 24px 17px;
    min-height: 76px;
    background: var(--paper);
    z-index: 10;
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    border: 0;
    text-align: left;
    line-height: 1;
    font-family: Jost,sans-serif;
    font-size: 13px;
    letter-spacing: .1px;
}

.wordmark b {
    font-weight: 600;
    display: block;
    margin-top: 2px;
}

.header-status {
    font-size: 9px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 6px 9px;
}

.network-note {
    background: #E7D9B6;
    padding: 9px 18px;
    flex: none;
    z-index: 9;
    font-size: 10px;
    line-height: 1.7;
}

.network-note[hidden] {
    display: none;
}

#app-main {
    flex: 1 0 auto;
    outline: none;
    padding-bottom: 119px;
}

.screen {
    padding: 0 24px 8px;
    animation: arrive .22s ease both;
    min-height: 100%;
}

.screen-top {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 21px;
}

.back-button,
.icon-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 50%;
    flex: none;
}

.back-button .icon {
    width: 20px;
}

.screen-top .overline {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 1.3px;
}

.screen-top .place-name {
    font-size: 11px;
    margin-left: auto;
    color: var(--muted);
}

.display {
    font-family: Fraunces,serif;
    font-weight: 500;
    letter-spacing: -1.5px;
    line-height: 1.06;
    font-variation-settings: 'SOFT' 30,'WONK' 1;
}

.screen h1 {
    font-size: 39px;
}

.screen .lede {
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted);
}

.primary,
.secondary,
.quiet {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 54px;
    border-radius: 16px;
    padding: 14px 19px;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    width: 100%;
}

.primary {
    background: var(--green);
    color: #fff;
}

.primary .icon {
    width: 19px;
    height: 19px;
    margin-left: auto;
}

.primary:active,
.answer-button:active {
    transform: scale(.985);
}

.primary:disabled {
    background: #D9E1D4;
    color: #687A6B;
}

.secondary {
    background: var(--surface);
    border-color: #CCD7C8;
}

.quiet {
    background: transparent;
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    min-height: 48px;
}

.quiet .icon {
    width: 17px;
    height: 17px;
}

.text-button {
    border: 0;
    background: none;
    color: var(--green);
    font-size: 11px;
    line-height: 1.7;
    padding: 10px 0;
    text-decoration: underline;
    text-underline-offset: 4px;
    min-height: 44px;
}

.button-stack {
    display: grid;
    gap: 9px;
}

.page-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    line-height: 1.7;
    color: var(--muted);
    margin: 0 0 12px;
}

.page-tag .icon {
    width: 14px;
    height: 14px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 26px 0 14px;
}

.section-heading h2 {
    font: 500 25px/1.2 Fraunces,serif;
    letter-spacing: -.6px;
}

.section-heading small {
    font-size: 10px;
    color: var(--muted);
}

.small-note {
    font-size: 10px;
    line-height: 1.8;
    color: var(--muted);
}

.bottom-nav {
    position: fixed;
    inset: auto 0 0;
    max-width: 540px;
    margin-inline: auto;
    z-index: 25;
    display: grid;
    grid-template-columns: 1fr 1fr 1.12fr 1fr 1fr;
    align-items: end;
    padding: 8px 12px calc(12px + var(--safe));
    background: var(--surface);
    border-top: 1px solid #D9DFD0;
    min-height: 88px;
    box-shadow: 0 -8px 25px #304A2910;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    gap: 5px;
    padding: 7px 0 0;
    min-height: 59px;
    background: none;
    border: 0;
    color: #6A796E;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.6;
    position: relative;
}

.nav-item>.icon {
    width: 21px;
    height: 21px;
}

.nav-item.active {
    color: var(--green);
}

.nav-item.active:not(.scan-nav):before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--coral);
    border-radius: 50%;
    position: absolute;
    top: 2px;
}

.scan-nav {
    margin-top: -33px;
    padding-top: 0;
    gap: 2px;
    color: var(--green);
    font-size: 9px;
    z-index: 2;
    min-height: 90px;
}

.scan-disc {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    background: var(--coral);
    color: #fff;
    border: 6px solid var(--paper);
    border-radius: 50%;
    box-shadow: 0 4px 13px #90341C2C;
}

.scan-disc>.icon {
    width: 26px;
    height: 26px;
    stroke-width: 1.7;
}

.scan-nav:active .scan-disc {
    transform: scale(.96);
}

.scan-nav.active .scan-disc {
    background: var(--green);
}

.entry-hero {
    height: 300px;
    position: relative;
    margin: 0 -24px;
    overflow: hidden;
}

.entry-sun {
    position: absolute;
    width: 245px;
    height: 245px;
    border-radius: 50%;
    right: -25px;
    top: 30px;
    background: var(--sun);
}

.entry-orbit {
    position: absolute;
    right: 4px;
    top: 10px;
    width: 295px;
    height: 295px;
    border: 1px dashed #97A487;
    border-radius: 50%;
    transform: rotate(15deg);
}

.entry-hero h1 {
    position: relative;
    padding: 29px 0 0 24px;
    font-size: 43px;
    line-height: 1.04;
    max-width: 240px;
    z-index: 2;
}

.entry-hero h1 em {
    font-style: normal;
    color: var(--coral);
}

.entry-fox {
    position: absolute;
    height: 310px;
    right: -24px;
    bottom: -39px;
    transform: rotate(-3deg);
    filter: drop-shadow(0 9px 8px #3C4D2115);
}

.hero-doodle {
    position: absolute;
    left: 30px;
    bottom: 21px;
    transform: rotate(-10deg);
    font-size: 10px;
    font-family: Jost,sans-serif;
    letter-spacing: 1.4px;
}

.hero-doodle .icon {
    width: 35px;
    height: 35px;
    vertical-align: middle;
    margin-right: 5px;
}

.code-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 23px;
    padding: 22px 21px;
    margin-top: 6px;
    position: relative;
}

.code-panel h2 {
    font-family: Fraunces,serif;
    font-weight: 500;
    font-size: 25px;
    letter-spacing: -.5px;
    margin: 0 0 8px;
}

.code-panel p {
    font-size: 11px;
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 15px;
}

.code-boxes {
    position: relative;
    margin-bottom: 14px;
}

.code-boxes input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .01;
    z-index: 1;
    border: 0;
    letter-spacing: 0;
    font-size: 22px;
    color: transparent;
    caret-color: transparent;
    cursor: text;
}

.code-digits {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 9px;
}

.code-digits span {
    display: grid;
    place-items: center;
    height: 57px;
    border: 1.5px solid #CCD6C5;
    border-radius: 12px;
    font: 500 24px/1 Jost,sans-serif;
    color: var(--green);
    background: var(--paper);
}

.code-boxes:focus-within .code-digits span {
    border-color: var(--green);
}

.code-digits span.current {
    box-shadow: 0 0 0 2px #8CAA8A55;
}

/* Keyboard focus sits on the invisible input; the box it types into shows it
   (the last box once every box is filled). */
.code-boxes:has(input:focus-visible) .code-digits span.current,
.code-boxes:has(input:focus-visible) .code-digits:not(:has(.current)) span:last-child {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.code-error {
    font-size: 11px !important;
    color: var(--danger) !important;
    margin: -3px 0 12px !important;
}

.code-error:empty {
    display: none;
}

.entry-foot {
    display: flex;
    align-items: start;
    gap: 9px;
    margin: 19px 4px 0;
}

.entry-foot .icon {
    width: 17px;
    color: var(--green);
    margin-top: 2px;
}

.entry-foot p {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.8;
}

.resume-card {
    margin: 4px 0 22px;
    padding: 17px;
    background: var(--green-soft);
    border-radius: 18px;
}

.resume-card .overline {
    font-size: 8px;
}

.resume-card h2 {
    font: 500 22px/1.3 Fraunces,serif;
    margin: 5px 0;
}

.resume-card p {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.8;
}

.resume-card .primary {
    margin-top: 13px;
    min-height: 48px;
}

.welcome-photo {
    position: relative;
    height: 191px;
    margin: 3px 0 20px;
    border-radius: 110px 110px 23px 23px;
    overflow: visible;
    background: #D9E4D0;
}

.welcome-photo>.photo-window {
    overflow: hidden;
    height: 100%;
    border-radius: inherit;
}

.welcome-photo .photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 46% 47%;
    filter: brightness(1.13);
}

.photo-label {
    position: absolute;
    left: 15px;
    bottom: 15px;
    padding: 7px 10px;
    border-radius: 99px;
    color: #fff;
    background: #173F38D9;
    font-size: 9px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.photo-label .icon {
    height: 12px;
    width: 12px;
}

/* Says what an AI image is, on the image, without competing with it. */
.photo-ai-note {
    position: absolute;
    left: 15px;
    bottom: 44px;
    max-width: calc(100% - 128px);
    padding: 4px 9px;
    border-radius: 10px;
    color: #fff;
    background: #173F38D9;
    font-size: 9px;
    line-height: 1.35;
}

.photo-ai-note.is-alone {
    bottom: 15px;
}

.photo-credit {
    position: absolute;
    left: 12px;
    top: 10px;
    color: white;
    background: #173F38C7;
    border-radius: 99px;
    border: 0;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    font-size: 11px;
}

.ferdinand-mini {
    position: absolute;
    right: -3px;
    bottom: -14px;
    width: 100px;
    height: 118px;
    overflow: hidden;
    background: #E0EBD8;
    border-radius: 54px 54px 42px 42px;
    border: 5px solid var(--paper);
    box-shadow: 0 4px 8px #293D2410;
}

.ferdinand-mini img {
    position: absolute;
    width: 142px;
    max-width: none;
    left: -22px;
    top: -4px;
}

.welcome .page-tag {
    margin-bottom: 8px;
}

.welcome h1 {
    font-size: 39px;
    margin-bottom: 13px;
    max-width: 340px;
}

.welcome .lede {
    font-size: 12px;
    line-height: 1.85;
    max-width: 335px;
}

.mission-facts {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 20px 0 20px;
    border-block: 1px solid var(--line);
    padding: 13px 0;
}

.mission-facts>span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    line-height: 1.6;
    flex: 1;
}

.mission-facts>span+span {
    border-left: 1px solid var(--line);
    padding-left: 15px;
    margin-left: 12px;
}

.mission-facts .icon {
    width: 16px;
    height: 16px;
}

.welcome .small-note {
    text-align: center;
    margin: 12px 0 0;
    font-size: 9px;
}

.guide-inline {
    display: flex;
    gap: 11px;
    padding: 15px 0 10px;
}

.guide-inline .icon {
    width: 19px;
    height: 19px;
    margin-top: 3px;
    color: var(--coral);
}

.guide-inline p {
    font-size: 11px;
    line-height: 1.85;
    color: var(--muted);
}

.guide-inline strong {
    color: var(--green);
    font-weight: 700;
}

.fiction-art {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: #EBD7C4;
    position: relative;
    overflow: hidden;
}

.fiction-art.blue {
    background: #DBE6E8;
}

.fiction-art>.icon {
    width: 106px;
    height: 106px;
    stroke-width: 1;
    color: #6D7861;
    z-index: 1;
}

.fiction-art:before,
.fiction-art:after {
    content: '';
    position: absolute;
    border: 1px solid #7E8E6E40;
    border-radius: 50%;
    width: 220px;
    height: 220px;
}

.fiction-art:after {
    width: 285px;
    height: 285px;
}

.fiction-art .art-sun {
    position: absolute;
    width: 75px;
    height: 75px;
    right: 55px;
    top: 15px;
    border-radius: 50%;
    background: #F7E7B6;
}

.mission-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 22px;
}

.mission-progress .overline {
    font-size: 9px;
    letter-spacing: 1.1px;
}

.steps {
    display: flex;
    gap: 6px;
}

.step-dot {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid #CED9C6;
    border-radius: 50%;
    font-size: 10px;
    color: #60745B;
}

.step-dot.done {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.step-dot.current {
    background: var(--sun);
    border-color: var(--sun);
    color: var(--green);
}

.step-dot .icon {
    height: 14px;
    width: 14px;
}

.question .stop {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 9px;
}

.question .stop .icon {
    height: 14px;
    width: 14px;
}

.question h1 {
    font-size: 33px;
    line-height: 1.12;
    letter-spacing: -1px;
    margin-bottom: 14px;
}

.question-text {
    font-size: 14px;
    line-height: 1.85;
    font-weight: 500;
    letter-spacing: -.1px;
}

.look-prompt {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.7;
    margin: 16px 0 20px;
}

.look-prompt .icon {
    width: 17px;
    height: 17px;
    color: var(--coral);
}

.answers {
    display: grid;
    gap: 11px;
}

.answer-button {
    display: flex;
    align-items: center;
    gap: 13px;
    text-align: left;
    width: 100%;
    padding: 14px 15px;
    min-height: 62px;
    background: var(--surface);
    border: 1.5px solid #CDD8C7;
    border-radius: 17px;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 600;
    transition: background .15s,border-color .15s,transform .15s;
}

.answer-letter {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border: 1px solid #D6DECD;
    background: var(--paper);
    border-radius: 50%;
    flex: none;
    font: 500 12px Jost,sans-serif;
}

.answer-button>span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.answer-button.wrong {
    border-color: #B37B66;
    background: #F4E6DA;
    color: #7F4E3B;
}

.answer-button.wrong .answer-letter {
    border-color: #CDA18C;
    color: #934F37;
}

.answer-button[disabled] {
    opacity: .65;
}

.answer-button.correct {
    background: var(--green-soft);
    border-color: var(--green);
    color: var(--green);
}

.answer-button>.icon {
    width: 18px;
    height: 18px;
}

.fox-avatar {
    position: relative;
    flex: none;
    width: 47px;
    height: 52px;
    overflow: hidden;
    border-radius: 50%;
    background: #F2DDA3;
}

.fox-avatar img {
    width: 76px;
    max-width: none;
    position: absolute;
    left: -15px;
    top: -4px;
}

.success-view {
    text-align: center;
    padding-top: 5px;
}

.success-illustration {
    position: relative;
    height: 226px;
    margin-bottom: 12px;
}

.success-illustration:before {
    content: '';
    position: absolute;
    width: 196px;
    height: 196px;
    border-radius: 50%;
    background: var(--green-soft);
    left: 50%;
    top: 7px;
    transform: translateX(-50%);
}

.success-illustration img {
    position: relative;
    height: 242px;
    max-width: none;
    top: -4px;
    filter: drop-shadow(0 8px 8px #2E412015);
}

.success-spark {
    position: absolute;
    z-index: 1;
    color: var(--coral);
    left: 18%;
    top: 33px;
    transform: rotate(12deg);
}

.success-spark .icon {
    width: 33px;
    height: 33px;
}

.success-mark {
    position: absolute;
    right: 18%;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 53px;
    height: 53px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    border: 6px solid var(--paper);
}

.success-view h1 {
    font-size: 37px;
    margin-bottom: 13px;
}

.success-view>.lede {
    font-size: 12px;
    line-height: 1.85;
    margin: 0 auto 19px;
    max-width: 310px;
}

.found-token {
    font-size: 9px;
    letter-spacing: 1.1px;
    color: var(--muted);
    margin-bottom: 13px;
}

.success-view .primary {
    margin-top: 20px;
}

.result .success-illustration {
    height: 222px;
}

.result .success-illustration img {
    height: 238px;
}

.result h1 {
    font-size: 40px;
}

.result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-block: 1px solid var(--line);
    padding: 18px 0;
    margin: 21px 0;
}

.result-stats strong {
    display: block;
    font: 500 31px/1.2 Fraunces,serif;
}

.result-stats span {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.7;
    display: block;
    margin-top: 5px;
}

.result-stats>div+div {
    border-left: 1px solid var(--line);
}

.result .small-note {
    margin: 11px auto 0;
    font-size: 9px;
}

.seal {
    width: 100%;
    height: auto;
    display: block;
}

.seal.locked .seal-stop-1 {
    stop-color: var(--seal-lock-1,#E3E5DA);
}

.seal.locked .seal-stop-2 {
    stop-color: var(--seal-lock-2,#F0F1E9);
}

.seal.locked .seal-stop-3 {
    stop-color: var(--seal-lock-3,#D7DDCF);
}

.seal.locked .seal-ribbon {
    fill: var(--seal-lock-ribbon,#B9C5B6);
}

.seal.locked .seal-rim,
.seal.locked .seal-ring {
    stroke: var(--seal-lock-stroke,#C8CFBF);
}

.seal.locked .seal-dots {
    stroke: var(--seal-lock-ring,#D1D7CB);
}

.seal.locked .seal-symbol {
    stroke: var(--seal-lock-ink,#8B9E88);
}

.seal.locked .seal-arc {
    stroke: var(--seal-lock-detail,#B5C1AE);
}

.seal.locked .seal-star {
    fill: var(--seal-lock-detail,#9AAA92);
}

.award-stage {
    position: relative;
    width: 225px;
    margin: 7px auto 4px;
    animation: sealReveal .7s cubic-bezier(.2,.7,.2,1) both;
}

.award-stage:before {
    content: '';
    position: absolute;
    inset: 30px;
    border: 1px solid #D5DCC6;
    border-radius: 50%;
    transform: scale(1.5);
}

.award-stage .seal {
    position: relative;
    z-index: 1;
}

.award {
    text-align: center;
    padding-top: 7px;
}

.award h1 {
    font-size: 39px;
    margin: 5px 0 13px;
}

.award>.overline {
    font-size: 9px;
    color: var(--muted);
}

.award .lede {
    font-size: 12px;
    line-height: 1.85;
    margin: 0 auto;
    max-width: 310px;
}

.award-place {
    font-size: 10px;
    color: var(--muted);
    margin: 15px 0 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.award-place .icon {
    width: 14px;
    height: 14px;
}

.award .primary {
    margin-top: 22px;
}

.confetti {
    position: fixed;
    inset: 0;
    max-width: 540px;
    margin-inline: auto;
    pointer-events: none;
    overflow: hidden;
    z-index: 30;
}

.confetti i {
    position: absolute;
    width: 5px;
    height: 10px;
    background: var(--coral);
    left: var(--x,50%);
    top: 16%;
    border-radius: 2px;
    animation: confetti 1.3s var(--delay,0s) ease-out both;
}

.confetti i:nth-child(1) { --x: 12%; --delay: 0s; }
.confetti i:nth-child(2) { --x: 17.7%; --delay: .07s; }
.confetti i:nth-child(3) { --x: 23.4%; --delay: .14s; }
.confetti i:nth-child(4) { --x: 29.1%; --delay: .21s; }
.confetti i:nth-child(5) { --x: 34.8%; --delay: 0s; }
.confetti i:nth-child(6) { --x: 40.5%; --delay: .07s; }
.confetti i:nth-child(7) { --x: 46.2%; --delay: .14s; }
.confetti i:nth-child(8) { --x: 51.9%; --delay: .21s; }
.confetti i:nth-child(9) { --x: 57.6%; --delay: 0s; }
.confetti i:nth-child(10) { --x: 63.3%; --delay: .07s; }
.confetti i:nth-child(11) { --x: 69%; --delay: .14s; }
.confetti i:nth-child(12) { --x: 74.7%; --delay: .21s; }
.confetti i:nth-child(13) { --x: 80.4%; --delay: 0s; }
.confetti i:nth-child(14) { --x: 86.1%; --delay: .07s; }

.confetti i:nth-child(3n) {
    background: var(--sun);
}

.confetti i:nth-child(2n) {
    background: var(--green);
}

.collection h1,
.places h1,
.help h1 {
    font-size: 38px;
    margin: 7px 0 12px;
}

.collection .lede {
    font-size: 12px;
    line-height: 1.85;
}

.empty-seal {
    width: 170px;
    margin: 22px auto 10px;
    opacity: .85;
}

.empty-collection {
    text-align: center;
    padding-top: 8px;
}

.empty-collection h2 {
    font: 500 29px/1.12 Fraunces,serif;
    letter-spacing: -.8px;
    margin: 7px 0 12px;
}

.empty-collection p {
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
    max-width: 300px;
    margin: 0 auto 22px;
}

.collection-note {
    display: flex;
    align-items: start;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding: 17px 0 0;
    margin-top: 23px;
}

.collection-note .icon {
    height: 15px;
    width: 15px;
    margin-top: 2px;
}

.collection-note p {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.8;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 13px;
    margin: 20px 0 24px;
}

.badge-item {
    background: none;
    border: 0;
    padding: 0;
    text-align: center;
    min-width: 0;
}

.badge-item>.seal {
    width: 100%;
    max-width: 115px;
    margin: auto;
}

.badge-item strong {
    font-size: 9px;
    line-height: 1.7;
    font-weight: 700;
    display: block;
    overflow-wrap: anywhere;
    margin-top: 7px;
}

.badge-item small {
    display: block;
    font-size: 9px;
    color: var(--muted);
    margin-top: 3px;
}

.visit-row {
    display: flex;
    align-items: center;
    gap: 13px;
    border-block: 1px solid var(--line);
    padding: 17px 0;
    background: none;
    width: 100%;
    text-align: left;
    border-inline: 0;
    min-height: 84px;
}

.visit-icon {
    width: 48px;
    height: 53px;
    border-radius: 22px 22px 11px 11px;
    background: var(--green-soft);
    display: grid;
    place-items: center;
    flex: none;
}

.visit-icon .icon {
    width: 25px;
    height: 25px;
    stroke-width: 1.4;
}

.visit-row>div:nth-child(2) {
    flex: 1;
}

.visit-row strong {
    display: block;
    font: 500 21px/1.3 Fraunces,serif;
    letter-spacing: -.4px;
}

.visit-row small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.8;
    margin-top: 3px;
}

.visit-row>.icon {
    width: 17px;
}

.collection-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
    margin: 16px 0;
}

.collection-total strong {
    font: 500 35px/1 Fraunces,serif;
    color: var(--green);
}

.map-filters {
    display: flex;
    gap: 7px;
    margin: 19px 0 16px;
    flex-wrap: wrap;
}

.filter-chip {
    font-size: 10px;
    line-height: 1.5;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid #CCD7C7;
    border-radius: 99px;
    background: transparent;
    font-weight: 600;
}

.filter-chip.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.map-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.map-tabs button {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    border: 0;
    background: none;
    padding: 8px 0;
    min-height: 35px;
}

.map-tabs .icon {
    width: 15px;
    height: 15px;
}

.map-tabs .active {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.map-viewport {
    height: 330px;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #E6EAD9;
    touch-action: none;
    cursor: grab;
}

.map-viewport:active {
    cursor: grabbing;
}

.map-plane {
    position: absolute;
    inset: -20px;
    transform-origin: center;
    will-change: transform;
}

.landscape {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
}

.map-pin {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%,-100%);
    background: var(--surface);
    border: 2px solid var(--green);
    border-radius: 50% 50% 50% 7px;
    rotate: -45deg;
    width: 44px;
    height: 44px;
    color: var(--green);
    display: grid;
    place-items: center;
    box-shadow: 0 4px 7px #2443201B;
    z-index: 2;
}

.map-pin .icon {
    rotate: 45deg;
    width: 22px;
    height: 22px;
    pointer-events: none;
}

.map-pin.selected {
    background: var(--green);
    color: white;
    z-index: 3;
}

.map-pin.completed:after {
    content: '✓';
    position: absolute;
    right: -7px;
    top: -5px;
    font-size: 10px;
    width: 18px;
    height: 18px;
    background: var(--sun);
    color: var(--green);
    border-radius: 50%;
    display: grid;
    place-items: center;
    rotate: 45deg;
}

.map-pin-label {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%,9px);
    font-size: 9px;
    line-height: 1.5;
    white-space: nowrap;
    background: #F8F6EDD9;
    padding: 3px 7px;
    border-radius: 5px;
    pointer-events: none;
    font-weight: 600;
}

.map-controls {
    position: absolute;
    right: 12px;
    bottom: 13px;
    display: grid;
    gap: 6px;
    z-index: 5;
}

.map-controls button {
    border: 1px solid #CDD7C5;
    width: 37px;
    height: 37px;
    border-radius: 12px;
    background: var(--surface);
    display: grid;
    place-items: center;
    box-shadow: 0 2px 5px #203A2010;
}

.map-controls .icon {
    width: 17px;
    height: 17px;
}

.map-caption {
    font-size: 8px;
    line-height: 1.7;
    color: var(--muted);
    margin: 9px 2px 0;
}

.place-preview {
    padding: 18px 0 0;
    display: grid;
    grid-template-columns: 55px 1fr 25px;
    gap: 12px;
    align-items: center;
}

.place-preview h2 {
    font: 500 24px/1.1 Fraunces,serif;
    letter-spacing: -.5px;
}

.place-preview p {
    font-size: 10px;
    line-height: 1.8;
    color: var(--muted);
    margin-top: 7px;
}

.place-preview button {
    grid-column: 1/-1;
}

.place-list-card {
    width: 100%;
    padding: 16px 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
}

.place-list-card .visit-icon {
    width: 57px;
    height: 65px;
}

.place-list-card>div:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.place-list-card h2 {
    font: 500 23px/1.2 Fraunces,serif;
    letter-spacing: -.4px;
}

.place-list-card p {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.8;
    margin-top: 6px;
}

.place-list-card>.icon {
    width: 16px;
}

.places .lede {
    font-size: 12px;
}

.detail .welcome-photo {
    height: 205px;
}

.detail h1 {
    margin: 10px 0 12px;
    font-size: 38px;
}

.detail .detail-body {
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
}

.scan-screen {
    text-align: center;
}

.scan-screen .screen-top {
    text-align: left;
}

.scan-screen h1 {
    font-size: 36px;
    line-height: 1.1;
    max-width: 310px;
    margin: 5px auto 12px;
}

.scan-screen>.lede {
    font-size: 12px;
    line-height: 1.85;
    margin: 0 auto;
    max-width: 290px;
}

.scanner-frame {
    position: relative;
    height: 280px;
    border-radius: 27px;
    background: #DCE7D5;
    margin: 23px 0 17px;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.scanner-idle {
    position: relative;
    color: var(--green);
}

.scanner-idle>.icon {
    width: 81px;
    height: 81px;
    stroke-width: 1;
}

.scanner-idle:before,
.scanner-idle:after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border: 1px solid #9DBB945C;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}

.scanner-idle:after {
    width: 210px;
    height: 210px;
}

.scan-corners {
    position: absolute;
    inset: 32px;
    border-radius: 21px;
    pointer-events: none;
    z-index: 3;
    box-shadow: 0 0 0 35px #173F3809;
}

.scan-corners i {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: var(--surface);
    border-style: solid;
    border-width: 3px 0 0 3px;
    left: 0;
    top: 0;
    border-radius: 10px 0 0;
}

.scan-corners i:nth-child(2) {
    left: auto;
    right: 0;
    transform: rotate(90deg);
}

.scan-corners i:nth-child(3) {
    left: auto;
    right: 0;
    top: auto;
    bottom: 0;
    transform: rotate(180deg);
}

.scan-corners i:nth-child(4) {
    top: auto;
    bottom: 0;
    transform: rotate(270deg);
}

#camera-reader {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0 !important;
}

#camera-reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

#camera-reader>div {
    position: absolute !important;
    inset: 0 !important;
}

#qr-shaded-region {
    display: none;
}

.camera-status {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: 15px;
}

.camera-error {
    font-size: 11px;
    line-height: 1.85;
    color: var(--danger);
    margin: 12px 0 17px;
    background: #F1E4D8;
    padding: 13px;
    border-radius: 13px;
}

.camera-active .scanner-idle {
    display: none;
}

.scanner-frame.camera-active:after {
    content: '';
    position: absolute;
    inset: 47% 44px auto;
    height: 1px;
    background: #E9E7AD;
    z-index: 4;
    animation: scan-line 2.4s ease-in-out infinite;
}

.scanner-frame .scan-live {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: #173F38BF;
    font-size: 9px;
    letter-spacing: 1px;
    border-radius: 99px;
    padding: 7px 11px;
    z-index: 4;
}

.scan-screen .code-panel {
    text-align: left;
    margin-top: 17px;
}

.scan-screen .small-note {
    font-size: 9px;
    margin: 12px 0 0;
}

.help .lede {
    font-size: 12px;
}

.help-lead {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 23px 0;
}

.help-lead .fox-avatar {
    width: 63px;
    height: 70px;
}

.help-lead .fox-avatar img {
    width: 99px;
    left: -18px;
}

.help-lead strong {
    font: 500 23px/1.2 Fraunces,serif;
    max-width: 230px;
}

.help details {
    border-top: 1px solid var(--line);
    padding: 0;
}

.help summary {
    list-style: none;
    cursor: pointer;
    min-height: 65px;
    padding: 19px 27px 19px 0;
    font-size: 12px;
    line-height: 1.8;
    font-weight: 600;
    position: relative;
}

.help summary::-webkit-details-marker {
    display: none;
}

.help summary:after {
    content: '+';
    position: absolute;
    right: 5px;
    top: 18px;
    font-size: 19px;
    font-weight: 400;
}

.help details[open] summary:after {
    content: '−';
}

.help details p {
    font-size: 11px;
    line-height: 1.95;
    color: var(--muted);
    padding: 0 0 18px;
}

.help .help-legal {
    margin: 26px 0 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.help-legal p {
    font-size: 9px;
    line-height: 1.9;
    color: var(--muted);
}

.help-legal a {
    font-size: 10px;
    display: inline-block;
    margin-top: 12px;
    text-underline-offset: 4px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 8px 0 22px;
    padding: 17px 0;
    border-block: 1px solid var(--line);
    font-size: 11px;
    line-height: 1.7;
}

.setting-row small {
    display: block;
    font-size: 9px;
    color: var(--muted);
    margin-top: 4px;
}

.switch {
    width: 44px;
    height: 27px;
    flex: none;
    border: 0;
    background: #CAD6C4;
    border-radius: 99px;
    padding: 3px;
}

.switch:after {
    content: '';
    display: block;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: white;
    transition: transform .18s;
}

.switch[aria-checked=true] {
    background: var(--green);
}

.switch[aria-checked=true]:after {
    transform: translateX(17px);
}

.bottom-sheet {
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 27px 27px 0 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    max-height: 90dvh;
    margin: auto auto 0;
    overflow: auto;
    position: fixed;
    bottom: 0;
    box-shadow: 0 -12px 70px #142D292C;
}

.bottom-sheet::backdrop {
    background: #16383075;
    backdrop-filter: blur(3px);
}

.sheet-handle {
    display: block;
    width: 35px;
    height: 4px;
    border-radius: 99px;
    background: #C1CCBA;
    margin: 10px auto 0;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 12px;
}

.sheet-head h2 {
    font: 500 29px/1.15 Fraunces,serif;
    letter-spacing: -.7px;
}

.sheet-head button {
    width: 39px;
    height: 39px;
    flex: none;
}

.sheet-head .icon {
    width: 17px;
}

.sheet-body {
    padding: 0 24px calc(25px + var(--safe));
}

.sheet-body>.lede {
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
    margin-bottom: 20px;
}

.intro-fox {
    height: 171px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.intro-fox:before {
    content: '';
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    width: 176px;
    height: 176px;
    border-radius: 50%;
    background: var(--sun);
}

.intro-fox img {
    position: relative;
    height: 220px;
    top: 5px;
}

.intro-steps {
    display: grid;
    gap: 15px;
    margin: 17px 0 24px;
}

.intro-step {
    display: flex;
    gap: 11px;
    align-items: center;
}

.intro-step>.icon {
    width: 25px;
    height: 25px;
    color: var(--green);
    flex: none;
}

.intro-step strong {
    font-size: 12px;
    display: block;
    line-height: 1.5;
}

.intro-step small {
    font-size: 10px;
    color: var(--muted);
    display: block;
    line-height: 1.7;
    margin-top: 3px;
}

.sheet-body .seal {
    width: 150px;
    margin: 0 auto 10px;
}

.sheet-body .badge-description {
    text-align: center;
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
    margin-bottom: 18px;
}

.app-toast {
    position: fixed;
    bottom: calc(110px + var(--safe));
    left: max(18px,calc(50% - 252px));
    right: max(18px,calc(50% - 252px));
    background: var(--green);
    color: white;
    box-shadow: 0 4px 15px #18392422;
    z-index: 50;
    padding: 13px 16px;
    border-radius: 13px;
    font-size: 11px;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: .2s;
}

.app-toast.visible {
    opacity: 1;
    transform: none;
}

@keyframes arrive {
    from {
        opacity: .5;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes sealReveal {
    from {
        opacity: .3;
        transform: scale(.86) rotate(-8deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

@keyframes confetti {
    0% {
        opacity: 0;
        transform: translateY(-20px) rotate(0);
    }
    15% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(440px) rotate(200deg);
    }
}

@keyframes scan-line {
    0%,
    100% {
        transform: translateY(-72px);
        opacity: .4;
    }
    50% {
        transform: translateY(72px);
        opacity: .9;
    }
}

/* The prototype's mobile layout (max-width:900px), unconditional in production. */

.app-header {
    padding-top: calc(17px + env(safe-area-inset-top,0px));
    min-height: 73px;
}

.screen {
    padding-inline: 25px;
}

.entry-hero {
    margin-inline: -25px;
}

.entry-hero h1 {
    padding-left: 25px;
}

@media (max-width:370px) {
    .app-header {
        padding-inline: 20px;
        padding-block: 14px;
        padding-top: calc(14px + env(safe-area-inset-top,0px));
        min-height: 65px;
    }
    .wordmark {
        font-size: 12px;
    }
    .brand-signet {
        height: 31px;
    }
    .header-status {
        font-size: 8px;
        padding: 5px 8px;
    }
    .screen {
        padding-inline: 20px;
    }
    .entry-hero {
        margin-inline: -20px;
        height: 262px;
    }
    .entry-hero h1 {
        font-size: 38px;
        padding-left: 20px;
        max-width: 215px;
        padding-top: 22px;
    }
    .entry-fox {
        height: 280px;
        right: -36px;
        bottom: -32px;
    }
    .entry-sun {
        width: 213px;
        height: 213px;
        right: -38px;
        top: 24px;
    }
    .entry-orbit {
        width: 265px;
        height: 265px;
        right: -22px;
        top: 3px;
    }
    .hero-doodle {
        left: 22px;
        font-size: 9px;
        bottom: 15px;
    }
    .hero-doodle .icon {
        width: 26px;
        height: 26px;
    }
    .code-panel {
        padding: 19px 16px;
    }
    .code-panel h2 {
        font-size: 23px;
    }
    .code-panel p {
        font-size: 10px;
    }
    .code-digits {
        gap: 7px;
    }
    .code-digits span {
        height: 49px;
        font-size: 23px;
    }
    .primary,
    .secondary {
        min-height: 51px;
        padding: 12px 15px;
        font-size: 12px;
    }
    .bottom-nav {
        padding-inline: 6px;
    }
    .nav-item {
        font-size: 8px;
    }
    .scan-disc {
        width: 66px;
        height: 66px;
    }
    .scan-nav {
        min-height: 85px;
    }
    .welcome-photo {
        height: 161px;
        margin-bottom: 17px;
    }
    .welcome h1 {
        font-size: 34px;
    }
    .welcome .lede {
        font-size: 11px;
        line-height: 1.8;
    }
    .mission-facts {
        margin-block: 16px;
        padding-block: 12px;
    }
    .mission-facts>span {
        font-size: 9px;
        gap: 5px;
    }
    .mission-facts>span+span {
        padding-left: 10px;
        margin-left: 10px;
    }
    .ferdinand-mini {
        width: 86px;
        height: 104px;
    }
    .ferdinand-mini img {
        width: 125px;
        left: -20px;
    }
    .question h1 {
        font-size: 30px;
    }
    .question-text {
        font-size: 13px;
        line-height: 1.8;
    }
    .answer-button {
        min-height: 58px;
        font-size: 12px;
        padding: 12px;
    }
    .answer-letter {
        width: 29px;
        height: 29px;
    }
    .mission-progress {
        margin-bottom: 17px;
    }
    .step-dot {
        width: 25px;
        height: 25px;
    }
    .steps {
        gap: 5px;
    }
    .success-view h1 {
        font-size: 33px;
    }
    .success-illustration {
        height: 200px;
    }
    .success-illustration img {
        height: 216px;
    }
    .success-illustration:before {
        width: 176px;
        height: 176px;
    }
    .result .success-illustration {
        height: 195px;
    }
    .result .success-illustration img {
        height: 214px;
    }
    .result h1 {
        font-size: 35px;
    }
    .result-stats {
        padding: 15px 0;
        margin: 18px 0;
    }
    .result-stats strong {
        font-size: 28px;
    }
    .award-stage {
        width: 198px;
    }
    .award h1 {
        font-size: 33px;
    }
    .award .lede {
        font-size: 11px;
    }
    .screen h1 {
        overflow-wrap: anywhere;
    }
    .collection h1,
    .places h1,
    .help h1,
    .detail h1 {
        font-size: 33px;
    }
    .scan-screen h1 {
        font-size: 32px;
    }
    .scanner-frame {
        height: 237px;
    }
    .scan-corners {
        inset: 27px;
    }
    .scan-screen>.lede {
        font-size: 11px;
    }
    .badge-grid {
        gap: 9px;
    }
    .badge-item strong {
        font-size: 8px;
    }
    .badge-item small {
        font-size: 8px;
    }
    .map-viewport {
        height: 295px;
    }
    .sheet-head {
        padding-inline: 20px;
    }
    .sheet-body {
        padding-inline: 20px;
    }
    .screen-top {
        margin-bottom: 16px;
    }
}

[hidden] {
    display: none !important;
}

.answer-rule {
    font-size: 10px;
    line-height: 1.8;
    color: var(--muted);
    margin: 15px 2px 23px;
}

.field-guide {
    display: flex;
    gap: 12px;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 17px;
    margin-top: 17px;
}

.field-guide p {
    font: 500 17px/1.45 Fraunces,serif;
    letter-spacing: -.2px;
}

.field-guide p span {
    display: block;
    font: 600 8px/1.7 Manrope,sans-serif;
    letter-spacing: 1.2px;
    color: var(--muted);
    margin-top: 7px;
}

.recorded-answer {
    padding: 17px 18px;
    text-align: left;
    background: var(--green-soft);
    border-radius: 17px;
    margin: 17px 0 0;
}

.recorded-answer>span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
}

.recorded-answer .icon {
    width: 16px;
    height: 16px;
}

.recorded-answer strong {
    display: block;
    font-size: 13px;
    line-height: 1.7;
    margin: 7px 0;
}

.recorded-answer small {
    font-size: 9px;
    line-height: 1.7;
    color: var(--muted);
}

.recorded-answer.incorrect {
    background: #EEE4D5;
}

.recorded-answer.incorrect>span {
    color: #8E4232;
}

.success-illustration.reflect:before {
    background: #EDE2CB;
}

.success-illustration.reflect .success-mark {
    background: #8B6947;
}

.success-illustration.reflect .success-spark {
    color: #8B6947;
}

.feedback.is-wrong h1 {
    font-size: 33px;
    max-width: 310px;
    margin-inline: auto;
}

.success-view .screen-top {
    text-align: left;
}

.score-total {
    font: 400 17px/1.2 Manrope,sans-serif;
    color: var(--muted);
}

.result-outcomes {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 0 0 13px;
}

.result-outcomes>span {
    width: 41px;
    height: 41px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--green-soft);
    color: var(--green);
}

.result-outcomes>span.wrong {
    background: #EEE0D3;
    color: #8E4232;
}

.result-outcomes .icon {
    height: 19px;
    width: 19px;
}

.result-outcomes small {
    position: absolute;
    right: -3px;
    bottom: -4px;
    font-size: 8px;
    background: var(--paper);
    border-radius: 99px;
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
}

.extra-award {
    display: flex;
    gap: 12px;
    align-items: center;
    text-align: left;
    background: var(--green-soft);
    padding: 15px;
    border-radius: 16px;
    margin-top: 12px;
}

.extra-award>.icon {
    width: 26px;
    height: 26px;
}

.extra-award strong {
    font-size: 11px;
    line-height: 1.7;
    display: block;
}

.extra-award span {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.8;
}

.map-view-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 11px;
}

.map-view-bar>.overline {
    font-size: 8px;
    color: var(--muted);
    letter-spacing: 1.2px;
}

.map-empty {
    text-align: center;
    padding: 45px 12px;
}

.map-empty>.icon {
    width: 60px;
    height: 60px;
    stroke-width: 1;
}

.map-empty h2 {
    font: 500 27px/1.2 Fraunces,serif;
    margin: 18px 0 10px;
}

.map-empty p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: 24px;
}

.map-controls button {
    width: 44px;
    height: 44px;
}

.map-tabs button {
    min-height: 44px;
}

.filter-chip {
    min-height: 44px;
}

.photo-credit {
    width: 44px;
    height: 44px;
    left: 8px;
    top: 5px;
    background: transparent;
}

.photo-credit:before {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #173F38C7;
    z-index: -1;
}

.photo-credit {
    isolation: isolate;
}

.entry-hero h1 {
    font-size: 42px;
    max-width: 240px;
    letter-spacing: -1.7px;
}

.entry-fox {
    right: -35px;
}

.result .success-illustration {
    height: 150px;
    margin-bottom: 8px;
}

.result .success-illustration img {
    height: 166px;
}

.result .success-illustration:before {
    width: 145px;
    height: 145px;
}

.result .success-mark {
    width: 44px;
    height: 44px;
    right: 22%;
    bottom: 4px;
}

.result .success-mark .icon {
    width: 20px;
    height: 20px;
}

.result h1 {
    font-size: 35px;
}

.result .found-token {
    font-size: 8px;
}

.result .result-stats {
    margin: 16px 0;
    padding: 14px 0;
}

.result>.lede {
    margin-bottom: 14px;
}

.result .primary {
    margin-top: 17px;
}

.result-outcomes {
    margin-bottom: 12px;
}

.result .small-note {
    font-size: 9px;
    line-height: 1.6;
}

.result .screen-top {
    margin-bottom: 10px;
}

@media (max-width:370px) {
    .entry-hero h1 {
        font-size: 37px;
        max-width: 205px;
    }
    .entry-fox {
        right: -43px;
    }
    .result .success-illustration {
        height: 135px;
    }
    .result .success-illustration img {
        height: 150px;
    }
    .result .success-illustration:before {
        width: 130px;
        height: 130px;
    }
    .result h1 {
        font-size: 31px;
    }
    .result .success-mark {
        right: 19%;
    }
    .result .found-token {
        font-size: 7px;
    }
}

.step-dot.done.incorrect {
    background: #EEE0D3;
    border-color: #E2CABA;
    color: #8E4232;
}

.wordmark {
    min-height: 44px;
}

.sheet-head button {
    width: 44px;
    height: 44px;
}

.switch {
    position: relative;
    height: 44px;
    background: transparent !important;
    padding: 0;
}

.switch:before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 44px;
    height: 27px;
    border-radius: 99px;
    background: #CAD6C4;
}

.switch:after {
    position: absolute;
    left: 3px;
    top: 11px;
}

.switch[aria-checked=true]:before {
    background: var(--green);
}

@media (prefers-reduced-motion:reduce) {
    *,
    *:before,
    *:after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    .confetti {
        display: none;
    }
}

/* ===== theme.css ===== */

/* Three deliberate palettes. The two night modes use tinted surfaces, not black. */

:root {
    --frame-bg: #EAEDE2;
    --nav-ink: #6A796E;
    --scan: #C84D30;
    --action-ink: #FFFFFF;
    --field-line: #CCD7C8;
    --wrong-bg: #EEE0D3;
    --wrong-ink: #8E4232;
    --disabled-bg: #D9E1D4;
    --disabled-ink: #687A6B;
    --scanner-bg: #DCE7D5;
    --stage-reflect: #EDE2CB;
    --map-ground: #EDEDDC;
    --map-forest: #D8E5C6;
    --map-meadow: #D9E4C9;
    --map-near: #C5D8B5;
    --map-water: #B8D9D5;
    --map-road: #FCFBF3;
    --map-road-edge: #D4D8C5;
    --map-trail: #AAB99A;
    --map-tree: #91AF83;
    --map-shrub: #B9C9AA;
    --map-label: #7A8B76;
    --map-label-surface: #F8F6EDD9;
}

:root[data-theme=waldnacht] {
    --paper: #182D27;
    --surface: #213A32;
    --ink: #F0F2E6;
    --muted: #B5C3B2;
    --line: #3D5549;
    --green: #C2D9AB;
    --green-soft: #2F493C;
    --coral: #ECA47B;
    --sun: #E9CE8B;
    --danger: #F3B6A5;
    --frame-bg: #10251F;
    --nav-ink: #ADBEA9;
    --scan: #C95836;
    --action-ink: #1A3328;
    --field-line: #55705C;
    --wrong-bg: #49382E;
    --wrong-ink: #F2BCA5;
    --disabled-bg: #32493D;
    --disabled-ink: #AABBA2;
    --scanner-bg: #2D4A3D;
    --stage-reflect: #493F2D;
    --map-ground: #2B4034;
    --map-forest: #35523D;
    --map-meadow: #3E5941;
    --map-near: #4A6446;
    --map-water: #456E6B;
    --map-road: #D5D6B6;
    --map-road-edge: #9BA889;
    --map-trail: #8BA780;
    --map-tree: #A3BB88;
    --map-shrub: #708F63;
    --map-label: #C7D5B3;
    --map-label-surface: #213A32EA;
    --seal-lock-1: #405846;
    --seal-lock-2: #53674E;
    --seal-lock-3: #334C3D;
    --seal-lock-stroke: #6F8264;
    --seal-lock-ring: #78906B;
    --seal-lock-ink: #CCDBBD;
    --seal-lock-ribbon: #59714E;
    --seal-lock-detail: #869C78;
    --focus: var(--coral);
    color-scheme: dark;
}

:root[data-theme=abendblau] {
    --paper: #252D43;
    --surface: #303A52;
    --ink: #F4EEE1;
    --muted: #BDC6D7;
    --line: #4D5873;
    --green: #D8DDB5;
    --green-soft: #3C4C53;
    --coral: #F0AA85;
    --sun: #E9CC85;
    --danger: #F4B7B0;
    --frame-bg: #1B2336;
    --nav-ink: #B8C4D6;
    --scan: #C95836;
    --action-ink: #283344;
    --field-line: #65748F;
    --wrong-bg: #4C3D48;
    --wrong-ink: #F4BBB0;
    --disabled-bg: #3D4760;
    --disabled-ink: #B3BFD1;
    --scanner-bg: #3B4B62;
    --stage-reflect: #4D4351;
    --map-ground: #35434E;
    --map-forest: #3E5756;
    --map-meadow: #4C6059;
    --map-near: #5E6E60;
    --map-water: #587F94;
    --map-road: #D9D8BC;
    --map-road-edge: #9EADAC;
    --map-trail: #A8B499;
    --map-tree: #B1C19D;
    --map-shrub: #809881;
    --map-label: #D1DBC9;
    --map-label-surface: #303A52EC;
    --seal-lock-1: #435362;
    --seal-lock-2: #5B6873;
    --seal-lock-3: #3C4B5D;
    --seal-lock-stroke: #7E8A92;
    --seal-lock-ring: #879499;
    --seal-lock-ink: #D7DFD8;
    --seal-lock-ribbon: #586B74;
    --seal-lock-detail: #94A8AC;
    --focus: var(--coral);
    color-scheme: dark;
}

.app-header {
    gap: 9px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

/* One line in every locale: a long status is shortened, never wrapped. */
.header-status {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    display: grid;
    place-items: center;
    flex: none;
}

.theme-toggle>.icon {
    width: 19px;
    height: 19px;
}

.theme-toggle>.theme-moon,
:root:not([data-theme=tag]) .theme-toggle>.theme-sun {
    display: none;
}

/* The signet's dark brown needs a light ground on the dark palettes. */
:root:not([data-theme=tag]) .brand-signet {
    border-radius: 6px;
    background: var(--ink);
    box-shadow: 0 0 0 4px var(--ink);
}

:root:not([data-theme=tag]) .wordmark {
    gap: 13px;
}

:root:not([data-theme=tag]) .theme-toggle>.theme-moon {
    display: block;
}

.primary {
    color: var(--action-ink);
}

.primary:disabled {
    background: var(--disabled-bg);
    color: var(--disabled-ink);
}

.secondary {
    border-color: var(--field-line);
}

.code-digits span,
.answer-button {
    border-color: var(--field-line);
}

.answer-letter {
    border-color: var(--line);
}

.answer-button.wrong,
.recorded-answer.incorrect {
    background: var(--wrong-bg);
    color: var(--ink);
    border-color: var(--wrong-ink);
}

.recorded-answer.incorrect>span {
    color: var(--wrong-ink);
}

.answer-button.wrong .answer-letter {
    border-color: var(--wrong-ink);
    color: var(--wrong-ink);
}

.success-mark {
    color: var(--action-ink);
}

.success-illustration.reflect:before {
    background: var(--stage-reflect);
}

.success-illustration.reflect .success-mark {
    color: white;
}

.result-outcomes>span.wrong,
.step-dot.done.incorrect {
    background: var(--wrong-bg);
    color: var(--wrong-ink);
    border-color: var(--wrong-bg);
}

.step-dot.done:not(.incorrect) {
    color: var(--action-ink);
}

.result-outcomes>span.right {
    color: var(--green);
}

.code-digits span {
    color: var(--ink);
}

.code-boxes:focus-within .code-digits span {
    border-color: var(--green);
}

.step-dot {
    color: var(--muted);
    border-color: var(--line);
}

.step-dot.current {
    color: #173F38;
}

.filter-chip {
    border-color: var(--field-line);
}

.filter-chip.active {
    color: var(--action-ink);
}

.map-viewport {
    background: var(--map-ground);
}

.map-pin {
    border-color: var(--green);
}

.map-pin.selected {
    color: var(--action-ink);
}

.map-pin-label {
    background: var(--map-label-surface);
    color: var(--ink);
}

.map-pin.completed:after {
    color: #173F38;
}

.map-controls button {
    border-color: var(--line);
}

.scanner-frame {
    background: var(--scanner-bg);
}

.camera-error {
    color: var(--wrong-ink);
    background: var(--wrong-bg);
}

.network-note {
    background: var(--stage-reflect);
    color: var(--ink);
}

.switch:before {
    background: var(--field-line);
}

.switch[aria-checked=true]:before {
    background: var(--green);
}

.switch:after {
    background: var(--surface);
}

.app-toast {
    color: var(--action-ink);
}

.bottom-sheet {
    border-color: var(--line);
}

.sheet-handle {
    background: var(--field-line);
}

.theme-toggle:focus-visible,
.theme-option:has(input:focus-visible) {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

/* A lower bar, with the same generous scan target projecting out of it. Safe areas stay intact. */

.bottom-nav {
    padding: 4px 12px calc(6px + var(--safe));
    min-height: calc(68px + var(--safe));
    border-color: var(--line);
    box-shadow: 0 -5px 20px #10291E0B;
}

.nav-item {
    min-height: 48px;
    padding-top: 3px;
    gap: 3px;
    color: var(--nav-ink);
}

.nav-item>.icon {
    width: 20px;
    height: 20px;
}

.nav-item.active:not(.scan-nav):before {
    top: 0;
    width: 3px;
    height: 3px;
}

.scan-nav {
    min-height: 84px;
    margin-top: -34px;
    padding-top: 0;
    gap: 0;
    justify-content: flex-end;
    color: var(--green);
}

.scan-disc {
    background: var(--scan);
    flex-shrink: 0;
    box-shadow: 0 3px 11px #90341C26;
}

.scan-nav.active .scan-disc {
    background: var(--scan);
    color: #fff;
}

#app-main {
    padding-bottom: calc(103px + var(--safe));
}

.app-toast {
    bottom: calc(94px + var(--safe));
}

.theme-section {
    margin: 22px 0 26px;
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.theme-section h2 {
    font: 500 25px/1.2 Fraunces,serif;
    letter-spacing: -.6px;
    margin-bottom: 8px;
}

.theme-section>p {
    font-size: 11px;
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 16px;
}

.theme-options {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 9px;
    min-width: 0;
}

.theme-option {
    position: relative;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 8px 8px 10px;
    background: var(--surface);
    text-align: left;
    min-height: 105px;
    display: block;
    min-width: 0;
}

.theme-option.selected {
    border-color: var(--green);
    box-shadow: inset 0 0 0 1px var(--green);
}

.theme-swatch {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 10px 8px;
    height: 48px;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    background: var(--swatch-bg);
    color: var(--swatch-ink);
    margin-bottom: 8px;
}

.theme-swatch:before {
    content: 'Aa';
    font: 500 22px/1 Fraunces,serif;
    letter-spacing: -1px;
}

.theme-swatch:after {
    content: '';
    width: 17px;
    height: 17px;
    display: block;
    background: var(--swatch-accent);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--swatch-bg);
}

.theme-option[data-palette=tag] {
    --swatch-bg: #F8F6ED;
    --swatch-ink: #173F38;
    --swatch-accent: #C84D30;
}

.theme-option[data-palette=waldnacht] {
    --swatch-bg: #182D27;
    --swatch-ink: #F0F2E6;
    --swatch-accent: #C2D9AB;
}

.theme-option[data-palette=abendblau] {
    --swatch-bg: #252D43;
    --swatch-ink: #F4EEE1;
    --swatch-accent: #D8DDB5;
}

.theme-option strong {
    display: block;
    font-size: 10px;
    line-height: 1.7;
    font-weight: 700;
    letter-spacing: -.2px;
}

.theme-option small {
    font-size: 8px;
    line-height: 1.7;
    color: var(--muted);
    display: block;
}

.theme-selected {
    position: absolute;
    right: 7px;
    top: 7px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    place-items: center;
    color: var(--action-ink);
    background: var(--green);
    box-shadow: 0 0 0 2px var(--surface);
}

.theme-selected>.icon {
    width: 11px;
    height: 11px;
}

.theme-option.selected .theme-selected {
    display: grid;
}

.theme-option.system {
    grid-column: 1/-1;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
}

.theme-option.system>.icon {
    width: 22px;
    height: 22px;
}

.theme-option.system strong {
    font-size: 11px;
}

.theme-option.system small {
    font-size: 9px;
}

.theme-option.system .theme-selected {
    position: static;
    margin-left: auto;
    flex: none;
}

.theme-option.system.selected .theme-selected {
    display: grid;
}

.sheet-body>.theme-options {
    margin: 8px 0 20px;
}

.theme-footnote {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.9;
    margin: 14px 0 22px;
}

:root:not([data-theme=tag]) .bottom-sheet::backdrop {
    background: #07151099;
}

:root:not([data-theme=tag]) .fiction-art {
    background: var(--green-soft);
}

:root:not([data-theme=tag]) .fiction-art>.icon {
    color: var(--green);
}

.map-pin {
    rotate: none;
    transform: translate(-50%,-100%) rotate(-45deg);
}

.map-pin-label {
    transform: translate(-50%,19px);
    font-size: 10px;
}

@media (max-width:370px) {
    .app-header {
        gap: 6px;
    }
    .header-actions {
        gap: 6px;
    }
    .header-status {
        line-height: 1.6;
        padding: 4px 7px;
    }
    .theme-toggle {
        width: 44px;
        height: 44px;
    }
    .bottom-nav {
        padding-inline: 6px;
    }
    .theme-options {
        gap: 7px;
    }
    .theme-option {
        padding: 7px;
        min-height: 101px;
    }
    .theme-option strong {
        font-size: 9px;
    }
    .theme-swatch {
        padding: 9px 6px;
    }
    .theme-option small {
        font-size: 7px;
    }
    .theme-option.system strong {
        font-size: 10px;
    }
    .theme-option.system small {
        font-size: 8px;
    }
}

/* ===== Production shell: what the prototype had no markup for ===== */

dialog:not([open]) {
    display: none;
}

a.wordmark,
a.nav-item,
a.back-button,
a.icon-button,
a.visit-row,
a.place-list-card,
a.badge-item,
a.filter-chip {
    text-decoration: none;
}

.shell-notices {
    padding: 4px 25px 0;
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 14px;
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 11px;
    line-height: 1.85;
    background: var(--stage-reflect);
    color: var(--ink);
}

.notice>.icon {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    color: var(--coral);
}

.notice-body {
    min-width: 0;
    overflow-wrap: anywhere;
}

.notice-body ul {
    margin: 0;
    padding-left: 16px;
}

.notice-error {
    background: var(--wrong-bg);
    color: var(--wrong-ink);
}

.notice-error>.icon {
    color: var(--wrong-ink);
}

.notice-success {
    background: var(--green-soft);
}

.notice-success>.icon {
    color: var(--green);
}

.error-view h1 {
    font-size: 33px;
    max-width: 310px;
    margin-inline: auto;
}

.error-view .button-stack {
    margin-top: 20px;
}

.error-view .button-stack .primary {
    margin-top: 0;
}

@media (max-width:370px) {
    .shell-notices {
        padding-inline: 20px;
    }
}
