/* The game layer: HUD headers, chunky bars, wanted stars and rank badges. Loads after glass so it applies in both modes. */

/* ---------- wanted stars ---------- */
.heat { display: inline-flex; align-items: center; gap: 1px; margin-left: 10px; }
.heat i { display: block; width: 22px; height: 22px; }
.heat svg { display: block; width: 100%; height: 100%; overflow: visible; }
.heat path { fill: rgba(255,255,255,.14); stroke: rgba(10,10,10,.75); stroke-width: 2.4; stroke-linejoin: round; paint-order: stroke; }
.heat i.is-on path { fill: #fff; stroke: #0a0a0a; }
.heat i.is-on svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.maparea { display: flex; align-items: center; padding: 5px 8px 5px 12px; font-weight: 800; font-size: 13px; }
.garea .heat { margin: 0; }
.garea .heat i { width: 24px; height: 24px; }
:root:not([data-theme="dark"]) .garea .heat path { fill: rgba(10,10,10,.1); stroke: none; }
:root:not([data-theme="dark"]) .garea .heat i.is-on path { fill: #0a0a0a; stroke: #0a0a0a; }
:root[data-theme="dark"] :is(.garea, .gboard:not(.is-you), .gmis) { background: rgba(255,255,255,.05); }

/* ---------- headers read like a HUD ---------- */
.card h3 { font-size: 13.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.card > h3 + p { margin-top: 6px; }

.brief h2 { font-weight: 800; letter-spacing: -.03em; }
.brief h3 { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.brief__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- XP bars and stat tiles ---------- */
.earn__bar { height: 22px; border-radius: 7px; box-shadow: inset 0 2px 5px rgba(0,0,0,.28); }
.earn__bar i { position: relative; border-radius: 7px; background: linear-gradient(#dcff5a, var(--accent) 55%, #a7cc10); box-shadow: 0 0 14px rgba(200,243,29,.4); }
.earn__bar i::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(0,0,0,.2) 14px 16px); }
.stat { border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.stat b { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; transform: skewX(-6deg); transform-origin: left bottom; }

/* ---------- your rank ---------- */
.grank__top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.grank__badge { flex: none; width: 116px; height: auto; filter: drop-shadow(0 8px 14px rgba(0,0,0,.28)); }
.grank small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.grank h2 { margin: 2px 0 4px; font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -.02em; text-transform: uppercase; transform: skewX(-6deg); transform-origin: left bottom; }
.grank p { margin: 0; font-size: 13.5px; }
.grank .earn__sub { font-size: 12.5px; }
.grank__ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 18px; }
.grank__ladder span { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 14px; }
.grank__ladder img { width: 100%; max-width: 54px; height: auto; }
.grank__ladder small { font-size: 9.5px; font-weight: 800; letter-spacing: .03em; color: var(--muted); }
.grank__ladder .is-on { background: var(--surface-2); }
.grank__ladder .is-on small { color: var(--text); }
.grank__ladder .is-locked img { filter: grayscale(1); opacity: .4; }

/* ---------- missions read like quests ---------- */
.gmis { margin-top: 8px; padding: 10px 12px 10px 10px; border-radius: 16px; background: var(--surface-2); }
.gmis:first-of-type { margin-top: 14px; }
.gmis b { font-weight: 700; }
.gmis__i { border-radius: 10px; font-weight: 800; }
.gmis em { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; color: var(--text); }
.gmis em .coinart { width: 20px; height: auto; }
.gmis.is-done em { opacity: .5; }

/* ---------- the daily case: one row, and it rattles until it's opened ---------- */
.gcase { gap: 16px; }
.gcase__txt { flex: 1; min-width: 0; }
.gcase p { margin: 4px 0 0; }
.gcase .btn { flex: none; width: auto; padding: 0 26px; }
.gcase .gcase__wait { flex: none; margin: 0; font-size: 13px; font-weight: 700; }
.gcase__art:not(.is-open) { animation: caseHop 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
.gcase__art:not(.is-open) .gcase__lid { animation: caseLid 2.8s ease-in-out infinite; }
.gcase__art:not(.is-open) .gcase__coin { animation: casePeek 2.8s ease-in-out infinite; }
.gcase__art.is-open .gcase__coin { animation: caseFloat 2.4s ease-in-out .6s infinite; }
@keyframes caseHop { 0%, 58%, 100% { transform: none; } 64% { transform: translateY(-4px) rotate(-2deg); } 72% { transform: translateY(-2px) rotate(2deg); } 80% { transform: none; } }
@keyframes caseLid { 0%, 58%, 100% { transform: none; } 66% { transform: rotate(-14deg); } 74% { transform: rotate(-4deg); } 80% { transform: rotate(-10deg); } 88% { transform: none; } }
@keyframes casePeek { 0%, 58%, 90%, 100% { opacity: 0; transform: none; } 66%, 82% { opacity: 1; transform: translateY(-10px); } }
@keyframes caseFloat { 0%, 100% { transform: translateY(-24px); } 50% { transform: translateY(-30px); } }
@media (max-width: 520px) { .gcase { gap: 12px; } .gcase__art { zoom: .72; } .gcase .btn { padding: 0 18px; } .gcase p { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .gcase__art, .gcase__lid, .gcase__coin { animation: none !important; } }

/* ---------- leaderboards and city ---------- */
.garea, .gboard { margin-top: 6px; padding: 8px 12px 8px 10px; min-height: 44px; border-radius: 14px; background: var(--surface-2); }
.garea { padding-left: 14px; }
.garea b, .gboard b { font-weight: 700; }
.gboard span { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--line); color: var(--text); font-size: 12px; font-weight: 800; }
.gboard em { font-weight: 800; }
.gboard img { flex: none; width: 34px; height: auto; margin: -6px -6px -6px 0; }
.gboard.is-you { background: var(--accent); color: var(--on-accent); }
.gboard.is-you span { background: rgba(0,0,0,.14); color: inherit; }

/* ---------- the map chip and the trip card ---------- */
.gchip { padding-left: 4px; }
.gchip img { width: 34px; height: auto; margin-right: -2px; }
.gchip b { font-weight: 800; }
.gcard__k { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.gcard__n { font-size: 92px; font-weight: 800; transform: skewX(-6deg); }
.gcard h2 { font-size: 22px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
