/**
 * TRUGAME STUDIO — one house, every sport.
 * Same chrome as a first-party EA menu: condensed type, gold tick,
 * cut corners, giant year, sport wash. The sport changes. The studio does not.
 */
@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Barlow:wght@400;600&family=Oswald:wght@500;600;700&display=swap");

:root {
  --st-ink: #07080b;
  --st-ink-2: #0c0e13;
  --st-panel: #12151c;
  --st-panel-2: #181c25;
  --st-line: #2c3340;
  --st-gold: #e2b84a;
  --st-gold-2: #f3d27a;
  --st-white: #f3efe6;
  --st-mute: #8b93a0;
  --st-heat: #ff3b1f;
  --st-ok: #2ee59d;
  --st-sport: #e2b84a;
  --st-wash: rgba(226, 184, 74, 0.14);
  --st-display: "Oswald", "Barlow Condensed", Impact, sans-serif;
  --st-ui: "Barlow Condensed", "Oswald", sans-serif;
  --st-body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --gold: var(--st-gold);
  --heat: var(--st-heat);
  --ok: var(--st-ok);
  --cream: var(--st-white);
  --steel: var(--st-mute);
  --line: var(--st-line);
  --card: var(--st-panel);
  color-scheme: dark;
}

html[data-sport="hockey"] {
  --st-sport: #3d9bff;
  --st-wash: rgba(40, 120, 220, 0.2);
  --st-ink: #050a12;
}
html[data-sport="baseball"] {
  --st-sport: #d4a45a;
  --st-wash: rgba(90, 130, 40, 0.16);
  --st-ink: #0c0a07;
}
html[data-sport="racing"] {
  --st-sport: #ff4d1c;
  --st-wash: rgba(255, 70, 20, 0.16);
  --st-ink: #080808;
}
html[data-sport="football"] {
  --st-sport: #3db5ff;
  --st-wash: rgba(20, 70, 160, 0.22);
  --st-ink: #061018;
}
html[data-sport="mma"] {
  --st-sport: #e11d48;
  --st-wash: rgba(180, 20, 50, 0.18);
  --st-ink: #0a0608;
}
html[data-sport="earth"] {
  --st-sport: #2ee5c6;
  --st-wash: rgba(20, 160, 150, 0.16);
  --st-ink: #050a12;
}

