/* Hand Throw Arena: styles for the version embedded in fun.html.
   Generated from styles.css: same rules, scoped to the game's shadow root
   so the game and the website can't affect each other's styling.
   If you change styles.css, make the same change here. */
:host { all: initial; display: block; }
.hta-root {
  --ink: #edf3f8;
  --muted: #8da0b2;
  --dim: #526476;
  --line: rgba(155, 180, 202, 0.16);
  --line-strong: rgba(155, 180, 202, 0.3);
  --bg: #07111d;
  --panel: rgba(13, 28, 44, 0.78);
  --panel-solid: #0d1c2c;
  --panel-deep: #091724;
  --cyan: #68e2df;
  --cyan-dark: #1c9d9b;
  --orange: #ffad70;
  --lime: #c8f56d;
  --danger: #ff7d82;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 'Space Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }
.hta-root {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 2%, rgba(73, 165, 167, 0.13), transparent 28rem),
    radial-gradient(circle at 93% 72%, rgba(255, 139, 94, 0.08), transparent 30rem),
    var(--bg);
  font-family: var(--display);
}
button, select { font: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { cursor: not-allowed; opacity: 0.45; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.ambient { position: absolute; pointer-events: none; z-index: 0; opacity: .5; }
.ambient-one { width: 23rem; height: 23rem; top: 6rem; right: -12rem; border: 1px solid rgba(104, 226, 223, .13); border-radius: 50%; box-shadow: 0 0 0 3rem rgba(104,226,223,.025), 0 0 0 7rem rgba(104,226,223,.018); }
.ambient-two { width: 12rem; height: 12rem; bottom: 2rem; left: -7rem; border: 1px solid rgba(255, 173, 112, .14); border-radius: 50%; }
.app-shell { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: 0 5.3vw 34px; }

.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; }
.brand strong, .brand small { display: block; letter-spacing: .08em; }
.brand strong { font-size: 12px; font-weight: 700; }
.brand small { margin-top: 4px; color: var(--muted); font: 9px var(--mono); letter-spacing: .14em; }
.brand-mark { position: relative; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--cyan); border-radius: 50%; transform: rotate(-18deg); }
.brand-mark::before { content: ''; position: absolute; width: 15px; height: 1px; background: var(--cyan); transform: rotate(45deg); }
.brand-mark span { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--orange); }
.brand-mark span:nth-child(1) { top: 5px; right: 5px; }.brand-mark span:nth-child(2) { bottom: 5px; left: 6px; }.brand-mark span:nth-child(3) { top: 12px; left: 4px; background: var(--lime); }
.topbar-meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.signal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 4px rgba(82, 100, 118, .13); }
.signal-dot.live { background: var(--cyan); box-shadow: 0 0 0 4px rgba(104, 226, 223, .12); }
.topbar-divider { width: 1px; height: 16px; margin: 0 7px; background: var(--line); }.round-counter b { color: var(--ink); font-weight: 500; }
.sound-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--cyan); font: 9px var(--mono); letter-spacing: .08em; }.sound-toggle:hover { color: var(--ink); }.sound-toggle.is-muted { color: var(--dim); }.sound-icon { font-size: 14px; line-height: 0; }

.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding: 68px 0 54px; }
.eyebrow, .card-kicker, .section-label, .scoreboard-heading, .score-label, .score-foot, .footer-bar, .privacy-badge, .opponent-topline, .result-kicker, .confidence-heading, .training-count { font: 10px var(--mono); letter-spacing: .12em; }
.eyebrow { margin: 0 0 18px; color: var(--cyan); text-transform: uppercase; }
.hero-copy .hta-title { margin: 0; max-width: 720px; font-size: clamp(42px, 6.4vw, 86px); line-height: .92; letter-spacing: -.07em; font-weight: 600; }
.hero-copy .hta-title em { color: var(--orange); font-style: normal; }
.hero-subtitle { max-width: 570px; margin: 24px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.scoreboard { min-width: 246px; padding: 17px 18px 14px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(22,44,65,.65), rgba(8,21,34,.55)); }
.scoreboard-heading { display: flex; gap: 9px; align-items: center; color: var(--dim); font-size: 9px; }.scoreboard-heading > span:last-child { color: var(--orange); }.score-rule { flex: 1; height: 1px; background: var(--line); }
.score-line { display: flex; align-items: center; justify-content: space-between; margin: 13px 0 10px; }.score-line > div { display: flex; flex-direction: column; gap: 2px; }.score-line strong { font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -.08em; }.score-line .score-computer strong { color: var(--orange); }.score-vs { color: var(--dim); font-size: 20px; }.score-label { color: var(--muted); font-size: 9px; }.score-foot { display: flex; justify-content: space-between; color: var(--dim); font-size: 8px; }

