:root {
  --bg: #07111f;
  --bg-elevated: rgba(10, 19, 36, 0.92);
  --bg-panel: linear-gradient(180deg, rgba(13, 24, 43, 0.96), rgba(8, 15, 29, 0.94));
  --bg-data-panel: linear-gradient(180deg, rgba(14, 26, 46, 0.98), rgba(7, 13, 25, 0.98));
  --bg-data-card: rgba(11, 20, 37, 0.88);
  --bg-input: rgba(8, 16, 30, 0.88);
  --bg-input-focus: rgba(10, 20, 37, 0.98);
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-soft: rgba(255, 255, 255, 0.03);
  --text: #ebf1fb;
  --text-strong: #ffffff;
  --text-soft: #cad7ee;
  --muted: #98add1;
  --line: rgba(145, 169, 210, 0.18);
  --line-data: rgba(162, 189, 236, 0.24);
  --line-strong: rgba(255, 255, 255, 0.08);
  --primary: #f2b35a;
  --primary-strong: #ff7d4d;
  --accent: #ffd9ae;
  --accent-soft: rgba(242, 179, 90, 0.16);
  --highlight: #48c0ff;
  --danger: #ff7a6d;
  --success: #67dba0;
  --warning: #ffca73;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --radius-sm: 18px;
  --radius-xs: 14px;
  --heading-font: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body-font: "Avenir Next", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --chart-bg: #091524;
  --chart-grid: rgba(148, 178, 227, 0.33);
  --chart-axis: rgba(198, 219, 255, 0.5);
  --chart-text: #d3def1;
  --series-1: #ffbd6d;
  --series-2: #63d2ff;
  --series-3: #8ef2b3;
  --series-4: #ff8f7d;
  --series-5: #ffe58c;
  --series-6: #61f0da;
  --series-7: #7ba8ff;
  --series-8: #ffc77d;
  --series-9: #d4b3ff;
  --series-10: #80f0ff;
}

body.role-player {
  --primary: #69d8ff;
  --primary-strong: #2a8cff;
  --accent: #9de9ff;
  --accent-soft: rgba(105, 216, 255, 0.18);
  --highlight: #7ef2ff;
}

body.role-admin {
  --primary: #ffc46b;
  --primary-strong: #ff7d48;
  --accent: #ffe0bc;
  --accent-soft: rgba(255, 196, 107, 0.18);
  --highlight: #ff9b5b;
}

body.phase-final {
  --primary: #ffbf7f;
  --primary-strong: #ff6d5d;
  --accent: #ffe2c7;
  --accent-soft: rgba(255, 109, 93, 0.15);
  --highlight: #ffd36e;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(72, 192, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 145, 102, 0.14), transparent 28%),
    radial-gradient(circle at 20% 80%, rgba(255, 196, 107, 0.1), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

body.theme-dark {
  color-scheme: dark;
}

body.theme-light {
  color-scheme: light;
  --bg: #eef2f7;
  --bg-elevated: rgba(255, 255, 255, 0.92);
  --bg-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 252, 0.96));
  --bg-data-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(241, 245, 250, 0.99));
  --bg-data-card: rgba(255, 255, 255, 0.9);
  --bg-input: rgba(255, 255, 255, 0.94);
  --bg-input-focus: rgba(255, 255, 255, 1);
  --bg-card: rgba(17, 24, 39, 0.03);
  --bg-soft: rgba(17, 24, 39, 0.02);
  --text: #192433;
  --text-strong: #0d1725;
  --text-soft: #5f748e;
  --muted: #7286a1;
  --line: rgba(109, 127, 150, 0.16);
  --line-data: rgba(109, 127, 150, 0.2);
  --line-strong: rgba(13, 23, 37, 0.08);
  --accent: #9a6d2d;
  --accent-soft: rgba(242, 179, 90, 0.12);
  --chart-bg: #fbfcfe;
  --chart-grid: rgba(121, 143, 170, 0.34);
  --chart-axis: rgba(109, 127, 150, 0.44);
  --chart-text: #596d87;
  --shadow: 0 24px 72px rgba(87, 102, 122, 0.12);
  background:
    radial-gradient(circle at top left, rgba(72, 192, 255, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 173, 96, 0.1), transparent 28%),
    radial-gradient(circle at 20% 80%, rgba(255, 211, 123, 0.08), transparent 30%),
    var(--bg);
}

body.theme-light .scene-grid {
  opacity: 0.22;
}

body.theme-light .scene-noise {
  opacity: 0.08;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.scene-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.scene-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(160, 183, 231, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 183, 231, 0.08) 1px, transparent 1px);
  background-size: 58px 58px;
  opacity: 0.52;
  -webkit-mask-image: radial-gradient(circle at center, black 38%, transparent 94%);
  mask-image: radial-gradient(circle at center, black 38%, transparent 94%);
}

.scene-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.5;
  animation: floatGlow 18s ease-in-out infinite;
}

.scene-glow-a {
  top: 90px;
  left: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(72, 192, 255, 0.3), transparent 68%);
}

.scene-glow-b {
  right: -120px;
  bottom: 40px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 140, 96, 0.28), transparent 70%);
  animation-delay: -9s;
}

