/* Boxing Rhythm: page-specific styles on top of ../arcade-common/pz.css */
body[data-tod="day"] { --accent: #e0312d; --accent2: #f08a00; --glow: rgba(224, 49, 45, .25); }
body[data-tod="night"] { --accent: #ff4d6d; --accent2: #7b6cff; }
.field > span em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; }
.col { display: grid; gap: 16px; min-width: 0; }
.menu-grid > * { min-width: 0; }
.hero-cv { width: 100%; aspect-ratio: 8 / 5; display: block; border-radius: 14px; margin: 12px 0 2px; background: var(--card2); border: 1px solid var(--line); touch-action: pan-y; }

/* mode picker + ladder */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.modes button { text-align: left; display: grid; gap: 2px; padding: 11px 13px; border-radius: 14px; border: 2px solid var(--line); background: var(--card2); min-height: 66px; align-content: center; }
.modes button b { font-size: .98rem; }
.modes button span { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.modes button[aria-checked="true"] { border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 6px 18px var(--glow); }
.modes button[aria-checked="true"] span { color: rgba(255, 255, 255, .92); }
#modeExtra { margin-top: 14px; }
.ladder { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ladder button { width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; text-align: left; padding: 8px 12px 8px 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--card2); min-height: 64px; }
.ladder button[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.ladder button[disabled] { opacity: .5; cursor: not-allowed; }
.ladder canvas { width: 52px; height: 52px; border-radius: 12px; background: var(--card); grid-row: span 2; }
.ladder b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ladder small { color: var(--muted); font-size: .75rem; line-height: 1.3; grid-column: 2; }
.ladder .tagr { grid-column: 3; grid-row: 1 / span 2; font-size: .72rem; font-weight: 800; color: var(--muted); text-align: right; white-space: nowrap; }
.ladder .boss b::after { content: " 👑"; }
.blurbbox { padding: 12px 14px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); font-size: .9rem; line-height: 1.5; color: var(--muted); }
.blurbbox b { color: var(--ink); }
.dailybox { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.dailybox canvas { width: 56px; height: 56px; border-radius: 12px; background: var(--card); grid-row: span 2; }

/* how, settings, leaderboard */
.how { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.how li { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; line-height: 1.45; }
.how .pi { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.1rem; font-weight: 800; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.setrow:last-child { border-bottom: 0; }
.setrow b { display: block; font-size: .95rem; } .setrow small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.setrow.col2 { display: grid; grid-template-columns: 1fr; }
.setrow input[type=range] { width: 100%; accent-color: var(--accent); min-height: 32px; }
.chip-sw { min-width: 64px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--card2); font-weight: 800; }
.chip-sw[aria-pressed="true"] { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; }
.lb { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.lb li { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--card2); font-size: .92rem; min-width: 0; }
.lb li.me { outline: 2px solid var(--accent); }
.lb .rk { font-weight: 800; color: var(--muted); text-align: center; }
.lb li:nth-child(-n+3) .rk { color: var(--accent); }
.lb .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb .md { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.lb b { font-variant-numeric: tabular-nums; }
#lbBody .hint { text-align: center; padding: 14px 4px; }
.chips button, .seg button { min-height: 44px; }
.btn.small { min-height: 44px; }

/* fight screen */
body[data-screen="play"] { overflow: hidden; position: fixed; inset: 0; width: 100%; overscroll-behavior: none; }
body[data-screen="play"] .top, body[data-screen="play"] main > #scMenu { display: none; }
.play { position: fixed; inset: 0; z-index: 20; margin: 0; background: #05081c; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.hud { position: absolute; left: 0; right: 0; top: 0; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left)); pointer-events: none; display: grid; gap: 6px; }
.hud > * { pointer-events: none; }
.hud1 { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.hudbtn { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 14, 40, .6); color: #fff; font-size: 1.1rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hudbtn[aria-pressed="false"] { opacity: .55; }
.bars { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; min-width: 0; }
.bar { position: relative; height: 22px; border-radius: 11px; background: rgba(10, 14, 40, .65); border: 2px solid rgba(255, 255, 255, .55); overflow: hidden; min-width: 0; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #36d27a, #b6ef56); transition: width .18s; }
.bar.opp i { left: auto; right: 0; background: linear-gradient(270deg, #ff4d6d, #ff9a3d); }
.bar.low i { background: linear-gradient(90deg, #ff2d55, #ff7a3d); }
.bar span { position: absolute; inset: 0; display: grid; align-items: center; padding: 0 8px; font-size: .68rem; font-weight: 800; color: #fff; text-shadow: 0 1px 3px #000, 0 0 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .03em; }
.bar.opp span { text-align: right; }
.hmid { text-align: center; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); line-height: 1.05; }
.hmid b { display: block; font-size: .95rem; font-weight: 900; } .hmid small { font-size: .72rem; font-weight: 700; opacity: .9; font-variant-numeric: tabular-nums; }
.hud2 { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: center; }
.score { color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .65); line-height: 1; }
.score small { display: block; font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; opacity: .85; }
.score b { font-size: clamp(1.25rem, 5.6vw, 1.75rem); font-weight: 900; font-variant-numeric: tabular-nums; }
.combo { padding: 2px 11px; border-radius: 999px; font-size: .8rem; font-weight: 900; color: #1a1030; background: linear-gradient(135deg, #ffd24a, #ff8a3d); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); white-space: nowrap; }
.combo.bump { animation: pulse .25s; }
@keyframes pulse { from { transform: scale(1.3); } }
.meter { position: relative; height: 16px; border-radius: 8px; background: rgba(10, 14, 40, .65); border: 2px solid rgba(255, 255, 255, .5); overflow: hidden; min-width: 60px; justify-self: end; width: min(100%, 220px); }
.meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #7b6cff, #ffd23f); transition: width .15s; }
.meter span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .56rem; font-weight: 900; letter-spacing: .12em; color: #fff; text-shadow: 0 1px 2px #000; }
.meter.full { border-color: #ffd23f; animation: glow .7s infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 14px #ffd23f; } }

/* controls */
.pads { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; padding: 6px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); gap: 10px; background: linear-gradient(0deg, rgba(5, 8, 28, .92), rgba(5, 8, 28, .55) 70%, transparent); touch-action: none; }
.padgrp { display: grid; gap: 8px; }
.padgrp.left { grid-template-columns: repeat(2, 62px); }
.padgrp.right { grid-template-columns: repeat(2, 62px); }
.pad { width: 62px; height: 62px; min-width: 56px; min-height: 56px; border-radius: 18px; border: 2px solid rgba(255, 255, 255, .55); color: #fff; display: grid; place-content: center; gap: 0; text-align: center; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .05s; }
.pad b { font-size: 1.45rem; line-height: 1; font-weight: 900; } .pad span { font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }
.pad:active, .pad.hit { transform: scale(.92); filter: brightness(1.3); }
.p-l, .p-r { background: linear-gradient(160deg, #1fb6ff, #2a62e8); } .p-d { background: linear-gradient(160deg, #36d27a, #1a9a55); } .p-b { background: linear-gradient(160deg, #9aa7c7, #5d6a8c); }
.p-j { background: linear-gradient(160deg, #ff7a8a, #e0314d); } .p-c { background: linear-gradient(160deg, #ff9d4d, #e0561f); }
.padgrp .p-u { grid-column: 1 / -1; width: 100%; height: 62px; background: linear-gradient(160deg, #ffd23f, #e89400); color: #2a1a00; border-color: #fff3b0; grid-auto-flow: column; gap: 8px; align-items: center; justify-content: center; }
.padgrp .p-u b { font-size: 1.3rem; }
.padgrp .p-u.armed { animation: glow .5s infinite alternate; }
@media (max-width: 360px) { .padgrp.left, .padgrp.right { grid-template-columns: repeat(2, 58px); gap: 6px; } .pad { width: 58px; height: 58px; } .padgrp .p-u { height: 58px; width: 100%; } .padgrp .p-u b { font-size: 1.05rem; } .hud { padding-left: 6px; padding-right: 6px; } }
@media (orientation: landscape) and (max-height: 520px) {
  .pads { background: none; padding-bottom: max(6px, env(safe-area-inset-bottom)); pointer-events: none; }
  .padgrp { pointer-events: auto; } .pad { opacity: .9; }
  .hud { gap: 2px; padding-top: max(4px, env(safe-area-inset-top)); } .hudbtn { width: 40px; height: 40px; } .bar { height: 18px; } .hud2 { grid-template-columns: auto auto 1fr; }
}

/* result / pause cards */
.newbest { display: block; width: max-content; margin: 0 auto 6px; padding: 4px 14px; border-radius: 999px; font-weight: 800; font-size: .85rem; color: #1a1030; background: linear-gradient(135deg, #ffd24a, #ff8a3d); animation: pulse .6s; }
.grade { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 22px; font-size: 3rem; font-weight: 900; color: #1a1030; background: linear-gradient(135deg, #ffd24a, #ff8a3d); box-shadow: 0 8px 22px var(--glow); margin: 4px 0 6px; }
.grade.g-S { background: linear-gradient(135deg, #fff1a8, #ffb300); } .grade.g-A { background: linear-gradient(135deg, #b8f5c8, #36d27a); } .grade.g-B { background: linear-gradient(135deg, #bfe6ff, #5aa9ff); } .grade.g-C { background: linear-gradient(135deg, #e3e6ee, #9aa7c7); }
.ovscore { font-size: clamp(2.2rem, 12vw, 3rem); font-weight: 800; line-height: 1.05; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.ovmode { color: var(--muted); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.ovstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.ovstats div { background: var(--card2); border-radius: 12px; padding: 8px 4px; min-width: 0; }
.ovstats b { display: block; font-size: 1.02rem; font-variant-numeric: tabular-nums; } .ovstats span { display: block; color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.ovname { text-align: left; margin-top: 12px; } .ovboard { text-align: left; margin-top: 8px; } .ovboard .label { margin: 8px 0 0; } .ovboard .lb { margin-top: 6px; }
.overlay .row .btn { flex: 1 1 130px; } .overlay .btn.go { margin-top: 0; width: auto; }
.overlay > .card { display: flex; flex-direction: column; overflow: hidden; padding: 16px; }
.overlay .ovbody { overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; padding: 0 2px; }
.overlay .big, .overlay h2, .overlay .row { flex: none; }
body[data-tod="night"] .ovscore { background-image: linear-gradient(90deg, #ff7a96, #9aa0ff); }
@media (max-width: 380px) { .ovstats { grid-template-columns: repeat(2, 1fr); } }
@media (max-height: 680px) { .overlay .big { display: none; } .overlay h2 { font-size: 1.3rem; margin-top: 0; } .ovboard { display: none; } .grade { width: 64px; height: 64px; font-size: 2.2rem; } }
@media (max-height: 520px) { .overlay .row { margin-top: 10px; flex-wrap: nowrap; } .overlay .row .btn { flex: 1 1 0; padding: 8px 6px; font-size: .9rem; } .ovstats { margin-top: 8px; } .grade { display: none; } }
@media (max-width: 420px) { .overlay .row { gap: 8px; } .overlay .row .btn { flex: 1 1 28%; padding: 8px 4px; font-size: .88rem; } .overlay .row .btn[data-role="again"] { flex-basis: 100%; } }
@media (max-width: 460px) { .modes button { padding: 9px 10px; } .modes button span { font-size: .72rem; } }
@media (prefers-reduced-motion: reduce) { .combo.bump, .meter.full, .p-u.armed { animation: none; } }
