:root {
  color-scheme: dark;
  --ink: #f7fbff;
  --muted: #9aa9bd;
  --muted-strong: #cbd7e6;
  --line: rgba(148, 163, 184, 0.22);
  --panel: rgba(10, 18, 32, 0.88);
  --panel-strong: rgba(15, 25, 42, 0.96);
  --panel-soft: rgba(22, 34, 54, 0.82);
  --field: rgba(3, 8, 18, 0.76);
  --arena: #030712;
  --arena-2: #08111f;
  --blue: #60a5fa;
  --blue-strong: #2563eb;
  --orange: #f26a21;
  --orange-strong: #ff7a1a;
  --orange-soft: rgba(242, 106, 33, 0.14);
  --court-line: rgba(255, 247, 237, 0.1);
  --red: #ef4444;
  --green: #22c55e;
  --yellow: #facc15;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-lg: 26px;
  --control-radius: 999px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

.round-score-strip:not([hidden]) {
  animation: scoreStripIn 260ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.message.counter-landed {
  animation: counterLanded 280ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.message.counter-landed::after {
  opacity: 0.82;
}

.game-moment {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(var(--bottom-nav-height) + var(--composer-height) + var(--safe-bottom) + 14px);
  z-index: 60;
  display: grid;
  gap: 2px;
  width: min(250px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid rgba(242, 106, 33, 0.34);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 10%, rgba(242, 106, 33, 0.28), transparent 5rem),
    rgba(10, 15, 24, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 247, 237, 0.04) inset;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.game-moment.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.game-moment span {
  color: var(--orange-strong);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.game-moment strong {
  color: #fffaf3;
  font-size: 1.05rem;
}

.game-moment em {
  color: var(--muted-strong);
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 800;
}

.game-moment.rank,
.game-moment.badge {
  border-color: rgba(250, 204, 21, 0.42);
  background:
    radial-gradient(circle at 12% 10%, rgba(250, 204, 21, 0.2), transparent 5rem),
    rgba(10, 15, 24, 0.94);
}

.game-moment.streak {
  border-color: rgba(242, 106, 33, 0.52);
}

.daily-scorecard:not([hidden]) {
  animation: scoreStripIn 300ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.daily-win-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(242, 106, 33, 0.32);
  border-radius: 15px;
  background: rgba(242, 106, 33, 0.12);
}

.daily-win-strip strong {
  color: #fffaf3;
}

.daily-win-strip span {
  color: #fed7aa;
  font-size: 0.82rem;
  font-weight: 900;
}

.siri-continue-panel,
.siri-card {
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(96, 165, 250, 0.16), transparent 5rem),
    rgba(10, 18, 32, 0.82);
  box-shadow: var(--shadow-soft);
}

.siri-continue-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.siri-continue-panel h3,
.siri-card h3 {
  margin: 0;
}

.siri-continue-panel p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-weight: 750;
}

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

.siri-demo-mode,
.siri-qa-guide {
  border: 1px solid rgba(255, 247, 237, 0.08);
  border-radius: 16px;
  background: rgba(3, 8, 18, 0.38);
  padding: 10px 12px;
}

.siri-demo-mode summary,
.siri-qa-guide summary {
  cursor: pointer;
  color: #fffaf3;
  font-weight: 950;
}

.siri-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.siri-qa-guide ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.siri-receipt-list {
  display: grid;
  gap: 8px;
}

.siri-receipt {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 247, 237, 0.08);
  border-radius: 14px;
  background: rgba(3, 8, 18, 0.48);
}

.siri-receipt strong {
  color: #fffaf3;
}

.siri-receipt span,
.siri-receipt small {
  color: var(--muted-strong);
}

.siri-receipt.failed {
  border-color: rgba(239, 68, 68, 0.28);
}

.siri-receipt.needs_auth,
.siri-receipt.fallback {
  border-color: rgba(250, 204, 21, 0.28);
}

.share-card pre {
  padding: 12px;
  border: 1px solid rgba(255, 247, 237, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 247, 237, 0.055), rgba(255, 247, 237, 0.025)),
    rgba(3, 8, 18, 0.55);
}

@keyframes arenaEntrance {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes arenaPulse {
  0%, 100% {
    box-shadow: 0 18px 50px rgba(242, 106, 33, 0.08);
  }
  50% {
    box-shadow: 0 18px 58px rgba(242, 106, 33, 0.18);
  }
}

@keyframes counterLanded {
  from {
    opacity: 0.82;
    transform: translateY(8px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scoreStripIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -8%, rgba(242, 106, 33, 0.2), transparent 22rem),
    linear-gradient(180deg, #050608 0%, #090d15 52%, #050608 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(ellipse at 50% 8%, transparent 0 110px, rgba(255, 247, 237, 0.075) 111px 112px, transparent 113px);
  background-size: 520px 240px;
  background-position: center top;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
}

button,
input,
textarea,
select {
  max-width: 100%;
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(242, 106, 33, 0.62);
  outline-offset: 3px;
}

code {
  color: #bae6fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1;
}

h2 {
  max-width: 860px;
  font-size: clamp(1.65rem, 4vw, 3.8rem);
  line-height: 1.02;
}

h3 {
  font-size: 1.05rem;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding:
    calc(18px + var(--safe-top))
    calc(18px + var(--safe-right))
    calc(18px + var(--safe-bottom))
    calc(18px + var(--safe-left));
  background:
    radial-gradient(circle at 50% 20%, rgba(242, 106, 33, 0.22), transparent 22rem),
    linear-gradient(rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.92)),
    url("/hero-sports-lab.png");
  background-position: center;
  background-size: cover;
  backdrop-filter: blur(14px);
}

.entry-splash {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #fff7ed;
  animation: entrySplash 900ms ease both;
}

.entry-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(242, 106, 33, 0.6);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(242, 106, 33, 0.38), rgba(242, 106, 33, 0.12) 48%, rgba(3, 7, 18, 0.88) 49%),
    rgba(3, 7, 18, 0.72);
  box-shadow: 0 0 0 8px rgba(242, 106, 33, 0.08), 0 0 42px rgba(242, 106, 33, 0.32);
}

.entry-mark::before {
  content: "";
  position: absolute;
  top: 12px;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.58);
  transform-origin: left center;
  animation: mindOpen 900ms ease both;
}

