/* Wallflowers: the app's risograph print. Paper, black ink and spot inks; a pink second pass printed slightly off
   register. Keep the colours in step with src/Wallflowers.Presentation/Theme.cs. */

@font-face { font-family: "Archivo"; src: url("/fonts/Archivo-Regular.woff2") format("woff2"), url("/fonts/Archivo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo SemiCondensed"; src: url("/fonts/ArchivoSemiCondensed-Bold.woff2") format("woff2"), url("/fonts/ArchivoSemiCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Archivo Expanded"; src: url("/fonts/ArchivoExpanded-Black.woff2") format("woff2"), url("/fonts/ArchivoExpanded-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Archivo ExtraCondensed"; src: url("/fonts/ArchivoExtraCondensed-ExtraBold.woff2") format("woff2"), url("/fonts/ArchivoExtraCondensed-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
/* The board drawables ask for their numeral font by file name, as the app's canvas does. */
@font-face { font-family: "ArchivoExtraCondensed-ExtraBold.ttf"; src: url("/fonts/ArchivoExtraCondensed-ExtraBold.woff2") format("woff2"), url("/fonts/ArchivoExtraCondensed-ExtraBold.ttf") format("truetype"); font-display: block; }

:root {
    --paper: #FDFDFB;
    --ink: #1C1C1C;
    --pink: #FF48B0;
    --teal: #00A5A8;
    --yellow: #FFE800;
    --blue: #3255A4;
    --red: #F15060;
    --ink-soft: rgba(28, 28, 28, 0.72);
    --rule: 2px solid var(--ink);
    --gutter: clamp(16px, 4vw, 40px);
    --measure: 66ch;
    --body: "Archivo", system-ui, sans-serif;
    --label: "Archivo SemiCondensed", "Archivo", system-ui, sans-serif;
    --display: "Archivo Expanded", "Archivo", system-ui, sans-serif;
    --numeral: "Archivo ExtraCondensed", "Archivo", system-ui, sans-serif;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #1A1C21;
        --ink: #E9E7E1;
        --pink: #FF6EC0;
        --teal: #2EC4C6;
        --yellow: #F5DC2A;
        --blue: #6F8FE0;
        --red: #FF6B78;
        --ink-soft: rgba(233, 231, 225, 0.74);
    }
}
:root[data-theme="dark"] {
    --paper: #1A1C21;
    --ink: #E9E7E1;
    --pink: #FF6EC0;
    --teal: #2EC4C6;
    --yellow: #F5DC2A;
    --blue: #6F8FE0;
    --red: #FF6B78;
    --ink-soft: rgba(233, 231, 225, 0.74);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 17px/1.5 var(--body);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--pink); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: normal; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ── The two-pass print: the pink layer sits 3px down-right of the ink layer, as on the app's home screen. */
.print { display: inline-grid; }
.print > .pass { grid-area: 1 / 1; }
.print > .pass.pink { color: var(--pink); transform: translate(0.06em, 0.06em); }
.print > .pass.ink { color: var(--ink); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .print > .pass.ink { mix-blend-mode: normal; } }
:root[data-theme="dark"] .print > .pass.ink { mix-blend-mode: normal; }

.display-xl, .display-l, .display-m { font-family: var(--display); line-height: 0.9; letter-spacing: -0.01em; }
.display-xl { font-size: clamp(40px, 13.5vw, 104px); }
@media (min-width: 861px) { .display-xl { font-size: clamp(56px, 6.8vw, 112px); } }
.display-l { font-size: clamp(36px, 7vw, 72px); margin-bottom: 0.4em; }
.display-m { font-size: clamp(28px, 4.6vw, 48px); margin-bottom: 0.5em; }
h3 { font: 700 19px/1.25 var(--label); margin-bottom: 0.35em; }
.lede { font-size: clamp(18px, 2.2vw, 21px); max-width: 34em; }
.small { font-size: 14px; color: var(--ink-soft); }
.section-lede { max-width: var(--measure); color: var(--ink-soft); }

/* ── Masthead */
.masthead {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px var(--gutter); border-bottom: var(--rule);
}
.wordmark { text-decoration: none; font: 900 17px/1 var(--display); white-space: nowrap; }
.masthead nav { display: flex; gap: clamp(12px, 3vw, 28px); font: 700 16px/1 var(--label); }
.masthead nav a { text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.masthead nav a.here, .masthead nav a:hover { border-bottom-color: var(--pink); }
@media (max-width: 520px) { .masthead .nav-store { display: none; } .wordmark { font-size: 15px; } }

/* ── Buttons: ink slab with the pink pass behind, like the app's main button. */
.button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
    padding: 12px 22px; border: var(--rule); background: var(--paper); color: var(--ink);
    font: 700 18px/1.1 var(--label); text-decoration: none; cursor: pointer;
    box-shadow: 0 0 0 0 var(--pink); transition: transform 80ms ease, box-shadow 80ms ease;
}
.button.primary { background: var(--ink); color: var(--paper); box-shadow: 5px 5px 0 0 var(--pink); }
.button:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 0 var(--pink); }
.button:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 0 var(--pink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
.store-badge { margin: -10px; } /* the official badge carries its own clear space */
.store-badge img { height: 72px; width: auto; }
.text-link { font: 700 17px/1.2 var(--label); }

/* ── Home: hero */
main > section, .prose { padding: clamp(40px, 7vw, 88px) var(--gutter); }
main > section + section { border-top: var(--rule); }
.hero {
    display: grid; gap: clamp(24px, 4vw, 56px);
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center;
}
.hero h1 { margin-bottom: 0.25em; }
.hero-board { margin: 0; }
.hero-board img { width: 100%; max-width: 640px; margin-left: auto; filter: drop-shadow(8px 8px 0 var(--pink)); }
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; }
    .hero-board img { margin: 0; max-width: 520px; }
}

.daily-strip { padding-top: clamp(28px, 4vw, 44px); padding-bottom: clamp(28px, 4vw, 44px); background: var(--yellow); color: #1C1C1C; }
.daily-strip .button.primary { background: #1C1C1C; color: #FDFDFB; }
.daily-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
.daily-card h2 { font: 900 clamp(24px, 3.2vw, 34px)/1 var(--display); margin-bottom: 0.3em; }
.daily-card p { margin: 0; max-width: 40em; }

.explain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.explain-grid img { margin-bottom: 18px; border: var(--rule); background: var(--paper); }
.explain-grid p { color: var(--ink-soft); max-width: 32em; }
@media (max-width: 860px) { .explain-grid { grid-template-columns: 1fr; } .explain-grid img { max-width: 360px; } }

/* The cast as a seating list: ruled lines, icon, name, rule. */
.cast-level { font: 700 15px/1 var(--label); color: var(--ink-soft); margin: 36px 0 0; padding-bottom: 10px; border-bottom: var(--rule); }
.guest-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); }
.guest-list li {
    display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; align-items: center;
    padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
}
.guest-list picture { grid-row: span 2; }
.guest-list img { width: 48px; height: 48px; }
.guest-name { font: 700 19px/1.2 var(--label); }
.guest-rule { color: var(--ink-soft); font-size: 16px; line-height: 1.35; }
@media (max-width: 720px) { .guest-list { grid-template-columns: 1fr; } }
.cast > p:last-child { margin-top: 28px; }

.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(24px, 4vw, 56px); max-width: 1100px; }
.facts li { padding-left: 18px; border-left: 4px solid var(--teal); }
.facts strong { font-family: var(--label); }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr; } }