html, body, #root, #app {
  background: var(--st-ink);
  color: var(--st-white);
}
body {
  font-family: var(--st-body);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), transparent 28%),
    radial-gradient(1100px 520px at 0% 0%, var(--st-wash), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(226, 184, 74, 0.07), transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255, 255, 255, 0.015) 3px, rgba(255, 255, 255, 0.015) 4px),
    var(--st-ink);
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 8%, transparent 92%, rgba(0, 0, 0, 0.28));
}
h1, h2, h3, .rail h1, .mast h1, .title h1 {
  font-family: var(--st-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin: 0;
}
button, select {
  font-family: var(--st-ui);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  cursor: pointer;
  color: inherit;
}
button {
  background: #161a22;
  border: 1px solid var(--st-line);
  padding: 0.48rem 0.85rem;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
button:hover { border-color: var(--st-gold); color: var(--st-gold); }
button.primary {
  background: linear-gradient(180deg, var(--st-gold-2), var(--st-gold));
  color: #111;
  border-color: var(--st-gold);
}
button.primary:hover { filter: brightness(1.08); color: #111; }
button.on {
  background: var(--st-white);
  color: #111;
  border-color: var(--st-white);
}
button:disabled { opacity: 0.38; cursor: not-allowed; }

/* ── Splash / title ─────────────────────────────────────── */
.title, .splash {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.title {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1.2rem 3rem;
}
.title::before, .splash::before {
  content: "";
  position: absolute;
  inset: -10% -20%;
  background:
    repeating-linear-gradient(-18deg, transparent, transparent 46px, rgba(226, 184, 74, 0.05) 46px, rgba(226, 184, 74, 0.05) 48px);
  pointer-events: none;
}
.splash-brand, .title .tag {
  font-family: var(--st-ui);
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  color: var(--st-gold);
  text-transform: uppercase;
}
.splash-year {
  font-family: var(--st-display);
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: 0.8;
  color: var(--st-sport);
  text-shadow: 0 0 40px color-mix(in srgb, var(--st-sport) 45%, transparent);
  letter-spacing: -0.04em;
}
.title h1, .splash h1 {
  font-size: clamp(2.4rem, 8vw, 5.4rem);
  line-height: 0.9;
  margin: 0.15rem 0 0.35rem;
}
.splash-mode {
  display: inline-block;
  margin: 0.4rem 0 0.8rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--st-gold);
  color: var(--st-gold);
  font-family: var(--st-ui);
  letter-spacing: 0.28em;
  font-size: 0.78rem;
}
.splash-tag, .title > div > p, .title p {
  max-width: 36rem;
  margin: 0.4rem auto 1.1rem;
  color: var(--st-mute);
  font-family: var(--st-body);
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 400;
}

/* ── Office chrome ──────────────────────────────────────── */
.office {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100dvh;
}
.rail {
  background: linear-gradient(180deg, #0a0c10, #07080b);
  border-right: 1px solid var(--st-line);
  padding: 1rem 0.75rem 2rem;
  position: relative;
}
.rail::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--st-gold), transparent 70%);
}
.rail .tag {
  color: var(--st-gold);
  letter-spacing: 0.22em;
  font-size: 0.62rem;
  text-transform: uppercase;
  font-family: var(--st-ui);
}
.rail h1 {
  font-size: 1.45rem;
  line-height: 1;
  margin: 0.45rem 0 0.35rem;
}
.rail-record {
  margin: 0.6rem 0 0.8rem;
  padding: 0.45rem 0.2rem;
  border-top: 1px solid var(--st-line);
  border-bottom: 1px solid var(--st-line);
}
.rail-record b {
  display: block;
  font-family: var(--st-display);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.04em;
}
.rail-record span {
  font-family: var(--st-ui);
  color: var(--st-mute);
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}
.rail nav {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  margin-top: 1rem;
}
.rail nav button {
  text-align: left;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  clip-path: none;
  padding: 0.5rem 0.55rem;
  color: var(--st-mute);
}
.rail nav button:hover { color: var(--st-white); background: rgba(255, 255, 255, 0.03); }
.rail nav button.on {
  color: var(--st-white);
  background: linear-gradient(90deg, color-mix(in srgb, var(--st-gold) 22%, transparent), transparent);
  border-left-color: var(--st-gold);
}

.main { padding: 0.9rem 1.2rem 3rem; }
.top, .hud, .mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 0;
  padding: 0.55rem 0 0.75rem;
  margin-bottom: 1rem;
  position: relative;
}
.top::after, .hud::after, .mast::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--st-gold), var(--st-sport) 55%, transparent);
}
.hud-left, .top > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.9rem;
}
.hud-house, .mast .tag {
  font-family: var(--st-ui);
  letter-spacing: 0.32em;
  font-size: 0.62rem;
  color: var(--st-gold);
}
.hud-title, .mast h1 {
  font-family: var(--st-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: 0.08em;
}
.hud-mode {
  font-family: var(--st-ui);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--st-sport);
  border: 1px solid color-mix(in srgb, var(--st-sport) 50%, transparent);
  padding: 0.08rem 0.4rem;
}
.actions { display: flex; gap: 0.4rem; }

