@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:wght@400;600;700;800;900&family=IBM+Plex+Mono:wght@500;700&display=swap');

/* ==========================================================================
   JEEPDUCKY — badge / arcade language.
   Chunky, glossy, dimensional. Gold #FFC400 on black, thick rounded cards
   with hard bottom edges, pill buttons that physically press, star lockups,
   tire tracks in the corners. The reference image, applied to everything.
   ========================================================================== */

:root {
    --black:    #0C0C0C;
    --card:     #161616;
    --card-2:   #1E1E1E;
    --edge:     #262626;

    --gold:     #FFC400;
    --gold-hi:  #FFDE59;
    --gold-lo:  #C98A00;
    --gold-edge:#8F6200;
    --gold-air: rgba(255,196,0,.12);

    --white:    #FFFFFF;
    --grey:     #B9B9B9;
    --mute:     #7C7C7C;

    --line:     rgba(255,255,255,.09);
    --line-2:   rgba(255,255,255,.05);

    --ok:       #58D68D;
    --bad:      #FF6B57;

    --disp:     'Lilita One', 'Arial Black', sans-serif;
    --sans:     'Nunito', -apple-system, 'Segoe UI', sans-serif;
    --mono:     'IBM Plex Mono', ui-monospace, Menlo, monospace;

    --gut:      clamp(16px, 4vw, 48px);
    --beat:     clamp(52px, 8vw, 100px);
    --r:        20px;
    --r-sm:     14px;

    /* aliases so existing markup keeps resolving */
    --stencil: var(--disp);
    --phos: var(--gold); --phos-hot: var(--gold-hi);
    --phos-dim: rgba(255,196,0,.45); --phos-ghost: var(--gold-air);
    --read: var(--white); --read-dim: var(--grey); --read-mute: var(--mute);
    --grid: var(--line); --grid-2: var(--line-2);
    --void: var(--black); --deck: var(--card); --deck-2: var(--card-2); --plate: var(--card-2);
    --sig: var(--ok); --alert: var(--bad);
    --color-yellow: var(--gold); --color-black: var(--black); --color-white: var(--white);
    --color-error: var(--bad); --color-success: var(--ok); --color-border: var(--line);
    --bg-primary: var(--card); --bg-secondary: var(--card-2);
    --text-primary: var(--white); --text-secondary: var(--grey);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--white);
    background: var(--black);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Stage: grunge noise + pooled gold light + tire tracks in the top corners */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='300' viewBox='0 0 420 300'%3E%3Cg transform='rotate(-25 210 150)' fill='%23FFC400'%3E%3Crect x='0' y='120' width='34' height='58' rx='9'/%3E%3Crect x='46' y='128' width='34' height='58' rx='9'/%3E%3Crect x='92' y='120' width='34' height='58' rx='9'/%3E%3Crect x='138' y='128' width='34' height='58' rx='9'/%3E%3Crect x='184' y='120' width='34' height='58' rx='9'/%3E%3Crect x='230' y='128' width='34' height='58' rx='9'/%3E%3Crect x='276' y='120' width='34' height='58' rx='9'/%3E%3Crect x='322' y='128' width='34' height='58' rx='9'/%3E%3Crect x='368' y='120' width='34' height='58' rx='9'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='300' viewBox='0 0 420 300'%3E%3Cg transform='rotate(25 210 150)' fill='%23FFC400'%3E%3Crect x='0' y='120' width='34' height='58' rx='9'/%3E%3Crect x='46' y='128' width='34' height='58' rx='9'/%3E%3Crect x='92' y='120' width='34' height='58' rx='9'/%3E%3Crect x='138' y='128' width='34' height='58' rx='9'/%3E%3Crect x='184' y='120' width='34' height='58' rx='9'/%3E%3Crect x='230' y='128' width='34' height='58' rx='9'/%3E%3Crect x='276' y='120' width='34' height='58' rx='9'/%3E%3Crect x='322' y='128' width='34' height='58' rx='9'/%3E%3Crect x='368' y='120' width='34' height='58' rx='9'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(ellipse 70% 42% at 50% -6%, rgba(255,196,0,.14), transparent 70%),
        radial-gradient(ellipse 46% 36% at 8% 104%, rgba(255,196,0,.07), transparent 62%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
    background-position: top -70px left -90px, top -70px right -90px, center top, left bottom, center;
    background-size: 420px 300px, 420px 300px, auto, auto, 240px 240px;
    opacity: 1;
}
body::before { opacity: .9; }
@media (max-width: 700px) {
    body::before {
        background-size: 300px 214px, 300px 214px, auto, auto, 240px 240px;
        background-position: top -60px left -110px, top -60px right -110px, center top, left bottom, center;
    }
}

body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .14s ease; }
a:hover { color: var(--gold-hi); }
::selection { background: var(--gold); color: var(--black); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Type — Lilita for display, Nunito for everything readable
   ========================================================================== */

h1, h2, h3, h4 {
    margin: 0 0 .45em;
    font-family: var(--disp);
    font-weight: 400;
    line-height: .98;
    letter-spacing: .015em;
    text-transform: uppercase;
    color: var(--white);
    text-shadow: 0 3px 0 rgba(0,0,0,.55);
}
h1 { font-size: clamp(38px, 8.5vw, 84px); }
h2 { font-size: clamp(28px, 5vw, 48px); }
h3 { font-size: clamp(19px, 2.4vw, 25px); }
h4 { font-size: 17px; }
.hi { color: var(--gold); }

p { margin: 0 0 1.1em; }

.lede {
    max-width: 56ch;
    font-size: clamp(15px, 1.9vw, 18px);
    line-height: 1.7;
    font-weight: 600;
    color: var(--grey);
}

/* Star-flanked mini lockup for section labels */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-family: var(--disp);
    font-size: 15px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
}
.eyebrow::before, .eyebrow::after {
    content: '';
    width: 13px; height: 13px;
    background: var(--gold);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
                       50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.stat-label, .board-unit, .feed-time, .subnav-link, .page-info,
label, th, .badge, .timeline-type, .board-sub, .tag-note {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.small-text, .text-muted { font-size: 13px; color: var(--grey); }
.text-center { text-align: center; }

/* ==========================================================================
   Shell
   ========================================================================== */

.container, .admin-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--gut) var(--beat);
}