.entry-mark span,
.entry-splash strong {
  font-weight: 950;
}

.entry-splash small {
  color: var(--orange-strong);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.auth-card {
  display: grid;
  gap: 16px;
  width: min(100%, 430px);
  padding: 24px;
  background: rgba(7, 15, 28, 0.94);
  border: 1px solid rgba(242, 106, 33, 0.4);
  border-radius: 22px;
  box-shadow: var(--shadow);
  animation: authCardIn 560ms ease 280ms both;
}

.brand-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.brand-row > div:last-child {
  min-width: 0;
}

.brand-row h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-lockup {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(242, 106, 33, 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(242, 106, 33, 0.26), rgba(242, 106, 33, 0.08) 48%, rgba(3, 7, 18, 0.82) 49%),
    rgba(3, 7, 18, 0.72);
  box-shadow: 0 0 0 4px rgba(242, 106, 33, 0.08), 0 0 24px rgba(242, 106, 33, 0.2);
  overflow: hidden;
}

.brand-lockup img {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  z-index: 2;
}

.brand-lockup img:not([hidden]) + .brand-fallback {
  opacity: 0;
}

.brand-fallback {
  color: #fff7ed;
  font-size: 0.72rem;
  font-weight: 950;
}

.auth-brand {
  width: 58px;
  height: 58px;
}

.safety-line {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  color: #bbf7d0 !important;
  font-size: 0.82rem;
  font-weight: 900;
}

.auth-card p:not(.eyebrow) {
  color: var(--muted-strong);
  line-height: 1.45;
}

.auth-card label,
.tester,
.phone-form label,
.feedback-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 0.83rem;
  font-weight: 850;
}

.auth-card input,
.tester input,
.phone-form input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--ink);
}

