@font-face {
  font-family: 'Bricolage';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg-deep: #0b2440;
  --glass: rgba(11, 30, 56, 0.78);
  --glass-hi: rgba(16, 44, 78, 0.88);
  --border: rgba(154, 236, 255, 0.28);
  --gold: #ffd45c;
  --gold-deep: #d4891c;
  --cyan: #57f0ff;
  --coral: #ff6b57;
  --mint: #53f2a3;
  --violet: #d07dff;
  --ink: #f4fbff;
  --muted: #b6d6ea;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body, .app {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.app {
  position: relative;
  isolation: isolate;
}

[hidden] {
  display: none !important;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* 3D Canvas — touch-action: none strictly scoped here */
#stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}

/* Projected 3D HUD reticles and floating score popups */
.world-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.hook-reticle {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.reticle-diamond {
  width: 34px;
  height: 34px;
  border: 3px solid var(--gold);
  border-radius: 7px;
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(255, 212, 92, 0.8), inset 0 0 8px rgba(87, 240, 255, 0.5);
  animation: reticlePulse 0.85s ease-in-out infinite alternate;
}

.hook-reticle.boss .reticle-diamond {
  border-color: var(--violet);
  box-shadow: 0 0 18px rgba(208, 125, 255, 0.95);
}

.reticle-label {
  font-family: 'Bricolage', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(11, 30, 56, 0.85);
  color: var(--gold);
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid rgba(255, 212, 92, 0.55);
}

.beacon-pin {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(11, 36, 62, 0.86);
  border: 1.5px solid var(--cyan);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.beacon-arrow {
  font-size: 10px;
  line-height: 1;
}

.float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.float-pop {
  position: absolute;
  left: 50%;
  top: 44%;
  font-family: 'Bricolage', system-ui, sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--gold);
  text-shadow: 0 2px 8px rgba(8, 22, 42, 0.88);
  white-space: nowrap;
  animation: popRise 1.05s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.float-pop.cyan { color: var(--cyan); }
.float-pop.mint { color: var(--mint); }
.float-pop.coral { color: var(--coral); }
.float-pop.violet { color: #f1b7ff; font-size: 21px; }

@keyframes reticlePulse {
  from { transform: rotate(45deg) scale(0.92); }
  to { transform: rotate(45deg) scale(1.1); }
}

@keyframes popRise {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(0.8); }
  16% { opacity: 1; transform: translate(-50%, -10px) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -58px) scale(0.95); }
}

/* Main HUD Overlay — pointer-events: none on containers, auto ONLY on buttons/radar/joy */
.hud {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.hud-top {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.hud-left, .hud-center, .hud-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.hud-center {
  align-items: center;
  flex: 1;
  min-width: 0;
}

.hud-right {
  align-items: flex-end;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(5, 16, 33, 0.32);
}

.timer-pill strong {
  font-family: 'Bricolage', system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.mini-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(87, 240, 255, 0.18);
  color: var(--cyan);
}

.mini-tag.overdrive {
  background: var(--coral);
  color: #fff;
  animation: pulseFast 0.7s ease-in-out infinite alternate;
}

@keyframes pulseFast {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.score-pill {
  padding: 6px 10px;
  gap: 9px;
}

.score-block, .bag-block, .forge-block {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.score-pill small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.score-pill strong {
  font-family: 'Bricolage', system-ui, sans-serif;
  font-size: 15px;
}

.bag-block.haul strong {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 212, 92, 0.7);
}

.forge-block strong {
  color: var(--cyan);
}

.divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.16);
}

.combo-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 114, 71, 0.9), rgba(255, 198, 70, 0.9));
  color: #16182c;
  font-family: 'Bricolage', system-ui, sans-serif;
  box-shadow: 0 6px 16px rgba(255, 126, 66, 0.42);
}

.combo-pill strong {
  font-size: 16px;
  font-weight: 900;
}

.combo-pill span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.combo-track {
  width: 44px;
  height: 5px;
  background: rgba(18, 22, 42, 0.28);
  border-radius: 99px;
  overflow: hidden;
}

.combo-fill {
  width: 100%;
  height: 100%;
  background: #fff;
  transform-origin: left center;
}

