:root {
  --black: #000000;
  --graphite: #141518;
  --graphite-2: #1c1d21;
  --grey: #6b6d71;
  --grey-2: #9a9ca0;
  --off: #ece8e1;
  --line: rgba(236, 232, 225, 0.14);
  --xp: #7fe0c4;
  --hp: #ef5b4c;
  --shield: #9cc2ff;
  --amber: #ffc46b;
  --sans: "Helvetica Neue", "Neue Haas Grotesk Text", "SF Pro Text", Inter, Roboto, "Segoe UI", Arial, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--black);
  color: var(--off);
  font-family: var(--sans);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus { outline: none; }
button:focus-visible { outline: 1px solid var(--off); outline-offset: 3px; }

/* ---------- arena ---------- */
#game {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  background: var(--black);
}

#vignette, #hurt, #fade {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
#vignette {
  background: radial-gradient(ellipse 75% 65% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.7) 100%);
  transition: opacity 1.2s ease;
  opacity: 0.8;
}
body.boss-near #vignette { opacity: 1; background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.88) 100%); }
#hurt {
  background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent 50%, rgba(239, 91, 76, 0.42) 100%);
  opacity: 0;
  will-change: opacity;
}
#fade {
  background: var(--black);
  opacity: 0;
  transition: opacity 0.7s ease;
}
#fade.on { opacity: 0.93; }

/* ---------- HUD ---------- */
#hud {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  padding: calc(var(--sat) + 10px) calc(var(--sar) + 10px) 0 calc(var(--sal) + 16px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  color: var(--grey-2);
  font-size: 12px;
  letter-spacing: 0.04em;
}
#hud.show { opacity: 1; }
#hud .xp {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--sat);
  height: 2px;
  background: rgba(236, 232, 225, 0.06);
}
#hud .xp i {
  display: block;
  height: 100%;
  background: var(--xp);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 0.12s linear;
  box-shadow: 0 0 8px rgba(127, 224, 196, 0.6);
}
.hud-row {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
}
.hud-hp { display: flex; align-items: center; gap: 9px; }
.hud-hp .bar {
  position: relative;
  width: 88px;
  height: 3px;
  background: rgba(236, 232, 225, 0.1);
  overflow: hidden;
}
.hud-hp .bar i {
  position: absolute;
  inset: 0;
  background: var(--hp);
  transform-origin: 0 50%;
  transition: transform 0.15s ease-out;
}
.hud-hp.hit .bar { animation: hpHit 0.35s ease-out; }
.hud-hp.heal .bar i { animation: hpHeal 0.6s ease-out; }
@keyframes hpHit { 0% { background: rgba(255, 255, 255, 0.85); } 100% { background: rgba(236, 232, 225, 0.1); } }
@keyframes hpHeal { 0% { background: #c9f2bd; } 100% { background: var(--hp); } }
#hpText { color: var(--off); min-width: 2.2em; }

#timer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--off);
  font-size: 14px;
  letter-spacing: 0.08em;
}
.hud-r { display: flex; align-items: center; gap: 2px; }
#lvl { margin-right: 6px; color: var(--off); }

.icon-btn {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--grey-2);
  border-radius: 50%;
}
.icon-btn:active { color: var(--off); background: rgba(236, 232, 225, 0.08); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .ic-off { display: none; }
body.muted .icon-btn .ic-on { display: none; }
body.muted .icon-btn .ic-off { display: block; }
.icon-btn.corner {
  position: absolute;
  right: calc(var(--sar) + 10px);
  bottom: calc(var(--sab) + 10px);
}

/* ---------- boss bar ---------- */
#bossbar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sab) + 26px);
  width: min(64vw, 340px);
  transform: translate(-50%, 6px);
  display: grid;
  gap: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#bossbar.show { opacity: 1; transform: translate(-50%, 0); }
#bossName { font-size: 11px; letter-spacing: 0.32em; color: var(--grey-2); text-align: center; }
#bossbar .track { height: 2px; background: rgba(236, 232, 225, 0.12); overflow: hidden; }
#bossbar .track i { display: block; height: 100%; background: var(--off); transform-origin: 0 50%; transition: transform 0.1s linear; }
#bossbar.p2 .track i { background: var(--hp); }
/* marcas dos damage gates (70% e 35%) */
#bossbar .track { position: relative; }
#bossbar .track::before, #bossbar .track::after { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--black); z-index: 1; }
#bossbar .track::before { left: 35%; }
#bossbar .track::after { left: 70%; }
#bossbar.p3 #bossName { color: var(--warn); }
/* teto do capítulo: XP cheia e guardada */
#hud.gated #xpFill { background: var(--grey-2); animation: gatePulse 1.4s ease-in-out infinite alternate; }
@keyframes gatePulse { from { opacity: 0.55; } to { opacity: 1; } }
.dbg-balance {
  position: fixed; left: 6px; top: 58px; z-index: 40; margin: 0; padding: 6px 8px; max-width: calc(100vw - 12px);
  font: 10px/1.45 ui-monospace, Menlo, Consolas, monospace; color: var(--grey-2);
  background: rgba(0, 0, 0, 0.6); pointer-events: none; white-space: pre-wrap;
}

/* ---------- toast / hint ---------- */
#toast {
  position: fixed;
  left: 50%;
  top: calc(var(--sat) + 70px);
  transform: translate(-50%, -4px);
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  width: max-content;
  max-width: 86vw;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.45s ease;
  z-index: 20;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toastA { font-size: 11px; color: var(--grey-2); letter-spacing: 0.06em; }
#toastB { font-size: 15px; color: var(--off); letter-spacing: 0.28em; padding-left: 0.28em; }
#toast.syn #toastB { color: var(--amber); }
#toastC { display: block; }

#hint {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--sab) + 18vh);
  text-align: center;
  font-size: 13px;
  color: var(--grey-2);
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
#hint.show { opacity: 1; }

/* ---------- screens ---------- */
.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--sat) + 24px) calc(var(--sar) + 22px) calc(var(--sab) + 24px) calc(var(--sal) + 22px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  overflow-y: auto;
  touch-action: pan-y;
}
.screen.show { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }

.btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 19px 20px;
  border: 1px solid var(--off);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--off);
  position: relative;
  transition: background 0.12s, color 0.12s;
}
.btn::before, .btn::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 1px;
  background: var(--off);
}
.btn::before { left: -8px; }
.btn::after { right: -8px; }
.btn:active, .btn.pressed { background: var(--off); color: var(--black); }
@media (hover: hover) { .btn:hover { background: rgba(236, 232, 225, 0.08); } .btn:hover:active { background: var(--off); } }
.btn.ghost { border-color: var(--line); color: var(--grey-2); margin-top: 12px; }
.btn.ghost::before, .btn.ghost::after { display: none; }
.btn.link {
  border: 0;
  margin-top: 14px;
  padding: 12px;
  width: auto;
  color: var(--grey);
  letter-spacing: 0.06em;
  text-indent: 0;
  font-size: 13px;
}
.btn.link::before, .btn.link::after { display: none; }
.btn.link:active { background: none; color: var(--off); }

/* wordmark */
.wordmark { display: block; width: min(76vw, 340px); height: auto; margin: 0 auto; overflow: visible; }
.wordmark.small { width: min(48vw, 200px); }
.wm-strokes { fill: none; stroke: var(--off); stroke-width: 1.05; stroke-linecap: square; stroke-linejoin: miter; }
.wordmark.small .wm-strokes { stroke-width: 1.15; }

