/* SPDX-License-Identifier: GPL-3.0-or-later */
/* The pause ring (phone-menu.mjs): icons round the inner border of the viewport, a preview and the item panel in the middle. Positions and sizes are
   set from the script (the whole viewport); the --ring-* tokens live in tokens.css. The root has no dim, so the live game (Melee's own pause, #811) stays clear at the edges: only the middle carries a soft one. System fonts: no network load. */
#phone-menu {
  position: fixed; inset: 0; z-index: 100; box-sizing: border-box; color: var(--pm-text); font: 500 15px/1.2 Inter, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none;
}
#phone-menu *, .pm-back { box-sizing: border-box; }
#phone-menu [hidden], #phone-menu[hidden] { display: none !important; }
.pm-head { flex: none; height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--pm-line); }
/* ---- the ring */
.pm-run { display: contents; }
#phone-menu .pm-ib { position: absolute; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 0; gap: 0; color: var(--pm-text); border-radius: 10px;
  background: var(--ring-glass); backdrop-filter: blur(4px); }
.pm-ib svg { width: 58%; height: 58%; }
#phone-menu .pm-ib:hover, #phone-menu .pm-ib:focus-visible { background: var(--ring-glass-sel); border-color: var(--pm-blue); }
#phone-menu .pm-ib[aria-current=page] { background: var(--pm-sel); border-color: var(--pm-blue); color: var(--pm-blue); }
.pm-gl { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none; color: var(--pm-dim); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; text-shadow: 0 1px 6px #000; }
.pm-gl[data-edge=left], .pm-gl[data-edge=right] { writing-mode: vertical-rl; }
.pm-centre { position: absolute; left: var(--ring-cx); top: var(--ring-cy); transform: translate(-50%, -50%); box-sizing: border-box; width: min(var(--ring-fw), 380px); height: var(--ring-fh);
  display: flex; flex-direction: column; justify-content: center; align-items: stretch; pointer-events: none; }
.pm-centre:not(.pm-open) { background: radial-gradient(closest-side, var(--ring-dim), transparent); } /* the soft dim behind the preview (.pm-big); the open panel is its own opaque box */
.pm-centre.pm-many { width: min(var(--ring-fw), 780px); }
.pm-centre.pm-pads { width: min(var(--ring-fw), 880px); }
.pm-many .pm-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); grid-auto-rows: max-content; align-content: start; } /* rows size to their content even when the panel overflows (an auto row collapsed to the 40px min-height there and the wrapped controls spilled over the next row); one column under ~600px; a list's rows become the cells, every other group spans */
.pm-many .pm-list { display: contents; }
.pm-many .pm-panel > :not(.pm-list), .pm-many .pm-list > .pm-eyebrow { grid-column: 1 / -1; }
.pm-centre > * { pointer-events: auto; }
.pm-centre > .pm-big { pointer-events: none; }
.pm-centre.pm-open { height: auto; max-height: var(--ring-fh); justify-content: flex-start; background: var(--ring-panel); border: 1px solid var(--pm-border); border-radius: 14px; overflow: hidden; box-shadow: 0 10px 40px #000a; }
.pm-centre:not(.pm-open) .pm-head { order: 2; flex: none; height: auto; justify-content: center; border: 0; }
.pm-centre:not(.pm-open) .pm-head-title { display: none; }
.pm-big { order: 1; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; text-shadow: 0 2px 12px #000; opacity: 0; transition: opacity 120ms; }
.pm-big.on { opacity: 1; }
.pm-centre.pm-open .pm-big { display: none; }
.pm-big svg { width: min(120px, calc(var(--ring-fh) * .35)); height: min(120px, calc(var(--ring-fh) * .35)); stroke-width: 1.4; filter: drop-shadow(0 2px 10px #000); }
.pm-big b { font: 900 clamp(14px, 4vw, 34px)/1 Inter, system-ui, sans-serif; letter-spacing: .24em; margin-right: -.24em; text-transform: uppercase; }
.pm-big small { font-size: 11px; font-weight: 700; letter-spacing: .22em; color: var(--pm-dim); text-transform: uppercase; }
.pm-head-title { flex: 1; margin: 0; font: 700 22px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .14em; }
#phone-menu button, #phone-menu select, #phone-menu input[type=range] { min-height: 44px; min-width: 44px; font: inherit; color: inherit; }
#phone-menu button { border: 1px solid var(--pm-border); border-radius: 10px; background: transparent; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; letter-spacing: .02em; cursor: pointer; }
#phone-menu .pw button.switch { min-width: 0; min-height: 0; } /* the 44px floor above squared the 46x26 pill of .pw .switch (prefs/widget-css.mjs) */
#phone-menu button:disabled, #phone-menu .pm-fader:has(input:disabled) { opacity: .4; }
#phone-menu button[aria-pressed=true] { background: var(--pm-sel); border-color: var(--pm-blue); }
#phone-menu button:focus-visible, #phone-menu select:focus-visible, #phone-menu input:focus-visible { outline: 2px solid var(--pm-blue); outline-offset: 2px; }
.pm-icon { width: 44px; padding: 0 !important; color: var(--pm-dim); }
.pm-resume { min-width: 96px; background: var(--pm-blue) !important; border-color: var(--pm-blue) !important; color: var(--pm-bg); font: 700 17px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif !important; letter-spacing: .12em !important; }
.pm-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 12px; }
.pm-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.pm-panel > * { flex-shrink: 0; }
.pm-nowbox, .pm-ratebox, .pm-calbox, .pm-fxbox, .pm-judges { display: flex; flex-direction: column; gap: 8px; }
.pm-list { display: flex; flex-direction: column; gap: 6px; }
.pm-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.pm-muteall { grid-auto-flow: row; }
.pm-lobby { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pm-lobby > .pm-eyebrow { grid-column: 1 / -1; }
.pm-info { min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 12px; border: 1px solid var(--pm-line); border-radius: 10px; background: var(--pm-panel); }
.pm-info b { font-size: 13px; font-weight: 600; color: var(--pm-text); overflow-wrap: anywhere; }
#phone-menu .pm-lobby .pm-action { display: grid; align-content: center; justify-items: start; gap: 1px; min-height: 44px; padding: 4px 12px; text-align: left; }
.pm-lobby .pm-sub { overflow-wrap: anywhere; }
.pm-eyebrow { margin: 2px 0 0; font: 700 12px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .16em; color: var(--pm-dim); text-transform: uppercase; }
.pm-pickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pm-tile { position: relative; display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 12px; border: 1px solid var(--pm-border); border-radius: 10px; background: var(--pm-panel); color: var(--pm-dim); }
.pm-tile-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-tile small { font-size: 12px; }
.pm-tile b { font-weight: 600; font-size: 15px; color: var(--pm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#phone-menu .pm-tile select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: pointer; }
.pm-tile:focus-within { outline: 2px solid var(--pm-blue); outline-offset: 2px; }
.pm-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pm-chip { font-size: 12px; padding: 0 2px !important; }
.pm-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.pm-step { display: grid; grid-template-columns: 44px 1fr 44px; gap: 4px; align-items: center; border: 1px solid var(--pm-line); border-radius: 10px; background: var(--pm-panel); }
.pm-step button { border: 0 !important; font-size: 20px; }
.pm-step-v { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; }
.pm-step-v small { font-size: 10px; letter-spacing: .1em; color: var(--pm-dim); }
.pm-step-v b { font-size: 15px; }
.pm-fx-bar { flex: none; display: flex; align-items: center; justify-content: space-between; }
.pm-fx-count { font: 700 15px/1 Inter, system-ui, sans-serif; color: var(--pm-blue); }
.pm-fxbox { flex: 1 0 auto; }
.pm-fx-grid { flex: 1 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(72px, 1fr); gap: 8px; }
.pm-fxcell { display: flex; flex-direction: column; gap: 4px; min-height: 72px; }
.pm-fxcell input[type=range] { flex: none; width: 100%; height: 30px; margin: 0; }
.pm-fxcell input[hidden] { display: none; } /* a cue with no amount (DIAMOND) has no bar; the grid row keeps its tiles level */
.pm-fxcell input:disabled { opacity: .35; }
.pm-fx-state { font-size: 11px; color: #8d93a0; }
.pm-fx[aria-pressed=true] .pm-fx-state { color: #9cd2ff; }
#phone-menu .pm-fx { flex: 1; flex-direction: column; gap: 6px; padding: 4px !important; background: #111317; border: 1px solid var(--pm-line); color: #6d7380; }
#phone-menu .pm-fx[aria-pressed=true] { background: #14202d; border-color: #2c5d86; color: var(--pm-blue); }
.pm-fx b { font-size: 13px; font-weight: 600; color: #a9a59a; text-align: center; }
.pm-fx[aria-pressed=true] b { color: var(--pm-text); }
.pm-nowrow { display: flex; align-items: center; height: 76px; border: 1px solid var(--pm-line); border-radius: 12px; background: var(--pm-panel); }
#phone-menu .pm-arrow { flex: none; width: 44px; height: 76px; border: 0; border-radius: 0; color: var(--pm-dim); }
.pm-now { position: relative; flex: 1; min-width: 0; height: 76px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 4px; }
#phone-menu .pm-now select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: pointer; }
.pm-now:focus-within { outline: 2px solid var(--pm-blue); outline-offset: -2px; border-radius: 10px; }
.pm-now-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 700 20px/1.1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; }
.pm-now-sub { color: var(--pm-dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#phone-menu .pm-phrase { background: var(--pm-panel); flex-direction: column; gap: 2px; min-width: 0; }
.pm-phrase small { font-size: 11px; font-weight: 500; color: var(--pm-dim); }
.pm-phrase b { max-width: 100%; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-calhead { display: flex; align-items: baseline; justify-content: space-between; }
.pm-calhead small { font-size: 12px; color: var(--pm-dim); }
.pm-hits { position: relative; flex: none; height: 14px; border-radius: 7px; background: var(--pm-bg); }
.pm-hits i { position: absolute; top: 2px; bottom: 2px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #6d7380; }
.pm-hits .lit { background: var(--pm-text); }
.pm-hits .pm-hit-mid { left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; border-radius: 0; background: #6d7380; }
#phone-menu .pm-playrow { grid-auto-flow: row; grid-template-columns: 2fr 1fr; }
#phone-menu .pm-playrow button { min-height: 64px; }
#phone-menu .pm-playrow button:first-child:not(.pm-phrase) { background: var(--pm-blue); border-color: var(--pm-blue); color: var(--pm-bg); font: 700 22px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; }
#phone-menu .pm-playrow button:not(:first-child) { flex-direction: column; font-size: 12px; }
.pm-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pm-cal { grid-template-columns: 56px 1fr 56px; }
.pm-faders { flex: 1 1 auto; min-height: 150px; display: grid; grid-template-columns: minmax(0,1.3fr) repeat(3,minmax(0,1fr)); gap: 8px; }
.pm-faders > :only-child { grid-column: 1 / -1; } /* no song rows yet: ALL alone fills the band */
.pm-fader { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 0; min-width: 0; padding: 12px 0; border-radius: 12px; background: var(--pm-panel);
  font: 600 13px/1 Inter, system-ui, sans-serif; color: #a9a59a; }
.pm-fader-all { background: #1a2430; color: var(--pm-text); }
.pm-fader input { flex: 1; min-height: 0; width: 44px; writing-mode: vertical-lr; direction: rtl; accent-color: var(--pm-blue); background: transparent; touch-action: none; }
.pm-fader output { color: var(--pm-text); font: 700 22px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; }
#phone-menu .pm-muteall .pm-mute-all { min-height: 56px; color: var(--pm-amber); border-color: var(--pm-amber); background: var(--pm-panel); font-size: 17px; }
#phone-menu .pm-mute-all[aria-pressed=true] { background: var(--pm-amber); color: var(--pm-bg); }
.pm-chip-line { min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--pm-line); border-radius: 12px; background: var(--pm-panel); color: var(--pm-dim); }
.pm-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--pm-amber); }
.pm-chip-line[data-state=on] .pm-dot { background: var(--pm-on); }
.pm-chip-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.pm-chip-t > span:first-child { color: var(--pm-text); }
.pm-chip-sub { font-size: 12px; font-weight: 500; color: var(--pm-dim); }
.pm-portbox { display: flex; flex-direction: column; gap: 6px; }
.pm-ports { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pm-port { min-height: 88px; min-width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--pm-border); border-radius: 10px; background: var(--pm-panel); }
.pm-port b { font: 700 22px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; color: var(--pm-dim); }
#phone-menu button.pm-port { padding: 0; min-height: 88px; } .pm-port { font: inherit; color: inherit; cursor: pointer; }
.pm-port span { max-width: 100%; padding: 0 2px; font-size: 11px; color: #a9a59a; text-align: center; overflow-wrap: break-word; }
.pm-portwrap { display: flex; flex-direction: column; gap: 8px; }
.pm-slothead { display: flex; align-items: center; gap: 12px; }
.pm-slothead b { font: 700 22px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; color: var(--pm-amber); }
.pm-port[data-dev=on] { border-color: var(--pm-blue); }
.pm-port[data-dev=on] b { color: var(--pm-amber); }
.pm-port[data-dev=none] span { color: #6d7380; }
.pm-mapping { margin-top: auto; grid-auto-flow: row; }
#phone-menu .pm-mapping .pm-action { min-height: 52px; justify-content: space-between; padding: 0 14px; }
.pm-mapping .pm-action::after { content: "›"; font-size: 22px; color: var(--pm-dim); }
.pm-chip-line[data-state=on] { color: var(--pm-text); border-color: var(--pm-on); }
.pm-switch-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 12px; border: 1px solid var(--pm-line); border-radius: 10px; background: var(--pm-panel); }
/* The sheet's buttons are min 44px tall: keep that as the hit area and draw the 32px track inside it, the knob centred on it. */
#phone-menu button.pm-switch, #phone-menu button.pm-switch[aria-pressed=true] { position: relative; padding: 0; width: 52px; min-width: 52px; height: 44px; border: 0; border-radius: 0; background: transparent; }
#phone-menu button.pm-switch::before { content: ""; position: absolute; inset: 6px 0; border-radius: 16px; background: var(--pm-border); transition: background .12s; }
#phone-menu button.pm-switch[aria-pressed=true]::before { background: var(--pm-on); } /* the sheet's green switch: one on-colour everywhere */
#phone-menu button.pm-switch::after { content: ""; position: absolute; border-radius: 50%; background: var(--pm-text); transition: left .12s; top: 10px; left: 4px; width: 24px; height: 24px; }
#phone-menu button.pm-switch[aria-pressed=true]::after { left: 24px; }
#phone-menu .pm-wide { min-height: 48px; width: 100%; }
.pm-actions { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(76px, 88px); }
#phone-menu .pm-actions .pm-action { display: grid; grid-template-rows: 1fr auto auto; justify-items: start; justify-content: start; align-items: start; gap: 1px; padding: 10px 12px; text-align: left; font-size: 15px; }
.pm-sub { font-size: 11px; font-weight: 500; color: var(--pm-dim); }
.pm-actions .pm-action:disabled { opacity: .45; }
.pm-end { margin-top: auto; }
.pm-end .pm-action { min-height: 52px; flex-direction: row; font-size: 15px; }
#phone-menu .pm-quit { color: var(--pm-quit); border-color: var(--pm-quit); font-weight: 700; }
/* The SLIPPI sub-page (slippi-settings.mjs): shown alone; its own Back sits in the title row. */
#phone-menu.pm-onslippi { display: flex; flex-direction: column; background: var(--pm-bg); }
#phone-menu.pm-onslippi > :not(.pm-slippi) { display: none; }
.pm-slippi { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.pm-slp-head { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 8px; }
.pm-slp-back { min-width: 88px; }
.pm-slp { display: flex; flex-direction: column; gap: 10px; }
.pm-slp-title { margin: 0; font: 700 22px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .14em; }
.pm-slp-note { margin: 0; font-size: 13px; line-height: 1.4; color: var(--pm-dim); }
.pm-slp-note code { display: block; margin: 4px 0; font: 12px ui-monospace, monospace; color: var(--pm-text); overflow-wrap: anywhere; }
.pm-slp-h3 { margin: 12px 0 0; font: 700 16px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .14em; }
.pm-slp-h4 { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--pm-amber); }
.pm-slp-cap { margin: 0; font-size: 13px; line-height: 1.4; color: var(--pm-dim); }
.pm-slp-chat-row { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.pm-slp-chat-row select { flex: 1; width: auto; }
.pm-slp-dpad { width: 1.2em; opacity: .7; text-align: center; }
.pm-slp-err { margin: 0; font-weight: 600; color: var(--pm-quit); }
.pm-slp-code { color: var(--pm-amber); }
.pm-slp-link { align-self: center; padding: 12px; color: var(--pm-blue); }
.pm-slp-in { box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--pm-text); background: var(--pm-panel); border: 1px solid var(--pm-border); border-radius: 6px; }
.pm-slp-in:focus-visible { outline: 2px solid var(--pm-blue); outline-offset: -2px; }
button.pm-slp-link { background: none; border: 0; font: inherit; text-decoration: underline; cursor: pointer; }
#phone-menu .pm-primary { background: var(--pm-blue); border-color: var(--pm-blue); color: var(--pm-bg); }
.pm-slippi-row { width: 100%; text-align: left; }
.pm-slippi-row[data-state=off] { color: var(--pm-dim); }
.pm-back { position: fixed; top: 8px; left: 8px; z-index: 101; min-width: 88px; min-height: 44px; border: 1px solid var(--pm-border, #2a2e35); border-radius: 10px;
  background: #14171c; color: #ece9e0; font: 700 15px/1 Inter, system-ui, sans-serif; letter-spacing: .08em; }
.pm-back[hidden] { display: none; }
/* A pad or the keys move focus (phone-menu.mjs nav(), data-nav=pad): the ring shows on every control, not only after a key. */
#phone-menu[data-nav=pad] button:focus, #phone-menu[data-nav=pad] input:focus { outline: 3px solid var(--pm-amber); outline-offset: 2px; }
#phone-menu[data-nav=pad] .pm-tile:focus-within, #phone-menu[data-nav=pad] .pm-now:focus-within { outline: 3px solid var(--pm-amber); }
@media (pointer: fine) {
  #phone-menu button:not(:disabled):hover { border-color: var(--pm-blue); }
}
/* TRAIN: in free play, one tile back into the drill. */
.pm-drill-go { width: 100%; text-align: left; justify-content: flex-start !important; }

/* TRAIN: the per-drill settings page (drill-page.mjs). Tokens: ground #121218, card #1A1A21, line #26262F, gold #FFC83D, green #5BD07A, red #FF8A8A. */
.pm-dp {
  display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 14px; background: var(--dp-ground); }
.pm-dp[hidden], .pm-dp [hidden] { display: none !important; }
.pm-dp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-dp-title { min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.pm-dp-name { min-width: 0; color: var(--pm-text); font: 700 26px/1.05 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-dp-tag { font: 700 12px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .16em; color: var(--dp-gold); }
#phone-menu .pm-dp-gear { flex: none; width: 44px; height: 44px; padding: 0; border-color: var(--dp-line); border-radius: 12px; background: var(--dp-card); color: var(--pm-dim); }
.pm-dp-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--dp-line); border-radius: 14px; background: var(--dp-card); }
.pm-dp-stats { display: flex; gap: 8px; }
.pm-dp-stat { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pm-dp-stat b { font: 700 30px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; color: var(--pm-text); }
.pm-dp-stat span { font: 700 11px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .12em; color: var(--pm-dim); }
.pm-dp-stat[data-tone=ok] b { color: var(--dp-green); }
.pm-dp-stat[data-tone=bad] b { color: var(--dp-red); }
.pm-dp-bar { height: 6px; border-radius: 3px; background: var(--dp-line); overflow: hidden; }
.pm-dp-bar i { display: block; height: 100%; background: var(--dp-green); }
.pm-dp-how { margin: 0; padding: 0 2px; font-size: 14px; line-height: 1.5; color: var(--pm-dim); }
.pm-dp-how kbd { display: inline-block; min-width: 24px; padding: 1px 6px; border: 1px solid var(--dp-line); border-radius: 6px; background: var(--dp-card); color: var(--pm-text); font: 700 13px/1.4 Inter, system-ui, sans-serif; text-align: center; }
.pm-dp-group { display: flex; flex-direction: column; gap: 6px; }
.pm-dp-group .pm-dp-card { gap: 0; padding: 0 12px; }
.pm-dp-group .pm-dp-card > * + * { border-top: 1px solid var(--dp-line); }
.pm-dp .pm-switch-row { min-height: 56px; padding: 0; border: 0; border-radius: 0; background: transparent; }
#phone-menu .pm-dp .pm-wide { min-height: 56px; border: 0; border-radius: 0; justify-content: space-between; padding: 0; }
.pm-dp .pm-fader { flex-direction: row; align-items: center; gap: 12px; min-height: 56px; padding: 0; border-radius: 0; background: transparent; }
.pm-dp .pm-fader > span { flex: none; min-width: 84px; }
.pm-dp .pm-fader input { flex: 1; width: auto; min-width: 0; height: 44px; writing-mode: horizontal-tb; direction: ltr; accent-color: var(--dp-gold); }
.pm-dp .pm-fader output { flex: none; min-width: 36px; text-align: right; font-size: 18px; }
.pm-dp-foot { position: sticky; bottom: 0; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 8px; background: var(--dp-ground); } /* START REPS stays in reach of the panel scroll */
#phone-menu .pm-dp-go { min-height: 52px; border-color: var(--dp-gold); border-radius: 14px; background: var(--dp-gold); color: var(--dp-ground); font: 700 20px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .12em; }
.pm-dp-warn { margin: 0; padding: 10px 12px; border: 1px solid var(--dp-red); border-radius: 12px; font-size: 13px; color: var(--dp-red); }
.pm-now-hist { color: var(--pm-dim); font-size: 13px; padding: 0 4px; }
.pm-hid { display: flex; flex-direction: column; gap: 6px; }
.pm-connect { min-height: 48px; padding: 0 14px; border: 1px solid var(--pm-border); border-radius: 10px; background: var(--pm-panel); color: var(--pm-text); font: 700 14px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .1em; }
.pm-note { margin: 0; padding: 0 12px; font-size: 12px; color: var(--pm-dim); }

/* ---- the song player as the ring's top strip while paused (play.mjs dock moves the one #song-bar here): the viewport's width, over its top edge, --ring-top high.
   layout() writes --ring-l / -t / -w. The bar's own transport stays a modal thing: prev / stop / next / MARK are hidden here, VOL (data-act=vol) shows. */
#phone-menu #song-bar { position: absolute; left: var(--ring-l, 0); top: var(--ring-t, 0); width: var(--ring-w, 100%); height: var(--ring-top); max-width: none; transform: none; z-index: 1;
  flex-wrap: nowrap; justify-content: flex-start; gap: 6px; padding: 4px 6px; background: var(--ring-glass); backdrop-filter: blur(4px); border: 1px solid var(--pm-border); border-radius: 10px; }
#phone-menu.pm-onslippi #song-bar, #phone-menu #song-bar :is([data-act=prev], [data-act=stop], [data-act=next], [data-act=mark]) { display: none; }
#phone-menu #song-bar [data-act=vol] { display: inline-flex; order: 4; }
#phone-menu #song-bar [data-act=play] { order: 0; }
#phone-menu #song-bar .info { display: contents; }
#phone-menu #song-bar button.title { order: 1; display: block; flex: 0 1 28%; min-width: 0; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding: 0 4px; border: 0; font: 600 13px/1 Inter, system-ui, sans-serif; text-decoration: underline dotted; text-underline-offset: 3px; }
#phone-menu #song-bar .seek-wrap { order: 2; flex: 1 1 0; min-width: 56px; }
#phone-menu #song-bar input[type=range] { min-width: 0; width: 100%; }
#phone-menu #song-bar .time { order: 3; flex: none; font-size: 12px; }
body.paused.peek #phone-menu { visibility: hidden; pointer-events: none; } /* #907 PAUSE_PEEK */
/* A list screen of depth 2+ inside the sheet (#552): shown alone, the BACK button pops one level. */
#phone-menu.pm-onlist { display: flex; flex-direction: column; background: var(--pm-bg); overflow-y: auto; }
#phone-menu.pm-onlist > :not(.pm-list-page) { display: none; }
.pm-list-page .menu-rows { list-style: none; margin: 0; padding: 0; }
.pm-list-page li { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 12px; }
.pm-list-page li.focus { outline: 2px solid currentColor; }
.pm-list-page .menu-title { flex: none; height: 52px; display: flex; align-items: center; margin: 0; padding: 0 12px 0 64px; border-bottom: 1px solid var(--pm-line); font: 700 22px/1 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .14em; } /* the .pm-head look; the back button sits left of it (#552) */
.pm-list-page li > b { font-weight: 600; }
.pm-list-page li.disabled { opacity: .5; }
/* The menu rows (menu.mjs renderMenu): .pm-list-page screens, login.html #controllers and #report-actions (#552). */
.menu:not(body) { /* body.menu is the page's settings flag */
  color: var(--menu-fg); font: 15px/20px system-ui, sans-serif;
}
.menu-title { margin: 0 0 8px; font: 700 clamp(28px, 5vw, 48px)/1 "Arial Narrow", system-ui, sans-serif; letter-spacing: .12em; }
.menu-rows { list-style: none; margin: 0; padding: 0; }
.menu-rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  height: var(--menu-row-h); box-sizing: border-box; padding: 0 14px; margin-bottom: var(--menu-gap);
  background: var(--menu-bg); border-left: 3px solid transparent; cursor: pointer; }
.menu-rows li b { font-weight: 700; letter-spacing: .08em; }
.menu-rows li span { color: var(--menu-dim); }
.menu-rows li select { min-height: 44px; max-width: 65%; box-sizing: border-box; font: inherit; color: var(--menu-fg); background: var(--menu-bg-focus);
  border: 1px solid var(--menu-dim); border-radius: 4px; padding: 0 8px; }
.menu-rows li:has(select) { height: auto; min-height: var(--menu-row-h); }
.menu-rows li.focus { outline: 2px solid var(--menu-accent); outline-offset: -2px;
  background: color-mix(in srgb, var(--menu-accent) 14%, var(--menu-bg-focus)); border-left-color: var(--menu-accent); }
.menu-rows li.focus b { color: var(--menu-accent); }
.menu-rows li.disabled { opacity: .45; cursor: default; }
/* controllers.mjs: a row that lost its input to a later bind, and the row waiting for one */
.menu-rows li.amber { border-left-color: #ffb648; }
.menu-rows li.amber span, .menu-rows li.binding span { color: #ffb648; }
.menu-rows li[data-kind="info"] { color: var(--menu-dim); font-style: italic; cursor: default; }
.menu-note { margin: 16px 0 0; font-size: 13px; line-height: 16px; color: var(--menu-dim); }
.menu-note:empty { display: none; }
@media (max-height: 520px) { .menu-title { font-size: 26px; margin-bottom: 4px; } }
