/* Geosharks design system: command-center structure, premium-game polish. */

@font-face { font-family: "Geo Sans"; src: url("/fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geo Sans"; src: url("/fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geo Sans"; src: url("/fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geo Display"; src: url("/fonts/HerosCn-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --abyss: #0A1622;
  --abyss-2: #0D1B2B;
  --hull: #11233A;
  --hull-2: #162C47;
  --steel: #27405C;
  --steel-2: #35557A;
  --fog: #DCE5EE;
  --mist: #8EA3B9;
  --dim: #61778F;
  --amber: #F2A93B;
  --amber-hi: #FFC266;
  --amber-ink: #2B1A02;
  --teal: #45C7B5;
  --danger: #FF7A7A;
  --success: #6FD3A0;

  --font: "Geo Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Geo Display", "Arial Narrow", "Roboto Condensed", sans-serif;

  --r-field: 10px;
  --r-panel: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font: 400 16px/1.6 var(--font);
  color: var(--fog);
  background:
    radial-gradient(1200px 700px at 30% 40%, rgba(69, 199, 181, .07), transparent 60%),
    linear-gradient(rgba(142, 163, 185, .035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(142, 163, 185, .035) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--abyss);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--fog); }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.hidden { display: none !important; }

/* Brand lockup */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fog); }
.brand img { width: 34px; height: 34px; }
.brand span { font: 700 26px/1 var(--display); letter-spacing: .01em; }
.brand:hover { color: var(--fog); }

/* Readouts: small data panels used on the globe side */
.readouts { display: flex; gap: 28px; flex-wrap: wrap; margin: 0; }
.readouts div { border-left: 2px solid var(--steel-2); padding-left: 12px; }
.readouts dt { font-size: 13px; color: var(--mist); }
.readouts dd { margin: 2px 0 0; font: 700 20px/1.2 var(--display); color: var(--fog); letter-spacing: .01em; }

/* Auth layout: globe theater + form panel */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(380px, 1fr);
  min-height: 100vh;
}

.theater { position: relative; overflow: hidden; border-right: 1px solid rgba(69, 199, 181, .10); }
.theater canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.theater canvas:active { cursor: grabbing; }
.theater .brand { position: absolute; top: 32px; left: 40px; z-index: 1; }
.theater .readouts { position: absolute; left: 40px; bottom: 36px; z-index: 1; pointer-events: none; }

.panel-wrap { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }

.panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 30px;
  border-radius: var(--r-panel);
  background: linear-gradient(180deg, rgba(22, 44, 71, .78), rgba(17, 35, 58, .72));
  border: 1px solid rgba(69, 199, 181, .14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(220, 229, 238, .06);
  backdrop-filter: blur(18px);
}

/* Tactical corner marks */
.panel::before, .panel::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
  border-color: var(--teal); border-style: solid; opacity: .7;
}
.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: var(--r-panel); }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: var(--r-panel); }

.panel h1 { font: 700 34px/1.05 var(--display); margin: 0 0 6px; letter-spacing: .005em; }
.panel .lead { color: var(--mist); margin: 0 0 24px; font-size: 15px; }

/* Fields with floating labels */
.field { position: relative; margin-bottom: 14px; }

.field input {
  width: 100%;
  height: 56px;
  padding: 22px 14px 8px;
  font: 400 16px var(--font);
  color: var(--fog);
  background: rgba(10, 22, 34, .62);
  border: 1px solid var(--steel);
  border-radius: var(--r-field);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
.field input:hover { border-color: var(--steel-2); }
.field input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(69, 199, 181, .18); background: rgba(10, 22, 34, .85); }

.field label {
  position: absolute; left: 15px; top: 17px;
  color: var(--mist); font-size: 16px; pointer-events: none;
  transform-origin: left top;
  transition: transform .15s var(--ease), color .15s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.76); }
.field input:focus + label { color: var(--teal); }

.field.has-toggle input { padding-right: 52px; }
.field .toggle {
  position: absolute; right: 6px; top: 8px; width: 40px; height: 40px;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 8px; color: var(--mist); cursor: pointer;
}
.field .toggle:hover { color: var(--fog); background: rgba(142, 163, 185, .08); }
.field .toggle svg { width: 20px; height: 20px; }