.scene-noise {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent, rgba(255, 255, 255, 0.02), transparent),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.012),
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 4px
    );
  opacity: 0.3;
}

.topbar {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 48px));
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  background: rgba(7, 16, 29, 0.72);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 28px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
}

.brand-mark::before {
  inset: auto;
  width: 90px;
  height: 90px;
  right: -30px;
  top: -20px;
  background: radial-gradient(circle, rgba(72, 192, 255, 0.4), transparent 72%);
}

.brand-mark::after {
  inset: -20px;
  background:
    linear-gradient(135deg, transparent 48%, rgba(255, 255, 255, 0.08) 49%, transparent 52%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.02), transparent);
  animation: sweep 10s linear infinite;
}

.brand-core {
  position: absolute;
  inset: 15px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 32% 35%, rgba(255, 255, 255, 0.95), transparent 16%),
    radial-gradient(circle at 62% 48%, rgba(255, 191, 118, 0.92), transparent 18%),
    linear-gradient(145deg, var(--primary), var(--highlight));
  box-shadow: 0 0 18px rgba(255, 190, 109, 0.28);
}

.topbar h1,
.band h2,
.band h3 {
  margin: 0;
  font-family: var(--heading-font);
  font-weight: 760;
  letter-spacing: 0.02em;
  color: var(--text-strong);
}

.topbar h1 {
  font-size: clamp(22px, 2.3vw, 30px);
}

.band h2 {
  font-size: clamp(22px, 2vw, 30px);
}

.band h3 {
  font-size: 18px;
}

.topbar-tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

.layout {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px 84px;
}

.campaign-brief:empty {
  display: none;
}

.campaign-brief {
  position: relative;
  overflow: hidden;
  padding: 26px;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(9, 18, 34, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.campaign-brief::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -12%;
  width: 46%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent);
  transform: skewX(-18deg);
}

.campaign-brief::after {
  content: "";
  position: absolute;
  inset: auto;
  right: -60px;
  top: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 68%);
  filter: blur(14px);
}

.campaign-brief-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 22px;
  align-items: start;
}

.brief-copy {
  display: grid;
  gap: 16px;
}

.brief-title {
  margin: 0;
  font-family: var(--heading-font);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: 0.02em;
}

.brief-text {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 15px;
}

.brief-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brief-pill,
.story-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.brief-stat {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.brief-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brief-stat strong {
  display: block;
  margin-top: 8px;
  font-family: var(--heading-font);
  font-size: 22px;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.brief-stat.brief-wide {
  grid-column: 1 / -1;
}

.band {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
}

.data-band {
  border-color: var(--line-data);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 22%),
    var(--bg-data-panel);
  box-shadow:
    0 28px 84px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.band::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.band::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 68%);
  opacity: 0.6;
  pointer-events: none;
}

.data-band::before {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(132, 193, 255, 0.54), rgba(255, 200, 121, 0.42), transparent);
}

.data-band::after {
  width: 260px;
  height: 260px;
  opacity: 0.8;
}

.topbar-actions,
.section-heading,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  margin-bottom: 8px;
}

