@import url('https://fonts.googleapis.com/css2?family=Rubik+Mono+One&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #0d0f14;
  --card: #151826;
  --card-soft: rgba(255, 255, 255, 0.06);
  --primary: #ff7a18;
  --primary-dark: #e26100;
  --secondary: #32c6ff;
  --accent: #f1c453;
  --text: #f5f7ff;
  --muted: rgba(245, 247, 255, 0.62);
  --shadow: 0 20px 50px rgba(4, 6, 15, 0.45);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 15% 20%, rgba(255, 122, 24, 0.12), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(50, 198, 255, 0.15), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(241, 196, 83, 0.18), transparent 50%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.75;
}

.glow-1 {
  width: 320px;
  height: 320px;
  background: rgba(255, 122, 24, 0.4);
  top: -80px;
  left: -60px;
}

.glow-2 {
  width: 380px;
  height: 380px;
  background: rgba(50, 198, 255, 0.35);
  bottom: -140px;
  right: -120px;
}

.court-lines {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 100%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 60%);
  background-size: 140px 140px, cover;
  opacity: 0.4;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.brand h1 {
  font-family: 'Rubik Mono One', system-ui, sans-serif;
  font-size: clamp(1.6rem, 2vw + 1.2rem, 2.6rem);
  margin: 6px 0;
  letter-spacing: 0.04em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.65rem;
  color: var(--secondary);
  margin: 0;
}

.subhead {
  margin: 0;
  color: var(--muted);
  max-width: 460px;
}

.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: linear-gradient(140deg, rgba(255, 122, 24, 0.2), rgba(50, 198, 255, 0.2));
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.ball {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd1a6, #ff7a18 70%);
  position: relative;
  box-shadow: 0 8px 16px rgba(255, 122, 24, 0.4);
}

.ball::before,
.ball::after {
  content: '';
  position: absolute;
  border: 2px solid rgba(14, 14, 14, 0.4);
  border-radius: 50%;
  inset: 6px 18px;
}

.ball::after {
  inset: 18px 6px;
}

