/* Globe Chase — "detective's desk at midnight" theme.
   Navy desk, manila case files, polaroid clue photos, red rubber stamps, gold insignia. */

:root {
    --ink: #0b1530;
    --ink-2: #13224a;
    --ink-3: #1c2f63;
    --line: rgba(255, 255, 255, .09);
    --text: #eef2ff;
    --muted: #9aa6c7;
    --paper: #f4ead5;
    --paper-2: #e6d5ae;
    --paper-ink: #2b2118;
    --red: #e23d4f;
    --red-deep: #a61b2c;
    --gold: #f7c548;
    --gold-deep: #c98d0e;
    --teal: #2ec4b6;
    --sky: #4cc9f0;
    --green: #4ade80;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --font-head: 'Bebas Neue', 'Impact', 'Arial Narrow', sans-serif;
    --font-type: 'Special Elite', 'Courier New', monospace;
    --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    color-scheme: dark;
    /* Syncfusion Material 3 accent → the game's gold (values are "r, g, b") */
    --color-sf-primary: 247, 197, 72;
    --color-sf-on-primary: 43, 26, 0;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--ink);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
}

body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(76, 201, 240, .14), transparent 60%),
        radial-gradient(900px 600px at -10% 110%, rgba(226, 61, 79, .12), transparent 60%),
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .06) 1px, transparent 0) 0 0 / 22px 22px,
        linear-gradient(180deg, #0b1530 0%, #0a1228 100%);
    background-attachment: fixed;
}

h1, h2, h3, .head { font-family: var(--font-head); letter-spacing: .04em; font-weight: 400; margin: 0; line-height: 1.05; }
h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
h3 { font-size: 1.45rem; }
a { color: var(--sky); }
img { max-width: 100%; }
button { font-family: inherit; }
.type { font-family: var(--font-type); }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: .75rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 1rem; }
.hidden { display: none !important; }

/* ---- non-Latin scripts ------------------------------------------------------------------
   Letter-spacing breaks joined scripts (Arabic) and vowel signs (Devanagari, Tamil…), and the
   display fonts only cover Latin, so other scripts use the system font, unspaced. */
html[data-script="complex"] h1, html[data-script="complex"] h2, html[data-script="complex"] h3,
html[data-script="complex"] .head, html[data-script="complex"] .btn, html[data-script="complex"] .stamp,
html[data-script="complex"] .badge, html[data-script="complex"] .logo-sub, html[data-script="complex"] .type,
html[data-script="complex"] [class*="nm"], html[data-script="complex"] .lbl, html[data-script="complex"] .place .nm {
    letter-spacing: normal !important;
}
html[data-script="complex"] .logo-text { letter-spacing: .02em; }
/* The typewriter face is Latin-only; without this, Arabic falls back to Courier New's stretched
   monospaced Arabic. Latin letters and digits keep the typewriter look. */
html[data-script="complex"] { --font-type: 'Special Elite', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
html[dir="rtl"] .bubble::before { left: auto; right: -10px; border-right: 0; border-left: 10px solid #fffdf6; }
html[dir="rtl"] .lb-row.you { box-shadow: inset -3px 0 0 var(--teal); }

/* ---- shell ----------------------------------------------------------------------------- */
.shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: calc(12px + var(--safe-top)) 16px calc(28px + var(--safe-bottom));
    min-height: 100vh;
    min-height: 100dvh;
}

.page-head { display: flex; align-items: center; gap: .75rem; margin: .25rem 0 1.25rem; }
.page-head h1, .page-head h2 { flex: 1; }
.back {
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--ink-2); border: 1px solid var(--line); color: var(--text);
    font-size: 1.3rem; cursor: pointer; text-decoration: none; flex: none;
}
.back:hover { background: var(--ink-3); }

/* ---- buttons ----------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 52px; padding: .7rem 1.4rem;
    border: none; border-radius: 999px; cursor: pointer;
    font-family: var(--font-head); font-size: 1.35rem; letter-spacing: .06em;
    color: #1a1204; text-decoration: none;
    background: linear-gradient(180deg, #ffd96b, var(--gold) 45%, var(--gold-deep));
    box-shadow: 0 4px 0 #8a5f05, 0 10px 20px rgba(0, 0, 0, .3);
    transition: transform .08s, box-shadow .08s, filter .15s;
    user-select: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a5f05, 0 4px 10px rgba(0, 0, 0, .3); }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; }
.btn.red { color: #fff; background: linear-gradient(180deg, #ff6b7a, var(--red) 45%, var(--red-deep)); box-shadow: 0 4px 0 #6d0f1b, 0 10px 20px rgba(0, 0, 0, .3); }
.btn.teal { color: #04201d; background: linear-gradient(180deg, #7ef0e5, var(--teal) 45%, #13897e); box-shadow: 0 4px 0 #0b5a53, 0 10px 20px rgba(0, 0, 0, .3); }
.btn.ghost { color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:active { transform: translateY(1px); }
.btn.small { min-height: 40px; font-size: 1.05rem; padding: .4rem 1rem; }
.btn.big { min-height: 64px; font-size: 1.8rem; padding: .8rem 2.2rem; }
.btn.block { width: 100%; }

/* ---- cards & paper ----------------------------------------------------------------------- */
.card {
    background: linear-gradient(180deg, rgba(28, 47, 99, .75), rgba(19, 34, 74, .85));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
}

