/* =========================================================
   FOCUS ROOM (#/focus) — pomo.js
   The scene is the hero; the timer sits over it like a film title (bottom-left by default),
   with the round drawn as a route beneath. Panels are dark glass whatever the dashboard mode.
   ========================================================= */
body.route-focus { overflow: hidden; }
body.route-focus .hdr, body.route-focus .btabs, body.route-focus .bg-orbs { display: none !important; }
body.route-focus .toasts { bottom: calc(24px + env(safe-area-inset-bottom)); left: auto; right: 24px; transform: none; align-items: flex-end; }

.pm {
  --pm-acc: var(--acc2);
  --pm-ink: #f4f5f8;
  --pm-ink2: rgba(244, 245, 248, .74);
  --pm-ink3: rgba(244, 245, 248, .48);
  --pm-line: rgba(255, 255, 255, .1);
  --pm-glass: rgba(12, 14, 20, .62);
  --pm-soft: rgba(255, 255, 255, .07);
  --pm-fg: #fff;
  --pm-pad: clamp(20px, 4vw, 64px);
  position: fixed; inset: 0; z-index: 5; overflow: hidden;
  color: var(--pm-ink); color-scheme: dark; font-family: var(--font);
  animation: none; -webkit-user-select: none; user-select: none;
}
.pm input, .pm textarea, .pm select { -webkit-user-select: text; user-select: text; }
.pm[data-color="warm"] { --pm-fg: #f7dcaa; }
.pm[data-color="accent"] { --pm-fg: var(--pm-acc); }
.pm.pm-light { --pm-fg: #14161c; }
.pm.pm-light[data-color="warm"] { --pm-fg: #7a4d0c; }
.pm.pm-light[data-color="accent"] { --pm-fg: var(--acc-deep); }
.pm svg { width: 18px; height: 18px; }
.pm :focus-visible { outline: 2px solid var(--pm-acc); outline-offset: 2px; }

/* ---------- scene ---------- */
.pm-bg { position: absolute; inset: 0; background: #0a0c12; overflow: hidden; }
.pm-media { position: absolute; inset: 0; filter: blur(var(--pm-blur, 0px)); transform: scale(calc(1 + var(--pm-bz, 0) * .006)); transition: filter .4s, transform .4s, background-color .6s; }
.pm-poster, .pm-img, .pm-file { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: center / cover no-repeat; }
/* the poster is the loop's own first frame, so it shows sharp and the video takes over without a jump */
/* the loop: two copies crossfade at the seam (pomo.js mountVideo) */
.pm-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
.pm-media.playing .pm-loop.on { opacity: 1; }
.pm-tiny { filter: blur(24px); transform: scale(1.1); }
.pm-full { opacity: 0; transition: opacity .9s ease; }
.pm-full.in { opacity: 1; }
.pm-grad { position: absolute; inset: 0; background-size: 180% 180%; background-position: 0% 40%; }
.pm.pm-anim .pm-grad { animation: pmGrad 38s ease-in-out infinite alternate; }
@keyframes pmGrad { 0% { background-position: 0% 30%; } 100% { background-position: 100% 70%; } }
.pm-rain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* shade: a little overall, more behind the title corner so the numbers always read */
.pm-dim { position: absolute; inset: 0; pointer-events: none; transition: background .3s;
  background:
    radial-gradient(120% 90% at 0% 100%, rgba(0, 0, 0, calc(var(--pm-dim, .3) * 1.3 + .12)) 0%, transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, transparent 18%),
    rgba(0, 0, 0, var(--pm-dim, .3)); }
.pm[data-style="center"] .pm-dim { background: radial-gradient(ellipse at 50% 55%, rgba(0, 0, 0, calc(var(--pm-dim, .3) * .6)) 0%, transparent 60%), linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, transparent 18%), rgba(0, 0, 0, var(--pm-dim, .3)); }
.pm.pm-light .pm-dim { background: rgba(255, 255, 255, calc(var(--pm-dim, .3) * .3)); }

/* ---------- shared controls ---------- */
.pm-ib { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--pm-ink2); flex: none; transition: background .2s, color .2s, transform .2s var(--spring); }
.pm-ib:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.pm-ib:active { transform: scale(.9); }
.pm-ib.sm { width: 32px; height: 32px; }
.pm-ib.sm svg { width: 16px; height: 16px; }
.pm-ib.xs { width: 26px; height: 26px; }
.pm-ib.xs svg { width: 14px; height: 14px; }
.pm-ib.danger:hover { color: #fca5a5; background: rgba(239, 68, 68, .16); }
.pm-sheet, .pm-drawer, .pm-cmd, .pm-np, .pm-modal-c {
  background: var(--pm-glass);
  backdrop-filter: blur(28px) saturate(1.6); -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid var(--pm-line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.pm input:not([type="range"]):not([type="color"]):not([type="file"]), .pm select, .pm textarea {
  width: 100%; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--pm-line);
  background: var(--pm-soft); color: var(--pm-ink); font: inherit; font-size: 14px; outline: none; transition: border-color .2s, background .2s;
}
.pm input:focus, .pm select:focus, .pm textarea:focus { border-color: color-mix(in srgb, var(--pm-acc) 60%, transparent); background: rgba(255, 255, 255, .1); }
.pm select option { background: #191c25; color: #fff; }
.pm textarea { resize: vertical; line-height: 1.45; }
.pm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 99px; background: #fff; color: #0b0d12; font-weight: 650; font-size: 14px; transition: transform .2s var(--spring), background .2s; }
.pm-btn svg { width: 15px; height: 15px; }
.pm-btn:hover { background: color-mix(in srgb, var(--pm-acc) 25%, #fff); }
.pm-btn:active { transform: scale(.96); }
.pm-btn.ghost { background: var(--pm-soft); color: var(--pm-ink); border: 1px solid var(--pm-line); }
.pm-btn.ghost:hover { background: rgba(255, 255, 255, .13); }
.pm-btn.wide { width: 100%; margin-top: 14px; }
.pm-link { color: var(--pm-acc); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pm-link:hover { text-decoration: underline; }
.pm-addrow { display: flex; gap: 8px; margin-top: 10px; }
.pm-addrow button { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0b0d12; }
.pm-addrow input { height: 36px; padding: 6px 12px !important; }
.pm-ph { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; flex: none; }
.pm-ph h3 { flex: 1; margin: 0 4px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.pm-seg { display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: var(--pm-soft); }
.pm-seg button { flex: 1; padding: 7px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--pm-ink2); white-space: nowrap; transition: background .2s, color .2s; }
.pm-seg button:hover { color: #fff; }
.pm-seg button.on { background: #fff; color: #0b0d12; }
.pm-tgl { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 2px; text-align: left; }
.pm-tgl b { display: block; font-size: 14px; font-weight: 600; }
.pm-tgl small { display: block; font-size: 12px; color: var(--pm-ink3); margin-top: 1px; }
.pm-tgl i { position: relative; width: 38px; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .18); flex: none; transition: background .25s; }
.pm-tgl i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .35s var(--spring); }
.pm-tgl.on i { background: var(--pm-acc); }
.pm-tgl.on i::after { transform: translateX(16px); }
.pm-range { display: grid; grid-template-columns: 70px 1fr 42px; align-items: center; gap: 10px; padding: 6px 2px; font-size: 13.5px; color: var(--pm-ink2); }
.pm-range input { width: 100%; accent-color: var(--pm-acc); }
.pm-range output { font-size: 12px; font-weight: 650; color: var(--pm-ink3); text-align: right; font-variant-numeric: tabular-nums; }
.pm kbd { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: var(--pm-ink); }
.pm .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.pm .eq i { width: 3px; height: 4px; border-radius: 2px; background: currentColor; animation: eq .9s ease-in-out infinite; }
.pm .eq i:nth-child(2) { animation-delay: -.3s; }
.pm .eq i:nth-child(3) { animation-delay: -.6s; }

/* ---------- top: back, quote, command pill ---------- */
.pm-top { position: absolute; z-index: 4; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: calc(18px + env(safe-area-inset-top)) var(--pm-pad) 0; pointer-events: none; transition: opacity .7s, transform .7s var(--ease); }
.pm-top > * { pointer-events: auto; }
.pm-brand { justify-self: start; display: flex; align-items: center; gap: 12px; color: var(--pm-fg); }
.pm-back { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .2s, transform .25s var(--spring); }
.pm-brand:hover .pm-back { background: rgba(255, 255, 255, .22); transform: translateX(-2px); }
.pm-brand-t { display: flex; flex-direction: column; line-height: 1.15; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.pm-brand-t b { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.pm-brand-t small { font-size: 12.5px; opacity: .72; font-variant-numeric: tabular-nums; }
.pm-quote { margin: 0; max-width: 520px; text-align: center; color: var(--pm-fg); text-shadow: 0 1px 12px rgba(0, 0, 0, .45); opacity: .82; transition: opacity .7s; }
.pm-quote b { font: italic 500 15px/1.4 'Fraunces', Georgia, serif; }
.pm-quote small { margin-left: 6px; font-size: 12px; opacity: .65; }
.pm-cmd { justify-self: end; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 99px; }
.pm-cmd button { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--pm-ink2); transition: background .2s, color .2s; }
.pm-cmd button svg { width: 17px; height: 17px; }
.pm-cmd button.ic { width: 36px; padding: 0; justify-content: center; }
.pm-cmd button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.pm-cmd button.on { background: #fff; color: #0b0d12; }
.pm-cmd em { position: absolute; top: 3px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--pm-acc); color: #0b0d12; font: 700 10px/16px var(--font); font-style: normal; text-align: center; }
.pm-cmd em:empty { display: none; }
.pm-cmd button.on em { background: #0b0d12; color: #fff; }
.pm-cmd-sep { width: 1px; height: 20px; background: var(--pm-line); margin: 0 3px; }
.pm-cmd .eq { display: none; }
body.sp-playing .pm-cmd [data-open="music"] .eq { display: inline-flex; color: var(--pm-acc); }
body.sp-playing .pm-cmd [data-open="music"] .eq + svg { display: none; }

/* ---------- the title: task, phase, time, route, controls ---------- */
.pm-stage { position: absolute; z-index: 2; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; padding: 100px var(--pm-pad) calc(var(--pm-pad) + env(safe-area-inset-bottom)); pointer-events: none; container-type: inline-size; transition: padding .5s var(--ease); }
.pm-lock { pointer-events: auto; display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; transition: transform .6s var(--ease), opacity .4s; }
.pm[data-style="center"] .pm-stage { align-items: center; justify-content: center; padding-bottom: 110px; }
.pm[data-style="center"] .pm-lock { align-items: center; text-align: center; }
/* panels open: the title steps aside / up */
.pm.open-tasks .pm-lock { transform: translateY(calc(-1 * min(66dvh, 640px) + 60px)); opacity: 0; pointer-events: none; }
.pm.open-scene .pm-lock { transform: translateY(-300px); }
.pm.open-scene[data-style="center"] .pm-lock { transform: translateY(-150px); }

.pm-cur { display: inline-flex; align-items: center; gap: 10px; max-width: min(560px, 100%); margin-bottom: 14px; padding: 7px 14px 7px 7px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-size: 14px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .2s, transform .25s var(--spring); }
.pm-cur:hover { background: rgba(255, 255, 255, .18); transform: translateY(-1px); }
.pm-cur-k { padding: 3px 9px; border-radius: 99px; background: var(--pm-acc); color: #0b0d12; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; flex: none; }
.pm-cur-t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-cur-t.dim { font-weight: 500; opacity: .7; }
.pm-cur-s { font-size: 12.5px; font-weight: 700; opacity: .7; font-variant-numeric: tabular-nums; flex: none; }
.pm-cur-s:empty { display: none; }
.pm-cur-d, .pc-dots { display: inline-flex; gap: 3px; flex: none; }
.pm-cur-d i, .pc-dots i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; }
.pm-cur-d i.on, .pc-dots i.on { background: var(--pm-acc); border-color: var(--pm-acc); opacity: 1; }
.pm.pm-light .pm-cur { background: rgba(0, 0, 0, .6); }

.pm-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--pm-fg); opacity: .78; text-shadow: 0 1px 10px rgba(0, 0, 0, .4); margin: 0 0 2px 4px; }
.pm-eyebrow b { color: var(--pm-acc); }
.pm.pm-light .pm-eyebrow b { color: inherit; }
.pm[data-style="center"] .pm-eyebrow { margin-left: 0; }

.pm-time {
  --pm-ts: clamp(88px, min(15vw, 30cqi), 230px);
  display: flex; align-items: baseline; font-size: var(--pm-ts); line-height: 1; margin-left: -.04em;
  font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--pm-fg);
  text-shadow: 0 6px 50px rgba(0, 0, 0, .35); cursor: pointer; transition: transform .3s var(--spring), color .4s;
}
.pm-time:active { transform: scale(.985); }
.pm[data-size="xl"] .pm-time { --pm-ts: clamp(100px, min(20vw, 38cqi), 320px); }
.pm[data-size="m"] .pm-time { --pm-ts: clamp(72px, min(11vw, 24cqi), 170px); }
.pm[data-size="s"] .pm-time { --pm-ts: clamp(56px, min(8vw, 18cqi), 120px); }
.pm[data-font="serif"] .pm-time { font-family: 'Fraunces', Georgia, serif; font-weight: 500; letter-spacing: -.035em; }
.pm[data-font="mono"] .pm-time { font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace; font-weight: 400; letter-spacing: -.07em; }
.pm[data-font="thin"] .pm-time { font-weight: 200; letter-spacing: -.035em; }
.pm-colon { font-style: normal; margin: 0 .02em; opacity: .5; position: relative; top: -.06em; }
.pm.running .pm-colon { animation: pmBreathe 2s ease-in-out infinite; }
@keyframes pmBreathe { 0%, 100% { opacity: .55; } 50% { opacity: .15; } }
.pm.rang .pm-time { animation: pmRang .9s var(--spring) 2; }
@keyframes pmRang { 0%, 100% { transform: none; } 40% { transform: scale(1.04); } }

/* the round as a route */
.pm-track { display: flex; gap: 5px; width: min(560px, 82cqi); margin: 14px 0 0 4px; }
.pm[data-style="center"] .pm-track { margin-left: 0; }
.pm-seg-t { position: relative; height: 6px; min-width: 10px; border-radius: 6px; background: rgba(255, 255, 255, .18); overflow: hidden; transition: transform .2s var(--spring), background .2s; }
.pm-seg-t::before { content: ""; position: absolute; inset: -10px 0; }
.pm-seg-t:hover { transform: scaleY(1.6); }
.pm-seg-t.short, .pm-seg-t.long { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .22) 0 3px, transparent 3px 6px); }
.pm-seg-t i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px; background: var(--pm-fg); }
.pm-seg-t.short i, .pm-seg-t.long i { background: var(--pm-acc); }
.pm-seg-t.done i { width: 100%; opacity: .55; }
.pm-seg-t.now i { transition: width .4s linear; box-shadow: 0 0 12px var(--pm-fg); }
.pm-seg-t.custom { cursor: default; }
.pm-seg-t.custom:hover { transform: none; }
.pm.pm-light .pm-seg-t { background: rgba(0, 0, 0, .15); }

.pm-custom { display: flex; flex-direction: column; gap: 10px; width: min(520px, 90cqi); margin-top: 16px; }
.pm[data-style="center"] .pm-custom { align-items: center; }
.pm-pre { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-pre button { padding: 6px 13px; border-radius: 99px; background: rgba(255, 255, 255, .12); font-size: 13px; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pm-pre button:hover { background: rgba(255, 255, 255, .2); }
.pm-pre button.on { background: #fff; color: #0b0d12; }
.pm-crow { display: flex; align-items: center; gap: 8px; width: 100%; }
.pm-min { display: flex; align-items: center; gap: 6px; flex: none; }
.pm-min input { width: 72px !important; text-align: center; }
.pm-min span { font-size: 13px; color: var(--pm-ink2); }

.pm-ctl { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.pm-play { position: relative; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0b0d12; flex: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: transform .25s var(--spring), background .3s, color .3s; }
.pm-play:hover { transform: scale(1.05); }
.pm-play:active { transform: scale(.94); }
.pm-play-ring { position: absolute; inset: -7px; width: calc(100% + 14px) !important; height: calc(100% + 14px) !important; transform: rotate(-90deg); pointer-events: none; }
.pm-play-ring circle { fill: none; stroke-width: 2.5; }
.pm-play-ring .trk { stroke: rgba(255, 255, 255, .16); }
.pm-play-ring .val { stroke: var(--pm-acc); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .4s linear; }
.pm-play-i { width: 26px !important; height: 26px !important; fill: currentColor; stroke: currentColor; stroke-width: 1.5; }
.pm-play-i.pause { display: none; fill: none; stroke-width: 3; }
.pm.running .pm-play { background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.pm.running .pm-play-i.go { display: none; }
.pm.running .pm-play-i.pause { display: block; }
.pm-ctl-b { display: flex; gap: 6px; transition: opacity .7s; }
.pm-ctl-b button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .2s, transform .2s var(--spring); }
.pm-ctl-b button:hover { background: rgba(255, 255, 255, .2); }
.pm-ctl-b button:active { transform: scale(.9); }
.pm-ctl-b button.on { background: #fff; color: #0b0d12; }
.pm-ctl-b b { font-size: 13.5px; }
.pm.pm-light .pm-ctl-b button { background: rgba(0, 0, 0, .55); }

/* ---------- now playing (spotify.js fills it) ---------- */
.pm-np { position: absolute; z-index: 3; right: var(--pm-pad); bottom: calc(var(--pm-pad) + env(safe-area-inset-bottom)); width: 300px; border-radius: 20px; padding: 10px; transition: opacity .5s, transform .5s var(--ease); }
.pm-np:empty { display: none; }
.pm.panel-open .pm-np { opacity: 0; transform: translateY(14px); pointer-events: none; }

/* idle: just the scene and the time */
.pm.pm-idle { cursor: none; }
.pm.pm-idle .pm-top, .pm.pm-idle .pm-ctl-b, .pm.pm-idle .pm-np { opacity: 0; pointer-events: none; }
.pm.pm-idle .pm-top { transform: translateY(-10px); }
.pm.pm-idle .pm-play { opacity: .5; }

/* ---------- sheets (bottom) and drawers (right) ---------- */
.pm-sheet { position: absolute; z-index: 6; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); border-radius: 26px; padding: 18px 18px 14px; display: flex; flex-direction: column; visibility: hidden; opacity: 0; transform: translateY(40px);
  transition: transform .5s var(--ease), opacity .3s, visibility 0s linear .5s; }
.pm.open-tasks .pm-board, .pm.open-scene .pm-scenes { visibility: visible; opacity: 1; transform: none; transition: transform .5s var(--ease), opacity .3s, visibility 0s; }
.pm-board { height: min(66dvh, 640px); }
.pm-drawer { position: absolute; z-index: 6; top: calc(76px + env(safe-area-inset-top)); right: var(--pm-pad); bottom: calc(16px + env(safe-area-inset-bottom)); width: 370px; border-radius: 24px; padding: 16px; display: flex; flex-direction: column; visibility: hidden; opacity: 0; transform: translateX(30px);
  transition: transform .5s var(--ease), opacity .3s, visibility 0s linear .5s; }
.pm.open-studio .pm-studio, .pm.open-music .pm-music, .pm.open-sounds .pm-sounds { visibility: visible; opacity: 1; transform: none; transition: transform .5s var(--ease), opacity .3s, visibility 0s; }
.pm-music { bottom: auto; max-height: calc(100dvh - 92px - env(safe-area-inset-top)); }
.pm-music-b { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -8px; padding: 0 8px; scrollbar-width: thin; }
.pm-drawer-b { flex: 1; overflow-y: auto; margin: 10px -8px 0; padding: 0 8px 8px; scrollbar-width: thin; }

/* ---------- task board ---------- */
.pb-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex: none; flex-wrap: wrap; }
.pb-title { display: flex; align-items: baseline; gap: 12px; margin-right: auto; }
.pb-title h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.pb-prog { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--pm-ink3); font-weight: 600; }
.pb-prog i { position: relative; width: 70px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.pb-prog i::after { content: ""; position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p)); background: var(--pm-acc); border-radius: 4px; transition: transform .5s var(--ease); }
.pb-search { position: relative; width: 200px; }
.pb-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--pm-ink3); }
.pb-search input { padding: 7px 12px 7px 33px !important; border-radius: 99px !important; }
.pb-tags { display: flex; gap: 5px; max-width: 40%; overflow-x: auto; scrollbar-width: none; }
.pb-tags button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--pm-soft); color: var(--pm-ink2); }
.pb-tags button i { width: 7px; height: 7px; border-radius: 50%; background: var(--tc); }
.pb-tags button.on { background: #fff; color: #0b0d12; }
.pb-tags .pb-tagbtn svg { width: 13px; height: 13px; }
.pb-sort { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--pm-ink3); font-weight: 600; }
.pb-sort select { width: auto; padding: 6px 10px !important; border-radius: 99px !important; font-size: 13px !important; }
.pb-chk { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--pm-soft); color: var(--pm-ink2); }
.pb-chk::before { content: ""; width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid currentColor; }
.pb-chk.on { color: #fff; }
.pb-chk.on::before { background: var(--pm-acc); border-color: var(--pm-acc); }
.pb-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; scrollbar-width: thin; }
.pb-col { display: flex; flex-direction: column; min-height: 0; border-radius: 18px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .05); }
.pb-col > header { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 14px; flex: none; }
.pb-col > header b { font-size: 13.5px; font-weight: 700; }
.pb-col > header em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--pm-ink3); margin-right: auto; }
.pb-dot { display: grid; place-items: center; color: var(--pm-ink3); }
.pb-dot svg { width: 16px; height: 16px; }
.pb-cards { flex: 1; overflow-y: auto; padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; border-radius: 0 0 18px 18px; transition: background .2s; scrollbar-width: thin; }
.pb-cards.over { background: color-mix(in srgb, var(--pm-acc) 8%, transparent); }
.pb-empty { margin: 6px 4px; padding: 14px 10px; border-radius: 12px; border: 1.5px dashed rgba(255, 255, 255, .1); text-align: center; font-size: 12.5px; color: var(--pm-ink3); list-style: none; }
.pc { position: relative; padding: 11px 12px 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .06); cursor: grab; transition: background .2s, border-color .2s, transform .25s var(--spring), opacity .2s; }
.pc::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.pc.prio-1::before { background: #93c5fd; } .pc.prio-2::before { background: #fcd34d; } .pc.prio-3::before { background: #fb923c; } .pc.prio-4::before { background: #f87171; }
.pc:hover { background: rgba(255, 255, 255, .11); transform: translateY(-1px); }
.pc.active { border-color: color-mix(in srgb, var(--pm-acc) 70%, transparent); background: color-mix(in srgb, var(--pm-acc) 12%, rgba(255, 255, 255, .06)); }
.pc.dragging { opacity: .35; }
.pc.drop-a, .pc.drop-b { transform: none; }
.pc.drop-a { box-shadow: 0 -3px 0 var(--pm-acc); }
.pc.drop-b { box-shadow: 0 3px 0 var(--pm-acc); }
.pc-top { display: flex; align-items: flex-start; gap: 8px; }
.pc-st { width: 20px; height: 20px; margin-top: 1px; display: grid; place-items: center; color: var(--pm-ink3); flex: none; transition: transform .25s var(--spring), color .2s; }
.pc-st:hover { color: var(--pm-acc); transform: scale(1.15); }
.pc-st svg { width: 19px; height: 19px; }
.pc-t { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 6px; text-align: left; }
.pc-t .pr { margin-top: 4px; }
.pc-t b { font-size: 14px; font-weight: 600; line-height: 1.35; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc.st-done .pc-t b, .pc.st-dropped .pc-t b { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .35); color: var(--pm-ink3); }
.pc.st-done .pc-st { color: var(--pm-acc); }
.pc-m { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0 28px; }
.pc-ft { display: flex; align-items: center; gap: 8px; margin: 9px 0 0 28px; min-height: 22px; }
.pc-ft .pc-dots { color: var(--pm-ink3); }
.pc-time { font-size: 12px; font-weight: 700; color: var(--pm-ink3); font-variant-numeric: tabular-nums; margin-right: auto; }
.pc.active .pc-time { color: var(--pm-acc); }
.pc-go { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; opacity: 0; transition: opacity .2s, background .2s, transform .2s var(--spring); }
.pc-go svg { width: 13px; height: 13px; fill: currentColor; }
.pc:hover .pc-go, .pc-go.on, .pc-go:focus-visible { opacity: 1; }
.pc-go:hover { background: #fff; color: #0b0d12; transform: scale(1.08); }
.pc-go.on { background: var(--pm-acc); color: #0b0d12; }
@media (hover: none) { .pc-go { opacity: 1; } }
.pt-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 650; background: rgba(255, 255, 255, .08); color: var(--pm-ink2); white-space: nowrap; }
.pt-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); }
.pt-chip svg { width: 11px; height: 11px; }
.pt-chip.due.today { color: #fde68a; background: rgba(251, 191, 36, .14); }
.pt-chip.due.late { color: #fca5a5; background: rgba(239, 68, 68, .16); }
.pc-add { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .09); border: 1px solid color-mix(in srgb, var(--pm-acc) 40%, transparent); animation: pmPop .25s var(--ease); }
@keyframes pmPop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pc-add textarea { resize: none; font-weight: 600; }
.pc-add-row { display: flex; gap: 6px; align-items: center; }
.pc-add-row select, .pc-add-row input { padding: 6px 8px !important; font-size: 12.5px !important; }
.pc-add-ft { display: flex; justify-content: flex-end; gap: 6px; }
.pc-add-ft .pm-btn { height: 32px; padding: 0 13px; font-size: 13px; }
.pt-prio { display: flex; gap: 2px; padding: 2px; border-radius: 99px; background: var(--pm-soft); }
.pt-prio button { width: 28px; height: 24px; border-radius: 99px; display: grid; place-items: center; }
.pt-prio button.on { background: rgba(255, 255, 255, .18); }
.pr-none { color: var(--pm-ink3); font-weight: 700; }
.pt-step { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 99px; background: var(--pm-soft); margin-left: auto; flex: none; }
.pt-step button { width: 26px; height: 26px; border-radius: 50%; font-size: 16px; font-weight: 600; color: var(--pm-ink2); }
.pt-step button:hover:not(:disabled) { background: rgba(255, 255, 255, .14); color: #fff; }
.pt-step button:disabled { opacity: .3; cursor: not-allowed; }
.pt-step > span { min-width: 42px; text-align: center; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pt-step > span small { font-size: 10px; opacity: .7; margin-left: 1px; }
/* status + priority marks */
.pc-st .fill, .pe-seg .fill, .pe-ck .fill, .pb-dot .fill { fill: currentColor; stroke: none; }
.pc-st .ck, .pe-seg .ck, .pe-ck .ck, .pb-dot .ck { stroke: #0b0d12; stroke-width: 2.4; }
.pb-dot.st-doing, .pe-seg .st-doing svg { color: var(--pm-acc); }
.pb-dot.st-hold, .pe-seg .st-hold svg { color: #fbbf24; }
.pb-dot.st-done, .pe-seg .st-done svg, .pe-ck { color: var(--pm-acc); }
.pr { position: relative; display: inline-flex; align-items: flex-end; gap: 1.5px; height: 11px; flex: none; color: #94a3b8; }
.pr i { width: 3px; border-radius: 1px; background: currentColor; opacity: .25; }
.pr i:nth-child(1) { height: 4px; } .pr i:nth-child(2) { height: 7px; } .pr i:nth-child(3) { height: 11px; }
.pr-1 { color: #93c5fd; } .pr-1 i:nth-child(1) { opacity: 1; }
.pr-2 { color: #fcd34d; } .pr-2 i:nth-child(-n+2) { opacity: 1; }
.pr-3 { color: #fb923c; } .pr-3 i { opacity: 1; }
.pr-4 { color: #f87171; } .pr-4 i { opacity: 1; }
.pr b { font-size: 11px; line-height: 1; margin-left: 2px; font-weight: 900; }

/* ---------- task details (modal) ---------- */
.pm-modal { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 20px; }
.pm-modal-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: pmFade .25s ease; }
@keyframes pmFade { from { opacity: 0; } }
.pm-modal-c { position: relative; width: min(520px, 100%); max-height: min(88dvh, 820px); overflow-y: auto; border-radius: 24px; padding: 16px 20px 20px; background: rgba(18, 20, 28, .9); animation: pmPop .3s var(--ease); scrollbar-width: thin; }
.pe-crumb { flex: 1; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pm-ink3); margin-left: 4px; }
.pe { display: flex; flex-direction: column; }
.pe-title { font-size: 21px !important; font-weight: 700; letter-spacing: -.01em; padding: 6px 8px !important; margin: 0 -8px; width: calc(100% + 16px) !important; background: transparent !important; border-color: transparent !important; resize: none !important; }
.pe-title:hover, .pe-title:focus { background: var(--pm-soft) !important; border-color: var(--pm-line) !important; }
.pe-l { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pm-ink3); }
.pe-seg { display: flex; flex-wrap: wrap; gap: 5px; }
.pe-seg button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; background: var(--pm-soft); font-size: 12.5px; font-weight: 600; color: var(--pm-ink2); border: 1px solid transparent; transition: background .2s; }
.pe-seg button svg { width: 15px; height: 15px; color: var(--pm-ink3); }
.pe-seg button:hover { background: rgba(255, 255, 255, .13); }
.pe-seg button.on { background: #fff; color: #0b0d12; }
.pe-seg button.on svg { color: #0b0d12; }
.pe-seg button.on .ck { stroke: #fff; }
.pe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pe-grid .pt-step { margin-left: 0; }
.pe-stat { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pm-ink2); padding: 6px 0; }
.pe-subs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pe-subs li { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 9px; font-size: 14px; }
.pe-subs li:hover { background: rgba(255, 255, 255, .05); }
.pe-subs li span { flex: 1; min-width: 0; word-break: break-word; }
.pe-subs li.done span { text-decoration: line-through; color: var(--pm-ink3); }
.pe-ck { width: 22px; height: 22px; display: grid; place-items: center; color: var(--pm-ink3); }
.pe-subs li.done .pe-ck { color: var(--pm-acc); }
.pe-ck svg { width: 19px; height: 19px; }
.pe-ft { display: flex; gap: 8px; margin-top: 20px; }
.pe-ft .pm-btn { flex: 1; height: 44px; font-size: 15px; }
.pe-meta { font-size: 12.5px; color: var(--pm-ink3); margin: 12px 2px 0; line-height: 1.5; }
.tg-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tg-list li { display: flex; align-items: center; gap: 8px; }
.tg-list small { color: var(--pm-ink3); font-size: 12px; min-width: 18px; text-align: right; }
.tg-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--tc); flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }

/* ---------- scene filmstrip ---------- */
.ps-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex: none; }
.ps-hd h3 { margin: 0 4px 0 2px; font-size: 20px; font-weight: 700; }
.ps-hd .pm-seg { flex: none; }
.ps-cats { display: flex; gap: 5px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ps-cats button { padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--pm-ink2); }
.ps-cats button:hover { color: #fff; background: var(--pm-soft); }
.ps-cats button.on { color: #fff; background: rgba(255, 255, 255, .14); }
.ps-gap { flex: 1; }
.ps-link { position: relative; width: 250px; flex: none; }
.ps-link svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--pm-ink3); }
.ps-link input { padding: 7px 12px 7px 31px !important; border-radius: 99px !important; font-size: 13px !important; }
.ps-body { display: flex; gap: 16px; min-height: 0; }
.ps-strip { flex: 1; min-width: 0; display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.ps-it { position: relative; flex: none; width: 216px; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #181b24; text-align: left; scroll-snap-align: start; outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .2s, transform .3s var(--spring); cursor: pointer; }
.ps-it:hover { transform: translateY(-3px); }
.ps-it.on { outline-color: #fff; }
.ps-it img, .ps-it > i, .ps-use em { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background-size: cover; }
/* base.css styles .sw i as a small round swatch (a dashboard leftover): here the colour fills the whole card */
.ps-it.sw > i { border-radius: 0; box-shadow: none; display: block; }
.ps-it > span, .ps-use > span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 11px 9px; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); color: #fff; }
.ps-it b, .ps-use b { display: block; font-size: 13px; font-weight: 650; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-it small, .ps-use small { display: block; font-size: 11px; opacity: .7; margin-top: 1px; }
.ps-it.dot { width: 64px; aspect-ratio: auto; height: auto; align-self: stretch; border-radius: 16px; }
.ps-it.pick > i { background: conic-gradient(#f87171, #fbbf24, #34d399, #60a5fa, #a78bfa, #f87171); }
.ps-it.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ps-use { position: absolute; inset: 0; }
.ps-use em { display: grid; place-items: center; font-size: 34px; font-style: normal; }
.ps-del { position: absolute !important; top: 6px; right: 6px; background: rgba(0, 0, 0, .6); color: #fff; }
.ps-it.add { display: grid; place-items: center; border: 1.5px dashed rgba(255, 255, 255, .22); background: transparent; color: var(--pm-ink2); }
.ps-it.add > svg { width: 26px; height: 26px; margin-bottom: 26px; }
.ps-it.add > span { background: none; text-align: center; }
.ps-adj { width: 270px; flex: none; padding-left: 16px; border-left: 1px solid var(--pm-line); max-height: 220px; overflow-y: auto; scrollbar-width: thin; }

/* ---------- studio ---------- */
.pm-studio .pm-seg { flex: none; }
.pb-alarm { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.pb-alarm button { padding: 7px 13px; border-radius: 99px; background: var(--pm-soft); font-size: 13px; font-weight: 600; color: var(--pm-ink2); }
.pb-alarm button:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.pb-alarm button.on { background: #fff; color: #0b0d12; }
.pst-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pst { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 16px; background: rgba(255, 255, 255, .04); }
.pst > small { font-size: 12px; color: var(--pm-ink2); font-weight: 600; }
.pt-step.big { flex-direction: column; margin: 0; padding: 0; background: none; gap: 0; }
.pt-step.big > span { display: flex; flex-direction: column; line-height: 1.05; order: 0; }
.pt-step.big > span b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.pt-step.big > span small { font-size: 10.5px; color: var(--pm-ink3); }
.pt-step.big button { width: 100%; height: 22px; border-radius: 8px; font-size: 15px; }
.pt-step.big button:first-child { order: 2; }
.pt-step.big > span { order: 1; padding: 2px 0; }
.pt-step.big button:last-child { order: 0; }
.pst-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px 6px; font-size: 14px; }
.ps-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ps-tiles div { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); }
.ps-tiles b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.ps-tiles small { font-size: 12px; color: var(--pm-ink3); }
.ps-bars { display: flex; gap: 8px; height: 110px; align-items: stretch; }
.ps-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ps-bars span { flex: 1; width: 100%; display: flex; align-items: flex-end; border-radius: 8px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.ps-bars i { display: block; width: 100%; border-radius: 8px; background: color-mix(in srgb, var(--pm-acc) 65%, transparent); transition: height .5s var(--ease); }
.ps-bars .today i { background: var(--pm-acc); }
.ps-bars small { font-size: 11px; color: var(--pm-ink3); font-weight: 600; }
.ps-top { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.ps-top li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); font-size: 13.5px; }
.ps-top li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-top li b { color: var(--pm-acc); flex: none; }
.pm .keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; margin: 4px 0 0; align-items: center; }
.pm .keys dt { text-align: right; }
.pm .keys dd { margin: 0; font-size: 14px; color: var(--pm-ink2); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .pm-quote { display: none; }
  .pm-top { grid-template-columns: 1fr auto; }
  .pb-tags { max-width: none; }
}
@media (max-width: 900px) {
  .pm-cmd button:not(.ic) span { display: none; }
  .pm-cmd button:not(.ic) { width: 38px; padding: 0; justify-content: center; }
  .ps-adj { display: none; }
  .ps-link { width: 180px; }
}
@media (max-width: 760px) {
  .pm { --pm-pad: 18px; }
  .pm-top { padding-top: calc(12px + env(safe-area-inset-top)); }
  .pm-brand-t small { display: none; }
  .pm-cmd { padding: 4px; }
  .pm-cmd button:not(.ic) { width: 36px; }
  .pm-stage { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .pm[data-style="center"] .pm-stage { padding-bottom: 80px; }
  .pm-time { --pm-ts: clamp(78px, 25vw, 150px); }
  .pm[data-size="xl"] .pm-time { --pm-ts: clamp(90px, 29vw, 170px); }
  .pm[data-size="m"] .pm-time { --pm-ts: clamp(64px, 20vw, 120px); }
  .pm[data-size="s"] .pm-time { --pm-ts: clamp(52px, 15vw, 90px); }
  .pm-track { width: 100%; }
  .pm-lock { width: 100%; }
  .pm-ctl { width: 100%; }
  .pm-ctl-b { flex: 1; justify-content: flex-end; }
  .pm-ctl-b button { width: 40px; height: 40px; }
  #pmAdd { display: none; }
  .pm-np { left: var(--pm-pad); right: var(--pm-pad); width: auto; bottom: auto; top: calc(66px + env(safe-area-inset-top)); }
  .pm-sheet, .pm-drawer { left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; border-radius: 24px; transform: translateY(40px); }
  .pm-board { height: 86dvh; }
  .pm-drawer { max-height: 84dvh; height: 84dvh; }
  .pm-music { height: auto; }
  .pm.open-tasks .pm-lock, .pm.open-scene .pm-lock { opacity: 0; transform: translateY(-40px); pointer-events: none; }
  .pb-hd { gap: 8px; }
  .pb-search { width: auto; flex: 1; min-width: 120px; }
  .pb-sort span, .pb-sort { font-size: 0; }
  .pb-cols { grid-template-columns: repeat(4, 84%); scroll-snap-type: x mandatory; }
  .pb-col { scroll-snap-align: start; }
  .pc-go { opacity: 1; }
  .ps-hd { flex-wrap: wrap; }
  .ps-hd h3 { flex: 1; }
  .ps-cats { order: 5; flex-basis: 100%; }
  .ps-link { order: 6; flex: 1; width: auto; }
  .ps-it { width: 170px; }
  .ps-adj { display: block; width: auto; border: 0; padding: 0; max-height: none; }
  .ps-body { flex-direction: column; overflow-y: auto; }
  .pm-modal { place-items: end center; padding: 8px; }
  .pm-modal-c { max-height: 90dvh; }
  body.route-focus .toasts { left: 50%; right: auto; transform: translateX(-50%); align-items: center; }
}
@media (max-height: 680px) {
  .pm.open-scene .pm-lock, .pm.open-tasks .pm-lock { opacity: 0; pointer-events: none; }
}
@media (max-height: 600px) and (min-width: 761px) {
  .pm-cur { margin-bottom: 8px; }
  .pm-ctl { margin-top: 14px; }
  .pm-board { height: calc(100dvh - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  .pm.pm-anim .pm-grad, .pm.running .pm-colon { animation: none; }
}

/* =========================================================
   MUSIC (spotify.js) — custom player in the music drawer + the corner card
   ========================================================= */
.sp-now { display: flex; flex-direction: column; align-items: stretch; }
.sp-art { position: relative; width: min(100%, 250px); aspect-ratio: 1; margin: 2px auto 14px; border-radius: 18px; overflow: hidden; background: #1a1d27; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); transition: border-radius .6s var(--ease); }
.sp-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-art > i, .mini-art > i, .sp-row > i, .sp-pick i { display: grid; place-items: center; width: 100%; height: 100%; color: var(--pm-ink3); }
.sp-art > i svg { width: 48px; height: 48px; }
/* the record: a round cover with grooves and a spindle hole, turning while it plays */
.sp-art.vinyl, .mini-art.vinyl { border-radius: 50%; }
.sp-art.vinyl::after, .mini-art.vinyl::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #0b0d12 0 5%, transparent 5.5% 30%, rgba(0, 0, 0, .25) 30.5% 31%, transparent 31.5%), repeating-radial-gradient(circle, rgba(0, 0, 0, .12) 0 1px, transparent 1px 4px); pointer-events: none; }
.sp-art.vinyl.spin img, .mini-art.vinyl.spin img { animation: spSpin 6s linear infinite; }
@keyframes spSpin { to { transform: rotate(360deg); } }
.sp-meta { display: flex; align-items: center; gap: 8px; }
.sp-meta > div { flex: 1; min-width: 0; }
.sp-meta b { display: block; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-meta small { display: block; font-size: 13.5px; color: var(--pm-ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-like.on { color: #f472b6; }
.sp-like.on svg { fill: currentColor; }
.sp-seek { margin-top: 10px; }
.sp-seek input, .sp-vol input { width: 100%; accent-color: #fff; height: 18px; }
.sp-times { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--pm-ink3); font-variant-numeric: tabular-nums; margin-top: -2px; }
.sp-ctl { display: flex; align-items: center; justify-content: space-between; margin: 6px 4px 4px; }
.sp-ctl .pm-ib { position: relative; }
.sp-ctl .pm-ib.on { color: var(--pm-acc); background: none; }
.sp-ctl .pm-ib.on::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.sp-ctl sup { position: absolute; top: 5px; right: 6px; font-size: 9px; font-weight: 800; }
.sp-big { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0b0d12; transition: transform .2s var(--spring); }
.sp-big:hover { transform: scale(1.06); }
.sp-big:active { transform: scale(.93); }
.sp-big svg { width: 24px; height: 24px; }
.sp-big svg path[d^="M8 5.5"], .mini .pm-ib svg path[d^="M8 5.5"], .mini .pm-ib svg path[d^="M6 5l"], .sp-idle .pm-btn svg path { fill: currentColor; }
.sp-big svg path[d^="M9 5.5"] { stroke-width: 3; }
.sp-vol { display: flex; align-items: center; gap: 10px; margin: 4px 2px 0; color: var(--pm-ink3); }
.sp-dev { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; padding: 8px 12px; border-radius: 12px; background: var(--pm-soft); font-size: 12.5px; color: var(--pm-ink2); text-align: left; }
.sp-dev:hover { background: rgba(255, 255, 255, .12); }
.sp-dev b { color: var(--pm-acc); }
.sp-dev svg { width: 16px; height: 16px; }
.sp-idle { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--pm-soft); }
.sp-idle > svg { width: 28px; height: 28px; color: var(--pm-ink3); flex: none; }
.sp-idle > div { flex: 1; min-width: 0; }
.sp-idle b { display: block; font-size: 14.5px; }
.sp-idle small { display: block; font-size: 12px; color: var(--pm-ink3); }
.sp-tabs { margin: 16px 0 10px; overflow-x: auto; scrollbar-width: none; flex: none; }
.sp-tabs button { padding: 7px 10px; font-size: 12.5px; }
.sp-lib { display: flex; flex-direction: column; gap: 2px; min-height: 120px; }
.sp-sub { margin: 12px 4px 4px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pm-ink3); }
.sp-sub:first-child { margin-top: 2px; }
.sp-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border-radius: 12px; text-align: left; transition: background .15s; }
.sp-row:hover { background: rgba(255, 255, 255, .07); }
.sp-row.on { background: rgba(255, 255, 255, .1); }
.sp-row.on b { color: var(--pm-acc); }
.sp-row img, .sp-row > i { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; background: #1a1d27; }
.sp-row.dev > i { border-radius: 50%; }
.sp-row > span { flex: 1; min-width: 0; }
.sp-row b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row small { display: block; font-size: 12px; color: var(--pm-ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row em { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--pm-ink3); opacity: 0; transition: opacity .15s; }
.sp-row:hover em { opacity: 1; }
.sp-row em:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.sp-search { position: relative; display: block; margin-bottom: 6px; }
.sp-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--pm-ink3); }
.sp-search input { padding-left: 33px !important; border-radius: 99px !important; }
.sp-empty { margin: 14px 4px; font-size: 13px; color: var(--pm-ink3); text-align: center; }
.sp-warn { margin: 10px 2px 0; padding: 10px 12px; border-radius: 12px; background: rgba(251, 191, 36, .12); color: #fde68a; font-size: 12.5px; line-height: 1.45; }
.sp-load { display: flex; flex-direction: column; gap: 8px; padding: 6px; }
.sp-load i { height: 42px; border-radius: 10px; background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .1), rgba(255, 255, 255, .05)); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
.sp-ft { margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--pm-line); }
.sp-acct { margin: 8px 2px 4px; font-size: 12px; color: var(--pm-ink3); }
.sp-acct b { color: var(--pm-ink2); }
.sp-acct .pm-link { font-size: 12px; }
.sp-hero { text-align: center; padding: 10px 6px 4px; }
.sp-hero-art { width: 84px; height: 84px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(from 200deg, #1ed760, #2dd4bf, var(--pm-acc), #a78bfa, #1ed760); box-shadow: 0 0 0 8px rgba(255, 255, 255, .05), 0 16px 40px rgba(0, 0, 0, .4); color: #0b0d12; animation: spSpin 14s linear infinite; }
.sp-hero-art svg { width: 34px; height: 34px; }
.sp-hero h4 { margin: 0 0 6px; font-size: 18px; }
.sp-hero p { margin: 0 0 14px; font-size: 13.5px; color: var(--pm-ink2); line-height: 1.5; }
.sp-hero small { display: block; margin-top: 10px; font-size: 11.5px; color: var(--pm-ink3); line-height: 1.45; }
.sp-connect { width: 100%; height: 44px; font-size: 15px; }
.sp-simple { margin-top: 16px; border-top: 1px solid var(--pm-line); padding-top: 10px; }
.sp-simple-hd { display: block; width: 100%; text-align: left; padding: 6px 2px; }
.sp-simple-hd b { display: block; font-size: 14px; }
.sp-simple-hd small { display: block; font-size: 12px; color: var(--pm-ink3); }
.sp-simple-hd b::after { content: " ›"; color: var(--pm-ink3); }
.sp-simple.open .sp-simple-hd b::after { content: " ⌄"; }
.sp-embed { display: block; width: 100%; border: 0; border-radius: 14px; margin: 8px 0; }
.sp-picks { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }
.sp-pick { display: flex; align-items: center; gap: 4px; border-radius: 12px; }
.sp-pick:hover, .sp-pick.on { background: rgba(255, 255, 255, .08); }
.sp-pick > button:first-child { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; text-align: left; }
.sp-pick img, .sp-pick i { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; background: #1a1d27; }
.sp-pick span { min-width: 0; }
.sp-pick b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-pick small { font-size: 11.5px; color: var(--pm-ink3); text-transform: capitalize; }
.sp-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 2px; }
.sp-sugg button { padding: 6px 12px; border-radius: 99px; background: var(--pm-soft); font-size: 12.5px; font-weight: 600; }
/* corner card */
.mini { position: relative; display: flex; align-items: center; gap: 10px; }
.mini-art { position: relative; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; flex: none; background: #1a1d27; }
.mini-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-t { flex: 1; min-width: 0; text-align: left; }
.mini-t b { display: block; font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-t small { display: block; font-size: 12px; color: var(--pm-ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-prog { position: absolute; left: 4px; right: 4px; bottom: -6px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.mini-x { margin-left: -4px; opacity: .55; }
.mini-x:hover { opacity: 1; }
.mini-prog i { display: block; height: 100%; background: #fff; transition: width .5s linear; }

/* ---------- ambient sounds (sounds.js) ---------- */
body.amb-on .pm-cmd [data-open="sounds"] .eq { display: inline-flex; color: var(--pm-acc); }
body.amb-on .pm-cmd [data-open="sounds"] .eq + svg { display: none; }
.as-pre { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.as-pre button { padding: 6px 12px; border-radius: 99px; background: var(--pm-soft); font-size: 12.5px; font-weight: 600; color: var(--pm-ink2); }
.as-pre button:hover { background: #fff; color: #0b0d12; }
.as-row { display: grid; grid-template-columns: 36px 1fr 30px; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 14px; transition: background .2s; }
.as-row.on:not(.master) { background: rgba(255, 255, 255, .05); }
.as-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--pm-soft); color: var(--pm-ink3); transition: background .2s, color .2s; }
.as-row.on .as-ic { background: color-mix(in srgb, var(--pm-acc) 25%, transparent); color: #fff; }
.as-ic svg { width: 19px; height: 19px; }
.as-t { min-width: 0; }
.as-t b { display: block; font-size: 13.5px; font-weight: 650; }
.as-t small { display: block; font-size: 11.5px; color: var(--pm-ink3); margin-top: -1px; }
.as-t input { width: 100%; accent-color: var(--pm-acc); height: 16px; margin: 2px 0 0; }
.as-row output { font-size: 12px; font-weight: 700; color: var(--pm-ink3); text-align: right; font-variant-numeric: tabular-nums; }
/* scene favourites + shuffle */
.ps-it .ps-fav { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; opacity: 0; transition: opacity .2s, transform .2s var(--spring); }
.ps-it:hover .ps-fav, .ps-fav.on, .ps-fav:focus-visible { opacity: 1; }
.ps-fav:hover { transform: scale(1.12); }
.ps-fav svg { width: 15px; height: 15px; }
.ps-fav.on { color: #fcd34d; }
.ps-fav.on svg { fill: currentColor; }
@media (hover: none) { .ps-it .ps-fav { opacity: .85; } }
.ps-shuffle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; flex: none; font-size: 12.5px; font-weight: 650; background: var(--pm-soft); color: var(--pm-ink); }
.ps-shuffle:hover { background: #fff; color: #0b0d12; }
.ps-shuffle svg { width: 14px; height: 14px; }
.ps-none { margin: 30px 10px; font-size: 13px; color: var(--pm-ink3); }

/* ---------- daily goal + stats ---------- */
.pm-goal { display: inline-flex; align-items: center; gap: 5px; margin-left: 12px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .25); letter-spacing: .06em; }
.pm-goal svg { width: 15px; height: 15px; transform: rotate(-90deg); }
.pm-goal circle, .ps-goal circle { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 3.2; }
.pm-goal circle.v, .ps-goal circle.v { stroke: var(--pm-acc); stroke-linecap: round; transition: stroke-dasharray .6s var(--ease); }
.pm-goal.hit circle.v, .ps-goal.hit circle.v { stroke: #34d399; }
.ps-goal { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 8px; border-radius: 16px; background: rgba(255, 255, 255, .05); }
.ps-goal svg { width: 46px; height: 46px; transform: rotate(-90deg); flex: none; }
.ps-goal b { display: block; font-size: 16px; }
.ps-goal small { font-size: 12px; color: var(--pm-ink3); }
.ps-tags { display: flex; flex-direction: column; gap: 8px; }
.ps-tags > div { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: 13px; }
.ps-tags span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ps-tags span i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); flex: none; }
.ps-tags b { font-size: 12.5px; color: var(--pm-ink2); }
.ps-tags em { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.ps-tags em i { display: block; height: 100%; border-radius: 5px; }
.ps-heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.ps-heat i, .ps-heat-key i { aspect-ratio: 1; border-radius: 3px; background: rgba(255, 255, 255, .06); }
.ps-heat .l1, .ps-heat-key .l1 { background: color-mix(in srgb, var(--pm-acc) 30%, transparent); }
.ps-heat .l2, .ps-heat-key .l2 { background: color-mix(in srgb, var(--pm-acc) 52%, transparent); }
.ps-heat .l3, .ps-heat-key .l3 { background: color-mix(in srgb, var(--pm-acc) 76%, transparent); }
.ps-heat .l4, .ps-heat-key .l4 { background: var(--pm-acc); }
.ps-heat .today { outline: 1.5px solid #fff; outline-offset: 1px; }
.ps-heat-key { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 6px; font-size: 11px; color: var(--pm-ink3); }
.ps-heat-key i { width: 10px; }
.ps-heat-key span { margin: 0 3px; }

.pm-day { display: inline-block; margin-right: 10px; padding: 2px 8px; border-radius: 6px; font-size: 11px; letter-spacing: .1em; background: rgba(129, 140, 248, .3); color: #fff; }
.pm-day.r { background: rgba(52, 211, 153, .32); }

.pb-imp { padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 650; background: color-mix(in srgb, var(--pm-acc) 22%, transparent); color: #fff; }
.pb-imp:hover { background: #fff; color: #0b0d12; }

/* ---------- plain mode: just the timer on a calm dark room ---------- */
.pm.pm-plain .pm-bg { background: #0c0d11; }
.pm.pm-plain .pm-media, .pm.pm-plain .pm-rain, .pm.pm-plain .pm-dim { display: none; }
.pm.pm-plain .pm-quote, .pm.pm-plain .pm-np { opacity: 0; pointer-events: none; }
.pm.pm-plain .pm-cmd { opacity: .55; transition: opacity .4s; }
.pm.pm-plain .pm-cmd:hover, .pm.pm-plain .pm-cmd:focus-within, .pm.pm-plain.panel-open .pm-cmd { opacity: 1; }
.pm.pm-plain .pm-brand-t, .pm.pm-plain .pm-time { text-shadow: none; }

/* ---------- Studio → ⓘ about ---------- */
.pm-seg button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; vertical-align: -3px; }
.pm-about { font-size: 14px; line-height: 1.6; color: var(--pm-ink2); }
.pm-about .pa-lede { margin: 2px 0 14px; color: #fff; font-size: 15px; }
.pm-about .pa-steps { list-style: none; counter-reset: s; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.pm-about .pa-steps li { counter-increment: s; position: relative; padding: 9px 12px 9px 42px; border-radius: 12px; background: var(--pm-soft); }
.pm-about .pa-steps li::before { content: counter(s); position: absolute; left: 12px; top: 9px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--pm-acc, #7dd3fc); color: #0b0d12; font-size: 11px; font-weight: 700; }
.pm-about .pa-steps b { color: #fff; margin-right: 5px; }
.pm-about h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--pm-ink2); }
.pm-about details { border-radius: 12px; background: var(--pm-soft); margin: 0 0 6px; }
.pm-about summary { list-style: none; cursor: pointer; padding: 10px 34px 10px 12px; position: relative; color: #fff; font-weight: 600; }
.pm-about summary::-webkit-details-marker { display: none; }
.pm-about summary::after { content: "+"; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 400; opacity: .6; transition: transform .2s; }
.pm-about details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.pm-about details p { margin: 0; padding: 0 12px 11px; }
.pm-about .pa-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; color: #fff; font-weight: 600; text-decoration: none; }
.pm-about .pa-more:hover { text-decoration: underline; }
.pm-about .pa-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }
