/* Hunt The Influencer — web styles. Paper, stickers & marker-pen aesthetic, no build step.
   Shared by the marketing landing page and the host console. Palette + fonts live in :root;
   every component below reads from them, so re-theming is a matter of changing the tokens. */
@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Caveat:wght@600;700&family=Bebas+Neue&family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --paper: #f6efdf;        /* cream page ground */
    --paper-2: #ede4cf;
    --panel: #fffdf7;        /* cards / inputs */
    --panel-2: #f7f2e6;
    --ink: #151515;          /* marker black */
    --muted: #625e56;
    --line: #d9d0bb;
    --pink: #ff2d95;
    --pink-soft: #ffd3e9;
    --yellow: #ffd93d;
    --sky: #3cc8f5;
    --sky-soft: #cdeffc;
    --purple: #b36bff;
    --orange: #ff9a3c;
    --green: #34d17e;
    --red: #ff4d4d;
    --night: #1c1b1a;
    --accent: var(--pink);
    --accent-ink: var(--ink);
    --ok: #1fae62;
    --warn: #d99500;
    --bad: #e0333f;
    --go: var(--green);
    --hard: 4px 4px 0 var(--ink);         /* sticker drop shadow */
    --hard-sm: 3px 3px 0 var(--ink);
    --soft: 0 10px 30px rgba(21, 21, 21, 0.10);
    --font-display: 'Permanent Marker', 'Marker Felt', 'Comic Sans MS', cursive;
    --font-hand: 'Caveat', 'Bradley Hand', 'Segoe Script', cursive;
    --font-head: 'Bebas Neue', 'Oswald', Impact, 'Arial Narrow', sans-serif;
    --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    /* Ragged paper edges (clip-path). Generated once; tweak amplitude by editing the rem values. */
    --torn-bottom: polygon(0 0, 100% 0, 100% calc(100% - 0.52rem), 97.1% calc(100% - 0.24rem), 94.1% calc(100% - 1.04rem), 91.2% calc(100% - 0.12rem), 88.2% calc(100% - 0.86rem), 85.3% calc(100% - 0.59rem), 82.4% calc(100% - 0.09rem), 79.4% calc(100% - 0.81rem), 76.5% calc(100% - 0.06rem), 73.5% calc(100% - 0.69rem), 70.6% calc(100% - 0.11rem), 67.6% calc(100% - 0.15rem), 64.7% calc(100% - 0.68rem), 61.8% calc(100% - 1.32rem), 58.8% calc(100% - 0.2rem), 55.9% calc(100% - 0.36rem), 52.9% calc(100% - 1rem), 50% calc(100% - 1.52rem), 47.1% calc(100% - 0.92rem), 44.1% calc(100% - 0.63rem), 41.2% calc(100% - 1.56rem), 38.2% calc(100% - 0.07rem), 35.3% calc(100% - 1.37rem), 32.4% calc(100% - 0.46rem), 29.4% calc(100% - 0.23rem), 26.5% calc(100% - 0.19rem), 23.5% calc(100% - 0.49rem), 20.6% calc(100% - 1.31rem), 17.6% calc(100% - 0.29rem), 14.7% calc(100% - 0.93rem), 11.8% calc(100% - 1.02rem), 8.8% calc(100% - 0.6rem), 5.9% calc(100% - 0.88rem), 2.9% calc(100% - 0.1rem), 0% calc(100% - 0.1rem));
    --torn-top: polygon(0% 0.33rem, 2.9% 1.09rem, 5.9% 0.68rem, 8.8% 0.5rem, 11.8% 0.94rem, 14.7% 0.73rem, 17.6% 0.48rem, 20.6% 1.27rem, 23.5% 1.12rem, 26.5% 0.39rem, 29.4% 0.92rem, 32.4% 0.84rem, 35.3% 1.4rem, 38.2% 1.17rem, 41.2% 0.46rem, 44.1% 1.57rem, 47.1% 0.19rem, 50% 0.67rem, 52.9% 1.21rem, 55.9% 0.24rem, 58.8% 0.78rem, 61.8% 0.06rem, 64.7% 1.07rem, 67.6% 1.22rem, 70.6% 0.92rem, 73.5% 1.4rem, 76.5% 0.5rem, 79.4% 1.11rem, 82.4% 0.95rem, 85.3% 0.93rem, 88.2% 0.73rem, 91.2% 1.34rem, 94.1% 1.51rem, 97.1% 0.76rem, 100% 1.06rem, 100% 100%, 0 100%);
    --torn-both: polygon(0% 0.45rem, 2.9% 1.6rem, 5.9% 1.59rem, 8.8% 1.34rem, 11.8% 1.13rem, 14.7% 0.5rem, 17.6% 0.37rem, 20.6% 0.46rem, 23.5% 0.11rem, 26.5% 1.23rem, 29.4% 0.64rem, 32.4% 1.35rem, 35.3% 0.62rem, 38.2% 1.53rem, 41.2% 1.36rem, 44.1% 0rem, 47.1% 0.34rem, 50% 1.46rem, 52.9% 0.75rem, 55.9% 1.57rem, 58.8% 0.64rem, 61.8% 0.12rem, 64.7% 1.01rem, 67.6% 1.25rem, 70.6% 0.43rem, 73.5% 0.14rem, 76.5% 0.53rem, 79.4% 1.54rem, 82.4% 1.21rem, 85.3% 0.19rem, 88.2% 0.39rem, 91.2% 0.16rem, 94.1% 0.1rem, 97.1% 1.28rem, 100% 0.28rem, 100% calc(100% - 0.72rem), 97.1% calc(100% - 0.9rem), 94.1% calc(100% - 1.48rem), 91.2% calc(100% - 0.75rem), 88.2% calc(100% - 0.81rem), 85.3% calc(100% - 0.94rem), 82.4% calc(100% - 0.3rem), 79.4% calc(100% - 0.82rem), 76.5% calc(100% - 1.01rem), 73.5% calc(100% - 1.27rem), 70.6% calc(100% - 0.15rem), 67.6% calc(100% - 0.49rem), 64.7% calc(100% - 0.15rem), 61.8% calc(100% - 1.3rem), 58.8% calc(100% - 1.11rem), 55.9% calc(100% - 0.07rem), 52.9% calc(100% - 1.57rem), 50% calc(100% - 1.54rem), 47.1% calc(100% - 1.05rem), 44.1% calc(100% - 0.98rem), 41.2% calc(100% - 0.25rem), 38.2% calc(100% - 0.02rem), 35.3% calc(100% - 0.85rem), 32.4% calc(100% - 0.1rem), 29.4% calc(100% - 0.3rem), 26.5% calc(100% - 0.39rem), 23.5% calc(100% - 0.05rem), 20.6% calc(100% - 0.74rem), 17.6% calc(100% - 0.7rem), 14.7% calc(100% - 1.35rem), 11.8% calc(100% - 0.83rem), 8.8% calc(100% - 1.02rem), 5.9% calc(100% - 0.8rem), 2.9% calc(100% - 1.06rem), 0% calc(100% - 0.73rem));
}

