:root {
  --night: #05070f;
  --deep: #0b1b3f;
  --blue: #2f6bff;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.5);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.14);
  --up: #3ee08f;
  --down: #ff5f6d;
  --pad-x: 88px;
  --tile: 108px;
  --tile-big: 150px;
  --gap: 14px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  min-height: 100vh;
  background: var(--night);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  overflow-x: hidden; overflow-x: clip; /* clip: nothing can push the page sideways */
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
body:not([data-screen="home"]) { overflow: hidden; height: 100vh; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus { outline: none; }
input, textarea { font: inherit; color: inherit; user-select: text; }

/* ---------- background ---------- */
#particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.art { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.art-layer { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 700ms var(--ease); }
.art-layer.is-on { opacity: 1; }
.kv-blur {
  position: absolute; inset: -80px; background: center / cover no-repeat;
  filter: blur(70px) saturate(1.5) brightness(0.75); transform: scale(1.15);
  transition: transform 1600ms var(--ease-out);
}
.art-layer.is-on .kv-blur { transform: scale(1.05); }
.kv-img {
  position: absolute; right: 8vw; top: 52%; width: min(50vh, 34vw); aspect-ratio: 1;
  border-radius: 36px; background: center / cover no-repeat #141b2e;
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: translateY(-46%) scale(0.95); transition: transform 1200ms var(--ease-out);
}
.art-layer.is-on .kv-img { transform: translateY(-50%) scale(1); }
.art-shade {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 5, 12, 0.92) 0%, rgba(3, 5, 12, 0.62) 38%, rgba(3, 5, 12, 0.12) 70%, rgba(3, 5, 12, 0.25) 100%),
    linear-gradient(0deg, rgba(3, 5, 12, 0.95) 0%, rgba(3, 5, 12, 0.2) 45%, rgba(3, 5, 12, 0.35) 100%);
  transition: background-color 500ms var(--ease);
}
body[data-screen="start"] .art, body[data-screen="users"] .art { opacity: 0; }
body.is-deep .art-shade { background-color: rgba(3, 5, 12, 0.55); }

/* ---------- screens ---------- */
.screen { position: relative; z-index: 3; }
.start, .users {
  position: fixed; inset: 0; display: grid; place-items: center;
  transition: opacity 600ms var(--ease), transform 900ms var(--ease-out);
}
body:not([data-screen="start"]) .start { opacity: 0; pointer-events: none; transform: scale(1.06); }
body:not([data-screen="users"]) .users { opacity: 0; pointer-events: none; transform: scale(0.96); }
body:not([data-screen="home"]) .home { opacity: 0; pointer-events: none; visibility: hidden; }