.auth-card input,
.tester input,
.phone-form input,
select {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  min-height: 92px;
  padding: 13px;
  line-height: 1.45;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding:
    calc(14px + var(--safe-top))
    max(clamp(14px, 4vw, 46px), var(--safe-right))
    14px
    max(clamp(14px, 4vw, 46px), var(--safe-left));
  background: rgba(3, 8, 18, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.top-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.top-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

main {
  display: grid;
  gap: 20px;
  padding:
    20px
    max(clamp(12px, 4vw, 46px), var(--safe-right))
    calc(48px + var(--safe-bottom))
    max(clamp(12px, 4vw, 46px), var(--safe-left));
}

.eyebrow,
.kicker {
  color: var(--orange-strong);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 20px;
  min-height: min(58vh, 480px);
  align-items: end;
  padding: clamp(22px, 5vw, 54px);
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(242, 106, 33, 0.24), transparent 17rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72)),
    url("/hero-sports-lab.png");
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(242, 106, 33, 0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  gap: 15px;
  max-width: 820px;
}

.hero p {
  max-width: 680px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.hero-logo-slot {
  display: grid;
  gap: 5px;
  width: fit-content;
  min-width: 190px;
  padding: 12px 14px;
  border: 1px solid rgba(242, 106, 33, 0.36);
  border-radius: var(--radius);
  background: rgba(3, 7, 18, 0.62);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.hero-logo-slot img {
  width: min(230px, 56vw);
  max-height: 92px;
  object-fit: contain;
}

.hero-logo-slot img:not([hidden]) ~ .hero-logo-fallback,
.hero-logo-slot img:not([hidden]) ~ small {
  display: none;
}

.hero-logo-fallback {
  color: #fff7ed;
  font-size: clamp(1.15rem, 4vw, 1.75rem);
  font-weight: 950;
  line-height: 0.95;
}

.hero-logo-slot small {
  color: var(--orange-strong);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.actions,
.composer-actions,
.dashboard-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--control-radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.button:hover {
  border-color: rgba(242, 106, 33, 0.72);
  transform: translateY(-1px);
}

.button:active,
.quick-battle-button:active,
.answer-choice:active,
.bottom-nav button:active,
.menu-tabs button:active {
  transform: scale(0.98);
}

.button.small {
  min-height: 38px;
  padding: 0 12px;
}

.button.primary {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff7ed;
  box-shadow: 0 10px 26px rgba(242, 106, 33, 0.22);
}

.button.primary:active {
  box-shadow: 0 4px 14px rgba(242, 106, 33, 0.24);
}

.button.primary.alt {
  border-color: rgba(255, 247, 237, 0.2);
  background: rgba(255, 247, 237, 0.1);
  color: #fff7ed;
}

.talk-button.recording {
  border-color: var(--orange);
  background: rgba(242, 106, 33, 0.2);
  color: #fed7aa;
}

.button.full {
  width: 100%;
}

.status-panel,
.playground,
.feedback-panel,
.phone-access,
.live-brain,
.session-summary,
.qa-results,
.safety,
.feedback-dashboard {
  padding: clamp(16px, 3vw, 26px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-panel {
  display: grid;
  gap: 10px;
  align-self: stretch;
  background:
    linear-gradient(180deg, rgba(242, 106, 33, 0.08), rgba(3, 8, 18, 0.76)),
    rgba(3, 8, 18, 0.76);
}

.status-panel p,
.phone-grid p,
.section-copy,
.test-script p:not(.eyebrow),
.form-status,
.empty {
  color: var(--muted);
  line-height: 1.45;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
}

.hero-badges,
.arena-strip,
.message-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.status-pill,
.message-badges small {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(242, 106, 33, 0.28);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.08), rgba(15, 23, 42, 0.74));
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.safe,
.message-badges small:first-child {
  border-color: rgba(34, 197, 94, 0.42);
  color: #bbf7d0;
}

.status-pill.caution {
  border-color: rgba(250, 204, 21, 0.42);
  color: #fef08a;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 20px;
  align-items: start;
}

.playground {
  background:
    linear-gradient(rgba(7, 13, 25, 0.94), rgba(7, 13, 25, 0.9)),
    linear-gradient(90deg, transparent 49%, rgba(255, 247, 237, 0.12) 50%, transparent 51%),
    radial-gradient(ellipse at 50% 50%, transparent 0 90px, rgba(242, 106, 33, 0.18) 91px 93px, transparent 94px),
    linear-gradient(135deg, rgba(242, 106, 33, 0.18), rgba(255, 247, 237, 0.04));
  background-size: auto, 100% 100%, 420px 220px, auto;
  background-position: center;
  border-color: rgba(242, 106, 33, 0.22);
}

.phone-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 18px;
  align-items: start;
}

.host-line {
  margin-top: 12px;
}

.phone-form {
  display: grid;
  gap: 10px;
}

.copy-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.fine-print {
  font-size: 0.9rem;
}

.section-heading {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(132px, 1fr));
  gap: 10px;
}

.mode {
  min-height: 108px;
  padding: 12px;
  text-align: left;
  border: 1px solid rgba(255, 247, 237, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 247, 237, 0.06), rgba(3, 8, 18, 0.64)),
    rgba(3, 8, 18, 0.5);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.mode:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 106, 33, 0.58);
}

.mode strong,
.mode span {
  display: block;
}

.mode .mode-mark {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 9px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  color: #fed7aa;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mode span:last-child {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.3;
}

.mode.selected {
  border-color: var(--orange);
  background:
    linear-gradient(180deg, rgba(242, 106, 33, 0.24), rgba(15, 23, 42, 0.74)),
    rgba(242, 106, 33, 0.13);
  box-shadow: inset 0 0 0 1px rgba(242, 106, 33, 0.24), 0 12px 34px rgba(242, 106, 33, 0.12);
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.chip {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--muted-strong);
  cursor: pointer;
}

.chip:hover {
  border-color: rgba(249, 115, 22, 0.55);
  color: var(--ink);
}

.test-script {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(242, 106, 33, 0.3);
  border-radius: var(--radius);
  background: rgba(242, 106, 33, 0.08);
}

.chat {
  display: grid;
  gap: 12px;
  min-height: 360px;
  max-height: 560px;
  overflow: auto;
  padding: 14px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 247, 237, 0.08) 50%, transparent 51%),
    rgba(2, 6, 23, 0.66);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.message {
  display: grid;
  gap: 8px;
  max-width: min(780px, 94%);
  padding: 13px 14px;
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}

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

