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

:root {
  --bg: #071527;
  --panel: #175f8f;
  --panel-2: #1d6aa3;
  --line: #3f87bd;
  --line-hi: #6fb4dd;
  --text: #eff7fd;
  --muted: #b9d2e6;
  --acc: #196e23;
  --acc-deep: #0d4514;
  --acc-text: #4dc45b;
  --acc-glow: rgba(77, 196, 91, 0.35);
  --coral: #ff6b6b;
  --mint: #3ee6a6;
  --bad: #ff6b6b;
  --solar: #f79a05;
  --solar-light: #ffc14d;
  --solar-glow: rgba(247, 154, 5, 0.35);
  --dim: #8aa9c4;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

/* ---------- Lobby ---------- */

.lobby {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(900px 520px at 50% -12%, #1c5c94 0%, var(--bg) 62%),
    var(--bg);
}

.lobby-inner {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 440px;
}

.lobby-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lobby::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(77, 196, 91, 0.5) 0 1.5px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(255, 107, 107, 0.45) 0 2px, transparent 3px);
  background-size: 90px 90px, 70px 70px;
}

.lobby h1 {
  font-size: 50px;
  line-height: 0.95;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--acc-text);
  text-shadow:
    0 2px 0 var(--acc-deep),
    0 8px 26px var(--acc-glow),
    3px 3px 0 rgba(0, 0, 0, 0.85);
}

.lobby h1 small {
  display: block;
  margin-top: 16px;
  font-size: 15px;
  letter-spacing: 0.55em;
  font-weight: 700;
  color: var(--solar-light);
  text-shadow: 0 2px 12px var(--solar-glow);
}

.lobby-sub {
  color: var(--muted);
  max-width: 100%;
  line-height: 1.55;
  font-size: 15px;
}

.lobby-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 26, 48, 0.55);
}

.passport-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.passport-name {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.install-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 340px;
  padding: 7px 10px;
  border: 1px solid var(--solar);
  border-radius: 10px;
  background: rgba(120, 74, 5, 0.18);
}

.install-text {
  flex: 1;
  color: var(--solar-light);
  font-size: 12px;
  line-height: 1.4;
}

.install-yes {
  white-space: nowrap;
  border-color: var(--solar-light);
  background: linear-gradient(180deg, var(--solar-light), var(--solar));
  color: #1a1204;
}

.install-no {
  flex: none;
  opacity: 0.7;
}

.ach-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.ach-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(29, 106, 163, 0.18);
  color: var(--muted);
  cursor: pointer;
}

.ach-item b {
  font-weight: 800;
  white-space: nowrap;
  color: var(--muted);
}

.ach-item span {
  font-size: 12px;
  flex: 1;
  min-width: 0;
}

.ach-ico {
  flex: none;
  display: inline-flex;
  width: 20px;
  height: 20px;
  font-style: normal;
}

.ach-ico svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ach-item:not(.done) .ach-ico {
  filter: grayscale(1);
  opacity: 0.55;
}

.ach-item.done {
  background: rgba(25, 110, 35, 0.22);
  color: var(--acc-text);
}

.ach-item.done b {
  color: var(--acc-text);
}

.pass-body {
  gap: 8px;
}

.pass-art {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.pass-art svg {
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.5));
}

.pass-state {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}

.pass-state.on {
  color: var(--acc-text);
}

.pass-state.just-open {
  color: var(--acc-text);
  animation: passPulse 0.6s ease-out 2;
}

@keyframes passPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.35);
    color: var(--solar-light);
  }
  100% {
    transform: scale(1);
  }
}

.pass-desc {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  color: var(--text);
}

.pass-diff {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pass-diff-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 2px;
}

.pass-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--line-hi);
  background: transparent;
  display: inline-block;
  font-style: normal;
}

.pass-dot.on {
  background: var(--solar);
  border-color: var(--solar-light);
  box-shadow: 0 0 6px var(--solar-glow);
}

.pass-stats {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.pass-how-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: var(--acc-text);
  padding-top: 4px;
}

.pass-how {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  background: rgba(29, 106, 163, 0.14);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
}