.status-band {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

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

.stat {
  position: relative;
  min-height: 108px;
  padding: 18px;
  border: 1px solid rgba(170, 193, 235, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(10, 18, 33, 0.82);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stat::before {
  content: "";
  position: absolute;
  left: 18px;
  right: auto;
  bottom: 16px;
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--highlight));
}

.stat span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 14px;
  font-family: var(--heading-font);
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.05;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.stat-money::before {
  background: linear-gradient(90deg, #7ef2b7, #00ba87);
}

.stat-round::before {
  background: linear-gradient(90deg, #ffc56d, #ff9250);
}

.stat-player::before {
  background: linear-gradient(90deg, #7de2ff, #2e96ff);
}

.stat-market::before,
.stat-home::before {
  background: linear-gradient(90deg, #9de9ff, #56c8ff);
}

.stat-rank::before {
  background: linear-gradient(90deg, #f7e793, #f7b347);
}

.stat-status::before {
  background: linear-gradient(90deg, #ffd8a0, #ff9766);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid rgba(171, 194, 235, 0.22);
  border-radius: 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #8096ba;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[type="number"],
.money-input {
  text-align: right;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(72, 192, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  background: var(--bg-input-focus);
  transform: translateY(-1px);
}

.full {
  grid-column: 1 / -1;
}

button {
  min-height: 46px;
  padding: 10px 18px;
  color: #08111e;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(255, 125, 77, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 18px 30px rgba(255, 125, 77, 0.22);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
  box-shadow: none;
}

button.ghost,
.topbar-actions a {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  box-shadow: none;
}

.topbar-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

button.ghost:hover,
.topbar-actions a:hover {
  background: rgba(255, 255, 255, 0.09);
}

button.danger {
  color: #ffffff;
  background: linear-gradient(135deg, #ff8669, #ff5f71);
  box-shadow: 0 14px 30px rgba(255, 95, 113, 0.24);
}

button.ghost.danger {
  color: #ffb8b0;
  background: rgba(255, 95, 113, 0.08);
  border-color: rgba(255, 95, 113, 0.24);
}

.subtle-action {
  margin-top: 14px;
}

.hidden {
  display: none !important;
}

.login-band {
  max-width: none;
}

.login-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.story-panel,
.login-console {
  position: relative;
  display: grid;
  gap: 20px;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.story-panel::after,
.login-console::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 36%);
}

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

.story-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  overflow: hidden;
}

.story-card::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--highlight));
}

.story-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.story-card p:last-child {
  margin: 0;
  color: var(--muted);
}

.login-console {
  align-content: start;
}

.role-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
}

.role-switch button {
  min-height: 50px;
  width: 100%;
}

.role-switch button.active {
  color: #08111e;
  background: linear-gradient(135deg, var(--primary), var(--highlight));
  border-color: transparent;
}

.login-panel {
  display: grid;
  gap: 14px;
}

.password-box {
  display: grid;
  margin-top: 18px;
}

.password-box textarea {
  background: rgba(3, 10, 18, 0.6);
}

.compact-details,
.report-expander {
  border: 1px solid var(--line-data);
  border-radius: 20px;
  background: rgba(11, 20, 37, 0.72);
}

.compact-details {
  margin-top: 18px;
  padding: 14px 16px;
}

.compact-details summary,
.report-expander summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.compact-details summary::-webkit-details-marker,
.report-expander summary::-webkit-details-marker,
.settings-details summary::-webkit-details-marker {
  display: none;
}

.compact-details textarea {
  margin-top: 12px;
}

.subsection {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.settings-details {
  padding-top: 0;
}

.settings-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  cursor: pointer;
}

.settings-details summary strong {
  display: block;
  font-size: 20px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.data-band .tabs {
  border-color: var(--line-data);
  background: rgba(8, 16, 30, 0.7);
}

.tab-button {
  flex: 1 1 120px;
}

.tab-button.active {
  color: #08111e;
  background: linear-gradient(135deg, var(--primary), var(--highlight));
  border-color: transparent;
}

.tab-panel {
  min-width: 0;
}

.round-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0 18px;
}

.round-shortcuts span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.round-chip {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
  box-shadow: none;
}

.round-chip.active {
  color: #08111e;
  background: linear-gradient(135deg, var(--primary), var(--highlight));
  border-color: transparent;
}

.command-deck {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
  margin-top: 18px;
}

#playerDecisionSection .command-deck {
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
}

.command-hero,
.intel-panel,
.selection-brief,
.decision-shell {
  border: 1px solid var(--line-data);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(9, 17, 31, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

.command-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.92fr);
  gap: 18px;
  padding: 22px;
}

.player-command-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
}

.command-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.command-copy h3,
.intel-panel-head h3,
.selection-brief-head h3 {
  margin: 0;
  font-family: var(--heading-font);
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.05;
  color: var(--text-strong);
}

.command-copy .muted,
.intel-panel-head .muted,
.selection-brief-head .muted {
  margin: 0;
}

.command-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.player-decision-metrics {
  grid-template-columns: minmax(0, 1fr);
  justify-self: end;
  width: min(100%, 240px);
  min-width: 0;
}

.command-metric {
  padding: 14px 16px;
  border: 1px solid rgba(177, 199, 240, 0.14);
  border-radius: 18px;
  background: rgba(8, 16, 30, 0.84);
}

.command-metric span {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.command-metric strong {
  display: block;
  margin-top: 8px;
  font-family: var(--heading-font);
  font-size: 20px;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.tone-live strong {
  color: #9de9ff;
}

.tone-ready strong {
  color: #9cf0c1;
}

.tone-warning strong {
  color: #ffd485;
}

.tone-focus strong {
  color: #ffe2bf;
}

.intel-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.intel-panel-head {
  display: grid;
  gap: 8px;
}

.intel-grid {
  display: grid;
  gap: 10px;
}

.intel-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(177, 199, 240, 0.12);
  border-radius: 16px;
  background: rgba(8, 16, 30, 0.78);
}

.intel-line span {
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.intel-line strong {
  color: var(--text-strong);
  font-size: 14px;
  text-align: right;
}

.selection-brief {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 20px 22px;
}

.finance-strip {
  padding: 18px 22px;
}

.finance-strip .selection-chip-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.selection-brief-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.selection-chip-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.selection-chip {
  padding: 14px 16px;
  border: 1px solid rgba(177, 199, 240, 0.14);
  border-radius: 18px;
  background: rgba(8, 16, 30, 0.82);
}

.selection-chip span {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selection-chip strong {
  display: block;
  margin-top: 8px;
  font-family: var(--heading-font);
  font-size: 18px;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.decision-shell {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 22px;
}

#playerDecisionSection .command-hero,
#playerDecisionSection .decision-shell {
  border-color: rgba(126, 242, 255, 0.18);
}

.decision-input-grid {
  margin-top: 0;
}

.decision-city-grid {
  margin: 0;
}

.decision-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.decision-action-row .muted {
  margin: 0;
  max-width: 62ch;
}

.timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line-data);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(11, 20, 37, 0.78);
}

.timer-row strong {
  display: block;
  margin-top: 4px;
  font-family: var(--heading-font);
  font-size: 30px;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.timer-form {
  display: grid;
  grid-template-columns: 170px auto auto;
  gap: 10px;
  align-items: end;
}

.input-hint,
.all-decision-meta {
  align-self: end;
  margin: 0;
  padding: 14px;
  color: var(--text-soft);
  font-size: 13px;
  border: 1px solid var(--line-data);
  border-radius: 16px;
  background: rgba(8, 16, 30, 0.86);
}

.decision-hint {
  min-height: 48px;
}

.decision-tools,
.batch-decision-actions {
  justify-content: flex-start;
}

.batch-decision-actions {
  margin-bottom: 14px;
}

.all-decision-main {
  margin-top: 14px;
}

.all-decision-city-grid {
  margin-bottom: 0;
}

.editable-decision-block {
  margin-top: 0;
}

.editable-decision-table-wrap {
  margin-top: 14px;
}

.editable-decision-table {
  min-width: 920px;
}

.editable-decision-table td {
  vertical-align: middle;
  white-space: normal;
}

.editable-decision-table input[type="text"],
.editable-decision-table input[type="number"] {
  width: 100%;
  min-width: 96px;
}

.editable-checkbox-cell {
  text-align: center;
}

.city-config-wrap {
  margin-top: 16px;
}

.market-preset-tools {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto minmax(260px, 1fr);
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(171, 194, 235, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
}

.market-preset-select {
  min-width: 0;
}

.market-preset-hint {
  margin: 0;
  align-self: center;
  line-height: 1.55;
}

.city-config-table {
  min-width: 1080px;
}

.city-config-table input {
  min-width: 110px;
  min-height: 42px;
}

.city-config-table .city-name-input {
  min-width: 140px;
}

.city-config-table button {
  min-height: 42px;
}

.notice {
  margin: 18px 0;
  padding: 14px 16px;
  color: #dffff0;
  background: rgba(103, 219, 160, 0.12);
  border: 1px solid rgba(103, 219, 160, 0.24);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.notice.warning {
  color: #ffe8ca;
  background: rgba(255, 202, 115, 0.12);
  border-color: rgba(255, 202, 115, 0.26);
}

.field-invalid {
  border-color: rgba(255, 122, 109, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(255, 122, 109, 0.14) !important;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

.report-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  min-width: 0;
}

.report-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line-data);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(11, 20, 37, 0.8);
}

.report-block h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.report-expander summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.report-expander summary span:first-child {
  color: var(--text-strong);
}

.report-expander .report-panel {
  margin: 0;
  padding: 0 16px 16px;
}

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

.report-metric {
  padding: 14px;
  border: 1px solid rgba(177, 199, 240, 0.16);
  border-radius: 16px;
  background: rgba(8, 16, 30, 0.84);
}

.report-metric span {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--text-strong);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.report-metric.cell-money strong,
.report-metric.cell-number strong,
.report-metric.cell-rate strong {
  color: #fdf6ea;
}

.final-grid,
.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 20px;
}

.final-block,
.chart-block {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line-data);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(11, 20, 37, 0.8);
}

.final-block h3,
.chart-block h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

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

.ranking-title {
  margin: 24px 0 0;
  font-size: 17px;
}

.player-phone-cards {
  display: none;
  gap: 14px;
  margin-top: 18px;
}

.player-market-table-stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.market-table-block {
  display: grid;
  gap: 10px;
}

.market-table-block h3 {
  margin: 0;
  font-size: 20px;
}

.data-empty-card,
.ranking-card,
.report-row-card {
  padding: 18px;
  border: 1px solid var(--line-data);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--bg-data-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.data-empty-card p {
  margin: 0;
}

.ranking-card {
  display: grid;
  gap: 14px;
}

.ranking-card.rank-top-1 {
  border-color: rgba(255, 212, 112, 0.36);
}

.ranking-card.rank-top-2 {
  border-color: rgba(119, 214, 255, 0.34);
}

.ranking-card.rank-top-3 {
  border-color: rgba(255, 154, 118, 0.34);
}

.ranking-card.current-player {
  box-shadow:
    0 0 0 1px rgba(72, 192, 255, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ranking-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.ranking-card-head h3 {
  margin: 6px 0 0;
  font-size: 22px;
}

.ranking-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 222, 180, 0.18);
  border-radius: 999px;
  background: rgba(255, 194, 102, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ranking-card-fields,
.report-row-card-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-card-grid {
  display: grid;
  gap: 12px;
}

.report-row-card {
  display: grid;
  gap: 12px;
}

.report-row-card-head span {
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-card-field {
  padding: 12px 14px;
  border: 1px solid rgba(177, 199, 240, 0.14);
  border-radius: 16px;
  background: var(--bg-soft);
}

.detail-card-field span {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-card-field strong {
  display: block;
  margin-top: 8px;
  color: var(--text-strong);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.chart-block canvas {
  display: block;
  width: 100%;
  height: 560px;
  border-radius: 18px;
  border: 1px solid var(--line-data);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 14px;
  color: var(--chart-text);
  font-size: 13px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(178, 199, 240, 0.22);
  border-radius: 14px;
  background: rgba(8, 16, 30, 0.82);
}

.legend-swatch {
  width: 22px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.legend-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--chart-text);
  font-weight: 600;
}

.table-wrap {
  margin-top: 18px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  border: 1px solid var(--line-data);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(8, 16, 30, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ranking-scroll {
  --ranking-head-height: 48px;
  --ranking-row-height: 48px;
  max-height: calc(var(--ranking-head-height) + (15 * var(--ranking-row-height)));
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ranking-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(13, 24, 43, 0.98);
  box-shadow: 0 1px 0 var(--line-data);
}

.capacity-table .table-wrap {
  margin-top: 12px;
}

.capacity-table-inner table,
.report-overview-table {
  min-width: 0;
}

.report-overview-table td {
  white-space: normal;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(173, 196, 238, 0.1);
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(20, 34, 57, 0.98), rgba(10, 18, 33, 0.98));
  color: #ffe3bf;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  box-shadow: inset 0 -1px 0 rgba(188, 208, 243, 0.12), 0 8px 16px rgba(0, 0, 0, 0.18);
}

td {
  color: var(--text-soft);
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.024);
}

tbody tr:hover td {
  background: rgba(86, 169, 255, 0.11);
}

tr.rank-top-1 td {
  box-shadow: inset 4px 0 0 #ffd470;
}

tr.rank-top-2 td {
  box-shadow: inset 4px 0 0 #77d6ff;
}

tr.rank-top-3 td {
  box-shadow: inset 4px 0 0 #ff9a76;
}

tr.current-player td {
  background: rgba(72, 192, 255, 0.12) !important;
  color: #ffffff;
}

.cell-money,
.cell-number,
.cell-rate {
  text-align: right;
}

th.cell-money,
th.cell-number,
th.cell-rate,
td.cell-money,
td.cell-number,
td.cell-rate {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

td.cell-money,
td.cell-number,
td.cell-rate,
td.cell-status {
  color: var(--text-strong);
}

td.cell-status,
th.cell-status {
  font-weight: 700;
}

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

.city-grid,
.market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 0;
}

.city-item,
.market-item {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line-data);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(11, 20, 37, 0.8);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.city-item::before,
.market-item::before {
  content: "";
  position: absolute;
  right: -50px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
}

.market-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.market-title-row h3 {
  margin: 0;
  font-size: 22px;
}

.market-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 222, 180, 0.18);
  border-radius: 999px;
  background: rgba(255, 194, 102, 0.08);
  color: #ffe6c7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.market-summary,
.city-subtitle {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

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

.market-kpi,
.reference-cell {
  padding: 12px 14px;
  border: 1px solid rgba(177, 199, 240, 0.14);
  border-radius: 16px;
  background: rgba(8, 16, 30, 0.84);
}

.market-kpi span,
.reference-cell span {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-kpi strong,
.reference-cell strong {
  display: block;
  margin-top: 8px;
  font-family: var(--heading-font);
  font-size: 18px;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.parameter-reference {
  grid-column: 1 / -1;
}

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

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

.telemetry-chip {
  padding: 12px 14px;
  border: 1px solid rgba(177, 199, 240, 0.14);
  border-radius: 16px;
  background: rgba(8, 16, 30, 0.82);
}

.telemetry-chip span {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telemetry-chip strong {
  display: block;
  margin-top: 8px;
  font-family: var(--heading-font);
  font-size: 17px;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

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

#playerDecisionSection .city-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-select {
  min-width: 150px;
}

.inline-select select {
  min-height: 44px;
}

#playerDecisionSection .city-item {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

#playerDecisionSection .city-item:hover {
  transform: translateY(-3px);
  border-color: rgba(126, 242, 255, 0.28);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  padding: 11px 12px;
  border: 1px solid rgba(177, 199, 240, 0.14);
  border-radius: 14px;
  background: rgba(8, 16, 30, 0.78);
}

.checkbox-row input {
  width: auto;
  min-height: auto;
  margin: 0;
  accent-color: var(--primary-strong);
}

.submission-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.submission-pill {
  padding: 12px 14px;
  border: 1px solid var(--line-data);
  border-radius: 16px;
  color: var(--text-soft);
  background: rgba(11, 20, 37, 0.8);
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.submission-pill.done {
  color: #dffff0;
  border-color: rgba(103, 219, 160, 0.26);
  background: rgba(103, 219, 160, 0.12);
}

.process-confirm {
  min-height: auto;
}

.theme-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 22;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 11, 20, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.theme-chip {
  min-height: 40px;
  padding: 8px 16px;
  box-shadow: none;
}

.theme-chip.active {
  box-shadow: 0 12px 26px rgba(255, 125, 77, 0.22);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 20;
  max-width: 380px;
  padding: 14px 16px 14px 22px;
  color: var(--text);
  background: rgba(5, 11, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--highlight));
}

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

body.theme-light .topbar {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(109, 127, 150, 0.18);
  box-shadow: 0 24px 70px rgba(87, 102, 122, 0.14);
}

body.theme-light .brand-mark {
  border-color: rgba(109, 127, 150, 0.14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 244, 250, 0.98)),
    rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 28px rgba(133, 149, 171, 0.14);
}

body.theme-light .brand-mark::after {
  background:
    linear-gradient(135deg, transparent 48%, rgba(25, 36, 51, 0.05) 49%, transparent 52%),
    linear-gradient(0deg, rgba(25, 36, 51, 0.02), transparent);
}

body.theme-light .campaign-brief {
  background:
    radial-gradient(circle at top right, rgba(72, 192, 255, 0.11), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 252, 0.97)),
    rgba(255, 255, 255, 0.94);
}

body.theme-light .story-panel,
body.theme-light .login-console,
body.theme-light .brief-stat,
body.theme-light .story-card,
body.theme-light .stat,
body.theme-light .tabs,
body.theme-light .role-switch,
body.theme-light .compact-details,
body.theme-light .report-expander,
body.theme-light .command-hero,
body.theme-light .intel-panel,
body.theme-light .selection-brief,
body.theme-light .decision-shell,
body.theme-light .timer-row,
body.theme-light .report-block,
body.theme-light .final-block,
body.theme-light .chart-block,
body.theme-light .table-wrap,
body.theme-light .city-item,
body.theme-light .market-item,
body.theme-light .command-metric,
body.theme-light .intel-line,
body.theme-light .selection-chip,
body.theme-light .market-kpi,
body.theme-light .reference-cell,
body.theme-light .telemetry-chip,
body.theme-light .report-metric,
body.theme-light .legend-item,
body.theme-light .submission-pill,
body.theme-light .checkbox-row,
body.theme-light .input-hint,
body.theme-light .all-decision-meta,
body.theme-light .market-preset-tools,
body.theme-light .theme-dock {
  border-color: rgba(109, 127, 150, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 253, 0.94)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 34px rgba(133, 149, 171, 0.12);
}

body.theme-light .story-panel::after,
body.theme-light .login-console::after {
  background: linear-gradient(180deg, rgba(25, 36, 51, 0.03), transparent 36%);
}

body.theme-light .brief-pill,
body.theme-light .story-pill {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(109, 127, 150, 0.16);
}

body.theme-light .data-band .tabs {
  background: rgba(248, 250, 253, 0.94);
}

body.theme-light button.ghost,
body.theme-light .topbar-actions a {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(109, 127, 150, 0.18);
}

body.theme-light button.ghost:hover,
body.theme-light .topbar-actions a:hover {
  background: rgba(255, 255, 255, 0.96);
}

body.theme-light .market-badge {
  border-color: rgba(154, 109, 45, 0.16);
  background: rgba(242, 179, 90, 0.12);
  color: #8a5a16;
}

body.theme-light .notice {
  color: #16563b;
  background: rgba(103, 219, 160, 0.16);
  border-color: rgba(76, 168, 120, 0.24);
}

body.theme-light .notice.warning {
  color: #8a5a12;
  background: rgba(255, 202, 115, 0.18);
  border-color: rgba(223, 168, 72, 0.28);
}

body.theme-light .submission-pill.done {
  color: #16563b;
  border-color: rgba(76, 168, 120, 0.24);
  background: rgba(103, 219, 160, 0.16);
}

body.theme-light .report-metric.cell-money strong,
body.theme-light .report-metric.cell-number strong,
body.theme-light .report-metric.cell-rate strong {
  color: var(--text-strong);
}

body.theme-light th {
  background:
    linear-gradient(180deg, rgba(246, 248, 252, 0.99), rgba(236, 241, 248, 0.99));
  color: #7a571f;
  box-shadow: inset 0 -1px 0 rgba(144, 161, 184, 0.18), 0 8px 16px rgba(146, 160, 179, 0.12);
}

body.theme-light tbody tr:nth-child(even) td {
  background: rgba(25, 36, 51, 0.02);
}

body.theme-light tbody tr:hover td {
  background: rgba(72, 192, 255, 0.08);
}

body.theme-light tr.current-player td {
  color: #102032;
}

body.theme-light .password-box textarea {
  background: rgba(255, 255, 255, 0.92);
}

body.theme-light .toast {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(109, 127, 150, 0.18);
  box-shadow: 0 22px 60px rgba(87, 102, 122, 0.18);
}

body.theme-light .ranking-card-badge {
  background: rgba(154, 109, 45, 0.08);
  border-color: rgba(154, 109, 45, 0.16);
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(18px, -16px, 0) scale(1.08);
  }
}

@keyframes sweep {
  0% {
    transform: translateX(-36px) rotate(0deg);
  }

  100% {
    transform: translateX(36px) rotate(360deg);
  }
}

body.device-phone:not(.role-admin) .topbar,
body.device-phone:not(.role-admin) .section-heading,
body.device-phone:not(.role-admin) .button-row,
body.device-phone:not(.role-admin) .timer-row,
body.device-phone:not(.role-admin) .selection-brief-head,
body.device-phone:not(.role-admin) .decision-action-row {
  align-items: stretch;
  flex-direction: column;
}

body.device-phone:not(.role-admin) .topbar {
  width: calc(100% - 20px);
  margin: 10px auto 0;
  padding: 14px 16px;
  gap: 14px;
}

body.device-phone:not(.role-admin) .layout {
  padding: 16px 12px 104px;
}

body.device-phone:not(.role-admin) .campaign-brief,
body.device-phone:not(.role-admin) .band {
  margin-top: 16px;
  padding: 18px;
  border-radius: 22px;
}

body.device-phone:not(.role-admin) .campaign-brief-inner,
body.device-phone:not(.role-admin) .login-stage,
body.device-phone:not(.role-admin) .status-band,
body.device-phone:not(.role-admin) .command-deck,
body.device-phone:not(.role-admin) .command-hero,
body.device-phone:not(.role-admin) .final-grid,
body.device-phone:not(.role-admin) .chart-grid {
  grid-template-columns: 1fr;
}

body.device-phone:not(.role-admin) .login-console {
  order: -1;
  padding: 22px;
}

body.device-phone:not(.role-admin) .story-panel {
  gap: 16px;
  padding: 20px;
}

body.device-phone:not(.role-admin) .brief-grid,
body.device-phone:not(.role-admin) .grid-form,
body.device-phone:not(.role-admin) .command-metric-grid,
body.device-phone:not(.role-admin) .story-grid,
body.device-phone:not(.role-admin) .report-grid,
body.device-phone:not(.role-admin) .market-kpis,
body.device-phone:not(.role-admin) .reference-grid,
body.device-phone:not(.role-admin) .city-telemetry,
body.device-phone:not(.role-admin) .city-fields,
body.device-phone:not(.role-admin) .status-grid,
body.device-phone:not(.role-admin) .market-grid,
body.device-phone:not(.role-admin) .city-grid,
body.device-phone:not(.role-admin) .chart-legend {
  grid-template-columns: 1fr;
}

body.device-phone:not(.role-admin) .selection-chip-row,
body.device-phone:not(.role-admin) .finance-strip .selection-chip-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.device-phone:not(.role-admin) .role-switch {
  grid-template-columns: 1fr;
}

body.device-phone:not(.role-admin) .tabs {
  display: grid;
  grid-template-columns: 1fr;
}

body.device-phone:not(.role-admin) .command-hero,
body.device-phone:not(.role-admin) .intel-panel,
body.device-phone:not(.role-admin) .selection-brief,
body.device-phone:not(.role-admin) .decision-shell,
body.device-phone:not(.role-admin) .report-block,
body.device-phone:not(.role-admin) .final-block,
body.device-phone:not(.role-admin) .chart-block {
  padding: 18px;
  border-radius: 20px;
}

body.device-phone:not(.role-admin) .player-decision-metrics {
  justify-self: stretch;
  width: 100%;
}

body.device-phone:not(.role-admin) .ranking-title {
  margin-top: 20px;
  font-size: 16px;
}

body.device-phone:not(.role-admin) .market-title-row,
body.device-phone:not(.role-admin) .report-expander summary {
  align-items: start;
  flex-direction: column;
}

body.device-phone:not(.role-admin) input,
body.device-phone:not(.role-admin) select,
body.device-phone:not(.role-admin) textarea,
body.device-phone:not(.role-admin) button,
body.device-phone:not(.role-admin) .topbar-actions a {
  min-height: 50px;
}

body.device-phone:not(.role-admin) button,
body.device-phone:not(.role-admin) .topbar-actions a {
  width: 100%;
}

body.device-phone:not(.role-admin) .inline-select {
  min-width: 0;
}

body.device-phone:not(.role-admin) .theme-dock {
  left: 12px;
  right: 12px;
  bottom: 12px;
  justify-content: stretch;
}

body.device-phone:not(.role-admin) .theme-chip {
  flex: 1 1 0;
}

body.device-phone:not(.role-admin) .toast {
  left: 12px;
  right: 12px;
  bottom: 76px;
  width: auto;
}

body.device-phone:not(.role-admin) .brand-lockup {
  align-items: start;
}

body.device-phone:not(.role-admin) .brand-mark {
  width: 50px;
  height: 50px;
}

body.device-phone:not(.role-admin) .brief-title {
  font-size: 30px;
}

body.device-phone.role-player #playerRunningTabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.device-phone.role-player #playerRunningTabs .tab-button {
  min-height: 52px;
  padding: 10px 12px;
  font-size: 14px;
}

body.device-phone.role-player #playerDecisionIntel {
  display: none;
}

body.device-phone.role-player #campaignBrief .brief-grid,
body.device-phone.role-player #playerStatusGrid,
body.device-phone.role-player .player-decision-metrics,
body.device-phone.role-player .decision-input-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.device-phone.role-player #playerDecisionSection .command-deck,
body.device-phone.role-player #playerDecisionBrief,
body.device-phone.role-player #playerDecisionBrief .command-copy,
body.device-phone.role-player #playerDecisionBrief .player-decision-metrics {
  width: 100%;
  min-width: 0;
}

body.device-phone.role-player #playerDecisionSection .command-deck,
body.device-phone.role-player #playerDecisionBrief {
  grid-template-columns: 1fr;
}

body.device-phone.role-player #playerDecisionBrief {
  gap: 14px;
}

body.device-phone.role-player #playerDecisionBrief .command-copy h3 {
  font-size: clamp(22px, 6.5vw, 28px);
}

body.device-phone.role-player #loanHint,
body.device-phone.role-player #playerBrandField {
  grid-column: 1 / -1;
}