/* ── Prose pages */
.prose { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.prose h2 { font: 900 clamp(22px, 3vw, 28px)/1.1 var(--display); margin: 1.6em 0 0.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.rules { margin: 0; }
.rule { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 8px 24px; padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); }
.rule dt { display: flex; align-items: center; gap: 12px; font: 700 19px/1.2 var(--label); align-self: start; }
.rule dt img { width: 40px; height: 40px; }
.rule dd { margin: 0; }
.rule .diagram { width: 160px; margin-top: 10px; }
@media (max-width: 560px) { .rule { grid-template-columns: 1fr; } }
.error-page { min-height: 50vh; }

/* ── Footer */
.colophon { border-top: var(--rule); padding: 32px var(--gutter) 40px; font-size: 15px; }
.colophon .links { display: flex; flex-wrap: wrap; gap: 8px 24px; font: 700 16px/1.4 var(--label); }

/* ── Game page: the game fills the window under the masthead. */
/* Exactly one screen tall, so the board shrinks to fit instead of the page scrolling; the game scrolls inside when it must. */
body.is-game { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.is-game main { flex: 1; display: flex; min-height: 0; }
.game-host { flex: 1; display: flex; min-height: 0; }
.game-loading { margin: auto; text-align: center; padding: 48px 16px; }
.loading-mark { font: 900 64px/1 var(--display); margin-bottom: 16px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.loading-title { font: 900 22px/1.1 var(--display); margin: 0 0 8px; }
.loading-about { max-width: 34em; margin: 24px auto 0; font-size: 15px; color: var(--ink-soft); }