.lobby-name {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lobby-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.lobby-name-val {
  font-size: 30px;
  font-weight: 700;
  color: var(--solar-light);
  text-shadow: 0 2px 16px var(--solar-glow);
}

.btn-primary {
  margin-top: 10px;
  padding: 13px 48px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 2px solid var(--acc-deep);
  border-radius: 10px;
  color: #e9f9ec;
  background: linear-gradient(180deg, #2f9c3b, var(--acc) 55%, #0e4a15);
  cursor: pointer;
  box-shadow:
    0 10px 32px rgba(25, 110, 35, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 40px rgba(25, 110, 35, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

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

/* ---------- Game ---------- */

.game {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(23, 95, 143, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
  flex-wrap: nowrap;
  overflow: hidden;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.hud b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  display: inline-block;
  vertical-align: middle;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-name b {
  max-width: none;
}

.hud-name {
  font-weight: 800;
  color: var(--solar-light);
  margin-right: auto;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-item {
  white-space: nowrap;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hud-ico {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: 0.95;
}

.hud-item.hud-sub {
  display: none;
}

.btn-icon {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 9px;
  cursor: pointer;
  font-size: 15px;
}

.btn-icon:hover {
  border-color: var(--line-hi);
}

.layout {
  flex: 1;
  min-height: 0;
  display: flex;
}

.stage {
  flex: 1;
  min-width: 0;
  position: relative;
}

.stage canvas {
  display: block;
  position: absolute;
  inset: 0;
  touch-action: none;
}

.board {
  width: 260px;
  min-width: 248px;
  background: rgba(23, 95, 143, 0.92);
  border-left: 1px solid var(--line);
  padding: 14px 12px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.board h2 {
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--acc-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.board h2::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--acc);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
}

.board-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-hi) transparent;
}

.board-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid transparent;
  font-size: 14px;
}

.board-row .rank {
  width: 22px;
  flex: none;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.board-row .nm {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.board-row .sc {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--acc-text);
}

.board-row .meta {
  color: var(--muted);
  font-size: 12px;
  width: 44px;
  text-align: right;
}

.board-row.is-me {
  background: linear-gradient(90deg, rgba(247, 154, 5, 0.22), rgba(247, 154, 5, 0.05));
  border-color: rgba(247, 154, 5, 0.55);
}

.board-row.is-me .rank {
  color: var(--solar-light);
}

.board-row.is-me .nm {
  color: var(--solar-light);
  font-weight: 800;
}

.board-sep {
  height: 0;
  margin: 2px 0;
  border-top: 1px dashed var(--line);
}

/* ---------- Toasts ---------- */

.toasts {
  position: fixed;
  bottom: 12px;
  right: 14px;
  left: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 50;
  pointer-events: none;
  width: min(280px, 40vw);
}

.toast {
  background: rgba(18, 48, 77, 0.96);
  border: 1px solid var(--line-hi);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-good {
  border-color: rgba(62, 230, 166, 0.55);
  color: var(--mint);
}

.toast-bad {
  border-color: rgba(255, 107, 107, 0.55);
  color: var(--bad);
}

.hint {
  position: fixed;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  background: rgba(7, 21, 39, 0.8);
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  pointer-events: none;
  z-index: 30;
  white-space: nowrap;
}

/* ---------- Net status / rename ---------- */

.net-warn {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: rgba(120, 30, 30, 0.94);
  border: 1px solid rgba(255, 107, 107, 0.7);
  color: #ffd9d9;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  width: max-content;
  max-width: min(92vw, 480px);
  padding: 8px 16px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.displaced-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 9, 18, 0.82);
  backdrop-filter: blur(2px);
}

.displaced-box {
  max-width: min(88vw, 420px);
  padding: 28px 32px;
  border: 1px solid var(--solar);
  border-radius: 20px;
  background: rgba(12, 22, 38, 0.96);
  text-align: center;
  box-shadow: 0 0 0 1px rgba(247, 154, 5, 0.25), 0 24px 60px rgba(0, 0, 0, 0.6);
}

.displaced-title {
  color: var(--solar-light);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.displaced-note {
  color: #b9c6d8;
  font-size: 13px;
  line-height: 1.55;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 9, 18, 0.82);
  backdrop-filter: blur(2px);
}

.confirm-box {
  max-width: min(88vw, 420px);
  padding: 26px 30px;
  border: 1px solid var(--solar);
  border-radius: 20px;
  background: rgba(12, 22, 38, 0.96);
  text-align: center;
  box-shadow: 0 0 0 1px rgba(247, 154, 5, 0.25), 0 24px 60px rgba(0, 0, 0, 0.6);
}

.confirm-title {
  color: var(--solar-light);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.confirm-note {
  color: #b9c6d8;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* Меню паузы сюжетного уровня: три кнопки, на узких экранах — в столбик */
.pause-actions {
  flex-wrap: wrap;
}

.pause-actions .btn {
  flex: 1 1 auto;
  min-width: 120px;
}

@media (max-width: 420px) {
  .pause-actions {
    flex-direction: column;
  }
}

.confirm-no {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.confirm-yes {
  border-color: var(--solar-light);
  background: linear-gradient(180deg, var(--solar-light), var(--solar));
  color: #1a1204;
}

.confirm-yes:hover {
  border-color: #ffd98c;
  box-shadow: 0 6px 18px var(--solar-glow);
}

.btn-link {
  background: none;
  border: none;
  color: var(--line-hi);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
  letter-spacing: 0.04em;
}

.btn-link:hover {
  color: var(--text);
}

.btn-rename {
  text-decoration: none;
  padding: 1px 2px;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  border-radius: 0;
}

.btn-rename svg {
  display: block;
}

.btn-rename:hover {
  filter: brightness(1.12);
}

.btn-rename:disabled {
  opacity: 0.5;
  cursor: default;
}

.rename-hint {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Lobby actions / stats ---------- */

.lobby-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.lobby-menu {
  position: relative;
}

#menuField {
  display: block;
  touch-action: manipulation;
  cursor: pointer;
  border-radius: 10px;
}

.lobby-style {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.style-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.style-choice {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.style-choice:hover {
  border-color: var(--line-hi);
  color: var(--text);
}

.style-choice:active {
  transform: scale(0.96);
}

.style-choice.is-active {
  color: #1a1206;
  border-color: var(--solar-light);
  background: linear-gradient(180deg, var(--solar-light), var(--solar));
}

.lobby-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--dim);
  opacity: 0.75;
  letter-spacing: 0.04em;
}

.lobby-contact {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.5;
}

.lobby-contact a {
  color: var(--solar-light);
  text-decoration: none;
  border-bottom: 1px dashed rgba(247, 154, 5, 0.4);
}

.btn {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  border-color: var(--line-hi);
  box-shadow: 0 6px 18px rgba(23, 95, 143, 0.4);
}

.btn:active {
  transform: scale(0.96);
}

.btn-mini {
  padding: 4px 10px;
  font-size: 12px;
}

.lobby-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.stats-online {
  font-size: 13px;
  color: var(--muted);
}

.stats-online b {
  color: var(--acc-text);
  font-weight: 800;
}

.lobby-leaders {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.leaders-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.stats-row {
  color: var(--muted);
  font-size: 13px;
}

.stats-row b {
  color: var(--acc-text);
  font-weight: 800;
}

.stats-top-head {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acc-text);
  text-align: center;
  padding: 10px 0 2px;
  border-top: 1px solid var(--line);
}

.stats-tops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.stats-medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(247, 154, 5, 0.18), rgba(247, 154, 5, 0.07));
  border: 1px solid rgba(255, 193, 77, 0.45);
}

.stats-medal-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--solar);
}

.stats-medal-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--solar-light);
  text-shadow: 0 2px 16px var(--solar-glow);
}

.stats-medal-meta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.stats-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}

.stats-meta img {
  width: 14px;
  height: 14px;
  flex: none;
  opacity: 0.95;
}

.stats-top {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: left;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(29, 106, 163, 0.16);
  border: 1px solid var(--line);
}

.stats-top-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc-text);
  margin-bottom: 1px;
}

.stats-top-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--solar-light);
  text-shadow: 0 2px 14px var(--solar-glow);
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-top-who {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.stats-top-you {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #06210f;
  background: var(--acc-text);
  border-radius: 999px;
  padding: 1px 6px;
}

.stats-top.is-main {
  border-color: rgba(255, 193, 77, 0.5);
  background: linear-gradient(180deg, rgba(247, 154, 5, 0.14), rgba(247, 154, 5, 0.05));
}

.stats-top-row {
  font-size: 12px;
  color: var(--text);
}

.stats-top-row b {
  color: var(--text);
}

.stats-top-meta {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
}

.stats-top-empty {
  font-size: 12px;
  color: var(--muted);
}

.stats-changed {
  animation: statsPulse 0.85s ease-out;
}

@keyframes statsPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 77, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 193, 77, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 77, 0);
  }
}