body.device-phone.role-player .player-phone-cards {
  display: none;
}

body.device-phone.role-player .player-desktop-table {
  display: block;
}

body.device-phone.role-player .player-desktop-table table,
body.device-phone.role-player .player-mixed-table table {
  min-width: 620px;
}

body.device-phone.role-player .player-rule-table table {
  min-width: 0;
}

body.device-phone.role-player #playerCurrentRankingSection table,
body.device-phone.role-player #playerFinalSection .final-block table {
  table-layout: fixed;
}

body.device-phone.role-player #playerCurrentRankingSection th,
body.device-phone.role-player #playerCurrentRankingSection td,
body.device-phone.role-player #playerFinalSection .final-block th,
body.device-phone.role-player #playerFinalSection .final-block td,
body.device-phone.role-player .report-overview-table th,
body.device-phone.role-player .report-overview-table td {
  padding: 10px 8px;
  font-size: 12px;
}

body.device-phone.role-player #playerCurrentRankingSection table {
  width: 100%;
  min-width: 0;
}

body.device-phone.role-player #playerCurrentRankingSection .player-desktop-table {
  overflow-x: hidden;
  overflow-y: auto;
  --ranking-head-height: 40px;
  --ranking-row-height: 38px;
}

body.device-phone.role-player #playerFinalSection .ranking-scroll {
  --ranking-head-height: 40px;
  --ranking-row-height: 38px;
}

