:root {
  --bg-deep: #080b11;
  --bg-card: #111622;
  --bg-elevated: #182032;
  --bg-input: #0b0f18;

  --border-subtle: rgba(218, 168, 88, 0.18);
  --border-bright: rgba(246, 222, 182, 0.45);

  --gold-light: #ffe7ba;
  --gold-main: #daa858;
  --gold-grad: linear-gradient(135deg, #ffe7ba 0%, #daa858 55%, #a56e24 100%);

  --green-main: #18b660;
  --red-main: #fb4e4e;
  --violet-main: #9b48db;
  --big-amber: #f59e0b;
  --small-blue: #3b82f6;

  --text-primary: #f6f8fc;
  --text-secondary: #9ba7bc;
  --text-muted: #69758a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at 20% 0%, #192136 0%, var(--bg-deep) 58%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font-family: inherit;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(9, 12, 20, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-emblem {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #271f14, #121724);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(218, 168, 88, 0.22);
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.73rem;
  color: var(--text-secondary);
}

.feed-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.feed-pill.connected {
  background: rgba(24, 182, 96, 0.15);
  color: #4ade80;
  border: 1px solid rgba(24, 182, 96, 0.42);
}

.feed-pill.reconnecting {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.42);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.82); }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.strategy-wrap, .clock-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 5px 10px;
  display: flex;
  flex-direction: column;
}

.mini-lbl {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.strategy-select {
  background: transparent;
  border: none;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.strategy-select option {
  background: #111622;
  color: #fff;
}

#istClockText {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--border-bright);
  background: var(--bg-elevated);
}

/* Container */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 18px 50px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 4 RajaParty1 WinGo Rooms Strip */
.rooms-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.room-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  color: var(--text-secondary);
  transition: all 0.16s ease;
}

.room-top {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
}

.room-radar-bar {
  width: 100%;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
}

.icon-btn.active-toggle {
  border-color: var(--gold-main);
  background: rgba(218, 168, 88, 0.22);
  box-shadow: 0 0 12px rgba(218, 168, 88, 0.25);
}

.room-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-1px);
}

.room-card.active {
  background: linear-gradient(135deg, rgba(218, 168, 88, 0.24) 0%, rgba(20, 27, 42, 0.96) 100%);
  border-color: var(--gold-main);
  color: #fff;
  box-shadow: 0 8px 22px rgba(218, 168, 88, 0.16);
}

.room-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--gold-light);
  flex-shrink: 0;
}

.room-card.active .room-badge {
  background: var(--gold-grad);
  color: #1a1105;
  border-color: #fff4da;
}

.room-meta {
  flex: 1;
}

.room-name {
  font-size: 0.88rem;
  font-weight: 800;
}

.room-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.room-timer {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-light);
}

