/* Burst Pipe — game shell styles */
.bp-root {
  --bp-bg: #0b1520; --bp-panel: #13283a; --bp-panel2: #1a3650; --bp-line: #2a5677; --bp-ink: #eaf6ff; --bp-muted: #9ec3dc;
  --bp-orange: #ff8a3d; --bp-yellow: #ffd23f; --bp-blue: #3fb6ff; --bp-red: #ff5a4f; --bp-green: #3ddc84;
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0;
  background: radial-gradient(1200px 700px at 50% -10%, #1d4563 0%, var(--bp-bg) 62%);
  color: var(--bp-ink); font-family: Nunito, system-ui, -apple-system, Segoe UI, sans-serif; overflow: hidden;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.bp-root *, .bp-root *::before, .bp-root *::after { box-sizing: border-box; }
.bp-root kbd { background: #24506f; border-radius: 5px; padding: 1px 6px; font: 800 11px Nunito, system-ui, sans-serif; border-bottom: 2px solid #0e2a3d; color: #fff; }

/* top bar */
.bp-top { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 54px; }
.bp-hud { display: none; flex: 1; align-items: center; gap: 12px; background: rgba(19,40,58,.92); border: 2px solid var(--bp-line); border-radius: 14px; padding: 6px 12px; font-weight: 800; min-width: 0; }
.bp-hud.show { display: flex; }
.bp-hud .bp-lvl { font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-hud .bp-lvl small { display: block; font: 800 10px Nunito, sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--bp-muted); }
.bp-stat { display: flex; flex-direction: column; align-items: center; line-height: 1.05; min-width: 64px; }
.bp-stat small { font-size: 10px; color: var(--bp-muted); text-transform: uppercase; letter-spacing: 1.5px; }
.bp-stat b { font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 23px; }
#bpTime.low { color: var(--bp-red); animation: bpPulse .5s infinite alternate; }
#bpMoney.pop { animation: bpPop .45s ease-out; color: #7dffb0; }
@keyframes bpPop { 0% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes bpPulse { to { opacity: .55; } }
.bp-flood { flex: 1; min-width: 110px; }
.bp-flood small { font-size: 10px; color: var(--bp-muted); text-transform: uppercase; letter-spacing: 1.5px; display: flex; justify-content: space-between; }
.bp-flood-bar { height: 16px; border-radius: 9px; background: #07111a; border: 2px solid var(--bp-line); overflow: hidden; position: relative; margin-top: 2px; }
.bp-flood-fill { height: 100%; width: 0; background: linear-gradient(90deg, #3fb6ff, #2a7ff4); position: relative; transition: width .25s linear; }
.bp-flood-fill::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(110deg, rgba(255,255,255,.18) 0 8px, transparent 8px 18px); animation: bpFlow 1.2s linear infinite; }
@keyframes bpFlow { to { background-position: 36px 0; } }
.bp-flood.hot .bp-flood-fill { background: linear-gradient(90deg, #ff9a3d, #ff4b3d); }
.bp-flood.hot .bp-flood-bar { animation: bpHot .6s infinite alternate; }
@keyframes bpHot { to { border-color: var(--bp-red); box-shadow: 0 0 12px rgba(255,90,79,.6); } }
.bp-valve { font-size: 12px; padding: 6px 10px; border-radius: 9px; background: #07111a; white-space: nowrap; }
.bp-valve.ready { color: var(--bp-green); } .bp-valve.off { color: #7fd4ff; } .bp-valve.cd { color: #ffb3ad; }
.bp-tools { display: flex; gap: 6px; margin-left: auto; }
.bp-iconbtn { width: 40px; height: 40px; border-radius: 11px; border: 2px solid var(--bp-line); background: var(--bp-panel); color: #fff; font-size: 17px; cursor: pointer; display: grid; place-items: center; }
.bp-iconbtn:hover { background: var(--bp-panel2); }
.bp-pause { display: none; }
body.bp-playing .bp-pause { display: grid; }

/* stage */
.bp-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px 8px; }
#bpCanvas { display: block; border-radius: 16px; box-shadow: 0 16px 50px rgba(0,0,0,.5), 0 0 0 3px #24506f; background: #0b1822; outline: none; touch-action: none; }

/* tool belt hotbar (bottom of the play area) */
.bp-hotbar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: none; align-items: flex-end; gap: 8px; background: rgba(10,22,33,.88); border: 2px solid var(--bp-line); border-radius: 16px; padding: 7px 10px; z-index: 3; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.bp-hotbar.show { display: flex; }
.bp-hotbar-label { font: 800 9px Nunito, sans-serif; letter-spacing: 1.4px; text-transform: uppercase; color: var(--bp-muted); writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; }
.bp-hslot { width: 74px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 4px 4px; border-radius: 11px; background: #0d1d2a; border: 2px dashed #2a4a62; transition: transform .15s, border-color .15s, box-shadow .15s; }
.bp-hslot i { height: 30px; display: grid; place-items: center; font: 700 11px Nunito, sans-serif; color: #4d6b82; font-style: normal; }
.bp-hslot b { font: 800 11px Nunito, sans-serif; color: var(--bp-muted); white-space: nowrap; }
.bp-hslot.full { background: #16324a; border: 2px solid #3b6c90; }
.bp-hslot.full b { color: #fff; }
.bp-hslot.match { border-color: var(--bp-green); box-shadow: 0 0 0 3px rgba(61,220,132,.3), 0 0 16px rgba(61,220,132,.45); transform: translateY(-4px); }
.bp-need { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; display: none; align-items: center; gap: 6px; background: rgba(80,20,20,.94); color: #ffd0cc; font: 800 13px Nunito, sans-serif; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--bp-red); }
.bp-need.show { display: inline-flex; }
.bp-need .bp-icon { border-radius: 5px; }

/* overlay cards */
.bp-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 14px; background: rgba(5,12,19,.42); backdrop-filter: blur(2px); z-index: 5; }
.bp-overlay.show { display: flex; }
.bp-card { background: rgba(13,27,40,.96); border: 3px solid #2b6a92; border-radius: 22px; padding: 24px 26px; width: min(900px, 100%); max-height: 100%; overflow: auto; text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.bp-card.bp-narrow { width: min(560px, 100%); }
.bp-card h2 { font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 36px; margin: 0 0 6px; letter-spacing: .5px; }
.bp-logo { font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: clamp(42px, 7vw, 66px); line-height: .95; letter-spacing: 1px; color: #fff; text-shadow: 0 4px 0 #1f6fd1, 0 9px 0 #0d3a6e, 0 14px 24px rgba(0,0,0,.4); }
.bp-logo span { display: inline-block; margin: 0 6px; }
.bp-logo span:last-child { color: #5cc4ff; transform: rotate(-3deg); }
.bp-tag { color: var(--bp-muted); margin: 10px 0 14px; font-size: 16px; }
.bp-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0 4px; }
.bp-btn { font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 18px; letter-spacing: .5px; border: 0; border-radius: 12px; padding: 11px 20px; cursor: pointer; background: #2b6a92; color: #fff; box-shadow: 0 4px 0 #173d57; transition: transform .08s, filter .15s; }
.bp-btn:hover { filter: brightness(1.12); } .bp-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #173d57; }
.bp-btn.primary { background: var(--bp-orange); box-shadow: 0 4px 0 #a34d14; }
.bp-btn:disabled { opacity: .55; cursor: default; }
.bp-diffs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0; align-items: center; }
.bp-chip { font: 800 14px Nunito, sans-serif; border: 2px solid var(--bp-line); background: var(--bp-panel); color: var(--bp-ink); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.bp-chip.sel { background: var(--bp-green); color: #0b2a18; border-color: var(--bp-green); }
.bp-sep { width: 12px; }
.bp-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; margin: 14px 0 6px; }
.bp-level { text-align: left; background: var(--bp-panel); border: 3px solid #24506f; border-radius: 16px; padding: 0; overflow: hidden; color: var(--bp-ink); cursor: pointer; transition: transform .12s, border-color .12s; font: inherit; display: flex; flex-direction: column; }
.bp-level:hover { transform: translateY(-3px); }
.bp-level.sel { border-color: var(--bp-orange); background: var(--bp-panel2); box-shadow: 0 0 0 3px rgba(255,138,61,.25); }
.bp-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #07111a; }
.bp-thumb canvas { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.bp-level-copy { display: block; padding: 10px 12px 12px; }
.bp-level-copy b { font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 19px; display: block; }
.bp-level-copy small { color: var(--bp-muted); font-size: 13px; display: block; min-height: 34px; margin-top: 2px; line-height: 1.3; }
.bp-level-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--bp-muted); }
.bp-topscore { display: block; margin-top: 4px; font-size: 12px; color: #ffe08a; min-height: 15px; }
.bp-stars { color: #33536b; letter-spacing: 2px; font-size: 17px; }
.bp-stars .on { color: var(--bp-yellow); }
.bp-stars.big { font-size: 54px; letter-spacing: 6px; display: block; margin: 4px 0; }
.bp-stars.sm { font-size: 13px; letter-spacing: 1px; }
.bp-hint { font-size: 13px; color: var(--bp-muted); margin-top: 10px; line-height: 1.6; }
.bp-new { color: #7dffb0; }
.bp-res { margin: 10px auto 10px; border-collapse: collapse; font-size: 16px; min-width: 280px; }
.bp-res td { padding: 4px 14px; text-align: left; } .bp-res td:last-child { text-align: right; font-weight: 800; }
.bp-res tr.total td { border-top: 2px solid #2b6a92; font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 23px; padding-top: 8px; }
.bp-steps { text-align: left; line-height: 1.55; padding-left: 22px; margin: 10px 0; }
.bp-steps li { margin: 6px 0; }
.bp-legend { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 4px; font-size: 13px; color: var(--bp-muted); }
.bp-legend span { display: flex; align-items: center; gap: 6px; background: #0b1822; padding: 4px 10px 4px 4px; border-radius: 10px; }
.bp-icon { background: #fff; border-radius: 7px; }
.bp-submit { margin: 14px auto 4px; max-width: 440px; text-align: left; }
.bp-submit label { font-size: 13px; color: var(--bp-muted); display: block; margin-bottom: 6px; }
.bp-submit-row { display: flex; gap: 8px; }
.bp-submit input { flex: 1; min-width: 0; font: 800 17px Nunito, sans-serif; padding: 10px 12px; border-radius: 11px; border: 2px solid var(--bp-line); background: #07111a; color: #fff; -webkit-user-select: text; user-select: text; }
.bp-submit input:focus { outline: none; border-color: var(--bp-orange); }
.bp-submit-msg { min-height: 20px; font-size: 14px; margin-top: 6px; }
.bp-submit-msg.ok { color: #7dffb0; } .bp-submit-msg.bad { color: #ffb3ad; }
.bp-board { width: 100%; max-width: 440px; margin: 10px auto; border-collapse: collapse; font-size: 15px; }
.bp-board.hidden { display: none; }
.bp-board th { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--bp-muted); text-align: left; padding: 6px 10px; border-bottom: 2px solid #2b6a92; }
.bp-board td { padding: 7px 10px; text-align: left; border-bottom: 1px solid #1c3a52; }
.bp-board td:first-child { width: 36px; color: var(--bp-muted); font-weight: 800; }
.bp-board td:last-child, .bp-board th:last-child { text-align: right; font-weight: 800; }
.bp-board tr.me td { background: rgba(255,138,61,.18); color: #fff; }
.bp-empty { text-align: center !important; color: var(--bp-muted); padding: 18px !important; }

/* touch controls: translucent so the map shows through */
.bp-touch-ui { display: none; }
body.bp-touch.bp-playing .bp-touch-ui { display: block; }
#bpStick { position: absolute; left: 18px; bottom: 18px; width: 128px; height: 128px; border-radius: 50%; background: rgba(10,22,33,.22); border: 2px solid rgba(255,255,255,.28); box-shadow: inset 0 0 18px rgba(63,182,255,.18); z-index: 4; touch-action: none; }
#bpKnob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; border-radius: 50%; background: rgba(234,246,255,.45); border: 2px solid rgba(255,255,255,.55); transform: translate(-50%,-50%); pointer-events: none; }
#bpAct { position: absolute; right: 22px; bottom: 26px; width: 92px; height: 92px; border-radius: 50%; border: 3px solid rgba(255,255,255,.45); background: rgba(255,210,63,.40); color: rgba(16,24,32,.85); font: 400 30px 'Lilita One', 'Arial Black', sans-serif; box-shadow: 0 0 0 4px rgba(10,22,33,.15); z-index: 4; touch-action: none; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
#bpAct.on { background: rgba(255,210,63,.72); transform: scale(.94); }

@media (max-width: 760px) {
  .bp-levels { grid-template-columns: 1fr; }
  .bp-level { flex-direction: row; } .bp-thumb { width: 38%; aspect-ratio: auto; }
  .bp-hud { gap: 8px; flex-wrap: wrap; } .bp-valve { display: none; } .bp-stat b { font-size: 19px; }
  .bp-card { padding: 18px 14px; }
}

/* ---------- player chip, closet, shop, player card ---------- */
.bp-btn.small { font-size: 15px; padding: 8px 13px; border-radius: 10px; box-shadow: 0 3px 0 #173d57; text-decoration: none; display: inline-block; }
.bp-btn.small.primary { box-shadow: 0 3px 0 #a34d14; }
.bp-card.bp-wide { width: min(1080px, 100%); }
.bp-portrait { display: block; }
.bp-chipcard { display: flex; align-items: center; gap: 12px; text-align: left; background: linear-gradient(135deg, #17324a, #10263a); border: 2px solid var(--bp-line); border-radius: 16px; padding: 8px 12px; margin: 4px auto 10px; max-width: 760px; flex-wrap: wrap; }
.bp-chipcard-copy { flex: 1; min-width: 180px; }
.bp-chipcard-copy b { font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 21px; display: block; }
.bp-chipcard-copy small { color: var(--bp-muted); font-size: 13px; }
.bp-cash { color: #7dffb0; font-weight: 800; }

.bp-closet { display: grid; grid-template-columns: 240px 1fr; gap: 18px; text-align: left; }
.bp-closet-side { display: flex; flex-direction: column; align-items: center; gap: 10px; background: radial-gradient(circle at 50% 30%, #1d4563, #0d1b28 70%); border: 2px solid var(--bp-line); border-radius: 18px; padding: 14px; text-align: center; }
.bp-closet-main h2 { text-align: left; }
.bp-closet-main .bp-diffs { justify-content: flex-start; }
.bp-wallet small { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--bp-muted); }
.bp-wallet b { font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 30px; color: #7dffb0; }
.bp-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.bp-item { position: relative; background: #0f2233; border: 2px solid #24506f; border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: pointer; transition: transform .1s, border-color .1s; }
.bp-item:hover { transform: translateY(-2px); }
.bp-item.on { border-color: var(--bp-orange); box-shadow: 0 0 0 3px rgba(255,138,61,.22); }
.bp-item-art { width: 70px; height: 75px; }
.bp-item b { font-size: 14px; line-height: 1.2; }
.bp-item small { font-size: 11px; color: var(--bp-muted); }
.bp-item.r-rare { border-color: #3f8fe0; } .bp-item.r-epic { border-color: #a46cff; } .bp-item.r-legendary { border-color: #ffcc33; background: linear-gradient(180deg, #2a2410, #0f2233 60%); }
.bp-item.r-rare small, .bp-item.r-epic small, .bp-item.r-legendary small { color: #e6eef5; }
.bp-tagline { font-size: 12px; font-weight: 800; padding: 6px 8px; border-radius: 8px; background: #07111a; }
.bp-tagline.ok { color: var(--bp-green); } .bp-tagline.lock { color: #ffcc80; font-weight: 700; line-height: 1.3; }

.bp-cardview { width: min(640px, 100%); }
.bp-pcard { display: grid; grid-template-columns: 200px 1fr; gap: 14px; text-align: left; border-radius: 20px; padding: 14px; background: linear-gradient(145deg, #ffd23f 0%, #ff8a3d 55%, #e0473d 100%); color: #1d2730; box-shadow: inset 0 0 0 4px rgba(255,255,255,.35), 0 10px 30px rgba(0,0,0,.35); }
.bp-pcard-art { position: relative; background: radial-gradient(circle at 50% 35%, #2a6a97, #0d2236 72%); border-radius: 14px; display: grid; place-items: center; padding: 6px; border: 3px solid rgba(255,255,255,.75); }
.bp-pcard-rank { position: absolute; left: 8px; top: 8px; background: #1d2730; color: var(--bp-yellow); font: 400 14px 'Lilita One', 'Arial Black', sans-serif; letter-spacing: 1px; border-radius: 8px; padding: 3px 8px; }
.bp-pcard-kicker { font: 800 11px Nunito, sans-serif; letter-spacing: 2px; text-transform: uppercase; opacity: .7; }
.bp-pcard-name { font-family: 'Lilita One', 'Arial Black', sans-serif !important; font-size: 38px !important; margin: 2px 0 8px !important; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.25); word-break: break-word; }
.bp-pcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bp-pcard-stats div { background: rgba(255,255,255,.88); border-radius: 10px; padding: 6px 8px; }
.bp-pcard-stats small { display: block; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: #5b6670; font-weight: 800; }
.bp-pcard-stats b { font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 20px; }
.bp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bp-badge { background: #1d2730; color: #ffe08a; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 4px 10px; }
.bp-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 14px; }
.bp-share input, .bp-more input { flex: 1; min-width: 180px; font: 700 14px Nunito, sans-serif; padding: 9px 11px; border-radius: 10px; border: 2px solid var(--bp-line); background: #07111a; color: #fff; -webkit-user-select: text; user-select: text; }
.bp-more { text-align: left; margin-top: 12px; background: #0b1822; border-radius: 12px; padding: 8px 12px; }
.bp-more summary { cursor: pointer; font-weight: 800; color: var(--bp-muted); }
.bp-more .bp-submit-row { margin-top: 8px; }
.bp-banked { display: flex; align-items: center; gap: 12px; text-align: left; background: linear-gradient(135deg, #123b2a, #0f2a20); border: 2px solid #2f8f5c; border-radius: 16px; padding: 8px 12px; margin: 12px auto 4px; max-width: 480px; flex-wrap: wrap; }
.bp-banked b { font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 22px; color: #7dffb0; display: block; }
.bp-banked small { display: block; color: #cfe8dd; font-size: 13px; }
.bp-banked-actions { display: flex; gap: 6px; margin-left: auto; }
.bp-board a { color: #fff; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.4); }
.bp-board a:hover { color: var(--bp-yellow); }
@media (max-width: 760px) {
  .bp-closet { grid-template-columns: 1fr; }
  .bp-pcard { grid-template-columns: 1fr; }
  .bp-pcard-art { max-width: 220px; margin: 0 auto; }
}

/* ---------- podium ---------- */
.bp-podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 14px auto 4px; max-width: 460px; }
.bp-podium-spot { flex: 1; display: flex; flex-direction: column; align-items: center; color: #fff; text-decoration: none; min-width: 0; }
.bp-podium-av { width: 90px; height: 120px; transition: transform .15s; }
a.bp-podium-spot:hover .bp-podium-av { transform: translateY(-4px) scale(1.04); }
.bp-podium-name { font: 400 16px 'Lilita One', 'Arial Black', sans-serif; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-podium-score { font-size: 13px; font-weight: 800; color: #7dffb0; margin-bottom: 4px; }
.bp-podium-step { width: 100%; border-radius: 12px 12px 4px 4px; display: grid; place-items: center; color: #1d2730; box-shadow: inset 0 3px 0 rgba(255,255,255,.45); }
.bp-podium-step b { font: 400 28px 'Lilita One', 'Arial Black', sans-serif; }
.p1 .bp-podium-step { height: 74px; background: linear-gradient(#ffe27a, #e6a817); }
.p2 .bp-podium-step { height: 54px; background: linear-gradient(#eef3f7, #a9b6c2); }
.p3 .bp-podium-step { height: 40px; background: linear-gradient(#f0b27a, #b86b2f); }
.p1 .bp-podium-av { width: 104px; height: 139px; }

/* ---------- emergency moves ---------- */
.bp-emergency-title { font: 800 11px Nunito, sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--bp-yellow); margin: 12px 0 6px; }
.bp-emergency { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.bp-emerg { display: flex; gap: 10px; align-items: center; background: #0f2233; border: 2px solid #24506f; border-radius: 14px; padding: 8px 12px; }
.bp-emerg-icon { width: 48px; height: 48px; flex: 0 0 48px; background: #e9eef2; border-radius: 12px; }
.bp-emerg b { font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 17px; display: block; }
.bp-emerg small { font-size: 13px; color: var(--bp-muted); line-height: 1.35; display: block; }
.bp-emergency.compact .bp-emerg small { font-size: 12px; }
@media (max-width: 760px) { .bp-emergency { grid-template-columns: 1fr; } }

/* short landscape screens (phones) */
@media (max-height: 520px) {
  .bp-top { min-height: 0; padding: 4px 8px; gap: 6px; }
  .bp-hud { padding: 3px 10px; gap: 10px; border-radius: 11px; }
  .bp-hud .bp-lvl { font-size: 15px; max-width: 120px; }
  .bp-stat b { font-size: 17px; } .bp-stat small, .bp-flood small { font-size: 9px; }
  .bp-hotbar { bottom: 8px; padding: 4px 6px; } .bp-hslot { width: 58px; } .bp-hslot b { font-size: 9px; }
  .bp-iconbtn { width: 32px; height: 32px; font-size: 14px; }
  .bp-valve { padding: 4px 8px; font-size: 11px; }
  #bpStick { width: 108px; height: 108px; } #bpAct { width: 78px; height: 78px; font-size: 26px; }
}

body.bp-touch .bp-hotbar { bottom: 10px; }
@media (max-width: 760px) { .bp-hslot { width: 60px; } .bp-hslot b { font-size: 9px; } }

/* keep the map clear of the hotbar while playing */
body.bp-playing .bp-stage { padding-bottom: 92px; }
.bp-hotbar { bottom: 10px; }
@media (max-height: 520px) { body.bp-playing .bp-stage { padding-bottom: 62px; } .bp-hotbar { bottom: 4px; } }

/* ---------- combo meter ---------- */
.bp-combo { display: none; flex-direction: column; align-items: center; line-height: 1; min-width: 58px; padding: 3px 8px; border-radius: 10px; background: #2a2208; border: 2px solid var(--bp-yellow); color: var(--bp-yellow); }
.bp-combo.show { display: flex; }
.bp-combo.bump { animation: bpPop .35s ease-out; }
.bp-combo b { font: 400 20px 'Lilita One', 'Arial Black', sans-serif; }
.bp-combo small { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; }
.bp-combo i { display: block; width: 100%; height: 4px; border-radius: 3px; background: rgba(255,210,63,.25); margin-top: 3px; overflow: hidden; }
.bp-combo i span { display: block; height: 100%; width: 100%; background: var(--bp-yellow); }

/* ---------- training coach ---------- */
.bp-coach { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 4; display: none; align-items: center; gap: 10px; max-width: min(760px, calc(100% - 20px)); background: rgba(10,22,33,.9); border: 2px solid var(--bp-yellow); border-radius: 14px; padding: 8px 10px 8px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.bp-coach.show { display: flex; }
.bp-coach.ok { border-color: var(--bp-green); }
.bp-coach-step { flex: 0 0 auto; font: 800 11px Nunito, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #1d2730; background: var(--bp-yellow); border-radius: 8px; padding: 4px 8px; }
.bp-coach.ok .bp-coach-step { background: var(--bp-green); }
.bp-coach-text { font: 800 15px Nunito, sans-serif; color: #fff; line-height: 1.3; }
.bp-coach-skip { flex: 0 0 auto; font: 800 12px Nunito, sans-serif; color: var(--bp-muted); background: transparent; border: 1px solid var(--bp-line); border-radius: 8px; padding: 5px 8px; cursor: pointer; }

/* ---------- toasts ---------- */
.bp-toasts { position: absolute; right: 12px; top: 64px; z-index: 7; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; max-width: calc(100% - 24px); }
.bp-toast { display: flex; align-items: center; gap: 8px; background: rgba(13,27,40,.96); border: 2px solid #2b6a92; border-radius: 12px; padding: 8px 12px; font: 700 14px Nunito, sans-serif; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.45); transform: translateX(30px); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
.bp-toast.in { transform: none; opacity: 1; }
.bp-toast b { color: var(--bp-yellow); }
.bp-toast-icon { font-size: 18px; }
.bp-toast.combo { border-color: var(--bp-yellow); }
.bp-toast.badge, .bp-toast.challenge { border-color: #ffcc33; background: linear-gradient(135deg, #2a2410, #13202c); }
.bp-toast.unlock, .bp-toast.shop { border-color: var(--bp-green); }

/* ---------- daily job + challenge cards ---------- */
.bp-daily, .bp-challenge { display: flex; align-items: center; gap: 12px; text-align: left; border-radius: 16px; padding: 8px 12px; margin: 4px auto 10px; max-width: 760px; flex-wrap: wrap; }
.bp-daily { background: linear-gradient(135deg, #2b2a12, #142334); border: 2px solid #c9a227; }
.bp-daily.loading { opacity: .7; }
.bp-daily-badge { font: 400 18px 'Lilita One', 'Arial Black', sans-serif; color: #1d2730; background: var(--bp-yellow); border-radius: 12px; padding: 6px 10px; text-align: center; line-height: 1; }
.bp-daily-badge small { display: block; font: 800 10px Nunito, sans-serif; letter-spacing: .5px; margin-top: 3px; }
.bp-daily-copy { flex: 1; min-width: 200px; }
.bp-daily-copy b { font-family: 'Lilita One', 'Arial Black', sans-serif; font-weight: 400; font-size: 20px; display: block; }
.bp-daily-copy small { color: #e8dcae; font-size: 13px; line-height: 1.35; }
.bp-daily-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bp-daily-tag { display: inline-block; font: 800 12px Nunito, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #1d2730; background: var(--bp-yellow); border-radius: 999px; padding: 4px 12px; margin-bottom: 6px; }
.bp-chip.daily.sel { background: var(--bp-yellow); border-color: var(--bp-yellow); color: #1d2730; }
.bp-challenge { background: linear-gradient(135deg, #3a1d1a, #142334); border: 2px solid var(--bp-red); }
.bp-challenge-result { margin: 8px auto; max-width: 440px; border-radius: 12px; padding: 8px 12px; font: 800 15px Nunito, sans-serif; background: rgba(255,90,79,.14); border: 2px solid rgba(255,90,79,.6); color: #ffd0cc; }
.bp-challenge-result.won { background: rgba(61,220,132,.14); border-color: var(--bp-green); color: #c9ffe0; }
.bp-share-challenge { background: #0b1822; border-radius: 12px; padding: 8px 12px; font-size: 14px; color: var(--bp-muted); }
.bp-share-challenge b { color: #fff; }
.bp-res tr.sub td { font-size: 13px; color: var(--bp-muted); padding-top: 0; }
.bp-recap { list-style: none; padding: 0; margin: 10px auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; max-width: 480px; }
.bp-recap li { background: #0f2233; border: 2px solid #24506f; border-radius: 12px; padding: 8px 10px; font-size: 14px; }

/* ---------- pick your look ---------- */
.bp-looks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.bp-look { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #0f2233; border: 3px solid #24506f; border-radius: 16px; padding: 10px; color: var(--bp-ink); cursor: pointer; font: inherit; transition: transform .12s, border-color .12s; }
.bp-look:hover { transform: translateY(-3px); }
.bp-look.sel { border-color: var(--bp-orange); box-shadow: 0 0 0 3px rgba(255,138,61,.25); background: var(--bp-panel2); }
.bp-look canvas { width: 100px; height: 135px; }
.bp-look b { font: 400 18px 'Lilita One', 'Arial Black', sans-serif; }
.bp-look small { color: var(--bp-muted); font-size: 12px; }

/* ---------- settings ---------- */
.bp-settings { display: grid; gap: 10px; text-align: left; }
.bp-set-group { background: #0b1822; border-radius: 14px; padding: 6px 12px 10px; }
.bp-set-group .bp-emergency-title { margin: 6px 0 4px; }
.bp-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #16304a; font-weight: 800; font-size: 15px; flex-wrap: wrap; }
.bp-set-row:last-child { border-bottom: 0; }
.bp-set-row small { display: block; font-weight: 600; font-size: 12px; color: var(--bp-muted); }
.bp-set-row input[type=range] { flex: 1; min-width: 120px; accent-color: var(--bp-orange); }
.bp-set-row:has(input[type=range]) { display: grid; grid-template-columns: minmax(84px, 130px) minmax(0, 1fr) 46px; }
.bp-set-row input[type=range] { min-width: 0; width: 100%; }
.bp-set-row output { min-width: 44px; text-align: right; color: var(--bp-muted); }
.bp-cams { margin: 0; justify-content: flex-end; }
.bp-toggle { cursor: pointer; }
.bp-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.bp-toggle i { flex: 0 0 auto; width: 46px; height: 26px; border-radius: 999px; background: #24384a; position: relative; transition: background .15s; }
.bp-toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.bp-toggle input:checked + i { background: var(--bp-green); }
.bp-toggle input:checked + i::after { transform: translateX(20px); }
.bp-toggle input:focus-visible + i { outline: 3px solid var(--bp-yellow); outline-offset: 2px; }

/* ---------- touch / phone play: the map fills the screen, the HUD floats over it ---------- */
body.bp-touch.bp-playing .bp-top { position: absolute; left: 0; right: 0; top: 0; z-index: 4; pointer-events: none; padding: 6px 8px; min-height: 0; }
body.bp-touch.bp-playing .bp-top .bp-iconbtn { pointer-events: auto; background: rgba(19,40,58,.55); border-color: rgba(42,86,119,.6); }
body.bp-touch.bp-playing .bp-hud { background: rgba(10,22,33,.5); border-color: rgba(63,182,255,.25); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); padding: 3px 10px; gap: 10px; }
body.bp-touch.bp-playing .bp-hud .bp-lvl { font-size: 15px; max-width: 30vw; }
body.bp-touch.bp-playing .bp-stage { padding: 0; }
body.bp-cam #bpCanvas { border-radius: 0; box-shadow: none; }
body.bp-touch.bp-playing .bp-coach { top: 58px; }
body.bp-touch.bp-playing .bp-toasts { top: 100px; }
body.bp-touch .bp-hotbar { background: rgba(10,22,33,.42); border-color: rgba(63,182,255,.3); box-shadow: none; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); bottom: 12px; padding: 4px 6px; gap: 5px; }
body.bp-touch .bp-hslot { width: 56px; background: rgba(13,29,42,.55); }
body.bp-touch .bp-hslot.full { background: rgba(22,50,74,.65); }
body.bp-touch .bp-hslot b { font-size: 9px; }
body.bp-touch .bp-hotbar-label { display: none; }
body.bp-touch.bp-playing .bp-exit { display: none; }
@media (max-width: 599px) {
  body.bp-touch.bp-playing .bp-hotbar { bottom: 154px; }
  body.bp-touch.bp-playing .bp-top { flex-wrap: wrap; gap: 6px; }
  body.bp-touch.bp-playing .bp-tools { order: 1; width: 100%; justify-content: flex-end; margin: 0; }
  body.bp-touch.bp-playing .bp-tools .bp-iconbtn { width: 34px; height: 34px; font-size: 14px; }
  body.bp-touch.bp-playing .bp-hud { order: 2; flex: 1 1 100%; display: none; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; }
  body.bp-touch.bp-playing .bp-hud.show { display: grid; }
  body.bp-touch.bp-playing .bp-hud .bp-lvl, body.bp-touch.bp-playing .bp-valve { display: none; }
  body.bp-touch.bp-playing .bp-stat { min-width: 0; }
  body.bp-touch.bp-playing .bp-stat b { font-size: 18px; }
  body.bp-touch.bp-playing .bp-flood { min-width: 0; }
  body.bp-touch.bp-playing .bp-combo:not(.show) { display: none; }
  body.bp-touch.bp-playing .bp-coach { top: 96px; }
  body.bp-touch.bp-playing .bp-toasts { top: 150px; }
  .bp-coach { flex-wrap: wrap; } .bp-coach-text { font-size: 14px; }
  .bp-recap { grid-template-columns: 1fr; }
}
@media (max-height: 520px) {
  body.bp-touch.bp-playing .bp-coach { top: 46px; padding: 5px 8px; } .bp-coach-text { font-size: 13px; }
  body.bp-touch.bp-playing .bp-toasts { top: 56px; }
}
.bp-banked .bp-today { color: var(--bp-yellow); font-weight: 800; }

/* ---------- card customisation ---------- */
.bp-pcard-title { margin: -4px 0 10px; }
.bp-pcard-art { padding: 0; overflow: hidden; }
.bp-pcard-art .bp-portrait { width: 100% !important; height: auto !important; aspect-ratio: 190 / 250; }
.bp-minicard { width: 200px; border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 10px 30px rgba(0,0,0,.35); }
.bp-minicard-art { width: 100%; border-radius: 10px; overflow: hidden; border: 3px solid rgba(255,255,255,.75); }
.bp-minicard-art .bp-portrait { width: 100% !important; height: auto !important; aspect-ratio: 150 / 190; }
.bp-minicard-name { font: 400 22px 'Lilita One', 'Arial Black', sans-serif; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.bp-bd-art { width: 92px; height: 72px; border-radius: 10px; }
.bp-title-art { min-height: 54px; display: grid; place-items: center; }

/* ---------- rotate-to-landscape prompt (phones) ---------- */
.bp-rotate { display: none; position: absolute; inset: 0; z-index: 9; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: rgba(6,14,22,.92); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
body.bp-rotate-needed .bp-rotate { display: flex; }
.bp-rotate b { font: 400 30px 'Lilita One', 'Arial Black', sans-serif; color: #fff; }
.bp-rotate p { color: var(--bp-muted); font-size: 16px; max-width: 300px; margin: 0; }
.bp-rotate-phone { width: 64px; height: 108px; border: 5px solid #fff; border-radius: 14px; position: relative; margin-bottom: 10px; animation: bpRotate 2.2s ease-in-out infinite; }
.bp-rotate-phone span { position: absolute; left: 50%; bottom: 6px; width: 16px; height: 4px; margin-left: -8px; border-radius: 2px; background: #fff; }
@keyframes bpRotate { 0%, 20% { transform: rotate(0); } 50%, 80% { transform: rotate(-90deg); border-color: var(--bp-yellow); } 100% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .bp-rotate-phone { animation: none; transform: rotate(-90deg); } }