.field .hint { font-size: 13px; color: var(--dim); margin: 6px 2px 0; }
.field .error, .check-error { font-size: 13px; color: var(--danger); margin: 6px 2px 0; }
.field.has-error input { border-color: var(--danger); }
.field.has-error input:focus { box-shadow: 0 0 0 3px rgba(255, 122, 122, .18); }

/* Password strength */
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 8px 2px 0; }
.strength i { height: 3px; border-radius: 2px; background: var(--steel); transition: background .2s; }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] i:nth-child(-n+2) { background: var(--amber); }
.strength[data-level="3"] i:nth-child(-n+3) { background: var(--teal); }
.strength[data-level="4"] i { background: var(--success); }
.strength-label { font-size: 12px; color: var(--mist); margin: 4px 2px 0; min-height: 18px; }

/* Checkboxes */
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mist); margin: 6px 0 2px; cursor: pointer; }
.check input {
  appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0;
  border: 1px solid var(--steel-2); border-radius: 6px; background: rgba(10, 22, 34, .6);
  display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s;
}
.check input:checked {
  background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%232B1A02' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  border-color: var(--amber);
}
.check a { color: var(--fog); }

/* Buttons */
.button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; width: 100%;
  font: 600 16px var(--font); letter-spacing: .01em;
  color: var(--amber-ink); background: var(--amber);
  border: 0; border-radius: var(--r-field);
  cursor: pointer; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 24px rgba(242, 169, 59, .18);
  transition: background .15s, box-shadow .2s, transform .1s;
}
.button:hover { background: var(--amber-hi); color: var(--amber-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 32px rgba(242, 169, 59, .32); }
.button:active { transform: translateY(1px); }
.button.ghost { color: var(--fog); background: rgba(22, 44, 71, .6); border: 1px solid var(--steel-2); box-shadow: none; }
.button.ghost:hover { background: rgba(53, 85, 122, .45); color: var(--fog); }
.button.inline { width: auto; }
.button[disabled] { cursor: progress; }
.button.is-loading { color: transparent; }
.button.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(43, 26, 2, .35); border-top-color: var(--amber-ink);
  animation: spin .7s linear infinite;
}
.button.ghost.is-loading::after { border-color: rgba(220, 229, 238, .3); border-top-color: var(--fog); }
@keyframes spin { to { transform: rotate(360deg); } }

.turnstile { margin: 16px 0 4px; min-height: 0; }
.form-actions { margin-top: 18px; }
.switch { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--mist); }

