/* Encore v7 — the play HUD after docs/redesign/newdesign.png (docs/22): arcade lettering (Exo 2, forward-slanted), the
   header with the app mark, the scoring strip under the video with no box around it, ×COMBO beside the highway, the
   ranked panel opposite it, and the stream that carries an expression into the score. The background, lanes, notes,
   pads and judging are untouched. Reference frame 390 × 844. */
:root { --hud-gold: #ffcf5a; --hud-coral: #ff6a4d; --hud-ice: #bff0ff; --hud-violet: #d9a5ff; --hud-mint: #6ff5e0; --hud-cyan: #7ff3ff; }
.on-play .app { font-family: 'Exo 2', 'Inter', system-ui, sans-serif; }

/* ---------- header: app mark · title and artist · pause ---------- */
.play-head { padding: 6px 14px 0 16px; gap: 8px; }
.ph-left { gap: 12px; }
.ph-logo { flex: none; width: 34px; height: 24px; display: block; color: var(--hud-mint); filter: drop-shadow(0 0 6px rgba(111,245,224,.55)); }
.ph-logo svg { width: 100%; height: 100%; display: block; }
.ph-div { flex: none; width: 1px; height: 34px; background: rgba(255,255,255,.28); }
.ph-title { font-family: 'Exo 2', sans-serif; font-weight: 900; font-style: italic; font-size: 24px; line-height: 1.05; letter-spacing: 0; color: transparent; background: linear-gradient(180deg, #fff6d0 0%, #ffd66a 42%, #ff8e56 78%, #ff6a4d 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 1.5px 0 rgba(90,22,14,.85)) drop-shadow(0 0 8px rgba(255,150,80,.28)); text-shadow: none; padding-right: 4px; }
.ph-artist { font-family: 'Exo 2', sans-serif; font-weight: 700; font-style: italic; font-size: 10.5px; letter-spacing: .24em; color: #c9a3ff; margin-top: 2px; text-shadow: 0 0 8px rgba(190,120,255,.35); }
.ph-right { gap: 8px; }
.pause-btn { width: 44px; height: 44px; border: 1.5px solid rgba(255,255,255,.72); background: rgba(10,8,18,.35); box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.pause-btn svg { width: 16px; height: 16px; }
.on-play .pause-btn { background: rgba(10,8,18,.35); }

/* ---------- the scoring strip under the video: progress · score / accuracy / difficulty and section dots · groove ---------- */
.hud-strip { position: relative; z-index: 2; margin: 6px 16px 0; }
.hs-progress { display: flex; align-items: center; gap: 10px; }
.hs-track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); box-shadow: inset 0 1px 1px rgba(0,0,0,.5); overflow: hidden; }
.hs-fill { height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, #8ec9ff, #e6f4ff); box-shadow: 0 0 8px rgba(160,210,255,.7); transition: width .25s linear; }
.hs-time { flex: none; font-family: 'Exo 2', sans-serif; font-weight: 700; font-style: italic; font-size: 11px; letter-spacing: .04em; color: #dfe8ff; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.hs-stats { display: grid; grid-template-columns: auto 1px auto minmax(0, 1fr); align-items: center; column-gap: 14px; margin-top: 7px; }
.hs-cell { min-width: 0; }
.hs-cell.right { justify-self: end; text-align: right; }
.hs-sep { width: 1px; height: 34px; background: rgba(255,255,255,.22); }
.hs-label { font-family: 'Exo 2', sans-serif; font-weight: 800; font-style: italic; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.hs-label.violet { color: var(--hud-violet); text-shadow: 0 0 8px rgba(190,120,255,.45); }
.hs-label.ice { color: var(--hud-ice); text-shadow: 0 0 8px rgba(120,210,255,.45); }
.hs-label.mint { color: var(--hud-mint); text-shadow: 0 0 8px rgba(111,245,224,.45); }
.hs-num { position: relative; display: inline-block; font-family: 'Exo 2', sans-serif; font-weight: 900; font-style: italic; font-size: 23px; line-height: 1; letter-spacing: -.01em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hs-num.gold #hud-score-num { display: inline-block; transform-origin: 20% 60%; color: transparent; background: linear-gradient(180deg, #fff6c4 0%, #ffd25c 40%, #ff8a4a 76%, #ff5c5c 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 1.5px 0 #5c1a12) drop-shadow(0 0 7px rgba(255,140,70,.35)); padding-right: 3px; }
.hs-ring { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; border: 2px solid rgba(255,214,110,.9); box-shadow: 0 0 12px rgba(255,180,80,.7), inset 0 0 10px rgba(255,200,100,.35); pointer-events: none; }
.hs-num.ice { color: var(--hud-ice); text-shadow: 0 0 10px rgba(110,210,255,.6), 0 1px 0 #143a66, 0 2px 4px rgba(0,0,0,.5); padding-right: 2px; }
.hs-tier { font-family: 'Exo 2', sans-serif; font-weight: 900; font-style: italic; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; color: var(--hud-violet); text-shadow: 0 0 10px rgba(180,110,255,.55), 0 1px 0 #3a1560; line-height: 1; padding-right: 2px; }
.hud-strip .cells { --n: 7; --gap: 5px; display: flex; justify-content: flex-end; gap: var(--gap); margin-top: 7px; max-width: 140px; }
.hud-strip .cells.many { --gap: 3px; }
.hud-strip .cells i { flex: none; width: clamp(4px, calc((140px - (var(--n) - 1) * var(--gap)) / var(--n)), 8px); height: clamp(4px, calc((140px - (var(--n) - 1) * var(--gap)) / var(--n)), 8px); border-radius: 50%; background: rgba(255,255,255,.16); box-shadow: inset 0 1px 1px rgba(0,0,0,.5); transition: background .2s, box-shadow .2s, transform .2s; }
.hud-strip .cells i.done, .hud-strip .cells i.clean { background: #c48cff; box-shadow: 0 0 6px rgba(196,140,255,.6); }
.hud-strip .cells i.slip { background: var(--hud-coral); box-shadow: 0 0 6px rgba(255,106,77,.6); }
.hud-strip .cells i.now { background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.9); transform: scale(1.25); }
.hs-groove { display: flex; align-items: center; gap: 12px; margin-top: 7px; }
.hs-groove .hpbar { flex: 1; height: 5px; margin: 0; border-radius: 3px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px 2px rgba(0,0,0,.6); overflow: hidden; }
.hs-groove .hpbar div { height: 100%; width: 100%; border-radius: 3px; -webkit-mask: none; mask: none; background: linear-gradient(90deg, #2fd6cf, #8cf7e9); box-shadow: 0 0 10px rgba(111,245,224,.6); transition: width .25s ease-out; }
.hs-groove .hpbar div.low { background: linear-gradient(90deg, #ff6b6b, #ffb84d); box-shadow: 0 0 8px rgba(255,107,107,.5); }
#play .playfield { margin-top: 6px; }

/* ---------- ×COMBO beside the highway ---------- */
.combo-block { position: absolute; left: 14px; top: 4px; z-index: 3; width: 118px; pointer-events: none; transform-origin: 0 50%; transition: opacity .25s; }
.combo-block.idle { opacity: .42; }
.cb-word { font-family: 'Exo 2', sans-serif; font-weight: 800; font-style: italic; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--hud-ice); text-shadow: 0 0 8px rgba(120,210,255,.55), 0 1px 2px rgba(0,0,0,.6); min-height: 15px; line-height: 15px; opacity: 0; transform-origin: 0 100%; will-change: transform, opacity; }
.cb-word.show { opacity: 1; }
.calm .cb-word { transition: opacity .28s; }
.cb-word.good { color: #fff; text-shadow: 0 0 8px rgba(255,255,255,.4), 0 1px 2px rgba(0,0,0,.6); }
.cb-word.ok { color: #c9d3e6; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.cb-word.miss { color: var(--hud-coral); text-shadow: 0 0 8px rgba(255,106,77,.55), 0 1px 2px rgba(0,0,0,.6); }
.cb-num-wrap { position: relative; display: inline-block; transform-origin: 18% 60%; will-change: transform; margin-top: -2px; }
.cb-num { position: relative; z-index: 1; font-family: 'Exo 2', sans-serif; font-weight: 900; font-style: italic; font-size: 46px; line-height: 1; letter-spacing: -.02em; color: transparent; background: linear-gradient(180deg, #fff6c4 0%, #ffd25c 38%, #ff8a4a 74%, #ff5c5c 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 0 #5c1a12) drop-shadow(0 0 10px rgba(255,140,70,.4)); padding-right: 6px; font-variant-numeric: tabular-nums; }
.cb-streaks { position: absolute; left: 62%; top: 72%; width: 44px; height: 14px; opacity: .55; transform-origin: 0 50%; pointer-events: none; background: linear-gradient(90deg, rgba(255,120,80,.95), rgba(255,120,80,0)) 0 0 / 100% 3px no-repeat, linear-gradient(90deg, rgba(255,90,90,.85), rgba(255,90,90,0)) 6px 7px / 80% 2px no-repeat; transform: skewX(-30deg); filter: drop-shadow(0 0 4px rgba(255,120,80,.6)); }
.cb-num.wide { font-size: 40px; }
.cb-label { font-family: 'Exo 2', sans-serif; font-weight: 800; font-style: italic; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--hud-violet); text-shadow: 0 0 8px rgba(190,120,255,.5), 0 1px 2px rgba(0,0,0,.6); margin-top: 2px; }
.cb-streak { position: relative; margin-top: 4px; width: max-content; }
.cb-plabel { display: flex; align-items: baseline; gap: 4px; line-height: 1; transform-origin: 0 100%; will-change: transform; }
.cb-plabel b { font-family: 'Exo 2', sans-serif; font-weight: 900; font-style: italic; font-size: 16px; line-height: 1; color: transparent; background: linear-gradient(180deg, #ffffff 0%, #c8f2ff 45%, #5cc4ff 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 1px 0 #143a66) drop-shadow(0 0 6px rgba(120,210,255,.85)); padding-right: 2px; }
.cb-plabel span { font-family: 'Exo 2', sans-serif; font-weight: 800; font-style: italic; font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: #a9dff5; text-shadow: 0 0 6px rgba(120,210,255,.45), 0 1px 2px rgba(0,0,0,.6); }
.combo-block.streak-full .cb-plabel b { background: #fff; -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 8px #fff); }
.cb-pips { position: relative; display: flex; gap: 3px; margin-top: 3px; transform-origin: 0 50%; will-change: transform; }
.cb-pips i { width: 8px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.16); transition: background .15s, box-shadow .15s; transform-origin: 50% 50%; }
.cb-pips i.on { background: var(--hud-ice); box-shadow: 0 0 5px rgba(120,210,255,.75); }
.combo-block.streak-full .cb-pips i { background: #fff; box-shadow: 0 0 8px rgba(255,255,255,1), 0 0 16px rgba(191,240,255,.8); }
.cb-flash { position: absolute; left: -10px; right: -10px; top: -8px; bottom: -8px; border-radius: 12px; opacity: 0; pointer-events: none; transform-origin: 0 50%; background: radial-gradient(ellipse at 45% 50%, #fff, rgba(191,240,255,.75) 42%, rgba(120,210,255,.25) 65%, rgba(120,210,255,0) 80%); filter: blur(2.5px); }
.cb-spark { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #bff0ff, 0 0 10px rgba(191,240,255,.7); pointer-events: none; }
.combo-block.streak-lost .cb-pips i { background: rgba(255,120,80,.45); box-shadow: none; }
.combo-block.idle .cb-pips { opacity: .6; }
.combo-block.broke .cb-num { background: linear-gradient(180deg, #ffd9d2 0%, #ff8a7a 50%, #c93a3a 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 0 #4a0c0c) drop-shadow(0 0 10px rgba(255,80,80,.5)); }
.combo-block.milestone .cb-num { filter: drop-shadow(0 2px 0 #5c1a12) drop-shadow(0 0 16px rgba(255,190,90,.85)); }

/* ---------- the ranked panel opposite ---------- */
.ranked { position: absolute; right: 6px; top: 0; z-index: 3; width: 102px; pointer-events: none; }
.ranked[hidden] { display: none; }
.rk-head { display: flex; align-items: center; gap: 6px; padding: 0 2px 4px; font-family: 'Exo 2', sans-serif; font-weight: 900; font-style: italic; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--hud-violet); text-shadow: 0 0 8px rgba(180,110,255,.55), 0 1px 2px rgba(0,0,0,.6); }
.rk-live { width: 8px; height: 8px; border-radius: 50%; background: var(--hud-mint); box-shadow: 0 0 8px rgba(111,245,224,.9); animation: rk-pulse 1.6s ease-in-out infinite; }
@keyframes rk-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.8); } }
.ranked[data-mode=records] .rk-live, .ranked[data-mode=records] .rk-combo { display: none; }
.ranked[data-mode=records] .rk-head { font-size: 11px; letter-spacing: .03em; white-space: nowrap; }
.rk-self { margin-top: 4px; padding: 4px 4px 0; border-top: 1px dashed rgba(255,255,255,.28); font-family: 'Exo 2', sans-serif; font-weight: 800; font-style: italic; font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: #a9dff5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.rk-self[hidden] { display: none; }
.rk-self.you { color: var(--hud-cyan); text-shadow: 0 0 8px rgba(127,243,255,.6), 0 1px 2px rgba(0,0,0,.6); }
.rk-self.dim { color: #9aa3ba; text-transform: none; font-weight: 700; letter-spacing: .02em; }
.rk-toast { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; text-align: center; font-family: 'Exo 2', sans-serif; font-weight: 900; font-style: italic; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--hud-cyan); text-shadow: 0 0 10px rgba(127,243,255,.8), 0 1px 2px rgba(0,0,0,.7); opacity: 0; pointer-events: none; }
.rk-toast.show { animation: rk-toast 1.3s ease-out forwards; }
@keyframes rk-toast { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 12% { opacity: 1; transform: translateY(0) scale(1.08); } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
.rk-sim { margin-left: auto; font-style: normal; font-weight: 800; font-size: 8px; letter-spacing: .12em; color: #ffb29e; border: 1px solid rgba(255,140,110,.7); border-radius: 3px; padding: 1px 3px; line-height: 1; text-shadow: none; }
.rk-sim[hidden] { display: none; }
.rk-rows { position: relative; transition: height .4s ease; }
.rk-row { position: absolute; left: 0; right: 0; top: 0; height: 26px; display: flex; align-items: center; gap: 5px; padding: 0 2px 0 4px; border-radius: 6px; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s; will-change: transform; }
.rk-row.in { opacity: 0; } .rk-row.out { opacity: 0 !important; }
.rk-row.you { background: linear-gradient(90deg, rgba(60,200,230,.16), rgba(60,200,230,0)); }
.rk-row.you::before { content: ''; position: absolute; left: -3px; top: 5px; bottom: 5px; width: 2px; border-radius: 1px; background: var(--hud-cyan); box-shadow: 0 0 6px rgba(127,243,255,.9); }
.rk-row.pin { border-top: 1px dashed rgba(255,255,255,.28); }
.rk-rank { flex: none; width: 9px; font-family: 'Exo 2', sans-serif; font-weight: 900; font-style: italic; font-size: 11px; color: #bda7e0; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.rk-av { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-family: 'Exo 2', sans-serif; font-style: normal; font-weight: 800; font-size: 9px; color: #fff; background: radial-gradient(circle at 35% 30%, hsl(var(--h) 90% 78%), hsl(var(--h) 70% 42%) 70%); box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 1px 3px rgba(0,0,0,.6); text-shadow: 0 1px 1px rgba(0,0,0,.5); }
.rk-body { min-width: 0; flex: 1; line-height: 1.05; }
.rk-name { font-family: 'Exo 2', sans-serif; font-weight: 800; font-style: italic; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #e6dbff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.rk-line { display: flex; align-items: baseline; gap: 4px; }
.rk-score { font-family: 'Exo 2', sans-serif; font-weight: 800; font-style: italic; font-size: 10.5px; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.rk-combo { font-family: 'Exo 2', sans-serif; font-weight: 700; font-style: italic; font-size: 9px; color: #c9a3ff; font-variant-numeric: tabular-nums; }
.rk-row.leader .rk-rank, .rk-row.leader .rk-name { color: var(--hud-gold); text-shadow: 0 0 8px rgba(255,207,90,.55), 0 1px 2px rgba(0,0,0,.6); }
.rk-row.you .rk-rank, .rk-row.you .rk-name { color: var(--hud-cyan); text-shadow: 0 0 8px rgba(127,243,255,.6), 0 1px 2px rgba(0,0,0,.6); }
.rk-row.stale { opacity: .45; }
.rk-row.gone .rk-name::after { content: ' ·'; color: #ff9a86; }
.rk-row.over { animation: rk-over .7s ease-out; }
@keyframes rk-over { 0% { background: rgba(127,243,255,.45); transform: translateY(var(--y, 0)) scale(1.06); } 100% { background: rgba(60,200,230,.16); } }
.ranked.calm .rk-row { transition: none; }

/* ---------- results: achievements ---------- */
.r-ach { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 16px 0; }
.r-ach:empty { display: none; }
.r-badge { font-family: 'Exo 2', sans-serif; font-weight: 800; font-style: italic; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(255,255,255,.22); color: #dfe8ff; background: rgba(255,255,255,.06); }
.r-badge.gold { color: #ffd76a; border-color: rgba(255,207,90,.7); box-shadow: 0 0 10px rgba(255,190,80,.35); }
.r-badge.mint { color: var(--hud-mint); border-color: rgba(111,245,224,.7); box-shadow: 0 0 10px rgba(111,245,224,.3); }

/* ---------- the stream into the score ---------- */
.stream { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 7; pointer-events: none; }   /* a canvas keeps its intrinsic size unless told: inset alone leaves it 0 x 0 */
.on-play.calm .cb-streaks { display: none; }

/* ---------- small phones ---------- */
@media (max-width: 370px) {
  .ph-title { font-size: 21px; } .hs-num { font-size: 21px; } .hs-tier { font-size: 14px; }
  .combo-block { width: 104px; } .cb-num { font-size: 40px; } .ranked { width: 96px; } .rk-name { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) { .hs-star, .rk-live { animation: none; } .rk-row { transition: none; } .cb-streaks { display: none; } }