.message-head > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.message.tester {
  justify-self: end;
  background: rgba(249, 115, 22, 0.13);
  border: 1px solid rgba(249, 115, 22, 0.28);
}

.message.bot {
  justify-self: start;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(242, 106, 33, 0.24);
}

.message p {
  white-space: pre-wrap;
  font-size: 0.96rem;
  line-height: 1.5;
}

.message.tester p {
  font-weight: 760;
}

.message.loading p {
  color: var(--muted);
}

.final-challenge {
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid rgba(249, 115, 22, 0.32);
  border-radius: var(--radius);
  background: rgba(249, 115, 22, 0.1);
}

.final-challenge span {
  color: #fed7aa;
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.final-challenge p {
  font-size: 0.94rem;
}

.debug-meta {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.active-debate {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(242, 106, 33, 0.38);
  border-radius: var(--radius);
  background: rgba(242, 106, 33, 0.07);
}

.active-debate dl,
.feedback-item dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.active-debate div {
  display: grid;
  gap: 2px;
}

.active-debate dt,
.feedback-item dt,
.summary-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.active-debate dd,
.feedback-item dd {
  margin: 0;
}

.composer {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.composer-actions {
  justify-content: flex-end;
}

.response-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.feedback-panel form {
  display: grid;
  gap: 16px;
}

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

.checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--muted-strong);
  font-weight: 850;
}

.checks input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}

.safety {
  display: grid;
  gap: 14px;
}

.safety ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.dashboard-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

.debug-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  font-weight: 850;
}

.debug-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}

.compact {
  justify-content: flex-end;
}

.feedback-list {
  display: grid;
  gap: 12px;
}

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

.compact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-card {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(242, 106, 33, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 247, 237, 0.06), rgba(15, 23, 42, 0.78)),
    rgba(15, 23, 42, 0.78);
}

.summary-card strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.feedback-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(242, 106, 33, 0.16);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.feedback-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.feedback-item dl {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
}

blockquote {
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--orange);
  color: var(--muted-strong);
}

@keyframes entrySplash {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }
  35% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes mindOpen {
  0% {
    transform: rotate(0deg) translateY(0);
  }
  55%,
  100% {
    transform: rotate(-12deg) translate(-2px, -4px);
  }
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .game-moment {
    transition: none;
  }
}

