/* =========================================================
   BETTY'S POLLEN DASH — MOBILE PAGE (phone held sideways)
   Loads AFTER bettys-pollen-dash.css. Layout only:
   same game, same look, made to fit a phone.
   ========================================================= */
@keyframes bpdTurnPhone { 0%, 22%, to { transform: rotate(0); } 48%, 82% { transform: rotate(-90deg); } }
@keyframes bpdTurnBee { 0%, 22%, to { transform: translateY(0) scale(.85); } 48%, 82% { transform: translateY(-6px) scale(1.1); } }

[data-bpd=mobile] {
  --ink: #1a1a1a; --muted: #5d6875; --line: #e2e8f0; --paper: #f8f9fa;
  --blue: #0284c7; --blue-dark: #0369a1; --honey: #f2a626;
  --navy: #0b2c7a; --night: #1c1730;
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --strip: 44px; --side: 150px;
  /* board size: as tall as the screen allows, keeping 22 x 16 squares */
  --bh: min(calc(100vh - var(--strip) - 14px), calc((100vw - 2 * var(--side) - var(--safe-l) - var(--safe-r)) * 16 / 22));
  --bw: calc(var(--bh) * 22 / 16);
  --sidew: calc((100vw - var(--bw) - var(--safe-l) - var(--safe-r)) / 2);
  --pad: clamp(108px, min(calc(var(--sidew) - 26px), calc(var(--bh) * .58)), 172px);
  --pick: clamp(84px, min(calc(var(--sidew) - 44px), calc(var(--bh) * .4)), 124px);
}
@supports (height: 100dvh) {
  [data-bpd=mobile] { --bh: min(calc(100dvh - var(--strip) - 14px), calc((100vw - 2 * var(--side) - var(--safe-l) - var(--safe-r)) * 16 / 22)); }
}
[data-bpd=mobile] *, [data-bpd=mobile] ::before, [data-bpd=mobile] ::after { box-sizing: border-box; }
[data-bpd=mobile], [data-bpd=mobile] body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; background: var(--night); }
[data-bpd=mobile] body {
  color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.4;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
[data-bpd=mobile] input { -webkit-user-select: text; user-select: text; }
[data-bpd=mobile] a { color: inherit; text-decoration: none; }
[data-bpd=mobile] .bpd-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ---------- the whole screen: top strip, then left thumb | board | right thumb ---------- */
[data-bpd=mobile] .bpd-shell { position: fixed; inset: 0; }
[data-bpd=mobile] .bpd-app {
  position: absolute; inset: 0; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--bw) minmax(0, 1fr);
  grid-template-rows: var(--strip) minmax(0, 1fr);
  grid-template-areas: "hud hud hud" "left main right";
  gap: 0; padding: 0 var(--safe-r) 0 var(--safe-l);
  border: 0; border-radius: 0; box-shadow: none;
  /* the Factory floor at night, with a faint honeycomb */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23f2a626' stroke-opacity='.13' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 34px 61px,
    linear-gradient(180deg, #2a2340 0%, #1f1a33 55%, #161227 100%);
}

/* ---------- top strip ---------- */
[data-bpd=mobile] .bpd-hud {
  grid-area: hud; position: relative; z-index: 20;
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 6px; min-width: 0;
  padding: 0 max(8px, var(--safe-r)) 0 max(8px, var(--safe-l));
  margin: 0 calc(var(--safe-r) * -1) 0 calc(var(--safe-l) * -1);
  border-bottom: 3px solid #000;
  background: linear-gradient(180deg, #1e4fae 0%, var(--navy) 100%);
  box-shadow: 0 3px 0 var(--honey), 0 8px 14px rgba(0,0,0,.35);
}
[data-bpd=mobile] .bpd-m-stats { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0 auto; }
[data-bpd=mobile] .bpd-m-tools { display: flex; align-items: center; gap: 6px; flex: none; }
[data-bpd=mobile] .bpd-level-name,
[data-bpd=mobile] .bpd-m-chip { height: 30px; display: inline-flex; align-items: center; border: 2px solid #000; white-space: nowrap; }
[data-bpd=mobile] .bpd-level-name {
  flex: none; gap: 4px; margin: 0; padding: 0 11px; border-radius: 999px;
  color: var(--ink); background: linear-gradient(180deg, #fde68a, #f2a626);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 0 #000;
  font-size: .8rem; font-weight: 900; letter-spacing: 0; line-height: 1;
}
[data-bpd=mobile] .bpd-level-name span { color: var(--ink); opacity: .85; font-weight: 800; }
[data-bpd=mobile] .bpd-m-chip { min-width: 0; gap: 5px; padding: 0 9px 0 7px; border-radius: 10px; background: linear-gradient(180deg, #fff, #e6f3fb); box-shadow: 0 2px 0 #000; }
[data-bpd=mobile] .bpd-m-chip-ic { font-size: .85rem; line-height: 1; }
[data-bpd=mobile] .bpd-m-chip .bpd-meter-value { display: inline; color: var(--ink); font-size: .9rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
[data-bpd=mobile] #hudWings.is-bump { animation: bpdBump .45s ease-out; }
/* flower meter: little wilt bar + seconds left */
[data-bpd=mobile] .bpd-m-wilt { gap: 6px; }
[data-bpd=mobile] .bpd-m-wilt .bpd-wilt { width: 46px; height: 12px; margin: 0; border-width: 2px; flex: none; }
[data-bpd=mobile] .bpd-m-wilt .bpd-wilt-text { display: inline; min-width: 22px; margin: 0; color: var(--ink); font-size: .82rem; font-weight: 900; font-variant-numeric: tabular-nums; }
[data-bpd=mobile] .bpd-m-wilt .bpd-wilt-text b { font-size: .74rem; }

[data-bpd=mobile] .bpd-hud .bpd-help-btn,
[data-bpd=mobile] .bpd-hud .bpd-small-btn,
[data-bpd=mobile] .bpd-m-icon {
  width: 34px; height: 34px; min-height: 0; flex: none; display: grid; place-items: center; padding: 0;
  border: 2px solid #000; border-radius: 10px; color: var(--ink);
  background: linear-gradient(180deg, #fff, #e6f3fb); box-shadow: 0 3px 0 #000;
  font: inherit; font-size: 1rem; line-height: 1; cursor: pointer;
}
[data-bpd=mobile] .bpd-hud .bpd-help-btn { border-radius: 10px; color: var(--ink); background: linear-gradient(180deg, #fde68a, #f2a626); font-weight: 1000; font-size: 1.05rem; }
[data-bpd=mobile] .bpd-hud .bpd-help-btn:active,
[data-bpd=mobile] .bpd-hud .bpd-small-btn:active,
[data-bpd=mobile] .bpd-m-icon:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }

/* full-screen button: four corner marks that flip inward when on */
[data-bpd=mobile] .bpd-m-fs { position: relative; }
[data-bpd=mobile] .bpd-m-fs i { position: absolute; width: 6px; height: 6px; border: 0 solid var(--ink); transition: transform .15s ease; }
[data-bpd=mobile] .bpd-m-fs i:nth-child(1) { left: 8px; top: 8px; border-left-width: 2.5px; border-top-width: 2.5px; }
[data-bpd=mobile] .bpd-m-fs i:nth-child(2) { right: 8px; top: 8px; border-right-width: 2.5px; border-top-width: 2.5px; }
[data-bpd=mobile] .bpd-m-fs i:nth-child(3) { left: 8px; bottom: 8px; border-left-width: 2.5px; border-bottom-width: 2.5px; }
[data-bpd=mobile] .bpd-m-fs i:nth-child(4) { right: 8px; bottom: 8px; border-right-width: 2.5px; border-bottom-width: 2.5px; }
[data-bpd=mobile] .bpd-m-fs.is-on i { transform: rotate(180deg); }
[data-bpd=mobile] #fullBtn[hidden], [data-bpd=mobile] #bpdSplashFull[hidden] { display: none; }

/* "?" help bubble drops down from the top strip */
[data-bpd=mobile] .bpd-hud .bpd-ctrl-head { position: relative; margin: 0; }
[data-bpd=mobile] .bpd-hud .bpd-help { top: calc(100% + 13px); right: -6px; width: 250px; z-index: 60; padding: 8px 10px; }
[data-bpd=mobile] .bpd-help ul { gap: 5px; }
[data-bpd=mobile] .bpd-help li { font-size: .72rem; }
[data-bpd=mobile] .bpd-help-keys { display: none !important; }
[data-bpd=mobile] .bpd-help-touch { display: grid !important; }
[data-bpd=mobile] .bpd-help-touch .bpd-help-ic { min-width: 30px; font-size: .9rem; }
@media (hover: hover) and (pointer: fine) {
  [data-bpd=mobile] .bpd-help-keys { display: grid !important; }
  [data-bpd=mobile] .bpd-help-touch { display: none !important; }
}

/* ---------- the board ---------- */
[data-bpd=mobile] .bpd-main { grid-area: main; align-self: center; justify-self: center; width: var(--bw); min-width: 0; }
[data-bpd=mobile] .bpd-stage {
  width: 100%; border-width: 2px; border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.5), 0 0 0 3px rgba(242,166,38,.35), 0 10px 22px rgba(0,0,0,.45);
}

/* ---------- left thumb: messages up top, arrow pad below ---------- */
[data-bpd=mobile] .bpd-m-left { grid-area: left; position: relative; display: grid; place-items: center; min-width: 0; touch-action: none; }
[data-bpd=mobile] .bpd-m-left::before {
  content: ""; position: absolute; left: 50%; top: 58%; width: calc(var(--pad) + 30px); height: calc(var(--pad) + 30px);
  border-radius: 50%; background: radial-gradient(circle, rgba(255,214,150,.1) 0 58%, rgba(255,214,150,0) 72%);
  transform: translate(-50%, -50%); pointer-events: none;
}
[data-bpd=mobile] .bpd-m-left .bpd-pad { width: var(--pad); margin: 0; gap: 5px; transform: translateY(16%); }
[data-bpd=mobile] .bpd-pad button[data-dir] { border-radius: 13px; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 4px 0 #000; pointer-events: none; }
[data-bpd=mobile] .bpd-pad button[data-dir].is-held { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 0 #000; }
[data-bpd=mobile] .bpd-pad-hub {
  grid-area: 2 / 2; margin: 18%; border: 2px solid #000; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fde68a, #f2a626 70%, #d98a12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 0 #000; pointer-events: none;
}
/* messages: a speech box at the top of the left side, so they never cover the board */
[data-bpd=mobile] .bpd-m-left .bpd-toast {
  left: 8px; right: 8px; top: 8px; transform: none; max-width: none;
  padding: 5px 8px; border-radius: 10px; white-space: normal; overflow: visible; text-overflow: clip;
  font-size: .7rem; line-height: 1.25; text-align: center; z-index: 2;
}

/* ---------- right thumb: signs up top, PICK, Pause under it ---------- */
[data-bpd=mobile] .bpd-m-right {
  grid-area: right; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; min-width: 0; padding: 8px 8px 10px; touch-action: none;
}
[data-bpd=mobile] .bpd-m-signs { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; justify-content: center; }
[data-bpd=mobile] .bpd-m-signs .bpd-signs { width: min(100%, 210px); margin: 0; gap: 4px; }
[data-bpd=mobile] .bpd-sign { white-space: normal; padding: 3px 7px; border-color: #000; border-left: 4px solid var(--sign, #5cbf4a); border-radius: 8px; font-size: .62rem; line-height: 1.25; box-shadow: 0 2px 0 #000; }

[data-bpd=mobile] .bpd-m-right .bpd-pick {
  position: relative; overflow: hidden; width: var(--pick); height: var(--pick); margin: 0; padding: 0;
  display: grid; place-items: center; border: 3px solid #000; border-radius: 50%; color: var(--ink);
  background: radial-gradient(circle at 40% 32%, #fef3c7 0 12%, #fbbf24 38%, #d98a12 84%);
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), 0 5px 0 #000, 0 0 0 6px rgba(242,166,38,.18);
  font: inherit; font-size: calc(var(--pick) * .2); font-weight: 1000; letter-spacing: .03em; line-height: 1;
  cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; transform: translateY(8%);
}
[data-bpd=mobile] .bpd-m-right .bpd-pick span { position: relative; z-index: 1; }
/* PUFF cool-down: a shadow that drains from the button */
[data-bpd=mobile] .bpd-m-right .bpd-pick::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--cool, 0) * 100%); background: rgba(28,26,30,.45); }
[data-bpd=mobile] .bpd-m-right .bpd-pick.is-puff { color: #fff; background: radial-gradient(circle at 40% 32%, #f5d0fe 0 12%, #c084fc 38%, #7e22ce 84%); text-shadow: 0 2px 0 rgba(0,0,0,.35); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), 0 5px 0 #000, 0 0 0 6px rgba(192,132,252,.25); }
[data-bpd=mobile] .bpd-m-right .bpd-pick.is-held { transform: translateY(calc(8% + 3px)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 2px 0 #000, 0 0 0 6px rgba(242,166,38,.3); }

[data-bpd=mobile] .bpd-m-right #pauseBtn {
  display: inline-flex; align-items: center; min-height: 32px; margin-top: 8px; padding: 5px 14px 5px 11px; gap: 6px;
  border-color: #000; border-radius: 999px; box-shadow: 0 3px 0 #000; font-size: .78rem; font-weight: 900; transform: translateY(8%);
}
[data-bpd=mobile] .bpd-m-right #pauseBtn::before { content: ""; width: 10px; height: 11px; background: linear-gradient(90deg, currentColor 0 34%, transparent 34% 66%, currentColor 66%); border-radius: 1px; }
[data-bpd=mobile] .bpd-m-right #pauseBtn[disabled] { opacity: .5; box-shadow: 0 3px 0 #000; }

/* ---------- pop-up cards: fill the screen, picture on the left, words on the right ---------- */
[data-bpd=mobile] .bpd-overlay { position: fixed; inset: 0; z-index: 2000; padding: 8px max(12px, var(--safe-r)) 8px max(12px, var(--safe-l)); background: rgba(8,14,24,.58); }
[data-bpd=mobile] .bpd-card { width: min(100%, 420px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 14px 16px; touch-action: pan-y; }
[data-bpd=mobile] .bpd-card.is-split { width: min(100%, 640px); display: grid; grid-template-columns: 168px minmax(0, 1fr); align-items: center; column-gap: 18px; padding: 14px 18px 14px 14px; text-align: left; }
[data-bpd=mobile] .bpd-m-card-side { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
[data-bpd=mobile] .bpd-m-card-main { min-width: 0; }
[data-bpd=mobile] .bpd-card canvas { height: 60px; margin: 0 auto 6px; }
[data-bpd=mobile] .bpd-card canvas.is-boss { height: 92px; }
[data-bpd=mobile] .bpd-card h2 { margin: 6px 0 0; font-size: 1.15rem; }
[data-bpd=mobile] .bpd-m-card-main > p { margin: 0 0 8px; font-size: .86rem; }
[data-bpd=mobile] .bpd-lines { gap: 5px; margin: 0 0 10px; }
[data-bpd=mobile] .bpd-lines li { padding: 5px 9px; font-size: .8rem; }
[data-bpd=mobile] .bpd-more { margin: -2px 0 8px; }
[data-bpd=mobile] .bpd-card .bpd-btn { width: 100%; min-height: 44px; padding: 8px 18px; font-size: .95rem; }
[data-bpd=mobile] .bpd-btn-row { flex-wrap: nowrap; }
[data-bpd=mobile] .bpd-btn-row > .bpd-btn-ghost { flex: 1 1 0; min-height: 40px; }
[data-bpd=mobile] .bpd-btn-ghost.is-danger { color: #b91c1c; }
[data-bpd=mobile] .bpd-end-stats { margin: 0 0 10px; }
[data-bpd=mobile] .bpd-end-stats div { padding: 5px 4px 4px; }
[data-bpd=mobile] .bpd-end-stats strong { font-size: 1rem; }
[data-bpd=mobile] .bpd-name-form { padding: 9px 10px; }
[data-bpd=mobile] .bpd-name-form label { margin-bottom: 5px; font-size: .82rem; }
[data-bpd=mobile] .bpd-name-form input { padding: 6px 10px; font-size: 1rem; }
[data-bpd=mobile] .bpd-name-btns .bpd-btn { min-height: 38px; }
[data-bpd=mobile] .bpd-form-msg:empty { min-height: 0; margin: 0 !important; }
/* while the nickname box is up, the big button waits underneath it */
[data-bpd=mobile] .bpd-m-card-main:has(.bpd-name-form) > .bpd-btn,
[data-bpd=mobile] .bpd-m-card-main:has(.bpd-name-form) > .bpd-btn-row { display: none; }
[data-bpd=mobile] .bpd-board { max-height: max(96px, calc(100dvh - 210px)); touch-action: pan-y; }
[data-bpd=mobile] .bpd-board td { padding: 4px 8px; }
@media (max-height: 300px) {
  [data-bpd=mobile] .bpd-card.is-split { grid-template-columns: 120px minmax(0, 1fr); }
  [data-bpd=mobile] .bpd-card canvas { height: 44px; }
  [data-bpd=mobile] .bpd-card canvas.is-boss { height: 64px; }
}

/* ---------- start screen: words on the left, Betty and her flower on the right ---------- */
[data-bpd=mobile] .bpd-splash { z-index: 30; border-radius: 0; }
[data-bpd=mobile] .bpd-splash::before { border-width: 10px; border-radius: 0; box-shadow: inset 0 0 0 3px #000, inset 0 10px 24px rgba(15,23,42,.22); }
[data-bpd=mobile] .bpd-splash::after { background: radial-gradient(ellipse 42% 64% at 36% 52%, rgba(20,14,36,.6), rgba(20,14,36,.08) 76%); }
[data-bpd=mobile] .bpd-splash-inner {
  flex-direction: row; align-items: center; justify-content: center; gap: clamp(10px, 4vw, 48px);
  padding: 18px max(58px, calc(var(--safe-r) + 16px)) 16px max(58px, calc(var(--safe-l) + 16px));
}
[data-bpd=mobile] .bpd-m-splash-copy { flex: 0 1 auto; max-width: min(56vw, 480px); display: flex; flex-direction: column; align-items: center; text-align: center; }
[data-bpd=mobile] .bpd-splash-brand { margin: 0 0 8px; padding: 2px 11px; font-size: .7rem; }
[data-bpd=mobile] .bpd-splash-title { font-size: clamp(1.8rem, 11.5vh, 3.2rem); -webkit-text-stroke-width: 2px; text-shadow: 0 4px 0 var(--ink), 0 7px 0 var(--honey); }
[data-bpd=mobile] .bpd-splash-tag { max-width: 40ch; margin: clamp(8px, 3.5vh, 16px) 0 0; font-size: clamp(.72rem, 3.7vh, .92rem); line-height: 1.35; }
[data-bpd=mobile] .bpd-splash-diffs { margin-top: clamp(8px, 3vh, 14px); gap: 7px; }
[data-bpd=mobile] .bpd-splash-diff { min-width: 84px; padding: 6px 10px 5px; }
[data-bpd=mobile] .bpd-splash-best { min-height: 1.2em; margin: clamp(6px, 2.6vh, 12px) 0 0; font-size: .76rem; }
[data-bpd=mobile] .bpd-splash-saved { margin: 4px 0 0; font-size: .72rem; }
[data-bpd=mobile] .bpd-splash-newrun { padding: 3px 10px; font-size: .7rem; }
[data-bpd=mobile] .bpd-splash-scores { margin-top: clamp(6px, 2.4vh, 10px); padding: 7px 16px; font-size: .8rem; }
[data-bpd=mobile] .bpd-splash-stage { flex: none; margin: 0; }
[data-bpd=mobile] .bpd-splash-bee { width: 92px; height: 92px; margin-bottom: 56px; }
[data-bpd=mobile] .bpd-splash-patch { width: 150px; height: 100px; }
[data-bpd=mobile] .bpd-splash-flower { width: 70px; }
[data-bpd=mobile] .bpd-splash-label { padding: 9px 22px; font-size: 1rem; }
@media (max-height: 340px) {
  [data-bpd=mobile] .bpd-splash-bee { width: 74px; height: 74px; margin-bottom: 48px; }
  [data-bpd=mobile] .bpd-splash-patch { width: 128px; height: 88px; }
  [data-bpd=mobile] .bpd-splash-flower { width: 60px; }
  [data-bpd=mobile] .bpd-splash-press { gap: 6px; }
  [data-bpd=mobile] .bpd-splash-label { padding: 7px 18px; font-size: .9rem; }
  [data-bpd=mobile] .bpd-splash-brand { display: none; }
}
/* the start screen's corner buttons: home and full screen */
[data-bpd=mobile] .bpd-m-corner {
  position: absolute; z-index: 3; top: 18px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
  border: 2px solid #000; border-radius: 12px; color: var(--ink); background: linear-gradient(180deg, #fff, #e6f3fb);
  box-shadow: 0 3px 0 #000; font: inherit; font-size: 1.05rem; cursor: pointer;
}
[data-bpd=mobile] .bpd-m-corner:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
[data-bpd=mobile] .bpd-m-corner.is-left { left: max(18px, calc(var(--safe-l) + 8px)); }
[data-bpd=mobile] .bpd-m-corner.is-right { right: max(18px, calc(var(--safe-r) + 8px)); }
[data-bpd=mobile] .bpd-m-corner.bpd-m-fs i:nth-child(1) { left: 9px; top: 9px; }
[data-bpd=mobile] .bpd-m-corner.bpd-m-fs i:nth-child(2) { right: 9px; top: 9px; }
[data-bpd=mobile] .bpd-m-corner.bpd-m-fs i:nth-child(3) { left: 9px; bottom: 9px; }
[data-bpd=mobile] .bpd-m-corner.bpd-m-fs i:nth-child(4) { right: 9px; bottom: 9px; }
[data-bpd=mobile] .bpd-m-desk-note,
[data-bpd=mobile] .bpd-rotate a { border: 2px solid #000; border-radius: 999px; color: var(--blue-dark); box-shadow: 0 2px 0 #000; font-weight: 800; }
[data-bpd=mobile] .bpd-m-desk-note { display: none; position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 4px 12px; background: rgba(255,255,255,.95); font-size: .74rem; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { [data-bpd=mobile] .bpd-m-desk-note { display: block; } }

/* ---------- held upright: "Turn your phone sideways!" ---------- */
[data-bpd=mobile] .bpd-rotate {
  display: none; position: fixed; inset: 0; z-index: 5000; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 30px 26px; text-align: center;
  background: linear-gradient(180deg, #bfe3ff 0 12%, #6fcf4f 12% 14.5%, #4a9a3c 14.5% 15.5%, #2a2340 15.5% 100%);
}
[data-bpd=mobile] .bpd-rotate::before {
  content: ""; position: absolute; left: 0; right: 0; top: 15.5%; bottom: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23f2a626' stroke-opacity='.2' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 34px 61px;
}
[data-bpd=mobile] .bpd-rotate > * { position: relative; }
@media (orientation: portrait) { [data-bpd=mobile] .bpd-rotate { display: flex; } }
[data-bpd=mobile] .bpd-rotate-scene { position: relative; width: 170px; height: 150px; }
[data-bpd=mobile] .bpd-rotate-phone {
  position: absolute; left: 50%; top: 50%; width: 74px; height: 128px; margin: -64px 0 0 -37px;
  border: 4px solid #000; border-radius: 16px; background: linear-gradient(180deg, #1e4fae, var(--navy));
  box-shadow: 0 5px 0 #000; animation: bpdTurnPhone 3s ease-in-out infinite;
}
[data-bpd=mobile] .bpd-rotate-phone::before { content: ""; position: absolute; inset: 8px 6px; border-radius: 6px; background: linear-gradient(180deg, #f2a626 0 16%, #1c1730 16% 46%, #cbd5e1 46% 54%, #eef7fc 54% 86%, #4a9a3c 86%); }
[data-bpd=mobile] .bpd-rotate-bee { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -44px 0 0 -28px; animation: bpdTurnBee 3s ease-in-out infinite; }
[data-bpd=mobile] .bpd-rotate-bee img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
[data-bpd=mobile] .bpd-rotate-bee .flap-a { animation: bpdFlapA .24s steps(1) infinite; }
[data-bpd=mobile] .bpd-rotate-bee .flap-b { animation: bpdFlapB .24s steps(1) infinite; }
[data-bpd=mobile] .bpd-rotate h1 { margin: 0; color: #fff; font-size: 1.9rem; font-weight: 900; line-height: 1.05; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink), 0 7px 0 var(--honey); }
[data-bpd=mobile] .bpd-rotate p { max-width: 30ch; margin: 0; color: #fff; font-size: .95rem; font-weight: 800; text-shadow: 0 2px 0 var(--ink), 0 0 8px rgba(0,0,0,.55); }
[data-bpd=mobile] .bpd-rotate a { margin-top: 4px; padding: 6px 14px; background: #fff; font-size: .8rem; }
@media (prefers-reduced-motion: reduce) {
  [data-bpd=mobile] .bpd-rotate-phone { animation: none; transform: rotate(-90deg); }
  [data-bpd=mobile] .bpd-rotate-bee, [data-bpd=mobile] .bpd-rotate-bee img { animation: none; }
  [data-bpd=mobile] .bpd-rotate-bee .flap-b { opacity: 0; }
}

/* ---------- smaller phones ---------- */
@media (max-width: 700px) {
  [data-bpd=mobile] { --side: 140px; }
  [data-bpd=mobile] .bpd-hud, [data-bpd=mobile] .bpd-m-stats, [data-bpd=mobile] .bpd-m-tools { gap: 4px; }
  [data-bpd=mobile] .bpd-level-name { padding: 0 8px; font-size: .72rem; }
  [data-bpd=mobile] .bpd-m-chip { padding: 0 6px 0 5px; gap: 3px; }
  [data-bpd=mobile] .bpd-m-chip .bpd-meter-value { font-size: .8rem; }
  [data-bpd=mobile] .bpd-m-wilt .bpd-wilt { width: 32px; }
  [data-bpd=mobile] .bpd-hud .bpd-help-btn, [data-bpd=mobile] .bpd-hud .bpd-small-btn, [data-bpd=mobile] .bpd-m-icon { width: 31px; height: 31px; font-size: .9rem; }
  [data-bpd=mobile] .bpd-hud .bpd-m-fs i { width: 5px; height: 5px; }
}
