/* Bopnauts: the canvas fills the view; HUD, menus, banners and touch controls are DOM on top (SPEC §12.4). */
@font-face { font-family: 'Lilita One'; src: url('assets/fonts/lilita-one.woff2') format('woff2'); font-weight: 400; font-display: swap; }
.bop { --ink: #1b1035; --night: #140a33; --y: #ffe14d; --m: #ff2e97; --c: #2ef6ff; --l: #9bff3a; --o: #ff6a1a; --r: #ff2340; --panel: rgba(28,16,72,0.92);
  --display: 'Lilita One', 'Baloo 2', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
  display: flex; flex-direction: column; color: #fff; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.bop [hidden] { display: none !important; }
.bop-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); min-height: 340px; overflow: hidden; border-radius: 12px;
  background: var(--night); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; outline: none; touch-action: none; contain: layout paint; }
@media (max-width: 760px) and (orientation: portrait) { .bop-stage { aspect-ratio: auto; height: min(86vh, 175vw); height: min(86dvh, 175vw); max-height: none; border-radius: 10px; } }
.bop-view { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; }
#bop-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.bop-deck { position: absolute; left: 0; right: 0; bottom: 0; display: none; pointer-events: none; z-index: 3; background: linear-gradient(to bottom, rgba(18,8,48,0) 0%, rgba(18,8,48,0.45) 22%, rgba(18,8,48,0.62) 100%); }
.bop.is-portrait.in-match .bop-deck { display: block; }
.bop.is-portrait .bop-deck::after { content: 'MOVE'; position: absolute; left: 24%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; border: 3px dashed rgba(255,255,255,0.16); display: grid; place-items: center; color: rgba(255,255,255,0.3); font: 15px/1 var(--display); letter-spacing: 0.14em; }
.bop-help { margin: 8px 2px 0; font-size: 13px; color: #b9c6e4; text-align: center; }
.bop-help kbd, .bop kbd { display: inline-block; min-width: 1.4em; padding: 0 5px; margin: 0 1px; border-radius: 5px; background: #1c2440; border: 1px solid #33406a; color: #dfe9ff; font: inherit; font-size: 12px; text-align: center; }
.bop .hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .bop .hint-kb { display: none; } .bop .hint-touch { display: inline; } }
.stage.is-immersive .stage-body > .bop { min-height: 0; flex: 1 1 auto; }
.stage.is-immersive .bop-stage { flex: 1 1 auto; height: auto; aspect-ratio: auto; max-height: none; min-height: 0; border-radius: 0; }
.stage.is-immersive .bop-help { display: none; }
.bop-loading { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: var(--night); font: 20px var(--display); color: #dfe0ff; z-index: 30; }
.bop-spin { width: 44px; height: 44px; border-radius: 50%; border: 6px solid rgba(46,246,255,0.25); border-top-color: var(--c); animation: bop-rot .8s linear infinite; }
@keyframes bop-rot { to { transform: rotate(360deg); } }

/* ---------- HUD ---------- */
.bop-hud { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.bop-pips { position: absolute; left: 50%; top: max(8px, env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 120px); }
.bop-pip { display: flex; align-items: center; gap: 3px; padding: 3px 8px 3px 4px; border-radius: 99px; background: rgba(20,10,51,0.6); border: 2px solid var(--pc); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.bop-pip b { font: 13px/1 var(--display); letter-spacing: 0.02em; padding: 2px 7px; border-radius: 99px; background: var(--pc); color: var(--ink); margin-right: 3px; max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bop-pip i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.18); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2); transform: rotate(45deg); border-radius: 3px; }
.bop-pip i.on { background: var(--pc); box-shadow: 0 0 6px var(--pc), inset 0 2px 0 rgba(255,255,255,0.6); }
.bop-pips.mp .bop-pip { animation: bop-glow 1s ease-in-out infinite alternate; }
.bop-pip.cr { position: relative; padding-bottom: 7px; }
.bop-pip u { position: absolute; left: 8px; right: 8px; bottom: 2px; height: 4px; border-radius: 3px; background: rgba(255,255,255,0.18); overflow: hidden; text-decoration: none; }
.bop-pip u s { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #FFD23F, var(--pc)); text-decoration: none; transition: width .2s linear; }
.bop-pip u.hold { box-shadow: 0 0 8px #FFD23F; }
@keyframes bop-glow { to { box-shadow: 0 0 14px rgba(255,225,77,0.7); } }
.bop-timer { position: absolute; left: 50%; top: calc(max(8px, env(safe-area-inset-top, 0px)) + 34px); transform: translateX(-50%); font: 30px/1 var(--display); color: #fff; text-shadow: 0 3px 0 var(--ink), 0 0 12px rgba(0,0,0,0.4); }
.bop-timer.hot { color: var(--m); font-size: 24px; animation: bop-blink .5s steps(2) infinite; }
.bop-mut { position: absolute; right: max(10px, env(safe-area-inset-right, 0px)); top: max(10px, env(safe-area-inset-top, 0px)); padding: 4px 10px; border-radius: 10px; background: var(--m); color: #fff; font: 14px/1.2 var(--display); box-shadow: 0 3px 0 rgba(0,0,0,0.25); }
.bop-pausebtn { pointer-events: auto; position: absolute; left: max(8px, env(safe-area-inset-left, 0px)); top: max(8px, env(safe-area-inset-top, 0px)); width: 40px; height: 40px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.35); background: rgba(20,10,51,0.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.bop-pausebtn svg { width: 20px; height: 20px; }
.bop-tag-replay { pointer-events: auto; position: absolute; right: max(14px, env(safe-area-inset-right, 0px)); bottom: 12%; font: 26px/1 var(--display); letter-spacing: 0.1em; color: #fff; text-shadow: 0 3px 0 var(--m); animation: bop-blink 1s steps(2) infinite; cursor: pointer; text-align: right; }
.bop-tag-replay small { display: block; font: 12px/1.4 system-ui, sans-serif; letter-spacing: 0; color: #dfe0ff; text-shadow: none; }
@keyframes bop-blink { 50% { opacity: 0.45; } }
.bop-banner { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); pointer-events: none; font: clamp(44px, 12vmin, 120px)/1 var(--display); color: #fff; opacity: 0; white-space: nowrap; z-index: 5;
  text-shadow: 0 5px 0 var(--m), 0 10px 0 rgba(27,16,53,0.6), 0 0 40px rgba(255,225,77,0.6); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.bop-banner.count { color: var(--y); }
.bop-banner.go { color: var(--y); font-size: clamp(60px, 18vmin, 170px); }
.bop-banner.draw { color: var(--c); font-size: clamp(36px, 9vmin, 90px); }
.bop-banner.anim { animation: bop-banner .95s cubic-bezier(.2,1.6,.3,1) forwards; }
@keyframes bop-banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-8deg); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.3) rotate(3deg); } 30% { transform: translate(-50%, -50%) scale(1) rotate(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -62%) scale(1.05); } }
.bop-alert { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); pointer-events: none; padding: 8px 18px; border-radius: 14px; background: var(--r); color: #fff; font: clamp(18px, 4vmin, 34px)/1.1 var(--display); letter-spacing: 0.04em; opacity: 0; z-index: 5; box-shadow: 0 5px 0 rgba(0,0,0,0.25), 0 0 30px rgba(255,35,64,0.5); white-space: nowrap; }
.bop-alert.anim { animation: bop-alert 1.8s ease-out forwards; }
@keyframes bop-alert { 0% { opacity: 0; transform: translateX(-50%) scale(0.5); } 10% { opacity: 1; transform: translateX(-50%) scale(1.12); } 18% { transform: translateX(-50%) scale(1); } 30%, 50% { opacity: 1; } 40% { opacity: 0.6; } 85% { opacity: 1; } 100% { opacity: 0; } }

/* between rounds */
.bop-between { position: absolute; inset: 0; display: grid; place-items: center; z-index: 6; background: radial-gradient(circle, rgba(20,10,51,0.55), rgba(20,10,51,0.85)); animation: bop-fade .25s; cursor: pointer; }
@keyframes bop-fade { from { opacity: 0; } }
.bop-bet { text-align: center; padding: 16px; max-width: 92%; }
.bop-bet h2 { font: clamp(24px, 5.5vmin, 46px)/1.1 var(--display); margin: 0 0 14px; color: var(--y); text-shadow: 0 4px 0 var(--ink); letter-spacing: 0.01em; }
.bop-score { display: flex; flex-direction: column; gap: 6px; align-items: center; margin-bottom: 16px; }
.bop-score div { display: flex; align-items: center; gap: 10px; }
.bop-score b { font: 18px/1 var(--display); min-width: 6em; text-align: right; color: var(--pc); text-shadow: 0 2px 0 var(--ink); }
.bop-score span { display: flex; gap: 5px; }
.bop-score i { width: 16px; height: 16px; border-radius: 4px; transform: rotate(45deg); background: rgba(255,255,255,0.15); }
.bop-score i.on { background: var(--pc); box-shadow: 0 0 8px var(--pc); }
.bop-score i.new { animation: bop-gem .6s cubic-bezier(.2,2,.4,1); }
@keyframes bop-gem { from { transform: rotate(45deg) scale(2.4); } }
.bop-next { display: inline-flex; flex-direction: column; gap: 3px; padding: 12px 22px; border-radius: 16px; background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.25); }
.bop-next small { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: #cfd2ff; }
.bop-next b { font: 28px/1.05 var(--display); color: #fff; }
.bop-next span { font-size: 14px; color: var(--c); }

/* ---------- menus ---------- */
.bop-screen { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; overflow: auto; padding: max(10px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); background: rgba(10,4,32,0.55); touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.bop-screen.is-title { background: linear-gradient(180deg, rgba(10,4,32,0.15), rgba(10,4,32,0.55)); }
.bop-title { width: min(860px, 100%); display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.4vmin, 22px); margin: auto; }
.bop-logo { text-align: center; line-height: 0.88; animation: bop-logo .8s cubic-bezier(.2,1.7,.35,1); }
@keyframes bop-logo { from { transform: scale(0.3) rotate(-6deg); opacity: 0; } }
.bop-logo span { display: inline-block; font: clamp(48px, 13vmin, 118px)/0.9 var(--display); letter-spacing: 0.01em; -webkit-text-stroke: clamp(4px, 1vmin, 8px) var(--ink); paint-order: stroke fill; text-shadow: 0 clamp(5px, 1.2vmin, 10px) 0 var(--ink); }
.bop-logo .l1 { color: var(--y); transform: rotate(-4deg); }
.bop-logo .l2 { color: #7ff3ff; transform: rotate(2deg); }   /* (a clipped gradient fill rendered almost black under the thick stroke in Chrome) */
.bop-logo em { display: block; font: italic 600 clamp(13px, 2.4vmin, 18px)/1.6 system-ui, sans-serif; color: #e8e2ff; text-shadow: 0 2px 6px rgba(0,0,0,0.6); }
.bop-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.8vmin, 16px); width: 100%; }
.bop-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: clamp(12px, 2.4vmin, 20px); border-radius: 22px; border: 3px solid rgba(255,255,255,0.85); color: #fff; text-align: left; cursor: pointer; min-height: clamp(110px, 21vmin, 168px);
  box-shadow: 0 7px 0 rgba(0,0,0,0.3), inset 0 3px 0 rgba(255,255,255,0.35); transition: transform .08s, box-shadow .08s; font: inherit; }
.bop-card:hover { transform: translateY(-3px) rotate(-0.6deg); }
.bop-card:active { transform: translateY(4px) scale(0.97); box-shadow: 0 2px 0 rgba(0,0,0,0.3); }
.bop-card:focus-visible, .bop-btn:focus-visible, .bop-chip:focus-visible { outline: 3px solid var(--y); outline-offset: 3px; }
.bop-card svg { width: clamp(30px, 6vmin, 46px); height: clamp(30px, 6vmin, 46px); filter: drop-shadow(0 3px 0 rgba(0,0,0,0.25)); }
.bop-card b { font: clamp(22px, 4.4vmin, 34px)/1 var(--display); letter-spacing: 0.01em; text-shadow: 0 3px 0 rgba(27,16,53,0.45); }
.bop-card span { font-size: clamp(12px, 1.9vmin, 14px); line-height: 1.3; opacity: 0.95; }
.c-online { background: linear-gradient(160deg, #ff4fae, #ff2e97 45%, #b8137a); }
.c-local { background: linear-gradient(160deg, #3fd6ff, #2e8bff 50%, #2a4bd0); }
.c-bots { background: linear-gradient(160deg, #b7ff5a, #5fd13a 50%, #1f9a5a); }
.bop-looking { position: absolute; top: 10px; right: 12px; font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 9px 3px 20px; border-radius: 99px; background: rgba(20,10,51,0.55); }
.bop-looking::before { content: ''; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--l); box-shadow: 0 0 0 3px rgba(155,255,58,0.25); animation: bop-blink 1.2s infinite; }
.bop-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.bop-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 99px; border: 2px solid rgba(255,255,255,0.4); background: rgba(27,16,53,0.65); color: #fff; font: 16px/1 var(--display); cursor: pointer; transition: transform .08s; }
.bop-chip svg { width: 18px; height: 18px; }
.bop-chip:hover { border-color: var(--y); }
.bop-chip:active { transform: scale(0.93); }
.bop-level { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 14px; border-radius: 99px; background: rgba(27,16,53,0.6); }
.bop-level b { font: 16px var(--display); color: var(--y); }
.bop-level .bar { width: 120px; height: 8px; border-radius: 9px; background: rgba(255,255,255,0.15); overflow: hidden; }
.bop-level .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--c), var(--l)); }
@media (max-width: 620px) { .bop-cards { grid-template-columns: 1fr; } .bop-card { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; } .bop-card span { flex-basis: 100%; } .bop-looking { top: auto; bottom: 10px; } }
@media (max-height: 460px) and (orientation: landscape) { .bop-cards { grid-template-columns: repeat(3, 1fr); } .bop-card { min-height: 0; padding: 10px 12px; } .bop-card svg { width: 26px; height: 26px; } .bop-card b { font-size: 20px; } .bop-card span { font-size: 11px; } .bop-logo span { font-size: 44px; } .bop-logo em { display: none; } .bop-level { display: none; } .bop-title { gap: 8px; } }

.bop-panel { width: min(560px, 100%); max-height: 100%; overflow: auto; background: var(--panel); border: 3px solid rgba(255,255,255,0.2); border-radius: 22px; padding: clamp(14px, 3vmin, 24px); box-shadow: 0 16px 50px rgba(0,0,0,0.5); margin: auto; animation: bop-pop .22s cubic-bezier(.2,1.5,.4,1); }
.bop-panel.wide { width: min(860px, 100%); }
@keyframes bop-pop { from { transform: scale(0.92); opacity: 0; } }
.bop-panel h2 { margin: 0 0 12px; font: clamp(26px, 5vmin, 38px)/1 var(--display); color: var(--y); text-shadow: 0 3px 0 var(--ink); letter-spacing: 0.01em; }
.bop-panel h3 { margin: 14px 0 6px; font: 17px/1 var(--display); color: #cfd2ff; letter-spacing: 0.02em; }
.bop-blurb { margin: 6px 0 12px; color: #d6d2f5; font-size: 14px; line-height: 1.45; }
.bop-tip { color: #a8a3d8; font-size: 12.5px; margin: 10px 0 0; }
.bop-seg { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.bop-seg > span { min-width: 7.5em; font-weight: 700; font-size: 14px; color: #e0dcff; }
.bop-seg > div { display: flex; flex-wrap: wrap; gap: 5px; }
.bop-seg button, .bop-opts button { padding: 7px 12px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.06); color: #fff; font: 15px/1.1 var(--display); cursor: pointer; transition: transform .06s; }
.bop-seg button[aria-pressed="true"], .bop-opts button[aria-pressed="true"] { background: var(--y); color: var(--ink); border-color: var(--y); box-shadow: 0 3px 0 rgba(0,0,0,0.25); }
.bop-seg button:active, .bop-opts button:active { transform: scale(0.92); }
.bop-opts { display: flex; flex-wrap: wrap; gap: 5px; }
.bop-opts button:disabled { opacity: 0.4; cursor: default; }
.bop-opts small { font: 11px system-ui, sans-serif; opacity: 0.8; }
.bop-more { margin: 8px 0; } .bop-more summary { cursor: pointer; font-weight: 700; color: #cfd2ff; font-size: 14px; padding: 4px 0; }
.bop-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.bop-list { display: flex; flex-direction: column; gap: 8px; }
.bop-btn { padding: 11px 20px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.08); color: #fff; font: 18px/1 var(--display); letter-spacing: 0.02em; cursor: pointer; transition: transform .07s, box-shadow .07s; box-shadow: 0 4px 0 rgba(0,0,0,0.3); }
.bop-btn:hover:not(:disabled) { border-color: #fff; }
.bop-btn:active:not(:disabled) { transform: translateY(3px) scale(0.95); box-shadow: 0 1px 0 rgba(0,0,0,0.3); }
.bop-btn.go { background: linear-gradient(180deg, #ffe97a, #ffc93d); border-color: #fff3b0; color: var(--ink); }
.bop-btn:disabled { opacity: 0.45; cursor: default; }
.bop-btn.sm { padding: 6px 10px; font-size: 14px; border-radius: 10px; box-shadow: 0 2px 0 rgba(0,0,0,0.3); }
.bop-you { display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 16px; background: rgba(255,255,255,0.06); margin-bottom: 8px; }
.bop-you canvas { width: 72px; height: 84px; }
.bop-you b { display: block; font: 22px var(--display); }
.bop-you span { display: block; font-size: 13px; color: #cfd2ff; margin-bottom: 6px; }

/* Lobby Pad */
.bop-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
@media (max-width: 640px) { .bop-slots { grid-template-columns: repeat(2, 1fr); } }
.bop-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 16px; border: 3px dashed rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); min-height: 170px; text-align: center; }
.bop-slot b { font: 18px var(--display); color: var(--pc, #fff); }
.bop-slot.empty span { color: #a8a3d8; font-size: 13px; margin: auto 0; }
.bop-slot:not(.empty) { border-style: solid; border-color: var(--pc); }
.bop-slot.ok { background: rgba(255,255,255,0.1); box-shadow: 0 0 0 3px rgba(255,255,255,0.15) inset; animation: bop-pop .25s cubic-bezier(.2,2,.4,1); }
.bop-slot canvas { width: 80px; height: 94px; }
.bop-slot .nm { font: 17px var(--display); }
.bop-slot .dev { font-size: 11.5px; color: #cfd2ff; }
.bop-slot-acts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }

/* Locker */
.bop-lk { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
@media (max-width: 640px) { .bop-lk { grid-template-columns: 1fr; } .bop-lk-prev { justify-self: center; width: 150px !important; height: 174px !important; } }
.bop-lk-prev { width: 240px; height: 277px; border-radius: 18px; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.14), rgba(255,255,255,0.02)); }
.bop-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 5px; }
.bop-ch { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); color: #fff; font: 15px var(--display); cursor: pointer; flex-wrap: wrap; }
.bop-ch i { width: 14px; height: 14px; border-radius: 50%; background: var(--pc); box-shadow: inset 0 2px 0 rgba(255,255,255,0.5); }
.bop-ch[aria-pressed="true"] { border-color: var(--y); background: rgba(255,225,77,0.15); }
.bop-ch:disabled { opacity: 0.4; cursor: default; }
.bop-ch small { font: 10.5px system-ui; width: 100%; opacity: 0.8; }
.bop-sl { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 14px; }
.bop-sl span { min-width: 10em; }
.bop-sl input { flex: 1; accent-color: var(--y); }
.bop-tg { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 14px; cursor: pointer; }
.bop-tg input { width: 20px; height: 20px; accent-color: var(--y); }
.bop-keys { margin-top: 12px; font-size: 12.5px; line-height: 1.6; color: #cfd2ff; }

/* results */
.bop-podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 6px 0 12px; }
.bop-podium .pd { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 10px 10px; border-radius: 16px 16px 6px 6px; background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)); border-top: 4px solid var(--pc); min-width: 100px; }
.bop-podium .p1 { order: 2; padding-bottom: 34px; } .bop-podium .p2 { order: 1; padding-bottom: 18px; } .bop-podium .p3 { order: 3; }
.bop-podium canvas { width: 82px; height: 96px; }
.bop-podium b { font: 17px var(--display); color: var(--pc); }
.bop-podium span { font-size: 12px; color: #d6d2f5; }
.bop-podium .pd i { position: absolute; bottom: 6px; font: 22px var(--display); font-style: normal; color: var(--y); }
.bop-podium .p2 i, .bop-podium .p3 i { display: none; }
.bop-stats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
.bop-stats span { padding: 5px 10px; border-radius: 10px; background: rgba(255,255,255,0.07); font-size: 13px; }
.bop-stats b { font: 16px var(--display); color: var(--y); }
.bop-dust { padding: 10px 14px; border-radius: 14px; background: rgba(0,0,0,0.2); }
.bop-dust ul { list-style: none; margin: 0; padding: 0; columns: 2; font-size: 13px; }
.bop-dust li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 8px 2px 0; break-inside: avoid; }
.bop-dust li b { color: var(--l); }
.bop-dust .tot { margin-top: 8px; font: 24px var(--display); color: var(--y); text-align: center; }
.bop-dust .lvup { margin-top: 6px; text-align: center; font: 22px var(--display); color: var(--m); animation: bop-pop .5s cubic-bezier(.2,2.2,.4,1) 1s both; }
.bop-dust .unl { text-align: center; font-size: 14px; color: var(--c); }

/* training and tutorial overlays */
.bop-train, .bop-tut { position: absolute; z-index: 8; left: max(56px, env(safe-area-inset-left, 0px)); top: max(8px, env(safe-area-inset-top, 0px)); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 10px; border-radius: 14px; background: rgba(20,10,51,0.78); font-size: 13px; max-width: calc(100% - 80px); }
.bop-train b { font: 16px var(--display); color: var(--y); }
.bop-train select { background: #2a1c5c; color: #fff; border: 1px solid #5a4aa0; border-radius: 8px; padding: 3px 6px; }
.bop-train [data-hit] { color: var(--c); font-variant-numeric: tabular-nums; }
.bop-tut { flex-direction: column; align-items: flex-start; }
.bop-tut ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.bop-tut li { display: flex; align-items: center; gap: 8px; opacity: 0.5; font-size: 13px; }
.bop-tut li.cur { opacity: 1; font-weight: 700; font-size: 14.5px; color: var(--y); }
.bop-tut li.done { opacity: 0.8; text-decoration: line-through; }
.bop-tut li i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,0.15); font-style: normal; font-size: 12px; }
.bop-tut li i.ck { background: var(--l); color: var(--ink); animation: bop-pop .4s cubic-bezier(.2,2.2,.4,1); }
@media (max-width: 640px) { .bop-tut li:not(.cur) { display: none; } }

/* ---------- touch controls ---------- */
.bop-touch { position: absolute; inset: 0; z-index: 3; pointer-events: none; display: none; }
.bop.is-touch.in-match .bop-touch { display: block; pointer-events: auto; touch-action: none; }
.bp-tb { position: absolute; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 3px solid rgba(255,255,255,0.75); box-shadow: 0 5px 0 rgba(0,0,0,0.25); transition: transform .05s, filter .05s;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.5), rgba(255,255,255,0.08) 60%), var(--bc); }
.bp-tb svg { width: 46%; height: 46%; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.25)); }
.bp-tb-attack { --bc: rgba(255,46,151,0.78); } .bp-tb-jump { --bc: rgba(255,201,61,0.8); } .bp-tb-block { --bc: rgba(46,180,255,0.78); } .bp-tb-grab { --bc: rgba(120,220,60,0.78); } .bp-tb-emote { --bc: rgba(140,100,255,0.7); }
.bp-tb.is-on { transform: scale(0.9); filter: brightness(1.35); box-shadow: 0 2px 0 rgba(0,0,0,0.25); }
.bp-tb-jump svg { color: var(--ink); }
.bop-stick { position: absolute; width: 0; height: 0; opacity: 0; transition: opacity .12s; pointer-events: none; --u: 1; }
.bop-stick.is-on { opacity: 1; }
.bop-stick::before { content: ''; position: absolute; left: calc(-56px * var(--u)); top: calc(-56px * var(--u)); width: calc(112px * var(--u)); height: calc(112px * var(--u)); border-radius: 50%; border: 3px solid rgba(255,255,255,0.5); background: rgba(27,16,53,0.3); }
.bop-stick i { position: absolute; left: calc(-24px * var(--u)); top: calc(-24px * var(--u)); width: calc(48px * var(--u)); height: calc(48px * var(--u)); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #c8f9ff 50%, #2ef6ff); box-shadow: 0 0 18px rgba(46,246,255,0.8); }
.bp-stick, [data-stick] { position: absolute; }
.bop.is-touch .bop-pausebtn { width: 36px; height: 36px; }
@media (prefers-reduced-motion: reduce) { .bop-banner.anim, .bop-alert.anim, .bop-logo, .bop-panel { animation-duration: .01s; } }

/* online */
.bop-online .bop-ol-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.bop-online .bop-card { min-height: 92px; }
@media (max-width: 520px) { .bop-online .bop-ol-big { grid-template-columns: 1fr; } }
.bop-who { font-size: 13.5px; color: #d6d2f5; margin: 0 0 8px; }
.bop-link { appearance: none; border: 0; background: none; color: var(--c); font: inherit; font-weight: 700; padding: 0; cursor: pointer; text-decoration: underline; }
.bop-code { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; flex-wrap: wrap; }
.bop-code label { font-weight: 700; font-size: 14px; color: #e0dcff; min-width: 7.5em; }
.bop-code input, .bop-invite input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.25); background: #0e0726; color: #fff; font: 18px/1.1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; }
.bop-invite { display: flex; gap: 6px; align-items: center; }
.bop-invite input { font: 13px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0; text-transform: none; }
.bop-codebig { font: 20px var(--display); color: var(--y); letter-spacing: 0.08em; }
.bop-here { font: 13px system-ui, sans-serif; color: var(--l); margin-left: 8px; }
.bop-openlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bop-openlist li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); }
.bop-openlist .mi { font: 13px var(--display); padding: 4px 8px; border-radius: 8px; background: var(--m); white-space: nowrap; }
.bop-openlist .nm { flex: 1; min-width: 0; font-size: 12.5px; color: #cfd2ff; }
.bop-openlist .nm b { display: block; font-size: 14.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bop-openlist .nm small { display: block; color: var(--l); }
.bop-openlist .rg { font-style: normal; padding: 0 5px; border-radius: 5px; background: rgba(46,246,255,0.18); color: var(--c); }
.bop-empty { padding: 14px; border-radius: 12px; border: 2px dashed rgba(255,255,255,0.18); color: #a8a3d8; font-size: 13.5px; text-align: center; }
.bop-err { color: #ff9ab0; font-size: 13.5px; margin: 8px 0 0; } .bop-err:empty { display: none; }
.bop-room h2 small { font: 16px var(--display); color: #cfd2ff; margin-left: 8px; letter-spacing: 0.06em; }
.bop-room .bop-slot { min-height: 0; padding: 8px 6px; }
.bop-room .bop-slot canvas { width: 64px; height: 75px; }
.pg { font-style: normal; padding: 0 5px; border-radius: 6px; font-size: 11px; } .pg.g { background: rgba(155,255,58,0.25); color: var(--l); } .pg.y { background: rgba(255,225,77,0.25); color: var(--y); } .pg.r { background: rgba(255,35,64,0.3); color: #ff9ab0; }
.bop-joining { text-align: center; } .bop-joining .bop-spin { margin: 6px auto 12px; }
.bop-spin.sm { display: inline-block; width: 16px; height: 16px; border-width: 3px; vertical-align: middle; margin-right: 6px; }
.bop-screen { align-items: safe center; }

/* narrow stages (phones): compact score pills in one row */
.bop.narrow .bop-pips, .bop.short .bop-pips { gap: 4px; max-width: calc(100% - 96px); flex-wrap: nowrap; }
.bop.narrow .bop-pip, .bop.short .bop-pip { padding: 2px 4px 2px 2px; gap: 1px; border-width: 2px; min-width: 0; flex: 0 1 auto; }
.bop.narrow .bop-pip b { font-size: 11px; max-width: none; padding: 1px 5px; margin-right: 2px; text-overflow: clip; letter-spacing: 0.04em; }
.bop.short .bop-pip b { font-size: 11px; max-width: none; padding: 1px 5px; margin-right: 1px; text-overflow: clip; }
.bop.narrow .bop-pip i { width: 5px; height: 5px; border-radius: 2px; flex: none; }
.bop.short .bop-pip i { width: 6px; height: 6px; border-radius: 2px; flex: none; }
/* touch landscape: the emote button lives top right, so the mutator badge sits by the pause button */
.bop.is-touch:not(.is-portrait) .bop-mut { right: auto; left: calc(max(8px, env(safe-area-inset-left, 0px)) + 50px); }
.bop-pip em { font: 13px/1 var(--display); font-style: normal; color: #fff; padding: 0 2px; }
.bop.narrow .bop-pip em { font-size: 11px; }
.bop.narrow .bop-timer { font-size: 22px; top: calc(max(8px, env(safe-area-inset-top, 0px)) + 26px); }
.bop.narrow .bop-alert { font-size: 17px; white-space: normal; text-align: center; max-width: 90%; }
.bop.narrow .bop-pips { left: 52px; right: 6px; transform: none; justify-content: center; max-width: none; }

/* online brawl menu (the match keeps running behind it) */
.bop-stickers { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 12px; }
.bop-olmenu { max-width: 420px; }
/* touch buttons say what they do */
.bp-tb { align-content: center; gap: 1px; }
.bp-tb svg { width: 40%; height: auto; aspect-ratio: 1; }
.bp-tb b { display: block; font: 800 11px/1 var(--bop-font, system-ui), system-ui, sans-serif; letter-spacing: 0.02em; text-transform: uppercase; text-shadow: 0 1px 0 rgba(0,0,0,0.35); pointer-events: none; }
.bp-tb-attack b { font-size: 13px; }
.bp-tb-jump b { color: var(--ink); text-shadow: none; }
.bp-tb-kick { --bc: rgba(255,128,40,0.8); }
/* the controls card over the first matches */
.bop-ctl { position: absolute; left: 50%; top: 18%; transform: translate(-50%, -8px); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; max-width: min(94%, 760px);
  padding: 10px 16px; border-radius: 16px; background: rgba(20, 12, 50, 0.82); border: 2px solid rgba(255,255,255,0.25); color: #fff; font: 700 14px/1.2 system-ui, sans-serif; pointer-events: none; opacity: 0; transition: opacity .35s, transform .35s; z-index: 6; }
.bop-ctl.on { opacity: 1; transform: translate(-50%, 0); }
.bop-ctl-k { display: inline-flex; align-items: center; gap: 6px; }
.bop-ctl kbd { min-width: 26px; padding: 4px 7px; border-radius: 7px; background: #fff; color: #241a55; font: 800 13px/1 system-ui, sans-serif; text-align: center; box-shadow: 0 3px 0 #9a8fd6; }
.bop-ctl i { width: 2px; height: 22px; background: rgba(255,255,255,0.3); }
.bop-ctl small { flex-basis: 100%; text-align: center; font-weight: 600; font-size: 12px; color: #cfd2ff; }
@media (max-width: 520px) { .bop-ctl { top: 14%; font-size: 12.5px; gap: 6px 10px; padding: 8px 10px; } }