.panel {
  background: rgba(13, 15, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel h2 {
  margin: 0 0 6px;
  font-size: 1.6rem;
}

.panel p {
  margin: 0;
  color: var(--muted);
}

.hidden {
  display: none;
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(50, 198, 255, 0.12);
  border: 1px solid rgba(50, 198, 255, 0.4);
  color: var(--secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.chip.live {
  background: rgba(255, 122, 24, 0.15);
  color: var(--primary);
  border-color: rgba(255, 122, 24, 0.5);
}

.setup-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.player-card,
.detail-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.photo-preview {
  height: 200px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 122, 24, 0.2), rgba(50, 198, 255, 0.2));
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 2.4rem;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

.photo-preview.small {
  height: 64px;
  width: 64px;
  border-radius: 18px;
  font-size: 1rem;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-controls {
  display: grid;
  gap: 12px;
}

.optional-panel {
  display: grid;
  gap: 10px;
}

.optional-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text);
}

.toggle input {
  accent-color: var(--primary);
}

.input-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 1rem;
}

input:focus {
  outline: 2px solid rgba(50, 198, 255, 0.6);
  border-color: transparent;
}

.cta {
  margin-top: 8px;
  padding: 14px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: #120800;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 12px 24px rgba(255, 122, 24, 0.25);
}

.cta:hover {
  transform: translateY(-2px);
}

.cta.stop {
  background: linear-gradient(120deg, #ff4757, #ff6b81);
  color: #160103;
  box-shadow: 0 12px 24px rgba(255, 71, 87, 0.25);
}

.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.outline {
  background: transparent;
  border: 1px solid rgba(255, 122, 24, 0.6);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.player-badge {
  display: flex;
  align-items: center;
  gap: 16px;
}

.session-controls {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 20px;
}

.control-group {
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.control-group-undo {
  align-content: start;
}

.control-label {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

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

.control-btn {
  padding: 9px 13px;
  font-size: 0.88rem;
}

.undo-btn {
  width: 100%;
}

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

.control-status {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #d6ddee;
}

.control-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.control-status.is-active,
.control-status.is-on {
  color: #7effc0;
  border-color: rgba(126, 255, 192, 0.45);
  background: rgba(126, 255, 192, 0.12);
}

.control-status.is-stopped {
  color: #ffd089;
  border-color: rgba(255, 208, 137, 0.45);
  background: rgba(255, 208, 137, 0.12);
}

.control-status.is-off {
  color: #ff9ba6;
  border-color: rgba(255, 155, 166, 0.45);
  background: rgba(255, 155, 166, 0.12);
}

.control-status.is-inactive {
  color: #c4ccdf;
  border-color: rgba(196, 204, 223, 0.36);
  background: rgba(196, 204, 223, 0.1);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card.highlight {
  border-color: rgba(255, 122, 24, 0.5);
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.25), rgba(21, 24, 38, 0.9));
}

.stat-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.stat-card h3 {
  margin: 0;
  font-size: 1.5rem;
}

.action-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 22px;
}

.action-item {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: stretch;
}

.action-btn {
  border: none;
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: #0b0c10;
  background: #f4f6ff;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.action-btn:hover {
  transform: translateY(-2px);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: saturate(0.45);
}

.action-minus {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: linear-gradient(145deg, #2e354a, #1f2538);
  color: #ffd6d6;
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}

.action-minus:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, #3c445d, #2a3148);
}

.action-minus:active {
  transform: translateY(0);
}

.action-minus:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  background: rgba(47, 54, 75, 0.7);
}

.action-btn.scoreFT,
.action-btn.score2,
.action-btn.score3 {
  background: linear-gradient(135deg, #ffe259, #ffa751);
}

.action-btn.missFT,
.action-btn.miss {
  background: linear-gradient(135deg, #f6d365, #fda085);
}

.action-btn.rebound,
.action-btn.assist {
  background: linear-gradient(135deg, #7de2fc, #b9b6e5);
}

.action-btn.steal,
.action-btn.block,
.action-btn.deflection {
  background: linear-gradient(135deg, #84fab0, #8fd3f4);
}

.action-btn.turnover,
.action-btn.foul {
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

.session-bottom {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.timeline {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 120px;
}

.timeline h4 {
  margin: 0 0 12px;
}

.timeline ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 24px;
}

.summary-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.info {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(50, 198, 255, 0.2);
  color: var(--secondary);
  border: 1px solid rgba(50, 198, 255, 0.5);
  position: relative;
  cursor: default;
}

.info::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  right: 0;
  transform: translateX(10%);
  background: #111520;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  width: 220px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: var(--shadow);
  z-index: 2;
}

.info:hover::after {
  opacity: 1;
  transform: translateX(10%) translateY(-2px);
}

.chart-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 18px;
}

.chart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.chart-header h4 {
  margin: 0;
}

.chart-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

#pointsChart,
#foulsChart {
  width: 100%;
  height: 240px;
  display: block;
}

.summary-card h3 {
  font-size: 2rem;
  margin: 0;
}

.report-meta {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 22px;
}

.report-meta-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
}

.report-meta-item span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.76rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.report-meta-item strong {
  display: block;
  font-size: 1.02rem;
  line-height: 1.25;
  color: var(--text);
}

.story-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 122, 24, 0.2), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(50, 198, 255, 0.16), transparent 44%),
    linear-gradient(145deg, rgba(10, 18, 34, 0.9), rgba(19, 28, 46, 0.9));
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
}

.story-main h3 {
  margin: 4px 0 8px;
  font-size: clamp(1.4rem, 1vw + 1rem, 1.9rem);
}

.story-main p {
  margin: 0;
}

.story-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: rgba(245, 247, 255, 0.8);
}

.story-grade-wrap {
  min-width: 128px;
  background: rgba(9, 15, 28, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.story-grade-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 247, 255, 0.68);
}

.story-grade {
  font-family: 'Rubik Mono One', system-ui, sans-serif;
  font-size: 1.55rem;
  line-height: 1.1;
  margin: 6px 0;
  color: #ffd39a;
}

.story-grade-note {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(245, 247, 255, 0.78);
}

.story-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.story-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: var(--text);
}

.breakdown {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 18px;
}

.breakdown h4 {
  margin: 0 0 14px;
}

.breakdown-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.breakdown-item {
  --fill: 0%;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 11px 12px;
  display: grid;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease;
  position: relative;
}

.breakdown-item.is-leader {
  border-color: rgba(255, 122, 24, 0.5);
}

.breakdown-item.is-zero {
  opacity: 0.75;
}

.breakdown-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.breakdown-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.breakdown-top h5 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1;
}

