:root {
  --bg: #061018;
  --bg-2: #091720;
  --panel: #0d1c27;
  --panel-2: #112633;
  --panel-3: #162e3d;
  --ink: #f5f8fb;
  --muted: #8fa3b2;
  --line: rgba(177, 211, 231, .14);
  --green: #28e5a1;
  --green-deep: #0ca775;
  --blue: #47b8ff;
  --yellow: #ffcf4a;
  --red: #ff4f68;
  --orange: #ff9152;
  --shadow: 0 22px 55px rgba(0, 0, 0, .32);
  --glow: 0 0 30px rgba(40, 229, 161, .18);
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% -10%, rgba(71,184,255,.18), transparent 35%),
    radial-gradient(circle at 95% 12%, rgba(40,229,161,.13), transparent 28%),
    linear-gradient(180deg, #050c12 0%, var(--bg) 42%, #07131c 100%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
input, textarea, select {
  width: 100%;
  color: var(--ink);
  background: rgba(4, 14, 21, .76);
  border: 1px solid rgba(169,207,229,.18);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(71,184,255,.75);
  box-shadow: 0 0 0 3px rgba(71,184,255,.13);
  background: rgba(7, 21, 30, .95);
}
textarea { resize: vertical; }
label { display: grid; gap: 7px; margin-top: 14px; color: #b5c5cf; font-size: .82rem; font-weight: 700; }
.app-shell { min-height: 100vh; position: relative; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 10px max(18px, env(safe-area-inset-left));
  background: rgba(4, 12, 18, .84);
  border-bottom: 1px solid rgba(153,196,220,.14);
  backdrop-filter: blur(18px) saturate(140%);
}
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px 4px 12px 4px;
  background: linear-gradient(145deg, var(--green), #1c9eeb);
  color: #03110e;
  box-shadow: 0 7px 24px rgba(40,229,161,.25);
  transform: skew(-5deg);
}
.brand-mark span { font-weight: 1000; font-style: italic; font-size: 1.25rem; transform: skew(5deg); }
.topbar h1 { margin: 1px 0 0; font-size: 1.02rem; letter-spacing: .045em; }
.topbar h1 strong { color: var(--green); }
.eyebrow, .panel-kicker {
  margin: 0;
  color: #72bfe9;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
main { width: min(1200px, calc(100% - 28px)); margin: 18px auto 72px; position: relative; z-index: 1; }
.screen { display: none; }
.screen.active { display: block; animation: screen-in .35s ease; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.grid { display: grid; gap: 16px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(17,38,51,.96), rgba(9,24,34,.94));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.035), transparent 28%);
}
.panel h3 { position: relative; margin: 4px 0 13px; font-size: 1.18rem; letter-spacing: .015em; }
.section-heading { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.muted, .hint { color: var(--muted); line-height: 1.75; }
.hint { margin: 11px 0 0; font-size: .76rem; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 29px; padding: 5px 10px;
  color: #c7d5dd; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
  font-size: .68rem; font-weight: 900; letter-spacing: .04em; white-space: nowrap;
}
.badge-live { color: #baffdf; background: rgba(40,229,161,.11); border-color: rgba(40,229,161,.35); }
.badge-warn { color: #ffe5a4; background: rgba(255,207,74,.10); border-color: rgba(255,207,74,.3); }
.live-dot, .mini-live-dot, .live-chip i, .viewer-sync i {
  display: inline-block; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255,79,104,.45); animation: pulse-live 1.7s infinite;
}
.live-dot { width: 8px; height: 8px; margin-right: 6px; }
.mini-live-dot, .live-chip i, .viewer-sync i { width: 7px; height: 7px; }
@keyframes pulse-live { 0% { box-shadow: 0 0 0 0 rgba(255,79,104,.48); } 70% { box-shadow: 0 0 0 7px rgba(255,79,104,0); } 100% { box-shadow: 0 0 0 0 rgba(255,79,104,0); } }
.primary-btn, .secondary-btn, .danger-btn, .ghost-btn, .tiny-btn {
  border: 0; border-radius: 12px; font-weight: 900; transition: transform .18s, filter .18s, border-color .18s;
}
.primary-btn:hover, .secondary-btn:hover, .danger-btn:hover, .ghost-btn:hover, .tiny-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.primary-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding: 15px 17px;
  color: #03110e; background: linear-gradient(105deg, var(--green), #4cc3f3);
  box-shadow: 0 11px 30px rgba(40,229,161,.16);
}
.primary-btn b { font-size: 1.2rem; }
.secondary-btn { padding: 13px 16px; color: #e9f7ff; background: rgba(71,184,255,.12); border: 1px solid rgba(71,184,255,.36); }
.danger-btn { padding: 11px 15px; color: #fff; background: linear-gradient(135deg, #ff4f68, #d62d49); box-shadow: 0 8px 22px rgba(255,79,104,.22); }
.ghost-btn, .tiny-btn { padding: 9px 12px; color: #c9d6de; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.12); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* SETUP */
.hero-card {
  border: 1px solid rgba(126,193,228,.17);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(12,32,45,.98), rgba(7,18,27,.96));
  box-shadow: var(--shadow);
}
.setup-hero {
  position: relative; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); align-items: center; gap: 30px;
  min-height: 330px; padding: clamp(28px, 5vw, 58px); overflow: hidden;
}
.setup-hero::before {
  content: ""; position: absolute; width: 480px; height: 480px; right: -150px; top: -180px;
  border-radius: 50%; background: radial-gradient(circle, rgba(40,229,161,.22), transparent 68%);
}
.setup-hero::after {
  content: ""; position: absolute; inset: auto -4% -68% 35%; height: 110%;
  border: 1px solid rgba(40,229,161,.12); border-radius: 50%; transform: rotate(-12deg);
}
.hero-copy { position: relative; z-index: 2; }
.hero-copy h2 { margin: 15px 0 17px; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.08; letter-spacing: -.045em; }
.hero-copy h2 em { color: var(--green); font-style: normal; text-shadow: 0 0 30px rgba(40,229,161,.18); }
.hero-copy > p:last-child { max-width: 650px; margin: 0; color: #a8bac6; line-height: 1.9; }
.hero-score-graphic {
  position: relative; z-index: 3; padding: 22px; border-radius: 20px;
  background: rgba(2,9,14,.76); border: 1px solid rgba(105,190,231,.24);
  box-shadow: inset 0 0 35px rgba(71,184,255,.06), 0 20px 50px rgba(0,0,0,.28);
}
.hero-live { color: var(--red); font-size: .72rem; font-weight: 1000; letter-spacing: .2em; margin-bottom: 9px; }
.hero-score-row { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.09); padding: 10px 2px; color: #acc0cc; font-weight: 800; }
.hero-score-row strong { font-size: 2.3rem; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.hero-inning { margin-top: 8px; padding: 9px 10px; color: #c8e8f8; background: rgba(71,184,255,.09); border-radius: 9px; font-size: .72rem; text-align: center; }
.setup-grid { margin-top: 16px; }
.setup-panel { padding-top: 28px; }
.panel-number { position: absolute; top: 13px; right: 17px; color: rgba(255,255,255,.055); font-size: 4.4rem; font-weight: 1000; line-height: 1; font-style: italic; }
.watch-panel { background: linear-gradient(155deg, rgba(14,37,49,.97), rgba(7,23,32,.96)); }
.code-input { height: 68px; text-align: center; font-size: 2rem; font-weight: 1000; letter-spacing: .22em; font-variant-numeric: tabular-nums; }
.watch-panel .secondary-btn { width: 100%; margin-top: 16px; padding: 15px; color: #061018; background: linear-gradient(105deg, var(--blue), #71d9ff); }
.viewer-features { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.viewer-features span { padding: 6px 8px; border: 1px solid rgba(255,255,255,.11); border-radius: 7px; color: #7f9aaa; font-size: .6rem; font-weight: 900; letter-spacing: .08em; }
.recent-games { display: grid; gap: 8px; margin-top: 18px; }
.recent-games h4 { margin: 6px 0 0; font-size: .78rem; color: #8fa3b2; }
.recent-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.recent-item small { color: var(--muted); }

/* TOOLBAR */
.game-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.broadcast-title { display: flex; align-items: center; gap: 7px; color: #b7c9d3; font-size: .72rem; letter-spacing: .14em; }
.game-code-wrap { display: flex; align-items: center; gap: 8px; color: #7f94a2; font-size: .65rem; font-weight: 900; letter-spacing: .08em; }
.game-code-wrap > strong { color: #fff; font-size: .96rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; }

/* BROADCAST SCOREBOARD */
.broadcast-board {
  position: relative; overflow: hidden; margin-bottom: 16px;
  border: 1px solid rgba(105,190,231,.22); border-radius: 22px;
  background:
    radial-gradient(circle at 50% 110%, rgba(40,229,161,.11), transparent 45%),
    linear-gradient(160deg, #0c1d29, #040b10 75%);
  box-shadow: 0 28px 70px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.04);
}
.broadcast-board::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .1;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.035) 4px);
}
.scoreboard-head { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 50px; padding: 8px 16px; border-bottom: 1px solid rgba(255,255,255,.09); }
.live-chip, .viewer-sync { display: flex; align-items: center; gap: 7px; color: #ff91a2; font-size: .68rem; font-weight: 1000; letter-spacing: .16em; }
.viewer-sync { justify-self: end; color: #a9bfd0; }
.inning-chip { display: grid; justify-items: center; line-height: 1.1; }
.inning-chip span { color: #6f8797; font-size: .52rem; font-weight: 900; letter-spacing: .16em; }
.inning-chip strong { margin-top: 3px; color: #fff; font-size: 1rem; }
.matchup-board { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 46px minmax(0,1fr); align-items: center; padding: 18px clamp(14px,4vw,38px) 16px; }
.team-block { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 13px; min-width: 0; }
.home-team { grid-template-columns: auto minmax(0,1fr) 54px; }
.team-emblem { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 16px 5px 16px 5px; color: #03130e; background: linear-gradient(145deg, var(--green), #32b7ff); font-size: 1.32rem; font-weight: 1000; font-style: italic; box-shadow: 0 10px 28px rgba(40,229,161,.16); }
.home-team .team-emblem { color: #071018; background: linear-gradient(145deg, #ffcf4a, #ff8d57); box-shadow: 0 10px 28px rgba(255,145,82,.16); }
.team-copy { min-width: 0; }
.team-copy span { display: block; margin-bottom: 3px; color: #627b8c; font-size: .55rem; font-weight: 900; letter-spacing: .17em; }
.team-copy strong { display: block; overflow: hidden; color: #dce8ee; font-size: clamp(.85rem,2.4vw,1.2rem); text-overflow: ellipsis; white-space: nowrap; }
.home-team .team-copy { text-align: right; }
.team-score { color: #fff; font-size: clamp(3.2rem,9vw,6.4rem); font-weight: 1000; line-height: .86; letter-spacing: -.07em; font-variant-numeric: tabular-nums; text-shadow: 0 0 34px rgba(255,255,255,.12); }
.away-team .team-score { color: #cbfff0; }
.home-team .team-score { color: #fff2c7; }
.score-divider { display: grid; justify-items: center; gap: 8px; color: #59717f; font-size: .58rem; font-weight: 1000; }
.score-divider i { width: 1px; height: 34px; background: linear-gradient(transparent, rgba(255,255,255,.22), transparent); }
.inning-score-wrap { position: relative; overflow-x: auto; padding: 0 13px 13px; }
.inning-score-table { width: 100%; min-width: 520px; border-collapse: separate; border-spacing: 0; color: #9db0bc; font-size: .72rem; }
.inning-score-table th, .inning-score-table td { height: 31px; padding: 3px 7px; text-align: center; border-top: 1px solid rgba(255,255,255,.065); }
.inning-score-table thead th { color: #657e8e; font-size: .56rem; letter-spacing: .12em; }
.inning-score-table th:first-child { width: 130px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inning-score-table tbody th { color: #c8d6dd; }
.inning-score-table .inning-total { color: #fff; font-size: .92rem; font-weight: 1000; }
.inning-cell { display: inline-block; min-width: 29px; text-align: center; font-variant-numeric: tabular-nums; }

/* GAME LAYOUT */
.game-grid { grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr); align-items: start; }
.operator-stack { display: grid; gap: 16px; min-width: 0; }
.play-by-play-panel { grid-column: 1 / -1; }
.voice-console { border-color: rgba(71,184,255,.21); }
.setup-note { margin: -2px 0 12px; color: #718896; font-size: .7rem; line-height: 1.55; }
.pitcher-change-control {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
}
.pitcher-change-control .tiny-btn { min-height: 45px; white-space: nowrap; }
.control-hint { display: block; margin-top: 6px; color: #718896; font-size: .64rem; line-height: 1.5; }
.mic-btn {
  position: relative; isolation: isolate;
  width: 100%; min-height: 116px; display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 16px;
  margin: 8px 0 12px; padding: 18px 22px; overflow: hidden;
  color: #fff; text-align: left;
  border: 1px solid rgba(255,79,104,.42); border-radius: 18px;
  background: linear-gradient(125deg, rgba(255,79,104,.22), rgba(20,31,43,.95) 62%);
  box-shadow: inset 0 0 34px rgba(255,79,104,.05), 0 15px 36px rgba(0,0,0,.2);
}
.mic-btn::after { content: ""; position: absolute; right: -15%; top: -80%; width: 260px; height: 260px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(255,79,104,.22), transparent 67%); }
.mic-icon { position: relative; z-index: 2; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; color: transparent; background: linear-gradient(145deg, #ff657c, #e52f4e); box-shadow: 0 0 0 7px rgba(255,79,104,.09), 0 10px 30px rgba(255,79,104,.26); }
.mic-icon::before { content: ""; width: 15px; height: 25px; border: 3px solid white; border-radius: 10px; }
.mic-icon::after { content: ""; position: absolute; width: 28px; height: 28px; border: 3px solid transparent; border-bottom-color: white; border-radius: 50%; top: 19px; }
.mic-copy { display: grid; gap: 4px; }
.mic-copy b { font-size: 1.35rem; }
.mic-copy small { color: #bdcad2; }
.mic-rings { position: absolute; left: 50px; width: 68px; height: 68px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.mic-btn.listening { border-color: rgba(40,229,161,.65); background: linear-gradient(125deg, rgba(40,229,161,.23), rgba(20,31,43,.96) 62%); }
.mic-btn.listening .mic-icon { background: linear-gradient(145deg, #34efac, #0aa777); box-shadow: 0 0 0 8px rgba(40,229,161,.12), 0 0 40px rgba(40,229,161,.35); animation: mic-beat .85s infinite alternate; }
@keyframes mic-beat { to { transform: scale(1.07); } }
.transcript { min-height: 62px; padding: 13px 14px; color: #b8c9d3; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(1,9,14,.45); line-height: 1.65; font-size: .82rem; }
.manual-command { display: flex; gap: 8px; margin-top: 10px; }
.manual-command .secondary-btn { flex: 0 0 auto; }

.situation-panel { border-color: rgba(40,229,161,.19); }
.batting-team-status { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 12px; background: linear-gradient(90deg, rgba(40,229,161,.12), rgba(40,229,161,.025)); border-left: 3px solid var(--green); }
.batting-team-status span { color: #6f9b8d; font-size: .6rem; font-weight: 1000; letter-spacing: .15em; }
.batting-team-status strong { overflow: hidden; color: #d5ffef; text-overflow: ellipsis; white-space: nowrap; }
.situation-stage { display: grid; grid-template-columns: 104px minmax(190px,1fr); align-items: center; gap: 12px; margin-top: 13px; }
.count-board { display: grid; gap: 8px; }
.count-item { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 49px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(0,0,0,.2); overflow: hidden; }
.count-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: currentColor; box-shadow: 0 0 12px currentColor; }
.count-item span { color: #7e919f; font-size: .56rem; font-weight: 1000; letter-spacing: .1em; }
.count-item strong { font-size: 1.55rem; font-weight: 1000; font-variant-numeric: tabular-nums; }
.count-ball { color: var(--green); }
.count-strike { color: var(--yellow); }
.count-out { color: var(--red); }
.field-visual { position: relative; width: min(100%, 260px); aspect-ratio: 1.25; margin: 0 auto; }
.field-grass { position: absolute; left: 50%; top: 50%; width: 155px; height: 155px; transform: translate(-50%,-50%) rotate(45deg); border-radius: 22px; border: 1px solid rgba(40,229,161,.28); background: linear-gradient(135deg, rgba(22,103,75,.82), rgba(8,56,43,.82)); box-shadow: inset 0 0 40px rgba(0,0,0,.28), 0 0 35px rgba(40,229,161,.06); }
.field-grass::before { content: ""; position: absolute; inset: 20%; border: 1px solid rgba(238,220,170,.28); background: rgba(154,119,74,.17); }
.base-path { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; transform: translate(-50%,-50%) rotate(45deg); border: 2px solid rgba(239,222,177,.26); }
.base { position: absolute; z-index: 3; width: 28px; height: 28px; padding: 0; transform: rotate(45deg); border: 2px solid rgba(255,255,255,.45); border-radius: 4px; background: #d7e0e5; box-shadow: 0 4px 14px rgba(0,0,0,.32); }
.base::after { content: ""; position: absolute; inset: 5px; border-radius: 2px; background: rgba(7,19,27,.26); }
.base.active { background: var(--yellow); border-color: #fff4bf; box-shadow: 0 0 0 5px rgba(255,207,74,.13), 0 0 24px rgba(255,207,74,.75); }
.base.active::after { background: rgba(255,255,255,.55); }
.base-second { left: calc(50% - 14px); top: 7%; }
.base-third { left: 17%; top: calc(50% - 14px); }
.base-first { right: 17%; top: calc(50% - 14px); }
.home-plate { position: absolute; z-index: 3; left: calc(50% - 15px); bottom: 5%; width: 30px; height: 25px; background: #e5edf1; clip-path: polygon(0 0,100% 0,100% 63%,50% 100%,0 63%); box-shadow: 0 5px 15px rgba(0,0,0,.3); }
.pitchers-mound { position: absolute; z-index: 2; left: calc(50% - 9px); top: calc(50% - 7px); width: 18px; height: 14px; border-radius: 50%; background: rgba(222,188,139,.48); }
.live-player-strip { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.live-player-strip > div { min-width: 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.085); border-radius: 11px; background: rgba(1,9,14,.35); }
.live-player-strip span { display: block; margin-bottom: 3px; color: #688293; font-size: .55rem; font-weight: 1000; letter-spacing: .13em; }
.live-player-strip strong { display: block; overflow: hidden; color: #e6f0f4; text-overflow: ellipsis; white-space: nowrap; }
.latest-play-card { margin-top: 9px; padding: 11px 13px; border: 1px solid rgba(71,184,255,.18); border-radius: 11px; background: linear-gradient(90deg, rgba(71,184,255,.10), rgba(71,184,255,.025)); }
.latest-play-card span { display: flex; align-items: center; gap: 6px; color: #70a7c8; font-size: .57rem; font-weight: 1000; letter-spacing: .13em; }
.latest-play-card strong { display: block; margin-top: 5px; color: #f1f7fa; line-height: 1.45; }
.operator-controls { margin-top: 12px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.075); }
.keyboard-hint { color: #728997; font-size: .68rem; }
.quick-grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 8px; }
.quick-grid button { min-height: 67px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 8px 4px; color: #c8d4dc; border: 1px solid rgba(255,255,255,.095); border-radius: 12px; background: rgba(3,13,20,.48); font-size: .67rem; font-weight: 800; transition: transform .15s, border-color .15s, background .15s; }
.quick-grid button:hover, .quick-grid button:active { transform: translateY(-2px); border-color: rgba(71,184,255,.45); background: rgba(71,184,255,.10); }
.quick-grid button span { display: grid; place-items: center; min-width: 31px; height: 27px; padding: 0 5px; border-radius: 8px; color: #071119; background: #9fb3c0; font-size: .68rem; font-weight: 1000; }
.quick-grid button[data-action="ball"] span, .quick-grid button[data-action="walk"] span { background: var(--green); }
.quick-grid button[data-action="strike"] span, .quick-grid button[data-action="foul"] span { background: var(--yellow); }
.quick-grid button[data-action="strikeout"] span, .quick-grid button[data-action="out"] span, .quick-grid button[data-action="doubleplay"] span { color: white; background: var(--red); }
.quick-grid button[data-action="single"] span, .quick-grid button[data-action="double"] span, .quick-grid button[data-action="triple"] span, .quick-grid button[data-action="homerun"] span, .quick-grid button[data-action="run"] span { color: #061018; background: var(--blue); }
.quick-grid button[data-action="homerun"] span { background: linear-gradient(135deg,var(--yellow),var(--orange)); }
.event-log { display: grid; gap: 8px; max-height: 430px; margin: 7px 0 0; padding: 0; overflow: auto; list-style: none; }
.event-log li { position: relative; min-height: 62px; padding: 12px 13px 11px 42px; color: #dde8ed; border: 1px solid rgba(255,255,255,.075); border-radius: 12px; background: rgba(2,11,17,.38); line-height: 1.45; }
.event-log li::before { content: ""; position: absolute; left: 17px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: #617887; box-shadow: 0 0 0 5px rgba(97,120,135,.09); }
.event-log li:first-child { border-color: rgba(40,229,161,.30); background: linear-gradient(90deg, rgba(40,229,161,.10), rgba(2,11,17,.4)); }
.event-log li:first-child::before { background: var(--green); box-shadow: 0 0 0 5px rgba(40,229,161,.11), 0 0 15px rgba(40,229,161,.55); }
.event-log li.event-hit::before { background: var(--blue); }
.event-log li.event-score::before { background: var(--yellow); }
.event-log li.event-out::before { background: var(--red); }

.event-log li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.event-copy { display: grid; flex: 1; min-width: 0; gap: 4px; }
.event-copy strong { overflow-wrap: anywhere; }
.commentary-label, .review-label {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: .52rem;
  font-weight: 1000;
  letter-spacing: .05em;
  vertical-align: 2px;
}
.commentary-label {
  color: #bfeaff;
  border: 1px solid rgba(71,184,255,.28);
  background: rgba(71,184,255,.10);
}
.review-label {
  color: #fff1b8;
  border: 1px solid rgba(255,207,74,.34);
  background: rgba(255,207,74,.10);
}
.event-log li.event-review {
  border-color: rgba(255,207,74,.28);
  background: linear-gradient(90deg, rgba(255,207,74,.07), rgba(2,11,17,.4));
}
.event-edit-btn {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #a8c0cd;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  background: rgba(255,255,255,.04);
  font-size: .66rem;
  font-weight: 900;
  cursor: pointer;
}
.event-edit-btn:hover, .event-edit-btn:active {
  color: #071119;
  border-color: var(--green);
  background: var(--green);
}
.commentary-compose {
  display: grid;
  gap: 9px;
  margin: 8px 0 13px;
  padding: 12px;
  border: 1px solid rgba(71,184,255,.17);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(71,184,255,.07), rgba(40,229,161,.035));
}
.commentary-compose > div:first-child { display: grid; gap: 2px; }
.commentary-compose strong { color: #dce9ef; font-size: .78rem; }
.commentary-compose span { color: #708896; font-size: .64rem; line-height: 1.5; }
.commentary-compose-row { display: flex; gap: 8px; }
.commentary-compose-row input { flex: 1; min-width: 0; }
.commentary-compose-row .secondary-btn { flex: 0 0 auto; }
.result-commentary-compose { margin-bottom: 14px; }
.table-event-kind, .table-review-kind {
  display: inline-block;
  margin-right: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: .54rem;
  font-weight: 1000;
}
.table-event-kind { color: #bfeaff; background: rgba(71,184,255,.10); }
.table-review-kind { color: #fff1b8; background: rgba(255,207,74,.10); }
.edited-mark { display: block; margin-top: 3px; color: #718896; font-size: .58rem; }
.summary-event-review td { background: rgba(255,207,74,.035); }
.table-edit-btn { padding: 6px 9px; }
.event-meta { display: block; margin-top: 5px; color: #708796; font-size: .66rem; line-height: 1.5; }

/* HISTORY */
.history-empty {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed rgba(143,163,178,.24);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255,255,255,.02);
}
.history-empty strong { color: #d6e2e8; }
.history-empty p { margin: 5px 0 0; font-size: .76rem; line-height: 1.6; }
.history-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.history-heading span { color: #6f8796; font-size: .58rem; font-weight: 1000; letter-spacing: .15em; }
.history-heading h4 { margin: 2px 0 0; color: #e6eef2; font-size: .95rem; }
.history-heading small { color: #718896; }
.history-list { display: grid; gap: 9px; margin-top: 9px; }
.history-card {
  padding: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(7,20,29,.9), rgba(12,31,42,.75));
}
.history-card.is-final { border-color: rgba(71,184,255,.18); }
.history-card.is-live { border-color: rgba(40,229,161,.28); }
.history-card-head, .history-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.history-card-head small, .history-card-foot small { color: #718896; font-size: .63rem; }
.history-final, .history-live {
  padding: 3px 7px; border-radius: 999px; font-size: .55rem; font-weight: 1000; letter-spacing: .1em;
}
.history-final { color: #bfeaff; background: rgba(71,184,255,.10); border: 1px solid rgba(71,184,255,.28); }
.history-live { color: #baffdf; background: rgba(40,229,161,.10); border: 1px solid rgba(40,229,161,.28); }
.history-matchup {
  display: grid;
  grid-template-columns: minmax(0,1fr) 28px 12px 28px minmax(0,1fr);
  align-items: center;
  gap: 5px;
  margin: 11px 0;
}
.history-matchup div { min-width: 0; }
.history-matchup div:last-child { text-align: right; }
.history-matchup span { display: block; color: #607988; font-size: .5rem; font-weight: 1000; letter-spacing: .1em; }
.history-matchup strong { display: block; overflow: hidden; color: #e8f0f4; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.history-matchup b { color: #fff; font-size: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.history-matchup i { color: #627987; text-align: center; font-style: normal; }
.history-card-foot > div { display: grid; gap: 3px; }
.history-card-foot > div > span { color: #7b94a3; font-size: .58rem; font-weight: 900; letter-spacing: .08em; }

/* SUMMARY */
.result-toolbar { position: sticky; top: 76px; z-index: 25; padding: 8px; border-radius: 14px; background: rgba(6,16,24,.86); backdrop-filter: blur(14px); }
.result-hero {
  position: relative;
  padding: clamp(25px,5vw,48px);
  margin-bottom: 14px;
  text-align: center;
  overflow: hidden;
}
.result-hero::before {
  content: "";
  position: absolute;
  inset: -80% 25% auto;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40,229,161,.18), transparent 67%);
}
.result-status-row {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-bottom: 11px;
}
.final-badge {
  padding: 5px 10px;
  color: #061018;
  background: var(--green);
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 1000;
  letter-spacing: .14em;
}
.result-meta { color: #7e95a3; font-size: .66rem; font-weight: 800; }
.result-hero h2 { position: relative; margin: 11px 0 21px; font-size: clamp(1.25rem,3vw,2rem); color: #c7d6de; }
.final-score-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) 36px minmax(0,1fr);
  align-items: center;
  gap: 14px;
  width: min(720px, 100%);
  margin: 0 auto;
}
.final-team { display: grid; min-width: 0; }
.final-team:first-child { text-align: right; justify-items: end; }
.final-team:last-child { text-align: left; justify-items: start; }
.final-team span { color: #67808f; font-size: .58rem; font-weight: 1000; letter-spacing: .15em; }
.final-team strong {
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: #e5eef3;
  font-size: clamp(.88rem,2vw,1.25rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.final-team b {
  color: #fff;
  font-size: clamp(4rem,11vw,7.2rem);
  line-height: .95;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 35px rgba(71,184,255,.13);
}
.final-score-mark { color: #5d7583; font-size: 2rem; font-weight: 300; }
.summary-result-label {
  position: relative;
  width: fit-content;
  margin: 19px auto 0;
  padding: 7px 14px;
  color: #fff3bb;
  border: 1px solid rgba(255,207,74,.28);
  border-radius: 999px;
  background: rgba(255,207,74,.09);
  font-size: .76rem;
  font-weight: 900;
}
.result-nav {
  position: sticky;
  top: 135px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 7px;
  margin-bottom: 14px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 15px;
  background: rgba(5,15,22,.9);
  backdrop-filter: blur(15px);
}
.result-nav a {
  padding: 10px 8px;
  color: #9bb0bd;
  border-radius: 9px;
  text-align: center;
  text-decoration: none;
  font-size: .72rem;
  font-weight: 900;
}
.result-nav a:hover, .result-nav a:active { color: #061018; background: var(--green); }
.result-grid { margin-bottom: 16px; scroll-margin-top: 190px; }
.result-section { margin-top: 16px; scroll-margin-top: 190px; }
.result-team-block + .result-team-block { margin-top: 19px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.08); }
.result-team-block h4 { margin: 2px 0 9px; color: #dfeaf0; font-size: .88rem; }
.result-table-note { color: #718896; font-size: .65rem; }
.table-scroll { overflow: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; color: #c7d4dc; font-size: .78rem; }
.data-table th, .data-table td {
  min-width: 48px;
  padding: 10px 9px;
  border-bottom: 1px solid rgba(255,255,255,.075);
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.data-table th:first-child, .data-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 118px;
  color: #eef5f8;
  text-align: left;
  background: #0e202b;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #7290a1;
  background: #0b1b25;
  font-size: .62rem;
  letter-spacing: .04em;
}
.data-table thead th:first-child { z-index: 4; }
.data-table tbody tr:nth-child(even) td,
.data-table tbody tr:nth-child(even) th { background-color: rgba(255,255,255,.018); }
.data-table tbody tr:hover td,
.data-table tbody tr:hover th { background-color: rgba(71,184,255,.06); }
.line-score-table .total-cell { color: var(--green); background: rgba(40,229,161,.07); font-size: 1rem; }
.rate-cell { color: #aee9ff; font-weight: 900; }
.play-text-cell { min-width: 240px; text-align: left !important; white-space: normal !important; line-height: 1.5; }
.team-comparison { display: grid; gap: 1px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.06); }
.comparison-head, .comparison-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 100px minmax(0,1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #0b1a24;
}
.comparison-head strong:first-child, .comparison-row b:first-child { text-align: right; }
.comparison-head strong:last-child, .comparison-row b:last-child { text-align: left; }
.comparison-head strong { overflow: hidden; color: #dce8ee; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.comparison-head span, .comparison-row span { color: #688190; text-align: center; font-size: .61rem; font-weight: 900; }
.comparison-row b { color: #fff; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.comparison-row:nth-child(even) { background: #0e202b; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 30px); padding: 11px 16px; color: #fff; text-align: center; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(7,24,32,.96); box-shadow: 0 14px 40px rgba(0,0,0,.38); opacity: 0; pointer-events: none; transform: translate(-50%,25px); transition: .24s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.viewer-only { display: none; }
.viewer .host-only { display: none !important; }
.viewer .viewer-only { display: flex; }
.viewer .game-grid { grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); }
.viewer .situation-panel { grid-column: 1; }
.viewer .play-by-play-panel { grid-column: 2; }
.viewer .event-log { max-height: 570px; }
.viewer .field-visual { width: min(100%, 330px); }
.viewer .situation-stage { grid-template-columns: 112px minmax(230px,1fr); }
.viewer .base:disabled { opacity: 1; cursor: default; }
.viewer .broadcast-board { box-shadow: 0 28px 90px rgba(0,0,0,.5), 0 0 45px rgba(71,184,255,.07); }
.viewer .topbar { background: rgba(3,10,15,.92); }
.viewer .broadcast-title { color: #ff9cab; }

@media (max-width: 980px) {
  .two-col, .game-grid, .viewer .game-grid { grid-template-columns: 1fr; }
  .play-by-play-panel, .viewer .situation-panel, .viewer .play-by-play-panel { grid-column: auto; }
  .quick-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .viewer .event-log { max-height: none; }
}
@media (max-width: 720px) {
  main { width: min(100% - 16px, 1200px); margin-top: 10px; }
  .topbar { min-height: 60px; padding: 9px 11px; }
  .brand-mark { width: 36px; height: 36px; }
  .topbar h1 { font-size: .9rem; }
  .setup-hero { grid-template-columns: 1fr; min-height: 0; padding: 29px 21px; }
  .hero-score-graphic { display: none; }
  .hero-copy h2 { font-size: 2.25rem; }
  .panel { padding: 16px; border-radius: 17px; }
  .game-toolbar { flex-wrap: wrap; }
  .broadcast-title { order: -1; width: 100%; justify-content: center; }
  .game-code-wrap { margin-left: auto; }
  .scoreboard-head { min-height: 43px; padding: 7px 11px; }
  .matchup-board { grid-template-columns: minmax(0,1fr) 25px minmax(0,1fr); padding: 17px 10px 13px; }
  .team-block { grid-template-columns: 38px minmax(0,1fr); gap: 8px; }
  .home-team { grid-template-columns: minmax(0,1fr) 38px; }
  .away-team .team-score, .home-team .team-score { grid-column: 1 / -1; grid-row: 2; text-align: center; margin-top: 4px; }
  .away-team .team-score { order: 3; }
  .team-emblem { width: 38px; height: 38px; border-radius: 11px 4px 11px 4px; font-size: 1rem; }
  .team-copy strong { font-size: .76rem; }
  .team-copy span { font-size: .48rem; }
  .team-score { font-size: 3.65rem; }
  .score-divider i { height: 22px; }
  .inning-score-wrap { padding: 0 8px 8px; }
  .situation-stage { grid-template-columns: 89px minmax(180px,1fr); }
  .count-item { min-height: 44px; padding: 7px 10px; }
  .count-item strong { font-size: 1.35rem; }
  .field-visual { width: min(100%,230px); }
  .field-grass { width: 138px; height: 138px; }
  .base-path { width: 99px; height: 99px; }
  .base-third { left: 14%; }
  .base-first { right: 14%; }
  .quick-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
  .quick-grid button { min-height: 63px; }
  .manual-command { flex-direction: column; }
  .manual-command .secondary-btn { width: 100%; }
  .pitcher-change-control { grid-template-columns: 1fr; }
  .pitcher-change-control .tiny-btn { width: 100%; }
  .commentary-compose-row { flex-direction: column; }
  .commentary-compose-row .secondary-btn { width: 100%; }
  .event-log li { padding-right: 9px; }
  .event-edit-btn { padding: 7px 8px; }
  .result-toolbar { top: 65px; }
  .result-toolbar .row-actions { width: 100%; }
  .result-toolbar .secondary-btn, .result-toolbar .ghost-btn { flex: 1; padding: 9px 7px; font-size: .7rem; }
  .result-nav { top: 126px; }
  .final-score-board { grid-template-columns: minmax(0,1fr) 22px minmax(0,1fr); gap: 7px; }
  .final-team b { font-size: clamp(3.5rem,20vw,5.3rem); }
  .result-meta { display: block; max-width: 70%; }
  .comparison-head, .comparison-row { grid-template-columns: minmax(0,1fr) 72px minmax(0,1fr); padding: 9px 8px; }
  .data-table th, .data-table td { padding: 9px 8px; }
  .data-table th:first-child, .data-table td:first-child { min-width: 105px; }
}
@media (max-width: 390px) {
  .quick-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .situation-stage { grid-template-columns: 78px minmax(170px,1fr); gap: 7px; }
  .field-grass { width: 125px; height: 125px; }
  .base-path { width: 89px; height: 89px; }
  .live-player-strip { grid-template-columns: 1fr; }
}

.latest-label { display: inline-block; margin-right: 8px; padding: 2px 5px; color: #061018; background: var(--green); border-radius: 4px; font-size: .52rem; font-weight: 1000; letter-spacing: .08em; vertical-align: 2px; }


/* ACCOUNT / PRIVATE MONITOR MODE */
.topbar-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.account-badge { display:flex; align-items:center; gap:9px; max-width:320px; padding:5px 6px 5px 12px; border:1px solid rgba(40,229,161,.25); border-radius:999px; background:rgba(40,229,161,.06); }
.account-badge[hidden] { display:none !important; }
.account-badge span { max-width:190px; overflow:hidden; color:#cde9df; font-size:.7rem; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.account-badge button { padding:6px 9px; color:#9cb3c0; border:1px solid rgba(255,255,255,.1); border-radius:999px; background:rgba(255,255,255,.04); font-size:.62rem; font-weight:900; cursor:pointer; }
.auth-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(330px,.85fr); gap:18px; align-items:stretch; }
.auth-hero { display:flex; flex-direction:column; justify-content:center; min-height:500px; }
.auth-hero h2 { margin:14px 0; font-size:clamp(2rem,5vw,4rem); line-height:1.05; }
.auth-hero em { color:var(--green); font-style:normal; }
.auth-benefits { display:flex; flex-wrap:wrap; gap:8px; margin-top:22px; }
.auth-benefits span { padding:8px 11px; color:#aee9d6; border:1px solid rgba(40,229,161,.2); border-radius:999px; background:rgba(40,229,161,.06); font-size:.69rem; font-weight:900; }
.auth-panel { display:flex; flex-direction:column; justify-content:center; }
.auth-panel h3 { margin:5px 0 18px; font-size:1.65rem; }
.auth-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:6px; }
.auth-actions .primary-btn, .auth-actions .secondary-btn { width:100%; }
.text-btn { margin:10px auto 0; padding:7px; color:#8fb0c0; border:0; background:transparent; font-size:.7rem; font-weight:800; cursor:pointer; text-decoration:underline; }
.auth-note { margin:13px 0 0; color:#6f8796; font-size:.68rem; line-height:1.6; text-align:center; }
.auth-migration-note { margin:0 0 14px; padding:11px 12px; color:#fff1b8; border:1px solid rgba(255,207,74,.3); border-radius:12px; background:rgba(255,207,74,.07); font-size:.7rem; line-height:1.6; }
.history-card-actions { display:flex; align-items:center; gap:7px; }
.history-delete-btn, .delete-game-btn { padding:8px 10px; color:#ff9bae; border:1px solid rgba(255,75,105,.3); border-radius:9px; background:rgba(255,75,105,.07); font-size:.66rem; font-weight:900; cursor:pointer; }
.history-delete-btn:hover, .delete-game-btn:hover { color:#fff; background:rgba(255,75,105,.22); }

@media (max-width: 820px) {
  .auth-layout { grid-template-columns:1fr; }
  .auth-hero { min-height:auto; }
  .topbar-actions { flex-direction:column; align-items:flex-end; gap:5px; }
  .account-badge { max-width:220px; }
}
@media (max-width: 560px) {
  .auth-actions { grid-template-columns:1fr; }
  .account-badge span { max-width:110px; }
  .history-card-foot { align-items:flex-end; }
  .history-card-actions { flex-direction:column; align-items:stretch; }
  .history-delete-btn { width:100%; }
}


/* Visibility update: larger live inning scoreboard */
.score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.score-table th,
.score-table td {
  min-width: 46px;
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.score-table thead th {
  color: #8da4b2;
  font-size: .8rem;
  letter-spacing: .04em;
}
.score-table th:first-child,
.score-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 145px;
  text-align: left;
  background: #0e202b;
  font-size: 1rem;
  font-weight: 900;
}
.score-table td:last-child,
.score-table th:last-child {
  min-width: 58px;
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 1000;
  background: rgba(40,229,161,.06);
}

/* Visibility update: larger final inning scoreboard */
.line-score-table th,
.line-score-table td {
  min-width: 54px;
  padding: 14px 12px;
  font-size: .95rem;
  font-weight: 800;
}
.line-score-table th:first-child,
.line-score-table td:first-child {
  min-width: 150px;
  font-size: 1rem;
  font-weight: 900;
}
.line-score-table .total-cell {
  min-width: 64px;
  color: var(--green);
  background: rgba(40,229,161,.09);
  font-size: 1.3rem;
  font-weight: 1000;
}

/* Visibility update: larger player name in live commentary */
.event-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.event-player-name {
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 1000;
  line-height: 1.25;
  letter-spacing: .01em;
  text-shadow: 0 0 16px rgba(71,184,255,.18);
}
.event-inning-label {
  flex: 0 0 auto;
  color: #7f98a7;
  font-size: .67rem;
  font-weight: 800;
  white-space: nowrap;
}
.event-play-text {
  color: #dce8ee;
  font-size: .93rem;
  line-height: 1.55;
}


@media (max-width: 720px) {
  .event-log li {
    padding: 13px 9px 13px 12px;
  }
  .event-player-row {
    align-items: flex-start;
  }
  .event-player-name {
    font-size: 1.16rem;
  }
  .event-inning-label {
    font-size: .62rem;
    padding-top: 3px;
  }
  .event-play-text {
    font-size: .96rem;
  }
  .score-table th,
  .score-table td {
    min-width: 44px;
    padding: 13px 10px;
    font-size: .94rem;
  }
  .score-table th:first-child,
  .score-table td:first-child {
    min-width: 128px;
    font-size: .92rem;
  }
  .score-table td:last-child,
  .score-table th:last-child {
    min-width: 55px;
    font-size: 1.18rem;
  }
  .line-score-table th,
  .line-score-table td {
    min-width: 50px;
    padding: 12px 10px;
    font-size: .9rem;
  }
  .line-score-table th:first-child,
  .line-score-table td:first-child {
    min-width: 128px;
    font-size: .92rem;
  }
}



/* Mobile fix: event cards should not overlap on narrow screens */
@media (max-width: 720px) {
  .event-log li {
    display: block !important;
    padding: 14px 12px 12px !important;
  }

  .event-copy {
    gap: 7px !important;
  }

  .event-player-row {
    display: block !important;
  }

  .event-player-name {
    display: block;
    max-width: 100%;
    font-size: 1.08rem !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: break-word;
    text-shadow: none !important;
  }

  .event-inning-label {
    display: block !important;
    margin-top: 5px;
    font-size: .68rem !important;
    line-height: 1.35;
    white-space: normal !important;
  }

  .event-play-text {
    display: block;
    margin-top: 2px;
    font-size: .95rem !important;
    line-height: 1.55 !important;
  }

  .event-meta {
    display: block;
    margin-top: 2px;
    font-size: .72rem !important;
    line-height: 1.45;
  }

  .event-edit-btn {
    display: inline-flex;
    margin-top: 10px;
    padding: 8px 10px !important;
    font-size: .7rem !important;
  }

  .latest-label,
  .commentary-label,
  .review-label {
    vertical-align: baseline !important;
  }
}



/* Mobile fix: move glow marker to the left of the player name */
@media (max-width: 720px) {
  .event-log li {
    position: relative;
    padding-left: 22px !important;
  }

  .event-log li::before {
    left: 14px !important;
    top: 22px !important;
    width: 8px !important;
    height: 8px !important;
    transform: none !important;
  }

  .event-player-row {
    padding-left: 6px !important;
  }

  .event-player-name {
    padding-left: 0 !important;
  }
}



/* Advanced quick input button colors */
.quick-code-green {
  background: linear-gradient(135deg, #27d69a, #13a873) !important;
  color: #051710 !important;
}
.quick-code-blue {
  background: linear-gradient(135deg, #58b9ff, #238fd9) !important;
  color: #06131d !important;
}
.quick-code-yellow {
  background: linear-gradient(135deg, #ffd75a, #f0a92c) !important;
  color: #211600 !important;
}
.quick-code-red {
  background: linear-gradient(135deg, #ff657c, #e52f50) !important;
  color: #ffffff !important;
}