* { box-sizing: border-box; }
/* The `hidden` attribute must win over component display rules (e.g. .btn,
   .marketing-thumb) — author styles otherwise override the UA [hidden] rule. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
    margin: 0;
    font: 15px/1.55 var(--font-body);
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}
/* Paper grain: a tiled SVG noise field. Swap in a real scan by dropping assets/hunt/paper.jpg
   (lib.php adds body.has-paper when the file exists). */
body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.55;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.32 0 0 0 0 0.27 0 0 0 0 0.18 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.has-paper { background-image: url(hunt/paper.jpg); background-size: 600px auto; }
body.has-paper::before { opacity: 0.2; }

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

h1, h2, h3 { color: var(--ink); margin: 0.4em 0 0.5em; line-height: 1.1; }
h1 { font-family: var(--font-display); font-size: 32px; font-weight: 400; }
h2 { font-family: var(--font-head); font-size: 28px; font-weight: 400; letter-spacing: 0.04em; }
h3 { font-family: var(--font-head); font-size: 21px; font-weight: 400; letter-spacing: 0.04em; }
p { margin: 0 0 1em; }

/* ---- Top bar ---------------------------------------------------------------------------- */
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 9px 22px; position: sticky; top: 0; z-index: 30;
    background: rgba(246, 239, 223, 0.94); backdrop-filter: blur(8px);
    border-bottom: 3px solid var(--ink);
}
.brand { display: inline-flex; align-items: center; color: var(--ink); }
.brand:hover { text-decoration: none; }
/* Wordmark lockup: HUNT + pin over "for the INFLUENCER" */
.wm { display: flex; flex-direction: column; line-height: 0.82; }
.wm-l1 { display: inline-flex; align-items: flex-start; font-family: var(--font-head); font-size: 30px; letter-spacing: 0.04em; }
.wm-pin { width: 15px; height: 21px; margin: -4px 0 0 1px; }
.wm-l2 { display: inline-flex; align-items: baseline; gap: 5px; margin-top: 3px; }
.wm-l2 em { font-family: var(--font-hand); font-weight: 700; font-style: normal; font-size: 14px; transform: rotate(-6deg); display: inline-block; }
.wm-l2 strong { font-family: var(--font-head); font-weight: 400; font-size: 22px; letter-spacing: 0.06em; color: var(--sky); text-shadow: 2px 2px 0 var(--pink); }
.topnav { display: flex; gap: 20px; align-items: center; }
.topnav a {
    color: var(--ink); font-family: var(--font-head); font-size: 19px; letter-spacing: 0.06em;
    padding: 4px 2px; border-bottom: 3px solid transparent;
}
.topnav a:hover { text-decoration: none; border-bottom-color: var(--pink); }
.topnav a.active { border-bottom-color: var(--pink); }
.topnav a.ghost { color: var(--muted); }
.topnav a.btn { border-bottom: 2px solid var(--ink); }
.topnav a.btn:hover { border-bottom-color: var(--ink); }

.wrap { max-width: 980px; margin: 0 auto; padding: 30px 22px 70px; }
body.landing .wrap { max-width: 1080px; padding: 0 22px 0; }

/* ---- Flash ------------------------------------------------------------------------------ */
.flash {
    padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; background: var(--panel);
    border: 2px solid var(--ink); border-left-width: 8px; font-weight: 600; box-shadow: var(--hard-sm);
}
body.landing .flash { margin: 18px 0 0; }
.flash-success { border-left-color: var(--green); }
.flash-error { border-left-color: var(--red); }
.flash-info { border-left-color: var(--sky); }

/* ---- Cards ------------------------------------------------------------------------------ */
.card {
    position: relative; background: var(--panel); border: 2.5px solid var(--ink);
    border-radius: 14px; padding: 24px; margin-bottom: 22px; box-shadow: var(--hard);
}
.card.narrow { max-width: 660px; margin-left: auto; margin-right: auto; margin-top: 18px; }
/* A strip of washi tape across the top of narrow (sign-in / sign-up) cards */
.card.narrow::before {
    content: ""; position: absolute; top: -13px; left: 50%; width: 120px; height: 26px;
    transform: translateX(-50%) rotate(-3deg); background: rgba(255, 217, 61, 0.85);
    border: 1px solid rgba(21, 21, 21, 0.15); opacity: 0.95;
}
.card.empty { text-align: center; }
.card h1 { margin-top: 6px; }
.card h2 { margin-top: 0; }