.start { background: radial-gradient(120% 80% at 50% 120%, rgba(47, 107, 255, 0.28), transparent 60%); cursor: pointer; }
.start-inner { text-align: center; }
.wordmark {
  margin: 0; font-weight: 300; text-transform: uppercase; white-space: nowrap; line-height: 1;
  font-size: clamp(21px, 5.6vw, 76px); letter-spacing: 0.16em; margin-right: -0.16em; /* tracking adds space after the last letter */
  text-shadow: 0 0 30px rgba(120, 160, 255, 0.35);
}
.start-sub { margin: 18px 0 0; color: var(--text-2); font-weight: 300; font-size: clamp(15px, 2vw, 19px); letter-spacing: 0.02em; }
.press {
  margin: 72px 0 0; font-size: 15px; letter-spacing: 0.32em; text-transform: uppercase; font-weight: 500;
  animation: breathe 2.4s ease-in-out infinite;
}
.start-note { position: absolute; bottom: 32px; left: 0; right: 0; margin: 0; text-align: center; font-size: 13px; color: var(--text-3); }
@keyframes breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.users { align-content: center; gap: 56px; }
.users-title { margin: 0; font-weight: 300; font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.01em; text-align: center; }
.users-row { display: flex; gap: 56px; justify-content: center; }
.user { display: grid; justify-items: center; gap: 18px; transition: transform 260ms var(--ease); }
.user-avatar {
  width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(150deg, #3b4a6b, #151c2e); color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 0 #fff; transition: box-shadow 220ms var(--ease), transform 260ms var(--ease);
}
.user-avatar.wallet { background: linear-gradient(150deg, var(--blue), #0e2466); }
.user-name { font-size: 18px; color: var(--text-2); transition: color 200ms; }
.user.is-focus .user-avatar { box-shadow: 0 0 0 4px var(--night), 0 0 0 7px #fff, 0 18px 50px rgba(0, 0, 0, 0.5); transform: scale(1.08); }
.user.is-focus .user-name { color: #fff; font-weight: 500; }

/* ---------- home ---------- */
.home { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 40px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px var(--pad-x) 0; height: 80px;
}
.tabs { display: flex; gap: 34px; }
.topbar { position: relative; }
.ca-pill {
  position: absolute; left: 50%; top: calc(26px + 40px - 16px); transform: translateX(-50%);
  height: 32px; padding: 0 6px; border-radius: 8px; white-space: nowrap; transition: color 150ms, box-shadow 150ms;
}
.ca-pill code { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 15px; color: #fff; }
.ca-pill.is-empty code { font-family: inherit; color: var(--text-2); }
.ca-pill:hover code { color: var(--text-2); }
.ca-pill.is-focus { box-shadow: 0 0 0 2.5px #fff; }
.tab {
  font-size: 22px; font-weight: 400; color: var(--text-3); position: relative; padding: 6px 2px;
  transition: color 200ms;
}
.tab.is-active { color: #fff; font-weight: 600; }
.tab.is-focus::after, .icon-btn.is-focus::after, .avatar.is-focus::after {
  content: ""; position: absolute; inset: -6px -12px; border-radius: 12px; box-shadow: 0 0 0 2.5px #fff;
}
.status { display: flex; align-items: center; gap: 22px; }
.icon-btn { position: relative; width: 36px; height: 36px; display: grid; place-items: center; color: rgba(255, 255, 255, 0.88); }
.icon-btn.is-focus::after, .avatar.is-focus::after { inset: -4px; border-radius: 50%; }
#btn-sound .mute { display: none; }
#btn-sound.is-muted .mute { display: inline; }
#btn-sound.is-muted .wave { display: none; }
.avatar {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(150deg, #3b4a6b, #151c2e); font-weight: 600; font-size: 15px; display: grid; place-items: center;
}
.avatar.is-wallet { background: linear-gradient(150deg, var(--blue), #0e2466); font-size: 11px; }
.clock { font-size: 20px; font-weight: 400; font-variant-numeric: tabular-nums; min-width: 58px; text-align: right; }

/* tile row */
.row-wrap { padding: 22px 0 0; height: calc(var(--tile-big) + 44px); overflow: hidden; }
.row {
  list-style: none; margin: 0; padding: 0 var(--pad-x);
  display: flex; align-items: flex-start; gap: var(--gap);
  transition: transform 380ms var(--ease);
  will-change: transform;
}
.tile-item { flex: none; display: flex; align-items: flex-end; gap: 18px; transition: opacity 300ms var(--ease), transform 380ms var(--ease); }
.tile-item.is-past { opacity: 0; transform: scale(0.85); pointer-events: none; }
.tile {
  position: relative; flex: none; width: var(--tile); height: var(--tile); border-radius: 14px;
  background-size: cover; background-position: center; background-color: #141b2e;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: width 380ms var(--ease), height 380ms var(--ease), box-shadow 260ms var(--ease), filter 300ms;
  filter: brightness(0.9);
}
.tile-label {
  font-size: 19px; font-weight: 500; white-space: nowrap; color: #fff;
  max-width: 0; opacity: 0; overflow: hidden; transform: translateX(-8px);
  transition: opacity 260ms var(--ease), transform 380ms var(--ease), max-width 380ms var(--ease);
  padding-bottom: 6px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.tile-item.is-current .tile { width: var(--tile-big); height: var(--tile-big); filter: none; }
.tile-item.is-current .tile-label { max-width: 320px; opacity: 1; transform: none; }
body.zone-row .tile-item.is-current .tile { box-shadow: 0 0 0 3px rgba(5, 7, 15, 0.9), 0 0 0 6px #fff, 0 16px 44px rgba(0, 0, 0, 0.55); }
.tile-badge {
  position: absolute; left: 8px; bottom: 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); padding: 3px 6px; border-radius: 6px; text-transform: uppercase;
}
.row.is-entering .tile-item { animation: tileIn 620ms var(--ease-out) both; }
@keyframes tileIn { from { opacity: 0; transform: translateX(60px); } }

/* hero */
.hero { padding: 0 var(--pad-x); margin-top: auto; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; }
.hero > * { animation: heroIn 520ms var(--ease-out) both; }
.hero.swap > * { animation: none; }
.hero > :nth-child(2) { animation-delay: 30ms; }
.hero > :nth-child(3) { animation-delay: 60ms; }
.hero > :nth-child(4) { animation-delay: 90ms; }
.hero > :nth-child(5) { animation-delay: 120ms; }
@keyframes heroIn { from { opacity: 0; transform: translateY(12px); } }
.hero-tag { margin: 0 0 10px; font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.hero-title {
  margin: 0; font-weight: 800; font-size: clamp(44px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.035em;
  max-width: 14ch; text-shadow: 0 6px 40px rgba(0, 0, 0, 0.45); text-wrap: balance;
}
.hero-meta { margin: 16px 0 0; font-size: 17px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 6px 18px; max-width: 640px; }
.hero-meta b { color: #fff; font-weight: 600; }
.hero-meta .up { color: var(--up); }
.hero-meta .down { color: var(--down); }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; }
.btn-play {
  position: relative; height: 58px; min-width: 232px; padding: 0 34px; border-radius: 14px;
  background: #fff; color: #0b0d14; font-size: 19px; font-weight: 600; letter-spacing: 0.01em;
  transition: transform 260ms var(--ease), box-shadow 220ms var(--ease);
}
.btn-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-more[hidden] { display: none; }
.btn-more {
  position: relative; width: 58px; height: 58px; border-radius: 14px; background: var(--glass-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: transform 260ms var(--ease), box-shadow 220ms var(--ease), background 200ms;
}
.btn-more span { width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.btn-play.is-focus, .btn-more.is-focus { transform: scale(1.06); box-shadow: 0 0 0 3px rgba(5, 7, 15, 0.9), 0 0 0 6px #fff, 0 14px 40px rgba(0, 0, 0, 0.5); }
.btn-more.is-focus { background: rgba(255, 255, 255, 0.24); }
.hero-curve { display: flex; align-items: center; gap: 14px; margin-top: 22px; font-size: 14px; color: var(--text-2); }
.curve-bar { width: 220px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.curve-bar i { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; transition: width 700ms var(--ease-out); }
.hero-curve.is-hidden { visibility: hidden; }

/* cards (activity row) */
.cards-wrap { margin-top: 46px; }
.cards {
  display: flex; gap: 18px; padding: 0 var(--pad-x) 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; scroll-padding: 0 var(--pad-x);
}
.cards::-webkit-scrollbar { display: none; }
.card {
  position: relative; flex: none; width: 300px; min-height: 176px; border-radius: 18px; padding: 20px 22px;
  background: rgba(18, 22, 36, 0.62); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.07); text-align: left; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 260ms var(--ease), box-shadow 220ms var(--ease);
}
.card.is-focus { transform: scale(1.04); box-shadow: 0 0 0 3px rgba(5, 7, 15, 0.9), 0 0 0 6px #fff, 0 18px 44px rgba(0, 0, 0, 0.5); }
.card-k { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.card-v { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card-s { font-size: 14px; color: var(--text-2); line-height: 1.45; }
.card-s.up { color: var(--up); } .card-s.down { color: var(--down); }
.card .curve-bar { width: 100%; margin-top: auto; height: 6px; }
.trades { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
.trades li { display: flex; justify-content: space-between; gap: 10px; color: var(--text-2); }
.trades .buy { color: var(--up); } .trades .sell { color: var(--down); }
.card-ca { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 15px; color: #fff; word-break: break-all; }
.steps { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* footer */
.foot { padding: 34px var(--pad-x) 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.hints { display: flex; gap: 22px; font-size: 14px; color: var(--text-2); }
.hints span { display: inline-flex; align-items: center; gap: 8px; }
.g { width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); position: relative; display: inline-block; }
.g::before, .g::after { content: ""; position: absolute; left: 50%; top: 50%; }
.g-x::before, .g-x::after { width: 10px; height: 2px; background: #0b0d14; border-radius: 1px; transform: translate(-50%, -50%) rotate(45deg); }
.g-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.g-o::before { width: 9px; height: 9px; border: 2px solid #0b0d14; border-radius: 50%; transform: translate(-50%, -50%); box-sizing: border-box; }
.g-arrows { border-radius: 5px; }
.g-arrows::before { width: 0; height: 0; border: 4px solid transparent; border-bottom: 5px solid #0b0d14; transform: translate(-50%, -85%); }
.g-arrows::after { width: 0; height: 0; border: 4px solid transparent; border-top: 5px solid #0b0d14; transform: translate(-50%, 0%); }
.legal { margin: 0; max-width: 560px; font-size: 12px; color: var(--text-3); line-height: 1.5; text-align: right; }

/* overlay / panels */
.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; }
.overlay[hidden] { display: none; }
.overlay-bg { position: absolute; inset: 0; background: rgba(3, 5, 12, 0.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: fade 300ms var(--ease) both; }
.panel {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: rgba(20, 24, 38, 0.92); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 22px;
  padding: 30px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  animation: panelIn 420ms var(--ease-out) both;
}
.panel.is-menu { width: 300px; padding: 10px; position: absolute; }
.overlay.is-closing .panel { animation: panelOut 220ms var(--ease) both; }
.overlay.is-closing .overlay-bg { animation: fade 220ms var(--ease) reverse both; }
@keyframes fade { from { opacity: 0; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@keyframes panelOut { to { opacity: 0; transform: translateY(8px) scale(0.985); } }
.panel h2 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.panel p { margin: 0 0 18px; color: var(--text-2); line-height: 1.55; font-size: 15px; }
.panel .fine { font-size: 13px; color: var(--text-3); margin: 14px 0 0; }
.menu-item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 12px;
  font-size: 16px; text-align: left; transition: background 150ms;
}
.menu-item svg { flex: none; opacity: 0.85; }
.menu-item.is-focus { background: rgba(255, 255, 255, 0.92); color: #0b0d14; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.field input, .field textarea {
  width: 100%; background: rgba(255, 255, 255, 0.07); border: 0; border-radius: 12px; padding: 14px 16px; font-size: 16px; outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); transition: box-shadow 160ms;
}
.field textarea { resize: none; height: 84px; }
.field input.is-focus, .field textarea.is-focus, .field input:focus, .field textarea:focus { box-shadow: 0 0 0 2.5px #fff; }
.field-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.paired {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.4; color: var(--text-2);
  background: rgba(47, 107, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(47, 107, 255, 0.4);
}
.paired-coin { flex: none; font-weight: 700; font-size: 14px; color: #fff; padding: 5px 11px; border-radius: 999px; background: #2F6BFF; }
.paired svg { flex: none; margin-left: auto; color: var(--text-3); }
.btn-play[disabled] { opacity: 0.45; cursor: not-allowed; }
.launch-steps { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.launch-steps li { display: flex; align-items: center; gap: 14px; font-size: 16px; color: var(--text-3); counter-increment: s; transition: color 200ms; }
.launch-steps li::before {
  content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, 0.08); box-sizing: border-box;
}
.launch-steps li.is-doing { color: #fff; }
.launch-steps li.is-doing::before { content: ""; border: 2.5px solid rgba(255, 255, 255, 0.2); border-top-color: #fff; background: none; animation: spin 0.8s linear infinite; }
.launch-steps li.is-done { color: var(--text-2); }
.launch-steps li.is-done::before { content: "✓"; background: var(--up); color: #04140c; }
.launch-steps li.is-err { color: #fff; }
.launch-steps li.is-err::before { content: "!"; background: var(--down); color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.launched { text-align: center; padding-top: 6px; }
.launched-img { display: block; width: 128px; height: 128px; margin: 0 auto 18px; border-radius: 24px; background: center / cover no-repeat #141b2e; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); animation: panelIn 600ms var(--ease-out) both; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { padding: 10px 16px; border-radius: 11px; background: rgba(255, 255, 255, 0.08); font-weight: 500; transition: background 150ms, color 150ms; position: relative; }
.chip.is-on { background: rgba(255, 255, 255, 0.2); }
.chip.is-focus, .pick.is-focus { box-shadow: 0 0 0 2.5px #fff; }
.pick { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); width: 100%; text-align: left; }
.pick-img { width: 58px; height: 58px; border-radius: 12px; background: rgba(255, 255, 255, 0.1) center/cover; display: grid; place-items: center; font-size: 24px; flex: none; }
.pick span { color: var(--text-2); font-size: 15px; }
.pick .pick-img { color: rgba(255, 255, 255, 0.7); }
.panel-actions { display: flex; gap: 12px; margin-top: 22px; }
.panel-actions .btn-play { min-width: 0; flex: 1; height: 54px; font-size: 17px; }
.btn-ghost { position: relative; height: 54px; padding: 0 22px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); font-weight: 500; transition: transform 260ms var(--ease), box-shadow 200ms; }
.btn-ghost.is-focus, .panel .btn-play.is-focus { transform: scale(1.03); box-shadow: 0 0 0 3px rgba(20, 24, 38, 1), 0 0 0 5.5px #fff; }
.quote { display: flex; justify-content: space-between; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); font-size: 15px; color: var(--text-2); margin-top: 6px; }
.quote b { color: #fff; }
.search-results { display: grid; gap: 6px; margin-top: 6px; max-height: 50vh; overflow: auto; }
.result { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 12px; width: 100%; text-align: left; }
.result img { width: 44px; height: 44px; border-radius: 10px; }
.result small { color: var(--text-3); margin-left: auto; }
.result.is-focus { background: rgba(255, 255, 255, 0.92); color: #0b0d14; }
.result.is-focus small { color: rgba(11, 13, 20, 0.6); }

/* coin page: chart + numbers inside the pad */
.panel.is-coin {
  width: min(1280px, 100%); height: min(880px, calc(100vh - 32px)); padding: 0; overflow: hidden;
  display: flex; flex-direction: column; background: rgba(14, 17, 28, 0.96);
}
.cp-head { display: flex; align-items: center; gap: 16px; padding: 16px 16px 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.cp-img { flex: none; width: 56px; height: 56px; border-radius: 14px; background: #141b2e center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.cp-name { flex: 1; min-width: 0; }
.panel .cp-name h2 { margin: 0; font-size: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel .cp-name p { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; color: var(--text-2); line-height: 1.3; }
.cp-name p b { color: #fff; font-weight: 600; }
.cp-pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: var(--text-2); }
.cp-pill.is-pad { background: rgba(47, 107, 255, 0.22); color: #d4e1ff; box-shadow: inset 0 0 0 1px rgba(47, 107, 255, 0.55); }
.cp-mc { flex: none; text-align: right; display: grid; font-variant-numeric: tabular-nums; }
.cp-mc span { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.cp-mc b { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.cp-mc small { font-size: 14px; color: var(--text-2); }
.cp-mc .up, .cp-stat .up { color: var(--up); } .cp-mc .down, .cp-stat .down { color: var(--down); }
.cp-close { flex: none; width: 46px; height: 46px; border-radius: 13px; background: rgba(255, 255, 255, 0.08); display: grid; place-items: center; transition: background 150ms, color 150ms; }
.cp-close.is-focus { background: rgba(255, 255, 255, 0.92); color: #0b0d14; }
.cp-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.cp-chart { position: relative; min-height: 0; background: #0b0e17; }
.cp-chart::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.14); border-top-color: rgba(255, 255, 255, 0.7); animation: spin 0.8s linear infinite;
}
.cp-chart[data-has="0"]::before { display: none; }
.cp-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cp-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; color: var(--text-2); }
.cp-empty svg { width: 40px; height: 40px; opacity: 0.6; margin-bottom: 4px; }
.cp-empty b { color: #fff; font-size: 18px; }
.cp-empty span { max-width: 340px; line-height: 1.5; font-size: 15px; }
.cp-side { display: flex; flex-direction: column; gap: 12px; padding: 16px; overflow: auto; border-left: 1px solid rgba(255, 255, 255, 0.07); }
.cp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cp-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); font-variant-numeric: tabular-nums; }
.cp-stat.is-wide { grid-column: 1 / -1; }
.cp-stat > span:first-child { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.cp-stat b { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.cp-stat small { font-size: 13px; color: var(--text-2); }
.cp-stat .curve-bar { width: 100%; height: 5px; margin-top: 8px; }
.cp-ca, .cp-link { display: flex; align-items: center; gap: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); transition: background 150ms, color 150ms; }
.cp-ca { padding: 12px 14px; text-align: left; font-size: 14px; color: var(--text-2); }
.cp-ca code { flex: 1; font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 15px; color: #fff; }
.cp-links { display: flex; gap: 8px; }
.cp-links { flex-wrap: wrap; }
.cp-link { flex: 1 1 0; min-width: 84px; justify-content: center; height: 44px; font-size: 14px; }
.cp-link svg { width: 16px; height: 16px; }
.cp-ca.is-focus, .cp-link.is-focus { background: rgba(255, 255, 255, 0.92); color: #0b0d14; }
.cp-ca.is-focus code { color: #0b0d14; }
.cp-trade { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); }
.seg-b { height: 38px; border-radius: 9px; font-weight: 600; font-size: 15px; color: var(--text-2); transition: background 150ms, color 150ms, box-shadow 150ms; }
.seg-b[data-side="buy"].is-on { background: var(--up); color: #04140c; }
.seg-b[data-side="sell"].is-on { background: var(--down); color: #fff; }
.seg-b.is-focus { box-shadow: 0 0 0 2.5px #fff; }
.cp-amt { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 56px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); transition: box-shadow 160ms; cursor: text; }
.cp-amt:focus-within, .cp-amt:has(.is-focus) { box-shadow: 0 0 0 2.5px #fff; }
.cp-amt input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; outline: none; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cp-amt span { flex: none; font-size: 15px; font-weight: 600; color: var(--text-2); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cp-quick .chip { padding: 8px 4px; font-size: 13px; text-align: center; border-radius: 9px; }
.cp-quote { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-3); min-height: 18px; font-variant-numeric: tabular-nums; }
.cp-quote #tout { color: #fff; font-weight: 600; text-align: right; }
.cp-quote #tout.is-err { color: var(--down); font-weight: 500; }
.panel .cp-go { width: 100%; min-width: 0; height: 54px; font-size: 17px; background: var(--up); color: #04140c; }
.panel .cp-go.is-sell { background: var(--down); color: #fff; }
.panel .cp-go[disabled] { background: rgba(255, 255, 255, 0.12); color: var(--text-2); opacity: 1; }
.panel .cp-trade .cp-fine { margin: 0; }
.cp-slip { font-size: inherit; color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; border-radius: 4px; }
.cp-slip.is-focus { color: #fff; box-shadow: 0 0 0 2px #fff; }
.cp-actions { margin-top: auto; padding-top: 4px; }
.cp-actions .btn-play { width: 100%; min-width: 0; height: 56px; font-size: 18px; }
.panel .cp-fine { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--text-3); text-align: center; }

/* toasts (notification pop-ups) */
.toasts { position: fixed; top: 22px; right: 22px; z-index: 30; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex; gap: 14px; align-items: center; padding: 12px 16px 12px 12px; border-radius: 16px;
  background: rgba(24, 28, 44, 0.94); border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  animation: toastIn 520ms var(--ease-out) both;
}
.toast.is-out { animation: toastOut 380ms var(--ease) both; }
.toast-img { width: 48px; height: 48px; border-radius: 10px; flex: none; background: var(--blue) center/cover; display: grid; place-items: center; font-size: 22px; }
.toast b { display: block; font-size: 15px; font-weight: 600; }
.toast div > span { display: block; font-size: 13.5px; color: var(--text-2); margin-top: 2px; line-height: 1.35; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ---------- tablet / phone ---------- */
@media (max-width: 900px) {
  :root { --pad-x: 36px; --tile: 88px; --tile-big: 120px; }
  .legal { text-align: left; }
  .topbar { height: auto; min-height: 80px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 12px; }
  .ca-pill { position: static; transform: none; grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 100%; }
  .topbar .status { grid-row: 1; grid-column: 2; }
  .foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  :root { --pad-x: 16px; --tile: 66px; --tile-big: 92px; --gap: 10px; }
  .topbar { padding-top: 14px; min-height: 62px; row-gap: 10px; }
  .ca-pill { margin-bottom: 4px; overflow: hidden; }
  .ca-pill code { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
  .tabs { gap: 12px; }
  .tab { font-size: 15px; }
  .status { gap: 6px; }
  .topbar { column-gap: 8px; }
  .clock { font-size: 14px; min-width: 0; }
  .icon-btn { width: 28px; }
  .avatar { width: 32px; height: 32px; }
  #btn-search { display: none; }
  .row-wrap { padding-top: 14px; height: calc(var(--tile-big) + 30px); }
  .tile { border-radius: 12px; }
  .tile-label { display: none; }
  .tile-badge { font-size: 8px; left: 5px; bottom: 5px; padding: 2px 4px; }
  .hero { min-height: 0; padding-top: 18vh; }
  .hero-tag { font-size: 12px; }
  .hero-meta { font-size: 15px; gap: 4px 14px; }
  .hero-actions { margin-top: 22px; }
  .btn-play { flex: 1; min-width: 0; height: 54px; }
  .btn-more { width: 54px; height: 54px; }
  .curve-bar { width: 96px; }
  .hero-curve { font-size: 13px; gap: 12px; }
  .cards-wrap { margin-top: 34px; }
  .card { width: 78vw; max-width: 300px; min-height: 160px; }
  .hints { display: none; }
  .users { gap: 40px; }
  .users-row { gap: 28px; }
  .user-avatar { width: 108px; height: 108px; }
  .user-name { font-size: 15px; }
  .panel { padding: 22px; border-radius: 20px; }
  .panel.is-menu { width: calc(100vw - 32px); position: relative; }
  .kv-img { right: auto; left: 50%; top: 196px; width: 58vw; border-radius: 28px; transform: translate(-50%, 12px) scale(0.95); }
  .art-layer.is-on .kv-img { transform: translate(-50%, 0) scale(1); }
  .hero { padding-top: calc(58vw + 60px); }
  .art-shade {
    background:
      linear-gradient(0deg, rgba(3, 5, 12, 0.97) 0%, rgba(3, 5, 12, 0.7) 42%, rgba(3, 5, 12, 0.15) 70%, rgba(3, 5, 12, 0.35) 100%);
  }
}

@media (max-width: 900px) {
  .cp-body { grid-template-columns: 1fr; grid-template-rows: minmax(340px, 60vh) auto; overflow: auto; }
  .cp-side { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.07); overflow: visible; }
}
@media (max-width: 600px) {
  .overlay:has(.panel.is-coin) { padding: 0; }
  .panel.is-coin { height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; padding: 0; }
  .cp-head { gap: 12px; padding: 12px 12px 12px 16px; flex-wrap: wrap; }
  .cp-img { width: 46px; height: 46px; border-radius: 12px; }
  .panel .cp-name h2 { font-size: 21px; }
  .panel .cp-name p { font-size: 14px; }
  .cp-mc { order: 4; flex-basis: 100%; text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .cp-mc b { font-size: 24px; }
  .cp-close { order: 3; width: 42px; height: 42px; }
  .cp-body { grid-template-rows: minmax(300px, 52vh) auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
