/* Bukangi Flow — système visuel
   Carte seule à gauche (aucun élément de page posé dessus), colonne de
   capitainerie à droite. Pochoir de conteneur pour les titres et chiffres,
   marqueur pour le surnom coréen, Overpass pour le texte, Martian Mono pour
   la radio. */

:root {
  --abyss: #041c25;
  --sea-1: #0a3442;
  --sea-2: #0f4a5c;
  --glass: rgba(5, 30, 40, .74);
  --glass-hi: rgba(10, 48, 62, .82);
  --edge: rgba(180, 230, 240, .14);
  --edge-hi: rgba(180, 230, 240, .26);
  --text: #eef7f8;
  --muted: #93b6be;
  --dim: #7fa3ad;
  --buy: #ff8a2a;
  --buy-soft: rgba(255, 138, 42, .16);
  --sell: #ff4f86;
  --sell-soft: rgba(255, 79, 134, .16);
  --net: #f2c230;
  --ok: #35e08f;
  --ink: #0e2431;
  --focus: #7cd4ff;

  --f-display: "Big Shoulders Stencil Display", "Arial Narrow", sans-serif;
  --f-hangul: "East Sea Dokdo", "Jua", sans-serif;
  --f-body: "Overpass", system-ui, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, monospace;

  --col: 372px;
  --gap: 12px;
  --r-panel: 20px;
  --r-inner: 12px;
  --tape: 0px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
body.test { --tape: 28px; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { background: var(--abyss); color-scheme: dark; }
body {
  color: var(--text);
  font: 500 15px/1.45 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  background: var(--abyss);
}
::selection { background: var(--buy); color: #1a0d00; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---- scène : trois calques + nuit ----------------------------------------- */
.stage { position: fixed; inset: 0; overflow: hidden; background: #86a872; touch-action: manipulation; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#world { z-index: 0; }
#water { z-index: 1; }
.night { position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: multiply; background: #1b2d52; opacity: 0; transition: opacity 2s linear; }
#scene { z-index: 3; cursor: default; }
#scene.hover { cursor: pointer; }
.vignette { position: absolute; inset: 0; z-index: 4; pointer-events: none; box-shadow: inset 0 0 160px rgba(2, 18, 26, .45); }
.vignette::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 0 rgba(255, 79, 134, 0); transition: box-shadow .8s; }
body.exhausted .vignette::after { box-shadow: inset 0 0 120px 10px rgba(255, 79, 134, .22); }

/* ---- ruban de chantier (mode test) ---------------------------------------- */
.tape {
  position: fixed; left: 0; right: 0; top: 0; z-index: 30; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(-45deg, var(--net) 0 14px, #1b1b1b 14px 28px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .3);
  animation: tape 1.6s linear infinite;
  background-size: 39.6px 39.6px;
}
@keyframes tape { to { background-position: 39.6px 0; } }
.tape .short { display: none; }
@media (max-width: 760px) { .tape .full { display: none; } .tape .short { display: inline; } }
.tape > span {
  background: var(--net); color: #221a00; font: 700 12px/1 var(--f-body);
  padding: 5px 12px 4px; border-radius: 3px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: calc(100% - 32px); box-shadow: 0 0 0 2px #1b1b1b;
}

/* ---- colonne de capitainerie ------------------------------------------------ */
.col {
  position: fixed; z-index: 10; right: 0; top: var(--tape); bottom: 0; width: var(--col);
  padding: 16px 16px 16px 0;
  display: flex; flex-direction: column; gap: var(--gap);
}
/* voile de mer derrière la colonne quand la caméra zoome (visite) */
.col::before {
  content: ""; position: absolute; inset: calc(-1 * var(--tape)) 0 0 -16px; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 44, 58, 0), rgba(6, 44, 58, .92) 28px);
  opacity: 0; transition: opacity .9s var(--ease-out);
}
body.touring .col::before { opacity: 1; }
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: var(--r-panel);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  box-shadow: 0 18px 40px -12px rgba(1, 14, 20, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.glass::before { /* reflet de surface en haut du verre */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 40%);
}
.card { padding: 16px 18px; }
.card > h2, .part > h2, .label {
  margin: 0 0 8px; font: 700 11px/1 var(--f-body); letter-spacing: .08em; text-transform: none;
  color: var(--muted); display: flex; align-items: center; gap: 8px;
}

/* panneau unique : requin | burn | radio, séparés par un filet */
.panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.part + .part { border-top: 1px solid var(--edge); margin-top: 16px; padding-top: 14px; }
.panel .radio { flex: 1 1 auto; min-height: 90px; }

/* marque */
.brand { display: grid; grid-template-columns: 1fr auto; align-items: start; padding: 2px 2px 0 6px; }
.brand h1 { margin: 0; line-height: 1; }
.brand .ko {
  display: block; font: 400 76px/.78 var(--f-hangul); color: #fff;
  text-shadow: 0 3px 0 rgba(1, 14, 20, .35); letter-spacing: -.01em; margin-left: -2px;
}
.brand .en {
  display: block; margin-top: 6px; font: 900 30px/1 var(--f-display); letter-spacing: .06em; color: var(--text);
}
.brand p { grid-column: 1 / -1; margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; max-width: 34ch; }
.tools { display: flex; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--edge); color: var(--muted);
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease-out);
}
.icon-btn:hover { background: rgba(255, 255, 255, .12); color: var(--text); border-color: var(--edge-hi); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn[aria-pressed="true"] { color: var(--buy); border-color: rgba(255, 138, 42, .45); background: var(--buy-soft); }

/* statut */
.status .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.shark-name { font: 900 26px/1 var(--f-display); letter-spacing: .04em; }
/* connexion : rien quand tout va bien, « Reconnecting » en rouge sinon */
.live { display: inline-flex; align-items: center; gap: 7px; font: 700 12px/1 var(--f-body); color: #ff9d9d; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #ff6b6b; }
.live[data-ok="1"] { display: none; }
/* le vrai requin : étiquette BUSAN + icône d'état */
.real { display: flex; align-items: center; gap: 8px; margin-top: 10px; font: 600 12.5px/1.3 var(--f-body); color: var(--muted); }
.real-tag { flex: none; font: 800 9.5px/1 var(--f-body); letter-spacing: .12em; color: var(--text); padding: 4px 6px 3px; border-radius: 5px; border: 1px solid var(--edge-hi); background: rgba(255, 255, 255, .05); }
.ri { flex: none; width: 16px; height: 16px; display: none; }
.real[data-s="scheduled"] .ri-scheduled { display: block; color: var(--net); }
.real[data-s="underway"] .ri-underway { display: block; color: var(--buy); animation: bob 1.8s ease-in-out infinite; }
.real[data-s="released"] .ri-released { display: block; color: var(--ok); }
.real[data-s="failed"] .ri-failed { display: block; color: var(--sell); }
@keyframes bob { 50% { transform: translateY(-1.5px) rotate(-4deg); } }
.dist { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.dist b { font: 900 80px/.82 var(--f-display); letter-spacing: .01em; }
.dist small { font: 600 13px/1.2 var(--f-body); color: var(--muted); }
.route { position: relative; height: 10px; margin: 14px 0 0; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.route b { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, #3aa6bd, #c9f1f7); }
.route b::after { /* reflet qui glisse */
  content: ""; position: absolute; top: 0; bottom: 0; width: 40px; right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7)); border-radius: 99px;
}
.route-legend { display: flex; justify-content: space-between; margin-top: 6px; font: 600 11px/1 var(--f-body); color: var(--dim); }

.tug { margin-top: 16px; }
.tug-bar { position: relative; height: 30px; border-radius: 10px; overflow: hidden; display: flex; background: rgba(255, 255, 255, .06); }
.tug-bar .s, .tug-bar .b { flex: 1 1 0; min-width: 0; transition: background .4s; }
.tug-bar .s { background: linear-gradient(90deg, #d93570, var(--sell)); }
.tug-bar .b { background: linear-gradient(90deg, var(--buy), #ffae5c); }
.tug-bar.idle .s, .tug-bar.idle .b { background: rgba(255, 255, 255, .1); }
.tug-bar em { position: absolute; left: 50%; top: 4px; bottom: 4px; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, .9); border-radius: 2px; }
.tug-bar .lbl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 11px; font: 800 12px/1 var(--f-body); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); pointer-events: none; }
.tug-bar .lbl span { display: inline-flex; gap: 6px; align-items: baseline; }
.tug-bar .lbl b { font: 600 11px/1 var(--f-mono); opacity: .9; }
.tug p { margin: 8px 0 0; font: 700 13px/1.35 var(--f-body); min-height: 1.35em; }
.tug p[data-d="sea"] { color: #ffc08a; }
.tug p[data-d="back"] { color: #ff9dbd; }
.tug p[data-d="none"] { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 10px 5px; border-radius: 999px;
  font: 600 12px/1 var(--f-body); color: var(--muted); background: rgba(255, 255, 255, .06);
  border: 1px solid transparent; transition: background .3s, border-color .3s;
}
.chip b { color: var(--text); font-weight: 800; }
.chip.alert { background: var(--sell-soft); border-color: rgba(255, 79, 134, .35); }
.chip.alert b { color: #ffc2d6; }
.chip.warn { background: rgba(242, 194, 48, .14); border-color: rgba(242, 194, 48, .35); }
.chip.warn b { color: #ffe08a; }

/* burn */
.pot { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; }
.pot .amount { display: flex; align-items: center; flex-wrap: wrap; }
.pot .amount b { font: 900 52px/.85 var(--f-display); letter-spacing: .01em; }
.pot .amount span { font: 800 18px/1 var(--f-display); letter-spacing: .06em; color: var(--muted); }
.tag { display: inline-flex; align-items: center; font: 800 10px/1 var(--f-body); letter-spacing: .06em; padding: 4px 7px 3px; border-radius: 999px; background: var(--net); color: #221a00; }
.pot p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.history { display: flex; gap: 6px; margin-top: 12px; overflow: hidden; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.history:empty { display: none; }
.history > span { flex: none; font: 600 11.5px/1 var(--f-body); color: var(--muted); padding: 6px 9px 5px; border-radius: 8px; background: rgba(255, 255, 255, .05); border: 1px solid var(--edge); white-space: nowrap; }
.history > span b { color: var(--text); font-weight: 800; }

/* radio */
.radio { flex: 1 1 auto; min-height: 120px; display: flex; flex-direction: column; overflow: hidden; }
.radio .label em { margin-left: auto; font: 600 11px/1 var(--f-mono); letter-spacing: 0; color: var(--dim); font-style: normal; }
.log { list-style: none; margin: 0 -8px; padding: 0; flex: 1; overflow: hidden; mask-image: linear-gradient(#000 70%, transparent); -webkit-mask-image: linear-gradient(#000 70%, transparent); }
.log:empty { flex: 0; }
.log li { display: grid; grid-template-columns: 4px 1fr auto; gap: 10px; align-items: center; padding: 8px 8px; border-radius: 10px; }
.log li + li { margin-top: 2px; }
.log li i { width: 4px; height: 30px; border-radius: 4px; background: var(--buy); }
.log li[data-k="sell"] i { background: var(--sell); }
.log li.small { opacity: .42; }
.log li.big { background: var(--buy-soft); }
.log li[data-k="sell"].big { background: var(--sell-soft); }
.log li .who { min-width: 0; font: 500 11px/1.35 var(--f-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log li .who strong { color: var(--text); font-weight: 600; margin-right: 6px; }
.log li .who em { display: block; font: 600 12px/1.3 var(--f-body); font-style: normal; color: var(--dim); }
.log li .amt { font: 500 12px/1 var(--f-mono); color: var(--text); text-align: right; }
.log li .amt small { display: block; margin-top: 4px; font: 500 10.5px/1 var(--f-mono); color: var(--dim); }
.empty { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* token : ticker + liens, chiffres (retour à la ligne permis), adresse copiable */
.token { padding: 14px 16px; border-radius: 16px; flex: none; display: grid; gap: 10px; }
.tk-top { display: flex; align-items: center; gap: 10px; }
.token strong { font: 900 26px/1 var(--f-display); letter-spacing: .04em; margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.token .acts { display: flex; gap: 6px; flex: none; }
.tk-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.token .stat { font: 600 12.5px/1.2 var(--f-body); color: var(--muted); }
.token .stat b { color: var(--text); font-weight: 800; }
/* avant le lancement : ticker et CA seulement (pas encore de market cap) */
body.standby .token .tk-stats { display: none; }
.ca {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--edge); border-radius: 10px; padding: 9px 10px 8px 12px; color: var(--text);
  transition: background .2s, border-color .2s;
}
.ca:hover { background: rgba(255, 255, 255, .11); border-color: var(--edge-hi); }
.ca-lbl { font: 800 10.5px/1 var(--f-body); letter-spacing: .08em; color: var(--dim); flex: none; }
.ca code { flex: 1; min-width: 0; font: 500 12px/1.2 var(--f-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.ca-done { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: rgba(20, 70, 50, .96); color: var(--ok); font: 800 12.5px/1 var(--f-body); opacity: 0; pointer-events: none; transition: opacity .2s; }
.ca.done .ca-done { opacity: 1; }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn.sm svg { width: 16px; height: 16px; }

/* logo SOL à la place du mot */
.solv { white-space: nowrap; }
.sol { display: inline-block; width: .9em; height: .7em; margin-right: .22em; vertical-align: -0.02em; flex: none; }
.pot .amount .sol { width: 30px; height: 24px; margin-right: 8px; align-self: center; }
.banner .burn .sol { width: 32px; height: 25px; align-self: center; margin-right: 2px; }
.log li .amt .sol { width: 13px; height: 10px; margin-right: 5px; }
/* poisson qui grille (illustration animée du panneau burn) */
.grill { width: 56px; height: 56px; overflow: visible; }
.grill .smoke path { opacity: 0; animation: smoke 3.2s ease-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.grill .smoke .s2 { animation-delay: 1.05s; }
.grill .smoke .s3 { animation-delay: 2.1s; }
@keyframes smoke { 0% { opacity: 0; transform: translateY(4px) scaleX(.8); } 25% { opacity: .75; } 100% { opacity: 0; transform: translateY(-9px) scaleX(1.25); } }
.grill .flames path { transform-box: fill-box; transform-origin: 50% 100%; animation: flame 1.1s ease-in-out infinite alternate; }
.grill .flames .f2 { animation-duration: .9s; animation-delay: .2s; }
.grill .flames .f3 { animation-duration: 1.25s; animation-delay: .35s; }
@keyframes flame { 0% { transform: scale(.92, .85) skewX(-3deg); } 100% { transform: scale(1.04, 1.08) skewX(3deg); } }
.grill .fish { animation: sizzle 2.4s ease-in-out infinite; }
@keyframes sizzle { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(0); } 50% { transform: translateY(-.7px); } 55% { transform: translateY(0); } 60% { transform: translateY(-.5px); } 65% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .grill *, .grill .smoke path { animation: none !important; } .grill .smoke path { opacity: .5; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  font: 800 12.5px/1 var(--f-body); text-decoration: none; border: 1px solid transparent;
  background: var(--text); color: var(--ink); border-radius: 10px; padding: 10px 13px 9px;
  transition: background .2s, transform .2s var(--ease-out), border-color .2s;
}
.btn:hover { background: #fff; }
.btn:active { transform: scale(.96); }
.btn.ghost { background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--edge); }
.btn.ghost:hover { background: rgba(255, 255, 255, .12); border-color: var(--edge-hi); }

/* ---- couches au-dessus de la carte ------------------------------------------ */
.map-ui { position: fixed; z-index: 12; left: 0; top: var(--tape); bottom: 0; right: var(--col); pointer-events: none; }

.banner {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  text-align: center; padding: 26px 40px 24px; visibility: hidden; width: max-content; max-width: min(620px, calc(100% - 40px));
}
.banner .kicker { font: 700 12px/1 var(--f-body); letter-spacing: .1em; color: var(--muted); }
.banner h3 { margin: 10px 0 8px; font: 900 72px/.9 var(--f-display); letter-spacing: .02em; }
.banner p { margin: 0; color: var(--muted); font: 600 14px/1.4 var(--f-body); }
.banner .burn { margin-top: 16px; display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 16px 8px; border-radius: 14px; background: var(--buy-soft); border: 1px solid rgba(255, 138, 42, .4); }
.banner .burn b { font: 900 44px/1 var(--f-display); color: var(--buy); letter-spacing: .02em; }
.banner .burn span { font: 700 13px/1 var(--f-body); color: #ffc08a; }

.tip {
  position: absolute; left: 0; top: 0; z-index: 2; padding: 10px 12px 9px; border-radius: 12px; min-width: 150px;
  font: 600 12.5px/1.35 var(--f-body); color: var(--text); pointer-events: none; opacity: 0;
  transition: opacity .15s;
}
.tip.on { opacity: 1; }
.tip b { display: block; font: 900 20px/1 var(--f-display); letter-spacing: .03em; margin-bottom: 4px; }
.tip code { font: 500 11px/1 var(--f-mono); color: var(--muted); }
.tip .k-buy { color: #ffc08a; }
.tip .k-sell { color: #ff9dbd; }

/* visite guidée */
.caption {
  position: absolute; left: 24px; bottom: 24px; width: min(440px, calc(100% - 48px)); padding: 20px 22px 16px;
  pointer-events: auto; visibility: hidden;
}
.caption .step { font: 600 11px/1 var(--f-mono); color: var(--dim); }
.caption h4 { margin: 10px 0 8px; font: 900 34px/.95 var(--f-display); letter-spacing: .02em; }
.caption p { margin: 0; color: var(--muted); font: 500 14.5px/1.5 var(--f-body); }
.caption p b { color: var(--text); }
.caption p .b { color: #ffc08a; }
.caption p .s { color: #ff9dbd; }
.caption .nav { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.caption .dots { display: flex; gap: 5px; margin-right: auto; }
.caption .dots i { width: 6px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .2); transition: width .3s var(--ease-out), background .3s; }
.caption .dots i.on { width: 18px; background: var(--text); }

/* ---- contrôles de carte mobile (masqués sur bureau) ------------------------- */
.mapctl, .mhud, .hint { display: none; }

/* ---- chargement : logo au centre, ondes de sonar derrière ---------------- */
.loader {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 45%, #0d4254 0%, var(--abyss) 70%);
}
.loader-in { position: relative; display: grid; justify-items: center; }
.loader .sonar { position: absolute; left: 50%; top: 110px; width: 220px; height: 220px; margin-left: -110px; margin-top: -110px; pointer-events: none; }
.loader .sonar i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(120, 220, 245, .55); animation: sonar 2.6s var(--ease-out) infinite; opacity: 0; }
.loader .sonar i:nth-child(2) { animation-delay: .87s; }
.loader .sonar i:nth-child(3) { animation-delay: 1.73s; }
@keyframes sonar { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.42); opacity: 0; } }
.loader-logo img { display: block; width: 220px; height: 220px; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .45)); animation: logoIn .7s var(--ease-out) both, logoFloat 3.2s ease-in-out .7s infinite; }
@keyframes logoIn { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@keyframes logoFloat { 50% { transform: translateY(-5px); } }
.loader .txt { margin-top: 62px; text-align: center; }
.loader .txt span { display: block; font: 500 12px/1 var(--f-mono); color: var(--muted); min-height: 1em; }
@media (max-width: 420px) {
  .loader .sonar { top: 85px; width: 170px; height: 170px; margin-left: -85px; margin-top: -85px; }
  .loader-logo img { width: 170px; height: 170px; }
}

/* ---- mouvements réduits ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .tape, .live i, .ri, .loader .sonar i, .loader-logo img { animation: none !important; }
  .night, .chip, .vignette::after { transition: none; }
}

/* ---- hauteurs courtes : colonne compacte --------------------------------------- */
@media (max-height: 1000px) and (min-width: 901px) {
  :root { --gap: 10px; }
  .card { padding: 14px 16px; }
  .brand .ko { font-size: 60px; }
  .brand .en { font-size: 24px; }
  .brand p { display: none; }
  .dist b { font-size: 68px; }
  .pot .amount b { font-size: 42px; }
  .grill { width: 48px; height: 48px; }
  .pot { grid-template-columns: 48px 1fr; }
  .tug { margin-top: 12px; }
  .radio { min-height: 120px; }
}
@media (max-height: 780px) and (min-width: 901px) {
  .brand .ko { font-size: 50px; }
  .brand .en { font-size: 20px; margin-top: 4px; }
  .real { display: none; }
  .route-legend { display: none; }
  .history { display: none; }
  .pot p { display: none; }
  .links { display: none; }
  .dist b { font-size: 56px; }
  .radio { min-height: 96px; }
}
@media (max-width: 1180px) and (min-width: 901px) { :root { --col: 336px; } .dist b { font-size: 68px; } }

/* ---- mobile : page qui défile ----------------------------------------------------
   La colonne se dissout (display: contents) : marque, carte, puis panneaux.
   La carte est grande, zoomée sur le requin, et se manipule au doigt. */
@media (max-width: 900px) {
  body { overflow: auto; height: auto; display: flex; flex-direction: column; }
  .tape { position: sticky; order: 0; }
  .col { display: contents; }
  .brand { order: 1; padding: 14px 16px 12px; }
  .brand .ko { font-size: 48px; }
  .brand .en { font-size: 22px; margin-top: 4px; }
  .brand p { display: block; font-size: 13px; margin-top: 6px; }
  /* la carte laisse toujours ~40 % d'écran pour faire défiler la page */
  .mapwrap { order: 3; position: relative; height: clamp(330px, 60svh, 640px); margin: 0 0 12px; }
  .stage { position: absolute; inset: 0; }
  #scene { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .map-ui { position: absolute; inset: 0; right: 0; }
  .col > .token { order: 2; margin: 0 12px 12px; }
  .col > .card { order: 4; margin: 0 12px 20px; }
  .radio { min-height: 0; }
  .log { max-height: 340px; }
  .banner { padding: 16px 20px 14px; top: 42%; }
  .banner h3 { font-size: 40px; }
  .banner .burn b { font-size: 28px; }
  .caption { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 14px 16px 12px; z-index: 3; }
  .caption h4 { font-size: 24px; margin: 6px 0 6px; }
  .caption p { font-size: 13px; }
  .dist b { font-size: 72px; }

  .mapctl { display: flex; flex-direction: column; gap: 8px; position: absolute; top: 10px; right: 10px; pointer-events: auto; z-index: 2; }
  .mapctl .icon-btn { width: 42px; height: 42px; border-radius: 13px; color: var(--text); background: var(--glass); }
  .mapctl .icon-btn[aria-pressed="true"] { color: #1a0d00; background: var(--buy); border-color: transparent; }
  .mhud {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
    position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 8px 12px 8px 14px; border-radius: 14px; pointer-events: none; z-index: 2;
    transition: opacity .3s;
  }
  body.touring .mhud { opacity: 0; }
  .m-dist { display: flex; align-items: baseline; gap: 5px; }
  .m-dist b { font: 900 30px/.9 var(--f-display); letter-spacing: .01em; }
  .m-dist span, .m-burn span { font: 700 11px/1.1 var(--f-body); color: var(--muted); }
  .m-tug { position: relative; height: 10px; border-radius: 99px; overflow: hidden; display: flex; background: rgba(255, 255, 255, .1); min-width: 40px; }
  .m-tug i { flex: 1 1 0; min-width: 0; }
  .m-tug .s { background: var(--sell); }
  .m-tug .b { background: var(--buy); }
  .m-tug.idle i { background: rgba(255, 255, 255, .14); }
  .m-tug em { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; }
  .m-burn { display: flex; align-items: baseline; gap: 4px; }
  .m-burn .sol { width: 15px; height: 12px; align-self: center; margin-right: 1px; }
  .m-burn b { font: 900 24px/.9 var(--f-display); color: #ffc08a; }
  .hint {
    display: block; position: absolute; left: 50%; top: 12px; transform: translateX(-50%); pointer-events: none; z-index: 2;
    background: rgba(5, 30, 40, .82); color: var(--text); font: 700 11.5px/1 var(--f-body); padding: 8px 12px 7px; border-radius: 999px;
    white-space: nowrap; max-width: calc(100% - 120px); overflow: hidden; text-overflow: ellipsis; transition: opacity .6s;
  }
  .hint.gone { opacity: 0; }
}
/* téléphone à l'horizontale : la carte prend presque tout l'écran */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  /* marque sur une ligne, la carte prend tout le reste de l'écran */
  .brand { grid-template-columns: auto 1fr auto; align-items: center; padding: 8px 14px; }
  .brand h1 { display: flex; align-items: baseline; gap: 12px; }
  .brand .ko { font-size: 34px; }
  .brand .en { font-size: 18px; margin: 0; }
  .brand p { display: none; }
  .brand .tools { grid-column: 3; }
  .brand .icon-btn { width: 34px; height: 34px; }
  .mapwrap { height: calc(100svh - 28px - 54px); min-height: 240px; }
}

/* ---- grands écrans : colonne et typographie plus généreuses ---------------- */
@media (min-width: 1800px) and (min-height: 1200px) {
  :root { --col: 460px; --gap: 14px; }
  body { font-size: 16px; }
  .card { padding: 20px 22px; }
  .card > h2, .part > h2, .label { font-size: 12.5px; }
  .brand .ko { font-size: 92px; }
  .brand .en { font-size: 36px; }
  .brand p { font-size: 15px; }
  .shark-name { font-size: 32px; }
  .real, .tug p { font-size: 14.5px; }
  .dist b { font-size: 110px; }
  .dist small { font-size: 15px; }
  .tug-bar { height: 36px; }
  .tug-bar .lbl { font-size: 13.5px; }
  .chip { font-size: 13.5px; padding: 7px 12px 6px; }
  .pot { grid-template-columns: 64px 1fr; }
  .grill { width: 64px; height: 64px; }
  .pot .amount .sol { width: 38px; height: 30px; }
  .pot .amount b { font-size: 68px; }
  .pot .amount span { font-size: 22px; }
  .pot p { font-size: 14px; }
  .log li .who { font-size: 12.5px; }
  .log li .who em { font-size: 13.5px; }
  .log li .amt { font-size: 14px; }
  .token strong { font-size: 30px; }
  .token .stat { font-size: 13.5px; }
  .icon-btn { width: 44px; height: 44px; }
  .icon-btn.sm { width: 40px; height: 40px; }
  .caption { width: 520px; padding: 24px 26px 20px; }
  .caption h4 { font-size: 42px; }
  .caption p { font-size: 16.5px; }
  .banner h3 { font-size: 96px; }
  .banner .burn b { font-size: 56px; }
}
