:root {
  --bg: #101114;
  --surface: #17191f;
  --surface-2: #1f222b;
  --surface-3: #262a33;
  --line: #343945;
  --muted: #9aa3b2;
  --text: #f2f5f8;
  --green: #30d27c;
  --green-2: #139b5b;
  --cyan: #39c2ff;
  --amber: #ffbf3f;
  --coral: #ff6f61;
  --violet: #9b8cff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(48, 210, 124, 0.08), transparent 30%),
    linear-gradient(30deg, rgba(255, 191, 63, 0.07), transparent 34%),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(16, 17, 20, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(48, 210, 124, 0.55);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(48, 210, 124, 0.28), rgba(57, 194, 255, 0.14));
  color: #ffffff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.muted,
.safety-note,
.mini-ledger small,
.ops-grid small {
  color: var(--muted);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--surface-2);
  color: var(--text);
}

.icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--green);
}

.account-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-block strong {
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1;
}

.level-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #2a2e37;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 240ms ease;
}

.progress-track.large {
  height: 12px;
}

.safety-note {
  margin: auto 0 0;
  padding: 12px;
  border: 1px solid rgba(255, 191, 63, 0.28);
  border-radius: 8px;
  background: rgba(255, 191, 63, 0.08);
  font-size: 12px;
  line-height: 1.55;
}

.main-shell {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 17, 20, 0.84);
  backdrop-filter: blur(16px);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
}