.paper {
    position: relative;
    background:
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(43, 33, 24, .07) 27px 28px),
        linear-gradient(180deg, var(--paper), var(--paper-2));
    color: var(--paper-ink);
    border-radius: 6px 14px 14px 14px;
    padding: 1.4rem 1.2rem 1.2rem;
    box-shadow: 0 2px 0 #c9b688, var(--shadow);
}
.paper::before {
    content: attr(data-tab);
    position: absolute; top: -26px; left: 0;
    height: 28px; padding: 4px 18px 0;
    background: var(--paper);
    border-radius: 10px 10px 0 0;
    font-family: var(--font-type); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
    color: #7a6545;
}
.paper:not([data-tab])::before { display: none; }
.paper .muted { color: #7a6545; }
.paper h2, .paper h3 { color: #3a2a17; }

.polaroid {
    /* An explicit width: inside the centring flex row, a polaroid would otherwise shrink to its
       image's intrinsic size, and SVG flags/emblems have little or none (it collapsed to ~80px,
       leaving the caption sitting on top of the picture). */
    width: min(360px, 100%);
    background: #fff;
    padding: 10px 10px 34px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    transform: rotate(var(--tilt, -2deg));
    position: relative;
    max-width: 360px;
    margin: 0 auto;
}
.polaroid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #ddd; }
.polaroid.on-paper img { object-fit: contain; background: #f6f6f6; padding: 8px; }
.polaroid .cap { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-family: var(--font-type); color: #444; font-size: .9rem; }
.polaroid::after {
    content: ''; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px;
    transform: translateX(-50%) rotate(3deg);
    background: rgba(255, 236, 160, .75); box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.stamp {
    display: inline-block;
    font-family: var(--font-head); font-size: 2.6rem; letter-spacing: .08em;
    color: var(--red); border: 5px solid var(--red); border-radius: 10px;
    padding: .1rem 1rem; transform: rotate(-12deg);
    mix-blend-mode: multiply; opacity: .9;
    -webkit-mask: radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.75) 61%) ;
    animation: stamp-in .45s cubic-bezier(.2, 1.6, .4, 1) both;
}
.stamp.green { color: #198754; border-color: #198754; }
.stamp.on-dark { mix-blend-mode: normal; background: rgba(0,0,0,.25); }
@keyframes stamp-in { 0% { transform: scale(3) rotate(-12deg); opacity: 0; } 100% { transform: scale(1) rotate(-12deg); opacity: .9; } }

/* ---- tiles (HQ menu, atlas) ----------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
    min-height: 130px; padding: 1rem .75rem;
    background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
    border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--text); text-decoration: none; text-align: center; cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-4px); border-color: rgba(247, 197, 72, .5); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.tile .ico { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.tile .lbl { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: .05em; }
.tile .sub { font-size: .8rem; color: var(--muted); }

/* ---- stats ---------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 14px; padding: .7rem .5rem; text-align: center; }
.stat b { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--gold); line-height: 1; }
.stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---- rank badge ----------------------------------------------------------------------- */
.badge {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .25rem .8rem .2rem; border-radius: 999px;
    background: linear-gradient(180deg, #ffe18a, var(--gold-deep));
    color: #2a1a00; font-family: var(--font-head); font-size: 1.1rem; letter-spacing: .06em;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2), 0 3px 8px rgba(0, 0, 0, .3);
}

/* ---- avatars ---------------------------------------------------------------------------- */
.avatar {
    width: 64px; height: 64px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: 2.1rem;
    background: radial-gradient(circle at 35% 30%, #2c4590, var(--ink-2));
    border: 3px solid var(--gold); box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
}
.avatar.lg { width: 92px; height: 92px; font-size: 3rem; }

/* ---- hero banner for a country --------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden;
    border-radius: var(--radius);
    min-height: 210px;
    background: var(--ink-3) center / cover no-repeat;
    box-shadow: var(--shadow);
    display: flex; align-items: flex-end;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11, 21, 48, .05) 0%, rgba(11, 21, 48, .35) 45%, rgba(11, 21, 48, .95) 100%);
}
.hero > * { position: relative; }
.hero .hero-bg { position: absolute; inset: 0; background: center 35% / cover no-repeat; z-index: 0; }
.hero::before { z-index: 1; }
.hero .hero-body { padding: 1rem 1.1rem; width: 100%; display: flex; gap: 1rem; align-items: flex-end; z-index: 2; }
.hero .kenburns { animation: kenburns 24s ease-in-out infinite alternate; }
.hero.tall .hero-bg { filter: blur(18px) brightness(.7) saturate(1.2); transform: scale(1.15); }
.hero.tall .hero-fg { position: absolute; z-index: 1; right: 4%; top: 6%; height: 88%; width: auto; max-width: 48%;
    object-fit: contain; border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: pop-in .6s ease both; }
.hero.tall::before { background: linear-gradient(90deg, rgba(11, 21, 48, .85) 0%, rgba(11, 21, 48, .35) 55%, rgba(11, 21, 48, .1) 100%); }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12) translate(-2%, -2%); } }

.flag {
    display: block; height: 54px; width: auto; aspect-ratio: 3 / 2; object-fit: cover;
    border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
    background: #fff;
}
.flag.sm { height: 28px; border-radius: 3px; }
.flag.lg { height: 96px; }
.flag.wave { animation: wave 3s ease-in-out infinite; transform-origin: left center; }
@keyframes wave {
    0%, 100% { transform: perspective(300px) rotateY(0deg) skewY(0deg); }
    25% { transform: perspective(300px) rotateY(-12deg) skewY(1.5deg); }
    75% { transform: perspective(300px) rotateY(8deg) skewY(-1.5deg); }
}

/* ---- case top bar ------------------------------------------------------------------------ */
.casebar {
    position: sticky; top: 0; z-index: 20;
    margin: calc(-12px - var(--safe-top)) -16px 14px;
    padding: calc(10px + var(--safe-top)) 16px 10px;
    background: rgba(11, 21, 48, .86);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.casebar .where { font-family: var(--font-head); font-size: 1.5rem; letter-spacing: .05em; line-height: 1; }
.casebar .clock { font-family: var(--font-type); font-size: 1rem; color: var(--gold); white-space: nowrap; }
.casebar .deadline { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.timebar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 8px; }
.timebar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), var(--gold), var(--red)); background-size: 300% 100%; transition: width .6s ease; }

/* ---- locations ---------------------------------------------------------------------------- */
.places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.place {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: .3rem;
    padding: 1rem .5rem .9rem;
    background: linear-gradient(170deg, var(--paper), var(--paper-2));
    color: var(--paper-ink);
    border-radius: 14px; border: none; cursor: pointer;
    box-shadow: 0 3px 0 #b9a273, var(--shadow);
    transition: transform .15s;
}
.place:hover { transform: translateY(-4px) rotate(-1deg); }
.place .ico { font-size: 2.6rem; line-height: 1; }
.place .nm { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: .04em; }
.place .cost { font-size: .75rem; color: #7a6545; }
.place.done { filter: saturate(.55); }
.place.done::after {
    content: '✔'; position: absolute; top: 6px; right: 8px;
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: var(--teal); color: #fff; font-size: .9rem;
}

/* ---- witness speech ----------------------------------------------------------------------- */
.witness { display: flex; gap: .9rem; align-items: flex-start; }
.witness .who { flex: none; text-align: center; width: 76px; }
.witness .who .face {
    width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; font-size: 2.6rem;
    background: radial-gradient(circle at 35% 30%, #fff8e6, #e6d5ae); box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}
.witness .who small { display: block; margin-top: .3rem; font-size: .72rem; color: var(--muted); }
.bubble {
    position: relative; flex: 1;
    background: #fffdf6; color: #23180e;
    border-radius: 16px; padding: .9rem 1rem;
    font-family: var(--font-type); font-size: 1.05rem; line-height: 1.5;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.bubble::before {
    content: ''; position: absolute; left: -10px; top: 22px;
    border: 10px solid transparent; border-right-color: #fffdf6; border-left: 0;
}
.bubble .trait { display: block; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed #cbb98f; color: var(--red-deep); }
.caret::after { content: '▍'; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- clue media -------------------------------------------------------------------------- */
.clue-media { margin: 1.2rem 0 .4rem; display: flex; justify-content: center; }
.anthem-btn {
    display: flex; align-items: center; gap: .9rem;
    padding: .8rem 1.2rem .8rem .8rem; border-radius: 999px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #3a0ca3, #7209b7); color: #fff;
    font-family: var(--font-head); font-size: 1.3rem; letter-spacing: .05em;
    box-shadow: 0 8px 20px rgba(114, 9, 183, .45);
}
.anthem-btn .disc {
    width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem;
    background: radial-gradient(circle, #111 18%, #333 19%, #111 40%, #2a2a2a 41%, #111 70%);
    border: 2px solid rgba(255, 255, 255, .25);
}
.anthem-btn.playing .disc { animation: spin 2s linear infinite; }
.eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.eq i { width: 4px; background: var(--gold); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; } .eq i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- notebook ------------------------------------------------------------------------------ */
.notebook { max-height: 70vh; overflow: auto; }
.note { display: flex; gap: .6rem; padding: .6rem 0; border-bottom: 1px dashed #cbb98f; font-family: var(--font-type); font-size: .95rem; }
.note:last-child { border-bottom: 0; }
.note img { width: 54px; height: 40px; object-fit: cover; border-radius: 4px; flex: none; }
.note .t { color: var(--red-deep); }

/* ---- destinations ------------------------------------------------------------------------ */
.dests { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dest {
    display: flex; align-items: center; gap: .8rem; text-align: left;
    padding: .8rem; border-radius: 16px; cursor: pointer;
    background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
    border: 1px solid var(--line); color: var(--text);
    box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.dest:hover { transform: translateY(-3px); border-color: var(--sky); }
.dest .nm { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: .04em; line-height: 1; }
.dest .sub { font-size: .8rem; color: var(--muted); }
.dest .hrs { margin-left: auto; font-family: var(--font-type); color: var(--gold); font-size: .9rem; white-space: nowrap; }
.dest .pin { font-size: 2rem; }

.map-wrap { border-radius: var(--radius); overflow: hidden; padding: 8px; background: radial-gradient(circle at 50% 40%, #0d2150, #060f28); border: 1px solid var(--line); box-shadow: var(--shadow); }
/* Syncfusion centres a marker template on its point; lift it by half so the dot sits on the capital. */
.map-pin { transform: translateY(calc(-50% + 7px)); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.map-pin img { width: 30px; height: 20px; object-fit: cover; border: 2px solid #fff; border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.map-pin .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-top: 2px; box-shadow: 0 0 0 4px rgba(247, 197, 72, .35); }
.map-pin.here .dot { background: var(--red); box-shadow: 0 0 0 0 rgba(226, 61, 79, .7); animation: pulse 1.6s infinite; }
.map-pin .lbl { font-family: var(--font-head); font-size: .95rem; color: #fff; text-shadow: 0 1px 3px #000; white-space: nowrap; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(226, 61, 79, .7); } 70% { box-shadow: 0 0 0 14px rgba(226, 61, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(226, 61, 79, 0); } }

/* ---- flight interstitial ------------------------------------------------------------------- */
.flight2 {
    position: fixed; inset: 0; z-index: 100; overflow: hidden; cursor: pointer;
    background: linear-gradient(180deg, #0f2a66 0%, #1f4fa3 38%, #5b8fd6 70%, #f4b26b 100%);
    display: grid; place-items: center;
    padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
    animation: flight-in .45s ease both;
}
@keyframes flight-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.flight2 .sky-glow { position: absolute; right: -10%; bottom: -25%; width: 70vmax; height: 70vmax; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 214, 140, .55), rgba(255, 214, 140, 0) 60%); pointer-events: none; }

/* soft CSS clouds in two parallax layers */
.clouds { position: absolute; inset: 0; pointer-events: none; }
.clouds i {
    position: absolute; display: block; width: 260px; height: 64px; border-radius: 64px;
    background: #fff; opacity: .75; filter: blur(1.5px);
    animation: drift linear infinite;
}
.clouds i::before, .clouds i::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.clouds i::before { width: 110px; height: 110px; left: 40px; top: -58px; }
.clouds i::after { width: 80px; height: 80px; left: 130px; top: -38px; }
.clouds.far i { transform: scale(.55); opacity: .45; animation-duration: 26s; }
.clouds.near { z-index: 1; }
.clouds.near i { transform: scale(1.25); opacity: .8; animation-duration: 9s; filter: blur(3px); }
.clouds i:nth-child(2) { animation-delay: -6s; } .clouds i:nth-child(3) { animation-delay: -13s; } .clouds i:nth-child(4) { animation-delay: -19s; }
@keyframes drift { from { translate: 60vw 0; } to { translate: -90vw 0; } }

.flight-stage { position: relative; z-index: 2; width: min(760px, 100%); display: flex; flex-direction: column; gap: 14px; }
.flight-status { display: flex; align-items: center; gap: .5rem; color: #fff; letter-spacing: .18em; font-size: .9rem; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.flight-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: blink 1s steps(1) infinite; }
.flight-status .dot.landed { background: var(--green); animation: none; }

.flight-map-card {
    position: relative; aspect-ratio: 2 / 1; border-radius: 22px; overflow: hidden;
    border: 3px solid rgba(255, 255, 255, .85);
    box-shadow: 0 24px 60px rgba(7, 18, 48, .55), inset 0 0 0 1px rgba(0,0,0,.2);
    background: #0a1f4d;
    animation: map-zoom 4s ease-out both;
}
@keyframes map-zoom { from { transform: perspective(900px) rotateX(18deg) scale(.92); } to { transform: perspective(900px) rotateX(0) scale(1); } }
.flight-map { display: block; width: 100%; height: 100%; }
.flight-map .graticule { stroke: rgba(255, 255, 255, .07); fill: none; }
.flight-map .land { fill: #2f5cb8; stroke: #12306e; stroke-linejoin: round; }
.flight-map .land.from { fill: var(--red); }
.flight-map .land.to { fill: var(--teal); animation: to-glow 1.2s ease-in-out infinite alternate; }
@keyframes to-glow { from { fill: #2ec4b6; } to { fill: #7ef0e5; } }
.flight-map .route-ghost { fill: none; stroke: rgba(255, 255, 255, .35); stroke-linecap: round; }
.flight-map .route { fill: none; stroke: var(--gold); stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(247, 197, 72, .8)); }
.flight-map .pin-from { fill: var(--red); stroke: #fff; stroke-width: .4; }
.flight-map .pin-pulse { fill: none; stroke: var(--red); transform-box: fill-box; transform-origin: center; animation: pin-pulse 1.4s ease-out infinite; }
@keyframes pin-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.flight-map .pin-to { fill: #fff; stroke: var(--teal); stroke-width: .5; transform-box: fill-box; transform-origin: center; transform: scale(.6); transition: transform .4s cubic-bezier(.2, 1.8, .4, 1), fill .3s; }
.flight-map .pin-to.on { fill: var(--gold); transform: scale(1.5); }
.flight-map .plane path { fill: #ffffff; stroke: #1b2a4a; stroke-width: .5; }
.flight-map .plane .windows { fill: #1b2a4a; stroke: none; }
.flight-map .plane-shadow path { fill: rgba(0, 0, 0, .55); }
.landed-stamp { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.landed-stamp .stamp { font-size: clamp(2.4rem, 9vw, 4rem); color: var(--gold); border-color: var(--gold); background: rgba(10, 31, 77, .55); }

.boarding-pass {
    display: grid; grid-template-columns: 1fr 1.3fr 1fr; align-items: center; gap: .6rem;
    background: linear-gradient(180deg, #fffdf6, #f1e6c9); color: #2b2118;
    border-radius: 18px; padding: 14px 16px; position: relative;
    box-shadow: 0 16px 40px rgba(7, 18, 48, .45);
    -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                  radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
            mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                  radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
    animation: slide-up .5s .15s ease both;
}
.bp-end { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.bp-end.right { align-items: flex-end; text-align: right; }
.bp-end .flag { height: 30px; }
.bp-code { font-family: var(--font-head); font-size: 2.2rem; line-height: .95; letter-spacing: .06em; color: #13224a; }
.bp-city { font-size: .8rem; color: #7a6545; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bp-time { font-size: .95rem; }
.bp-mid { text-align: center; }
.bp-hours, .bp-km { font-size: .85rem; color: #7a6545; }
.bp-line { position: relative; height: 2px; margin: 12px 4px; background: repeating-linear-gradient(90deg, #c9b688 0 6px, transparent 6px 11px); }
.bp-line span { position: absolute; left: 0; top: 0; height: 2px; background: var(--red); }
.bp-line b { position: absolute; top: 50%; transform: translate(-50%, -55%); font-size: 1.15rem; color: var(--red); font-weight: 400; }
.flight-skip { text-align: center; font-size: .8rem; color: rgba(255,255,255,.75); }

@media (max-width: 560px) {
    .bp-code { font-size: 1.7rem; }
    .boarding-pass { padding: 12px; gap: .3rem; }
    .flight-map-card { border-radius: 16px; }
}

/* ---- warrant -------------------------------------------------------------------------------- */
.trait-row { margin-bottom: .9rem; }
.trait-row .lbl { font-family: var(--font-head); font-size: 1.15rem; letter-spacing: .05em; color: #5a4325; margin-bottom: .35rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    border: 2px solid #c9b688; background: #fffaf0; color: #3a2a17;
    border-radius: 999px; padding: .35rem .8rem; cursor: pointer; font-weight: 700; font-size: .9rem;
    transition: background .12s, transform .08s;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--red); border-color: var(--red-deep); color: #fff; }
.chip.known { box-shadow: 0 0 0 3px rgba(46, 196, 182, .45); }
.suspects { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.suspect-card { text-align: center; cursor: pointer; background: none; border: none; color: inherit; padding: 0; transition: opacity .3s, transform .3s; }
.suspect-card .frame { border-radius: 12px; overflow: hidden; background: #1b2a55; border: 3px solid rgba(255, 255, 255, .12); box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.suspect-card .nm { font-family: var(--font-head); font-size: 1rem; letter-spacing: .04em; margin-top: .3rem; line-height: 1.05; }
.suspect-card.out { opacity: .18; transform: scale(.92); filter: grayscale(1); }
.suspect-card.caught .frame { border-color: var(--green); }

.match-bar { display: none; }
@media (max-width: 899px) {
    .match-bar {
        display: flex; align-items: center; gap: .7rem;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        padding: .7rem 16px calc(.7rem + var(--safe-bottom));
        background: rgba(11, 21, 48, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid var(--line); font-weight: 700;
    }
    .side#matches { padding-bottom: 80px; }
    .side#matches .suspects { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .side#matches .suspect-card .nm { font-size: .8rem; }
}

/* ---- outcome ------------------------------------------------------------------------------- */
.outcome { text-align: center; padding-top: 1rem; }
.outcome .portrait { width: min(280px, 70vw); margin: 0 auto; position: relative; }
.outcome .portrait .stamp { background: rgba(255, 250, 235, .92); box-shadow: 0 6px 20px rgba(0,0,0,.4); position: absolute; left: 50%; top: 45%; transform-origin: center; translate: -50% -50%; font-size: 3.2rem; white-space: nowrap; }
.outcome .bars { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 26px, rgba(30,30,30,.85) 26px 34px); border-radius: 12px; animation: bars-down .7s .3s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes bars-down { from { transform: translateY(-110%); } to { transform: translateY(0); } }
.siren { position: fixed; inset: 0; pointer-events: none; z-index: 50; animation: siren 1s linear 4; }
@keyframes siren { 0%, 100% { box-shadow: inset 0 0 120px 30px rgba(226, 61, 79, .55); } 50% { box-shadow: inset 0 0 120px 30px rgba(76, 201, 240, .55); } }

.certificate {
    position: relative; max-width: 560px; margin: 1.5rem auto 0; padding: 1.6rem;
    background: linear-gradient(180deg, #fffaf0, #f3e3bd); color: #3a2a17;
    border: 8px double var(--gold-deep); border-radius: 10px; text-align: center;
    box-shadow: var(--shadow); animation: pop-in .6s cubic-bezier(.2, 1.4, .4, 1) both;
}
.certificate .seal { font-size: 3.4rem; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
/* Pieces fade out as they fall: on phones whose browser bar hides while scrolling, "the bottom of
   the screen" moves, and pieces that stopped at a fixed distance were left lying in a strip. */
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; opacity: 0; animation: confetti linear both; }
@keyframes confetti {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    75% { opacity: 1; }
    100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}

/* ---- title screen ------------------------------------------------------------------------ */
.title-hero { text-align: center; padding: 2rem 0 1rem; }
.logo { position: relative; display: inline-block; }
.logo .globe { font-size: clamp(5rem, 22vw, 9rem); line-height: 1; display: inline-block; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(0,0,0,.45)); }
.logo .glass { position: absolute; right: -18%; bottom: -4%; font-size: clamp(3rem, 12vw, 5rem); animation: search 5s ease-in-out infinite; }
.logo-text { font-family: var(--font-head); font-size: clamp(3.2rem, 13vw, 6.5rem); letter-spacing: .06em; line-height: .9; margin-top: .6rem;
    background: linear-gradient(180deg, #fff 20%, var(--gold) 60%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.logo-text span { display: block; }
.logo-text span:first-child { font-size: .62em; letter-spacing: .32em; margin-inline-start: .32em; }
.logo-sub { font-family: var(--font-type); color: var(--red); letter-spacing: .3em; text-transform: uppercase; font-size: clamp(.85rem, 3vw, 1.1rem); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes search { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-30%, -30%) rotate(-10deg); } 50% { transform: translate(-60%, 0) rotate(5deg); } 75% { transform: translate(-20%, 20%) rotate(-5deg); } }

.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.player-card { display: flex; align-items: center; gap: .9rem; padding: .9rem; cursor: pointer; text-align: left; color: var(--text); }
.player-card:hover { border-color: rgba(247, 197, 72, .55); }
.player-card .nm { font-family: var(--font-head); font-size: 1.55rem; letter-spacing: .04em; line-height: 1; }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 8px; max-height: 236px; overflow-y: auto; padding: 4px; }
.emoji-pick button { width: 52px; height: 52px; border-radius: 50%; font-size: 1.8rem; border: 2px solid var(--line); background: var(--ink-2); cursor: pointer; }
.emoji-pick button.on { border-color: var(--gold); background: var(--ink-3); transform: scale(1.08); }

.text-input { width: 100%; min-height: 52px; padding: .6rem 1rem; font-size: 1.15rem; border-radius: 14px; border: 2px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); font-family: var(--font-body); }
.text-input:focus { outline: none; border-color: var(--gold); }

/* ---- language picker -------------------------------------------------------------------- */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-width: 760px; margin: 1rem auto 2rem; }
.lang-option {
    display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .9rem .6rem;
    border-radius: 16px; border: 2px solid var(--line); background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
    color: var(--text); cursor: pointer; transition: transform .12s, border-color .12s;
}
.lang-option:hover { transform: translateY(-2px); border-color: var(--sky); }
.lang-option.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.lang-option .native { font-size: 1.35rem; font-weight: 800; }
.lang-option .english { font-size: .8rem; color: var(--muted); }

/* ---- atlas / country file ------------------------------------------------------------- */
.filter-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.filter-pills button { flex: none; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2); color: var(--text); padding: .45rem 1rem; font-weight: 700; cursor: pointer; }
.filter-pills button.on { background: var(--gold); color: #2a1a00; border-color: var(--gold); }
.atlas { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.atlas-item { position: relative; text-decoration: none; color: var(--text); background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; padding: .7rem; text-align: center; transition: transform .15s; }
.atlas-item:hover { transform: translateY(-3px); }
.atlas-item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; box-shadow: 0 3px 8px rgba(0,0,0,.4); background: #fff; }
.atlas-item .nm { font-family: var(--font-head); font-size: 1.2rem; letter-spacing: .04em; margin-top: .4rem; line-height: 1; }
.atlas-item.locked img { filter: grayscale(1) brightness(.6); }
.atlas-item .visa { position: absolute; top: 8px; right: 6px; font-family: var(--font-head); font-size: .8rem; color: var(--red); border: 2px solid var(--red); border-radius: 6px; padding: 0 .35rem; transform: rotate(12deg); background: rgba(255,255,255,.85); }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.fact { background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fact img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #223; }
.fact img.contain { object-fit: contain; background: #f2f2f2; padding: 10px; }
.photo-fit { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #0d1a3d; }
.photo-fit-bg { position: absolute; inset: -10%; background: center / cover no-repeat; filter: blur(16px) brightness(.65) saturate(1.2); }
.photo-fit img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; aspect-ratio: auto !important; background: transparent !important; padding: 0 !important; }
.fact .noimg { aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 4.5rem; background: radial-gradient(circle at 50% 40%, var(--ink-3), #0d1a3d); }
.fact .b { padding: .7rem .8rem .8rem; }
.fact .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.fact .v { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: .03em; line-height: 1.05; margin: .15rem 0 .25rem; }
.fact .n { font-size: .85rem; color: var(--muted); }

/* ---- leaderboard ------------------------------------------------------------------------- */
.you-card { display: flex; gap: 1rem; align-items: center; border-color: rgba(247, 197, 72, .45); }
.lb-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 12px; }
.lb-row + .lb-row { border-top: 1px solid var(--line); }
.lb-row.podium { background: linear-gradient(90deg, rgba(247, 197, 72, .12), transparent); }
.lb-row.you { background: linear-gradient(90deg, rgba(46, 196, 182, .25), rgba(46, 196, 182, .05)); box-shadow: inset 3px 0 0 var(--teal); }
.lb-pos { width: 44px; text-align: center; font-family: var(--font-head); font-size: 1.3rem; color: var(--muted); }
.lb-row.podium .lb-pos { font-size: 1.7rem; }
.lb-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: var(--ink-3); flex: none; }
.lb-name { flex: 1; min-width: 0; }
.lb-name .nm { font-family: var(--font-head); font-size: 1.25rem; letter-spacing: .03em; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-pts { font-family: var(--font-head); font-size: 1.5rem; color: var(--gold); text-align: right; line-height: 1; }
.lb-pts small { display: block; font-size: .7rem; color: var(--muted); letter-spacing: .1em; }

/* ---- generic animation helpers ------------------------------------------------------------ */
.fade-in { animation: fade-in .4s ease both; }
.pop-in { animation: pop-in .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.slide-up { animation: slide-up .45s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; } .d4 { animation-delay: .32s; }

/* ---- layout columns --------------------------------------------------------------------- */
.cols { display: grid; gap: 16px; }
@media (min-width: 900px) {
    .cols { grid-template-columns: 1.5fr 1fr; align-items: start; }
    .cols .side { position: sticky; top: 110px; }
}

/* ---- Syncfusion dialog restyle ---------------------------------------------------------- */
.e-dialog.gc-dialog { border-radius: 20px !important; overflow: hidden; background: var(--ink-2) !important; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6) !important; }
.e-dialog.gc-dialog .e-dlg-header-content { background: transparent !important; border-bottom: 1px solid var(--line); padding: 14px 18px !important; }
.e-dialog.gc-dialog .e-dlg-header { font-family: var(--font-head); font-size: 1.6rem !important; letter-spacing: .05em; color: var(--text) !important; }
.e-dialog.gc-dialog .e-dlg-content { background: transparent !important; color: var(--text) !important; padding: 16px 18px !important; }
.e-dialog.gc-dialog .e-footer-content { background: transparent !important; border-top: 1px solid var(--line); }
.e-dlg-overlay { background-color: rgba(3, 8, 22, .75) !important; backdrop-filter: blur(3px); }
.e-toast-container .e-toast { border-radius: 14px !important; font-family: var(--font-body); }
.e-progressbar .e-progressbar-track { opacity: .25; }

/* ---- small screens ---------------------------------------------------------------------- */
@media (max-width: 560px) {
    .places { gap: 8px; }
    .place { padding: .8rem .3rem .7rem; }
    .place .ico { font-size: 2.1rem; }
    .place .nm { font-size: 1.05rem; }
    .dests { grid-template-columns: 1fr; }
    .stats { gap: 8px; }
    .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .tile { min-height: 112px; }
    .bubble { font-size: .98rem; }
    .witness .who { width: 60px; }
    .witness .who .face { width: 56px; height: 56px; font-size: 2rem; }
    .hero { min-height: 180px; }
    .flag.lg { height: 62px; }
    .casebar .where { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---- boot splash + Blazor error UI -------------------------------------------------------- */
.boot { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; text-align: center; gap: .4rem; }
.boot-globe { font-size: 5rem; animation: bob 3s ease-in-out infinite; }
.boot-title { font-family: var(--font-head); font-size: 3rem; letter-spacing: .08em; color: var(--gold); line-height: .95; text-align: center; }
.boot-title span { display: block; }
.boot-sub { font-family: var(--font-type); color: var(--muted); letter-spacing: .25em; text-transform: uppercase; font-size: .9rem; }
.boot-bar { width: 200px; height: 6px; margin: 1rem auto 0; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: var(--blazor-load-percentage, 10%); background: var(--gold); transition: width .2s; }

#blazor-error-ui {
    background: #fff3cd; color: #333; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none; left: 0; padding: .8rem 1.25rem calc(.8rem + var(--safe-bottom)); position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---- video walkthrough ------------------------------------------------------------------- */
.walk-frame { display: flex; justify-content: center; }
.walk-frame video {
    display: block; width: auto; max-width: 100%; max-height: calc(100vh - 210px); max-height: calc(100dvh - 210px);
    aspect-ratio: 390 / 844; border-radius: 22px; background: #000;
    border: 6px solid #1b2442; box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.walk-offline { display: none; max-width: 420px; }
.walk-frame.failed video { display: none; }
.walk-frame.failed .walk-offline { display: block; }
.walk-cta { display: flex; align-items: center; gap: .9rem; text-align: start; max-width: 560px; margin: 1.4rem auto 0; text-decoration: none; color: inherit; }
.walk-cta .ico { font-size: 2.2rem; }
.walk-cta b { display: block; font-size: 1.1rem; color: var(--gold); }

.name-error { margin-top: .5rem; color: #ff8a8a; font-size: .9rem; }
.avatar.pick { cursor: pointer; position: relative; }
.avatar.pick::after { content: "✎"; position: absolute; right: -4px; bottom: -4px; font-size: .75rem; background: var(--gold); color: #2a1a00; border-radius: 50%; width: 18px; height: 18px; display: grid; place-items: center; }
.board-filters { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0 0 1rem; }
.board-filters .seg { display: flex; flex-wrap: wrap; gap: .35rem; }
.board-filters .seg button { padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2); color: var(--text); cursor: pointer; font: inherit; font-size: .9rem; }
.board-filters .seg button.on { background: var(--gold); color: #2a1a00; border-color: var(--gold); font-weight: 700; }
.board-filters select { padding: .4rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2); color: var(--text); font: inherit; font-size: .9rem; }
/* HQ tiles that open Google Play Games screens are buttons, styled like the link tiles. */
button.tile { font: inherit; color: inherit; text-align: inherit; cursor: pointer; width: 100%; }

/* ---- "the thief is close" scenes (Components/ThiefNearby.razor) ---------------------------- */
.thief-scene { position: fixed; inset: 0; z-index: 900; overflow: hidden; cursor: pointer;
    background: radial-gradient(circle at 50% 60%, rgba(247,197,72,.16), rgba(5,9,24,.78) 70%); animation: thief-fade 2.3s ease both; }
.thief-scene.hide { animation-duration: 2.6s; }
@keyframes thief-fade { 0% { opacity: 0 } 8% { opacity: 1 } 88% { opacity: 1 } 100% { opacity: 0 } }
.thief-caption { position: absolute; top: 14%; left: 50%; translate: -50% 0; width: min(92%, 520px); text-align: center;
    font-family: var(--font-head); font-size: clamp(1.4rem, 6vw, 2.2rem); letter-spacing: .04em; color: var(--gold);
    text-shadow: 0 3px 0 rgba(0,0,0,.5); animation: thief-caption .5s .15s cubic-bezier(.3,1.5,.5,1) both; }
html[data-script="complex"] .thief-caption { letter-spacing: normal; font-family: var(--font-body); font-weight: 800; }
@keyframes thief-caption { from { transform: scale(.6); opacity: 0 } to { transform: none; opacity: 1 } }

.thief-figure { position: absolute; width: clamp(140px, 36vw, 200px); bottom: 12%; }
.thief-figure svg { display: block; width: 100%; overflow: visible; filter: drop-shadow(0 0 6px rgba(247,197,72,.85)) drop-shadow(0 10px 12px rgba(0,0,0,.6)); }
.thief-figure svg :is(ellipse, path, rect, circle) { fill: #070b18; }
.thief-figure svg .band { fill: #b3202f; }
.thief-figure svg .eye { fill: #f7c548; animation: thief-blink 1.2s steps(1) infinite; }
@keyframes thief-blink { 0%, 90% { opacity: 1 } 92%, 100% { opacity: 0 } }
.thief-figure .leg { transform-box: fill-box; transform-origin: 50% 0; }

/* escape: runs right to left, leaning forward, legs scissoring, kicking up dust */
.escape .thief-figure { right: -40%; animation: thief-run 1.6s .35s cubic-bezier(.45,.05,.55,.95) both; }
.escape .thief-figure svg { transform: scaleX(-1) rotate(8deg); }
@keyframes thief-run { from { right: -40% } to { right: 130% } }
.escape .leg.front, .attack .leg.front { animation: thief-stride .28s ease-in-out infinite alternate; }
.escape .leg.rear, .attack .leg.rear { animation: thief-stride .28s ease-in-out infinite alternate-reverse; }
@keyframes thief-stride { from { transform: rotate(-32deg) } to { transform: rotate(32deg) } }
.escape .body, .attack .body { animation: thief-bob .14s ease-in-out infinite alternate; }
@keyframes thief-bob { from { transform: translateY(0) } to { transform: translateY(-4px) } }
.dust i { position: absolute; bottom: 11%; left: var(--x); width: 34px; height: 34px; border-radius: 50%; background: rgba(210,190,150,.55);
    opacity: 0; animation: dust .9s var(--d) ease-out both; }
@keyframes dust { 0% { opacity: .8; transform: scale(.3) } 100% { opacity: 0; transform: scale(2.2) translateY(-14px) } }

/* hide: peeks out from the right edge, looks, ducks back */
.hide .thief-figure { right: -32%; bottom: 18%; animation: thief-peek 2.4s .2s ease-in-out both; }
.hide .thief-figure svg { transform: scaleX(-1) rotate(10deg); }
@keyframes thief-peek { 0% { right: -32% } 25%, 62% { right: -8% } 70% { right: -6% } 100% { right: -34% } }

/* attack: a smoke bomb arcs in and bursts, the screen shakes, the figure bolts through the smoke */
.attack { animation: thief-fade 2.3s ease both, thief-shake .45s .55s linear; }
@keyframes thief-shake { 0%, 100% { transform: none } 20% { transform: translate(-7px, 4px) } 40% { transform: translate(6px, -5px) } 60% { transform: translate(-5px, -3px) } 80% { transform: translate(4px, 5px) } }
.smoke-bomb { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: #1b1f2b; box-shadow: inset -4px -4px 0 #000, 0 0 0 3px #f7c548;
    left: 85%; top: 20%; animation: bomb-arc .55s ease-in both, bomb-gone .05s .55s forwards; }
@keyframes bomb-gone { to { opacity: 0 } }
@keyframes bomb-arc { 0% { left: 85%; top: 20%; transform: scale(.6) } 60% { top: 35% } 100% { left: 50%; top: 55%; transform: scale(1); opacity: 1 } }
.smoke i { position: absolute; left: 50%; top: 56%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
    background: radial-gradient(circle, rgba(200,205,220,.95), rgba(140,150,175,.6) 60%, transparent 72%); opacity: 0;
    animation: smoke-puff 1.6s calc(.55s + var(--d)) ease-out both; }
@keyframes smoke-puff { 0% { opacity: 0; transform: translate(0, 0) scale(.2) } 15% { opacity: 1 } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(2.4) } }
.attack .thief-figure { left: 40%; opacity: 0; animation: thief-bolt 1.1s 1s ease-in both; }
@keyframes thief-bolt { 0% { left: 40%; opacity: 0 } 15% { opacity: 1 } 100% { left: -45%; opacity: 1 } }
.attack .thief-figure svg { transform: scaleX(-1) rotate(10deg); }

@media (prefers-reduced-motion: reduce) {
    .thief-scene *, .thief-scene { animation-duration: .01s !important; animation-delay: 0s !important; }
}