/* Boss Bar & Event Toasts */
.boss-bar {
  width: min(300px, 46vw);
  padding: 7px 11px;
  border-radius: 14px;
  background: rgba(31, 14, 62, 0.86);
  border: 1.5px solid rgba(208, 125, 255, 0.65);
  box-shadow: 0 8px 24px rgba(20, 6, 44, 0.55);
}

.boss-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-family: 'Bricolage', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #f3c8ff;
}

.boss-prisms {
  color: var(--cyan);
  letter-spacing: 2px;
}

.boss-track {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.boss-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #5ff8ff, #d07dff, #ff6b9d);
  transition: width 0.18s ease-out;
}

.event-toast {
  max-width: min(360px, 68vw);
  text-align: center;
  padding: 7px 14px;
  border-radius: 99px;
  background: rgba(11, 30, 56, 0.9);
  border: 1.5px solid rgba(255, 212, 92, 0.62);
  color: #fff8de;
  font-family: 'Bricolage', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(4, 15, 32, 0.45);
}

.context-hint {
  padding: 4px 11px;
  border-radius: 99px;
  background: rgba(12, 39, 66, 0.82);
  border: 1px solid rgba(87, 240, 255, 0.45);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
}

/* Top-Right Utilities, Radar & Crew */
.util-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.perf-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(11, 30, 56, 0.86);
  border: 1px solid rgba(83, 242, 163, 0.65);
  color: var(--mint);
  box-shadow: 0 4px 10px rgba(4, 15, 32, 0.35);
}

button {
  font-family: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.icon-btn {
  pointer-events: auto;
  min-width: 44px;
  min-height: 44px;
  border-radius: 13px;
  background: var(--glass);
  border: 1px solid var(--border);
  font-size: 18px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 14px rgba(5, 16, 33, 0.32);
  transition: transform 0.1s ease, background 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn[aria-pressed="false"] {
  opacity: 0.9;
  border-color: var(--coral);
  color: var(--coral);
}
.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn .cross { display: none; }
.icon-btn[aria-pressed="false"] .cross { display: block; }
.icon-btn[aria-pressed="false"] .waves { display: none; }
.sound-global {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 60;
}
.sound-spacer {
  width: 44px;
  height: 44px;
  flex: none;
}

.radar-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

#radar {
  pointer-events: auto;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(9, 28, 52, 0.8);
  border: 2px solid rgba(114, 232, 255, 0.45);
  box-shadow: 0 6px 18px rgba(4, 15, 32, 0.4);
  touch-action: manipulation;
  transition: width 0.2s ease, height 0.2s ease;
}

#radar.expanded {
  width: 152px;
  height: 152px;
}

.relic-chip {
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--glass);
  border: 1px solid rgba(255, 212, 92, 0.4);
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
}

.crew-board {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 126px;
}

.crew-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(9, 26, 48, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
}

.crew-row.me {
  border-color: rgba(255, 212, 92, 0.55);
  background: rgba(19, 51, 88, 0.84);
}

.crew-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.crew-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.crew-pts {
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* Upgrade Dock — Bottom Center */
.upgrade-dock {
  position: fixed;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 18px));
  transform: translateX(-50%);
  z-index: 22;
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.upg-btn {
  pointer-events: auto;
  min-width: 48px;
  min-height: 46px;
  padding: 5px 9px;
  border-radius: 13px;
  background: var(--glass);
  border: 1.5px solid rgba(154, 236, 255, 0.25);
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  transition: transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.upg-btn:active {
  transform: scale(0.93);
}

.upg-btn.ready {
  border-color: var(--gold);
  background: rgba(25, 58, 92, 0.92);
  box-shadow: 0 0 16px rgba(255, 212, 92, 0.5);
}

.upg-btn.maxed {
  border-color: rgba(83, 242, 163, 0.55);
  opacity: 0.85;
}

.upg-ico {
  font-size: 18px;
  line-height: 1;
}

.upg-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.upg-meta b {
  font-size: 11px;
  font-weight: 800;
}

.upg-meta small {
  font-size: 10px;
  color: var(--cyan);
  font-weight: 700;
}

.upg-btn.ready .upg-meta small {
  color: var(--gold);
}

.upg-btn.maxed .upg-meta small {
  color: var(--mint);
}

/* Virtual Joystick — Bottom Left */
.joy-zone {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 25;
  width: 134px;
  height: 134px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  touch-action: none;
}

.joy-base {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 48, 84, 0.28) 0%, rgba(12, 34, 62, 0.64) 100%);
  border: 2px solid rgba(154, 236, 255, 0.45);
  box-shadow: 0 6px 20px rgba(4, 14, 30, 0.35);
  display: grid;
  place-items: center;
  position: relative;
}