h3 {
  font-size: 16px;
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions,
.section-head,
.tool-strip,
.game-actions,
.entry-row,
.rocket-meter-line,
.dice-result,
.grid-actions,
.toast,
.ledger-row,
.leaderboard li {
  display: flex;
  align-items: center;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.session-chip {
  display: grid;
  min-height: 40px;
  min-width: 128px;
  justify-content: start;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.session-chip span {
  font-size: 13px;
  font-weight: 900;
}

.session-chip small {
  color: var(--muted);
  font-size: 11px;
}

.device-preview {
  display: flex;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  scrollbar-width: thin;
}

.device-preview button {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.device-preview button.is-active {
  background: var(--green);
  color: #06140d;
}

#adminModeBtn.is-active {
  border-color: rgba(48, 210, 124, 0.62);
  background: rgba(48, 210, 124, 0.16);
}

.button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.button {
  min-height: 40px;
  padding: 0 14px;
  font-weight: 800;
}

.button.primary {
  background: var(--green);
  color: #06140d;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface-2);
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.button.wide {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button:not(:disabled):hover,
.icon-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-color: var(--line);
  background: var(--surface-2);
  font-weight: 900;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 24px 28px 40px;
}

.content-grid > * {
  min-width: 0;
}

body[data-surface="player"] [data-admin-surface],
body[data-surface="admin"] [data-player-surface] {
  display: none !important;
}

body[data-surface="admin"] .content-grid {
  grid-template-columns: 1fr;
}

body[data-surface="admin"] .admin-surface {
  grid-column: 1 / -1;
}

.workspace,
.right-rail {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
}

.workspace > *,
.right-rail > * {
  min-width: 0;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 18px;
  min-height: 248px;
  padding: 28px;
  border: 1px solid rgba(48, 210, 124, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(105deg, rgba(48, 210, 124, 0.18), transparent 44%),
    radial-gradient(circle at 80% 20%, rgba(255, 191, 63, 0.24), transparent 28%),
    linear-gradient(135deg, #17191f, #20232d);
  box-shadow: var(--shadow);
}

.hero-band h2 {
  max-width: 720px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.hero-band p:not(.eyebrow) {
  max-width: 700px;
  margin-top: 16px;
  color: #cbd2dd;
  line-height: 1.65;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: end;
}

.hero-stats span {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(16, 17, 20, 0.5);
}

.hero-stats strong {
  overflow-wrap: anywhere;
  font-size: clamp(20px, 4vw, 28px);
}

.hero-stats small {
  color: var(--muted);
}

.announcement-strip {
  display: grid;
  gap: 10px;
}

.announcement-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(57, 194, 255, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(57, 194, 255, 0.12), rgba(48, 210, 124, 0.08)), #14171d;
}

.announcement-card.event {
  border-color: rgba(255, 191, 63, 0.35);
  background: linear-gradient(135deg, rgba(255, 191, 63, 0.12), rgba(48, 210, 124, 0.08)), #14171d;
}

.announcement-card span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.announcement-card strong,
.announcement-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-card small {
  color: var(--muted);
}

.tool-strip {
  justify-content: space-between;
  gap: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  max-width: 420px;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.search-box input {
  width: 100%;
  height: 100%;
  min-height: 40px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.segmented button.is-active {
  background: var(--surface-3);
  color: var(--text);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.quick-game-rail {
  display: grid;
  gap: 10px;
}

.quick-game-rail[hidden] {
  display: none;
}

.quick-game-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.quick-game-head small {
  color: var(--muted);
  font-weight: 700;
}

.quick-game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.quick-game {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.quick-game.is-active,
.quick-game:hover {
  border-color: rgba(48, 210, 124, 0.55);
  background: #1b1f26;
}

.quick-game-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--surface-3);
  font-weight: 900;
}

.quick-game span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.quick-game strong,
.quick-game small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-game small {
  color: var(--muted);
}

.game-card,
.panel,
.active-game {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 25, 31, 0.9);
}

.game-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 242px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.favorite-game {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.74);
  color: #f4d35e;
  font-size: 18px;
  font-weight: 900;
}

.favorite-game.is-active,
.icon-button.is-active {
  border-color: rgba(244, 211, 94, 0.65);
  background: rgba(244, 211, 94, 0.14);
  color: #f4d35e;
}

.game-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-favorite {
  color: #f4d35e;
}

.game-card:hover,
.game-card.is-active {
  border-color: rgba(48, 210, 124, 0.6);
  background: #1b1f26;
}

.game-art {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  border-radius: 8px;
  background: var(--surface-2);
}

.game-art::before,
.game-art::after {
  position: absolute;
  content: "";
}

.game-art::before {
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.game-art::after {
  width: 72px;
  height: 72px;
  right: 18px;
  bottom: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(18deg);
}

.game-card[data-game="dice"] .game-art {
  background:
    linear-gradient(135deg, rgba(48, 210, 124, 0.8), transparent),
    #1f2b24;
}

.game-card[data-game="mines"] .game-art {
  background:
    linear-gradient(135deg, rgba(255, 191, 63, 0.85), transparent),
    #2d2719;
}

.game-card[data-game="plinko"] .game-art {
  background:
    linear-gradient(135deg, rgba(57, 194, 255, 0.78), transparent),
    #172934;
}

.game-card[data-game="rocket"] .game-art {
  background:
    linear-gradient(135deg, rgba(255, 111, 97, 0.78), transparent),
    #33201e;
}

.game-card[data-game="mole"] .game-art {
  background:
    linear-gradient(135deg, rgba(48, 210, 124, 0.74), transparent 54%),
    linear-gradient(28deg, rgba(255, 191, 63, 0.32), transparent),
    #1c2a20;
}

.game-card[data-game="keno"] .game-art {
  background:
    linear-gradient(135deg, rgba(57, 194, 255, 0.62), transparent),
    linear-gradient(28deg, rgba(48, 210, 124, 0.34), transparent),
    #172634;
}

.game-card[data-game="limbo"] .game-art {
  background:
    linear-gradient(135deg, rgba(255, 191, 63, 0.72), transparent),
    #2f2817;
}

.game-card[data-game="pump"] .game-art {
  background:
    linear-gradient(135deg, rgba(255, 92, 122, 0.66), transparent),
    linear-gradient(28deg, rgba(57, 194, 255, 0.22), transparent),
    #2b1b24;
}

.game-card[data-game="echo"] .game-art {
  background:
    linear-gradient(135deg, rgba(139, 122, 255, 0.68), transparent),
    linear-gradient(28deg, rgba(48, 210, 124, 0.22), transparent),
    #211f34;
}

.game-card[data-game="trail"] .game-art {
  background:
    linear-gradient(135deg, rgba(48, 210, 124, 0.56), transparent),
    linear-gradient(28deg, rgba(255, 191, 63, 0.32), transparent),
    #1f2d25;
}

.game-card[data-game="beat"] .game-art {
  background:
    linear-gradient(135deg, rgba(255, 92, 122, 0.58), transparent),
    linear-gradient(28deg, rgba(139, 122, 255, 0.36), transparent),
    #2e1e30;
}

.game-icon {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-size: 48px;
  font-weight: 900;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-signal {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.game-card p {
  color: #c9d0db;
  line-height: 1.45;
}

.active-game,
.panel {
  padding: 18px;
}

.game-detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.game-detail-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.game-detail-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--surface-3);
  font-size: 22px;
  font-weight: 900;
}

.game-detail-copy span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.game-detail-copy strong {
  line-height: 1.35;
}

.game-detail-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.game-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.game-detail-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.game-detail-stats strong {
  font-size: 17px;
}

.game-detail-stats small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.game-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
}

.section-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.game-stage {
  display: grid;
  gap: 16px;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.control-panel,
.visual-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.control-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.visual-panel {
  overflow: hidden;
  padding: 16px;
}

.entry-row {
  justify-content: space-between;
  gap: 12px;
}

.entry-row label {
  display: grid;
  gap: 6px;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
}

.entry-row input[type="number"],
.range-label select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 10px;
}

.range-label {
  display: grid;
  gap: 8px;
}

.range-label input {
  width: 100%;
}

.range-label input[type="range"] {
  min-height: 32px;
}

.game-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.dice-arena {
  display: grid;
  place-items: center;
  min-height: 300px;
}

.dice-number {
  display: grid;
  width: min(260px, 70vw);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(48, 210, 124, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(48, 210, 124, 0.18), rgba(57, 194, 255, 0.1)),
    var(--surface-2);
  color: white;
  font-size: clamp(64px, 13vw, 116px);
  font-weight: 900;
}

.dice-result {
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.grid-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(36px, 1fr));
  gap: 8px;
  width: min(520px, 100%);
  margin: 0 auto;
}

.tile {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 900;
}

.tile.safe {
  border-color: rgba(48, 210, 124, 0.7);
  background: rgba(48, 210, 124, 0.16);
}

.tile.trap {
  border-color: rgba(255, 111, 97, 0.75);
  background: rgba(255, 111, 97, 0.18);
}

.tile:disabled:not(.safe):not(.trap) {
  opacity: 0.65;
}

.plinko-wrap {
  display: grid;
  gap: 12px;
}

canvas {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10131a;
}

.slot-row {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
}

.slot-row span {
  min-width: 0;
  padding: 8px 4px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.slot-row span.hit {
  background: var(--green);
  color: #06140d;
}

.keno-layout,
.limbo-layout,
.pump-layout {
  grid-template-columns: minmax(260px, 350px) minmax(0, 1fr);
}

.keno-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.keno-summary span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.keno-summary strong {
  font-size: 20px;
}

.keno-summary small {
  color: var(--muted);
  font-size: 12px;
}

.keno-arena {
  display: grid;
  min-height: 360px;
  place-items: center;
}

.keno-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(42px, 1fr));
  gap: 8px;
  width: min(640px, 100%);
}

.keno-cell {
  display: grid;
  min-height: 48px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 900;
  touch-action: manipulation;
}

.keno-cell.is-selected {
  border-color: rgba(57, 194, 255, 0.75);
  background: rgba(57, 194, 255, 0.16);
}

.keno-cell.is-drawn {
  border-color: rgba(255, 191, 63, 0.55);
  background: rgba(255, 191, 63, 0.15);
}

.keno-cell.is-hit {
  border-color: rgba(48, 210, 124, 0.8);
  background: var(--green);
  color: #07120d;
  box-shadow: 0 0 0 3px rgba(48, 210, 124, 0.18);
}

.limbo-arena {
  display: grid;
  min-height: 340px;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(57, 194, 255, 0.08), transparent),
    #11161d;
}

.limbo-scale {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(540px, 100%);
  color: var(--muted);
  font-size: 12px;
}

.limbo-scale b {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: var(--surface-2);
}

.limbo-scale i,
.limbo-scale b::before {
  content: "";
  display: block;
  width: var(--limbo-level, 4%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--coral));
}

.limbo-result-value {
  font-size: clamp(54px, 14vw, 104px);
  font-weight: 900;
}

.limbo-target-line {
  color: var(--muted);
  font-weight: 800;
}

.limbo-arena.is-success .limbo-result-value {
  color: var(--green);
}

.limbo-arena.is-miss .limbo-result-value {
  color: var(--coral);
}

.pump-arena {
  display: grid;
  min-height: 360px;
  place-items: center;
  background:
    radial-gradient(circle at center 45%, rgba(255, 92, 122, 0.12), transparent 38%),
    #11161d;
}

.pump-value {
  font-size: clamp(46px, 12vw, 86px);
  font-weight: 900;
}

.pump-gauge {
  position: relative;
  display: grid;
  width: min(260px, 70vw);
  aspect-ratio: 1;
  place-items: center;
}

.pump-balloon {
  width: clamp(92px, var(--pump-pressure, 18%), 230px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 52% 52% 48% 48%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.36), transparent 16%),
    linear-gradient(180deg, #ff6b8a, #b52d55);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.35);
  transition: width 160ms linear, transform 160ms linear;
}

.pump-base {
  position: absolute;
  bottom: 18px;
  width: 96px;
  height: 22px;
  border-radius: 999px;
  background: #39414c;
}

.pump-arena.is-burst .pump-balloon {
  transform: scale(1.08) rotate(-4deg);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.36), transparent 16%),
    linear-gradient(180deg, #ffbf3f, #ff5c7a);
}

.rocket-arena {
  display: grid;
  gap: 16px;
  min-height: 300px;
  align-content: center;
}

.rocket-meter {
  position: relative;
  overflow: hidden;
  height: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(to top, rgba(48, 210, 124, 0.12), transparent),
    repeating-linear-gradient(to top, transparent 0 27px, rgba(255, 255, 255, 0.06) 28px),
    #11141b;
}

.rocket-path {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--rocket-width, 8%);
  height: 100%;
  background: linear-gradient(90deg, rgba(48, 210, 124, 0.38), transparent);
  transition: width 80ms linear;
}