.breakdown-meter {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.breakdown-meter > span {
  display: block;
  width: var(--fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transition: width 0.28s ease;
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.export-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.7);
  display: grid;
  place-items: center;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.export-modal.hidden {
  display: none;
}

.export-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 24px;
  width: min(420px, 90vw);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  text-align: center;
  display: grid;
  gap: 16px;
}

.export-card h3 {
  margin: 0;
  font-size: 1.4rem;
}

.export-card p {
  margin: 0;
  color: var(--muted);
}

.export-actions {
  display: grid;
  gap: 10px;
}

.text-link {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
}

body.export-mode {
  background: #ffffff;
  color: #0c0f16;
  --text: #0c0f16;
  --muted: #3f4a60;
  --card: #f7f7f9;
}

body.export-mode .atmosphere,
body.export-mode .brand,
body.export-mode #setup,
body.export-mode #session,
body.export-mode .export-modal {
  display: none;
}

body.export-mode #summary.panel {
  background: #ffffff;
  border-color: #e6e6e6;
  box-shadow: none;
  color: #0c0f16;
  width: 210mm;
  max-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 12mm;
  box-sizing: border-box;
}

body.export-mode .app {
  max-width: none;
  padding: 0;
  margin: 0 auto;
}

@page {
  size: A4 portrait;
  margin: 10mm;
}

body.export-mode #summary .summary-card,
body.export-mode #summary .breakdown,
body.export-mode #summary .summary-actions,
body.export-mode #summary .panel-header {
  color: #0c0f16;
  border-color: #e6e6e6;
}

body.export-mode #summary .report-meta-item,
body.export-mode #summary .chart-card,
body.export-mode #summary .story-card,
body.export-mode #summary .breakdown-item {
  border-color: #dddddf;
}

body.export-mode #summary .summary-actions {
  display: none;
}

body.export-mode #summary .summary-card,
body.export-mode #summary .breakdown,
body.export-mode #summary .chart-card,
body.export-mode #summary .report-meta-item,
body.export-mode #summary .breakdown-item {
  background: #f7f7f9;
}

body.export-mode #summary .story-card {
  background: linear-gradient(140deg, #f4f6fb, #eceff7);
}

body.export-mode #summary h2,
body.export-mode #summary h3,
body.export-mode #summary h4,
body.export-mode #summary h5,
body.export-mode #summary strong {
  color: #0c0f16;
}

body.export-mode #summary p {
  color: #3f4a60;
}

body.export-mode #summary .chip,
body.export-mode #summary .info {
  color: #0c0f16;
}

body.export-mode #summary .story-grade {
  color: #cb4a00;
}

body.export-mode #summary .story-grade-wrap {
  background: #ffffff;
}

body.export-mode #summary .story-tag {
  background: #ffffff;
  border-color: #d7dce8;
}

body.export-mode #summary .breakdown-meter {
  background: #d9deea;
}

body.export-mode .info {
  background: rgba(12, 15, 22, 0.08);
  color: #0c0f16;
  border-color: rgba(12, 15, 22, 0.2);
}

@media print {
  body {
    background: #ffffff;
    color: #0c0f16;
    --text: #0c0f16;
    --muted: #3f4a60;
    --card: #f7f7f9;
  }

  .brand,
  #setup,
  #session,
  .summary-actions,
  .export-modal,
  .atmosphere {
    display: none;
  }

  #summary.panel {
    box-shadow: none;
    border: none;
    background: #ffffff;
    color: #0c0f16;
    width: auto;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
  }

  #summary p {
    color: #3f4a60;
  }

  #summary h2,
  #summary h3,
  #summary h4,
  #summary h5,
  #summary strong {
    color: #0c0f16;
  }

  #summary .summary-card,
  #summary .breakdown,
  #summary .chart-card,
  #summary .report-meta-item,
  #summary .breakdown-item {
    background: #f7f7f9;
    border-color: #dddddf;
  }

  #summary .story-card {
    background: linear-gradient(140deg, #f4f6fb, #eceff7);
    border-color: #dddddf;
  }

  #summary .story-grade-wrap {
    background: #ffffff;
    border-color: #d7dce8;
  }

  #summary .story-tag {
    background: #ffffff;
    border-color: #d7dce8;
  }

  #summary .breakdown-meter {
    background: #d9deea;
  }
}

@media (max-width: 900px) {
  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .session-bottom {
    grid-template-columns: 1fr;
  }

  .story-card {
    grid-template-columns: 1fr;
  }

  .story-grade-wrap {
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .app {
    padding: 24px 16px 40px;
  }

  .panel {
    padding: 22px;
  }

  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .action-item {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .action-btn {
    padding: 18px;
    font-size: 1.05rem;
  }

  .cta.stop {
    width: 100%;
  }

  .player-card .photo-controls {
    justify-items: start;
  }

  .player-card .photo-controls input {
    width: min(100%, 300px);
  }
}
