:root {
  --bg: #1c1f1e;
  --panel: rgba(18, 20, 19, 0.86);
  --panel-solid: #141615;
  --line: rgba(255, 255, 255, 0.10);
  --text: #eef1ef;
  --muted: #9aa39e;
  --accent: #6be675;
  --accent-deep: #2fae4a;
  --accent-glow: rgba(107, 230, 117, 0.45);
  --display: "Black Han Sans", "Noto Sans KR", system-ui, sans-serif;
  --body: "Pretendard Variable", Pretendard, "Noto Sans KR", system-ui, -apple-system, sans-serif;
  --radius: 16px;
  --radius-sm: 12px;
  --gutter: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;      /* Korean: wrap at spaces, never mid-word */
  overflow-wrap: anywhere;   /* ...but still break long URLs/addresses */
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- Map ---------- */
.map { position: fixed; inset: 0; background: #2a2e2c; }
/* Esri Dark Gray tiles, fully desaturated for the GTA grey look */
.map .leaflet-tile-pane { filter: grayscale(1) brightness(1.05) contrast(1.05); }
.leaflet-container { font-family: var(--body); }
.leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.45) !important;
  color: #8a918d !important;
  font-size: 10px;
}
.leaflet-control-attribution a { color: #b7beba !important; }
.leaflet-control-zoom { display: none; }

.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 400;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 3px);
}

/* ---------- Pulsing treasure blip ---------- */
.pulse { position: relative; width: 34px; height: 34px; }
.pulse-core {
  position: absolute; inset: 5px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #0d1a0f;
  box-shadow: 0 0 12px var(--accent-glow), 0 0 0 2px rgba(255,255,255,0.8);
  display: grid; place-items: center;
  font: 900 10px/1 var(--body); color: #0d1a0f;
}
.pulse-ring {
  position: absolute; left: 50%; top: 50%;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse var(--pulse-dur, 2.2s) cubic-bezier(.2,.6,.3,1) infinite;
  opacity: 0;
}
.pulse-ring.r2 { animation-delay: calc(var(--pulse-dur, 2.2s) / 3); }
.pulse-ring.r3 { animation-delay: calc(var(--pulse-dur, 2.2s) * 2 / 3); }
@keyframes pulse {
  0%   { transform: scale(0.6); opacity: 0.95; }
  100% { transform: scale(6.5); opacity: 0; }
}
.pulse:hover .pulse-core, .pulse.active .pulse-core { transform: scale(1.15); }
.pulse-core { transition: transform .2s; }

.zone-circle { animation: zoneBreath 2.2s ease-in-out infinite; }
@keyframes zoneBreath {
  0%, 100% { fill-opacity: .10; }
  50% { fill-opacity: .22; }
}

.garosu-glow { filter: drop-shadow(0 0 6px var(--accent)); }

/* District labels */
.district {
  font-family: var(--display);
  color: rgba(238, 241, 239, 0.78);
  font-size: 22px;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 rgba(0,0,0,.6), 0 0 14px rgba(0,0,0,.6);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
  line-height: 1;
}
.district small {
  display: block; font-family: var(--body); font-weight: 700;
  font-size: 9px; letter-spacing: .3em; color: rgba(238,241,239,.5); margin-top: 3px;
}
.zone-label {
  font-family: var(--display);
  font-size: 14px; color: var(--accent);
  text-shadow: 0 0 10px rgba(0,0,0,.9), 0 1px 0 #000;
  white-space: nowrap; width: max-content; transform: translate(-50%, calc(-100% - 8px));
  pointer-events: none;
}