.rocket-ship {
  position: absolute;
  left: calc(var(--rocket-width, 8%) - 22px);
  bottom: calc(var(--rocket-height, 8%) - 18px);
  font-size: 34px;
  transition:
    left 80ms linear,
    bottom 80ms linear;
}

.rocket-crashed .rocket-path {
  background: linear-gradient(90deg, rgba(255, 111, 97, 0.45), transparent);
}

.rocket-value {
  font-size: clamp(42px, 10vw, 82px);
  font-weight: 900;
  text-align: center;
}

.rocket-meter-line {
  justify-content: space-between;
  color: var(--muted);
}

.mole-layout {
  grid-template-columns: minmax(260px, 360px) minmax(360px, 1fr);
}

.mole-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mole-stats span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.mole-stats strong {
  font-size: 20px;
}

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

.mole-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.mole-meta span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.mole-timer {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #2a2e37;
}

.mole-timer span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--coral));
  transition: width 120ms linear;
}

.mole-arena {
  display: grid;
  min-height: 420px;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(48, 210, 124, 0.08), transparent 45%),
    #11161a;
}

.mole-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: clamp(10px, 2vw, 18px);
  width: min(560px, 100%);
}

.mole-hole {
  position: relative;
  overflow: hidden;
  display: grid;
  aspect-ratio: 1.18;
  place-items: end center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at center 78%, rgba(0, 0, 0, 0.64) 0 34%, transparent 36%),
    linear-gradient(180deg, #243528, #162019);
  cursor: pointer;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.mole-hole:disabled {
  cursor: default;
}

.mole-hole:active:not(:disabled) {
  transform: translateY(2px);
}

.mole-dirt {
  position: absolute;
  right: 12%;
  bottom: 13%;
  left: 12%;
  height: 22%;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 191, 63, 0.18), transparent),
    #4b3925;
  box-shadow: inset 0 8px 18px rgba(0, 0, 0, 0.35);
}