/* ── Cards / tables / bars ──────────────────────────────── */
.card {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.03), transparent 40%),
    linear-gradient(180deg, var(--st-panel-2), var(--st-panel));
  border: 1px solid var(--st-line);
  padding: 0.85rem 0.95rem;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  background: var(--st-gold);
}
.card h2 {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: var(--st-gold);
}
.kv { display: flex; justify-content: space-between; color: var(--st-mute); font-size: 0.85rem; font-family: var(--st-ui); letter-spacing: 0.06em; }
.kv b { color: var(--st-white); }
.bar { height: 8px; background: #0b0d12; margin: 0.18rem 0 0.5rem; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--st-gold), var(--st-sport)); }
.bar.heat > i { background: var(--st-heat); }
.bar.ok > i { background: var(--st-ok); }
.meta {
  color: var(--st-mute);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--st-ui);
}
.chip {
  display: inline-block;
  background: var(--st-gold);
  color: #111;
  font-family: var(--st-ui);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.08rem 0.34rem;
  margin-left: 0.3rem;
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
.voice, .rave {
  font-family: var(--st-body);
  font-style: italic;
  border-left: 3px solid var(--st-gold);
  padding: 0.45rem 0.7rem;
  margin: 0.4rem 0;
  background: rgba(0, 0, 0, 0.28);
  text-transform: none;
  letter-spacing: 0;
}
.paper {
  font-family: var(--st-body);
  background: #ece6d8;
  color: #14110c;
  clip-path: none;
}
.paper h2 { color: #8a1c1c; }
.paper p { margin: 0.35rem 0; border-bottom: 1px solid #d4cbb6; padding-bottom: 0.3rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.86rem; font-family: var(--st-body); }
th {
  text-align: left;
  color: var(--st-mute);
  font-family: var(--st-ui);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
td, th { padding: 0.32rem 0.22rem; border-bottom: 1px solid #1b2028; }
tr.me td { color: var(--st-gold); }
tr.click { cursor: pointer; }
tr.click:hover td { color: var(--st-gold); }
tr.total td { font-weight: 700; border-top: 2px solid var(--st-gold); }

.pick { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.pick button, .tile {
  min-width: 7.4rem;
  background: #12161d;
  border: 1px solid var(--st-line);
}
.pick button:hover, .tile:hover {
  border-color: var(--st-sport);
  color: var(--st-white);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--st-sport) 50%, transparent);
}

.awards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.55rem; }
.award {
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--st-gold) 55%, transparent);
  background: #0d1016;
  padding: 0.55rem 0.6rem;
  width: 100%;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.award .who {
  font-family: var(--st-display);
  font-size: 1.05rem;
  margin: 0.15rem 0;
  text-transform: uppercase;
}
.boards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-top: 0.7rem; }
.dash { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 0.8rem; }
.soul { display: grid; grid-template-columns: 0.9fr 0.9fr 1.2fr; gap: 0.8rem; }
.soul.three { grid-template-columns: 0.9fr 0.9fr 1.2fr; }
.scope { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0 0.8rem; }
.scroll { overflow-x: auto; }
.ceil { color: var(--st-gold); font-weight: 700; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.8rem 0 1rem; }
.shell { max-width: 1280px; margin: 0 auto; padding: 1rem 1.1rem 3rem; }
.week { color: var(--st-gold); font-weight: 700; font-family: var(--st-display); }

@media (max-width: 1100px) {
  .soul, .soul.three, .awards, .boards { grid-template-columns: 1fr 1fr; }
}
.grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1rem; }
.grid.three { grid-template-columns: 1fr 1fr 1fr; }
.widgets { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 0.9rem; }
button.heat { background: var(--st-heat); border-color: var(--st-heat); color: #fff; }
.scheme {
  height: 72px;
  border: 1px solid var(--st-line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--st-display);
  font-size: 2rem; font-weight: 800; letter-spacing: 0.06em;
}
.sliders label { display: block; margin: 0.35rem 0; font-size: 0.78rem; color: var(--st-mute); text-transform: uppercase; font-family: var(--st-ui); }
.sliders h3 { margin: 0.85rem 0 0.25rem; color: var(--st-gold); font-size: 0.8rem; }
.story { color: #ddd; margin: 0.25rem 0; }
.incident { color: var(--st-heat); font-size: 0.88rem; }
.pack { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 0.8rem; }
.pack span {
  min-width: 1.7rem; text-align: center; padding: 0.28rem 0.12rem;
  font-weight: 700; border: 1px solid var(--st-line); font-size: 0.78rem;
}
.pack span.me { outline: 2px solid var(--st-gold); }
.track-map { margin: 0.65rem 0 0.4rem; border: 1px solid var(--st-line); background: #08080a; }
.track-map svg { display: block; width: 100%; height: auto; }
.track-map.yellow { border-color: var(--st-gold); box-shadow: inset 0 0 24px rgba(226, 184, 74, 0.12); }
.track-map-flag {
  padding: 0.25rem 0.5rem 0.4rem;
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--st-mute); font-family: var(--st-ui);
}
.feed-wrap { max-width: 720px; }
.compose textarea {
  width: 100%; min-height: 88px; resize: vertical;
  background: #0c0c0e; border: 1px solid var(--st-line); color: var(--st-white);
  padding: 0.6rem; font-family: var(--st-body); font-size: 1rem;
}
.compose-row { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.5rem; flex-wrap: wrap; }
.chat {
  background: var(--st-panel);
  border: 1px solid var(--st-line);
  border-left: 3px solid var(--st-line);
  padding: 0.75rem 0.9rem;
  margin: 0.55rem 0;
}
.chat.driver { border-left-color: var(--st-gold); }
.chat.owner { border-left-color: var(--st-heat); }
.chat.fan { border-left-color: #7c3aed; }
.chat.wire { border-left-color: #38bdf8; }
.chat.sponsor { border-left-color: var(--st-ok); }
.chat.mine { background: #1a160c; }
.chat header { display: flex; gap: 0.45rem; align-items: baseline; flex-wrap: wrap; }
.chat p { margin: 0.4rem 0 0.55rem; font-size: 1.02rem; line-height: 1.35; }
.chat footer { display: flex; gap: 0.9rem; align-items: center; color: var(--st-mute); font-size: 0.8rem; }
.badge {
  font-size: 0.62rem; letter-spacing: 0.1em;
  border: 1px solid var(--st-gold); color: var(--st-gold);
  padding: 0 0.3rem; font-family: var(--st-ui);
}
.booth-live { border-color: #3a3020; }
.lower-third {
  margin: 0.7rem 0 0.8rem;
  padding: 0.85rem 1rem 1rem;
  background: linear-gradient(180deg, #1a140c, #100e0c);
  border-left: 4px solid var(--st-gold);
  min-height: 6.2rem;
}
.lower-third.wreck, .lower-third.caution { border-left-color: var(--st-heat); }
.lower-third.checkered { border-left-color: var(--st-ok); }
.lower-third .speaker {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--st-gold); margin-bottom: 0.35rem; font-family: var(--st-ui);
}
.lower-third p { font-size: 1.25rem; margin: 0; line-height: 1.35; }
.tape-log { max-height: 28rem; overflow: auto; }
.broadcast table { display: block; max-height: 32rem; overflow: auto; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 1.4rem; }
a.card { display: block; text-decoration: none; color: inherit; min-height: 7.5rem; }

/* Seamless — any screen, notch-safe */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  overflow-x: hidden;
}
* { box-sizing: border-box; }
body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  touch-action: manipulation;
  overscroll-behavior: none;
}
#root, #app { min-height: 100dvh; min-height: 100svh; width: 100%; }
img, canvas, video, svg { max-width: 100%; height: auto; }
button, a, [role="button"] { touch-action: manipulation; }
input, select, textarea { font: inherit; color: inherit; }
input[type="range"] { width: 100%; accent-color: var(--st-gold); }
select, input[type="text"], input[type="number"] {
  background: #111;
  border: 1px solid var(--st-line);
  padding: 0.35rem 0.5rem;
  color: var(--st-white);
}

@media (max-width: 1100px) {
  .soul, .soul.three, .awards, .boards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .office { grid-template-columns: 1fr; }
  .rail { border-right: 0; border-bottom: 1px solid var(--st-line); }
  .rail::after { display: none; }
  .rail nav { flex-direction: row; flex-wrap: wrap; }
  .rail nav button { border-left: 0; border-bottom: 3px solid transparent; }
  .rail nav button.on { border-bottom-color: var(--st-gold); }
  .widgets, .soul, .soul.three, .dash, .awards, .boards, .grid, .grid.three { grid-template-columns: 1fr; }
  .mast { flex-direction: column; align-items: flex-start; }
  .shell {
    padding: calc(0.7rem + env(safe-area-inset-top)) 0.75rem calc(5.6rem + env(safe-area-inset-bottom));
  }
  button, .tabs button { min-height: 44px; }
  .tabs.dock {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    margin: 0;
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
    background: rgba(11, 11, 12, 0.94);
    border-top: 1px solid var(--st-line);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.28rem;
  }
  .tabs.dock button { font-size: 0.68rem; letter-spacing: 0.04em; }
}
@media (max-width: 720px) { html { font-size: 15px; } }
@media (max-width: 420px) { html { font-size: 14px; } }
@media (min-width: 1100px) { html { font-size: 16px; } }
@media (orientation: landscape) and (max-height: 500px) { html { font-size: 13px; } }
