/* ENGLISH YO! — CLASS CLASH styles. Uses the colour tokens defined in index.html :root. */

body.cc-wide .shell { width: min(97%, 1500px); }
body.cc-wide main { padding-top: 0; }

.cc-panel { position: relative; background: rgba(255,255,255,.95); border-radius: 26px; box-shadow: 0 18px 44px rgba(0,53,110,.16); padding: clamp(16px, 3vw, 28px); }
.cc-kicker { margin: 0 0 6px; color: var(--pink); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-align: center; }
.cc-av { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; object-fit: contain; background: #fff; box-shadow: 0 3px 8px rgba(5,37,116,.14); }
.cc-av--xs { width: 24px; height: 24px; box-shadow: none; }
.cc-av--sm { width: 32px; height: 32px; }
.cc-av--md { width: 50px; height: 50px; }
.cc-av--lg { width: 72px; height: 72px; }

.cc-btn-soft, .cc-btn-go, .cc-btn-danger { min-height: 48px; padding: 10px 18px; border-radius: 14px; font-family: var(--display); font-weight: 800; font-size: 1rem; }
.cc-btn-soft { background: var(--card-blue); color: var(--navy); }
.cc-btn-go { background: var(--green); color: #fff; box-shadow: 0 8px 18px rgba(31,191,117,.35); }
.cc-btn-danger { background: #fff0f0; color: var(--red); }

@keyframes cc-pop { 0% { transform: scale(.92); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes cc-badge-in { 0% { transform: scale(.2) rotate(-200deg); opacity: 0; } 70% { transform: scale(1.12) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes cc-rise { 0% { transform: translateY(24px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes cc-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes cc-spin { to { transform: rotate(360deg); } }
.cc-pop { animation: cc-pop .35s ease both; }

/* ---------- team reveal ---------- */
.cc-reveal { text-align: center; overflow: hidden; background: linear-gradient(180deg, var(--ts) 0%, #fff 55%); border-top: 8px solid var(--tc); }
.cc-reveal h2 { font-size: clamp(1.4rem, 5vw, 2rem); }
.cc-reveal-badge img { width: clamp(150px, 45vw, 210px); margin: 6px auto 4px; filter: drop-shadow(0 14px 22px rgba(0,0,0,.18)); animation: cc-badge-in 1s cubic-bezier(.2,.9,.3,1.2) both; }
.cc-reveal-title span { color: var(--tc); }
.cc-reveal-me { display: inline-flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 6px 16px 6px 6px; border-radius: 999px; background: #fff; box-shadow: 0 6px 16px rgba(5,37,116,.12); font-size: 1.05rem; animation: cc-rise .5s .6s ease both; }
.cc-reveal-mates-label { margin: 14px 0 6px; font-size: .78rem; font-weight: 900; color: #3a4d78; }
.cc-reveal-mates { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; animation: cc-rise .5s .9s ease both; }
.cc-mate { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 58px; }
.cc-mate small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .62rem; font-weight: 800; }
.cc-more { align-self: center; padding: 6px 10px; border-radius: 999px; background: var(--ts); font-weight: 900; font-size: .8rem; }
.cc-countdown { margin: 16px 0 0; font-weight: 900; color: var(--navy); }
.cc-countdown b { display: inline-grid; place-items: center; min-width: 40px; height: 40px; margin-left: 4px; border-radius: 50%; background: var(--yellow); font-family: var(--display); font-size: 1.3rem; animation: cc-pulse 1s ease-in-out infinite; }
.cc-countdown--big { font-size: clamp(1rem, 2vw, 1.4rem); text-align: center; }

.cc-reveal-host { text-align: center; }
.cc-reveal-host-title { font-size: clamp(2rem, 5vw, 3.6rem); color: var(--navy); animation: cc-pop .5s ease both; }
.cc-reveal-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.cc-reveal-col { padding: 14px 10px; border-radius: 22px; background: var(--ts); border-top: 7px solid var(--tc); animation: cc-rise .6s var(--d) ease both; }
.cc-reveal-col-badge { width: clamp(80px, 9vw, 130px); margin: 0 auto; animation: cc-badge-in .9s var(--d) cubic-bezier(.2,.9,.3,1.2) both; }
.cc-reveal-col h3 { color: var(--tc); font-size: clamp(1.1rem, 2vw, 1.6rem); }
.cc-reveal-col p { margin: 0 0 8px; font-weight: 900; font-size: .85rem; }
.cc-reveal-col-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; max-height: 38vh; overflow-y: auto; }
.cc-chip-player { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 3px; border-radius: 999px; background: #fff; font-size: .74rem; font-weight: 800; }

/* ---------- student HUD ---------- */
.cc-play { display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin: 0 auto; }
.cc-hud { padding: 12px 14px; border-top: 6px solid var(--tc); }
.cc-me { display: flex; align-items: center; gap: 10px; }
.cc-me-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cc-me-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-size: 1.1rem; }
.cc-team-chip { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: var(--ts); color: var(--tc); font-size: .68rem; font-weight: 900; }
.cc-me-score { text-align: right; }
.cc-me-score small { display: block; font-size: .6rem; font-weight: 900; color: #5a6c95; letter-spacing: .06em; }
.cc-me-score b { font-family: var(--display); font-size: 1.6rem; line-height: 1; color: var(--navy); }
.cc-energy { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cc-energy img { width: 44px; height: 44px; object-fit: contain; }
.cc-energy-main { flex: 1; }
.cc-energy-top { display: flex; justify-content: space-between; font-size: .7rem; font-weight: 900; letter-spacing: .05em; }
.cc-energy-top b { font-family: var(--display); font-size: 1rem; color: var(--tc); }
.cc-energy-bar { height: 12px; margin-top: 3px; border-radius: 999px; background: #eef3fb; overflow: hidden; }
.cc-energy-bar div { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--tc), var(--yellow)); transition: width .6s ease; }
.cc-statusrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cc-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--card-blue); font-size: .68rem; font-weight: 900; }
.cc-pill--streak { background: var(--card-yellow); }
.cc-pill--pu { background: var(--card-pink); color: var(--pink-deep); animation: cc-pulse 1.4s ease-in-out infinite; }
.cc-pill--pu img { width: 18px; height: 18px; }
.cc-timer { position: relative; height: 14px; margin-top: 10px; border-radius: 999px; background: #eef3fb; overflow: hidden; }
.cc-timer div { height: 100%; width: 100%; background: linear-gradient(90deg, var(--sky-deep), var(--green)); transition: width .25s linear; }
.cc-timer div.is-low { background: linear-gradient(90deg, var(--red), #ff9f43); }
.cc-timer span { position: absolute; right: 8px; top: -1px; font-size: .66rem; font-weight: 900; color: var(--navy); }
.cc-host-warning { padding: 10px 14px; border-radius: 14px; background: #fff6d6; font-weight: 800; font-size: .85rem; text-align: center; }

/* ---------- challenge card ---------- */
.cc-stage { min-height: 280px; }
.cc-card { background: #fff; border-radius: 24px; box-shadow: 0 14px 34px rgba(0,53,110,.14); padding: clamp(16px, 4vw, 24px); }
.cc-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.cc-kind { padding: 4px 12px; border-radius: 999px; background: var(--navy); color: #fff; font-size: .7rem; font-weight: 900; letter-spacing: .05em; }
.cc-sub { padding: 4px 10px; border-radius: 999px; background: var(--card-yellow); font-size: .7rem; font-weight: 900; }
.cc-final { padding: 4px 10px; border-radius: 999px; background: var(--pink); color: #fff; font-size: .7rem; font-weight: 900; animation: cc-pulse 1.2s ease-in-out infinite; }
.cc-q { margin: 4px 0 14px; font-size: clamp(1.05rem, 4.2vw, 1.3rem); font-weight: 900; line-height: 1.35; color: var(--navy); }
.cc-q--big { font-family: var(--display); font-size: clamp(1.4rem, 6vw, 1.9rem); text-align: center; }
.cc-q--gap { font-size: clamp(1.15rem, 4.6vw, 1.45rem); }
.cc-blank { display: inline-block; min-width: 70px; padding: 0 10px; border-bottom: 4px solid var(--pink); color: var(--pink); text-align: center; transition: background .2s ease; }
.cc-blank.is-right { color: var(--green); border-color: var(--green); background: var(--card-green); border-radius: 8px 8px 0 0; }
.cc-blank.is-wrong { color: var(--red); border-color: var(--red); background: #fff0f0; border-radius: 8px 8px 0 0; }

.cc-options { display: grid; gap: 10px; }
.cc-options--grid { grid-template-columns: 1fr 1fr; }
.cc-options--list { grid-template-columns: 1fr; }
.cc-opt { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 12px 14px; border-radius: 16px; background: var(--paper); border: 3px solid #d9e9fb; color: var(--navy); font-weight: 900; font-size: 1rem; text-align: left; transition: transform .12s ease, border-color .12s ease, background .12s ease; }
.cc-opt:not(:disabled):hover { transform: translateY(-2px); border-color: var(--sky-deep); }
.cc-opt:not(:disabled):active { transform: scale(.97); }
.cc-opt-key { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .75rem; }
.cc-opt.is-right, .cc-opt.is-answer { background: var(--card-green); border-color: var(--green); }
.cc-opt.is-right .cc-opt-key, .cc-opt.is-answer .cc-opt-key { background: var(--green); }
.cc-opt.is-wrong { background: #fff0f0; border-color: var(--red); }
.cc-opt.is-wrong .cc-opt-key { background: var(--red); }
.cc-opt:disabled { opacity: 1; cursor: default; }

.cc-time-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.cc-time-side { flex: 1; }
.cc-time-side .cc-q { margin: 0; }
.cc-ctx { margin: 0 0 4px; font-weight: 900; color: #3a4d78; }
.cc-clock { width: clamp(130px, 38vw, 170px); flex: 0 0 auto; }
.cc-clock .face { fill: #fff; stroke: var(--navy); stroke-width: 6; }
.cc-clock text { font-family: var(--display); font-weight: 800; font-size: 17px; fill: var(--navy); }
.cc-clock .tk { stroke: #b9c7df; stroke-width: 1.5; }
.cc-clock .tk5 { stroke: var(--navy); stroke-width: 3; }
.cc-clock .hand-h { stroke: var(--navy); stroke-width: 8; stroke-linecap: round; }
.cc-clock .hand-m { stroke: var(--pink); stroke-width: 5; stroke-linecap: round; }
.cc-clock .pin { fill: var(--yellow); stroke: var(--navy); stroke-width: 2; }
.cc-digital { flex: 0 0 auto; padding: 14px 18px; border-radius: 18px; background: #0c1a3d; color: #7dffb3; font-family: "Courier New", monospace; font-weight: 900; font-size: clamp(2.2rem, 11vw, 3rem); letter-spacing: .04em; box-shadow: inset 0 0 0 4px #24345f, 0 8px 18px rgba(5,37,116,.25); }
.cc-digital span { animation: cc-pulse 1s steps(2) infinite; }

.cc-order-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 64px; margin-bottom: 12px; padding: 10px; border-radius: 16px; background: var(--paper); border: 3px dashed #bfd6f3; transition: border-color .2s ease, background .2s ease; }
.cc-order-line.is-right { border-color: var(--green); border-style: solid; background: var(--card-green); }
.cc-order-line.is-wrong { border-color: var(--red); border-style: solid; background: #fff0f0; }
.cc-order-hint { color: #93a6c9; font-weight: 800; font-size: .85rem; }
.cc-order-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cc-chip { min-height: 46px; padding: 8px 14px; border-radius: 14px; background: var(--card-yellow); border: 2px solid #f3d77a; color: var(--navy); font-weight: 900; font-size: 1rem; box-shadow: 0 4px 0 #e8c75c; transition: transform .1s ease; }
.cc-chip:active { transform: translateY(2px); box-shadow: 0 2px 0 #e8c75c; }
.cc-chip:disabled { opacity: .25; box-shadow: none; }
.cc-chip--placed { background: #fff; border-color: var(--sky-deep); box-shadow: 0 3px 0 #9fd4f7; }
.cc-punct { font-weight: 900; font-size: 1.2rem; }
.cc-order-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.cc-order-actions button:disabled { opacity: .45; box-shadow: none; }

/* ---------- feedback ---------- */
.cc-feedback { position: relative; text-align: center; }
.cc-feedback.is-right { background: linear-gradient(180deg, var(--card-green), #fff 70%); }
.cc-feedback.is-wrong { background: linear-gradient(180deg, #fff3e0, #fff 70%); }
.cc-fb-icon { font-size: 3rem; line-height: 1; animation: cc-badge-in .6s ease both; }
.cc-feedback h3 { margin: 6px 0 2px; font-size: 1.6rem; }
.cc-fb-energy { margin: 4px 0 10px; font-family: var(--display); font-size: 2.4rem; font-weight: 800; color: var(--green); line-height: 1; }
.cc-fb-energy small { font-size: .9rem; color: var(--navy); }
.cc-fb-parts, .cc-fb-log { list-style: none; margin: 0 auto 10px; padding: 0; max-width: 340px; text-align: left; }
.cc-fb-parts li, .cc-fb-log li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #dde8f5; font-size: .88rem; font-weight: 800; }
.cc-fb-parts b, .cc-fb-log b { color: var(--green); }
.cc-fb-answer { margin: 8px 0; font-weight: 800; color: #3a4d78; }
.cc-fb-answer b { color: var(--navy); font-size: 1.1rem; }
.cc-fb-note { margin: 6px 0; font-size: .84rem; font-weight: 800; color: #3a4d78; }
.cc-bubble { position: absolute; top: -12px; right: 14px; padding: 6px 14px; border-radius: 16px 16px 16px 4px; background: var(--sky-deep); color: #fff; font-family: var(--display); font-weight: 800; transform: rotate(4deg); box-shadow: 0 6px 14px rgba(31,166,240,.4); animation: cc-pop .4s .2s ease both; }
.cc-bubble--try { background: #ff9f43; box-shadow: 0 6px 14px rgba(255,159,67,.4); }
.cc-award { display: flex; align-items: center; gap: 12px; margin: 10px auto; max-width: 360px; padding: 10px 14px; border-radius: 18px; background: linear-gradient(120deg, var(--card-yellow), var(--card-pink)); text-align: left; animation: cc-pop .5s .3s ease both; }
.cc-award img { width: 54px; height: 54px; animation: cc-badge-in .8s .4s ease both; }
.cc-award small { display: block; font-size: .64rem; font-weight: 900; color: var(--pink-deep); letter-spacing: .08em; }
.cc-award b { display: block; font-family: var(--display); font-size: 1.15rem; }
.cc-award span { font-size: .78rem; font-weight: 700; }
.cc-wait { margin: 10px 0 0; font-size: .85rem; font-weight: 900; color: #3a4d78; text-align: center; }
.cc-flash { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 240px; gap: 8px; animation: cc-pop .2s ease both; }
.cc-flash.is-right { background: var(--card-green); }
.cc-flash.is-wrong { background: #fff0f0; }
.cc-flash-icon { font-size: 4rem; }
.cc-flash b { font-family: var(--display); font-size: 2rem; color: var(--navy); }
.cc-waiting { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; gap: 12px; font-weight: 900; }
.cc-spinner { width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--card-blue); border-top-color: var(--pink); animation: cc-spin .9s linear infinite; }

.cc-teams-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.cc-mini { display: flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 14px; background: rgba(255,255,255,.9); border: 2px solid transparent; font-size: .74rem; font-weight: 900; }
.cc-mini em { font-style: normal; color: #93a6c9; }
.cc-mini b { margin-left: auto; font-family: var(--display); color: var(--tc); }
.cc-mini.is-mine { border-color: var(--tc); background: var(--ts); }

/* ---------- student game feel (all effects are local CSS/DOM, never synced) ---------- */
.cc-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 3; }
.fx-p { position: absolute; z-index: 5; font-size: clamp(1rem, 2vw, 2rem); line-height: 1; pointer-events: none; animation: fx-fly .95s ease-out forwards; will-change: transform, opacity; }
@keyframes fx-fly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.5); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.25) rotate(var(--rot)); }
}
.cc-fb-avatar { position: relative; width: 96px; height: 96px; margin: 0 auto 2px; }
.cc-fb-av { width: 100%; height: 100%; object-fit: contain; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 8px 8px rgba(5,37,116,.18)); }
.cc-fb-avatar.happy .cc-fb-av { animation: cc-av-yay .9s ease-out both; filter: drop-shadow(0 0 16px var(--yellow)) drop-shadow(0 8px 8px rgba(5,37,116,.18)); }
.cc-fb-avatar.oops .cc-fb-av { animation: cc-av-oops 1s ease-in-out both; }
@keyframes cc-av-yay { 0% { transform: scale(.6) translateY(24px); } 35% { transform: scale(1.2) translateY(-16px) rotate(-6deg); } 60% { transform: scale(.96) translateY(0) rotate(4deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes cc-av-oops { 0% { transform: scale(.85); } 30% { transform: rotate(-7deg) scale(1); } 60% { transform: rotate(6deg); } 100% { transform: rotate(0); } }
.cc-av.react-yay { animation: cc-av-yay .9s ease-out; box-shadow: 0 0 0 4px var(--yellow), 0 0 24px var(--yellow); }
.cc-av.react-oops { animation: cc-av-oops 1s ease-in-out; box-shadow: 0 0 0 4px #ffc59a; }
.cc-fb-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 8vw, 2.2rem); line-height: 1.05; color: var(--green); animation: cc-pop .4s ease both; }
.cc-fb-title.is-fast { color: #ef8a00; text-shadow: 0 0 18px rgba(255,218,38,.7); }
.cc-fb-title.is-try { color: #ff7a1f; }
.cc-fb-speed { display: inline-block; margin: 0 0 6px; padding: 5px 14px; border-radius: 999px; background: linear-gradient(120deg, #fff3b0, #ffe28a); font-weight: 900; font-size: .9rem; animation: cc-pop .4s .15s ease both; }
.cc-fb-sub { margin: 4px 0 6px; font-weight: 900; color: var(--navy); }
.cc-combo { display: inline-flex; align-items: center; gap: 8px; margin: 8px auto 6px; padding: 8px 18px; border-radius: 999px; background: linear-gradient(120deg, #ff7a18, #ff3e79); color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.15rem; box-shadow: 0 8px 20px rgba(255,62,121,.4); animation: cc-combo .7s cubic-bezier(.2,1.5,.4,1) both; }
.cc-combo b { padding: 1px 9px; border-radius: 999px; background: rgba(255,255,255,.25); font-size: .95rem; }
.cc-combo .flame { display: inline-block; animation: cc-flame .5s ease-in-out infinite alternate; }
@keyframes cc-combo { 0% { transform: scale(.3) rotate(-10deg); opacity: 0; } 60% { transform: scale(1.15) rotate(3deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes cc-flame { from { transform: scale(1) rotate(-8deg); } to { transform: scale(1.3) rotate(8deg); } }
.cc-streak-note { margin: 2px 0 6px; font-weight: 900; font-size: .88rem; color: #d9601a; }
.cc-fb-parts { font-size: .82rem; }
.cc-pill--streak.hot { background: linear-gradient(120deg, #ffe0a3, #ffb199); animation: cc-pulse .8s ease-in-out infinite; }
.cc-me-score b.pop, .cc-energy-top b.pop { display: inline-block; animation: cc-score-pop .6s ease-out; }
@keyframes cc-score-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); color: var(--pink); } 100% { transform: scale(1); } }

/* ---------- round transition overlay ---------- */
.cc-intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 45%, rgba(24,60,160,.94), rgba(3,26,86,.97)); animation: cc-intro-in .25s ease both; }
.cc-intro.out { animation: cc-intro-out .3s ease forwards; }
.cc-intro-card { text-align: center; color: #fff; }
.cc-intro-round { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 15vw, 9rem); line-height: 1; letter-spacing: .02em; text-shadow: 0 6px 0 rgba(0,0,0,.25); animation: cc-intro-pop .6s cubic-bezier(.2,1.4,.4,1) both; }
.cc-intro-type { display: inline-block; margin-top: 12px; padding: 10px 28px; border-radius: 999px; background: var(--yellow); color: var(--navy); font-family: var(--display); font-weight: 800; font-size: clamp(1.2rem, 5vw, 2.8rem); box-shadow: 0 10px 0 rgba(0,0,0,.18); animation: cc-rise .5s .2s ease both; }
.cc-intro-sub { margin: 14px 0 0; font-weight: 900; font-size: clamp(.9rem, 2.4vw, 1.4rem); opacity: .85; }
@keyframes cc-intro-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cc-intro-out { to { opacity: 0; } }
@keyframes cc-intro-pop { 0% { transform: scale(.3) rotate(-6deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }

/* ---------- host arena: four battle lanes (built for an Interactive Flat Display) ---------- */
.arena { display: flex; flex-direction: column; gap: 12px; min-height: calc(100vh - 96px); min-height: calc(100dvh - 96px); }
.arena-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: clamp(12px, 1.6vw, 20px) clamp(16px, 3vw, 30px); border-radius: 26px; color: #fff; background: linear-gradient(120deg, rgba(5,37,116,.9), rgba(3,26,86,.82)), url("assets/ui/bg-arena.webp") center / cover; box-shadow: 0 16px 36px rgba(5,37,116,.3); }
.arena-round span { display: block; font-size: clamp(.8rem, 1.3vw, 1.1rem); font-weight: 900; letter-spacing: .1em; color: #9fc0ff; }
.arena-round b { font-family: var(--display); font-size: clamp(1.5rem, 3.2vw, 2.8rem); line-height: 1.05; }
.arena-timer { --p: 100; display: grid; place-items: center; width: clamp(76px, 8vw, 118px); aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--yellow) calc(var(--p) * 1%), rgba(255,255,255,.18) 0); }
.arena-timer span { display: grid; place-items: center; width: 80%; aspect-ratio: 1; border-radius: 50%; background: var(--navy-deep); font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 3rem); }
.arena-timer.is-low { background: conic-gradient(var(--red) calc(var(--p) * 1%), rgba(255,255,255,.18) 0); animation: cc-pulse 1s ease-in-out infinite; }
.arena-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: clamp(.85rem, 1.3vw, 1.15rem); font-weight: 900; }
.arena-meta b { color: var(--yellow); letter-spacing: .06em; }

.arena-event { position: fixed; z-index: 20; top: 18%; left: 50%; max-width: 92vw; padding: clamp(14px, 2vw, 24px) clamp(22px, 4vw, 48px); border-radius: 28px; background: linear-gradient(120deg, var(--yellow), #ffb938); color: var(--navy); font-family: var(--display); font-size: clamp(1.4rem, 3.4vw, 3rem); font-weight: 800; text-align: center; box-shadow: 0 20px 50px rgba(5,37,116,.35); opacity: 0; pointer-events: none; transform: translate(-50%, -20px) scale(.9); transition: opacity .3s ease, transform .3s ease; }
.arena-event.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.arena-lanes { position: relative; flex: 1; display: grid; grid-auto-rows: minmax(108px, 1fr); gap: clamp(8px, 1.2vw, 14px); }
.ar-lane { position: relative; display: grid; grid-template-columns: auto clamp(78px, 10vw, 150px) minmax(0, 1fr) auto; align-items: center; gap: clamp(8px, 1.4vw, 22px); padding: clamp(6px, .9vw, 14px) clamp(12px, 1.8vw, 28px); border-radius: 26px; border-left: 10px solid var(--tc); background: linear-gradient(100deg, var(--ts), rgba(255,255,255,.96) 65%); box-shadow: 0 10px 26px rgba(0,53,110,.13); }
.ar-lane.is-leader { box-shadow: 0 0 0 4px var(--yellow), 0 16px 32px rgba(0,53,110,.2); }
.ar-lane.is-leader::before { content: "👑"; position: absolute; top: -18px; left: 12px; font-size: clamp(1.4rem, 2.6vw, 2.4rem); filter: drop-shadow(0 3px 3px rgba(0,0,0,.2)); animation: cc-pulse 1.6s ease-in-out infinite; }
.ar-rank { min-width: 2.2ch; font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 3vw, 2.8rem); color: var(--tc); text-align: center; }
.ar-badge { width: 100%; max-height: clamp(66px, 12vh, 140px); object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,.16)); }
.ar-main { min-width: 0; }
.ar-topline { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ar-name { font-family: var(--display); font-size: clamp(1.1rem, 2.4vw, 2.2rem); color: var(--tc); white-space: nowrap; }
.ar-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(.7rem, 1.1vw, 1rem); font-weight: 900; color: #3a4d78; }
.ar-track { position: relative; height: clamp(24px, 3.4vw, 52px); margin-top: clamp(26px, 4.2vw, 62px); border-radius: 999px; background: rgba(5,37,116,.09); box-shadow: inset 0 3px 6px rgba(5,37,116,.12); }
.ar-fill { position: relative; overflow: hidden; height: 100%; width: 12%; border-radius: 999px; background: linear-gradient(90deg, var(--tc), var(--tl)); box-shadow: 0 4px 10px rgba(0,0,0,.15); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.ar-fill::after { content: ""; position: absolute; inset: 0 0 0 -32px; background: repeating-linear-gradient(115deg, rgba(255,255,255,.32) 0 14px, transparent 14px 28px); animation: ar-stripes 1s linear infinite; }
@keyframes ar-stripes { to { transform: translateX(30.9px); } }
.ar-flag { position: absolute; right: -4px; top: 50%; transform: translateY(-50%); font-size: clamp(1.1rem, 2.2vw, 2rem); }
.ar-runners { position: absolute; bottom: calc(100% - 12px); left: 12%; display: flex; align-items: flex-end; transform: translateX(-72%); transition: left 1s cubic-bezier(.2,.8,.2,1); pointer-events: none; z-index: 2; }
.ar-runner { width: clamp(44px, 6vw, 92px); height: auto; margin-left: -14px; transform-origin: bottom center; filter: drop-shadow(0 6px 5px rgba(0,0,0,.22)); animation: ar-run 1.1s ease-in-out infinite; }
.ar-runner:nth-child(2) { animation-delay: -.35s; }
.ar-runner:nth-child(3) { animation-delay: -.7s; }
@keyframes ar-run { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7%) rotate(2deg); } }
.ar-runners.cheer .ar-runner { animation: ar-jump .8s ease-out; }
@keyframes ar-jump { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-42%) scale(1.15) rotate(-6deg); } 65% { transform: translateY(-10%) scale(1.06) rotate(5deg); } 100% { transform: translateY(0) scale(1); } }
.ar-score { min-width: 3.4ch; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5.4vw, 5rem); line-height: 1; color: var(--tc); text-align: right; text-shadow: 0 3px 0 rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }
.ar-lane.gain { animation: ar-glow .95s ease-out; }
.ar-lane.gain .ar-badge { animation: ar-badge-pop .7s ease-out; }
.ar-lane.gain .ar-score { animation: cc-score-pop .6s ease-out; }
@keyframes ar-glow { 0% { box-shadow: 0 0 0 0 transparent, 0 10px 26px rgba(0,53,110,.13); } 30% { box-shadow: 0 0 46px 10px var(--tc), 0 10px 26px rgba(0,53,110,.13); } 100% { box-shadow: 0 0 0 0 transparent, 0 10px 26px rgba(0,53,110,.13); } }
@keyframes ar-badge-pop { 0% { transform: scale(1); } 35% { transform: scale(1.22) rotate(-5deg); } 100% { transform: scale(1); } }
.ar-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 4; }
.ar-plus { position: absolute; bottom: 100%; transform: translate(-50%, 0); font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 3.2vw, 3.2rem); color: var(--tc); text-shadow: 0 3px 0 #fff, 0 0 14px #fff; white-space: nowrap; animation: ar-plus 1.4s ease-out forwards; }
@keyframes ar-plus { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -8px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -70px) scale(1); } }


.arena-foot { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.arena-leader, .arena-controls { padding: 12px 18px; border-radius: 22px; background: rgba(255,255,255,.95); box-shadow: 0 10px 26px rgba(0,53,110,.12); }
.arena-leader h3 { margin-bottom: 8px; font-size: 1.05rem; }
.arena-leader ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: lb; }
.arena-leader li { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 12px; background: var(--paper); border-left: 5px solid var(--tc); font-weight: 900; font-size: .85rem; counter-increment: lb; }
.arena-leader li::before { content: counter(lb); color: #93a6c9; }
.arena-leader li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arena-leader li em { font-style: normal; }
.arena-controls { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.arena-note { margin: 0; font-size: .74rem; font-weight: 800; color: #5a6c95; text-align: center; }

/* ---------- results: podium, MVP, celebration ---------- */
.cc-results { position: relative; overflow: hidden; }
.cc-results > *:not(.cc-confetti) { position: relative; z-index: 1; }
.cc-results h3 { margin: 16px 0 8px; font-size: 1.1rem; }
.cc-confetti { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.cc-confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; opacity: .85; animation: cc-fall linear infinite; will-change: transform; }
@keyframes cc-fall { to { transform: translate3d(var(--sx), 110vh, 0) rotate(720deg); } }
.cc-res-head { text-align: center; padding: 14px; margin: -4px -4px 4px; border-radius: 20px; background: linear-gradient(120deg, rgba(5,37,116,.9), rgba(3,26,86,.84)), url("assets/ui/bg-arena.webp") center / cover; color: #fff; }
.cc-res-head .cc-kicker { color: var(--yellow); }
.cc-res-win-badge { width: clamp(64px, 6vw, 92px); margin: 2px auto; filter: drop-shadow(0 10px 16px rgba(0,0,0,.35)); animation: cc-badge-in 1s cubic-bezier(.2,.9,.3,1.2) both, cc-pulse 2.4s 1s ease-in-out infinite; }
.cc-res-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); animation: cc-pop .5s ease both; }
.cc-res-cheer { margin: 6px 0 0; font-weight: 900; font-size: clamp(.85rem, 1.6vw, 1.2rem); color: #dbe7ff; }

.cc-podium { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: clamp(6px, 1.2vw, 16px); padding-top: 26px; }
.cc-pod { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.cc-pod-top { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 6px; animation: cc-rise .6s var(--d) ease both; }
.cc-pod-crown { position: absolute; top: -30px; font-size: clamp(1.4rem, 3vw, 2.6rem); animation: cc-pulse 1.4s ease-in-out infinite; }
.cc-pod-mascots { display: flex; justify-content: center; margin-bottom: -8px; z-index: 1; }
.cc-pod-mascots img { width: clamp(28px, 4.6vw, 70px); margin-left: -8px; animation: ar-run 1.2s ease-in-out infinite; }
.cc-pod-mascots img:nth-child(2) { animation-delay: -.4s; }
.cc-pod-mascots img:nth-child(3) { animation-delay: -.8s; }
.cc-pod-badge { width: clamp(46px, 8vw, 130px); filter: drop-shadow(0 6px 8px rgba(0,0,0,.18)); }
.cc-pod.is-first .cc-pod-badge { animation: cc-pulse 1.8s ease-in-out infinite; }
.cc-pod-name { font-family: var(--display); font-weight: 800; font-size: clamp(.8rem, 1.8vw, 1.6rem); color: var(--tc); }
.cc-pod-msg { font-size: clamp(.56rem, 1vw, .9rem); font-weight: 900; color: #3a4d78; line-height: 1.2; min-height: 2.4em; }
.cc-pod-block { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 4px 10px; width: 100%; height: calc(var(--k) * clamp(96px, 12.5vh, 170px)); padding: 8px 4px 0; border-radius: 16px 16px 0 0; background: linear-gradient(180deg, var(--tc) 0%, var(--tc) 60%, var(--tl) 150%); box-shadow: inset 0 4px 0 rgba(255,255,255,.35); transform-origin: bottom; animation: cc-grow .8s var(--d) cubic-bezier(.2,.9,.3,1.15) both; overflow: hidden; }
.cc-pod-medal { font-size: clamp(1.2rem, 2.6vw, 2.4rem); }
.cc-pod-block strong { font-family: var(--display); font-size: clamp(.95rem, 2.2vw, 2.2rem); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
@keyframes cc-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.cc-mvp { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 8px; border-radius: 22px; background: linear-gradient(120deg, #fff3b0, #ffd6e4); border: 3px solid var(--yellow); animation: cc-pop .5s .5s ease both; }
.cc-mvp-av { position: relative; flex: 0 0 auto; }
.cc-mvp-av::before { content: "👑"; position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 1.6rem; animation: cc-pulse 1.4s ease-in-out infinite; }
.cc-mvp-img { width: clamp(64px, 9vw, 120px); height: auto; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.2)); }
.cc-mvp-info { display: flex; flex-direction: column; min-width: 0; }
.cc-mvp-info small { font-weight: 900; letter-spacing: .12em; color: var(--pink-deep); }
.cc-mvp-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-size: clamp(1.3rem, 3vw, 2.4rem); line-height: 1.1; }
.cc-mvp-info span { font-weight: 900; font-size: .85rem; color: #3a4d78; }
.cc-res-top { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cc-res-top li { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 14px; background: var(--paper); border-left: 5px solid var(--tc); font-weight: 900; }
.cc-res-top li em { width: 16px; font-style: normal; color: #93a6c9; }
.cc-res-top li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-res-top li b { font-family: var(--display); font-size: 1.15rem; }
.cc-res-highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.cc-hl { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 18px; background: linear-gradient(160deg, var(--card-yellow), #fff); text-align: center; }
.cc-hl > span { font-size: 1.6rem; }
.cc-hl small { font-size: .62rem; font-weight: 900; letter-spacing: .06em; color: #5a6c95; }
.cc-hl b { font-family: var(--display); font-size: 1.6rem; line-height: 1.1; }
.cc-hl em { font-style: normal; font-size: .76rem; font-weight: 800; }
.cc-res-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.cc-res-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-top: 12px; }
.cc-res-me { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 14px; border-radius: 20px; background: var(--ts); border-left: 7px solid var(--tc); }
.cc-res-me-av .cc-av { animation: cc-av-yay .9s ease-out both; }
.cc-res-me div { display: flex; flex-direction: column; }
.cc-res-me b { font-family: var(--display); font-size: 1.3rem; }
.cc-res-me span { font-weight: 900; font-size: .85rem; }
.cc-res-me em { margin-top: 2px; font-style: normal; font-weight: 800; font-size: .8rem; color: #3a4d78; }
.cc-res-mystats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.cc-res-mystats div { padding: 8px 4px; border-radius: 14px; background: var(--paper); text-align: center; }
.cc-res-mystats small { display: block; font-size: .56rem; font-weight: 900; color: #5a6c95; }
.cc-res-mystats b { font-family: var(--display); font-size: 1.2rem; }

@media (max-width: 760px) {
  .cc-reveal-cols { grid-template-columns: 1fr 1fr; }
  .arena-head { grid-template-columns: 1fr auto; }
  .arena-meta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
  .ar-lane { grid-template-columns: auto 64px minmax(0, 1fr); }
  .ar-score { grid-column: 3; grid-row: 1; justify-self: end; font-size: 1.8rem; margin-bottom: -6px; }
  .ar-main { grid-column: 2 / -1; grid-row: 1; }
  .ar-rank { grid-row: 1; }
  .ar-badge { display: none; }
  .arena-foot, .cc-res-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .cc-pod-block { flex-direction: column; align-items: center; flex-wrap: nowrap; gap: 2px; height: calc(var(--k) * 150px); }
}
@media (max-width: 420px) {
  .cc-options--grid { grid-template-columns: 1fr; }
  .cc-time-row { flex-direction: column; }
  .cc-res-highlights { grid-template-columns: 1fr; }
  .cc-res-mystats { grid-template-columns: 1fr 1fr; }
  .cc-pod-msg { display: none; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .cc-stage { min-height: 0; }
  .cc-reveal-badge img { width: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-confetti, .fx-p { display: none; }
}
