/* ==========================================================================
   In-round chrome: HUD, intro card, countdown, time's up. Game area is
   1600x810 starting at y=90.
   ========================================================================== */
.game-area { position: absolute; left: 0; top: 90px; width: 1600px; height: 810px; overflow: hidden; }
.hud-layer { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.game-area::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 50; opacity: 0; transition: opacity .4s;
  box-shadow: inset 0 0 0 6px rgba(255,75,62,.7), inset 0 0 160px 30px rgba(255,30,30,.5); }
.game-area.danger::after { opacity: 1; animation: danger-pulse 1s ease-in-out infinite; }
@keyframes danger-pulse { 50% { opacity: .35; } }
.hud { position: absolute; left: 0; top: 0; width: 1600px; height: 90px; display: flex; align-items: center; padding: 0 22px; gap: 16px;
  background: radial-gradient(60% 140% at 50% 0%, rgba(255,255,255,.07), rgba(255,255,255,0) 70%), linear-gradient(180deg, #2b1f42 0%, #1b1229 58%, #130c1e 100%);
  border-bottom: 2px solid #0a0612; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 24px rgba(8,4,16,.55); }
/* the act's colour as a lit edge, fading out at both ends */
.hud::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gc) 18%, var(--gc) 82%, transparent); box-shadow: 0 0 14px var(--gc); opacity: .9; }
.hud-round { width: 230px; flex: none; }
.hud-round-n { font-weight: 800; font-size: 13px; letter-spacing: .2em; opacity: .7; }
.hud-round-t { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--gc); white-space: nowrap; text-shadow: 0 2px 0 rgba(8,4,16,.8), 0 0 18px color-mix(in oklab, var(--gc) 40%, transparent); }
.hud-chips { display: flex; gap: 6px; width: 470px; flex: none; overflow: hidden; }
.hud-chip { position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; min-width: 0; flex: 1 1 0; max-width: 150px;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.03)); border: 1px solid rgba(8,4,16,.8); border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 -2px 4px rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.3); transition: order .3s; }
.hud-chip.me { background: linear-gradient(180deg, rgba(215,255,60,.22), rgba(215,255,60,.07)); box-shadow: inset 0 1px 0 rgba(240,255,180,.35), 0 0 0 1.5px rgba(215,255,60,.75), 0 2px 6px rgba(0,0,0,.35); }
.hud-chip.lead { box-shadow: 0 0 0 2px var(--gold); }
.hud-chip.done { opacity: .65; }
.hud-chip.tick { animation: chip-tick .3s; }
@keyframes chip-tick { 40% { transform: translateY(-3px); } }
.hud-chip .av svg { display: block; }
.chip-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.chip-name { font-size: 11px; font-weight: 700; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-score { font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.chip-rank { position: absolute; right: 6px; top: -7px; font-size: 11px; font-weight: 800; color: var(--gold); text-shadow: 0 1px 0 var(--ink); }
.hud-chips.compact .chip-name { display: none; }
.hud-chips.compact .hud-chip { padding-right: 6px; }
/* the clock is a physical dial: brushed-metal bezel, glass face, reflection */
.hud-clock { position: absolute; left: 50%; top: 4px; width: 130px; height: 130px; margin-left: -65px; border-radius: 50%; z-index: 3;
  background: conic-gradient(from 210deg, #f3f0f8, #8f88a3 18%, #d9d5e3 32%, #5d5672 50%, #cbc6d8 66%, #7a7390 82%, #f3f0f8);
  padding: 6px; box-shadow: 0 0 0 2px #0a0612, 0 10px 22px rgba(8,4,16,.6), 0 3px 0 #0a0612; }
.hud-clock::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 40% 32%, #3a2a58 0%, #1b1229 62%, #0e0818 100%);
  box-shadow: inset 0 4px 10px rgba(0,0,0,.7), inset 0 -2px 0 rgba(255,255,255,.06); }
.hud-clock::after { content: ""; position: absolute; left: 22px; top: 14px; width: 70px; height: 34px; border-radius: 50%; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0)); transform: rotate(-18deg); }
.hud-clock svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.hud-clock .bar { filter: drop-shadow(0 0 5px var(--gc)); }
.hud-clock .track { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 10; }
.hud-clock .bar { fill: none; stroke: var(--gc); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.hud-clock .num { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; font-family: var(--font-display); font-size: 56px; color: #fff6e2;
  text-shadow: 0 2px 0 #0a0612, 0 0 16px rgba(255,243,220,.25); font-variant-numeric: tabular-nums; }
.hud-clock.low .bar { stroke: var(--red); }
.hud-clock.low .num { color: var(--red); }
.hud-clock.pulse { animation: clock-pulse .45s var(--ease-pop); }
@keyframes clock-pulse { 30% { transform: scale(1.14); } }
.hud-combo { margin-left: auto; margin-right: 0; width: 270px; flex: none; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.combo-mult { grid-row: span 2; font-family: var(--font-display); font-size: 40px; color: var(--cream); min-width: 82px; text-align: center; text-shadow: 0 2px 0 #0a0612, 0 3px 6px rgba(0,0,0,.5); }
.combo-streak { font-size: 13px; font-weight: 700; opacity: .8; } .combo-streak b { font-size: 18px; }
.combo-bar { height: 10px; border-radius: 6px; overflow: hidden; background: rgba(0,0,0,.45); box-shadow: inset 0 1px 3px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.08); }
.combo-bar i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width .12s;
  background: linear-gradient(180deg, color-mix(in oklab, var(--gc) 70%, white), var(--gc) 55%, color-mix(in oklab, var(--gc) 75%, black)); box-shadow: 0 0 10px var(--gc); }
.hud-combo[data-tier="1"] .combo-mult { color: var(--volt); }
.hud-combo[data-tier="2"] .combo-mult { color: var(--tang); animation: flame .5s ease-in-out infinite alternate; }
.hud-combo[data-tier="3"] .combo-mult { color: var(--hot); animation: flame .35s ease-in-out infinite alternate; }
.hud-combo[data-tier="4"] .combo-mult, .hud-combo[data-tier="5"] .combo-mult { color: var(--sky); animation: flame .25s ease-in-out infinite alternate; text-shadow: 0 0 18px var(--sky); }
@keyframes flame { from { transform: rotate(-4deg) scale(1); } to { transform: rotate(4deg) scale(1.08); } }
.hud-combo.broke { animation: wobble .4s; }
.hud-combo.broke .combo-mult { color: var(--red) !important; }
.hud-score { width: 230px; flex: none; text-align: right; position: relative; }
.hud-score small { font-weight: 800; font-size: 12px; letter-spacing: .2em; opacity: .7; }
.hud-score-num { font-family: var(--font-display); font-size: 44px; line-height: .95; color: var(--volt); font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #9cc400, 0 2px 0 #7a9a00, 0 3px 0 #0a0612, 0 6px 10px rgba(0,0,0,.5), 0 0 22px rgba(215,255,60,.25); }
.hud-score-num.bump { animation: punch .25s var(--ease-pop); }
.hud-score-delta { position: absolute; right: 0; top: 76px; font-family: var(--font-display); font-size: 26px; color: var(--volt); opacity: 0; text-shadow: 0 2px 0 #0a0612, 0 3px 8px rgba(0,0,0,.6); }
.hud-score-delta.neg { color: var(--red); }
.hud-score-delta.show { animation: delta 1s var(--ease-out); }
@keyframes delta { 0% { opacity: 0; transform: translateY(-10px) scale(.6); } 20% { opacity: 1; transform: translateY(4px) scale(1.15); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(18px); } }
/* combo tier stamp: lands next to the combo meter, never over the play area */
.hud-tier { position: absolute; left: 1213px; top: 98px; transform: translateX(-50%) scale(0); font-family: var(--font-display); font-size: 40px; color: var(--volt); white-space: nowrap;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; opacity: 0; pointer-events: none;
  -webkit-text-stroke-width: 2px; text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 4px 0 var(--ink), 0 10px 14px rgba(8,4,16,.55); }
.hud-tier.show { animation: tier-stamp 1.3s var(--ease-out); }
.hud-tier[data-tier="2"] { color: var(--tang); } .hud-tier[data-tier="3"] { color: var(--hot); } .hud-tier[data-tier="4"], .hud-tier[data-tier="5"] { color: var(--sky); }
@keyframes tier-stamp { 0% { opacity: 0; transform: translateX(-50%) scale(3) rotate(-10deg); } 15% { opacity: 1; transform: translateX(-50%) scale(1) rotate(-4deg); }
  75% { opacity: 1; transform: translateX(-50%) scale(1.03) rotate(-4deg); } 100% { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(.9) rotate(-4deg); } }
.hud-toasts { position: absolute; right: 18px; top: 152px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hud-toast { padding: 10px 16px 12px; border: 2px solid var(--ink); border-radius: 12px; background: linear-gradient(180deg, #fffaf0, #f6e6c8); color: var(--ink); font-weight: 800; font-size: 18px;
  box-shadow: inset 0 1px 0 #fff, var(--shadow);
  animation: toast-in .3s var(--ease-pop); max-width: 520px; }
.hud-toast.bad { background: linear-gradient(180deg, #ff6a5e, #e2342a); color: #fff6ea; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.hud-toast.good { background: linear-gradient(180deg, #e8ff7a, #c3ec1f); }
.hud-toast.out { opacity: 0; transform: translateX(30px); transition: .3s; }

/* ---------- intro card ---------- */
.round-intro { position: absolute; inset: 0; z-index: 30; background: radial-gradient(80% 80% at 50% 45%, rgba(20,12,34,.62), rgba(8,4,16,.88)); backdrop-filter: blur(6px) saturate(.8); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  animation: fade-in .3s; transition: opacity .35s, transform .35s; }
.round-intro.out { opacity: 0; transform: scale(1.06); }
.ri-card { width: 1240px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 34px 40px; color: var(--gi); transform: rotate(-1deg); animation: modal-in .45s var(--ease-pop);
  background: var(--tex-noise) 0 0 / 180px, radial-gradient(90% 120% at 20% 0%, color-mix(in oklab, var(--gc) 70%, #fff4d6) 0%, var(--gc) 45%, color-mix(in oklab, var(--gc) 70%, #12082a) 100%) !important;
  background-blend-mode: soft-light, normal !important; }
.ri-round { font-weight: 800; letter-spacing: .25em; font-size: 15px; }
.ri-art svg { height: 150px; width: auto; margin: 10px 0; filter: drop-shadow(3px 10px 10px rgba(18,10,42,.35)); }
.ri-title { font-size: 84px !important; }
.ri-tag { font-size: 22px; font-weight: 700; margin: 8px 0 0; }
.ri-right { background: linear-gradient(180deg, rgba(255,250,240,.78), rgba(255,243,220,.62)); border: 2px solid var(--ink); border-radius: 16px; padding: 18px 24px; align-self: center;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.7), inset 0 -2px 0 rgba(0,0,0,.08), 0 8px 18px rgba(18,10,42,.25); }
.ri-right h3 { font-size: 28px; }
.ri-how { margin: 0; padding-left: 26px; font-size: 21px; font-weight: 600; line-height: 1.35; }
.ri-how li { margin: 6px 0; }
.ri-how li::marker { content: "\25B8  "; color: var(--ink); }
.ri-meta { display: flex; gap: 8px; margin-top: 16px; }
.intro-vs { display: flex; gap: 18px; }
.vs-p { display: flex; flex-direction: column; align-items: center; font-weight: 700; font-size: 15px; max-width: 110px; text-align: center; }
.vs-p.me span { color: var(--volt); }
.intro-count { height: 130px; font-family: var(--font-display); font-size: 140px; line-height: 1; color: var(--volt); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill;
  text-shadow: 0 3px 0 #9cc400, 0 6px 0 #6f8c00, 0 9px 0 var(--ink), 0 22px 26px rgba(8,4,16,.65); }
.intro-count.pop { animation: count-pop .9s var(--ease-out); }
@keyframes count-pop { 0% { transform: scale(2.6) rotate(-12deg); opacity: 0; } 25% { transform: scale(1) rotate(-3deg); opacity: 1; } 100% { transform: scale(.9) rotate(-3deg); opacity: .85; } }
.round-over, .round-wait { position: absolute; left: 50%; top: 50%; z-index: 35; transform: translate(-50%, -50%) rotate(-3deg); text-align: center; animation: modal-in .5s var(--ease-pop); pointer-events: none; }
.round-over b, .round-wait b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 150px; line-height: .9; color: var(--hot); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill;
  text-shadow: 0 3px 0 #c81e5b, 0 6px 0 #9f0063, 0 10px 0 var(--ink), 0 26px 30px rgba(8,4,16,.65); }
.round-over span, .round-wait span { display: inline-block; margin-top: 14px; padding: 8px 18px; background: var(--ink); color: var(--cream); border-radius: 10px; font-weight: 700; font-size: 22px; }
.round-wait { top: 24%; } .round-wait b { font-size: 90px; color: var(--volt); text-shadow: 0 3px 0 #9cc400, 0 6px 0 var(--ink), 0 18px 22px rgba(8,4,16,.6); }
.round-error { position: absolute; inset: 200px; display: grid; place-items: center; font-size: 30px; color: var(--red); }

/* ---------- shared typing text ---------- */
.tline { white-space: pre-wrap; word-break: break-word; }
.tline .ch { position: relative; transition: color .05s; }
.tline .ch.ok { color: var(--ok-c, #d7ff3c); }
.tline .ch.bad { color: var(--bad-c, #ff4b3e); background: rgba(255,75,62,.18); border-radius: 3px; text-decoration: underline wavy; text-decoration-thickness: 2px; }
.tline .ch.cur::before { content: ""; position: absolute; left: -1px; top: 8%; bottom: 8%; width: 3px; border-radius: 2px; background: var(--caret-c, #ff3d7f); animation: caret 1s steps(1) infinite; }
.tline .ch.miss { animation: miss .25s; color: var(--bad-c, #ff4b3e); }
@keyframes caret { 50% { opacity: 0; } }
@keyframes miss { 25% { transform: translateY(-4px) rotate(-6deg); } 75% { transform: translateY(2px) rotate(4deg); } }