.arena-layout, .feedback-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 21px; }.feedback-layout { margin-top: 50px; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); }
.section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 9px; }.section-index { color: var(--cyan); }.section-line { flex: 1; height: 1px; background: var(--line); }.section-label > span:last-child { color: var(--dim); font-size: 8px; }
.camera-card, .opponent-card, .how-card, .detection-panel, .training-card { border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(14px); }
.camera-card { overflow: hidden; }.camera-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 21px 16px; }.camera-header h2, .training-card h2, .detection-panel h2 { margin: 6px 0 0; font-size: 18px; font-weight: 500; letter-spacing: -.035em; }.card-kicker { color: var(--cyan); font-size: 9px; }
.privacy-badge { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); color: var(--muted); font-size: 8px; }.lock-icon { color: var(--lime); font-size: 14px; }
.camera-stage { position: relative; isolation: isolate; aspect-ratio: 16/8.9; min-height: 300px; overflow: hidden; background: #07121f; }.camera-stage::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(110deg, rgba(7,17,29,.62), transparent 46%, rgba(7,17,29,.2)); pointer-events: none; }
#cameraVideo { display: block; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); opacity: 0; transition: opacity .4s ease; }.camera-stage.active #cameraVideo { opacity: .85; }
#landmarkCanvas { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; transform: scaleX(-1); pointer-events: none; }
.camera-grid { position: absolute; inset: 0; z-index: 2; opacity: .18; background-image: linear-gradient(rgba(143,189,209,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(143,189,209,.2) 1px, transparent 1px); background-size: 10% 20%; pointer-events: none; }
.scan-line { position: absolute; z-index: 4; left: 5%; right: 5%; top: 30%; height: 1px; opacity: 0; background: linear-gradient(90deg, transparent, var(--cyan), transparent); box-shadow: 0 0 10px var(--cyan); pointer-events: none; }.camera-stage.active .scan-line { opacity: .45; animation: scan 4s linear infinite; }
@keyframes scan { 0% { transform: translateY(-70px); } 100% { transform: translateY(210px); } }
.hand-guide { position: absolute; z-index: 5; width: 35%; max-width: 260px; aspect-ratio: 1.08; left: 50%; top: 50%; transform: translate(-50%, -48%); opacity: .68; pointer-events: none; }.guide-corner { position: absolute; width: 26px; height: 26px; border-color: var(--cyan); border-style: solid; }.guide-tl { top: 0; left: 0; border-width: 1px 0 0 1px; }.guide-tr { top: 0; right: 0; border-width: 1px 1px 0 0; }.guide-bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }.guide-br { right: 0; bottom: 0; border-width: 0 1px 1px 0; }.guide-label { position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: var(--cyan); font: 8px var(--mono); letter-spacing: .12em; }
.camera-placeholder { position: absolute; z-index: 6; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; color: var(--muted); text-align: center; }.camera-placeholder strong { color: var(--ink); font-size: 14px; font-weight: 500; }.camera-placeholder span { max-width: 220px; color: var(--dim); font-size: 11px; line-height: 1.4; }.placeholder-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 5px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--cyan); font-size: 26px; }.camera-stage.active .camera-placeholder { display: none; }
.camera-capture-tag { position: absolute; z-index: 7; right: 16px; bottom: 14px; padding: 6px 8px; border: 1px solid rgba(104,226,223,.28); background: rgba(7,17,29,.6); color: var(--cyan); font: 8px var(--mono); letter-spacing: .1em; }.camera-capture-tag.capturing { color: var(--orange); border-color: rgba(255,173,112,.45); }.camera-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 17px; border-top: 1px solid var(--line); }.camera-status-wrap { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }.status-light { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }.status-light.live { background: var(--cyan); box-shadow: 0 0 0 4px rgba(104,226,223,.12); }.status-light.error { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,125,130,.12); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; border: 1px solid transparent; color: var(--bg); transition: transform .2s ease, background .2s ease, border-color .2s ease; }.button:hover:not(:disabled) { transform: translateY(-2px); }.button-secondary { padding: 9px 12px; border-color: var(--line-strong); background: transparent; color: var(--ink); font-size: 11px; }.button-secondary:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }.capture-controls { padding: 18px 0 0; }.button-ready { width: 100%; padding: 17px 20px; background: var(--cyan); font-size: 13px; font-weight: 600; letter-spacing: -.01em; }.button-ready:hover:not(:disabled) { background: #93eeea; }.button-arrow { margin-left: auto; font-size: 19px; }.ready-pulse { width: 8px; height: 8px; border: 2px solid rgba(7,17,29,.55); border-radius: 50%; }.button-ready:not(:disabled) .ready-pulse { animation: pulse 1.5s ease-in-out infinite; }.microcopy { margin: 10px 0 0; color: var(--dim); font: 10px var(--mono); text-align: center; }.microcopy.alert { color: var(--orange); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(7,17,29,.3); } 50% { box-shadow: 0 0 0 6px rgba(7,17,29,.05); } }

.opponent-card { min-height: 353px; padding: 22px; }.opponent-topline { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 9px; }.cpu-orb { display: grid; place-items: center; width: 12px; height: 12px; border: 1px solid var(--orange); border-radius: 50%; }.cpu-orb span { width: 4px; height: 4px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); }.thinking-bars { display: flex; gap: 3px; margin-left: auto; }.thinking-bars i { width: 3px; height: 10px; display: block; background: var(--dim); }.thinking-bars.active i:nth-child(1) { animation: bar .8s infinite; }.thinking-bars.active i:nth-child(2) { animation: bar .8s .15s infinite; }.thinking-bars.active i:nth-child(3) { animation: bar .8s .3s infinite; }.thinking-bars.active i { background: var(--orange); }
@keyframes bar { 0%,100% { transform: scaleY(.45); opacity: .35; } 50% { transform: scaleY(1); opacity: 1; } }
.computer-move { display: flex; min-height: 178px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; }.move-symbol { display: block; color: var(--orange); font-size: 74px; line-height: 1; filter: grayscale(1) sepia(1) saturate(6) hue-rotate(320deg); }.move-name { color: var(--muted); font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; }.opponent-divider { height: 1px; background: var(--line); }.result-block { padding-top: 17px; }.result-kicker { display: block; color: var(--cyan); font-size: 8px; }.result-block strong { display: block; margin-top: 7px; font-size: 23px; line-height: 1; letter-spacing: -.05em; font-weight: 500; }.result-block span:last-child { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }.result-block.win strong { color: var(--lime); }.result-block.loss strong { color: var(--orange); }.result-block.draw strong { color: var(--cyan); }
.how-card { margin-top: 15px; padding: 17px 18px; }.how-heading, .training-header, .confidence-heading { display: flex; align-items: center; justify-content: space-between; }.mini-spark { color: var(--orange); }.gesture-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0 13px; }.gesture-legend > div { display: flex; align-items: center; gap: 6px; min-width: 0; }.legend-symbol { font-size: 19px; }.gesture-legend b, .gesture-legend small { display: block; }.gesture-legend b { color: var(--ink); font: 8px var(--mono); }.gesture-legend small { margin-top: 3px; color: var(--dim); font-size: 9px; }.how-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.detection-panel { min-height: 177px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 24px 25px; }.detection-main { display: flex; align-items: center; gap: 17px; }.detection-icon { display: grid; place-items: center; width: 67px; height: 67px; border: 1px solid var(--line-strong); background: rgba(104, 226, 223, .04); color: var(--cyan); font-size: 39px; }.detection-panel h2 { font-size: 25px; text-transform: uppercase; }.detection-panel p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }.confidence-block { width: 42%; min-width: 170px; }.confidence-heading { color: var(--muted); font: 9px var(--mono); }.confidence-heading strong { color: var(--cyan); font-size: 14px; font-weight: 500; }.confidence-track { height: 4px; margin: 12px 0 8px; overflow: hidden; background: rgba(141, 160, 178, .16); }.confidence-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan-dark), var(--cyan)); transition: width .6s ease; }.confidence-note { color: var(--dim); font-size: 10px; }
.training-card { padding: 21px 22px 19px; }.training-header h2 { margin-top: 6px; font-size: 19px; }.training-count { padding: 7px 9px; border: 1px solid rgba(200,245,109,.22); color: var(--lime); font-size: 8px; }.training-intro { max-width: 430px; margin: 16px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }.training-form label { display: block; margin-bottom: 7px; color: var(--dim); font: 9px var(--mono); text-transform: uppercase; }.training-input-row { display: flex; gap: 7px; }.training-input-row select { min-width: 0; flex: 1; padding: 10px 12px; border: 1px solid var(--line-strong); background: var(--panel-deep); color: var(--ink); font-size: 11px; }.button-teach { padding: 0 13px; background: var(--lime); font-size: 11px; font-weight: 600; }.training-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }.text-button { padding: 0; border: 0; background: transparent; color: var(--cyan); font: 9px var(--mono); letter-spacing: .04em; }.text-button:hover { color: var(--ink); }.text-button span { margin-right: 4px; font-size: 14px; }.muted-action { color: var(--dim); }.file-button { position: relative; }.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.footer-bar { display: flex; justify-content: space-between; gap: 1rem; padding-top: 32px; color: var(--dim); font-size: 8px; }.footer-bar span:nth-child(2) { color: var(--muted); }
.toast { position: fixed; z-index: 20; right: 25px; bottom: 25px; display: flex; align-items: center; gap: 9px; max-width: 330px; padding: 12px 15px; border: 1px solid rgba(104,226,223,.4); background: #10283a; color: var(--ink); box-shadow: 0 13px 40px rgba(0,0,0,.3); font-size: 11px; transform: translateY(150%); transition: transform .3s ease; }.toast.show { transform: translateY(0); }.toast-mark { color: var(--cyan); }

@media (max-width: 980px) { .hero-row { align-items: flex-start; flex-direction: column; }.scoreboard { width: 100%; }.score-line { max-width: 210px; }.arena-layout, .feedback-layout { grid-template-columns: 1fr; }.opponent-column { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 21px; }.opponent-column .section-label { grid-column: 1 / -1; margin-bottom: -5px; }.how-card { margin-top: 0; align-self: start; }.opponent-card { min-height: 300px; } }
@media (max-width: 620px) { .app-shell { padding: 0 18px 26px; }.topbar { height: 70px; }.topbar-meta { font-size: 8px; }.topbar-meta .topbar-divider, .topbar-meta .round-counter { display: none; }.sound-toggle { font-size: 8px; }.hero-row { padding: 44px 0 35px; }.hero-copy .hta-title { font-size: clamp(42px, 14vw, 64px); }.hero-subtitle { font-size: 13px; }.camera-header { flex-direction: column; gap: 13px; }.camera-stage { min-height: 235px; }.camera-footer { align-items: flex-start; flex-direction: column; }.button-secondary { width: 100%; }.opponent-column { display: block; }.opponent-card { min-height: 0; }.how-card { margin-top: 15px; }.detection-panel { align-items: flex-start; flex-direction: column; gap: 24px; }.confidence-block { width: 100%; }.training-input-row { align-items: stretch; flex-direction: column; }.button-teach { min-height: 40px; }.footer-bar { align-items: flex-start; flex-direction: column; gap: 8px; }.footer-bar span:nth-child(2) { order: -1; } }

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

/* Click-to-throw fallback (Riverside Data addition) */
.manual-throw { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.manual-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.manual-button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(104, 226, 223, .05); color: var(--ink); font-size: 13px; transition: border-color .2s, background .2s; }
.manual-button:hover:not(:disabled) { border-color: var(--cyan); background: rgba(104, 226, 223, .12); }
.manual-button span { font-size: 16px; }

/* Embedded-version tweaks */
.hta-root .app-shell { padding: 0 clamp(18px, 4vw, 56px) 34px; }

/* ---- 04 The Numbers: statistics & prediction (Riverside Data addition) ---- */
.stats-layout { margin-top: 50px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stats-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 19px 20px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(14px); }
.stats-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stats-meta { color: var(--dim); font: 8px var(--mono); letter-spacing: .12em; text-align: right; }
.bar-list { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 36px; align-items: center; gap: 9px; }
.bar-list-tight .bar-row { grid-template-columns: 22px 1fr 36px; }
.bar-name { color: var(--ink); font-size: 12px; white-space: nowrap; }
.bar-track { height: 6px; overflow: hidden; background: rgba(141, 160, 178, .14); }
.bar-fill { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan-dark), var(--cyan)); transition: width .6s ease; }
.bar-row.is-top .bar-fill { background: linear-gradient(90deg, #d07a3d, var(--orange)); }
.bar-value { color: var(--muted); font: 10px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.stats-insight { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.stats-insight b { color: var(--ink); font-weight: 500; }
.win-rate { display: flex; align-items: baseline; gap: 10px; }
.win-rate strong { color: var(--lime); font-size: 42px; font-weight: 500; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.win-rate span { color: var(--dim); font: 9px var(--mono); letter-spacing: .12em; }
.result-split { display: flex; height: 8px; overflow: hidden; background: rgba(141, 160, 178, .14); }
.result-split span { display: block; width: 0; height: 100%; transition: width .6s ease; }
.split-win, .dot-win { background: var(--lime); }
.split-draw, .dot-draw { background: var(--cyan); }
.split-loss, .dot-loss { background: var(--orange); }
.split-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 11px; }
.split-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; }
.split-legend b { color: var(--ink); font-weight: 500; }
.history-strip { display: flex; gap: 4px; min-height: 22px; }
.history-strip span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); font: 9px var(--mono); }
.history-strip .h-win { color: var(--lime); border-color: rgba(200, 245, 109, .35); }
.history-strip .h-loss { color: var(--orange); border-color: rgba(255, 173, 112, .35); }
.history-strip .h-draw { color: var(--cyan); border-color: rgba(104, 226, 223, .35); }
.history-strip:empty::before { content: 'Last 10 rounds appear here'; color: var(--dim); font-size: 10px; }
.predict-main { display: flex; align-items: center; gap: 14px; }
.predict-symbol { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border: 1px solid rgba(255, 173, 112, .35); background: rgba(255, 173, 112, .06); color: var(--orange); font-size: 30px; }
.predict-label { display: block; color: var(--dim); font: 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.predict-main strong { display: block; margin-top: 4px; font-size: 18px; font-weight: 500; letter-spacing: -.03em; }
.smart-toggle { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; cursor: pointer; }
.smart-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--orange); }
.pattern-list { display: grid; gap: 10px; margin: 0; }
.pattern-list div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.pattern-list dt { color: var(--muted); font-size: 11px; }
.pattern-list dd { margin: 0; color: var(--ink); font: 12px var(--mono); text-align: right; white-space: nowrap; }
.stats-reset { align-self: flex-start; margin-top: auto; }
@media (max-width: 1180px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .stats-grid { grid-template-columns: 1fr; } }