/* ---- Buttons ---------------------------------------------------------------------------- */
.btn {
    appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--yellow); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 12px;
    padding: 12px 24px; font-family: var(--font-head); font-size: 21px; letter-spacing: 0.05em; line-height: 1;
    cursor: pointer; text-align: center; text-decoration: none; box-shadow: var(--hard);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); text-decoration: none; color: var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.pink { background: var(--pink); color: #fff; }
.btn.pink:hover { color: #fff; }
.btn.sky { background: var(--sky); }
.btn.ghost { background: var(--panel); }
.btn.danger { background: var(--panel); color: var(--bad); border-color: var(--bad); box-shadow: 3px 3px 0 var(--bad); }
.btn.danger:hover { box-shadow: 5px 5px 0 var(--bad); color: var(--bad); }
.btn.small { padding: 7px 14px; font-size: 16px; border-width: 2px; border-radius: 9px; box-shadow: var(--hard-sm); }
.btn.small:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn.small.danger { box-shadow: 2px 2px 0 var(--bad); }
/* A disabled button has to look disabled — flat, grey and dead to hover, or
   people keep pressing it (Generate while an AI image is drawing, Remove during
   an upload). Listed last, and .btn.small[disabled] outranks .btn.small.danger. */
.btn[disabled], .btn:disabled, .btn.small[disabled], .btn.small:disabled {
    background: var(--panel-2); color: var(--muted); border-color: var(--muted);
    box-shadow: none; cursor: not-allowed;
}
.btn[disabled]:hover, .btn:disabled:hover, .btn[disabled]:active, .btn:disabled:active,
.btn.small[disabled]:hover, .btn.small:disabled:hover {
    transform: none; box-shadow: none; color: var(--muted);
}
.btn-row, .cta-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---- Forms ------------------------------------------------------------------------------ */
.field { display: block; margin-bottom: 16px; }
.field > span {
    display: block; font-family: var(--font-head); letter-spacing: 0.06em; font-size: 16px;
    margin-bottom: 6px; color: var(--ink);
}
.field input, .field select, .field textarea {
    width: 100%; background: var(--panel); border: 2px solid var(--ink); color: var(--ink);
    border-radius: 10px; padding: 11px 13px; font-size: 15px; font-family: inherit;
    transition: box-shadow 0.12s ease, border-color 0.12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--pink); box-shadow: 3px 3px 0 var(--pink);
}
.field .hint { color: var(--muted); font-size: 12.5px; display: block; margin-top: 5px; }
/* File inputs: style the native "Choose file" button to match the theme. */
.field input[type="file"] { padding: 9px 12px; color: var(--muted); cursor: pointer; }
.field input[type="file"]::file-selector-button {
    margin-right: 12px; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 8px;
    background: var(--yellow); color: var(--ink); font-family: var(--font-head); font-size: 15px;
    letter-spacing: 0.05em; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
}
.field input[type="file"]::file-selector-button:hover { background: var(--pink); color: #fff; }
.err { color: var(--bad); font-size: 13px; font-style: normal; display: block; margin-top: 5px; font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-2 .span-2 { grid-column: 1 / -1; }
.section-label {
    margin: 24px 0 12px; padding-top: 14px; border-top: 2px dashed var(--line);
    font-family: var(--font-head); color: var(--pink); font-size: 17px; letter-spacing: 0.1em;
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---- Page head / crumbs ----------------------------------------------------------------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.crumb { margin: 0 0 16px; font-family: var(--font-head); font-size: 17px; letter-spacing: 0.05em; }
.crumb a { color: var(--ink); }

/* ---- Tables ----------------------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); }
.table th { font-family: var(--font-head); color: var(--ink); font-size: 16px; font-weight: 400; letter-spacing: 0.08em; }
.table thead tr { border-bottom: 2.5px solid var(--ink); }
.table td.num, .table th.num { text-align: right; }
.table.compact th, .table.compact td { padding: 10px 8px; }
.link { color: var(--pink); font-family: var(--font-head); font-size: 17px; letter-spacing: 0.04em; }

/* ---- Hunt / race ID display ------------------------------------------------------------- */
.raceid { background: var(--sky-soft); padding: 3px 8px; border-radius: 6px; color: var(--ink); font-weight: 700; border: 1.5px solid var(--ink); white-space: nowrap; }
a.raceid { text-decoration: none; }
a.raceid:hover, a.raceid:focus-visible { background: var(--yellow); text-decoration: none; }
.raceid-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.raceid-card-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.raceid-big { display: flex; align-items: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.admin-code-card { border-style: dashed; }
.admin-code-hint { margin: 10px 0 0; font-size: 13.5px; line-height: 1.6; }
.admin-code-hint a { word-break: break-all; }
.raceid-big code {
    font-size: 30px; font-weight: 700; letter-spacing: 0.03em; color: var(--pink);
    background: var(--panel-2); border: 2px solid var(--ink); border-radius: 10px; padding: 4px 14px;
    box-shadow: var(--hard-sm);
}

/* ---- Pills / badges (stickers) ---------------------------------------------------------- */
.pill {
    display: inline-block; padding: 3px 11px; border-radius: 999px; font-family: var(--font-head);
    font-size: 14px; letter-spacing: 0.07em; border: 2px solid var(--ink); background: var(--panel);
    color: var(--ink); box-shadow: 2px 2px 0 var(--ink); vertical-align: middle; line-height: 1.25;
}
.pill-go { background: var(--yellow); }
.pill-scheduled { background: var(--yellow); }
.pill-live, .pill-active { background: var(--pink); color: #fff; animation: glow 1.6s ease-in-out infinite; }
.pill-finished, .pill-completed { background: var(--green); }
.pill-cancelled, .pill-abandoned { background: var(--paper-2); color: var(--muted); }
.pill-scavenger_hunt { background: var(--purple); color: #fff; }
.pill-race { background: var(--sky); }
.pill-admin { background: var(--ink); color: var(--yellow); font-size: 11px; padding: 1px 7px; box-shadow: none; margin-left: 4px; }
@keyframes glow { 0%, 100% { box-shadow: 2px 2px 0 var(--ink); } 50% { box-shadow: 2px 2px 0 var(--ink), 0 0 16px rgba(255, 45, 149, 0.7); } }
.count-badge {
    display: inline-block; background: var(--pink); color: #fff; border-radius: 999px; border: 2px solid var(--ink);
    padding: 1px 10px; font-family: var(--font-head); font-size: 15px; letter-spacing: 0.04em; vertical-align: middle;
}
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 26px; }

/* ---- Scavenger hunt: photos a player took at waypoints (player modal) ------------------- */
.find-photos { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.find-photos a {
    display: flex; flex-direction: column; align-items: center; gap: 6px; width: 118px;
    color: var(--muted); font-size: 12px; text-align: center; text-decoration: none;
    background: #fff; border: 1.5px solid var(--ink); padding: 6px 6px 8px; box-shadow: var(--hard-sm);
    transform: rotate(-1.5deg); transition: transform 0.12s ease;
}
.find-photos a:nth-child(even) { transform: rotate(1.5deg); }
.find-photos a:hover { color: var(--pink); text-decoration: none; transform: rotate(0) translateY(-2px); }
.find-photos img { width: 104px; height: 104px; object-fit: cover; background: var(--panel-2); display: block; }

/* ---- Marker / waypoint dialog (route editor) -------------------------------------------- */
dialog.pin-dialog {
    border: 2.5px solid var(--ink); border-radius: 14px; padding: 22px 24px;
    width: min(460px, 92vw); background: var(--panel); color: var(--ink); box-shadow: 6px 6px 0 var(--ink);
}
dialog.pin-dialog::backdrop { background: rgba(21, 21, 21, 0.45); backdrop-filter: blur(3px); }
dialog.pin-dialog h3 { margin: 0 0 14px; }
dialog.pin-dialog .field { margin-bottom: 12px; }
.pin-dialog-actions { margin-top: 6px; }

/* ---- Two-column layout on the event page ------------------------------------------------ */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.cols .card { margin-bottom: 0; }
hr { border: none; border-top: 2px dashed var(--line); margin: 20px 0; }

/* ---- Clickable player rows -------------------------------------------------------------- */
.racer-row { cursor: pointer; transition: background 0.12s ease, box-shadow 0.12s ease; }
.racer-row:hover, .racer-row:focus { background: var(--panel-2); outline: none; box-shadow: inset 4px 0 0 var(--pink); }

/* ---- Player map + stats overlay --------------------------------------------------------- */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(21, 21, 21, 0.45);
    display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
    backdrop-filter: blur(3px);
}
.modal-backdrop[hidden] { display: none; }
.modal {
    position: relative; background: var(--panel); border: 2.5px solid var(--ink); border-radius: 16px;
    width: 100%; max-width: 880px; max-height: 92vh; overflow: auto; padding: 24px; box-shadow: 8px 8px 0 var(--ink);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; }
.modal-head-right { display: flex; align-items: center; gap: 10px; }
.session-select { background: var(--panel); border: 2px solid var(--ink); color: var(--ink); border-radius: 8px; padding: 7px 10px; font-family: inherit; }
.modal-status { color: var(--muted); padding: 10px 0; }
.racer-map { width: 100%; height: 420px; border-radius: 12px; background: var(--panel-2); border: 2px solid var(--ink); }

.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.stat { background: var(--panel-2); border: 2px solid var(--ink); border-radius: 12px; padding: 13px 14px; box-shadow: var(--hard-sm); }
.stat-label { display: block; font-family: var(--font-head); color: var(--muted); font-size: 14px; letter-spacing: 0.08em; }
.stat-value { display: block; font-family: var(--font-head); font-size: 28px; margin-top: 3px; letter-spacing: 0.02em; }
.stat-sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }

@media (max-width: 760px) {
    .statgrid { grid-template-columns: repeat(2, 1fr); }
    .racer-map { height: 300px; }
}

/* ---- Live page -------------------------------------------------------------------------- */
.live-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.live-title { margin: 4px 0 6px; display: flex; align-items: center; gap: 12px; font-size: 30px; }
.live-badge {
    font-family: var(--font-head); font-size: 15px; color: #fff; letter-spacing: 0.1em;
    background: var(--pink); border: 2px solid var(--ink); padding: 3px 10px; border-radius: 999px;
    animation: glow 1.4s ease-in-out infinite; font-family: var(--font-head);
}
.live-badge.stale { background: var(--paper-2); color: var(--muted); animation: none; box-shadow: 2px 2px 0 var(--ink); }
.live-controls { display: flex; gap: 8px; flex-shrink: 0; }

.live-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: stretch; }
.live-map { height: 72vh; min-height: 420px; border-radius: 14px; border: 2.5px solid var(--ink); background: var(--panel); box-shadow: var(--hard); }
.live-side { background: var(--panel); border: 2.5px solid var(--ink); border-radius: 14px; padding: 14px; height: 72vh; min-height: 420px; overflow-y: auto; box-shadow: var(--hard); }
.live-side-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-head); font-size: 19px; letter-spacing: 0.06em; margin-bottom: 10px; }

.racer-list { list-style: none; margin: 0; padding: 0; }
.racer-item { display: flex; align-items: center; gap: 10px; padding: 11px 6px; border-bottom: 1px solid var(--line); }
.racer-item:last-child { border-bottom: none; }
.rdot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid var(--ink); }
.rinfo { flex: 1; min-width: 0; }
.rname { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.rmeta { margin-top: 1px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; box-shadow: 0 0 8px var(--green); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

@media (max-width: 760px) {
    .live-grid { grid-template-columns: 1fr; }
    .live-map, .live-side { height: auto; }
    .live-map { height: 52vh; }
    .live-side { max-height: 40vh; }
}

/* ---- Route editor (host forms) + public course map -------------------------------------- */
.route-map { width: 100%; height: 320px; border-radius: 12px; border: 2px solid var(--ink); background: var(--panel-2); }
.route-tools { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.route-dist { margin-left: auto; font-family: var(--font-head); font-size: 16px; letter-spacing: 0.05em; }
.mode-group { display: inline-flex; gap: 0; }
.mode-group .mode-btn { border-radius: 0; margin-left: -2px; box-shadow: none; }
.mode-group .mode-btn:first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.mode-group .mode-btn:last-child { border-radius: 0 9px 9px 0; box-shadow: var(--hard-sm); }
.mode-group .mode-btn:hover { transform: none; }
.mode-btn.active { background: var(--yellow); }
.btn .ico { vertical-align: -2px; margin-right: 2px; }
/* iOS Safari treats a long-press on the map tiles as "select text / show
 * callout", which swallows the gesture before Google Maps can turn it into
 * a contextmenu. Opting the map out of selection lets the press reach the
 * map; the Add-marker tool mode is the guaranteed fallback either way. */
.route-map, .edit-map, .course-map,
.route-map *, .edit-map *, .course-map * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.course-map { width: 100%; height: 440px; border-radius: 12px; border: 2px solid var(--ink); background: var(--panel-2); }

/* View-only course preview that expands into the editor modal */
.route-view-wrap { position: relative; cursor: pointer; }
.route-view-wrap::after { content: ""; position: absolute; inset: 0; border-radius: 12px; z-index: 5; }
.route-view-wrap:hover::after, .route-view-wrap:focus-visible::after { box-shadow: inset 0 0 0 3px var(--pink); }
.route-view-hint {
    position: absolute; right: 10px; bottom: 10px; z-index: 6; pointer-events: none;
    background: var(--ink); color: #fff; border-radius: 9px; padding: 6px 12px;
    font-family: var(--font-head); font-size: 15px; letter-spacing: 0.05em;
}
.route-view-wrap:hover .route-view-hint { background: var(--pink); }
.modal.modal-wide { max-width: 1100px; }
.modal.modal-narrow { max-width: 560px; }
.edit-map { width: 100%; height: 62vh; min-height: 380px; border-radius: 12px; border: 2px solid var(--ink); background: var(--panel-2); }
@media (max-width: 760px) {
    .edit-map { height: 52vh; min-height: 300px; }
}

/* ---- Marketing image — editor thumbnail + public hero ----------------------------------- */
.marketing-thumb { display: block; max-width: 100%; max-height: 220px; width: auto; border-radius: 10px; border: 2px solid var(--ink); margin-bottom: 10px; }
.marketing-hero { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; border: 2px solid var(--ink); margin-bottom: 16px; }
.field .check { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 14px; }
.field .check input { width: auto; }
.mi-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0; }
.mi-status { color: var(--muted); font-size: 13px; font-weight: 700; }

/* ---- Public event page ------------------------------------------------------------------ */
.public-title { margin: 10px 0 6px; font-size: 36px; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px 26px; color: var(--muted); margin: 4px 0 0; }
.event-meta strong { color: var(--ink); font-family: var(--font-head); font-size: 17px; letter-spacing: 0.04em; }
.public-desc { margin: 16px 0 0; max-width: 720px; }

@media (max-width: 760px) {
    .course-map { height: 320px; }
    .public-title { font-size: 28px; }
}

/* ---- Find a hunt (search.php) ----------------------------------------------------------- */
.search-lead { margin: 4px 0 0; max-width: 640px; }
.search-bar {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end;
    padding: 18px 20px; margin-bottom: 14px;
}
.search-bar .field { margin: 0; }
.search-actions { display: flex; gap: 8px; align-items: center; padding-bottom: 2px; }
.search-count { margin: 0 0 18px; font-family: var(--font-head); font-size: 17px; letter-spacing: 0.05em; }

.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 22px; margin-bottom: 34px; }
.event-card {
    display: flex; flex-direction: column; background: var(--panel); border: 2.5px solid var(--ink);
    border-radius: 14px; box-shadow: var(--hard); overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 7px 7px 0 var(--ink); }
/* The art box is always 16:9: flex:none + min-height:0 stop a tall picture or the fallback
   SVG (which would otherwise size itself off the card width) from stretching it. */
.event-card-art {
    display: grid; place-items: center; aspect-ratio: 16 / 9; flex: none; min-height: 0; overflow: hidden;
    border-bottom: 2px solid var(--ink); background: var(--panel-2);
}
.event-card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-card-art svg { width: 22%; height: auto; filter: drop-shadow(3px 3px 0 rgba(21, 21, 21, 0.35)); }
.event-card-art.art-hunt { background: linear-gradient(135deg, #d5f3ff, #ffe0f0); }
.event-card-art.art-race { background: linear-gradient(135deg, #ffe8c4, #ffd2a8); }
/* Hunt-story gallery (stories.php / search.php): a story with no photos shows its tally as the cover. */
.story-cover-note { font-family: var(--font-head); font-size: 44px; letter-spacing: 0.06em; color: var(--ink); text-align: center; line-height: 1; }
.story-cover-note small { display: block; font-size: 13px; letter-spacing: 0.2em; margin-top: 6px; color: var(--muted); }
.stories-head { margin-top: 10px; }
.stories-head h2 { margin: 0 0 4px; }
.event-card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.event-card-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.event-card h3 { margin: 2px 0 0; font-size: 25px; line-height: 1.05; }
.event-card h3 a { color: var(--ink); }
.event-card h3 a:hover { color: var(--pink); text-decoration: none; }
.event-card-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--muted); font-size: 13.5px; }
.event-card-meta strong { color: var(--ink); font-family: var(--font-head); font-size: 16px; letter-spacing: 0.04em; font-weight: 400; }
.event-card-host { font-size: 13.5px; color: var(--muted); }
.event-card-host strong { color: var(--ink); }
.event-card-desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; flex: 1; }
.event-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.search-host { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.search-host h2 { margin-bottom: 4px; }
.search-host p { margin: 0; max-width: 520px; }

@media (max-width: 980px) {
    .event-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .search-bar { grid-template-columns: 1fr 1fr; }
    .search-bar .search-q, .search-bar .search-actions { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .event-grid { grid-template-columns: 1fr; }
}

/* ======================================================================================== */
/*  LANDING PAGE                                                                             */
/* ======================================================================================== */

/* Full-bleed helper: escape the centred column */
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }

/* ---- Hero ------------------------------------------------------------------------------- */
.hero {
    position: relative; min-height: 640px; padding: 54px 0 96px; color: var(--ink);
    background: linear-gradient(180deg, #7ccdff 0%, #c9ecff 42%, #ffe9bd 100%);
    background-size: cover; background-position: center; clip-path: var(--torn-bottom);
}
/* .has-img / .has-scene: the picture itself is an inline style on the section (see index.php) */
.hero.has-img { background-position: center; }
/* Scene mode (assets/hunt/hero-scene.jpg): the picture already contains the signpost and the
   handwritten note, so only the headline card and sticky note are overlaid. Anchored right so
   the signpost stays put; the card sits at the mock-up's 4% left edge at any viewport width. */
.hero.has-scene { background-position: right center; min-height: 0; padding: 40px 0 74px; }
.hero.has-scene::before {
    background:
        linear-gradient(90deg, rgba(246, 239, 223, 0.85) 0%, rgba(246, 239, 223, 0.6) 26%, rgba(246, 239, 223, 0.2) 38%, rgba(246, 239, 223, 0) 46%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 74%, rgba(246, 239, 223, 0.55) 100%);
}
.hero.has-scene .hero-inner { max-width: none; padding: 0 4%; min-height: 580px; }
.hero.has-scene .hero-side { align-self: stretch; }
/* In scene mode the sticky note moves out of the hero (whose clip-path would cut it) and
   hangs off the top-right of "How it works", straddling the torn edge like the mock-up. */
.hero.has-scene .hero-side .sticky { display: none; }
.sticky.sticky-how { position: absolute; right: 2%; top: -128px; bottom: auto; z-index: 5; }
.sticky-how + .section-head { padding-right: 210px; }
/* Legibility wash: lighter on the left where the copy sits, and fading up from the torn edge */
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(246, 239, 223, 0.35) 0%, rgba(246, 239, 223, 0) 50%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(246, 239, 223, 0.65) 100%);
}
.hero-inner {
    position: relative; max-width: 1080px; margin: 0 auto; padding: 0 22px;
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr); gap: 24px; align-items: center;
}
/* Fallback scenery (when there is no hero image yet): hills + palms at the bottom */
.hero-art { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; pointer-events: none; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.hero.has-img .hero-art { display: none; }

.torn-wrap { filter: drop-shadow(6px 8px 0 rgba(21, 21, 21, 0.9)); max-width: 580px; transform: rotate(-1.2deg); }
.hero-card { position: relative; background: var(--panel); padding: 38px 36px 34px; clip-path: var(--torn-both); }
.hero-card h1 {
    font-family: var(--font-display); font-size: clamp(36px, 4.4vw, 54px); line-height: 1; margin: 0 0 16px;
    text-transform: uppercase; letter-spacing: 0.005em;
}
.hero-card h1 span { display: block; }
.hero-card h1 .tilt { transform: rotate(-1.5deg); }
.hero-card .lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; max-width: 460px; }
.crown-doodle { position: absolute; top: 14px; right: 26px; width: 68px; height: 51px; transform: rotate(8deg); }
.hero-cta { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.hero-cta .btn { font-size: 24px; padding: 14px 30px; }
.store-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Handwritten note above the signpost */
.hero-note {
    position: relative; z-index: 2; pointer-events: none; margin: 0 0 14px 28px;
    font-family: var(--font-hand); font-weight: 700; font-size: 31px; line-height: 0.95; color: #fff;
    text-shadow: 0 2px 0 rgba(21, 21, 21, 0.45), 0 4px 14px rgba(0, 0, 0, 0.35); transform: rotate(-5deg);
}
.hero-note .heart { color: var(--pink); }

/* Signpost — six arrow signs on a post (built from inline SVG, see index.php) */
.hero-side { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding-left: 14px; }
.signpost { position: relative; width: 250px; height: 410px; }
.signpost img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.signpost .post {
    position: absolute; left: 50%; top: 14px; bottom: 0; width: 18px; margin-left: -9px;
    background: linear-gradient(90deg, #5c3d22, #8a6238 45%, #6a4729); border: 2px solid var(--ink); border-radius: 5px 5px 0 0;
}
.signpost .sign { position: absolute; left: 0; right: 0; height: 60px; transform: rotate(var(--rot, 0deg)); }
.signpost .sign svg { width: 100%; height: 100%; display: block; filter: drop-shadow(3px 3px 0 rgba(21, 21, 21, 0.9)); }
.signpost .sign text { font-family: var(--font-display); font-size: 25px; text-transform: uppercase; fill: var(--ink); }

/* Sticky note */
.sticky {
    position: absolute; right: -6px; bottom: 26px; width: 172px; padding: 14px 14px 18px; z-index: 3;
    background: #fff7d1; border: 2px solid var(--ink); box-shadow: var(--hard); transform: rotate(6deg);
    font-family: var(--font-hand); font-weight: 700; font-size: 23px; line-height: 1.05; color: var(--ink);
}
.sticky::before { content: ""; position: absolute; top: -12px; left: 50%; width: 64px; height: 20px; transform: translateX(-50%) rotate(-2deg); background: rgba(60, 200, 245, 0.55); border: 1px solid rgba(21, 21, 21, 0.15); }
.sticky .smile { display: block; margin-top: 8px; font-family: var(--font-display); font-size: 22px; }

/* ---- Section headings (brush + handwriting) --------------------------------------------- */
.section { position: relative; padding: 54px 0 0; }
.section-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 30px; }
.brush {
    display: inline-block; font-family: var(--font-display); font-size: clamp(28px, 3.8vw, 44px); line-height: 1;
    text-transform: uppercase; color: var(--ink); padding: 22px 46px 20px; margin: -6px 0;
    background: url(hunt/brush-cyan.svg) no-repeat center / 100% 100%; transform: rotate(-2deg);
}
.brush.pink { background-image: url(hunt/brush-pink.svg); }
.brush.yellow { background-image: url(hunt/brush-yellow.svg); }
.section-note { font-family: var(--font-hand); font-weight: 700; font-size: 28px; line-height: 1.02; color: var(--ink); transform: rotate(-3deg); max-width: 360px; }
.arrow-doodle { width: 74px; height: 44px; flex-shrink: 0; }
.section-lead { color: var(--muted); max-width: 620px; margin: -12px 0 26px; font-size: 16px; }

/* ---- How it works: polaroids ------------------------------------------------------------ */
.polaroids { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 22px; padding-top: 14px; }
.polaroid {
    position: relative; background: #fff; border: 2px solid var(--ink); padding: 12px 12px 18px;
    box-shadow: var(--hard); transform: rotate(var(--tilt, -1.5deg)); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.polaroid:hover { transform: rotate(0) translateY(-5px); box-shadow: 7px 7px 0 var(--ink); }
.polaroid .num {
    position: absolute; top: -20px; left: -16px; z-index: 2; width: 50px; height: 50px; border-radius: 50%;
    border: 2.5px solid var(--ink); display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink);
    font-family: var(--font-display); font-size: 25px; color: var(--ink); background: var(--pink);
}
.polaroid .num.pink { background: var(--pink); color: #fff; }
.polaroid .num.sky { background: var(--sky); }
.polaroid .num.yellow { background: var(--yellow); }
.polaroid .num.green { background: var(--green); }
.polaroid-img { aspect-ratio: 1 / 1; border: 1.5px solid var(--ink); overflow: hidden; display: grid; place-items: center; background: var(--panel-2); }
.polaroid-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid-img svg { width: 62%; height: 62%; }
.art-map { background: linear-gradient(135deg, #d5f3ff, #ffe0f0); }
.art-clue { background: linear-gradient(135deg, #ffe8c4, #ffd2a8); }
.art-found { background: linear-gradient(135deg, #ffd3e9, #ffe9bd); }
.art-reward { background: linear-gradient(135deg, #2b2a33, #15151a); }
.polaroid h3 { font-family: var(--font-display); font-size: 19px; text-transform: uppercase; margin: 16px 0 6px; letter-spacing: 0; }
.polaroid p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }

/* ---- Host your own hunt ----------------------------------------------------------------- */
.host {
    position: relative; margin-top: 64px; padding: 40px 36px; background: var(--panel);
    border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: var(--hard);
    display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 34px; align-items: center;
}
.host::before {
    content: ""; position: absolute; top: -14px; left: 40px; width: 130px; height: 28px; transform: rotate(-4deg);
    background: rgba(255, 45, 149, 0.55); border: 1px solid rgba(21, 21, 21, 0.15);
}
.eyebrow { font-family: var(--font-head); font-size: 19px; letter-spacing: 0.14em; color: var(--pink); margin: 0 0 8px; }
.host h2 { font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 42px); line-height: 1.05; margin: 0 0 14px; letter-spacing: 0; }
.host .lead { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checklist li {
    display: flex; gap: 14px; align-items: flex-start; background: var(--panel-2); border: 2px solid var(--ink);
    border-radius: 12px; padding: 12px 14px; box-shadow: var(--hard-sm); transform: rotate(var(--tilt, 0deg));
}
.checklist .num {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center;
    font-family: var(--font-display); font-size: 18px; background: var(--yellow);
}
.checklist .num.sky { background: var(--sky); }
.checklist .num.purple { background: var(--purple); color: #fff; }
.checklist strong { display: block; font-family: var(--font-head); font-size: 20px; letter-spacing: 0.04em; font-weight: 400; }
.checklist span { color: var(--muted); font-size: 14px; }

/* ---- Platforms -------------------------------------------------------------------------- */
.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.platform {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: var(--panel); border: 2px solid var(--ink); border-radius: 14px; padding: 24px 18px; box-shadow: var(--hard-sm);
}
.platform h3 { margin: 0 0 2px; font-size: 22px; }
.platform-os { font-family: var(--font-head); font-size: 14px; letter-spacing: 0.1em; color: var(--pink); margin: 0 0 8px !important; }
.platform p { color: var(--muted); margin: 0; font-size: 14px; }
.platform p:last-of-type { flex: 1; }
.platform-art { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 18px; margin-bottom: 14px; border: 2px solid var(--ink); box-shadow: var(--hard-sm); }
.art-apple { background: var(--ink); }
.art-droid { background: var(--green); }
.glyph { width: 38px; height: 38px; fill: #fff; }
.glyph-droid { fill: var(--ink); }
.glyph-watch { width: 42px; height: 42px; }
.art-droid .glyph-watch path[fill="#fff"] { fill: var(--ink); }
.art-droid .glyph-watch g { stroke: var(--ink); }

/* App-store / Google Play badges */
.store-badge {
    display: inline-flex; align-items: center; gap: 9px; margin-top: 0;
    background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 7px 14px 7px 12px;
    text-decoration: none; box-shadow: 3px 3px 0 rgba(21, 21, 21, 0.35); transition: transform 0.12s ease;
}
.platform .store-badge { margin-top: 16px; }
a.store-badge:hover { transform: translate(-1px, -1px); text-decoration: none; color: #fff; }
.store-glyph { width: 22px; height: 22px; fill: currentColor; flex: 0 0 auto; }
.store-badge span { display: flex; flex-direction: column; line-height: 1; text-align: left; font-family: var(--font-head); font-size: 20px; letter-spacing: 0.04em; }
.store-badge small { font-size: 9.5px; letter-spacing: 0.1em; opacity: 0.85; font-family: var(--font-body); font-weight: 700; margin-bottom: 2px; }

/* ---- FAQ -------------------------------------------------------------------------------- */
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 2px solid var(--ink); }
.faq summary {
    cursor: pointer; list-style: none; padding: 16px 4px; font-family: var(--font-head); font-size: 22px; letter-spacing: 0.04em;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 24px; color: var(--pink); flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details > p { margin: -4px 4px 18px; color: var(--muted); max-width: 720px; }

/* ---- Dark torn footer band -------------------------------------------------------------- */
.band-dark {
    position: relative; margin-top: 74px; background: var(--night); color: #fff; padding: 74px 0 50px;
    clip-path: var(--torn-top);
}
.band-inner {
    max-width: 1080px; margin: 0 auto; padding: 0 22px;
    display: grid; grid-template-columns: 0.9fr 1.2fr 1fr; gap: 30px; align-items: center;
}
.quote { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; transform: rotate(-3deg); margin: 0; }
.quote .heart { display: block; color: #fff; font-size: 30px; margin-top: 10px; }
.skyline { text-align: center; }
.skyline img { max-width: 100%; height: auto; max-height: 240px; display: block; margin: 0 auto; }
.skyline img.blend { mix-blend-mode: lighten; }
.skyline svg { width: 100%; max-width: 380px; height: auto; display: block; margin: 0 auto; }
.skyline-note { font-family: var(--font-hand); font-weight: 700; font-size: 32px; line-height: 0.95; color: var(--yellow); transform: rotate(-4deg); display: inline-block; margin-top: 8px; }
.skyline-note u { text-decoration: none; border-bottom: 4px solid var(--yellow); }
.band-cta { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.band-cta .btn { font-size: 26px; padding: 15px 32px; border-color: #fff; box-shadow: 4px 4px 0 #fff; }
.band-cta .btn:hover { box-shadow: 6px 6px 0 #fff; }
.band-dark .store-badge { border-color: #fff; box-shadow: 3px 3px 0 rgba(255, 255, 255, 0.55); }
.tagline {
    max-width: 1080px; margin: 44px auto 0; padding: 0 22px; text-align: right;
    font-family: var(--font-head); font-size: 19px; letter-spacing: 0.22em; opacity: 0.9;
}
.tagline .smile { font-family: var(--font-display); letter-spacing: 0; margin-left: 14px; }

/* ---- Footer ----------------------------------------------------------------------------- */
.foot {
    position: relative; margin: 0 auto; padding: 22px 22px 26px; border-top: 3px solid var(--ink);
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
    color: var(--muted); font-size: 13px; max-width: 980px;
}
body.landing .foot { max-width: 1080px; border-top: none; }
.foot .foot-brand { font-family: var(--font-head); font-size: 18px; letter-spacing: 0.06em; color: var(--ink); }
.foot nav { display: flex; gap: 16px; }
.foot nav a { color: var(--ink); font-family: var(--font-head); font-size: 16px; letter-spacing: 0.06em; }

/* Legacy landing classes still referenced by older pages */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 14px; }
.feature { background: var(--panel); border: 2px solid var(--ink); border-radius: 14px; padding: 24px; box-shadow: var(--hard-sm); }
.feature h3 { margin: 0 0 8px; }
.feature p { color: var(--muted); margin: 0; }
.section-title { font-family: var(--font-display); text-align: center; font-size: 32px; margin: 56px 0 8px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.step { position: relative; background: var(--panel); border: 2px solid var(--ink); border-radius: 14px; padding: 24px; box-shadow: var(--hard-sm); }
.step-n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow); font-family: var(--font-display); font-size: 18px; margin-bottom: 10px; }
.step h3 { margin: 8px 0; }
.step p { color: var(--muted); margin: 0; }
.hero-logo { display: none; }

/* ---- Responsive ------------------------------------------------------------------------- */
@media (max-width: 980px) {
    .polaroids { grid-template-columns: repeat(2, 1fr); }
    .band-inner { grid-template-columns: 1fr 1fr; }
    .band-inner .skyline { grid-column: 1 / -1; order: 3; }
    .signpost { transform: scale(0.88); transform-origin: bottom left; }
}
@media (max-width: 860px) {
    .topnav a.navlink { display: none; }
    .hero-inner { grid-template-columns: 1fr; }
    /* Narrow: signpost and sticky note side by side (note wraps underneath on phones) */
    .hero-side { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 14px 10px; padding-left: 0; margin-top: 10px; }
    .signpost { transform: scale(0.82); transform-origin: bottom left; margin-right: -45px; }
    .sticky { position: static; transform: rotate(4deg); margin-bottom: 10px; }
    .hero.has-scene .hero-side .sticky { display: block; }
    .hero.has-scene .hero-inner { min-height: 0; }
    .sticky.sticky-how { display: none; }
    .hero-note { display: none; }
    .host { grid-template-columns: 1fr; padding: 32px 22px; }
}
@media (max-width: 760px) {
    .grid-2, .steps, .cols, .features, .platform-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 26px; }
    .wrap { padding: 24px 16px 60px; }
    body.landing .wrap { padding: 0 16px 0; }
    .hero { padding: 34px 0 80px; min-height: 0; }
    .torn-wrap { transform: none; }
    .hero-card { padding: 30px 22px 28px; }
    .hero-cta .btn { font-size: 21px; padding: 12px 22px; }
    .band-inner { grid-template-columns: 1fr; text-align: center; }
    .band-inner .skyline { order: 0; }
    .quote { transform: none; }
    .tagline { text-align: center; font-size: 15px; letter-spacing: 0.16em; }
    .live-top { flex-direction: column; }
    .raceid-big code { font-size: 22px; }
}
@media (max-width: 560px) {
    .polaroids { grid-template-columns: 1fr; }
    .polaroid { transform: none; }
    .topbar { padding: 8px 14px; }
    .wm-l1 { font-size: 26px; }
    .wm-l2 strong { font-size: 19px; }
    .topnav { gap: 10px; }
    .topnav a { font-size: 17px; }
}
/* Keep platform cards two-up on tablets and mid widths */
@media (min-width: 521px) and (max-width: 880px) {
    .platform-grid { grid-template-columns: repeat(2, 1fr); }
}