.joy-knob {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #9cefff 55%, #37b9df 100%);
  border: 2.5px solid #ffffff;
  box-shadow: 0 5px 14px rgba(4, 16, 36, 0.5);
  will-change: transform;
}

/* Right Thumb Action Cluster */
.action-cluster {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 25;
  width: 162px;
  height: 146px;
  pointer-events: none;
}

.act-btn {
  position: absolute;
  pointer-events: auto;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2.5px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(6, 18, 40, 0.48);
  transition: transform 0.08s ease, filter 0.12s ease;
  overflow: hidden;
}

.act-btn:active, .act-btn.pressed {
  transform: scale(0.91);
  filter: brightness(1.12);
}

.act-ico {
  font-size: 22px;
  line-height: 1;
}

.act-lbl {
  font-family: 'Bricolage', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.act-hook {
  right: 0;
  bottom: 4px;
  width: 78px;
  height: 78px;
  background: linear-gradient(145deg, #ffd85c, #ff863b);
  color: #1a1728;
}

.act-hook.locked {
  border-color: #ffffff;
  box-shadow: 0 0 24px rgba(255, 212, 92, 0.95), 0 8px 20px rgba(6, 18, 40, 0.45);
}

.act-hook.slam {
  background: linear-gradient(145deg, #ff7070, #c8338f);
  color: #fff;
}

.act-jump {
  left: 4px;
  bottom: 0;
  width: 68px;
  height: 68px;
  background: linear-gradient(145deg, #5ef6ff, #1c9be8);
  color: #08233a;
}

.act-jump.gliding {
  background: linear-gradient(145deg, #8cffc7, #1bc996);
  box-shadow: 0 0 20px rgba(83, 242, 163, 0.8);
}

.act-pulse {
  right: 22px;
  top: 0;
  width: 58px;
  height: 58px;
  background: linear-gradient(145deg, #df90ff, #7742f5);
  color: #ffffff;
}

.act-pulse .act-ico {
  font-size: 18px;
}

.cd-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 36, 0.68);
  display: grid;
  place-items: center;
  font-family: 'Bricolage', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.desktop-hint {
  position: fixed;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 11px;
  color: rgba(235, 248, 255, 0.78);
  text-shadow: 0 1px 4px rgba(5, 16, 32, 0.8);
  white-space: nowrap;
  pointer-events: none;
}

/* Overlays & Modals */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  pointer-events: auto;
}

.title-overlay {
  background: radial-gradient(circle at 50% 42%, rgba(9, 32, 62, 0.14) 0%, rgba(7, 22, 46, 0.68) 100%);
}

.modal-overlay {
  background: rgba(6, 17, 36, 0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.title-card, .modal-card {
  width: min(460px, 100%);
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 22px 22px 20px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(11, 34, 64, 0.9), rgba(16, 45, 78, 0.86));
  border: 1.5px solid rgba(142, 237, 255, 0.36);
  box-shadow: 0 22px 54px rgba(3, 12, 28, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.kicker-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255, 212, 92, 0.18);
  border: 1px solid rgba(255, 212, 92, 0.45);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.conn-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
}

h1, h2 {
  margin: 0;
  font-family: 'Bricolage', system-ui, sans-serif;
}

.title-card h1 {
  font-size: clamp(32px, 7vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 4px 18px rgba(10, 42, 82, 0.55);
}

.title-desc {
  margin: 10px 0 14px;
  font-size: 14px;
  line-height: 1.48;
  color: #d9eefb;
}

.quick-verbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 16px;
}

.quick-verbs span {
  padding: 8px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  line-height: 1.25;
  color: #eaf7ff;
}

.quick-verbs b {
  color: var(--gold);
}

.direct-form {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(7, 22, 44, 0.58);
  border: 1px solid rgba(154, 236, 255, 0.25);
}

.direct-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--muted);
}

.direct-row {
  display: flex;
  gap: 8px;
}

.direct-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(154, 236, 255, 0.35);
  background: rgba(11, 30, 56, 0.85);
  color: #fff;
  font: inherit;
  font-size: 15px;
}

.title-actions {
  display: flex;
  gap: 10px;
}

.btn-primary, .btn-ghost {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-family: 'Bricolage', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #ffe066, #ff993b);
  color: #1a1829;
  box-shadow: 0 6px 20px rgba(255, 165, 62, 0.42);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
}

.btn-primary:active, .btn-ghost:active {
  transform: scale(0.96);
}

.full-w {
  width: 100%;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.close-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 24px;
  font-weight: 700;
}

.help-list {
  margin: 0 0 16px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #def1fc;
}

.help-list strong {
  color: var(--gold);
}

.end-card h2 {
  margin-top: 8px;
  font-size: 30px;
}

.end-sub {
  margin: 4px 0 12px;
  font-size: 14px;
  color: var(--muted);
}

.medals-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.medal-chip {
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(255, 212, 92, 0.16);
  border: 1px solid rgba(255, 212, 92, 0.5);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.standings-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.standing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.standing-row.me {
  background: rgba(87, 240, 255, 0.16);
  border: 1px solid rgba(87, 240, 255, 0.5);
}

.standing-rank {
  width: 24px;
  font-weight: 800;
  color: var(--gold);
}

.standing-name {
  flex: 1;
  font-weight: 700;
}

.standing-score {
  font-family: 'Bricolage', system-ui, sans-serif;
  font-weight: 800;
  color: var(--gold);
}

.end-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}

.end-stat {
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(7, 22, 44, 0.58);
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}

.end-stat b {
  color: var(--cyan);
}

.score-status {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--mint);
  min-height: 16px;
}

/* Mobile Portrait & Short Landscape Responsive Tuning */
@media (pointer: coarse) {
  .desktop-hint {
    display: none;
  }
}
body[data-device="desktop"] .joy-zone,
body[data-device="desktop"] .action-cluster {
  display: none !important;
}
body[data-device="touch"] .desktop-hint {
  display: none !important;
}

@media (max-width: 680px) {
  .hud-center {
    position: fixed;
    top: max(106px, calc(env(safe-area-inset-top) + 98px));
    left: 50%;
    transform: translateX(-50%);
    width: min(350px, calc(100vw - 24px));
    z-index: 23;
  }

  .boss-bar {
    width: 100%;
  }

  .event-toast {
    max-width: 100%;
    font-size: 12.5px;
  }

  .upgrade-dock {
    bottom: max(168px, calc(env(safe-area-inset-bottom) + 162px));
    left: 50%;
    gap: 5px;
  }

  .upg-btn {
    padding: 4px 7px;
    min-width: 44px;
    min-height: 44px;
  }

  .upg-meta b {
    display: none;
  }

  .crew-board {
    display: none;
  }

  #radar {
    width: 72px;
    height: 72px;
  }

  .quick-verbs {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 460px) {
  .joy-zone {
    width: 112px;
    height: 112px;
    bottom: 10px;
  }

  .joy-base {
    width: 96px;
    height: 96px;
  }

  .joy-knob {
    width: 42px;
    height: 42px;
  }

  .action-cluster {
    bottom: 10px;
    width: 146px;
    height: 126px;
  }

  .act-hook {
    width: 68px;
    height: 68px;
  }

  .act-jump {
    width: 60px;
    height: 60px;
  }

  .act-pulse {
    width: 52px;
    height: 52px;
  }

  .upgrade-dock {
    bottom: 10px;
  }

  .crew-board {
    display: none;
  }

  #radar {
    width: 64px;
    height: 64px;
  }

  .title-card {
    padding: 14px 16px;
  }

  .title-card h1 {
    font-size: 28px;
  }
}