.mole-face {
  position: relative;
  bottom: -42%;
  display: grid;
  width: 54%;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 46% 46% 40% 40%;
  background:
    radial-gradient(circle at 34% 40%, #111 0 5%, transparent 6%),
    radial-gradient(circle at 66% 40%, #111 0 5%, transparent 6%),
    radial-gradient(circle at 50% 56%, #2a140d 0 7%, transparent 8%),
    linear-gradient(180deg, #9b6a3b, #644226);
  box-shadow: 0 14px 22px rgba(0, 0, 0, 0.28);
  transition:
    bottom 110ms ease,
    transform 110ms ease;
}

.mole-face span {
  position: absolute;
  top: 19%;
  width: 72%;
  height: 30%;
  border-radius: 50% 50% 0 0;
  border-top: 8px solid #7a4c2a;
}

.mole-hole.is-active .mole-face {
  bottom: 16%;
  transform: scale(1.02);
}

.mole-hole.is-active {
  border-color: rgba(48, 210, 124, 0.48);
  box-shadow: 0 0 0 1px rgba(48, 210, 124, 0.18), 0 18px 38px rgba(0, 0, 0, 0.28);
}

.mole-hole.is-bonus .mole-face {
  background:
    radial-gradient(circle at 34% 40%, #111 0 5%, transparent 6%),
    radial-gradient(circle at 66% 40%, #111 0 5%, transparent 6%),
    radial-gradient(circle at 50% 56%, #2a140d 0 7%, transparent 8%),
    linear-gradient(180deg, #d9a53f, #835c1e);
}

.mole-feedback {
  position: absolute;
  z-index: 3;
  top: 12%;
  left: 50%;
  min-width: 54px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
  animation: moleFeedback 820ms ease forwards;
  pointer-events: none;
}

.mole-feedback.hit {
  background: rgba(48, 210, 124, 0.18);
  color: var(--green);
}

.mole-feedback.miss {
  background: rgba(255, 92, 122, 0.18);
  color: var(--coral);
}

.mole-feedback.blocked {
  background: rgba(255, 191, 63, 0.18);
  color: var(--amber);
}

.mole-hammer {
  position: absolute;
  z-index: 2;
  top: 7%;
  right: 13%;
  width: 30%;
  height: 13%;
  border-radius: 6px;
  background: linear-gradient(180deg, #d5dde8, #7f8997);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
  transform-origin: 90% 50%;
  animation: moleHammer 280ms ease-out forwards;
  pointer-events: none;
}

.mole-hammer::after {
  content: "";
  position: absolute;
  right: -24%;
  top: 43%;
  width: 48%;
  height: 30%;
  border-radius: 999px;
  background: #6b4b2e;
}

.mole-hole.is-hit-pulse {
  border-color: rgba(48, 210, 124, 0.76);
  box-shadow: 0 0 0 3px rgba(48, 210, 124, 0.18), 0 18px 38px rgba(0, 0, 0, 0.28);
}

.mole-hole.is-miss-pulse {
  border-color: rgba(255, 92, 122, 0.62);
  box-shadow: 0 0 0 3px rgba(255, 92, 122, 0.16), 0 18px 38px rgba(0, 0, 0, 0.28);
}

.mole-hole.is-blocked-pulse {
  border-color: rgba(255, 191, 63, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 191, 63, 0.16), 0 18px 38px rgba(0, 0, 0, 0.28);
}

@keyframes moleFeedback {
  0% {
    opacity: 0;
    transform: translate(-50%, 12px) scale(0.86);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -34px) scale(0.96);
  }
}

@keyframes moleHammer {
  0% {
    opacity: 0;
    transform: rotate(-45deg) translate(14px, -16px);
  }
  42% {
    opacity: 1;
    transform: rotate(15deg) translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: rotate(22deg) translate(-4px, 5px);
  }
}

.echo-board,
.trail-board {
  display: grid;
  gap: 10px;
  width: min(100%, 420px);
  margin: 0 auto;
}

.echo-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.echo-cell,
.trail-cell,
.beat-tap-zone {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #151922;
  color: var(--text);
  font: inherit;
  touch-action: manipulation;
}

.echo-cell {
  aspect-ratio: 1;
  font-weight: 900;
  box-shadow: inset 0 -16px 30px rgba(0, 0, 0, 0.18);
}

.echo-cell.is-lit {
  border-color: rgba(255, 191, 63, 0.86);
  background: linear-gradient(180deg, rgba(255, 191, 63, 0.42), rgba(48, 210, 124, 0.18));
  box-shadow: 0 0 0 4px rgba(255, 191, 63, 0.13), 0 18px 42px rgba(0, 0, 0, 0.26);
  transform: translateY(-2px);
}

.echo-cell.is-selected {
  border-color: rgba(48, 210, 124, 0.68);
  color: var(--green);
}

.echo-stats,
.trail-stats,
.beat-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.echo-stats span,
.trail-stats span,
.beat-stats span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.echo-stats strong,
.trail-stats strong,
.beat-stats strong {
  font-size: 18px;
}

.echo-stats small,
.trail-stats small,
.beat-stats small {
  color: var(--muted);
  font-size: 11px;
}

.trail-board {
  display: flex;
  flex-direction: column-reverse;
}

.trail-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.trail-row:has(.trail-cell:nth-child(4)) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trail-cell {
  position: relative;
  overflow: hidden;
  font-weight: 900;
}

.trail-row.is-active .trail-cell {
  border-color: rgba(255, 191, 63, 0.38);
}

.trail-cell.is-safe {
  border-color: rgba(48, 210, 124, 0.68);
  background: rgba(48, 210, 124, 0.13);
  color: var(--green);
}

.trail-cell.is-fail {
  border-color: rgba(255, 92, 122, 0.72);
  background: rgba(255, 92, 122, 0.13);
  color: var(--coral);
}

.beat-arena {
  display: grid;
  min-height: 340px;
  place-items: center;
}

.beat-tap-zone {
  position: relative;
  display: grid;
  width: min(78vw, 340px);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(48, 210, 124, 0.14), transparent 58%),
    #11151c;
}

.beat-tap-zone strong,
.beat-tap-zone small {
  position: relative;
  z-index: 2;
}

.beat-tap-zone strong {
  font-size: 34px;
  letter-spacing: 0;
}

.beat-tap-zone small {
  color: var(--muted);
}

.beat-ring {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border: 4px solid rgba(255, 191, 63, 0.58);
  border-radius: 50%;
  transition:
    transform 90ms linear,
    opacity 90ms linear;
}

.beat-tap-zone.is-near {
  border-color: rgba(255, 191, 63, 0.78);
  box-shadow: 0 0 0 6px rgba(255, 191, 63, 0.12);
}

.balance-card {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(48, 210, 124, 0.18), rgba(255, 191, 63, 0.08)),
    var(--surface-2);
}

.balance-card span {
  color: var(--muted);
  font-size: 13px;
}

.balance-card strong {
  font-size: 36px;
}

.personal-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.summary-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.summary-grid strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.summary-grid small,
.summary-line {
  color: var(--muted);
  font-size: 12px;
}

.mini-ledger {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.ledger-row {
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #14171d;
}

.ledger-row strong {
  color: var(--green);
}

.ledger-row strong.negative {
  color: var(--coral);
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.notification-tools label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.notification-tools select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 10px;
}

.notification-tools .table-action {
  min-height: 34px;
}

.notification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
  color: var(--text);
  text-align: left;
}

.notification-row.is-unread {
  border-color: rgba(48, 210, 124, 0.45);
  background: rgba(48, 210, 124, 0.08);
}

.notification-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-row strong,
.notification-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-row small {
  color: var(--muted);
}

.notification-row em {
  flex: 0 0 auto;
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.notification-pager {
  justify-content: center;
}

.activity-tabs {
  margin-bottom: 10px;
}

.activity-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 10px;
}

.activity-filter label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.activity-filter label[hidden] {
  display: none;
}

.activity-filter select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 8px;
}

.activity-list {
  display: grid;
  gap: 8px;
}

.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.activity-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.activity-row strong,
.activity-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-row small {
  color: var(--muted);
}

.activity-row em {
  flex: 0 0 auto;
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.activity-row em.negative {
  color: var(--coral);
}

.badge-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.badge.is-locked {
  opacity: 0.55;
}

.badge strong {
  font-size: 13px;
}

.badge small {
  color: var(--muted);
  line-height: 1.35;
}

.leaderboard {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #14171d;
}

.leaderboard .player {
  display: grid;
  gap: 2px;
}

.leaderboard small {
  color: var(--muted);
}

.leaderboard-empty {
  color: var(--muted);
  font-size: 13px;
}

.leaderboard-viewer {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.leaderboard-self {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(48, 210, 124, 0.32);
  border-radius: 8px;
  background: rgba(48, 210, 124, 0.08);
}

.leaderboard-self.is-empty {
  justify-content: center;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.leaderboard-self span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.leaderboard-self small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-self > strong {
  flex: 0 0 auto;
  color: var(--green);
}

.rank-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.segmented.compact button {
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.snapshot-list,
.session-list,
.security-form,
.campaign-list,
.task-list {
  display: grid;
  gap: 8px;
}

.campaign-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.campaign-card.is-complete {
  border-color: rgba(48, 210, 124, 0.5);
}

.campaign-main {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.campaign-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--green);
  font-weight: 900;
}

.campaign-main span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.campaign-main small {
  color: var(--muted);
  line-height: 1.35;
}

.campaign-progress {
  display: grid;
  gap: 5px;
}

.campaign-progress span {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
}

.campaign-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.campaign-progress small {
  color: var(--muted);
  font-size: 12px;
}

.campaign-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.snapshot-list {
  margin-top: 12px;
}

.snapshot-row,
.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #14171d;
}

.snapshot-row span,
.session-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.snapshot-row strong,
.session-row strong,
.snapshot-row small,
.session-row small,
.snapshot-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snapshot-row small,
.session-row small {
  color: var(--muted);
}

.snapshot-row em {
  max-width: 44%;
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.session-row.is-current {
  border: 1px solid rgba(48, 210, 124, 0.45);
}

.task-row {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.task-row.is-complete {
  border-color: rgba(48, 210, 124, 0.45);
}

.task-row strong,
.task-row small {
  display: block;
}

.task-cycle {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-right: 6px;
  padding: 0 6px;
  border: 1px solid rgba(124, 147, 255, 0.35);
  border-radius: 999px;
  background: rgba(124, 147, 255, 0.12);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
}

.task-row small {
  color: var(--muted);
  line-height: 1.35;
}

.task-progress {
  display: grid;
  gap: 4px;
}

.task-progress span {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-3);
}

.task-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.security-form {
  margin-bottom: 12px;
}

.security-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.security-form input[type="password"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 10px;
}

.check-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ops-grid span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.admin-surface {
  width: 100%;
  min-width: 0;
  scroll-margin-top: 104px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.admin-tabs button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 12px;
  font-weight: 900;
}

.admin-tabs button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #06140d;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-stats span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.admin-stats strong {
  overflow-wrap: anywhere;
  font-size: 24px;
}

.admin-stats small {
  color: var(--muted);
}

.ops-dashboard {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.ops-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ops-summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.ops-summary span.is-alert {
  border-color: rgba(255, 92, 122, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 92, 122, 0.16);
}

.ops-summary strong {
  overflow-wrap: anywhere;
  font-size: 24px;
}

.ops-summary small {
  color: var(--muted);
}

.ops-alerts {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.ops-alert-list {
  display: grid;
  gap: 8px;
}

.ops-alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.ops-alert-row.high {
  border-color: rgba(255, 92, 122, 0.58);
}

.ops-alert-row.medium {
  border-color: rgba(255, 191, 63, 0.48);
}

.ops-alert-row.low {
  border-color: rgba(48, 210, 124, 0.3);
}

.ops-alert-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ops-alert-row strong,
.ops-alert-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-alert-row small {
  color: var(--muted);
}

.ops-alert-row em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.ops-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.ops-panels section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.ops-panels h3 {
  margin-bottom: 10px;
}

.ops-trend,
.ops-game-list {
  display: grid;
  gap: 8px;
}

.ops-trend-row {
  display: grid;
  grid-template-columns: 42px minmax(120px, 1fr) 44px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.ops-trend-row b {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
}

.ops-trend-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.ops-trend-row strong {
  color: var(--text);
  text-align: right;
}

.ops-game-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 4px 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.ops-game-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ops-game-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.ops-game-health-panel {
  grid-column: 1 / -1;
}

.ops-game-health {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ops-health-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.ops-health-row.is-watch {
  border-color: rgba(255, 191, 63, 0.45);
}

.ops-health-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ops-health-row strong,
.ops-health-row span small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-health-row em {
  color: var(--amber);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.ops-health-row > small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.admin-filter,
.admin-adjust,
.admin-manage,
.admin-broadcast {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.admin-filter {
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(130px, 160px)) auto auto;
}

.admin-adjust {
  grid-template-columns: minmax(140px, 180px) minmax(120px, 180px) minmax(180px, 1fr) auto;
}

.admin-manage {
  grid-template-columns: minmax(140px, 180px) minmax(130px, 1fr) repeat(3, minmax(110px, 150px)) minmax(150px, 1fr) auto;
}

.admin-broadcast {
  grid-template-columns: minmax(130px, 170px) minmax(110px, 140px) minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  margin-top: 12px;
}

.admin-filter label,
.admin-adjust label,
.admin-manage label,
.admin-broadcast label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.admin-filter input,
.admin-filter select,
.admin-adjust input,
.admin-adjust select,
.admin-manage input,
.admin-manage select,
.admin-broadcast input,
.admin-broadcast select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 10px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.admin-grid section {
  min-width: 0;
}

.admin-grid h3 {
  margin-bottom: 10px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #14171d;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: #dfe5ee;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.positive-text {
  color: var(--green);
  font-weight: 900;
}

.negative-text {
  color: var(--coral);
  font-weight: 900;
}

.audit-list {
  display: grid;
  gap: 8px;
}

.audit-row {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
  color: var(--text);
  text-align: left;
}

.audit-row small {
  color: var(--muted);
}

.risk-rules,
.task-config-list,
.campaign-settings-list,
.game-settings-list,
.risk-event-list,
.feedback-report-list {
  display: grid;
  gap: 10px;
}

.risk-rule-row,
.task-config-row,
.campaign-setting-row,
.game-setting-row,
.risk-event-row,
.feedback-report-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(220px, 2fr) repeat(2, minmax(110px, 140px)) minmax(100px, 120px) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.task-config-row {
  grid-template-columns: minmax(180px, 1.2fr) minmax(220px, 2fr) repeat(4, minmax(92px, 130px)) auto;
}

.campaign-setting-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.campaign-setting-row .check-row,
.campaign-setting-row > small {
  grid-column: span 2;
}

.game-setting-row {
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) minmax(180px, 1.2fr) minmax(92px, 130px) auto;
}

.risk-event-row {
  grid-template-columns: minmax(220px, 1.6fr) minmax(130px, 160px) minmax(180px, 1fr) auto;
}

.feedback-report-row {
  grid-template-columns: minmax(220px, 1.6fr) minmax(130px, 160px) minmax(180px, 1fr) auto;
}

.risk-rule-row small,
.task-config-row small,
.campaign-setting-row small,
.game-setting-row small,
.risk-event-row small,
.feedback-report-row small {
  color: var(--muted);
  line-height: 1.35;
}

.game-setting-signal {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-2);
}

.game-setting-signal strong {
  color: var(--green);
}

.risk-event-row .risk-sla {
  display: block;
  margin-top: 4px;
}

.risk-event-row .risk-sla.is-overdue {
  color: var(--coral);
  font-weight: 900;
}

.risk-rule-row label:not(.check-row),
.task-config-row label:not(.check-row),
.campaign-setting-row label:not(.check-row),
.game-setting-row label:not(.check-row),
.risk-event-row label:not(.check-row),
.feedback-report-row label:not(.check-row),
.feedback-report-tools label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.risk-rule-row input[type="number"],
.task-config-row input[type="number"],
.task-config-row select,
.campaign-setting-row input[type="number"],
.campaign-setting-row select,
.game-setting-row input[type="number"],
.risk-event-row input,
.risk-event-row select,
.feedback-report-row input,
.feedback-report-row select,
.feedback-report-tools select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 10px;
}

.feedback-report-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 10px;
}

.feedback-report-tools label {
  min-width: 160px;
}

.scheduler-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.system-health {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.system-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.system-health-grid span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.system-health-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-health-grid small,
.system-health-line {
  color: var(--muted);
  font-size: 13px;
}

.notification-admin-last {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.notification-admin-last small {
  color: var(--muted);
}

.notification-template-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.notification-template-row {
  display: grid;
  grid-template-columns: minmax(70px, 90px) repeat(3, minmax(0, 1fr)) auto auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.notification-template-row label:last-of-type {
  grid-column: span 2;
}

.notification-template-row.is-disabled {
  opacity: 0.7;
}

.notification-template-row label:not(.check-row) {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.notification-template-row input[type="text"],
.notification-template-row select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 10px;
}

.notification-broadcast-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.notification-broadcast-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171d;
}

.notification-broadcast-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notification-broadcast-row small {
  color: var(--muted);
}

.notification-broadcast-row em {
  flex: 0 0 auto;
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.table-action {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.icon-button.small {
  width: 32px;
  height: 32px;
}

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
}

.modal-backdrop.is-open {
  display: flex;
}

.detail-modal {
  width: min(760px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.detail-modal pre {
  overflow: auto;
  max-height: 560px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10131a;
  color: #dfe5ee;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.auth-backdrop {
  z-index: 40;
}

.auth-modal {
  width: min(460px, 100%);
}

.auth-tabs {
  margin-bottom: 14px;
}

.login-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.login-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-grid input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 10px;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.compact-note {
  margin-top: 0;
}

.toast-stack {
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1f222b;
  box-shadow: var(--shadow);
}

.toast strong {
  color: var(--green);
}

.feedback-layer {
  position: absolute;
  z-index: 35;
  inset: 0;
  display: none;
  pointer-events: none;
}

.feedback-layer.is-open {
  display: block;
}

.feedback-canvas {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.feedback-lasso {
  fill: rgba(48, 210, 124, 0.1);
  stroke: var(--green);
  stroke-dasharray: 7 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.feedback-lasso.is-draft {
  stroke: var(--amber);
}

.feedback-pins {
  position: absolute;
  inset: 0;
}

.feedback-pin {
  position: absolute;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #10131a;
  border-radius: 999px;
  background: var(--green);
  color: #07120d;
  font-size: 12px;
  font-weight: 900;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.36);
}

.feedback-pin.lasso {
  background: var(--amber);
}

.feedback-list {
  position: fixed;
  z-index: 36;
  right: 18px;
  bottom: 78px;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  max-height: 38vh;
  gap: 8px;
  overflow: auto;
  pointer-events: auto;
}

.feedback-list-item,
.feedback-list-empty {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171b22;
  color: var(--text);
  padding: 8px;
  text-align: left;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.feedback-list-item strong {
  display: grid;
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #06140d;
  font-size: 12px;
}

.feedback-list-item span,
.feedback-list-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-list-item small,
.feedback-list-empty {
  grid-template-columns: 1fr;
  color: var(--muted);
  font-size: 12px;
}

.feedback-toolbar {
  position: fixed;
  z-index: 36;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(620px, calc(100vw - 36px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171b22;
  color: var(--text);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.feedback-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.feedback-toolbar button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 10px;
  font-weight: 800;
}

.empty-state {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state.small {
  padding: 12px;
  font-size: 13px;
}

body[data-device-preview="ipad"] {
  --device-preview-width: 820px;
  --device-preview-radius: 24px;
}

body[data-device-preview="iphone"] {
  --device-preview-width: 390px;
  --device-preview-radius: 30px;
}

body[data-device-preview="android"] {
  --device-preview-width: 412px;
  --device-preview-radius: 26px;
}

body[data-device-preview]:not([data-device-preview="pc"]) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 34%),
    #090a0d;
}

body[data-device-preview]:not([data-device-preview="pc"]) .app-shell {
  overflow: clip;
  width: min(calc(100vw - 24px), var(--device-preview-width));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--device-preview-radius);
  background: var(--bg);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
}

@supports not (overflow: clip) {
  body[data-device-preview]:not([data-device-preview="pc"]) .app-shell {
    overflow: hidden;
  }
}

body[data-device-preview="ipad"] .app-shell,
body[data-device-preview="iphone"] .app-shell,
body[data-device-preview="android"] .app-shell {
  grid-template-columns: 1fr;
}

body[data-device-preview="ipad"] .sidebar,
body[data-device-preview="iphone"] .sidebar,
body[data-device-preview="android"] .sidebar {
  position: static;
  height: auto;
  padding: 14px;
}

body[data-device-preview="ipad"] .nav-list,
body[data-device-preview="iphone"] .nav-list,
body[data-device-preview="android"] .nav-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body[data-device-preview="ipad"] .nav-link,
body[data-device-preview="iphone"] .nav-link,
body[data-device-preview="android"] .nav-link {
  justify-content: center;
  padding: 0 8px;
}

body[data-device-preview="ipad"] .nav-link span:last-child,
body[data-device-preview="iphone"] .nav-link span:last-child,
body[data-device-preview="android"] .nav-link span:last-child {
  display: none;
}

body[data-device-preview="ipad"] .safety-note,
body[data-device-preview="iphone"] .safety-note,
body[data-device-preview="android"] .safety-note {
  margin-top: 0;
}

body[data-device-preview="ipad"] .topbar,
body[data-device-preview="iphone"] .topbar,
body[data-device-preview="android"] .topbar {
  position: static;
  align-items: flex-start;
  flex-direction: column;
  padding: 18px;
}

body[data-device-preview="ipad"] .top-actions,
body[data-device-preview="iphone"] .top-actions,
body[data-device-preview="android"] .top-actions {
  justify-content: flex-start;
  width: 100%;
}

body[data-device-preview="ipad"] .content-grid,
body[data-device-preview="iphone"] .content-grid,
body[data-device-preview="android"] .content-grid {
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
  padding: 14px;
}

body[data-device-preview="ipad"] .hero-band,
body[data-device-preview="ipad"] .game-detail-panel,
body[data-device-preview="ipad"] .game-layout,
body[data-device-preview="ipad"] .admin-filter,
body[data-device-preview="ipad"] .admin-adjust,
body[data-device-preview="ipad"] .admin-manage,
body[data-device-preview="ipad"] .admin-broadcast,
body[data-device-preview="ipad"] .admin-grid,
body[data-device-preview="ipad"] .ops-panels,
body[data-device-preview="ipad"] .ops-game-health,
body[data-device-preview="ipad"] .system-health-grid,
body[data-device-preview="ipad"] .notification-tools,
body[data-device-preview="ipad"] .notification-template-row,
body[data-device-preview="ipad"] .risk-rule-row,
body[data-device-preview="ipad"] .task-config-row,
body[data-device-preview="ipad"] .campaign-setting-row,
body[data-device-preview="ipad"] .game-setting-row,
body[data-device-preview="ipad"] .risk-event-row,
body[data-device-preview="ipad"] .feedback-report-row,
body[data-device-preview="ipad"] .right-rail,
body[data-device-preview="iphone"] .hero-band,
body[data-device-preview="iphone"] .game-detail-panel,
body[data-device-preview="iphone"] .game-layout,
body[data-device-preview="iphone"] .admin-filter,
body[data-device-preview="iphone"] .admin-adjust,
body[data-device-preview="iphone"] .admin-manage,
body[data-device-preview="iphone"] .admin-broadcast,
body[data-device-preview="iphone"] .admin-grid,
body[data-device-preview="iphone"] .ops-panels,
body[data-device-preview="iphone"] .ops-game-health,
body[data-device-preview="iphone"] .system-health-grid,
body[data-device-preview="iphone"] .notification-tools,
body[data-device-preview="iphone"] .notification-template-row,
body[data-device-preview="iphone"] .risk-rule-row,
body[data-device-preview="iphone"] .task-config-row,
body[data-device-preview="iphone"] .campaign-setting-row,
body[data-device-preview="iphone"] .game-setting-row,
body[data-device-preview="iphone"] .risk-event-row,
body[data-device-preview="iphone"] .feedback-report-row,
body[data-device-preview="iphone"] .right-rail,
body[data-device-preview="android"] .hero-band,
body[data-device-preview="android"] .game-detail-panel,
body[data-device-preview="android"] .game-layout,
body[data-device-preview="android"] .admin-filter,
body[data-device-preview="android"] .admin-adjust,
body[data-device-preview="android"] .admin-manage,
body[data-device-preview="android"] .admin-broadcast,
body[data-device-preview="android"] .admin-grid,
body[data-device-preview="android"] .ops-panels,
body[data-device-preview="android"] .ops-game-health,
body[data-device-preview="android"] .system-health-grid,
body[data-device-preview="android"] .notification-tools,
body[data-device-preview="android"] .notification-template-row,
body[data-device-preview="android"] .risk-rule-row,
body[data-device-preview="android"] .task-config-row,
body[data-device-preview="android"] .campaign-setting-row,
body[data-device-preview="android"] .game-setting-row,
body[data-device-preview="android"] .risk-event-row,
body[data-device-preview="android"] .feedback-report-row,
body[data-device-preview="android"] .right-rail {
  grid-template-columns: 1fr;
}

body[data-device-preview="ipad"] .tool-strip,
body[data-device-preview="iphone"] .tool-strip,
body[data-device-preview="android"] .tool-strip {
  align-items: stretch;
  flex-direction: column;
}

body[data-device-preview="ipad"] .announcement-card,
body[data-device-preview="iphone"] .announcement-card,
body[data-device-preview="android"] .announcement-card {
  align-items: stretch;
  flex-direction: column;
}

body[data-device-preview="ipad"] .active-game,
body[data-device-preview="ipad"] .panel,
body[data-device-preview="iphone"] .active-game,
body[data-device-preview="iphone"] .panel,
body[data-device-preview="android"] .active-game,
body[data-device-preview="android"] .panel {
  padding: 14px;
}

body[data-device-preview="ipad"] .game-detail-stats,
body[data-device-preview="iphone"] .game-detail-stats,
body[data-device-preview="android"] .game-detail-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-device-preview="ipad"] .visual-panel,
body[data-device-preview="iphone"] .visual-panel,
body[data-device-preview="android"] .visual-panel {
  padding: 12px;
}

body[data-device-preview="ipad"] .admin-actions,
body[data-device-preview="iphone"] .admin-actions,
body[data-device-preview="android"] .admin-actions {
  justify-content: flex-start;
  width: 100%;
}

body[data-device-preview="ipad"] .keno-board,
body[data-device-preview="iphone"] .keno-board,
body[data-device-preview="android"] .keno-board {
  grid-template-columns: repeat(5, minmax(44px, 1fr));
}

body[data-device-preview="ipad"] .limbo-scale,
body[data-device-preview="iphone"] .limbo-scale,
body[data-device-preview="android"] .limbo-scale {
  grid-template-columns: 1fr;
  text-align: center;
}

body[data-device-preview="iphone"] .badge-list,
body[data-device-preview="iphone"] .admin-stats,
body[data-device-preview="iphone"] .ops-summary,
body[data-device-preview="iphone"] .ops-grid,
body[data-device-preview="iphone"] .hero-stats,
body[data-device-preview="android"] .badge-list,
body[data-device-preview="android"] .admin-stats,
body[data-device-preview="android"] .ops-summary,
body[data-device-preview="android"] .ops-grid,
body[data-device-preview="android"] .hero-stats {
  grid-template-columns: 1fr;
}

body[data-device-preview="iphone"] .game-grid,
body[data-device-preview="android"] .game-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-device-preview="iphone"] .game-card,
body[data-device-preview="android"] .game-card {
  min-height: 168px;
  gap: 8px;
  padding: 10px;
}

body[data-device-preview="iphone"] .game-card p,
body[data-device-preview="iphone"] .game-signal,
body[data-device-preview="android"] .game-card p,
body[data-device-preview="android"] .game-signal {
  display: none;
}

body[data-device-preview="iphone"] .game-art,
body[data-device-preview="android"] .game-art {
  min-height: 74px;
}

body[data-device-preview="iphone"] .game-icon,
body[data-device-preview="android"] .game-icon {
  left: 12px;
  bottom: 10px;
  font-size: 34px;
}

body[data-device-preview="iphone"] .tag,
body[data-device-preview="iphone"] .status-pill,
body[data-device-preview="android"] .tag,
body[data-device-preview="android"] .status-pill {
  min-height: 22px;
  padding: 0 6px;
  font-size: 11px;
}

body[data-device-preview="iphone"] .mole-stats,
body[data-device-preview="android"] .mole-stats {
  grid-template-columns: 1fr;
}

body[data-device-preview="iphone"] .task-row,
body[data-device-preview="android"] .task-row {
  gap: 8px;
  padding: 10px;
}

body[data-device-preview="iphone"] .task-row small,
body[data-device-preview="android"] .task-row small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-device-preview="iphone"] .button,
body[data-device-preview="android"] .button {
  flex: 1 1 auto;
}

body[data-device-preview="iphone"] .section-head,
body[data-device-preview="android"] .section-head {
  align-items: flex-start;
  flex-direction: column;
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .nav-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-link {
    justify-content: center;
    padding: 0 8px;
  }

  .nav-link span:last-child {
    display: none;
  }

  .safety-note {
    margin-top: 0;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .top-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .content-grid {
    gap: 14px;
    padding: 14px;
  }

    .hero-band,
    .game-detail-panel,
    .game-layout,
    .admin-filter,
    .admin-adjust,
    .admin-manage,
    .admin-broadcast,
    .admin-grid,
    .ops-panels,
    .ops-game-health,
    .system-health-grid,
    .notification-tools,
    .notification-template-row,
    .risk-rule-row,
    .task-config-row,
    .campaign-setting-row,
    .game-setting-row,
    .risk-event-row,
    .feedback-report-row,
    .right-rail {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    align-self: stretch;
  }

  .ops-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .announcement-card {
    align-items: stretch;
    flex-direction: column;
  }

  .active-game,
  .panel {
    padding: 14px;
  }

  .game-detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visual-panel {
    padding: 12px;
  }

  .admin-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .keno-board {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
  }

  .keno-cell {
    min-height: 46px;
  }

  .limbo-scale {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .feedback-list {
    right: 10px;
    bottom: 118px;
    left: 10px;
    width: auto;
    max-height: 30vh;
  }

  .feedback-toolbar {
    right: 10px;
    bottom: 10px;
    left: 10px;
    flex-wrap: wrap;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .badge-list,
  .admin-stats,
  .ops-summary,
  .ops-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .game-card {
    min-height: 168px;
    gap: 8px;
    padding: 10px;
  }

  .game-card p {
    display: none;
  }

  .game-signal {
    display: none;
  }

  .game-art {
    min-height: 74px;
  }

  .game-icon {
    left: 12px;
    bottom: 10px;
    font-size: 34px;
  }

  .tag,
  .status-pill {
    min-height: 22px;
    padding: 0 6px;
    font-size: 11px;
  }

  .mole-stats {
    grid-template-columns: 1fr;
  }

  .task-row {
    gap: 8px;
    padding: 10px;
  }

  .task-row small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .keno-board {
    gap: 6px;
  }

  .nav-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .button {
    flex: 1 1 auto;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .slot-row span {
    font-size: 10px;
  }
}