/* ---------- Screens ---------- */

.screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 520px at 50% -12%, #1c5c94 0%, var(--bg) 62%),
    var(--bg);
}

.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(23, 95, 143, 0.92);
  border-bottom: 1px solid var(--line);
}

.screen-head h2 {
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--acc-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}

/* Дети не должны СЖИМАТЬСЯ. Иначе во flex-колонке высокий экран «Правил» (у
   <details> стоит overflow:hidden, а значит min-height:0) схлопывал разделы до
   заголовков и обрезал текст БЕЗ полосы прокрутки. `.story-map-wrap` исключён —
   ему нужен `flex: 1 1 0` (занимает остаток высоты). */
.screen-body > * {
  width: min(92vw, 520px);
}

.screen-body > *:not(.story-map-wrap) {
  flex: 0 0 auto;
}

.screen-count {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.record-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(29, 106, 163, 0.16);
  border: 1px solid var(--line);
}

.record-row.mine {
  background: linear-gradient(90deg, rgba(25, 110, 35, 0.32), rgba(25, 110, 35, 0.06));
  border-color: rgba(25, 110, 35, 0.7);
}

.record-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.record-info b {
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-info span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-score {
  color: var(--acc-text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.help-body details {
  background: rgba(29, 106, 163, 0.14);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.help-body summary {
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 800;
  color: var(--acc-text);
  letter-spacing: 0.04em;
  user-select: none;
}

.help-body details[open] summary {
  border-bottom: 1px solid var(--line);
  background: rgba(29, 106, 163, 0.2);
}

.help-body details p {
  padding: 8px 14px 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.help-body details p + p {
  padding-top: 0;
}

.help-fig {
  padding: 12px 14px 0;
}

.help-fig svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.replay-wrap {
  flex: none;
  position: relative;
  width: min(92vw, 440px);
  height: min(52vh, 380px);
}

.replay-wrap canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rep-note {
  min-height: 18px;
  color: var(--acc-text);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  max-width: min(92vw, 440px);
}

.replay-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.demo-nav {
  margin-top: 6px;
  align-items: center;
}

.demo-nav span {
  color: var(--acc-text);
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

#mineTop,
#mineLast {
  width: min(92vw, 440px);
  text-align: left;
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .lobby {
    justify-content: flex-start;
    overflow-y: auto;
    gap: 10px;
    padding: 14px 12px 10px;
  }

  .lobby h1 {
    font-size: 34px;
  }

  .lobby h1 small {
    margin-top: 12px;
    font-size: 11px;
    letter-spacing: 0.4em;
  }

  .lobby-sub {
    font-size: 12px;
    max-width: 300px;
    line-height: 1.45;
  }

  .lobby-inner {
    gap: 12px;
  }

  .lobby-name-val {
    font-size: 26px;
  }

  .lobby-actions {
    gap: 8px;
  }

  .lobby-stats {
    gap: 6px;
  }

  .stats-row {
    font-size: 11px;
  }

  .lobby-footer {
    margin-top: 2px;
    font-size: 10px;
  }

  .lobby-contact {
    font-size: 10px;
  }

  .hud {
    gap: 6px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .hud-item:not(.hud-name) b {
    max-width: 48px;
  }

  .hud-name {
    max-width: 33vw;
  }

  .hud-item.hud-sub {
    display: none;
  }

  .toasts {
    right: 50%;
    transform: translateX(50%);
    align-items: center;
    width: min(92vw, 400px);
    bottom: 12px;
  }

  .layout {
    flex-direction: column;
  }

  .board {
    width: 100%;
    min-width: 0;
    height: 38%;
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .board h2 {
    margin-bottom: 8px;
  }

  .hint {
    display: none;
  }
}

/* ---------- Story mode ---------- */

.story-bar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 12px 8px;
  background: linear-gradient(180deg, rgba(247, 154, 5, 0.14), rgba(247, 154, 5, 0.02));
  border-bottom: 1px solid rgba(247, 154, 5, 0.28);
  text-align: center;
}

.story-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.story-bar-head b {
  color: var(--solar-light);
  font-size: 15px;
  letter-spacing: 0.03em;
}

.story-par {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.story-goal {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.story-fail {
  color: #ff9d8a;
  font-size: 12px;
  line-height: 1.35;
  min-height: 0;
}

/* Цвета в подсказках — плашками, а не текстом. Тёмные оттенки на тёмном фоне
   читаются за счёт светлой внутренней каймы. */
.hint-swatch {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  vertical-align: -0.13em;
  margin: 0 1px;
}

.hint-swatch-label {
  color: var(--muted);
  margin: 0 2px 0 5px;
}

.story-fig-count {
  color: var(--solar-light);
  font-weight: 700;
  white-space: nowrap;
}

.story-room {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.story-room-row {
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(29, 106, 163, 0.16);
  border: 1px solid var(--line);
}

.story-room-row.mine {
  background: linear-gradient(90deg, rgba(247, 154, 5, 0.26), rgba(247, 154, 5, 0.04));
  border-color: rgba(247, 154, 5, 0.6);
}

.story-room-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.story-room-name {
  color: var(--solar-light);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-room-meta {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.story-room-bar {
  margin-top: 5px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 243, 210, 0.14);
  overflow: hidden;
}

.story-room-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--acc), var(--solar-light));
}

/* ---------- Благодарности ---------- */

.credits-body {
  gap: 16px;
}

.credits-text {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}

.credits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.credits-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
}

.credits-ava {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--solar);
  background: #0d2a48;
}

.credits-name {
  color: var(--solar-light);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.credits-note {
  color: var(--dim);
  font-size: 13px;
  text-align: center;
  font-style: italic;
}

/* ---------- Свободный режим ---------- */

.lobby-free {
  display: flex;
  justify-content: center;
}

.btn-free {
  --cut-line: rgba(62, 230, 166, 0.5);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.free-body {
  gap: 14px;
}

.free-note {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}

.free-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.free-chooser {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.free-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.free-stepper b {
  min-width: 26px;
  text-align: center;
  font-size: 20px;
  color: var(--solar-light);
}

.free-dim {
  color: var(--muted);
  font-size: 12px;
  min-width: 52px;
  text-align: right;
}

.free-step {
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
}

.free-range {
  width: min(88vw, 360px);
  accent-color: var(--solar);
}

.free-range-marks {
  width: min(88vw, 360px);
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 11px;
}

.free-check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
  width: min(88vw, 360px);
}

.free-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--solar);
  cursor: pointer;
}

.free-preview {
  display: flex;
  justify-content: center;
  width: 100%;
}

.free-preview-canvas {
  display: block;
  border-radius: 12px;
  background: radial-gradient(120px 90px at 50% 40%, #14395c, #081a30);
}

/* Список рекордов — в ОБЩЕЙ колонке экрана: у `.free-board` не должно быть
   `width: 100%`, иначе он перебивал бы общий кап `.screen-body > *` (одинаковая
   специфичность, правило ниже по файлу) и рекорды разъезжались по краям экрана
   (имя слева, счёт справа). */
.free-board {
  width: min(92vw, 520px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.free-board-head {
  color: var(--acc-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.free-board-head .screen-count {
  display: inline;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

#freeBoardList {
  max-height: 200px;
  overflow-y: auto;
}

.free-start {
  width: min(88vw, 360px);
  font-size: 16px;
  padding: 12px;
}

.story-body {
  gap: 10px;
}

/* Экран сюжета: заголовки сверху, описание уровня и кнопки — прибиты к низу,
   между ними карта. Поле листается само: соты нормального размера (в игровом
   масштабе, R = clamp(26, 56, (ширина-20)/6)), высота НЕ подгоняется под
   остаток экрана — иначе с 30 уровнями и ветками гексы сжимаются до
   нечитаемых, и 5 звёзд в соту не влезают. `flex: 1 1 0` отдаёт полю весь
   остаток; `min-height` — нижний предел, дальше скроллится сам .screen-body.
   Второй ярус растёт ВБОК от 15-го уровня, поэтому карта может быть ШИРЕ
   вьюпорта — `overflow-x: auto` листает её и по горизонтали (заголовок, лог,
   кнопки остаются на месте). `scrollbar-gutter: stable` резервирует место под
   вертикальную полосу, чтобы при её появлении контент не дёргался. */
.story-map-wrap {
  flex: 1 1 0;
  min-height: 140px;
  width: min(92vw, 460px);
  position: relative;
  overflow-y: auto;
  overflow-x: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 243, 210, 0.16) transparent;
  border-radius: 10px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(29, 106, 163, 0.18), rgba(8, 26, 48, 0) 70%);
}

/* Полоса прокрутки карты — фон интерфейса, не элемент: на десктопе контрастная
   полоса оттягивала внимание от сот. Тонкий тёмный бегунок на прозрачном треке,
   ярче только под курсором. На тач-экранах полосы нет — не мешает. */
.story-map-wrap::-webkit-scrollbar {
  width: 8px;
}

.story-map-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.story-map-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 243, 210, 0.14);
  border-radius: 4px;
}

.story-map-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 243, 210, 0.3);
}

.story-map {
  display: block;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.story-map:active {
  cursor: grabbing;
}

.story-map-hint {
  margin-bottom: -4px;
  width: min(92vw, 460px);
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
  text-align: center;
}

/* Слой «кто где» поверх канваса карты: плашки у сот. Лежит внутри
   .story-map-wrap и скроллится/панорамируется вместе с полотном. Клики не
   перехватывает — выбор соты идёт через канвас. */
.story-presence {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.story-pp {
  position: absolute;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.08em 0.55em;
  border-radius: 999px;
  background: rgba(6, 16, 31, 0.72);
  border: 1px solid rgba(88, 150, 205, 0.4);
  color: #cfe3f5;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.story-pp.live {
  border-color: rgba(247, 154, 5, 0.85);
  color: #ffe6b0;
}

.story-pp-name.mine {
  color: var(--solar);
}

.story-pp-sep {
  opacity: 0.6;
  margin: 0 0.12em;
}

.story-pp-dot {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: #5b6b7d;
  flex: 0 0 auto;
}

.story-pp-dot.on {
  background: var(--solar);
  animation: storyPresencePulse 1.1s ease-in-out infinite;
}

@keyframes storyPresencePulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.story-presence-panel {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(88, 150, 205, 0.24);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.story-presence-panel b {
  color: var(--acc);
}

.story-presence-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 13px;
  color: var(--muted);
}

.story-presence-row.live {
  color: var(--solar-light);
}

.story-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: min(92vw, 460px);
}

.story-max-stars {
  font-size: 12px;
  color: var(--solar-light);
  opacity: 0.85;
  white-space: nowrap;
}

.story-reset {
  width: min(92vw, 460px);
  margin: 0 auto;
  font-size: 12px;
  opacity: 0.72;
}

.btn-quiet {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.btn-quiet:hover {
  opacity: 1;
  color: var(--text);
}

.story-level-info {
  width: min(92vw, 460px);
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(29, 106, 163, 0.16);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.story-level-info b {
  color: var(--solar-light);
  font-size: 14px;
}

.story-level-info .story-info-goal {
  color: var(--text);
  margin-top: 4px;
}

.story-level-info .story-info-fail {
  color: #ff9d8a;
  margin-top: 2px;
}

.story-level-info .story-info-lock {
  color: #ff9d8a;
  margin-top: 4px;
}

.story-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: min(92vw, 460px);
  position: sticky;
  bottom: 0;
  padding-top: 8px;
  padding-bottom: 4px;
  background: linear-gradient(180deg, rgba(8, 26, 48, 0), rgba(8, 26, 48, 0.92) 40%);
}

.story-actions .btn {
  flex: 1;
}

.story-level-info {
  overflow-wrap: anywhere;
}

.story-result-box {
  max-width: min(92vw, 420px);
}

#storyResultNote {
  white-space: pre-line;
}

.story-stars {
  font-size: 34px;
  letter-spacing: 6px;
  color: var(--solar-light);
  text-shadow: 0 0 14px rgba(247, 154, 5, 0.6);
  text-align: center;
  min-height: 40px;
}

.story-stars .off {
  color: rgba(255, 243, 210, 0.18);
  text-shadow: none;
}

@media (max-width: 760px) {
  .story-bar-head b {
    font-size: 14px;
  }

  .story-goal {
    font-size: 12px;
  }

  .story-par {
    font-size: 11px;
    max-width: 58%;
  }

  .story-map-wrap {
    width: min(94vw, 420px);
  }

  .story-map-hint {
    font-size: 10px;
  }

  .story-level-info {
    font-size: 12px;
    padding: 8px 10px;
    line-height: 1.4;
  }

  .story-level-info b {
    font-size: 13px;
  }
}

/* Десктоп: карта сюжета разворачивается и занимает всё свободное место по
   ширине, соты при этом крупнее (R подбирается под ширину в HexStory.mapLayout).
   Текст, описание и кнопки держим читаемой колонкой, а поле — заметно шире,
   чтобы карта была главным на экране. */
@media (min-width: 761px) {
  .story-body > * {
    width: min(96vw, 860px);
  }

  .story-body .story-map-wrap,
  .story-body .story-map-hint {
    width: min(96vw, 1900px);
  }

  .story-body .story-actions {
    width: min(96vw, 560px);
  }
}
/* =====================================================================
   Скошенные углы: вместо скруглений — прямая линия (фаска).
   .cut-подход: сама плашка залита цветом «рамки», а верхний слой ::after
   (inset на толщину линии) залит цветом фона. Оба клипуются одним
   полигоном, поэтому кайма идёт и по косым углам. Плюс `isolation`, чтобы
   отрицательный z-index ::after не «улетел» за плашку.
   ===================================================================== */
:root {
  --cut: 9px;
  --cutbw: 1.5px;
  --cut-path: polygon(
    var(--cut) 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut)),
    0 var(--cut)
  );
}

.btn,
.btn-primary,
.btn-icon,
.style-choice,
.lobby-card,
.install-banner,
.board-row,
.record-row,
.stats-top,
.ach-item,
.pass-how,
.story-room-row,
.story-level-info,
.credits-item,
.help-body details,
.toast,
.hint,
.net-warn,
.displaced-box,
.confirm-box {
  border: none !important;
  border-radius: 0 !important;
  background: var(--cut-line, var(--line)) !important;
  clip-path: var(--cut-path);
  isolation: isolate;
}

.btn::after,
.btn-primary::after,
.btn-icon::after,
.style-choice::after,
.lobby-card::after,
.install-banner::after,
.board-row::after,
.record-row::after,
.stats-top::after,
.ach-item::after,
.pass-how::after,
.story-room-row::after,
.story-level-info::after,
.credits-item::after,
.help-body details::after,
.toast::after,
.hint::after,
.net-warn::after,
.displaced-box::after,
.confirm-box::after {
  content: "";
  position: absolute;
  inset: var(--cutbw);
  z-index: -1;
  background: var(--cut-bg, var(--panel));
  clip-path: var(--cut-path);
  pointer-events: none;
}

/* Контейнер для слоя заливки (кроме position:fixed подсказок). */
.btn,
.btn-primary,
.btn-icon,
.style-choice,
.lobby-card,
.install-banner,
.board-row,
.record-row,
.stats-top,
.ach-item,
.pass-how,
.story-room-row,
.story-level-info,
.credits-item,
.help-body details,
.toast,
.displaced-box,
.confirm-box {
  position: relative;
}

/* Цвета каймы/заливки по компонентам.
   ВАЖНО: если заливка полупрозрачная, сквозь неё просвечивает цвет каймы
   (он залит под ::after) — панель светлеет, текст теряется. Поэтому заливки
   делаем НЕПРОЗРАЧНЫМИ (композит оригинала над тёмным фоном). */
.lobby-card { --cut: 14px; --cut-bg: #0b2240; }

.install-banner { --cut-line: var(--solar); --cut-bg: #241d0e; }

.btn { --cut-bg: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.btn:hover { --cut-line: var(--line-hi); }
.btn-mini { --cut: 6px; }
.btn-quiet { --cut-line: var(--line); --cut-bg: transparent; }

.btn-icon { --cut: 7px; --cut-bg: var(--panel-2); }
.btn-icon:hover { --cut-line: var(--line-hi); }

.btn-primary {
  --cut: 11px;
  --cutbw: 2px;
  --cut-line: var(--acc-deep);
  --cut-bg: linear-gradient(180deg, #2f9c3b, var(--acc) 55%, #0e4a15);
}

.confirm-no { --cut-bg: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.confirm-yes { --cut-line: var(--solar-light); --cut-bg: linear-gradient(180deg, var(--solar-light), var(--solar)); }
.confirm-yes:hover { --cut-line: #ffd98c; }

.style-choice { --cut: 8px; --cut-bg: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.style-choice:hover { --cut-line: var(--line-hi); }
.style-choice.is-active {
  --cut-line: var(--solar-light);
  --cut-bg: linear-gradient(180deg, var(--solar-light), var(--solar));
}

.board-row { --cut: 7px; --cut-line: transparent; --cut-bg: var(--panel-2); }
.board-row.is-me {
  --cut-line: rgba(247, 154, 5, 0.55);
  --cut-bg: linear-gradient(90deg, #3e392c, #162537);
}

.record-row { --cut: 8px; --cut-bg: #0d2a48; }
.record-row.mine {
  --cut-line: rgba(25, 110, 35, 0.7);
  --cut-bg: linear-gradient(90deg, #0f3831, #0b2336);
}

.stats-top { --cut-bg: #0d2a48; }
.stats-top.is-main {
  --cut-line: rgba(255, 193, 77, 0.5);
  --cut-bg: linear-gradient(180deg, #2b2f30, #162434);
}

.ach-item { --cut: 7px; --cut-line: transparent; --cut-bg: rgba(29, 106, 163, 0.18); }
.ach-item.done { --cut-bg: rgba(25, 110, 35, 0.22); }

.pass-how { --cut-bg: #0d2a48; }

.story-room-row { --cut: 7px; --cut-bg: #0d2a48; }
.story-room-row.mine {
  --cut-line: rgba(247, 154, 5, 0.6);
  --cut-bg: linear-gradient(90deg, #483e2a, #142335);
}

.story-level-info { --cut-bg: #0d2a48; }

.credits-item { --cut: 10px; --cut-line: rgba(247, 154, 5, 0.4); --cut-bg: #0d2a48; }

.help-body details { --cut-bg: #0d2a48; }

.toast { --cut: 7px; --cut-line: var(--line-hi); --cut-bg: #12304d; }
.toast-good { --cut-line: rgba(62, 230, 166, 0.55); }
.toast-bad { --cut-line: rgba(255, 107, 107, 0.55); }

.hint { --cut: 8px; --cut-bg: #0d2033; }

.net-warn { --cut: 10px; --cut-line: rgba(255, 107, 107, 0.7); --cut-bg: #7a2020; }

.displaced-box,
.confirm-box {
  --cut: 16px;
  --cut-line: var(--solar);
  --cut-bg: #0d1727;
}
