/* Arena Brawlers: page-specific styles on top of ../arcade-common/pz.css */
body[data-tod="day"] { --accent: #e0561f; --accent2: #d6336c; --glow: rgba(224, 86, 31, .25); }
body[data-tod="night"] { --accent: #ff7a45; --accent2: #e8479a; --accent-ink: #1a0f10; }
.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: #0b1030; border: 1px solid var(--line); touch-action: pan-y; }
.stats { min-height: 1.3em; }

/* mode picker */
.tabs button { min-height: 48px; font-size: .84rem; padding: 6px 2px; }
@media (max-width: 440px) { #modeTabs { grid-template-columns: 1fr 1fr; } }
.opt { margin-top: 2px; }
.opt[hidden] { display: none; }
.hint.note { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.arenas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.arenas button { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 10px 4px 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--card2); min-height: 92px; }
.arenas button i { font-style: normal; font-size: 1.7rem; line-height: 1; }
.arenas button b { font-size: .84rem; line-height: 1.2; }
.arenas button small { color: var(--muted); font-size: .68rem; line-height: 1.25; padding: 0 2px; }
.arenas button[aria-checked="true"] { border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 6px 18px var(--glow); }
.arenas button[aria-checked="true"] small { color: rgba(255, 255, 255, .92); }
body[data-tod="night"] .arenas button[aria-checked="true"] { color: #1a0f10; }
body[data-tod="night"] .arenas button[aria-checked="true"] small { color: rgba(26, 15, 16, .85); }
body[data-tod="night"] .chips button[aria-checked="true"] { color: #1a0f10; }
.btn.go { margin-top: 18px; }
body[data-tod="night"] .btn { color: #1a0f10; }
body[data-tod="night"] .btn.alt, body[data-tod="night"] .btn.ghost { color: var(--ink); }

/* how to play */
.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; color: var(--ink); }
.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.2rem; }
.keytable { display: grid; gap: 8px; margin-top: 12px; }
.keyrow { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--card2); font-size: .82rem; line-height: 1.35; }
.keyrow .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.keyrow kbd { font: inherit; font-weight: 700; font-size: .74rem; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--card); white-space: nowrap; }
.keyrow span { min-width: 0; }

/* play 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: #070b1f; }
#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-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.hud-row > * { pointer-events: auto; }
.hudbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 14, 40, .55); color: #fff; font-size: 1.1rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hudbtn[aria-pressed="false"] { opacity: .55; }
.hud-mid { text-align: center; pointer-events: none; min-width: 0; }
.hud-clock { font-weight: 800; font-size: clamp(1.3rem, 6vw, 1.9rem); line-height: 1; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .55), 0 0 2px #000; font-variant-numeric: tabular-nums; }
.hud-sub { margin-top: 3px; font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 6px rgba(0, 0, 0, .7); min-height: 1em; }
.hud-sub.warn { color: #ffd24a; animation: pulse .8s infinite alternate; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.08); } }
.cards { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 6px; }
.fc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 6px; align-items: center; padding: 5px 8px; border-radius: 12px; background: rgba(10, 14, 40, .62); border: 2px solid rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); min-width: 0; }
.fc.out { opacity: .45; }
.fc .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.fc .nm { font-weight: 700; font-size: .72rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fc .dmg { font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; line-height: 1; }
.fc .lives { grid-column: 1 / -1; display: flex; gap: 2px; font-size: .78rem; line-height: 1; min-height: .9em; }
.fc .lives i { font-style: normal; color: #ff6b8a; }
.fc .lives i.off { color: rgba(255, 255, 255, .25); }
.fc .wins { font-size: .68rem; opacity: .9; margin-left: 4px; }
@media (max-width: 380px) { .fc { padding: 4px 5px; gap: 2px 4px; } .fc .nm { font-size: .64rem; } .fc .dmg { font-size: .82rem; } .fc .lives { font-size: .68rem; } }
.kills { position: absolute; right: max(10px, env(safe-area-inset-right)); top: calc(max(8px, env(safe-area-inset-top)) + 112px); display: grid; gap: 4px; justify-items: end; pointer-events: none; max-width: 60%; }
.kills div { font-size: .76rem; font-weight: 700; color: #fff; background: rgba(10, 14, 40, .62); padding: 3px 9px; border-radius: 999px; animation: slideIn .25s; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.banner { position: absolute; left: 0; right: 0; top: 40%; text-align: center; pointer-events: none; font-weight: 800; font-size: clamp(2.4rem, 12vw, 5rem); line-height: 1.05; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 30px rgba(255, 122, 69, .7); letter-spacing: -.02em; opacity: 0; transform: scale(.7); }
.banner.on { animation: bannerIn 1s cubic-bezier(.2, 1.3, .4, 1) both; }
.banner.stay { animation: bannerStay .45s cubic-bezier(.2, 1.3, .4, 1) both; }
.banner small { display: block; font-size: .3em; letter-spacing: .08em; text-transform: uppercase; opacity: .9; margin-top: 6px; }
@keyframes bannerIn { 0% { opacity: 0; transform: scale(.5); } 25% { opacity: 1; transform: scale(1.08); } 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.15); } }
@keyframes bannerStay { 0% { opacity: 0; transform: scale(.5); } 100% { opacity: 1; transform: scale(1); } }

/* touch controls */
.touch { position: absolute; inset: 0; pointer-events: none; z-index: 5; touch-action: none; }
.touch[hidden] { display: none; }
.tp { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 14px; pointer-events: none; touch-action: none; }
.tp[hidden] { display: none; }
.joy { position: relative; width: 132px; height: 132px; border-radius: 50%; background: rgba(255, 255, 255, .13); border: 2px solid rgba(255, 255, 255, .45); pointer-events: auto; touch-action: none; flex: none; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.joy::before { content: ""; position: absolute; inset: 34px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .25); }
.joy i { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--pc, #ddd) 70%); box-shadow: 0 4px 12px rgba(0, 0, 0, .45); transform: translate(var(--jx, 0px), var(--jy, 0px)); }
.tbtns { display: flex; gap: 12px; align-items: flex-end; pointer-events: none; }
.tbtn { pointer-events: auto; touch-action: none; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .7); color: #fff; font-weight: 800; font-size: .86rem; display: grid; place-items: center; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.tbtn.dash { width: 88px; height: 88px; background: radial-gradient(circle at 35% 30%, #ff9a5a, #e0431f); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.tbtn.slam { width: 70px; height: 70px; background: radial-gradient(circle at 35% 30%, #86b6ff, #3a55e0); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.tbtn:active, .tbtn.down { transform: scale(.93); filter: brightness(1.15); }
.tbtn.cool { filter: grayscale(.7) brightness(.8); }
/* one human: stick on the left, buttons on the right */
.touch.lay-1 .tp0 { left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); justify-content: space-between; }
.touch.lay-1 .tp0 .tbtns { flex-direction: row-reverse; }
.touch.lay-1 .tp1 { display: none; }
/* two humans side by side (landscape): each half has its stick and buttons */
.touch.lay-2 .tp0 { left: max(12px, env(safe-area-inset-left)); }
.touch.lay-2 .tp1 { right: max(12px, env(safe-area-inset-right)); flex-direction: row-reverse; }
.touch.lay-2 .joy { width: 116px; height: 116px; }
.touch.lay-2 .tbtn.dash { width: 76px; height: 76px; }
.touch.lay-2 .tbtn.slam { width: 62px; height: 62px; }
.touch.lay-2 .tbtns { flex-direction: column-reverse; align-items: center; gap: 10px; }
@media (max-height: 420px) { .joy { width: 112px; height: 112px; } .joy i { width: 50px; height: 50px; margin: -25px 0 0 -25px; } .tbtn.dash { width: 76px; height: 76px; } .tbtn.slam { width: 62px; height: 62px; } }

/* round and podium overlays */
.ovscore { display: grid; gap: 8px; margin: 10px 0 2px; text-align: left; }
.ovrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--card2); }
.ovrow .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.ovrow b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovrow span { font-weight: 800; font-variant-numeric: tabular-nums; }
.ovrow.win { outline: 2px solid var(--accent); }
.ovmeta { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin: 12px 0 4px; min-height: 170px; }
.podium .pl { text-align: center; min-width: 0; }
.podium .pl .face { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 4px; background: var(--c); box-shadow: 0 3px 10px rgba(0, 0, 0, .35), inset 0 -6px 0 rgba(0, 0, 0, .15); display: grid; place-items: center; font-size: 1.5rem; }
.podium .pl .pn { font-weight: 700; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .pl .st { height: var(--h); border-radius: 10px 10px 0 0; margin-top: 4px; background: linear-gradient(180deg, var(--accent), var(--accent2)); color: #fff; font-weight: 800; font-size: 1.4rem; display: grid; place-items: start center; padding-top: 6px; }
body[data-tod="night"] .podium .pl .st { color: #1a0f10; }
.podium .pl.p1 { order: 2; --h: 96px; } .podium .pl.p2 { order: 1; --h: 68px; } .podium .pl.p3 { order: 3; --h: 46px; }
.podium .pl .rw { font-size: .72rem; color: var(--muted); }
.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; }
@media (max-height: 560px) { .overlay .big { display: none; } .overlay h2 { font-size: 1.3rem; margin-top: 0; } .podium { min-height: 120px; } .podium .pl.p1 { --h: 60px; } .podium .pl.p2 { --h: 44px; } .podium .pl.p3 { --h: 30px; } }
@media (max-height: 420px) { .overlay .row { margin-top: 10px; flex-wrap: nowrap; } .overlay .row .btn { flex: 1 1 0; padding: 8px 6px; font-size: .9rem; } .ovrow { padding: 4px 10px; } .ovscore { gap: 4px; } }
@media (max-width: 420px) { .overlay .row { gap: 8px; } .overlay .row .btn { flex: 1 1 40%; padding: 8px 4px; font-size: .88rem; } }

/* touch targets */
.seg button, .chips button { min-height: 44px; }
.seg { padding: 2px; }
.btn.small { min-height: 44px; }

/* narrow phones */
@media (max-width: 380px) {
  .back { padding: 10px 4px; }
  .brand { font-size: .9rem; }
  .tools { gap: 4px; }
  .seg button { padding: 7px 8px; }
  .icon-btn { width: 44px; }
  .joy { width: 112px; height: 112px; }
  .joy i { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
  .tbtn.dash { width: 76px; height: 76px; }
  .tbtn.slam { width: 62px; height: 62px; }
  .tp { gap: 8px; }
  .tbtns { gap: 8px; }
}
@media (max-width: 480px) {
  .cards.many { gap: 4px; }
  .cards.many .fc { grid-template-columns: auto minmax(0, 1fr); padding: 4px 6px; }
  .cards.many .fc .nm { display: none; }
  .cards.many .fc .dmg { text-align: right; }
  .cards.many .fc .wins { display: none; }
}