body.device-phone.role-player #playerCurrentRankingSection .col-rank,
body.device-phone.role-player #playerCurrentRankingSection .col-id,
body.device-phone.role-player #playerCurrentRankingSection .col-home {
  white-space: nowrap;
}

body.device-phone.role-player #playerCurrentRankingSection .col-company {
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
}

body.device-phone.role-player #playerCurrentRankingSection .col-cash {
  white-space: nowrap;
  font-size: 11px;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-basic .col-rank {
  width: 33.33%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-basic .col-id {
  width: 33.33%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-basic .col-company {
  width: 33.34%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-home .col-rank {
  width: 22.66%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-home .col-id {
  width: 22.66%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-home .col-home {
  width: 22.66%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-home .col-company {
  width: 32.02%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-cash .col-rank {
  width: 18%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-cash .col-id {
  width: 18%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-cash .col-company {
  width: 32%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-cash .col-cash {
  width: 32%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-full .col-rank {
  width: 13.33%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-full .col-id {
  width: 13.33%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-full .col-home {
  width: 13.33%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-full .col-cash {
  width: 30.01%;
}

body.device-phone.role-player #playerCurrentRankingSection table.player-ranking-layout-full .col-company {
  width: 30%;
}

body.device-phone.role-player #playerSubmittedDecisionPanel .table-wrap table,
body.device-phone.role-player #playerCurrentReportSection .table-wrap table,
body.device-phone.role-player #playerFinalReportPanel .table-wrap table {
  min-width: 560px;
}

body.device-phone.role-player .report-overview-table {
  min-width: 460px;
  table-layout: fixed;
}

body.device-phone.role-player .capacity-table-inner table {
  min-width: 0;
}

body.device-phone.role-player .chart-block canvas {
  height: 320px;
}

body.device-phone.role-player .legend-label {
  white-space: normal;
}

@media (max-width: 1120px) {
  .topbar {
    width: calc(100% - 32px);
    padding: 14px 20px;
  }

  .campaign-brief-inner,
  .command-deck,
  .command-hero,
  .status-band,
  .login-stage,
  .final-grid,
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .grid-form,
  .command-metric-grid,
  .selection-chip-row,
  .parameter-reference .reference-grid,
  .story-grid,
  .city-grid,
  .market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .market-preset-tools {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 820px) {
  .topbar,
  .section-heading,
  .button-row,
  .timer-row,
  .selection-brief-head,
  .decision-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .layout {
    padding: 28px 16px 64px;
  }

  .theme-dock {
    right: 16px;
    bottom: 16px;
  }

  .toast {
    right: 16px;
    bottom: 84px;
  }

  .campaign-brief,
  .band {
    padding: 22px;
  }

  .topbar {
    gap: 16px;
  }

  .brief-grid,
  .grid-form,
  .command-metric-grid,
  .story-grid,
  .report-grid,
  .market-kpis,
  .reference-grid,
  .city-telemetry,
  .city-fields,
  .tabs {
    grid-template-columns: 1fr;
  }

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

  .status-grid,
  .submission-list,
  .selection-chip-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timer-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    width: calc(100% - 24px);
    margin: 12px auto 0;
  }

  .layout {
    padding: 20px 16px 64px;
  }

  .brand-lockup {
    align-items: start;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
  }

  .brief-title {
    font-size: 34px;
  }

  .status-grid,
  .submission-list,
  .selection-chip-row,
  .city-telemetry,
  .city-grid,
  .market-grid,
  .chart-legend {
    grid-template-columns: 1fr;
  }

  .role-switch {
    grid-template-columns: 1fr;
  }

  .theme-dock {
    left: 16px;
    right: 16px;
    justify-content: stretch;
  }

  .theme-chip {
    flex: 1 1 0;
  }

  th,
  td {
    padding: 12px 14px;
  }

  table {
    min-width: 640px;
  }

  .topbar-actions a,
  button {
    width: 100%;
  }
}
