[hidden] { display: none !important; }
html[data-theme] .challenge-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 20px; border-radius: 16px; background: var(--ui-surface);
  box-shadow: inset 0 0 0 1px var(--ui-line); margin: 0 0 12px;
}
.challenge-banner p { margin: 0; font-size: 16px; font-weight: 500; text-wrap: pretty; overflow-wrap: anywhere; }
.challenge-banner span { font-size: 12px; color: var(--ui-muted); }
html[data-theme] .challenge-action, html[data-theme] .challenge-rematch {
  min-height: 44px; padding: 10px 16px; border: 0; border-radius: 10px;
  background: var(--ui-accent); color: #fff; font: 500 14px/1.3 var(--ui-font);
  cursor: pointer; touch-action: manipulation; flex-shrink: 0;
  transition: background-color 180ms ease, scale 180ms cubic-bezier(.2,0,0,1);
}
.challenge-action span { color: inherit; margin-left: 8px; }
html[data-theme] .challenge-action:hover { background: var(--ui-accent-hover); }
.challenge-action:active, .challenge-rematch:active { scale: .96; }
html[data-theme] .challenge-target {
  position: absolute; top: 44.5%; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap; font: 500 10px/1.4 var(--ui-font); margin: 0;
  padding: 4px 10px; border-radius: 999px; background: #233020; color: #d0d9b3;
  pointer-events: none; font-variant-numeric: tabular-nums;
}
.challenge-target strong { font-weight: 600; }
html[data-theme] .challenge-target[data-beaten="true"] { background: #173b20; color: #c4f0cc; }
@media (min-width: 701px) {
  html[data-theme] body[data-challenge="true"] .intro > .eyebrow,
  html[data-theme] body[data-challenge="true"] .intro > .hero-logo,
  html[data-theme] body[data-challenge="true"] .intro > .intro-copy,
  html[data-theme] body[data-challenge="true"] .intro > #start-button { display: none; }
  html[data-theme] .challenge-banner { flex-direction: column; align-items: stretch; padding: 0; border: 0; background: none; box-shadow: none; margin-bottom: 24px; }
  .challenge-banner p { font-size: 26px; line-height: 1.2; letter-spacing: -.03em; margin-bottom: 10px; }
  .challenge-banner .challenge-action { align-self: start; }
}
.challenge-result { margin: 16px 0 18px; }
.challenge-result-label { font-size: 10px; font-weight: 600; letter-spacing: .055em; color: var(--ui-muted); margin: 0 0 8px; }
html[data-theme] .challenge-result h2 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
.challenge-result p:last-child { margin: 8px 0 0; font-size: 13px; color: var(--ui-muted); text-wrap: pretty; }
html[data-theme] .challenge-rematch { width: 100%; margin: 0; }
.challenge-result-actions { display: flex; flex-direction: column; gap: 8px; }
.challenge-result-actions .challenge-action { width: 100%; }
html[data-theme] .challenge-result-actions[data-outcome="win"] .challenge-rematch,
html[data-theme] .challenge-result-actions:not([data-outcome="win"]) .challenge-action { background: var(--ui-raised); color: var(--ui-ink); }
.challenge-result-actions:not([data-outcome="win"]) .challenge-rematch { order: -1; }
html[data-theme] .challenge-result[data-outcome="win"] + .score-panel-content .challenge-rematch { background: var(--ui-raised); color: var(--ui-ink); }
html[data-theme] body[data-challenge="true"][data-phase="over"] .share-button { font-size: 13px; min-height: 44px; }
.challenge-name { display: flex; flex-direction: column; gap: 6px; margin: 18px 0 14px; }
.challenge-name span { font-size: 12px; font-weight: 500; }
html[data-theme] .challenge-name input { width: 100%; min-height: 44px; font-size: 16px; padding: 10px 12px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-raised); color: var(--ui-ink); user-select: text; -webkit-user-select: text; }
.challenge-name small { font-size: 11px; color: var(--ui-muted); }
@media (max-width: 700px) {
  html[data-theme] body[data-challenge="true"] .intro { display: contents; }
  html[data-theme] body[data-challenge="true"] .intro > :not(.challenge-banner) { display: none; }
  html[data-theme] .challenge-banner { width: calc(100% - 24px); margin: 0 12px 8px; padding: 10px 12px; gap: 8px; border-radius: 12px; }
  .challenge-banner p { font-size: 12px; line-height: 1.35; }
  .challenge-banner div > span { font-size: 10px; }
  html[data-theme] .challenge-banner .challenge-action { padding: 8px 10px; font-size: 11px; max-width: 112px; }
  .challenge-action span { display: none; }
  html[data-theme] body[data-challenge="true"] .phone-area { width: max(220px, min(100vw, 600px, calc((100dvh - 180px - var(--challenge-banner-height, 66px) - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * .666667))); }
  html[data-theme] .challenge-target { font-size: clamp(9px, 2.5vw, 11px); padding: 3px 8px; }
  .mobile-score-dialog .challenge-result { display: none; }
  html[data-theme] .mobile-score-dialog .challenge-result-actions { grid-column: 1 / -1; grid-row: 3; margin-top: 18px; }
  html[data-theme] body[data-challenge="true"] .mobile-score-dialog .share-options { grid-row: 4; }
  .mobile-score-dialog .challenge-name { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .challenge-action, .challenge-rematch { transition: none; } }