@media (max-width: 1060px) {
  .topbar,
  .hero,
  .workspace,
  .phone-grid {
    grid-template-columns: 1fr;
  }

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

  .feedback-item dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .topbar {
    gap: 12px;
    padding:
      calc(12px + var(--safe-top))
      max(12px, var(--safe-right))
      12px
      max(12px, var(--safe-left));
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  h1 {
    font-size: 1.22rem;
  }

  h2 {
    font-size: 1.62rem;
  }

  main {
    gap: 14px;
    padding:
      12px
      max(10px, var(--safe-right))
      calc(28px + var(--safe-bottom))
      max(10px, var(--safe-left));
  }

  .hero {
    min-height: auto;
    padding: 16px;
    background-position: 58% center;
  }

  .hero-copy {
    gap: 10px;
  }

  .hero h2 {
    font-size: 1.52rem;
  }

  .hero-logo-slot {
    min-width: 0;
    width: 100%;
  }

  .hero p {
    font-size: 0.94rem;
  }

  .hero .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero .actions .button {
    width: auto;
    min-height: 46px;
    padding: 0 10px;
    font-size: 0.9rem;
  }

  .hero .status-panel {
    display: none;
  }

  .status-panel,
  .playground,
  .feedback-panel,
  .phone-access,
  .live-brain,
  .session-summary,
  .qa-results,
  .safety,
  .feedback-dashboard {
    padding: 15px 13px;
  }

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

  .mode {
    min-height: 92px;
  }

  .examples {
    display: grid;
    grid-template-columns: 1fr;
    margin: 14px 0;
  }

  .test-script,
  .dashboard-head,
  .compact,
  .copy-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .button,
  .composer-actions .button,
  .actions .button {
    width: 100%;
    min-height: 48px;
  }

  .chip,
  .checks label {
    min-height: 48px;
  }

  .chat {
    min-height: 320px;
    max-height: 58vh;
    padding: 10px;
  }

  .message {
    max-width: 100%;
    padding: 11px;
  }

  .message p {
    font-size: 0.93rem;
    line-height: 1.47;
  }

  .message-head {
    display: grid;
    justify-content: stretch;
  }

  .message-badges small {
    font-size: 0.66rem;
  }

  .composer {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 12px -13px -15px;
    padding: 12px 13px calc(14px + var(--safe-bottom));
    background: rgba(3, 8, 18, 0.94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }

  .composer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 84px;
  }

  .summary-grid,
  .compact-grid,
  .feedback-item dl {
    grid-template-columns: 1fr;
  }

  .checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .checks {
    grid-template-columns: 1fr;
  }

  .top-actions {
    grid-template-columns: 1fr;
  }
}

/* iPhone-first app shell */
.app-shell {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  min-height: 100dvh;
  padding-bottom: calc(104px + var(--safe-bottom));
  background:
    radial-gradient(circle at 50% 10%, rgba(242, 106, 33, 0.1), transparent 30%),
    linear-gradient(180deg, #050608 0%, #070b12 48%, #050608 100%);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100vw;
  padding:
    calc(10px + var(--safe-top))
    calc(12px + var(--safe-right))
    8px
    calc(12px + var(--safe-left));
  background: rgba(5, 6, 8, 0.82);
  border-bottom: 1px solid rgba(255, 247, 237, 0.07);
  backdrop-filter: blur(18px);
}

.app-header h1 {
  font-size: 0.98rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

.header-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-start;
}

.app-header .status-pill {
  min-height: 26px;
  padding: 4px 7px;
  font-size: 0.63rem;
  letter-spacing: 0;
}

.streak-pill {
  border-color: rgba(242, 106, 33, 0.52);
  color: #fed7aa;
}

.app-main {
  display: block;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding:
    4px
    max(14px, var(--safe-right))
    calc(118px + var(--safe-bottom))
    max(14px, var(--safe-left));
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  gap: 12px;
}

.bottom-nav {
  display: none;
}

.bottom-nav button,
.menu-tabs button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(255, 247, 237, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 950;
}

.bottom-nav button.active,
.menu-tabs button.active {
  border-color: rgba(242, 106, 33, 0.72);
  background: rgba(242, 106, 33, 0.18);
  color: #fff7ed;
  box-shadow: 0 0 0 1px rgba(242, 106, 33, 0.16) inset;
}

.app-menu {
  position: relative;
  z-index: 22;
  flex: 0 0 auto;
  min-width: 0;
}

.app-menu summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 247, 237, 0.12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 950;
  list-style: none;
  cursor: pointer;
}

.app-menu summary::-webkit-details-marker {
  display: none;
}

.menu-sheet {
  position: absolute;
  top: calc(100% + 8px);
  right: calc(-1 * var(--safe-right));
  display: grid;
  width: min(calc(100vw - 24px - var(--safe-left) - var(--safe-right)), 320px);
  max-width: calc(100vw - 24px);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 247, 237, 0.12);
  border-radius: 24px;
  background: rgba(13, 17, 24, 0.97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px);
}

.menu-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.developer-system {
  display: grid;
  gap: 12px;
}

.developer-system > summary {
  min-height: 44px;
  cursor: pointer;
  color: var(--muted-strong);
  font-weight: 950;
}

.developer-system[open] {
  border-color: rgba(242, 106, 33, 0.3);
}

.developer-system .compact-status-card,
.developer-system .phone-access,
.developer-system .qa-results {
  display: grid;
  gap: 12px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255, 247, 237, 0.08);
}

.compact-hero {
  min-height: auto;
  padding: 16px;
  border-radius: 18px;
}

.compact-hero h2 {
  font-size: clamp(1.45rem, 7vw, 2.25rem);
}

.compact-hero p {
  font-size: 0.95rem;
}

.compact-hero .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.chat-arena,
.workspace.chat-arena {
  display: block;
}