section { position: relative; padding: var(--beat) 0 0; }

.split { display: block; }
@media (min-width: 900px) {
    .split { display: grid; grid-template-columns: 210px 1fr; gap: 0 44px; align-items: start; }
}
@media (max-width: 899px) { .split > .eyebrow { margin-bottom: 18px; } }

/* Chunky card: thick rounded tile with a hard bottom edge */
.panel {
    position: relative;
    padding: clamp(22px, 4vw, 38px);
    background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 30%), var(--card);
    border: 2px solid var(--edge);
    border-bottom-width: 7px;
    border-bottom-color: #000;
    border-radius: var(--r);
}

.panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: -6px 0 22px;
    padding-bottom: 14px;
    border-bottom: 2px dashed var(--line);
    font-family: var(--disp);
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mute);
}
.panel-head .id { color: var(--gold); text-align: right; }

.page-header { padding-top: var(--beat); }
.page-header h1 { margin-bottom: 12px; }
.subtitle { max-width: 56ch; font-size: 16px; line-height: 1.7; color: var(--grey); }

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
    position: sticky; top: 0; z-index: 200;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 12px var(--gut);
    padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(12,12,12,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(255,196,0,.22);
}

.navbar-brand { flex: none; }
.brand-link { display: inline-flex; align-items: center; }
.logo-text {
    font-family: var(--disp);
    font-size: 23px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--white);
    text-shadow: 0 2px 0 rgba(0,0,0,.6);
}
.logo-text::before {
    content: '';
    display: inline-block;
    width: 15px; height: 15px;
    margin-right: 9px;
    background: var(--gold);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
                       50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.logo-img { max-height: 32px; width: auto; }

.nav-burger {
    display: none;
    -webkit-appearance: none; appearance: none;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 48px; height: 44px; padding: 11px;
    background: var(--card);
    border: 2px solid var(--edge);
    border-bottom-width: 4px; border-bottom-color: #000;
    border-radius: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.nav-burger span {
    display: block; height: 3px; width: 100%; border-radius: 3px;
    background: var(--gold);
    transition: transform .18s ease, opacity .18s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.navbar-menu { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.nav-link {
    padding: 9px 14px;
    font-family: var(--sans);
    font-size: 13px; font-weight: 800;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--grey);
    border-radius: 999px;
    white-space: nowrap;
    transition: color .14s ease, background-color .14s ease;
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav-link.is-current { color: var(--gold); background: var(--gold-air); }
.nav-link.admin-link { color: var(--bad); }
.nav-link.nav-cta {
    color: var(--black);
    background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
    box-shadow: 0 3px 0 var(--gold-edge);
    font-weight: 900;
}
.nav-link.nav-cta:hover { color: var(--black); filter: brightness(1.06); }



/* ==========================================================================
   Buttons — physical pills that press down
   ========================================================================== */

.btn {
    -webkit-appearance: none; appearance: none;
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 52px;
    padding: 14px 28px;
    font-family: var(--sans);
    font-size: 15px; font-weight: 900;
    letter-spacing: .05em; text-transform: uppercase;
    line-height: 1;
    color: var(--white);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 50%), var(--card-2);
    border: 2px solid var(--edge);
    border-radius: 999px;
    box-shadow: 0 5px 0 #000;
    cursor: pointer; touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: filter .12s ease, transform .1s ease, box-shadow .1s ease, color .12s ease;
}
.btn:hover { color: var(--gold-hi); filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #000; }

.btn-primary {
    color: var(--black);
    background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 52%, var(--gold-lo) 100%);
    border-color: var(--gold-lo);
    box-shadow: 0 5px 0 var(--gold-edge), 0 12px 26px rgba(255,196,0,.18);
    text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.btn-primary:hover { color: var(--black); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gold-edge); }

.btn-secondary { color: var(--gold); border-color: rgba(255,196,0,.5); }
.btn-danger  { color: var(--bad); border-color: rgba(255,107,87,.5); }
.btn-danger:hover  { color: #fff; background: var(--bad); border-color: var(--bad); }
.btn-success { color: var(--ok); border-color: rgba(88,214,141,.5); }
.btn-success:hover { color: var(--black); background: var(--ok); border-color: var(--ok); }

.btn-small { min-height: 36px; padding: 9px 16px; font-size: 12px; box-shadow: 0 3px 0 #000; }
.btn-small:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.btn-block { display: flex; width: 100%; }

.quick-actions, .duck-actions, .photo-actions, .print-controls {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.quick-actions { margin-top: 26px; }
@media (max-width: 560px) {
    .quick-actions .btn { flex: 1 1 100%; }
    .duck-actions .btn { flex: 1 1 45%; }
}

/* ==========================================================================
   Landing
   ========================================================================== */

.landing {
    display: flex; flex-direction: column; justify-content: center;
    min-height: calc(100svh - 70px);
    padding: clamp(8px, 2vw, 32px) 0 clamp(28px, 5vw, 52px);
}
@media (max-height: 700px) { .landing { min-height: 0; padding-top: 24px; } }

.landing-form { max-width: 580px; margin: 0 auto; width: 100%; }
.landing-go { width: 100%; margin-top: 22px; min-height: 58px; font-size: 16px; }

.or-rule {
    display: flex; align-items: center; gap: 14px;
    max-width: 440px; width: 100%;
    margin: clamp(26px, 4.5vw, 42px) auto clamp(18px, 3vw, 26px);
    font-family: var(--disp);
    font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--mute);
}
.or-rule::before, .or-rule::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: var(--edge); }

.auth-row {
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
    max-width: 460px; width: 100%; margin: 0 auto;
}
.auth-row .btn { flex: 1 1 180px; }

.landing-note {
    max-width: 52ch;
    margin: 24px auto 0;
    font-size: 13px; line-height: 1.75; font-weight: 600;
    text-align: center; color: var(--mute);
}

.scroll-cue {
    display: block;
    margin: clamp(24px, 4vw, 40px) auto 0;
    font-family: var(--disp);
    font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--mute); text-align: center;
}
.scroll-cue:hover { color: var(--gold); }
.scroll-cue::after { content: ' \2193'; }

/* ==========================================================================
   Badge hero — emblem + lockup + capsule
   ========================================================================== */

.badge-hero {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(6px, 2vw, 26px) clamp(8px, 2vw, 22px) clamp(22px, 3.5vw, 40px);
    text-align: center;
}
.badge-hero::after {
    content: '';
    position: absolute; left: 10%; right: 10%; bottom: 2px; height: 90px;
    background: radial-gradient(ellipse at 50% 50%, rgba(255,196,0,.26), transparent 70%);
    pointer-events: none; z-index: 0;
}
.badge-hero > * { position: relative; z-index: 1; }

.badge-emblem {
    display: block;
    width: 100%;
    max-width: min(520px, 84vw);
    margin: 0 auto clamp(0px, 1vw, 10px);
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 14px 22px rgba(0,0,0,.55));
}
@media (max-height: 760px) and (max-width: 760px) { .badge-emblem { max-width: 68vw; } }

.bd-track-gold use { fill: var(--gold); }
.bd-track-grey use { fill: #6E6E6E; opacity: .5; }
.bd-scene path     { fill: var(--gold); }
.bd-scene .bd-snow { fill: #FFF0B8; }
.bd-rig path, .bd-rig rect, .bd-rig circle { fill: #ECECEC; }
.bd-rig .bd-hub { fill: var(--black); }
.bd-tail path { fill: var(--gold); }

.badge-title {
    display: flex; align-items: center; justify-content: center;
    gap: clamp(12px, 2.4vw, 22px);
    margin: 0 0 clamp(18px, 3vw, 30px);
    font-family: var(--disp);
    font-size: clamp(40px, 10vw, 84px);
    line-height: .9;
    letter-spacing: .015em;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 4px 0 rgba(0,0,0,.6), 0 10px 24px rgba(0,0,0,.5);
}
.badge-title .w1 { color: var(--gold); }
.badge-title .w2 { color: var(--white); }
.badge-title::before, .badge-title::after {
    content: ''; flex: none;
    width: clamp(16px, 2.8vw, 27px); height: clamp(16px, 2.8vw, 27px);
    background: var(--gold);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
                       50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    filter: drop-shadow(0 3px 0 rgba(0,0,0,.6));
}

.code-field {
    position: relative;
    max-width: 580px;
    margin: 0 auto;
    padding: 7px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 46%, var(--gold-lo) 100%);
    box-shadow:
        0 10px 0 -2px var(--gold-edge),
        0 20px 40px rgba(0,0,0,.6),
        0 0 0 2px rgba(0,0,0,.5);
    transition: box-shadow .2s ease, transform .2s ease;
}
.code-field::before {
    content: '';
    position: absolute; inset: 3px 3px 52%;
    border-radius: 999px 999px 40% 40% / 999px 999px 100% 100%;
    background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
    pointer-events: none;
}
.code-input {
    display: block; width: 100%;
    padding: clamp(16px, 3.6vw, 26px) clamp(16px, 4vw, 34px);
    font-family: var(--mono);
    font-size: clamp(20px, 5.8vw, 34px);
    font-weight: 700;
    letter-spacing: .26em; text-indent: .26em;
    text-align: center; text-transform: uppercase;
    color: var(--gold-hi);
    background:
        radial-gradient(ellipse at 50% 130%, rgba(255,196,0,.18), transparent 66%),
        #141414;
    border: none; border-radius: 999px;
    box-shadow: inset 0 6px 16px rgba(0,0,0,.95), inset 0 -2px 4px rgba(255,255,255,.05);
    text-shadow: 0 0 18px rgba(255,196,0,.6);
    transition: color .15s linear, text-shadow .15s linear;
}
.code-input::placeholder { font-size: .68em; letter-spacing: .2em; color: #6A6A6A; text-shadow: none; }
.code-input:focus { outline: none; color: #FFF3C4; text-shadow: 0 0 26px rgba(255,196,0,.95); }
.code-field:focus-within {
    transform: translateY(-3px);
    box-shadow:
        0 13px 0 -2px var(--gold-edge),
        0 26px 50px rgba(0,0,0,.65),
        0 0 0 2px rgba(0,0,0,.5),
        0 0 64px rgba(255,196,0,.3);
}
.code-input.has-serial { color: #FFF3C4; text-shadow: 0 0 24px rgba(255,196,0,.9); }

.badge-sub {
    max-width: 46ch;
    margin: clamp(18px, 3vw, 26px) auto 0;
    font-size: 13px; font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.75; color: var(--mute);
}

@media (max-width: 520px) {
    .badge-title { gap: 9px; }
    .badge-title::before, .badge-title::after { width: 14px; height: 14px; }
    .code-input { letter-spacing: .16em; text-indent: .16em; }
}

.serial-badge, .duck-serial, .duck-badge {
    display: inline-block; padding: 7px 16px;
    font-family: var(--mono); font-size: 12px; font-weight: 700;
    letter-spacing: .18em; text-indent: .18em; text-transform: uppercase;
    white-space: nowrap;
    color: var(--black);
    background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, var(--gold-lo));
    border-radius: 999px;
    box-shadow: 0 2px 0 var(--gold-edge);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form, .admin-form { max-width: 540px; }
.form-wide { max-width: none; }
.form-group { margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 620px) { .form-row { grid-template-columns: 1fr 1fr; } }

label { display: block; margin-bottom: 9px; color: var(--grey); }

input, textarea, select {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--sans);
    font-size: 16px; font-weight: 700;
    color: var(--white);
    background: var(--card-2);
    border: 2px solid var(--edge);
    border-radius: var(--r-sm);
    transition: border-color .14s ease, box-shadow .14s ease;
}
input::placeholder, textarea::placeholder { color: var(--mute); font-weight: 600; }
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(255,196,0,.18);
}
textarea { resize: vertical; line-height: 1.6; }
select option { background: var(--card); color: var(--white); }
input[type="file"] { padding: 11px; font-size: 13px; color: var(--grey); }
input[type="checkbox"], input[type="radio"] { width: auto; }

small { display: block; margin-top: 8px; font-size: 12.5px; font-weight: 600; line-height: 1.55; color: var(--mute); }

.checkbox-row {
    display: flex; align-items: center; gap: 9px; margin-top: 12px;
    font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--grey);
}
.checkbox-row input { width: auto; }

.search-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 24px; }
.search-row input, .search-row select { flex: 1 1 200px; width: auto; }

/* ==========================================================================
   Stats — gold badge chips
   ========================================================================== */

.stats-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    background: none; border: none;
}
.stat-card {
    padding: 20px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 40%), var(--card);
    border: 2px solid var(--edge);
    border-bottom-width: 6px; border-bottom-color: #000;
    border-radius: var(--r-sm);
    text-align: center;
}
.stat-number, .stat-value {
    display: block;
    font-family: var(--disp);
    font-size: clamp(30px, 6vw, 44px);
    line-height: 1;
    color: var(--gold);
    text-shadow: 0 3px 0 rgba(0,0,0,.55);
    font-variant-numeric: tabular-nums;
}
.stat-label, .stat-name { display: block; margin-top: 9px; color: var(--mute); }
@media (min-width: 720px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .stats-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Card grids
   ========================================================================== */

.ducks-grid, .feature-grid, .links-grid, .photos-grid, .photos-admin-grid,
.serials-grid, .how-grid {
    display: grid; grid-template-columns: 1fr;
    gap: 14px;
    background: none; border: none;
}
.duck-card, .feature-card, .link-card, .photo-card, .photo-admin-card,
.duck-info-card, .card, .how-card {
    padding: 24px 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 35%), var(--card);
    border: 2px solid var(--edge);
    border-bottom-width: 6px; border-bottom-color: #000;
    border-radius: var(--r);
    transition: transform .14s ease, border-color .14s ease;
}
.link-card:hover, .duck-card:hover { transform: translateY(-3px); border-color: rgba(255,196,0,.35); border-bottom-color: #000; }

@media (min-width: 640px) {
    .ducks-grid, .links-grid, .photos-grid, .photos-admin-grid,
    .serials-grid, .feature-grid, .how-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
    .feature-grid, .links-grid, .how-grid { grid-template-columns: repeat(4, 1fr); }
    .photos-grid, .photos-admin-grid { grid-template-columns: repeat(3, 1fr); }
}

.how-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    margin-bottom: 14px;
    font-family: var(--disp);
    font-size: 26px; line-height: 1;
    color: var(--black);
    background: linear-gradient(180deg, var(--gold-hi), var(--gold) 58%, var(--gold-lo));
    border-radius: 50%;
    box-shadow: 0 4px 0 var(--gold-edge), 0 8px 18px rgba(0,0,0,.4);
    text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.how-card h3 { margin-bottom: 8px; }
.how-card p, .feature-card p, .link-desc { margin: 0; font-size: 14px; line-height: 1.65; font-weight: 600; color: var(--grey); }

.link-title {
    display: block; margin-bottom: 5px;
    font-family: var(--disp); font-size: 20px;
    letter-spacing: .03em; text-transform: uppercase;
}
.feature-icon, .link-icon { display: none; }

.duck-card-header, .duck-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.duck-card-header h3, .duck-header h3 { margin: 0; }
.duck-stats {
    display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 14px;
    font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: var(--mute);
}
.duck-owner { font-size: 13px; color: var(--grey); }

.about-lede {
    max-width: 62ch;
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.8;
    font-weight: 600;
    color: var(--grey);
}
.about-lede strong { color: var(--white); font-weight: 800; }

/* ==========================================================================
   Feed / timeline / board
   ========================================================================== */

.feed { list-style: none; margin: 0; padding: 0; }
.feed-item {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    padding: 14px 0;
    border-bottom: 2px dashed var(--line-2);
    font-size: 14px; font-weight: 600;
}
.feed-item:last-child { border-bottom: none; }
.feed-item::before {
    content: '';
    flex: none;
    width: 11px; height: 11px;
    align-self: center;
    background: var(--gold);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
                       50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.feed-body { flex: 1 1 220px; color: var(--grey); }
.feed-body a, .feed-body strong { color: var(--white); font-weight: 800; }
.feed-time { color: var(--mute); white-space: nowrap; }
.feed-icon { display: none; }

/* Timeline: webbed duck footprints as markers */
.timeline { list-style: none; margin: 0; padding: 0 0 0 40px; position: relative; }
.timeline::before {
    content: ''; position: absolute; left: 10px; top: 12px; bottom: 12px;
    width: 3px; border-radius: 3px;
    background: repeating-linear-gradient(180deg, var(--gold) 0 7px, transparent 7px 15px);
    opacity: .5;
}
.timeline-item { position: relative; padding: 0 0 30px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
    position: absolute; left: -40px; top: 2px;
    width: 24px; height: 24px; font-size: 0;
    background-color: var(--gold);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 L15.5 10 L20 8 L17 13.5 C19 15 20 17 20 19 L14.5 17.5 L12 21 L9.5 17.5 L4 19 C4 17 5 15 7 13.5 L4 8 L8.5 10 Z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 L15.5 10 L20 8 L17 13.5 C19 15 20 17 20 19 L14.5 17.5 L12 21 L9.5 17.5 L4 19 C4 17 5 15 7 13.5 L4 8 L8.5 10 Z'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 2px 0 rgba(0,0,0,.5));
}
.timeline-item:first-child .timeline-marker { background-color: var(--gold-hi); }
.timeline-content { padding: 0; }
.timeline-type { margin: 0 0 6px; color: var(--gold); }
.timeline-location {
    margin: 0 0 5px;
    font-family: var(--disp); font-size: clamp(20px, 4.2vw, 28px);
    letter-spacing: .02em; text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(0,0,0,.5);
}
.timeline-date, .timeline-finder { margin: 0; font-size: 12px; font-weight: 700; color: var(--mute); }

.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.board-row {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0) 40%), var(--card);
    border: 2px solid var(--edge);
    border-bottom-width: 5px; border-bottom-color: #000;
    border-radius: var(--r-sm);
}
.board-row.is-you { border-color: rgba(255,196,0,.5); border-bottom-color: #000; }
.rank {
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px;
    font-family: var(--disp); font-size: 17px;
    color: var(--grey);
    background: var(--card-2);
    border: 2px solid var(--edge);
    border-radius: 50%;
    font-variant-numeric: tabular-nums;
}
.rank.rank-top {
    color: var(--black);
    background: linear-gradient(180deg, var(--gold-hi), var(--gold) 58%, var(--gold-lo));
    border-color: var(--gold-lo);
    box-shadow: 0 3px 0 var(--gold-edge);
}
.board-main {
    flex: 1; min-width: 0;
    font-family: var(--disp); font-size: clamp(17px, 3.6vw, 21px);
    letter-spacing: .02em; text-transform: uppercase;
    overflow-wrap: anywhere;
}
.board-sub { display: block; margin-top: 4px; color: var(--mute); font-family: var(--sans); }
.board-score { text-align: right; white-space: nowrap; }
.board-score strong {
    display: block;
    font-family: var(--disp); font-size: clamp(20px, 4.4vw, 26px);
    line-height: 1; color: var(--gold);
    text-shadow: 0 2px 0 rgba(0,0,0,.5);
    font-variant-numeric: tabular-nums;
}
.board-unit { display: block; margin-top: 4px; color: var(--mute); }

.states-list { display: flex; flex-wrap: wrap; gap: 8px; }
.state-badge, .badge {
    display: inline-block; padding: 6px 14px;
    color: var(--grey);
    background: var(--card-2);
    border: 2px solid var(--edge);
    border-radius: 999px;
}
.badge-admin, .badge-banned { color: var(--bad); border-color: rgba(255,107,87,.5); }

/* ==========================================================================
   Tables
   ========================================================================== */

.admin-table {
    width: 100%; overflow-x: auto;
    border: 2px solid var(--edge);
    border-radius: var(--r-sm);
    -webkit-overflow-scrolling: touch;
    background: var(--card);
}
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th {
    padding: 13px 16px; text-align: left;
    color: var(--gold); background: var(--card-2);
    border-bottom: 2px solid var(--edge);
}
td { padding: 13px 16px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gold-air); }

.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions form { margin: 0; }

.pagination { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.page-info { color: var(--mute); }

.subnav {
    display: flex; gap: 8px;
    padding: 16px 0 0; margin-bottom: -12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav-link {
    flex: none;
    padding: 9px 15px;
    color: var(--mute);
    background: var(--card);
    border: 2px solid var(--edge);
    border-radius: 999px;
    white-space: nowrap;
}
.subnav-link:hover { color: var(--white); }
.subnav-link.is-current {
    color: var(--black);
    background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, var(--gold-lo));
    border-color: var(--gold-lo);
    box-shadow: 0 2px 0 var(--gold-edge);
}

.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-item {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
    padding: 12px 0; border-bottom: 2px dashed var(--line-2); font-size: 14px; font-weight: 600;
}
.activity-item:last-child { border-bottom: none; }
.activity-action { font-weight: 800; color: var(--white); }
.activity-user { color: var(--gold); }
.activity-time { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }

/* ==========================================================================
   Alerts / empty / misc
   ========================================================================== */

.alert {
    position: relative;
    padding: 15px 18px 15px 50px;
    margin-bottom: 20px;
    font-size: 14px; font-weight: 700; line-height: 1.6;
    color: var(--white);
    background: var(--card);
    border: 2px solid var(--edge);
    border-radius: var(--r-sm);
}
.alert::before {
    position: absolute; left: 16px; top: 50%;
    transform: translateY(-50%);
    font-family: var(--disp); font-size: 15px;
}
.alert a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.alert-error   { border-color: rgba(255,107,87,.55); } .alert-error::before   { content: '!'; color: var(--bad); }
.alert-success { border-color: rgba(88,214,141,.55); } .alert-success::before { content: '\2713'; color: var(--ok); }
.alert-warning { border-color: rgba(255,196,0,.55); }  .alert-warning::before { content: '!'; color: var(--gold); }

.empty-state {
    padding: 38px 22px; text-align: center; color: var(--mute);
    background: var(--card);
    border: 2px dashed var(--edge);
    border-radius: var(--r);
}
.empty-state p { max-width: 46ch; margin: 0 auto 4px; font-size: 14px; font-weight: 600; }
.empty-state::before {
    content: 'NOTHING HERE YET';
    display: block; margin-bottom: 10px;
    font-family: var(--disp);
    font-size: 14px; letter-spacing: .16em; color: var(--gold); opacity: .8;
}

.disclaimer {
    max-width: 70ch; padding: 14px 18px; margin-top: 20px;
    font-size: 12px; font-weight: 600; line-height: 1.7;
    color: var(--mute);
    background: var(--card);
    border: 2px solid var(--edge);
    border-radius: var(--r-sm);
}

.spec { margin: 20px 0; }
.spec dt { margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.spec dd { margin: 0 0 16px; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }

.tips { padding-left: 20px; margin: 0 0 22px; color: var(--grey); font-size: 14px; font-weight: 600; }
.tips li { margin-bottom: 8px; }

.photo-img, .photo-preview, .logo-preview { width: 100%; border-radius: var(--r-sm); border: 2px solid var(--edge); }
.logo-preview { max-width: 170px; margin-bottom: 14px; padding: 10px; background: var(--card-2); }
.photo-info, .photo-date { font-size: 12px; font-weight: 700; color: var(--mute); }

/* ==========================================================================
   Footer — tread strip on top
   ========================================================================== */

.footer {
    position: relative;
    margin-top: var(--beat);
    padding: 44px var(--gut) calc(44px + env(safe-area-inset-bottom));
    font-size: 12px; font-weight: 600;
    color: var(--mute);
    text-align: center;
    background: #0A0A0A;
}
.footer::before {
    content: '';
    position: absolute; left: 0; right: 0; top: 0;
    height: 12px;
    background: repeating-linear-gradient(90deg,
        var(--gold) 0 26px, transparent 26px 40px);
    border-radius: 0 0 6px 6px;
    opacity: .85;
}
.footer p { margin: 0 0 9px; }
.footer-mark {
    font-family: var(--disp); font-size: 20px;
    letter-spacing: .04em; text-transform: uppercase; color: var(--white);
    text-shadow: 0 2px 0 rgba(0,0,0,.6);
}
.footer a { color: var(--grey); font-weight: 700; }
.footer a:hover { color: var(--gold); }

/* ==========================================================================
   Printable tags
   ========================================================================== */

.tag-sheet { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 30px; }
@media (min-width: 660px) { .tag-sheet { grid-template-columns: repeat(2, 1fr); } }

.tag {
    padding: 30px 24px; text-align: center;
    color: var(--black); background: #fff;
    border: 2px dashed rgba(0,0,0,.5);
    border-radius: 18px;
    break-inside: avoid; page-break-inside: avoid;
}
.tag-brand { margin: 0 0 3px; font-family: var(--sans); font-size: 10px; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; color: #666; }
.tag-name { margin: 0 0 18px; font-family: var(--disp); font-size: 28px; letter-spacing: .02em; text-transform: uppercase; color: #0C0C0C; }
.tag-qr { display: flex; align-items: center; justify-content: center; min-height: 185px; margin: 0 auto 18px; padding: 6px; background: #fff; }
.tag-qr img, .tag-qr canvas { display: block; max-width: 175px; height: auto; }
.qr-fallback { font-size: 11px; color: #777; }
.tag-serial {
    display: inline-block; margin: 0 0 14px; padding: 11px 24px;
    font-family: var(--mono); font-size: 17px; font-weight: 700;
    letter-spacing: .24em; text-indent: .24em; text-transform: uppercase;
    color: #0C0C0C;
    background: linear-gradient(180deg, #FFDE59, #FFC400 58%, #C98A00);
    border: 2px solid #0C0C0C;
    border-radius: 999px;
}
.tag-note { margin: 0; font-size: 9px; font-weight: 700; line-height: 1.8; color: #555; }
.tag-note strong { color: #0C0C0C; }
.copy-serial {
    margin-top: 14px; padding: 9px 16px;
    font-family: var(--sans); font-size: 10px; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase;
    color: #555; background: none;
    border: 2px solid rgba(0,0,0,.3); border-radius: 999px; cursor: pointer;
}

/* ==========================================================================
   Motion + print
   ========================================================================== */

@keyframes pop {
    0%   { opacity: 0; transform: translateY(14px) scale(.98); }
    70%  { opacity: 1; transform: translateY(-2px) scale(1.005); }
    100% { opacity: 1; transform: none; }
}
.landing > *, section > .split, section > .panel, .page-header > * {
    animation: pop .38s cubic-bezier(.2,.8,.3,1) backwards;
}
.landing > *:nth-child(2) { animation-delay: .05s; }
.landing > *:nth-child(3) { animation-delay: .1s; }
.landing > *:nth-child(4) { animation-delay: .15s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important; animation-iteration-count: 1 !important;
        transition-duration: .01ms !important; scroll-behavior: auto !important;
    }
    .code-field, .code-field:focus-within,
    .link-card:hover, .duck-card:hover { transform: none; }
}

@media print {
    body { background: #fff !important; color: #000 !important; }
    body::before { display: none !important; }
    .navbar, .footer, .subnav, .search-row, .pagination,
    .print-controls, .no-print, .nav-burger { display: none !important; }
    main.container { padding: 0; max-width: none; }
    .tag-sheet { grid-template-columns: repeat(2, 1fr); gap: 10mm; }
    .tag, .tag-serial { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .tag { border-color: #000; }
    .tag-serial { background: #FFC400 !important; }
    .badge-hero::after { display: none; }
    .code-field { box-shadow: none; background: none; border: 2px solid #000; }
}

/* ==========================================================================
   V2 overrides: duck mark in the corner, cleaner mobile drawer
   ========================================================================== */

.brand-mark {
    display: block;
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 3px 0 rgba(0,0,0,.55));
    transition: transform .15s ease;
}
.brand-link:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }



/* ==========================================================================
   Polish: motion + shine
   ========================================================================== */




/* ----- landing emblem: a slow, gentle bob ----- */
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}
.landing .badge-emblem { animation: floaty 4.5s ease-in-out infinite; }

/* ----- capsule: a shine sweeps across every few seconds ----- */
.code-field { overflow: hidden; }
.code-field::after {
    content: '';
    position: absolute;
    top: -20%; bottom: -20%;
    left: -30%;
    width: 26%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,.5), transparent);
    transform: skewX(-18deg);
    animation: sheen 5.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes sheen {
    0%, 74% { left: -32%; }
    92%, 100% { left: 118%; }
}

/* ----- primary buttons: sheen on hover ----- */
.btn-primary { overflow: hidden; }
.btn-primary::after {
    content: '';
    position: absolute;
    top: -20%; bottom: -20%; left: -35%;
    width: 30%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,.55), transparent);
    transform: skewX(-18deg) translateX(0);
    transition: transform .45s ease;
    pointer-events: none;
}
.btn-primary:hover::after { transform: skewX(-18deg) translateX(460%); }

/* ----- section titles: skid-mark underline ----- */
.split h2::after, .page-header h1::after {
    content: '';
    display: block;
    width: 74px;
    height: 8px;
    margin-top: 12px;
    border-radius: 4px;
    background: repeating-linear-gradient(90deg,
        var(--gold) 0 14px, transparent 14px 22px);
    opacity: .9;
}
.text-center h2::after { margin-left: auto; margin-right: auto; }

/* ----- cards: gold glow joins the lift ----- */
.link-card:hover, .duck-card:hover {
    box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 1px rgba(255,196,0,.25), 0 0 40px rgba(255,196,0,.08);
}
.board-row { transition: transform .14s ease, border-color .14s ease; }
.board-row:hover { transform: translateY(-2px); border-color: rgba(255,196,0,.35); border-bottom-color: #000; }

@media (prefers-reduced-motion: reduce) {
    .landing .badge-emblem { animation: none; }
    .code-field::after, .btn-primary::after { animation: none; display: none; }
    .navbar-menu .nav-link { opacity: 1; transform: none; }
}



/* ==========================================================================
   MOBILE MENU (final) — dropdown sheet under the top bar.

   Root-cause note: backdrop-filter on .navbar made it the containing
   block for position:fixed children, so every previous menu rendered
   inside the 66px bar instead of the viewport. On mobile the bar goes
   solid (no filter) and the sheet positions against the real screen.
   ========================================================================== */

@media (max-width: 760px) {
    .navbar {
        background: rgba(10,10,10,.97);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-burger { display: flex; }

    body.nav-open { overflow: hidden; }

    .navbar-menu {
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 190;                      /* under the bar: duck + X stay tappable */
        display: flex;
        flex-direction: column;
        gap: 7px;
        padding: calc(76px + env(safe-area-inset-top)) 16px 16px;
        background: #101010;
        border-bottom: 2px solid rgba(255,196,0,.35);
        border-radius: 0 0 24px 24px;
        transform: translateY(-108%);
        transition: transform .24s cubic-bezier(.3,.8,.3,1);
        max-height: calc(100svh - 6px);
        overflow-y: auto;
    }
    body.nav-open .navbar-menu {
        transform: none;
        /* the giant shadow doubles as the page-dimming scrim */
        box-shadow: 0 30px 70px rgba(0,0,0,.65), 0 0 0 100vmax rgba(0,0,0,.6);
    }

    /* tread strip along the sheet's bottom lip */
    .navbar-menu::after {
        content: '';
        flex: none;
        height: 8px;
        margin: 9px -16px -16px;
        border-radius: 0 0 22px 22px;
        background: repeating-linear-gradient(90deg, var(--gold) 0 20px, transparent 20px 32px);
        opacity: .8;
    }

    /* rows: quiet tiles, left-aligned, chevron on the right */
    .navbar-menu .nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 15px 16px;
        font-family: var(--sans);
        font-size: 16px;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
        text-align: left;
        color: var(--grey);
        background: var(--card);
        border: 2px solid transparent;
        border-radius: 14px;
    }
    .navbar-menu .nav-link::after {
        content: '\203A';
        margin-left: auto;
        font-weight: 900;
        color: var(--mute);
    }
    .navbar-menu .nav-link:hover { color: var(--white); background: var(--card-2); }
    .navbar-menu .nav-link.is-current {
        color: var(--gold);
        background: #191919;
        border-color: rgba(255,196,0,.4);
    }
    .navbar-menu .nav-link.is-current::before {
        content: '';
        width: 12px; height: 12px;
        background: var(--gold);
        clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
                           50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    }
    .navbar-menu .nav-link.admin-link { color: var(--bad); }
    .navbar-menu .nav-link.nav-cta {
        justify-content: center;
        margin-top: 4px;
        color: var(--black);
        background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
        border: none;
        box-shadow: 0 4px 0 var(--gold-edge);
        text-shadow: 0 1px 0 rgba(255,255,255,.35);
    }
    .navbar-menu .nav-link.nav-cta::after { display: none; }
}

/* ==========================================================================
   V6: reference-accurate emblem bits — floor row + pin badge
   ========================================================================== */

.badge-floor {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    max-width: 620px;
    width: 100%;
    margin: clamp(14px, 2.6vw, 24px) auto 0;
}

.floor-icon {
    flex: none;
    width: clamp(64px, 13vw, 96px);
    height: auto;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,.5));
}
.fi-body  { fill: #ECECEC; }
.fi-hub   { fill: var(--black); }
.fi-gold  { fill: var(--gold); }
.fi-splat { fill: var(--gold); opacity: .85; }

.badge-floor .badge-sub { flex: 1; margin: 0 0 6px; }

.floor-q {
    flex: 1;
    margin: 0 0 2px;
    font-family: var(--disp);
    font-size: clamp(28px, 6vw, 42px);
    letter-spacing: .12em;
    text-align: center;
    color: var(--gold);
    text-shadow: 0 4px 0 rgba(0,0,0,.6);
}

/* the pin reads best a touch larger than the old head */
.brand-mark { width: 46px; height: 46px; }

@media (max-width: 520px) {
    .floor-icon { width: 58px; }
}

/* ==========================================================================
   V7: podium, ticker, count-up, footprint empty states
   ========================================================================== */

/* ----- leaderboard podium ----- */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
}
.podium-spot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1 1 0;
    max-width: 190px;
    text-align: center;
}
.podium-spot.is-you .podium-name { color: var(--gold); }
.medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    margin-bottom: 4px;
    font-family: var(--disp);
    font-size: 24px;
    color: var(--black);
    border-radius: 50%;
    text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.medal.m1 { background: linear-gradient(180deg, #FFDE59, #FFC400 58%, #C98A00); box-shadow: 0 4px 0 #8F6200, 0 0 26px rgba(255,196,0,.35); }
.medal.m2 { background: linear-gradient(180deg, #E8ECEF, #C9CDD1 58%, #8E959B); box-shadow: 0 4px 0 #676D72; }
.medal.m3 { background: linear-gradient(180deg, #E09B5C, #C77B30 58%, #8F5518); box-shadow: 0 4px 0 #6B3E10; }
.podium-name {
    font-family: var(--disp);
    font-size: clamp(16px, 3.6vw, 21px);
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--white);
    text-shadow: 0 2px 0 rgba(0,0,0,.55);
    overflow-wrap: anywhere;
}
.podium-score {
    font-family: var(--sans);
    font-size: 12px; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--gold);
}
.podium-sub {
    font-size: 10px; font-weight: 800;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--mute);
}
.podium-step {
    width: 100%;
    margin-top: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 40%),
        var(--card);
    border: 2px solid var(--edge);
    border-bottom: 6px solid #000;
    border-radius: 12px 12px 0 0;
}
.place-1 .podium-step { height: 74px; border-color: rgba(255,196,0,.45); border-bottom-color: #000; }
.place-2 .podium-step { height: 52px; }
.place-3 .podium-step { height: 38px; }

/* ----- landing ticker ----- */
.ticker {
    position: relative;
    margin: 6px calc(var(--gut) * -1) 0;
    padding: 12px 0;
    border-top: 2px solid rgba(255,196,0,.3);
    border-bottom: 2px solid rgba(255,196,0,.3);
    background: rgba(255,196,0,.05);
    overflow: hidden;
    white-space: nowrap;
}
.ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    padding-left: 22px;
    animation: tickerScroll 40s linear infinite;
    will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.tick {
    font-family: var(--sans);
    font-size: 13px; font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--grey);
}
.tick strong { color: var(--gold); font-weight: 900; }
.tick-star {
    flex: none;
    width: 11px; height: 11px;
    background: var(--gold);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
                       50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: .8;
}
@keyframes tickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ----- 404 sad duck ----- */
.sad-duck {
    display: block;
    width: min(230px, 60vw);
    height: auto;
    margin: 0 auto 8px;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.5));
}

/* ----- empty states get a footprint ----- */
.empty-state::after {
    content: '';
    display: block;
    width: 40px; height: 26px;
    margin: 14px auto 0;
    background: var(--gold);
    opacity: .5;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 132'%3E%3Cpath d='M66 100 C60 78 66 58 82 46 L102 22 C110 14 120 20 116 30 L106 52 C116 42 130 36 144 36 L164 24 C172 19 180 26 174 34 L158 50 C168 50 178 56 184 64 L200 58 C208 55 212 64 205 70 L186 80 C180 98 162 108 140 110 C112 113 84 109 66 100 Z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 132'%3E%3Cpath d='M66 100 C60 78 66 58 82 46 L102 22 C110 14 120 20 116 30 L106 52 C116 42 130 36 144 36 L164 24 C172 19 180 26 174 34 L158 50 C168 50 178 56 184 64 L200 58 C208 55 212 64 205 70 L186 80 C180 98 162 108 140 110 C112 113 84 109 66 100 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
}

/* request-a-code row under the NEW CODE hero */
.code-request {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: -4px 0 26px;
    font-size: 13px;
    font-weight: 700;
    color: var(--mute);
}

/* ==========================================================================
   V9: THE PASSPORT
   Paper pages inside the dark site: gold cover strip, photo with corner
   mounts, typed fields, a machine-readable zone, and rubber-stamped stops.
   ========================================================================== */

.passport {
    max-width: 640px;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid var(--edge);
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
}

.pp-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 18px;
    font-family: var(--disp);
    font-size: clamp(15px, 3vw, 19px);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #1A1403;
    background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
    text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.pp-star {
    flex: none;
    width: 14px; height: 14px;
    background: #1A1403;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
                       50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: .85;
}

/* paper */
.pp-page {
    position: relative;
    padding: clamp(18px, 3.6vw, 30px);
    color: #2A2416;
    background:
        repeating-radial-gradient(circle at 8% -20%, rgba(166,140,60,.05) 0 2px, transparent 2px 9px),
        repeating-radial-gradient(circle at 96% 130%, rgba(166,140,60,.05) 0 2px, transparent 2px 9px),
        linear-gradient(180deg, #F7F2E4, #EFE7D2);
}
.pp-page + .pp-page { border-top: 2px dashed rgba(90,74,32,.3); }

.pp-id {
    display: grid;
    grid-template-columns: minmax(104px, 150px) 1fr;
    gap: 18px 22px;
}

.pp-photo {
    position: relative;
    aspect-ratio: 3 / 4;
    background: #E4DCC4;
    border: 1px solid rgba(90,74,32,.35);
    overflow: hidden;
}
.pp-photo img, .pp-photo svg {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
/* corner mounts */
.pp-photo::before, .pp-photo::after {
    content: '';
    position: absolute;
    width: 22px; height: 22px;
    background: rgba(90,74,32,.28);
    z-index: 2;
}
.pp-photo::before { top: 0; left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.pp-photo::after  { bottom: 0; right: 0; clip-path: polygon(100% 100%, 100% 0, 0 100%); }

.pp-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    align-content: start;
}
.pp-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-field.pp-wide { grid-column: 1 / -1; }
.pp-label {
    font-family: var(--sans);
    font-size: 9px; font-weight: 800;
    letter-spacing: .16em; text-transform: uppercase;
    color: #8A7A4E;
}
.pp-value {
    font-family: var(--sans);
    font-size: 15px; font-weight: 800;
    color: #2A2416;
    overflow-wrap: anywhere;
}
.pp-value.pp-big {
    font-family: var(--disp);
    font-size: clamp(22px, 4.6vw, 32px);
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1;
}
.pp-value.pp-mono {
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: .12em;
}

.pp-mrz {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding: 10px 12px;
    background: #FDFBF3;
    border: 1px solid rgba(90,74,32,.3);
    font-family: var(--mono);
    font-size: clamp(9px, 2.2vw, 13px);
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.7;
    color: #33301F;
    white-space: nowrap;
    overflow: hidden;
}
.pp-mrz span { display: block; }

/* ----- stamps ----- */
.pp-stamps-title {
    margin: 0 0 16px;
    font-family: var(--sans);
    font-size: 10px; font-weight: 800;
    letter-spacing: .2em; text-transform: uppercase;
    color: #8A7A4E;
}
.pp-empty { margin: 0; font-weight: 700; color: #8A7A4E; }

.stamp-wall {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
}

.stamp {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px 11px;
    text-align: center;
    border: 3px solid currentColor;
    border-radius: 10px;
    background: transparent;
    opacity: .92;
    /* inked, slightly uneven */
    box-shadow: inset 0 0 0 1px currentColor;
    mask-image: radial-gradient(circle at 30% 20%, #000 55%, rgba(0,0,0,.75) 80%, rgba(0,0,0,.9));
    -webkit-mask-image: radial-gradient(circle at 30% 20%, #000 55%, rgba(0,0,0,.75) 80%, rgba(0,0,0,.9));
}
.stamp:nth-child(even) { border-radius: 50% / 42%; padding: 13px 22px 14px; }

.ink-gold { color: #A87900; }
.ink-red  { color: #B3402A; }
.ink-grey { color: #4E4A3C; }

.tilt-0 { transform: rotate(-4deg); }
.tilt-1 { transform: rotate(3deg); }
.tilt-2 { transform: rotate(-2deg); }
.tilt-3 { transform: rotate(5deg); }
.tilt-4 { transform: rotate(-6deg); }

.stamp-type {
    font-family: var(--sans);
    font-size: 8.5px; font-weight: 800;
    letter-spacing: .22em; text-transform: uppercase;
}
.stamp-city {
    font-family: var(--disp);
    font-size: clamp(16px, 3.4vw, 21px);
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1;
}
.stamp-meta, .stamp-by {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .pp-id { grid-template-columns: 96px 1fr; gap: 14px; }
    .pp-fields { grid-template-columns: 1fr; gap: 10px; }
    .pp-field.pp-wide { grid-column: auto; }
}

/* in-place code assignment feedback */
.code-note { font-size: 13px; font-weight: 800; }
.code-note.is-good { color: var(--gold); }
.code-note.is-bad  { color: var(--bad); }
@keyframes codeFlash {
    0%   { box-shadow: inset 0 5px 12px rgba(0,0,0,.95), 0 0 0 0 rgba(255,196,0,.9); }
    100% { box-shadow: inset 0 5px 12px rgba(0,0,0,.95), 0 0 26px 6px rgba(255,196,0,0); }
}
.code-input.code-flash { animation: codeFlash .9s ease-out 1; }
@media (prefers-reduced-motion: reduce) {
    .code-input.code-flash { animation: none; }
}
