/* ScratchHunt. Builds on Empire UI (/assets/base.css); tokens are set in site.ts `theme`.
   Signature element: the carousel ticket (.ticket) — artwork, perforation, silver latex panel. */

.site-header { border-bottom-color: transparent; }
.brand { color: var(--accent); font-size: var(--step-2); font-weight: 900; }

/* ---- Home hero: one midnight band from the header down through the carousel ---- */
.hero { --notch: var(--header-bg); background: var(--header-bg); color: #fff; padding: var(--s6) 0 var(--s5); }
@media (max-width: 640px) { .hero { padding-top: var(--s4); } .hero-rail { margin-top: var(--s5); } }
.hero-copy h1 { font-size: var(--step-5); max-width: 13ch; font-weight: 900; line-height: .92; margin-bottom: var(--s4); }
.hero .lede { font-size: var(--step-1); line-height: 1.45; color: #C9CED8; max-width: 44ch; }
.hero-rail { margin-top: var(--s6); }
.rail-head { margin-bottom: var(--s3); }
.rail-head h2 { font-size: var(--step-2); margin: 0; }
.hero .rail-all { color: #fff; font-weight: 700; }
.hero .rail-btn { background: #fff; color: #1B1F3B; border-color: transparent; }
@media (min-width: 1152px) { .hero .rail-track { padding-inline: calc((100vw - var(--max)) / 2 + 16px); scroll-padding-inline: calc((100vw - var(--max)) / 2 + 16px); } }

.state-form { display: flex; gap: var(--s2); }
.state-form select { flex: 1 1 180px; max-width: 300px; min-width: 0; padding: 12px 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1rem; }
.hero .state-form select { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .28); }
.hero .state-form select option { color: #1B1F3B; }

/* ---- Ticket card ---- */
.ticket { display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border-radius: 16px; overflow: hidden; box-shadow: 0 22px 40px -22px rgb(0 0 0 / .8); }
.ticket-face { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; color: #fff; text-decoration: none; background: #2A3058; }
.ticket-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ticket-art-fallback { display: grid; place-items: center; background:
  repeating-linear-gradient(135deg, hsl(var(--h) 70% 50% / .0) 0 14px, hsl(var(--h) 90% 70% / .18) 14px 16px),
  linear-gradient(160deg, hsl(var(--h) 72% 46%), hsl(calc(var(--h) + 40) 70% 28%)); }
.ticket-art-fallback span { font-family: var(--font-display); font-weight: 900; font-size: 6rem; line-height: 1; color: rgb(255 255 255 / .92); transform: rotate(-8deg) translateY(-30%); text-shadow: 0 4px 0 rgb(0 0 0 / .18); }
.ticket-price { position: absolute; top: 12px; left: 12px; padding: 2px 10px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; line-height: 1.2; box-shadow: 0 2px 6px rgb(0 0 0 / .3); }
.ticket-hunt { position: absolute; top: 14px; right: 12px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--accent-2); color: #fff; font-size: .78rem; font-weight: 700; }
.ticket-overlay { position: absolute; inset: auto 0 0 0; padding: 72px 16px 14px; background: linear-gradient(to top, rgb(14 17 36 / .96) 0 52%, rgb(14 17 36 / 0)); }
.ticket-name { font-weight: 700; font-size: .95rem; line-height: 1.25; color: #E6E8F2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-prize { font-family: var(--font-display); font-weight: 900; font-size: 3.4rem; line-height: .95; color: var(--accent); margin: 4px 0 2px; }
.ticket-left { font-size: .92rem; color: #E6E8F2; }
.ticket-left strong { color: #fff; font-size: 1.05rem; }
.ticket-odds { font-size: .8rem; color: #B5BAD0; margin-top: 2px; }
.ticket-stub { position: relative; padding: 14px; border-top: 2px dashed var(--line); }
.ticket-stub::before, .ticket-stub::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--notch, var(--bg)); }
.ticket-stub::before { left: -10px; } .ticket-stub::after { right: -10px; }

/* The latex panel. Covered: silver foil with one shimmer when the page loads. Scratched: the number underneath. */
.latex { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--s2); min-height: 56px; padding: 8px 14px; border-radius: 10px; text-decoration: none; color: #333A5C;
  background: linear-gradient(115deg, #B4BAC8 0%, #E9EBF0 20%, #AAB0BF 38%, #DCDFE6 56%, #B0B6C4 78%, #D3D7DF 100%); background-size: 260% 100%; background-position: 0 0;
  animation: foil 2.2s var(--ease) .5s 1 both; }
.latex-label { font-size: .78rem; font-weight: 700; white-space: nowrap; }
.latex-cover { flex-basis: 100%; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; line-height: 1.1; }
.latex.scratched { animation: none; color: var(--ink); background:
  radial-gradient(circle at 8% 20%, #C9CED8 0 5px, transparent 6px), radial-gradient(circle at 94% 85%, #C9CED8 0 7px, transparent 8px), var(--surface-2); }
.latex-value { font-family: var(--font-display); font-weight: 900; font-size: 1.7rem; line-height: 1; }
.latex-sub { font-size: .8rem; color: var(--muted); }
@keyframes foil { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---- Home: proof numbers, tiers, closing band ---- */
.proof { padding-bottom: 0; }
.how h2 { font-size: var(--step-3); }
.tiers { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tier { border-top: 3px solid var(--line); padding-top: var(--s3); }
.tier h3 { font-size: var(--step-2); margin-bottom: var(--s2); }
.tier p { color: var(--muted); }
.tier-hunt { border-top-color: var(--accent); }
.cta-band { background: var(--header-bg); color: #fff; padding: var(--s7) 0; margin-top: var(--s5); }
.cta-band h2 { font-size: var(--step-4); font-weight: 900; }
.cta-band p { color: #C9CED8; }
.cta-band a:not(.btn) { color: #fff; }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pill.good { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill.bad { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.pill.even { background: color-mix(in srgb, var(--muted) 15%, transparent); color: var(--muted); }
.pill.hunt { background: #f5b301; color: #1a1300; letter-spacing: .05em; }

.locked { color: var(--muted); text-decoration: none; font-size: .85rem; white-space: nowrap; }
.locked:hover { color: var(--accent); }


.soldbar { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--line); vertical-align: middle; overflow: hidden; }
.soldbar span { display: block; height: 100%; background: var(--accent); }
.spark { display: block; }

.upsell { border: 1px dashed var(--accent); }

/* ---- Hunt map ---- */
.hunt-bar { position: sticky; top: 0; z-index: 500; background: var(--surface); border-bottom: 1px solid var(--line); }
.hunt-bar .container { padding-top: 8px; }
.hunt-meta { font-size: .85rem; color: var(--muted); padding-bottom: 8px; }
#map { height: calc(100vh - 60px - 92px); height: calc(100dvh - 60px - 92px); min-height: 360px; width: 100%; }
.map-controls { position: absolute; right: 12px; top: 12px; z-index: 600; display: flex; flex-direction: column; gap: 8px; }
.map-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.2rem; cursor: pointer; box-shadow: 0 2px 8px rgb(0 0 0 / .15); }
.map-wrap { position: relative; }
.legend { position: absolute; left: 12px; bottom: 24px; z-index: 600; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .75rem; line-height: 1.6; box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: .9rem; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: .95; }

.pin { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .35); display: flex; align-items: center; justify-content: center; color: #fff; font: 700 12px/1 system-ui, sans-serif; }
.pin-prime { background: #27ae60; }
.pin-high { background: #f1c40f; color: #3b2f00; }
.pin-mega { background: #c0392b; }
.pin-small { background: #e67e22; }
.pin-unknown { background: #7f8c8d; }
.pin-empty { background: #bdc3c7; color: #2c3e50; }
.pin-found { background: #d4af37; animation: sonar 1.5s infinite; }
.pin-comm-found { box-shadow: 0 0 0 3px #d4af37; }
.pin-comm-empty { box-shadow: 0 0 0 3px #95a5a6; }
@keyframes sonar { 0% { box-shadow: 0 0 0 0 rgb(241 196 15 / .7); } 70% { box-shadow: 0 0 0 14px rgb(241 196 15 / 0); } 100% { box-shadow: 0 0 0 0 rgb(241 196 15 / 0); } }

.popup h3 { margin: 0 0 4px; font-size: 1rem; color: #18181b; }
.popup p { margin: 2px 0; font-size: .85rem; color: #444; }
.popup .acts { display: grid; gap: 6px; margin-top: 8px; }
.popup button { font: inherit; font-weight: 600; padding: 8px; border-radius: 8px; border: 0; cursor: pointer; }
.popup .b-found { background: #ffd700; color: #1a1300; }
.popup .b-empty { background: #95a5a6; color: #fff; }
.popup .b-clear { background: #ecf0f1; color: #2c3e50; }
.popup .comm { margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: #f6f6f2; }
.ticket-art { display: block; max-width: 220px; max-height: 320px; border-radius: 10px; border: 1px solid var(--line); }