.chat-arena .playground {
  display: grid;
  gap: 10px;
  min-height: calc(100dvh - 120px - var(--safe-top) - var(--safe-bottom));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.welcome-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  align-items: center;
  justify-content: center;
  min-height: clamp(250px, 45dvh, 430px);
  padding: clamp(26px, 7dvh, 70px) 14px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  animation: arenaEntrance 420ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.welcome-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.quick-battle-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(242, 106, 33, 0.36);
  border-radius: 999px;
  background: rgba(242, 106, 33, 0.13);
  color: #fff7ed;
  font-weight: 950;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.quick-battle-button:hover {
  border-color: rgba(242, 106, 33, 0.76);
  background: rgba(242, 106, 33, 0.2);
}

.quick-battle-button:active {
  box-shadow: 0 0 0 5px rgba(242, 106, 33, 0.08);
}

.welcome-card h2 {
  color: #fffaf3;
  font-size: clamp(2.2rem, 12vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.welcome-card p:not(.eyebrow) {
  margin-top: 10px;
  color: rgba(255, 250, 243, 0.7);
  font-size: clamp(1rem, 4.2vw, 1.22rem);
  line-height: 1.4;
}

.arena-welcome {
  position: relative;
  overflow: hidden;
}

.arena-welcome::after {
  display: none;
}

.home-mark {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(242, 106, 33, 0.28);
  border-radius: 22px;
  background: rgba(255, 247, 237, 0.04);
  box-shadow: 0 18px 50px rgba(242, 106, 33, 0.08);
  animation: arenaPulse 1800ms ease-in-out infinite;
}

.today-matchup-card {
  display: grid;
  gap: 3px;
  width: min(100%, 320px);
  padding: 13px 15px;
  border: 1px solid rgba(255, 247, 237, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(15, 18, 24, 0.72);
  box-shadow: var(--shadow-soft);
}

.today-matchup-card span {
  color: var(--orange-strong);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.today-matchup-card strong {
  color: #fffaf3;
  font-size: 1.02rem;
}

.today-matchup-card small {
  color: var(--muted);
  font-weight: 750;
}

.home-mark img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.home-mark img:not([hidden]) + span {
  display: none;
}

.home-mark span {
  color: var(--orange);
  font-size: 1rem;
  font-weight: 950;
}

.mode-quick-row,
.sport-selector {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chat-top .mode-quick-row,
#examples {
  display: none;
}

.mode-chip,
.sport-chip {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid rgba(255, 247, 237, 0.1);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--muted-strong);
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 950;
}

.compact-mode {
  align-items: center;
  display: inline-flex;
  white-space: nowrap;
}

.mode-chip.selected,
.sport-chip.selected {
  border-color: rgba(242, 106, 33, 0.72);
  background: rgba(242, 106, 33, 0.18);
  color: #fff7ed;
}

.arena-score-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.arena-score-strip span {
  display: grid;
  gap: 2px;
  min-height: 43px;
  padding: 6px 7px;
  border: 1px solid rgba(242, 106, 33, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(242, 106, 33, 0.1), rgba(15, 23, 42, 0.62)),
    rgba(3, 8, 18, 0.5);
}

.arena-score-strip strong {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 950;
  text-transform: uppercase;
}

.arena-score-strip em {
  color: #fff7ed;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 950;
}

.daily-card,
.share-card,
.sport-rank-card {
  display: grid;
  gap: 12px;
}

.daily-start-card,
.daily-question-card,
.daily-scorecard,
.share-card,
.sport-rank-card,
.matchup-card {
  padding: 14px;
  border: 1px solid rgba(242, 106, 33, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(242, 106, 33, 0.08), rgba(15, 23, 42, 0.52)),
    rgba(3, 8, 18, 0.5);
}

.matchup-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.matchup-card {
  display: grid;
  gap: 5px;
}

.matchup-card span {
  color: var(--orange-strong);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.matchup-card strong {
  font-size: 1.04rem;
}

.matchup-card p {
  color: var(--muted-strong);
  line-height: 1.4;
}

.daily-question-head {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.answer-grid {
  display: grid;
  gap: 9px;
}

.answer-choice {
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 247, 237, 0.14);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
  color: var(--ink);
  text-align: left;
  font-weight: 850;
}

.answer-choice.correct {
  border-color: rgba(34, 197, 94, 0.72);
  background: rgba(34, 197, 94, 0.14);
}

.answer-choice.incorrect {
  border-color: rgba(239, 68, 68, 0.72);
  background: rgba(239, 68, 68, 0.14);
}

.daily-result {
  display: grid;
  gap: 5px;
  padding: 11px;
  border-radius: 14px;
  background: rgba(255, 247, 237, 0.06);
  color: var(--muted-strong);
}

.daily-result strong,
.daily-result span {
  color: var(--ink);
}

.sport-rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 136px), 1fr));
  gap: 10px;
}

.summary-card,
.daily-card,
.share-card,
.sport-rank-card,
.daily-start-card,
.daily-question-card,
.daily-scorecard {
  min-width: 0;
  max-width: 100%;
}

.sport-rank-card span,
.share-card .eyebrow {
  color: var(--orange-strong);
}

.sport-rank-card dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.sport-rank-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.sport-rank-card dt,
.sport-rank-card dd {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.82rem;
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(242, 106, 33, 0.24);
  border-radius: 999px;
  background: rgba(242, 106, 33, 0.12);
  color: #fed7aa;
  font-size: 0.78rem;
  font-weight: 950;
}

.share-grid {
  display: grid;
  gap: 12px;
}

.share-card pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink);
  font: 850 0.9rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.chat-top {
  display: grid;
  gap: 6px;
}

.chat-top h2,
.mobile-card h2,
.feedback-panel h2 {
  font-size: 1.25rem;
}

.chat-top > .section-heading {
  display: none;
}

.chat-top .section-heading,
.compact-feedback .section-heading {
  margin-bottom: 0;
}