/* Inline notices */
.notice { border-radius: var(--r-field); padding: 11px 14px; font-size: 14px; margin-bottom: 18px; border: 1px solid; }
.notice.info { background: rgba(69, 199, 181, .08); border-color: rgba(69, 199, 181, .3); color: #BFEDE6; }
.notice.success { background: rgba(111, 211, 160, .08); border-color: rgba(111, 211, 160, .35); color: #C9F0DB; }
.notice.error { background: rgba(255, 122, 122, .08); border-color: rgba(255, 122, 122, .35); color: #FFD0D0; }

/* Toasts */
.toasts { position: fixed; top: 20px; right: 20px; z-index: 50; display: grid; gap: 10px; width: min(360px, calc(100vw - 40px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 16px; border-radius: 12px; font-size: 14px;
  background: rgba(17, 35, 58, .92); border: 1px solid var(--steel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4); backdrop-filter: blur(12px);
  animation: toast-in .25s var(--ease);
}
.toast::before { content: ""; flex: none; width: 3px; align-self: stretch; border-radius: 2px; background: var(--teal); }
.toast.error::before { background: var(--danger); }
.toast.success::before { background: var(--success); }
.toast.leaving { opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* Landing */
.landing { display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 26px 40px; position: relative; z-index: 2; }
.topbar nav { display: flex; gap: 10px; }
.topbar .button { height: 42px; font-size: 15px; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center; gap: 24px; padding: 0 40px;
}
.hero-copy { max-width: 640px; padding-bottom: 40px; }
.hero h1 { font: 700 clamp(46px, 5.5vw, 84px)/.96 var(--display); margin: 0 0 22px; letter-spacing: -.005em; }
.hero p { font-size: 19px; color: var(--mist); margin: 0 0 32px; max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-actions .button { width: auto; min-width: 180px; }
.hero-globe { position: relative; height: min(78vh, 760px); }
.hero-globe canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }

.footer { padding: 22px 40px; color: var(--dim); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Account */
.shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.shell-main { display: flex; justify-content: center; align-items: flex-start; padding: 24px 24px 64px; }
.shell .panel { max-width: 520px; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.avatar {
  width: 56px; height: 56px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  font: 700 26px var(--display); color: var(--amber-ink);
  background: linear-gradient(135deg, var(--amber), #D98A12);
}
.profile-head h1 { margin: 0; font-size: 30px; }
.profile-head p { margin: 2px 0 0; color: var(--mist); font-size: 14px; }

.facts { margin: 0 0 24px; border-top: 1px solid var(--steel); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--steel); font-size: 15px; }
.facts dt { color: var(--mist); }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--success); background: rgba(111, 211, 160, .1); }
.badge.warn { color: var(--amber); background: rgba(242, 169, 59, .1); }

.actions-row { display: grid; gap: 10px; }

/* Responsive */
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .theater { height: 300px; border-right: 0; border-bottom: 1px solid rgba(69, 199, 181, .10); }
  .theater .brand { top: 20px; left: 20px; }
  .theater .readouts { display: none; }
  .panel-wrap { padding: 0 16px 40px; margin-top: -48px; position: relative; }

  .topbar { padding: 18px 20px; }
  .hero { grid-template-columns: 1fr; padding: 0 20px; }
  .hero-globe { order: -1; height: 340px; margin: -20px -20px 0; }
  .hero-copy { padding-bottom: 24px; }
  .footer { padding: 20px; }
}

@media (max-width: 480px) {
  .panel { padding: 30px 20px 24px; }
  .landing .topbar nav .ghost { display: none; }
  .hero p { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.topbar nav > span { display: flex; gap: 10px; }

/* Links styled as small actions */
.field-link { margin: -4px 2px 4px; font-size: 14px; text-align: right; }
.link-button {
  background: none; border: 0; padding: 0; font: inherit; font-size: 14px;
  color: var(--teal); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.link-button:hover { color: var(--fog); }

.code-input { letter-spacing: .18em; font-variant-numeric: tabular-nums; }

/* Account settings */
.settings {
  display: grid; grid-template-columns: 200px minmax(0, 640px); gap: 40px;
  justify-content: center; padding: 16px 32px 80px;
}
.settings-nav { position: sticky; top: 24px; align-self: start; display: grid; gap: 2px; }
.settings-nav a {
  display: block; padding: 9px 14px; border-radius: 8px; border-left: 2px solid transparent;
  color: var(--mist); text-decoration: none; font-weight: 500; font-size: 15px;
}
.settings-nav a:hover { color: var(--fog); background: rgba(142, 163, 185, .06); }
.settings-nav a.active { color: var(--fog); border-left-color: var(--amber); background: rgba(242, 169, 59, .06); border-radius: 0 8px 8px 0; }
.settings-body { display: grid; gap: 24px; }
.settings-body .panel { max-width: none; scroll-margin-top: 24px; }

.section-title { font: 700 26px/1.1 var(--display); margin: 0 0 6px; letter-spacing: .005em; }
.subform { padding: 22px 0 6px; border-top: 1px solid var(--steel); margin-top: 18px; }
.section-title + .subform { border-top: 0; margin-top: 4px; padding-top: 10px; }
.subform h3 { font-size: 17px; font-weight: 600; margin: 0 0 2px; }
.subtle { color: var(--mist); font-size: 14px; margin: 0 0 16px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.button.small { height: 36px; padding: 0 14px; font-size: 14px; }
.button.danger { color: var(--danger); border-color: rgba(255, 122, 122, .4); }
.button.danger:hover { background: rgba(255, 122, 122, .1); color: var(--danger); }
.button.danger-solid { background: var(--danger); color: #3A0808; box-shadow: none; }
.button.danger-solid:hover { background: #FF9595; color: #3A0808; box-shadow: none; }

.twofa-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.step { margin-top: 6px; padding: 18px; border-radius: 12px; background: rgba(10, 22, 34, .45); border: 1px solid var(--steel); }
.step-label { font-size: 13px; color: var(--teal); font-weight: 600; margin: 0 0 14px; }
.qr-row { display: grid; grid-template-columns: 168px 1fr; gap: 20px; align-items: center; margin-bottom: 18px; }
.qr { width: 168px; height: 168px; padding: 8px; background: #FFFFFF; border-radius: 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret {
  font: 600 17px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--fog); letter-spacing: .06em; margin: 0 0 8px; word-spacing: .2em;
}
.codes {
  list-style: none; margin: 0 0 18px; padding: 16px; border-radius: 10px;
  background: rgba(10, 22, 34, .7); border: 1px dashed var(--steel-2);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px;
  font: 600 16px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--fog); letter-spacing: .04em;
}

.devices { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--steel); }
.devices li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--steel); }
.devices strong { display: block; font-weight: 600; }
.devices span:not(.badge) { display: block; color: var(--mist); font-size: 13px; }

@media (max-width: 960px) {
  .settings { grid-template-columns: 1fr; padding: 8px 16px 64px; gap: 16px; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .settings-nav a { border-left: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; white-space: nowrap; }
  .settings-nav a.active { border-bottom-color: var(--amber); border-radius: 8px 8px 0 0; }
  .qr-row { grid-template-columns: 1fr; justify-items: start; }
  .codes { grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 15px; }
}

/* Game map */
body.game { overflow: hidden; background: #0B1826; overscroll-behavior: none; }
.map-stage { position: fixed; inset: 0; }
.map-stage canvas { position: absolute; inset: 0; display: block; }
.map-overlay { cursor: grab; touch-action: none; }
.map-overlay.dragging { cursor: grabbing; }

.hud { position: fixed; z-index: 5; display: flex; gap: 10px; align-items: center; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top-left { top: 16px; left: 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
.hud-top-right { top: 18px; right: 16px; }
.hud-bottom-left { bottom: 18px; left: 16px; }
.hud-bottom-right { bottom: 18px; right: 16px; }
.hud .brand { padding: 6px 12px 6px 8px; border-radius: 12px; background: rgba(10, 22, 34, .72); border: 1px solid rgba(69, 199, 181, .14); backdrop-filter: blur(10px); }
.hud .brand span { font-size: 21px; }

.map-search { position: relative; width: 300px; }
.map-search input {
  width: 100%; height: 44px; padding: 0 14px; font: 400 15px var(--font); color: var(--fog);
  background: rgba(10, 22, 34, .82); border: 1px solid var(--steel); border-radius: 12px; backdrop-filter: blur(10px);
}
.map-search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(69, 199, 181, .18); }
.search-results {
  list-style: none; margin: 6px 0 0; padding: 6px; position: absolute; left: 0; right: 0;
  background: rgba(17, 35, 58, .96); border: 1px solid var(--steel); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45); backdrop-filter: blur(12px);
}
.search-results li { padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.search-results li strong { display: block; font-weight: 600; font-size: 15px; }
.search-results li span { display: block; font-size: 13px; color: var(--mist); }
.search-results li:hover, .search-results li.active { background: rgba(69, 199, 181, .1); }

.info-panel {
  position: fixed; z-index: 6; top: 76px; right: 16px; width: 320px; padding: 22px 22px 18px;
  border-radius: 16px; background: linear-gradient(180deg, rgba(22, 44, 71, .9), rgba(17, 35, 58, .88));
  border: 1px solid rgba(69, 199, 181, .16); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); backdrop-filter: blur(14px);
  animation: panel-in .22s var(--ease);
}
@keyframes panel-in { from { opacity: 0; transform: translateX(10px); } }
.info-panel h2 { font: 700 30px/1.05 var(--display); margin: 2px 32px 12px 0; letter-spacing: .005em; overflow-wrap: anywhere; }
.info-kind { margin: 0; font-size: 13px; color: var(--teal); font-weight: 600; }
.info-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--mist); cursor: pointer; }
.info-close:hover { color: var(--fog); background: rgba(142, 163, 185, .1); }
.info-close svg { width: 18px; height: 18px; }
.info-country {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; margin-bottom: 16px;
  font: 600 15px var(--font); color: var(--fog); background: rgba(10, 22, 34, .5); border: 1px solid var(--steel); border-radius: 10px; cursor: pointer;
}
.info-country:hover { border-color: var(--steel-2); background: rgba(10, 22, 34, .75); }
.swatch { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.info-panel { max-height: calc(100vh - 92px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--steel) transparent; }
.info-panel .facts { margin-bottom: 14px; }
.info-panel .facts div { padding: 10px 0; font-size: 14px; }
.gov-badge { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 7px 12px 7px 8px; font-weight: 600; font-size: 14px; border-radius: 10px; background: rgba(10, 22, 34, .5); border: 1px solid var(--steel); }
.shares { display: grid; gap: 14px; margin-bottom: 14px; }
.shares:empty { display: none; }
.shares h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mist); }
.share { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 5px 8px; font-size: 14px; border-radius: 6px; overflow: hidden; }
.share span { position: relative; z-index: 1; }
.share span:last-of-type { color: var(--mist); font-variant-numeric: tabular-nums; }
.share i { position: absolute; inset: 0 auto 0 0; background: rgba(69, 199, 181, .14); border-radius: 6px; }
.info-note { margin: 0; font-size: 13px; }

.hover-chip { padding: 7px 12px; border-radius: 10px; font-size: 14px; background: rgba(10, 22, 34, .8); border: 1px solid var(--steel); backdrop-filter: blur(10px); }

.map-controls { flex-direction: column; gap: 6px; }

.hud-bottom-left { bottom: 74px; }
.hud-top-right .badge { background: rgba(10, 22, 34, .82); border: 1px solid rgba(242, 169, 59, .25); padding: 4px 12px; }
.map-views { position: fixed; z-index: 5; left: 16px; bottom: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.segmented { display: flex; padding: 4px; gap: 2px; border-radius: 12px; background: rgba(10, 22, 34, .82); border: 1px solid var(--steel); backdrop-filter: blur(10px); }
.segmented button { height: 34px; padding: 0 12px; border: 0; border-radius: 8px; font: 500 14px var(--font); color: var(--mist); background: none; cursor: pointer; white-space: nowrap; }
.segmented button:hover { color: var(--fog); }
.segmented button[aria-pressed="true"] { color: var(--abyss); background: var(--teal); font-weight: 600; }
.legend { display: grid; gap: 5px; padding: 10px 12px; font-size: 13px; border-radius: 12px; background: rgba(10, 22, 34, .82); border: 1px solid var(--steel); backdrop-filter: blur(10px); }
.legend strong { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mist); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.hud-bottom-left:has(+ .map-views .legend:not(.hidden)) { display: none; }
.map-button {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; cursor: pointer;
  color: var(--fog); background: rgba(10, 22, 34, .8); border: 1px solid var(--steel); backdrop-filter: blur(10px);
}
.map-button:hover { border-color: var(--teal); }
.map-button svg { width: 20px; height: 20px; }

.map-loading {
  position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--abyss); color: var(--mist); transition: opacity .4s;
}
.map-loading img { animation: pulse 1.6s ease-in-out infinite; }
.map-loading.done { opacity: 0; pointer-events: none; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.94); } }

@media (max-width: 720px) {
  .hud-top-left { right: 16px; }
  .map-search { width: 100%; }
  .hud-top-right .badge { display: none; }
  .info-panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; border-radius: 18px 18px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(20px); opacity: 0; } }
  .hud-bottom-left { display: none; }
  .hud-bottom-right { bottom: 18px; }
  .info-panel:not(.hidden) ~ .hud-bottom-right { display: none; }
  .info-panel { max-height: 62vh; }
  .map-views { left: 12px; right: 70px; bottom: 18px; }
  .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented button { padding: 0 7px; font-size: 12.5px; }
  .legend { font-size: 12px; padding: 8px 10px; }
  .info-panel:not(.hidden) ~ .map-views { display: none; }
}