/* Readable small labels on phones and tablets (desktop keeps the compact look) */
@media (max-width: 900px), (pointer: coarse) {
  .brand small { font-size: 11.5px; }
  .topbar-meta { font-size: 12.5px; }
  .sound-toggle { font-size: 11.5px; }
  .eyebrow, .card-kicker, .section-label, .scoreboard-heading, .score-label, .score-foot, .footer-bar, .privacy-badge, .opponent-topline, .result-kicker, .confidence-heading, .training-count { font-size: 11px; }
  .scoreboard-heading { font-size: 11.5px; }
  .score-label { font-size: 11.5px; }
  .score-foot { font-size: 11px; }
  .section-label { font-size: 11.5px; }
  .section-label > span:last-child { font-size: 11px; }
  .card-kicker { font-size: 11.5px; }
  .privacy-badge { font-size: 11px; }
  .guide-label { font-size: 11px; }
  .camera-capture-tag { font-size: 11px; }
  .microcopy { font-size: 12.5px; }
  .opponent-topline { font-size: 11.5px; }
  .move-name { font-size: 12.5px; }
  .result-kicker { font-size: 11px; }
  .gesture-legend b { font-size: 11px; }
  .gesture-legend small { font-size: 11.5px; }
  .confidence-heading { font-size: 11.5px; }
  .confidence-note { font-size: 12.5px; }
  .training-count { font-size: 11px; }
  .training-form label { font-size: 11.5px; }
  .text-button { font-size: 11.5px; }
  .footer-bar { font-size: 11px; }
  .topbar-meta { font-size: 11px; }
  .sound-toggle { font-size: 11px; }
  /* Click-to-throw fallback (Riverside Data addition) */
.manual-throw { font-size: 12.5px; }
  .stats-meta { font-size: 11px; }
  .bar-value { font-size: 12.5px; }
  .win-rate span { font-size: 11.5px; }
  .history-strip span { font-size: 11.5px; }
  .history-strip:empty::before { font-size: 12.5px; }
  .predict-label { font-size: 11.5px; }
}