.room-period-short {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.room-card.active .room-period-short {
  color: #f3d5a5;
}

/* HERO DECK */
.hero-deck {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  gap: 16px;
}

.period-hero-card {
  background: linear-gradient(135deg, #2b2012 0%, #171516 55%, #231a10 100%);
  border: 1px solid var(--border-bright);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

.ph-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.gold-pill {
  background: var(--gold-grad);
  color: #191105;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 4px 11px;
  border-radius: 999px;
}

.phase-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

.phase-pill.open {
  background: rgba(24, 182, 96, 0.16);
  color: #4ade80;
  border: 1px solid rgba(24, 182, 96, 0.4);
}

.phase-pill.locked {
  background: rgba(251, 78, 78, 0.2);
  color: #ff8080;
  border: 1px solid rgba(251, 78, 78, 0.5);
}

.ep-caption {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #cbb796;
  margin-bottom: 6px;
}

.ep-number-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 231, 186, 0.32);
  border-radius: 12px;
  padding: 10px 14px;
  flex-wrap: wrap;
}

.ep-digits {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.38rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.ep-prefix {
  color: #e2e8f0;
}

.ep-suffix {
  color: var(--gold-light);
  background: rgba(218, 168, 88, 0.24);
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 2px;
  border: 1px solid rgba(255, 231, 186, 0.45);
}

.btn-copy-period {
  background: rgba(255, 231, 186, 0.12);
  border: 1px solid rgba(255, 231, 186, 0.38);
  color: var(--gold-light);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-copy-period:hover {
  background: rgba(255, 231, 186, 0.22);
}

.countdown-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.flip-clock {
  display: flex;
  align-items: center;
  gap: 6px;
}

.flip-tile {
  width: 38px;
  height: 48px;
  border-radius: 9px;
  background: #0b0e15;
  border: 1.5px solid rgba(255, 231, 186, 0.48);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.flip-clock.danger .flip-tile {
  color: #ff6b6b;
  border-color: #fb4e4e;
  box-shadow: 0 0 14px rgba(251, 78, 78, 0.38);
}

.flip-colon {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold-light);
}

.awaiting-banner {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
  font-size: 0.76rem;
  padding: 7px 11px;
  border-radius: 9px;
}

.progress-rail {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--gold-grad);
  transition: width 0.35s linear;
}

.recent-six-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.recent-ball-item {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.recent-ball-period {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  color: #cbb796;
}

/* 3D Glossy WinGo Spheres */
.wingo-ball {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.96rem;
  font-weight: 900;
  color: #fff;
  box-shadow: inset -3px -5px 8px rgba(0, 0, 0, 0.45), inset 2px 3px 6px rgba(255, 255, 255, 0.35);
}

.wingo-ball.lg {
  width: 44px;
  height: 44px;
  font-size: 1.18rem;
}

.wingo-ball.xs {
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
}

.ball-green { background: radial-gradient(circle at 32% 28%, #52f296, #18b660 58%, #0d723b 100%); }
.ball-red { background: radial-gradient(circle at 32% 28%, #ff8b8b, #fb4e4e 58%, #a61e1e 100%); }
.ball-0 { background: linear-gradient(135deg, #fb4e4e 0%, #fb4e4e 49%, #9b48db 51%, #9b48db 100%); }
.ball-5 { background: linear-gradient(135deg, #18b660 0%, #18b660 49%, #9b48db 51%, #9b48db 100%); }

/* Right Hero Signal Card */
.signal-hero-card {
  background: linear-gradient(165deg, #161f33 0%, #0f1422 100%);
  border: 1.5px solid var(--border-bright);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48);
}

.sh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sh-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-amber {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 12px #f59e0b;
  animation: pulseDot 1.2s infinite;
}

.sh-title {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--gold-light);
}

.level-recommend-badge {
  background: rgba(218, 168, 88, 0.2);
  border: 1px solid var(--border-bright);
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 4px 11px;
  border-radius: 8px;
}

.dual-signal-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.big-signal-box {
  border-radius: 15px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
}

.big-signal-box.theme-green {
  background: linear-gradient(145deg, rgba(24, 182, 96, 0.28), rgba(11, 24, 19, 0.92));
  border-color: rgba(24, 182, 96, 0.65);
  box-shadow: 0 8px 24px rgba(24, 182, 96, 0.18);
}

.big-signal-box.theme-red {
  background: linear-gradient(145deg, rgba(251, 78, 78, 0.28), rgba(29, 13, 17, 0.92));
  border-color: rgba(251, 78, 78, 0.65);
  box-shadow: 0 8px 24px rgba(251, 78, 78, 0.18);
}

.big-signal-box.theme-big {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.26), rgba(29, 21, 11, 0.92));
  border-color: rgba(245, 158, 11, 0.65);
}

.big-signal-box.theme-small {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.26), rgba(12, 20, 36, 0.92));
  border-color: rgba(59, 130, 246, 0.65);
}

.bsb-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.76);
}

.bsb-value {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.bsb-conf {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.bsb-conf strong {
  color: #fff;
}

.bsb-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.violet-alert-tag {
  margin-top: 3px;
  font-size: 0.69rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(155, 72, 219, 0.3);
  border: 1px solid rgba(155, 72, 219, 0.65);
  color: #f3e8ff;
}

.signal-bottom-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: stretch;
}

.lucky-nums-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lucky-spheres-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.backup-chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.pattern-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pattern-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.pattern-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold-light);
}

.violet-gap-lbl {
  font-size: 0.7rem;
  color: #d8b4fe;
}

.pattern-desc {
  font-size: 0.77rem;
  color: var(--text-secondary);
}

/* Scoreboard Bar */
.scoreboard-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.score-metrics {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.score-item {
  display: flex;
  flex-direction: column;
}

.score-val {
  font-size: 1.2rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.score-lbl {
  font-size: 0.69rem;
  color: var(--text-secondary);
}

.txt-green { color: #4ade80; }
.txt-blue { color: #60a5fa; }
.txt-gold { color: var(--gold-light); }

.wl-chips-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.wl-chip {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wl-chip.w { background: rgba(24, 182, 96, 0.22); color: #4ade80; border: 1px solid rgba(24, 182, 96, 0.5); }
.wl-chip.l { background: rgba(251, 78, 78, 0.16); color: #f87171; border: 1px solid rgba(251, 78, 78, 0.35); }

/* Main Tabs Panel */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px;
}

.tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--gold-grad);
  color: #191105;
  border-color: transparent;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.data-table th {
  text-align: left;
  padding: 10px 11px;
  background: var(--bg-input);
  color: var(--gold-light);
  font-size: 0.74rem;
  font-weight: 800;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 9px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-variant-numeric: tabular-nums;
}

.period-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  color: #cbd5e1;
}

.period-mono strong {
  color: var(--gold-light);
}

.vote-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.71rem;
  font-weight: 800;
  text-transform: uppercase;
}
.vote-pill.green { background: rgba(24, 182, 96, 0.2); color: #4ade80; }
.vote-pill.red { background: rgba(251, 78, 78, 0.2); color: #f87171; }
.vote-pill.big { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.vote-pill.small { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

.verdict-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
}
.verdict-badge.win { background: rgba(24, 182, 96, 0.2); color: #4ade80; border: 1px solid rgba(24, 182, 96, 0.45); }
.verdict-badge.loss { background: rgba(251, 78, 78, 0.14); color: #f87171; border: 1px solid rgba(251, 78, 78, 0.32); }
.verdict-badge.neutral { background: rgba(148, 163, 184, 0.14); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }

.c-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.c-dot.green { background: var(--green-main); }
.c-dot.red { background: var(--red-main); }
.c-dot.violet { background: var(--violet-main); }

/* Trend Chart */
.sub-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.chart-stats-block {
  margin-bottom: 16px;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.matrix-table th, .matrix-table td {
  padding: 7px 6px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.matrix-table th:first-child, .matrix-table td:first-child {
  text-align: left;
  color: var(--text-secondary);
  font-weight: 700;
}

.trend-visual-wrap {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
}

.trend-head-row, .trend-row {
  display: grid;
  grid-template-columns: 155px 1fr 48px;
  align-items: center;
  gap: 8px;
}

.trend-head-row {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold-light);
}

.trend-digits-col {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  text-align: center;
}

.trend-rows-container {
  position: relative;
}

.trend-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.trend-row {
  height: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.t-cell {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--text-muted);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.t-cell.hit-green { background: var(--green-main); color: #fff; font-weight: 900; border-color: #fff; }
.t-cell.hit-red { background: var(--red-main); color: #fff; font-weight: 900; border-color: #fff; }
.t-cell.hit-0 { background: linear-gradient(135deg, #fb4e4e 50%, #9b48db 50%); color: #fff; font-weight: 900; border-color: #fff; }
.t-cell.hit-5 { background: linear-gradient(135deg, #18b660 50%, #9b48db 50%); color: #fff; font-weight: 900; border-color: #fff; }

/* Models & Level Calculator Subgrid */
.two-col-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.models-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-card {
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 9px 11px;
}

.model-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  margin-bottom: 3px;
}

.model-card-detail {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calc-field label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.calc-field input, .calc-field select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.83rem;
}

.calc-banner {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.78rem;
  margin-bottom: 12px;
  background: rgba(24, 182, 96, 0.12);
  border: 1px solid rgba(24, 182, 96, 0.35);
}

.btn-gold-xs {
  background: var(--gold-grad);
  border: none;
  color: #191105;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.sh-badges {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.tier-badge {
  font-size: 0.7rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 8px;
}

.tier-badge.strong {
  background: rgba(24, 182, 96, 0.2);
  border: 1px solid rgba(24, 182, 96, 0.55);
  color: #4ade80;
}

.tier-badge.solid {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.55);
  color: #60a5fa;
}

.tier-badge.cautious {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

/* Colour gate: shown only when the learner confirms the colour channel
   currently carries an edge on the selected tier. */
.tier-badge.colour-gate {
  background: rgba(34, 197, 94, 0.22);
  border: 1px solid rgba(34, 197, 94, 0.6);
  color: #4ade80;
}

.tier-badge.colour-gate.inactive {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #94a3b8;
}

.combo-tag {
  font-size: 0.69rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(218, 168, 88, 0.18);
  color: var(--gold-light);
  border: 1px solid var(--border-subtle);
}

.signal-action-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-vip-share {
  flex: 1;
  background: var(--gold-grad);
  border: none;
  color: #191105;
  font-size: 0.79rem;
  font-weight: 900;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn-vip-share:hover {
  filter: brightness(1.08);
}

.btn-csv-export {
  background: var(--bg-input);
  border: 1px solid var(--border-bright);
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 10px 13px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-csv-export:hover {
  background: rgba(218, 168, 88, 0.14);
}

.txt-amber {
  color: #fbbf24;
}

/* Toast */
.live-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 95;
  max-width: 390px;
  background: linear-gradient(135deg, #271e12, #121725);
  border: 1.5px solid var(--gold-main);
  border-radius: 14px;
  padding: 13px 16px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
  font-size: 0.83rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .hero-deck, .two-col-subgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .rooms-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .recent-six-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .signal-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Self-Learning Engine Weights panel ---- */
.learning-status {
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--accent-gold, #daa858);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.learning-status.has-edge {
  border-left-color: #4ade80;
}

.learning-status.no-edge {
  border-left-color: #f87171;
}

.learning-status strong {
  color: var(--text-main, #e8ecf4);
}

.learning-status .ls-headline {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 3px;
}

.learning-status .ls-line {
  display: block;
}

.learning-status .ls-warn {
  color: #f87171;
  font-weight: 700;
}

.learning-status .ls-ok {
  color: #4ade80;
  font-weight: 700;
}

/* ---- Access-token gate --------------------------------------------------- */
.token-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #14181f 0%, #080a0e 70%);
}

.token-gate.hidden { display: none; }

.token-gate-card {
  width: min(420px, 92vw);
  padding: 32px 28px 26px;
  border: 1px solid rgba(218, 168, 88, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(24, 28, 36, 0.97), rgba(14, 17, 22, 0.97));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.token-gate-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #f3e6cd;
}

.token-gate-num { color: #daa858; }

.token-gate-sub {
  margin: 6px 0 20px;
  font-size: 13px;
  color: #8b94a3;
}

.token-gate-card form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.token-gate-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(218, 168, 88, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #f3e6cd;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.token-gate-input:focus {
  outline: none;
  border-color: rgba(218, 168, 88, 0.7);
}

.token-gate-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, #e2b268, #b98c3c);
  color: #1a1408;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.token-gate-btn:hover { filter: brightness(1.08); }

.token-gate-msg {
  margin-top: 14px;
  min-height: 16px;
  font-size: 12px;
  color: #d98b7a;
}