.chat {
  align-content: start;
  min-height: 34dvh;
  max-height: none;
  padding: 9px;
  border-radius: 16px;
}

.arena-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 136px;
  text-align: center;
}

.arena-empty strong {
  color: #fff7ed;
  font-size: 1.05rem;
}

.arena-empty span {
  max-width: 280px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.message {
  max-width: 91%;
  border-radius: 16px;
  padding: 11px;
}

.message-head > span {
  color: #fed7aa;
}

.round-chip {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(255, 247, 237, 0.12);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.message.tester {
  border-bottom-right-radius: 6px;
}

.message.bot {
  border-bottom-left-radius: 6px;
}

.message p {
  font-size: 0.9rem;
  line-height: 1.42;
}

.final-challenge {
  padding: 9px 10px;
  border: 1px solid rgba(249, 115, 22, 0.44);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(249, 115, 22, 0.18), rgba(15, 23, 42, 0.54)),
    rgba(249, 115, 22, 0.08);
}

.composer {
  position: fixed;
  right: auto;
  bottom: calc(14px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  display: grid;
  width: calc(100vw - max(14px, var(--safe-left)) - max(14px, var(--safe-right)) - 2px);
  max-width: 680px;
  margin: 0 auto;
  padding: 9px;
  border: 1px solid rgba(255, 247, 237, 0.14);
  border-radius: 28px;
  background: rgba(14, 18, 24, 0.94);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px);
}

.composer textarea {
  min-height: 42px;
  max-height: 120px;
  padding: 10px 12px 6px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  font-size: clamp(1rem, 2.8vw, 1.08rem);
  resize: none;
  box-shadow: none;
}

.voice-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(242, 106, 33, 0.22);
  border-radius: 16px;
  background: rgba(255, 247, 237, 0.05);
}

.voice-status-row,
.voice-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.voice-status-row {
  color: var(--muted-strong);
  font-weight: 850;
  font-size: 0.88rem;
}

.voice-timer {
  color: var(--orange-light);
  font-variant-numeric: tabular-nums;
}

.voice-transcript {
  gap: 6px;
  color: var(--ink);
}

.voice-transcript textarea {
  min-height: 48px;
  font-size: 0.94rem;
}

.voice-interpretation {
  color: var(--muted);
  font-size: 0.86rem;
}

.voice-interpretation summary {
  min-height: 36px;
  cursor: pointer;
  color: var(--muted-strong);
  font-weight: 900;
}

.voice-interpretation blockquote {
  margin: 4px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--orange);
  color: var(--ink);
}

.composer-actions {
  display: grid;
  grid-template-columns: 36px minmax(82px, 1fr) 54px 74px;
  gap: 7px;
  align-items: center;
}

.composer-actions .button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--control-radius);
  font-size: 0.76rem;
}

.composer-actions .plus-button {
  padding: 0;
  color: var(--muted-strong);
  font-size: 1.15rem;
}

.composer-actions .mode-pill-button {
  justify-content: flex-start;
  overflow: hidden;
  color: #fff7ed;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-actions .talk-button {
  color: var(--muted-strong);
}

.difficulty-selector {
  position: relative;
  min-width: 0;
}

.difficulty-pill {
  width: 100%;
  min-height: 34px;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 0.74rem;
}

.difficulty-pill strong {
  color: var(--orange-light);
}

.difficulty-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: min(100%, 300px);
  padding: 8px;
  border: 1px solid rgba(242, 106, 33, 0.3);
  border-radius: 16px;
  background: rgba(6, 10, 18, 0.97);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.difficulty-menu button {
  display: grid;
  width: 100%;
  gap: 2px;
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.difficulty-menu button span {
  color: var(--muted);
  font-size: 0.76rem;
}

.difficulty-menu button.selected,
.difficulty-menu button:hover {
  background: rgba(242, 106, 33, 0.14);
}

.round-score-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.round-score-strip span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(242, 106, 33, 0.22);
  border-radius: 13px;
  background: rgba(255, 247, 237, 0.045);
}