/* ---------- menu ---------- */
#menu { background: rgba(0, 0, 0, 0.45); }
.menu-inner { width: 100%; max-width: 380px; text-align: center; }
.menu-inner .wordmark .wm-strokes path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.9s cubic-bezier(.6, 0, .2, 1) forwards; }
.menu-inner .wordmark .wm-strokes path:nth-child(2) { animation-delay: 0.05s; }
.menu-inner .wordmark .wm-strokes path:nth-child(3) { animation-delay: 0.1s; }
.menu-inner .wordmark .wm-strokes path:nth-child(4) { animation-delay: 0.15s; }
.menu-inner .wordmark .wm-strokes path:nth-child(5) { animation-delay: 0.2s; }
.menu-inner .wordmark .wm-strokes path:nth-child(6) { animation-delay: 0.25s; }
.menu-inner .wordmark .wm-strokes path:nth-child(7) { animation-delay: 0.3s; }
.menu-inner .wordmark .wm-strokes path:nth-child(8) { animation-delay: 0.35s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.line {
  position: relative;
  width: min(76vw, 340px);
  height: 14px;
  margin: 30px auto 0;
}
.line .rail { position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: rgba(236, 232, 225, 0.28); }
.line .st {
  position: absolute;
  top: 3px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(236, 232, 225, 0.5);
  background: var(--black);
  border-radius: 50%;
  transform: translateX(-50%);
}
.line .st:nth-of-type(2) { left: 0%; }
.line .st:nth-of-type(3) { left: 25%; }
.line .st:nth-of-type(4) { left: 50%; }
.line .st:nth-of-type(5) { left: 75%; }
.line .st.last { left: 100%; width: 11px; height: 11px; top: 1px; border-color: var(--off); background: var(--off); box-shadow: 0 0 0 3px var(--black), 0 0 0 4px rgba(236, 232, 225, 0.4); }
.line .runner {
  position: absolute;
  top: 5px;
  left: 0;
  width: 14px;
  height: 3px;
  background: var(--xp);
  box-shadow: 0 0 10px rgba(127, 224, 196, 0.8);
  animation: run 5.5s cubic-bezier(.55, 0, .35, 1) infinite;
}
@keyframes run {
  0% { left: 0; opacity: 0; }
  6% { opacity: 1; }
  22% { left: calc(25% - 7px); }
  30% { left: calc(25% - 7px); }
  46% { left: calc(50% - 7px); }
  54% { left: calc(50% - 7px); }
  70% { left: calc(75% - 7px); }
  78% { left: calc(75% - 7px); }
  94% { left: calc(100% - 14px); opacity: 1; }
  100% { left: calc(100% - 14px); opacity: 0; }
}
.tag { margin: 26px 0 46px; font-size: 14px; color: var(--grey-2); letter-spacing: 0.01em; }
.best { margin-top: 30px; display: flex; justify-content: center; align-items: baseline; gap: 12px; font-size: 12px; color: var(--grey); }
.best b { font-weight: 400; color: var(--off); font-size: 15px; letter-spacing: 0.06em; }

/* ---------- level up ---------- */
#levelup { background: rgba(0, 0, 0, 0.72); }
.lu-inner { width: 100%; max-width: 420px; }
.lu-head { font-size: 13px; color: var(--grey-2); margin-bottom: 18px; display: flex; align-items: baseline; gap: 10px; }
.lu-head b { color: var(--xp); font-weight: 400; font-size: 26px; letter-spacing: 0.02em; }
#cards { display: grid; gap: 10px; }
#cards.locked { pointer-events: none; }
.card {
  --acc: var(--off);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 14px;
  width: 100%;
  min-height: 84px;
  padding: 15px 16px 15px 18px;
  text-align: left;
  background: rgba(20, 21, 24, 0.94);
  border: 1px solid var(--line);
  position: relative;
  opacity: 0;
  transform: translateY(8px);
  animation: cardIn 0.28s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: var(--d, 0ms);
}
.card::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 2px; background: var(--acc); }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.card:active { background: var(--off); color: var(--black); }
.card:active .c-desc, .card:active .c-cat { color: #333; }
@media (hover: hover) { .card:hover { border-color: rgba(236, 232, 225, 0.4); } }
.c-body { display: grid; gap: 6px; min-width: 0; }
.c-top { display: flex; align-items: baseline; gap: 10px; }
.c-name { font-size: 17px; font-weight: 500; letter-spacing: 0.01em; }
.c-lvl { font-size: 13px; color: var(--acc); letter-spacing: 0.08em; }
.card:active .c-lvl { color: var(--black); }
.c-desc { font-size: 13px; line-height: 1.4; color: var(--grey-2); }
.c-syn { font-size: 12px; color: var(--amber); }
.c-new { font-size: 11px; color: var(--acc); border: 1px solid currentColor; padding: 2px 5px; letter-spacing: 0.05em; }
.c-pips { display: flex; gap: 3px; align-self: center; }
.c-pips i { width: 6px; height: 6px; border: 1px solid rgba(236, 232, 225, 0.3); }
.c-pips i.on { background: var(--acc); border-color: var(--acc); }
.c-pips i.new { border-color: var(--acc); animation: pip 0.9s ease-in-out infinite alternate; }
@keyframes pip { to { background: var(--acc); } }

/* ---------- pause ---------- */
#pause { background: rgba(0, 0, 0, 0.78); }
.panel { width: 100%; max-width: 340px; text-align: center; }
.panel-title { font-size: 15px; letter-spacing: 0.3em; text-indent: 0.3em; margin-bottom: 22px; }
.panel .build { margin-bottom: 30px; }

.build { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.build span { font-size: 12px; padding: 5px 8px; border: 1px solid var(--line); color: var(--grey-2); }
.build span b { font-weight: 400; color: var(--off); margin-left: 4px; }
.build span.syn { border-color: rgba(255, 196, 107, 0.5); color: var(--amber); }
.build .empty { border: 0; color: var(--grey); }

/* ---------- results ---------- */
#over { background: transparent; align-items: flex-start; }
.over-inner { width: 100%; max-width: 340px; text-align: center; margin: auto 0; }
.run { margin: 14px 0 22px; font-size: 12px; color: var(--grey); }
.stats { text-align: left; border-top: 1px solid var(--line); }
.stats > div { display: flex; justify-content: space-between; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.stats dt { font-size: 13px; color: var(--grey-2); }
.stats dd { font-size: 15px; color: var(--off); letter-spacing: 0.04em; }
.stats .score dt { color: var(--off); }
.stats .score dd { font-size: 24px; color: var(--off); }
.stats .rec dd { color: var(--grey-2); }
#newRec { display: none; font-style: normal; font-size: 11px; color: var(--black); background: var(--xp); padding: 2px 6px; margin-left: 8px; vertical-align: 1px; }
#newRec.on { display: inline-block; }
.sub { margin: 12px 0 18px; font-size: 12px; color: var(--grey); text-align: left; }
#overBuild { margin-bottom: 26px; justify-content: flex-start; }

/* ---------- modulações pós-TERMINAL ---------- */
.lu-mod { display: grid; gap: 6px; }
.lu-mod span { font-size: 12px; letter-spacing: 0.02em; color: var(--grey-2); text-transform: none; }
.c-plus { font-size: 13px; line-height: 1.4; color: var(--off); }
.c-minus { font-size: 13px; line-height: 1.4; color: var(--grey-2); }
.card:active .c-plus, .card:active .c-minus { color: #333; }
.card.mod-skip { min-height: 0; padding: 14px 16px; justify-content: center; border-style: dashed; color: var(--grey-2); font-size: 13px; letter-spacing: 0.04em; }
.card.mod-skip::before { display: none; }

/* ---------- resultado: trecho e compartilhar ---------- */
.sub.stage { margin: 10px 0 6px; color: var(--grey-2); letter-spacing: 0.04em; }
.share-msg { min-height: 1.4em; margin-top: 4px; font-size: 12px; color: var(--grey-2); text-align: center; }

/* ---------- assinatura de autoria (menu) ---------- */
.credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  margin: 0 auto;
  max-width: calc(100% - 140px); /* não encosta no botão de som do canto */
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--grey);
  pointer-events: none;
}
.credit a {
  display: inline-block;
  padding: 10px 2px; /* área de toque confortável sem aumentar o texto */
  margin: -10px 0;
  color: var(--grey-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  pointer-events: auto;
}
.credit a:hover, .credit a:focus-visible { color: var(--off); border-bottom-color: rgba(236, 232, 225, 0.35); outline: none; }

/* ---------- fim da linha (continuação) ---------- */
#offer { background: transparent; }
.offer-stats { font-size: 15px; letter-spacing: 0.08em; color: var(--off); margin: -6px 0 10px; }
.offer-sub { font-size: 12px; line-height: 1.5; color: var(--grey); margin-bottom: 28px; }
.btn small { display: block; margin-top: 6px; font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-indent: 0; color: var(--grey-2); }
.btn:active small { color: #333; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.offer-msg { min-height: 1.5em; margin-top: 16px; font-size: 12px; color: var(--grey-2); }
.sub.note { margin-top: -8px; color: var(--grey-2); line-height: 1.5; }
.ad-mock {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; gap: 12px; padding: 24px;
  background: var(--graphite); text-align: center; font-size: 13px; color: var(--grey-2);
}

/* ---------- ranking global ---------- */
.menu-rank { margin: 14px auto 0; }
#menuRank { color: var(--grey-2); }

.over-links { display: flex; justify-content: center; gap: 6px; }
.over-links .btn.link { margin-left: 0; margin-right: 0; }

.net { margin: 0 0 22px; text-align: left; }
.net-status { display: flex; align-items: baseline; gap: 9px; font-size: 12px; line-height: 1.5; color: var(--grey-2); }
.net-status::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--grey);
  transform: translateY(-1px);
}
.net-status[data-tone="busy"]::before { border-color: var(--grey-2); animation: netBlink 0.9s ease-in-out infinite alternate; }
.net-status[data-tone="ok"]::before { background: var(--off); border-color: var(--off); }
.net-status[data-tone="best"] { color: var(--off); }
.net-status[data-tone="best"]::before { background: var(--xp); border-color: var(--xp); box-shadow: 0 0 8px rgba(127, 224, 196, 0.7); }
.net-status[data-tone="warn"]::before { border-color: var(--amber); }
@keyframes netBlink { to { background: var(--grey-2); } }
#netAction .btn.ghost { margin-top: 14px; }

.name-form { margin-top: 14px; text-align: left; }
.name-label { display: block; font-size: 12px; color: var(--grey-2); margin-bottom: 8px; }
.name-input {
  display: block;
  width: 100%;
  padding: 14px 14px;
  font: inherit;
  font-size: 16px; /* 16px evita zoom automático no iOS */
  letter-spacing: 0.06em;
  color: var(--off);
  background: var(--graphite);
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: text;
  user-select: text;
  caret-color: var(--xp);
}
.name-input:focus { border-color: rgba(236, 232, 225, 0.55); }
.name-input[aria-invalid="true"] { border-color: rgba(239, 91, 76, 0.7); }
.name-hint { margin: 8px 0 16px; font-size: 11px; color: var(--grey); line-height: 1.4; }
.name-hint.err { color: var(--hp); }
.name-form .btn { max-width: none; }
.name-form .btn.link { display: block; margin: 6px auto 0; }

#ranking { background: var(--black); align-items: flex-start; z-index: 12; }
.rk-inner { width: 100%; max-width: 400px; margin: auto 0; text-align: center; }
.rk-head { margin-bottom: 18px; }
.rk-head .panel-title { font-weight: 400; margin-bottom: 8px; outline: none; }
.rk-sub { font-size: 12px; color: var(--grey); letter-spacing: 0.06em; }

.rk-state { padding: 34px 0 30px; display: grid; gap: 6px; }
.rk-state-a { font-size: 13px; letter-spacing: 0.2em; text-indent: 0.2em; text-transform: uppercase; color: var(--grey-2); }
.rk-state-b { font-size: 12px; color: var(--grey); }
.rk-note { margin-top: 12px; font-size: 12px; color: var(--grey); }

/* a lista é uma linha de metrô: cada posição é uma estação */
.rk-list { position: relative; list-style: none; text-align: left; border-top: 1px solid var(--line); }
.rk-list:empty { display: none; }
.rk-list::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(236, 232, 225, 0.16);
}
.rk-list.solo::before { display: none; }
.rk-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 12px;
  row-gap: 4px;
  padding: 12px 0 12px 22px;
  border-bottom: 1px solid var(--line);
}
.rk-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(236, 232, 225, 0.4);
  background: var(--black);
  box-sizing: border-box;
}
.rk-row.top::before { border-color: var(--off); background: var(--off); }
.rk-row.me { background: linear-gradient(90deg, rgba(127, 224, 196, 0.07), rgba(127, 224, 196, 0) 80%); }
.rk-row.me::before { border-color: var(--xp); background: var(--xp); box-shadow: 0 0 8px rgba(127, 224, 196, 0.7); }
.rk-pos { min-width: 3.1ch; font-size: 12px; color: var(--grey); letter-spacing: 0.04em; }
.rk-row.top .rk-pos { color: var(--off); }
.rk-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rk-n {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--off);
}
.rk-row:not(.top):not(.me) .rk-n { color: #d4d0c9; }
.rk-you-tag { flex: none; font-size: 10px; color: var(--xp); letter-spacing: 0.08em; }
.rk-score { font-size: 15px; color: var(--off); letter-spacing: 0.04em; }
.rk-meta { grid-column: 2 / -1; font-size: 11px; color: var(--grey); letter-spacing: 0.02em; line-height: 1.5; }

.rk-me { margin-top: 26px; text-align: left; }
.rk-label { font-size: 12px; color: var(--grey-2); margin-bottom: 8px; }

.rk-you { margin: 26px 0 6px; font-size: 12px; color: var(--grey); text-align: center; }
.rk-you-line { color: var(--grey-2); }
.rk-you-name { font-weight: 400; color: var(--off); letter-spacing: 0.08em; text-transform: uppercase; margin-left: 4px; }
.rk-you-note { margin-top: 4px; line-height: 1.5; }
.rk-you .btn.ghost { margin-top: 14px; }
.btn.link.rk-small { margin: 2px auto 0; padding: 10px 12px; font-size: 12px; }
.rk-you .name-form { max-width: 300px; margin: 6px auto 0; }
#rkRefresh { margin-top: 18px; }

@media (max-width: 360px) {
  .rk-row { column-gap: 10px; padding-left: 20px; }
  .rk-n { font-size: 13px; letter-spacing: 0.06em; }
  .rk-score { font-size: 14px; }
}

@media (max-height: 700px) {
  .tag { margin: 18px 0 32px; }
  .stats > div { padding: 8px 0; }
  .run { margin: 10px 0 14px; }
  .card { min-height: 74px; padding-top: 12px; padding-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .line .runner { animation: none; left: calc(100% - 14px); }
  .menu-inner .wordmark .wm-strokes path { animation: none; stroke-dashoffset: 0; stroke-dasharray: none; }
  .card { animation-duration: 0.01s; }
  .net-status[data-tone="busy"]::before { animation: none; }
  #hud.gated #xpFill { animation: none; }
}