/* Let panels shrink to the screen on phones and tablets */
@media (max-width: 980px) {
  .arena-layout > *, .feedback-layout > *, .camera-card, .opponent-card, .stats-card { min-width: 0; }
  .section-label { flex-wrap: wrap; row-gap: 4px; }
  .section-label .section-line { flex: 1 1 24px; min-width: 24px; }
  .button { white-space: normal; text-align: center; max-width: 100%; }
}
@media (max-width: 620px) {
  .camera-stage { aspect-ratio: 4 / 3; min-height: 0; width: 100%; }
}

/* ---- Challenge mode banner + business nudge (Riverside Data & AI) ---- */
.challenge-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 12px 16px; border: 1px solid rgba(255, 173, 112, .45); background: rgba(255, 173, 112, .08); }
.challenge-banner[hidden] { display: none; }
.challenge-banner p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.challenge-banner b { color: var(--orange); font-weight: 600; }
.challenge-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 173, 112, .18); animation: hta-pulse 2s ease-in-out infinite; }
@keyframes hta-pulse { 50% { box-shadow: 0 0 0 8px rgba(255, 173, 112, 0); } }
.game-cta { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin-top: 22px; padding: 22px 56px 22px 24px; border: 1px solid rgba(104, 226, 223, .45); background: linear-gradient(120deg, rgba(104, 226, 223, .10), rgba(13, 28, 44, .85)); animation: hta-rise .45s ease-out; }
.game-cta[hidden] { display: none; }
@keyframes hta-rise { from { opacity: 0; transform: translateY(10px); } }
.game-cta-copy { flex: 1 1 320px; min-width: 0; }
.game-cta-title { margin: 8px 0 4px; color: var(--ink); font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.game-cta-text { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.game-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.game-cta-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; transition: border-color .2s, background .2s; }
.game-cta-btn:hover { border-color: var(--cyan); }
.game-cta-primary { border-color: var(--cyan); background: var(--cyan); color: #07111d; }
.game-cta-primary:hover { background: #8ff0ed; }
.game-cta-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.game-cta-close:hover { color: var(--ink); }
@media (max-width: 620px) { .game-cta { padding: 20px 18px; } .game-cta-copy { padding-right: 30px; } .game-cta-actions, .game-cta-btn { width: 100%; } .challenge-banner p { font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { .challenge-dot, .game-cta { animation: none; } }