/* User location */
.you { width: 18px; height: 18px; position: relative; }
.you::before {
  content: ""; position: absolute; inset: 0;
  background: #fff; clip-path: polygon(50% 0, 100% 100%, 50% 75%, 0 100%);
  filter: drop-shadow(0 0 3px #000);
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 600;
  display: flex; align-items: center; gap: 16px;
  padding: calc(env(safe-area-inset-top) + 12px) var(--gutter) 12px;
  background: linear-gradient(to bottom, rgba(10,12,11,.92), rgba(10,12,11,0));
}
.topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title { font-family: var(--display); font-size: 20px; white-space: nowrap; }
.brand-logo { display: block; height: 56px; width: auto; }
.brand-logo.small { height: 22px; }

.tabs { display: flex; gap: 2px; margin-left: auto; }
.tab {
  background: rgba(0,0,0,.45); border: 0; border-bottom: 3px solid transparent;
  padding: 8px 16px; font-weight: 700; font-size: 14px; color: var(--muted);
  transition: color .15s, background .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: rgba(0,0,0,.7); border-bottom-color: var(--accent); }
.lang {
  background: transparent; border: 1px solid var(--line); border-radius: 4px;
  padding: 6px 10px; font-weight: 700; font-size: 12px; color: var(--muted);
}
.lang:hover { color: var(--text); border-color: var(--accent); }

/* ---------- HUD objective ---------- */
.hud-objective {
  position: fixed; z-index: 500; left: var(--gutter); top: 84px;
  width: 300px; max-width: calc(100vw - 2 * var(--gutter));
  background: var(--panel); border-left: 3px solid var(--accent);
  padding: 14px 16px; backdrop-filter: blur(6px);
}
.hud-label {
  font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}
.hud-text { font-size: 14px; line-height: 1.5; }
.hud-timer { margin-top: 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hud-timer .hud-label { margin: 0; color: var(--muted); }
.timer { font-family: var(--display); font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.hud-progress { margin-top: 10px; display: flex; gap: 6px; }
.hud-progress .chip {
  flex: 1; font-size: 12px; font-weight: 700; padding: 6px 8px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px; cursor: pointer;
}
.hud-progress .chip:hover { border-color: var(--accent); }
.hud-progress .chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.hud-progress .chip.found { opacity: .5; text-decoration: line-through; }
.hud-progress .chip.found .dot { background: var(--muted); box-shadow: none; }

/* ---------- Legend ---------- */
.legend {
  position: fixed; z-index: 500; right: var(--gutter); top: 84px;
  background: var(--panel); padding: 12px 14px; min-width: 190px;
  backdrop-filter: blur(6px);
}
.legend-title { font-family: var(--display); font-size: 16px; margin-bottom: 8px; }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 10px; }
.blip { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.blip-treasure { background: var(--accent); box-shadow: 0 0 0 2px #fff, 0 0 10px var(--accent); }
.blip-zone { border-radius: 3px; height: 12px; background: rgba(107,230,117,.22); border: 2px solid var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.blip-you { background: #fff; clip-path: polygon(50% 0, 100% 100%, 50% 75%, 0 100%); border-radius: 0; }

/* ---------- Controls ---------- */
.controls {
  position: fixed; z-index: 500; right: var(--gutter); bottom: 96px;
  display: grid; gap: 6px;
}
.ctrl {
  display: flex; align-items: center; gap: 8px; justify-content: flex-start;
  background: var(--panel); border: 1px solid var(--line);
  padding: 9px 12px; font-size: 13px; font-weight: 700;
}
.ctrl:hover { border-color: var(--accent); }
.ctrl-icon { color: var(--accent); width: 14px; text-align: center; }

/* ---------- CTA ---------- */
.cta {
  position: fixed; z-index: 500; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--gutter) calc(env(safe-area-inset-bottom) + 14px);
  background: linear-gradient(to top, rgba(10,12,11,.92), rgba(10,12,11,0));
}
.hint { margin: 0; font-size: 12px; color: var(--muted); }
.cta-buttons { display: flex; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 18px; font-weight: 900; font-size: 14px; text-decoration: none;
  background: rgba(255,255,255,.08); border: 1px solid var(--line); white-space: nowrap;
  transition: transform .1s, background .15s;
}
.btn:hover { background: rgba(255,255,255,.14); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #0b140c; border-color: var(--accent); }
.btn-primary:hover { background: #8af092; }

/* ---------- Panel (brief / rules) ---------- */
.panel {
  position: fixed; inset: 0; z-index: 550;
  background: rgba(10, 12, 11, .78); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 90px var(--gutter) 110px;
}
.panel-inner {
  width: min(640px, 100%); background: var(--panel-solid);
  border-top: 3px solid var(--accent); padding: 24px 28px; max-height: 100%; overflow: auto;
}
.panel-title { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 0 0 16px; }
.panel-list { margin: 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 14px; }
.panel-list li { counter-increment: n; display: grid; grid-template-columns: 34px 1fr; gap: 10px; line-height: 1.6; }
.panel-list li::before {
  content: counter(n, decimal-leading-zero);
  font-family: var(--display); color: var(--accent); font-size: 18px;
}

/* ---------- Treasure card ---------- */
.card {
  position: fixed; z-index: 560; left: 50%; bottom: 96px; transform: translateX(-50%);
  width: min(420px, calc(100vw - 2 * var(--gutter)));
  background: var(--panel-solid); border-top: 3px solid var(--accent);
  padding: 18px 20px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: cardIn .25s ease-out;
}
@keyframes cardIn { from { opacity: 0; transform: translate(-50%, 16px); } }
.card-close {
  position: absolute; top: 10px; right: 10px; background: none; border: 0;
  color: var(--muted); font-size: 16px; padding: 4px 8px;
}
.card-close:hover { color: var(--text); }
.card-kicker { font-family: var(--display); font-size: 22px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-right: 24px; }
.card-id {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--accent); color: #0b140c; display: grid; place-items: center; font-size: 16px;
}
.card-row { margin-bottom: 12px; }
.card-row p { margin: 0; line-height: 1.55; font-size: 15px; }
.card-actions { display: flex; gap: 8px; margin-top: 16px; }
.card-actions .btn { flex: 1; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1000; background: #0e100f;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: calc(env(safe-area-inset-top) + 24px) 24px calc(env(safe-area-inset-bottom) + 24px);
  transition: opacity .6s ease;
  overflow: hidden;
}
.loader.out { opacity: 0; pointer-events: none; }
.loader-art {
  position: absolute; inset: 0; opacity: .5;
  background:
    radial-gradient(circle at 70% 40%, rgba(107,230,117,.22), transparent 45%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.04) 0 2px, transparent 2px 36px),
    repeating-linear-gradient(25deg, rgba(255,255,255,.03) 0 1px, transparent 1px 58px);
  animation: drift 20s linear infinite;
}
@keyframes drift { to { background-position: 0 0, 400px 0, 0 400px; } }
.loader-brand { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.loader-brand .brand-logo { height: clamp(56px, 15vw, 110px); margin: 0 auto; }
.brand-sub { font-family: var(--display); font-size: clamp(22px, 5vw, 44px); color: var(--muted); margin-top: clamp(10px, 2vw, 18px); }
.loader-bottom { position: absolute; left: 24px; right: 24px; bottom: calc(env(safe-area-inset-bottom) + 24px); display: flex; justify-content: center; }
.loader-tip {
  margin: 0; max-width: 520px; font-size: 15px; line-height: 1.6;
  background: rgba(0,0,0,.55); padding: 12px 16px; border-left: 3px solid var(--accent);
  min-height: 3.2em;
}
.loader-status { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 15px; margin-top: clamp(28px, 6vh, 56px); min-height: 48px; padding: 0 22px; color: var(--muted); }
.loader-status.ready { color: var(--accent); animation: blink 1.2s steps(2) infinite; cursor: pointer; font-family: var(--display); font-size: clamp(18px, 4.8vw, 26px); letter-spacing: .04em; border: 2px solid var(--accent); box-shadow: 0 0 18px var(--accent-glow); }
@keyframes blink { 50% { opacity: .35; } }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
.loader-status.ready .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Mission splash ---------- */
.splash {
  position: fixed; left: 0; right: 0; top: 38%; z-index: 700; text-align: center; pointer-events: none;
  animation: splash 3.2s ease forwards;
}
.splash-kicker { font-weight: 900; letter-spacing: .4em; font-size: 13px; color: var(--accent); text-transform: uppercase; }
.splash-title {
  font-family: var(--display); font-size: clamp(38px, 9vw, 84px); line-height: 1.05; margin: 6px 0;
  text-shadow: 0 4px 0 rgba(0,0,0,.6), 0 0 30px rgba(0,0,0,.8);
}
.splash-sub { font-size: 16px; font-weight: 700; color: var(--text); text-shadow: 0 2px 8px #000; }
@keyframes splash {
  0% { opacity: 0; transform: scale(1.15); }
  12% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding-bottom: 6px; }
  .topbar-title { font-size: 16px; }
  .tabs { order: 3; width: 100%; margin: 0; }
  .tab { flex: 1; padding: 8px 6px; font-size: 13px; }
  .topbar-right { margin-left: auto; }
  .hud-objective { top: 104px; width: auto; right: var(--gutter); padding: 10px 12px; }
  .hud-text { font-size: 13px; }
  .timer { font-size: 22px; }
  .legend { display: none; }
  .controls { bottom: 132px; }
  .ctrl span:not(.ctrl-icon) { display: none; }
  .ctrl { padding: 10px 12px; }
  .cta { flex-direction: column; align-items: stretch; }
  .hint { text-align: center; }
  .cta-buttons .btn { flex: 1; }
  .card { bottom: 132px; }
  .panel { padding: 110px var(--gutter) 140px; }
  .panel-inner { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-ring, .zone-circle, .loader-art, .splash { animation: none; }
  .pulse-ring { opacity: .5; transform: scale(1.8); }
}

.pulse.found .pulse-core { background: #6d7470; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }

/* ---------- Waypoint (in-app route, GTA GPS style) ---------- */
.hud-waypoint {
  margin-top: 10px; padding: 7px 10px;
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: rgba(107, 230, 117, 0.08); border: 1px solid rgba(107, 230, 117, 0.35);
}
.route-line { animation: routeMarch 0.9s linear infinite; filter: drop-shadow(0 0 4px var(--accent)); }
@keyframes routeMarch { to { stroke-dashoffset: -12; } }
.btn-waypoint.on { background: transparent; color: var(--accent); }
.btn-waypoint.on:hover { background: rgba(107, 230, 117, 0.12); }

/* ---------- Objective checklist ---------- */
.hud-steps { list-style: none; margin: 2px -6px 0; padding: 0; display: grid; gap: 0; }
.hud-steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.35; color: var(--muted); padding: 6px; min-height: 34px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.hud-steps li:hover { background: rgba(255,255,255,.05); }
.hud-steps li:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hud-steps li.auto { cursor: default; }
.hud-steps li.auto:hover { background: none; }
.hud-steps .step-box {
  flex: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-radius: 3px;
  display: grid; place-items: center;
}
.hud-steps li.current { color: var(--text); font-weight: 700; }
.hud-steps li.current .step-box { border-color: var(--accent); box-shadow: 0 0 8px var(--accent-glow); animation: stepBlink 1.2s steps(2) infinite; }
.hud-steps li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.35); }
.hud-steps li.done .step-box { border-color: var(--accent); background: var(--accent); }
.hud-steps li.done .step-box::after { content: ""; width: 5px; height: 9px; border: solid #0b140c; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px,-1px); }
@keyframes stepBlink { 50% { box-shadow: none; border-color: rgba(107,230,117,.4); } }

/* ---------- Lit mission zone ---------- */
.zone-area { filter: drop-shadow(0 0 10px rgba(107, 230, 117, 0.45)); }

/* ---------- Collapsible objective header ---------- */
.hud-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 0; padding: 0 0 2px; text-align: left;
}
.hud-head .hud-label { margin: 0; }
.hud-count { font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--muted); }
.hud-chev {
  margin-left: auto; width: 8px; height: 8px;
  border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-135deg) translate(-2px, -2px);
  transition: transform .2s;
}
.hud-objective.collapsed .hud-chev { transform: rotate(45deg) translate(-2px, -2px); }
.hud-objective.collapsed { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; }
.hud-objective.collapsed .hud-head { flex: 0 0 auto; width: auto; padding: 4px 0; }
.hud-objective.collapsed .hud-chev { margin-left: 4px; }
.hud-objective.collapsed .hud-steps,
.hud-objective.collapsed .hud-progress { display: none; }
.hud-objective.collapsed .hud-timer { margin: 0 0 0 auto; gap: 8px; }
.hud-objective.collapsed .hud-waypoint,
.hud-objective.collapsed .hud-grip { flex-basis: 100%; }

@media (max-width: 760px) {
  .hud-objective { padding: 8px 12px 10px; }
  .hud-steps li { font-size: 13.5px; min-height: 32px; padding: 4px 6px; }
  .hud-steps .step-box { width: 16px; height: 16px; }
  .hud-timer { margin-top: 6px; }
  .hud-timer .hud-label { font-size: 10px; }
  .timer { font-size: 18px; }
  .hud-progress { margin-top: 8px; }
  .hud-progress .chip { padding: 4px 8px; }
  .hud-waypoint { margin-top: 6px; padding: 5px 8px; font-size: 12px; }
}

/* Grab handle (phones): hints the panel folds up/down */
.hud-grip { display: none; }
@media (max-width: 760px) {
  .hud-objective { touch-action: pan-x; }
  .hud-grip {
    display: block; width: 100%; height: 14px; margin: 6px 0 -6px; padding: 0;
    background: none; border: 0; position: relative;
  }
  .hud-grip::before {
    content: ""; position: absolute; left: 50%; top: 5px; width: 36px; height: 4px;
    margin-left: -18px; border-radius: 2px; background: rgba(255,255,255,.28);
  }
}

/* beat Leaflet's `.leaflet-container .leaflet-marker-pane img { width: auto }` */
.leaflet-container .leaflet-marker-pane .pulse-core img { width: 62%; height: 62%; display: block; pointer-events: none; }
.pulse.hot .pulse-core { box-shadow: 0 0 22px 4px var(--accent), 0 0 0 2px rgba(255,255,255,.9); }

/* ---------- Location consent ---------- */
.consent {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(6, 8, 7, .72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px var(--gutter) calc(env(safe-area-inset-bottom) + 24px);
}
.consent-inner {
  width: min(420px, 100%); background: var(--panel-solid);
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  padding: 22px 20px 18px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.consent-icon {
  width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: 0 0 16px var(--accent-glow);
  position: relative; animation: stepBlink 1.6s steps(2) infinite;
}
.consent-icon::after {
  content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--accent);
}
.consent-title { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0 0 10px; }
.consent-text { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.consent-note { margin: 0 0 18px; font-size: 12px; color: var(--muted); }
.consent-actions { display: grid; gap: 8px; }
.consent-actions .btn { min-height: 48px; }
@media (min-width: 761px) { .consent-actions { grid-template-columns: 1fr 1fr; } }

/* =====================================================================
   Korean app-style layer (Toss / Kakao feel): Pretendard, rounded cards,
   bottom sheets, round checks, segmented tabs. GTA dark + green stays.
   ===================================================================== */

/* Tabs as a segmented control */
.tabs { background: rgba(0,0,0,.5); border-radius: var(--radius-sm); padding: 4px; gap: 4px; }
.tab { border-radius: 9px; border-bottom: 0; background: transparent; font-weight: 700; letter-spacing: -.01em; }
.tab.active { background: #262a28; color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.lang { border-radius: 10px; }

/* Buttons */
.btn { border-radius: var(--radius-sm); font-weight: 700; letter-spacing: -.01em; }
.ctrl { border-radius: var(--radius-sm); }

/* Objective panel */
.hud-objective {
  border-left: 0; border-radius: var(--radius);
  background: rgba(20, 23, 21, .9); border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.hud-label { letter-spacing: .08em; }
.hud-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); margin: 8px 0 6px; overflow: hidden; }
.hud-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; box-shadow: 0 0 8px var(--accent-glow); transition: width .4s ease; }
.hud-objective.collapsed .hud-bar { flex-basis: 100%; margin: 6px 0 2px; order: 5; }
.hud-objective.collapsed .hud-waypoint { order: 6; }
.hud-objective.collapsed .hud-grip { order: 10; }
.hud-steps li { border-radius: 10px; letter-spacing: -.01em; }
.hud-steps .step-box { border-radius: 50%; }
.hud-steps li.done .step-box::after { transform: rotate(45deg) translate(-1px,-1px); }
.hud-progress .chip { border-radius: 999px; justify-content: center; }
.hud-waypoint { border-radius: 10px; }

/* Brief / Rules: centered rounded card on desktop, bottom sheet on phones */
.panel { background: rgba(6, 8, 7, .6); }
.panel-inner {
  border-top: 0; border-radius: 20px; padding: 18px 20px 22px;
  background: #151816; border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  animation: sheetIn .28s cubic-bezier(.2,.8,.2,1);
}
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.22); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-title { font-family: var(--body); font-weight: 800; font-size: 22px; letter-spacing: -.02em; margin: 0; }
.sheet-close {
  width: 34px; height: 34px; border-radius: 50%; border: 0; flex: none;
  background: rgba(255,255,255,.08); color: var(--muted); font-size: 14px;
}
.sheet-close:hover { color: var(--text); background: rgba(255,255,255,.14); }
.panel-list { gap: 8px; }
.panel-list li {
  grid-template-columns: 30px 1fr; align-items: center; gap: 12px;
  background: rgba(255,255,255,.04); border-radius: 14px; padding: 13px 14px;
  font-size: 15px; line-height: 1.55; letter-spacing: -.01em;
}
.panel-list li::before {
  content: counter(n); display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 10px;
  font-family: var(--body); font-weight: 800; font-size: 14px;
  color: var(--accent); background: rgba(107, 230, 117, .12);
}
@keyframes sheetIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 760px) {
  .panel { align-items: end; padding: 0; place-items: end center; }
  .panel-inner {
    width: 100%; max-height: 82vh; border-radius: 22px 22px 0 0; border-bottom: 0;
    padding: 10px 18px calc(env(safe-area-inset-bottom) + 22px);
    animation: sheetUp .3s cubic-bezier(.2,.8,.2,1);
  }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
}
@media (min-width: 761px) { .sheet-grip { display: none; } }

/* Treasure card + consent: rounded */
.card { border-radius: 20px; border-top: 0; box-shadow: 0 20px 50px rgba(0,0,0,.55), inset 0 3px 0 var(--accent); }
.consent-inner { border-radius: 20px; border-top: 1px solid var(--line); }
.consent-title { font-family: var(--body); font-weight: 800; letter-spacing: -.02em; }
.card-kicker { letter-spacing: -.01em; }
.legend { border-radius: var(--radius); border: 1px solid rgba(255,255,255,.07); background: rgba(20, 23, 21, .9); }
.legend-title { font-family: var(--body); font-weight: 800; letter-spacing: -.01em; }

.card-id img { width: 19px; height: 19px; display: block; }
.zone-district { filter: drop-shadow(0 0 6px rgba(107, 230, 117, .35)); }