.round-score-strip strong,
.round-score-strip em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-score-strip strong {
  color: var(--muted);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.round-score-strip em {
  color: var(--ink);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 950;
}

.mobile-card {
  min-width: 0;
  max-width: 100%;
  padding: 15px;
  background: var(--panel);
  border: 1px solid rgba(242, 106, 33, 0.2);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.compact-feedback {
  padding: 3px 1px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.compact-feedback form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.reaction-strip {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 5px;
  overflow-x: auto;
  padding: 1px 0 2px;
  scrollbar-width: none;
}

.reaction-strip::-webkit-scrollbar {
  display: none;
}

.reaction-strip button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 247, 237, 0.12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.reaction-strip button:hover,
.reaction-strip button:focus-visible,
.reaction-strip button.selected {
  border-color: rgba(249, 115, 22, 0.62);
  background: rgba(249, 115, 22, 0.18);
  color: #fff7ed;
}

.more-feedback {
  display: block;
  flex: 0 0 auto;
}

.more-feedback summary {
  width: fit-content;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(242, 106, 33, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 950;
  cursor: pointer;
}

.more-feedback[open] {
  flex-basis: 100%;
  display: grid;
  gap: 9px;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid rgba(242, 106, 33, 0.18);
  border-radius: 14px;
  background: rgba(3, 8, 18, 0.74);
}

.more-feedback:not([open]) > :not(summary) {
  display: none;
}

.compact-save {
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.75rem;
}

.compact-feedback .form-status {
  flex-basis: 100%;
  min-height: 16px;
  margin: 0;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 950;
}

.quick-checks {
  display: flex;
  flex-wrap: wrap;
}

.quick-checks label {
  flex: 1 1 auto;
}

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

.mode {
  min-height: 148px;
  border-radius: 18px;
}

.mode em {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(242, 106, 33, 0.16);
  color: #fed7aa;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.settings-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.settings-grid fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 13px;
  border: 1px solid rgba(242, 106, 33, 0.2);
  border-radius: 18px;
}

.settings-grid legend {
  padding: 0 5px;
  color: var(--orange-strong);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.settings-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--muted-strong);
  font-weight: 850;
}

.settings-grid input {
  accent-color: var(--orange);
}

.rank-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgba(242, 106, 33, 0.38);
  border-radius: 18px;
  background:
    radial-gradient(circle at 85% 20%, rgba(242, 106, 33, 0.24), transparent 8rem),
    rgba(15, 23, 42, 0.78);
}

.rank-card span {
  color: var(--orange-strong);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.rank-card strong {
  font-size: 1.45rem;
  text-shadow: 0 0 22px rgba(242, 106, 33, 0.2);
}

.rank-card p,
.status-note p {
  color: var(--muted-strong);
  line-height: 1.45;
}

.scoreboard-card .summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 138px), 1fr));
}

.status-note {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 247, 237, 0.1);
  border-radius: 16px;
  background: rgba(3, 8, 18, 0.52);
}

@media (min-width: 760px) {
  .app-main {
    padding-top: 18px;
  }

  .tab-panel.active {
    gap: 18px;
  }

  .chat-arena .playground {
    padding: 18px;
  }

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

@media (max-width: 520px) {
  .app-header {
    gap: 6px;
    padding:
      calc(14px + var(--safe-top))
      calc(10px + var(--safe-right))
      7px
      calc(10px + var(--safe-left));
  }

  .brand-row {
    gap: 7px;
  }

  .brand-lockup {
    width: 28px;
    height: 28px;
  }

  .app-header h1 {
    font-size: 0.84rem;
  }

  .app-header .eyebrow {
    display: none;
  }

  .header-pills .status-pill {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-logo-slot {
    padding: 10px 12px;
  }

  .compact-hero .actions {
    grid-template-columns: 1fr;
  }

  .examples {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0;
    padding-bottom: 2px;
  }

  .welcome-card {
    padding: 18px 10px 12px;
    min-height: clamp(245px, 44dvh, 390px);
    gap: 10px;
  }

  .welcome-card h2 {
    font-size: clamp(1.9rem, 10vw, 3.2rem);
  }

  .welcome-card p:not(.eyebrow) {
    margin-top: 6px;
    font-size: 0.98rem;
  }

  .home-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
  }

  .home-mark img {
    width: 38px;
    height: 38px;
  }

  .welcome-card .button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .arena-strip {
    display: none;
  }

  .examples .chip {
    flex: 0 0 auto;
    max-width: 260px;
    white-space: nowrap;
  }

  .message {
    max-width: 94%;
  }

  .arena-score-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .round-score-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .difficulty-pill {
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.7rem;
  }

  .difficulty-menu {
    width: min(100%, 280px);
  }

  .message-head {
    display: grid;
    gap: 6px;
  }

  .message-badges {
    gap: 5px;
  }

  .message-badges small {
    font-size: 0.62rem;
  }

  .composer-actions {
    grid-template-columns: 32px minmax(70px, 1fr) 48px 66px;
    gap: 5px;
  }

  .composer-actions .button {
    min-height: 34px;
    padding: 0 7px;
    font-size: 0.72rem;
  }

  .summary-grid,
  .compact-grid,
  .feedback-item dl {
    grid-template-columns: 1fr;
  }

  .scoreboard-card .summary-grid,
  .sport-rank-grid,
  .status-grid,
  .mode-grid {
    grid-template-columns: 1fr;
  }

  .checks {
    display: flex;
    flex-wrap: wrap;
  }

  .checks label {
    min-height: 42px;
    font-size: 0.82rem;
  }
}
