/* GOLI Deep Space · App integration of the R12 UI layer (QA only).
   Loaded after app/styles/space-r12.css and switched on only under an unlocked Space.
   Every value below is copied from R12 unless marked "Product": those are App elements or states
   that R12 does not have (legal links, theme dots, disabled buttons, editable duration, empty list). */

/* ---- Page shell: transparent over the parent stage; only the R12 root renders ---- */
html[data-goli-space="on"],
html[data-goli-space="on"] body,
html[data-goli-space="on"] body.goli-product { background: transparent !important; }
html[data-goli-space="on"] body.goli-product { margin: 0; }
html[data-goli-space="on"]:not([data-goli-space-fade]) body > :not(.sp-ui-root) { display: none !important; }
/* Product: Welcome carousel handover between Space and a Product theme (theme-presentation.js).
   It runs on the track's own slide: --sp-mix is the Space share of the screen (0..1) read from the
   track each frame. The Product backgrounds fade by the rest while the parent stage fades in under
   them; the greeting slides in with the cards; the fixed chrome (brand, button, dots, legal) hands
   over through an empty midpoint (--sp-mix-out reaches 0 where --sp-mix-in starts), so no two
   themes' words overlap. */
html[data-goli-space-fade] body.goli-product { --goli-product-canvas: transparent; }
html[data-goli-space-fade] body > .sky-light-field,
html[data-goli-space-fade] .theme-card .sky-air-lens,
html[data-goli-space-fade] .preview-frame > .ambient { opacity: calc(1 - var(--sp-mix, 0)) !important; transition: none !important; }
html[data-goli-space-fade-from="sky"] .preview-frame > .ambient { opacity: 0 !important; }
html[data-goli-space-fade] body[data-goli-page="welcome"] :is(.welcome-top, .welcome-bottom) { opacity: var(--sp-mix-out, 0) !important; transition: none !important; }
html[data-goli-space-fade] .theme-card.space { visibility: hidden; }
html[data-goli-space-fade] .sp-ui-root { pointer-events: none; }
html[data-goli-space-fade] .sp-app .sp-ui-welcome { opacity: 1; transform: none; transition: none; }
html[data-goli-space-fade] .sp-app :is(.sp-w-title, .sp-w-sub) { opacity: var(--sp-mix, 0); transform: translateX(var(--sp-mix-shift, 0px)); }
html[data-goli-space-fade] .sp-app :is(.sp-goli-brand-slot, .sp-cta-anchor, .sp-welcome-aux) { opacity: var(--sp-mix-in, 0); transition: none; }
.sp-app.sp-ui-root { position: fixed; inset: 0; z-index: 1; overflow: hidden; background: transparent; color: var(--text-main); font-family: var(--font-main); -webkit-font-smoothing: antialiased; }
html:not([data-goli-hydrated="true"]) body:is([data-goli-page="welcome"], [data-goli-page="plan"]) .sp-ui-root { opacity: 0; }
/* Product: buttons the Product disables while audio prepares or a control is pending. */
.sp-app :is(.sp-cta-btn, .sp-add-btn, .sp-pc-btn):disabled { opacity: .45; cursor: default; }

/* ---- Shared primary-button rail (Product; approved 2026-11-08) ----
   On landscape screens "使用深空星球" and "开始今日计划" sit exactly where every Welcome puts its
   "使用…" button: the Sky Welcome geometry (sky-r6-welcome.css, restated in oxygen-r10-welcome.css),
   202×58 at the right end of the centred 980px bottom rail, never below the page's bottom padding
   (176×52 at 14px / 18px from the corner up to 720px wide). The values are screen px; the R12 layer
   is scaled by K, so the layer uses them divided by K. Portrait keeps the R12 placement. */
@media (min-aspect-ratio: 1/1) {
  .sp-app {
    --rail-pad-l: max(14px, env(safe-area-inset-left));
    --rail-pad-r: max(14px, env(safe-area-inset-right));
    --rail-l: var(--rail-pad-l);
    --rail-r: var(--rail-pad-r);
    --rail-w: 176px;
    --rail-h: 52px;
    --rail-disc: 38px;
    --rail-font: 14px;
    --rail-top: calc(100cqh - max(18px, env(safe-area-inset-bottom)) - 52px);
  }
}
@media (min-width: 721px) and (min-aspect-ratio: 1/1) {
  .sp-app {
    --rail-pad-l: max(clamp(20px, 4cqw, 58px), env(safe-area-inset-left));
    --rail-pad-r: max(clamp(20px, 4cqw, 58px), env(safe-area-inset-right));
    --rail-l: calc(var(--rail-pad-l) + max(0px, (100cqw - var(--rail-pad-l) - var(--rail-pad-r) - 980px) / 2));
    --rail-r: calc(var(--rail-pad-r) + max(0px, (100cqw - var(--rail-pad-l) - var(--rail-pad-r) - 980px) / 2));
    --rail-w: 202px;
    --rail-h: 58px;
    --rail-disc: 42px;
    --rail-font: 16px;
    --rail-top: min(calc(max(18px, env(safe-area-inset-top)) + 52px + clamp(26px, 4cqh, 34px) + min(66cqh, 650px) + clamp(44px, 6.2cqh, 52px)), calc(100cqh - max(18px, env(safe-area-inset-bottom)) - 58px));
  }
}
@media (min-width: 721px) and (min-aspect-ratio: 1/1) and (max-height: 600px) {
  .sp-app { --rail-top: min(calc(12px + 52px + clamp(26px, 4cqh, 34px) + min(64cqh, 510px) + clamp(44px, 6.2cqh, 52px)), calc(100cqh - 12px - 58px)); }
}
@media (min-width: 721px) and (min-aspect-ratio: 1/1) and (max-height: 430px) {
  .sp-app { --rail-top: calc(100cqh - 12px - 58px); }
}
/* Portrait (Product; approved directions 2026-11-10): the same rail at the bottom of the screen, as on
   the Sky portrait Welcome: 176×52 at 14px from the right up to 720px wide, 202×58 at the right end of
   the centred 980px rail above that; 18px (or the safe area) from the bottom. */
@media (max-aspect-ratio: 999/1000) {
  .sp-app {
    --rail-pad-l: max(14px, env(safe-area-inset-left));
    --rail-pad-r: max(14px, env(safe-area-inset-right));
    --rail-l: var(--rail-pad-l);
    --rail-r: var(--rail-pad-r);
    --rail-w: 176px;
    --rail-h: 52px;
    --rail-disc: 38px;
    --rail-font: 14px;
    --rail-top: calc(100cqh - max(18px, env(safe-area-inset-bottom)) - var(--rail-h));
  }
}
@media (min-width: 721px) and (max-aspect-ratio: 999/1000) {
  .sp-app {
    --rail-pad-l: max(clamp(20px, 4cqw, 58px), env(safe-area-inset-left));
    --rail-pad-r: max(clamp(20px, 4cqw, 58px), env(safe-area-inset-right));
    --rail-l: calc(var(--rail-pad-l) + max(0px, (100cqw - var(--rail-pad-l) - var(--rail-pad-r) - 980px) / 2));
    --rail-r: calc(var(--rail-pad-r) + max(0px, (100cqw - var(--rail-pad-l) - var(--rail-pad-r) - 980px) / 2));
    --rail-w: 202px;
    --rail-h: 58px;
    --rail-disc: 42px;
    --rail-font: 16px;
  }
}
@media (min-aspect-ratio: 1/1), (max-aspect-ratio: 999/1000) {
  .sp-app[data-band] :is(#sp-chooseBtn, #startPlanBtn) { width: calc(var(--rail-w) / var(--k, 1)); height: calc(var(--rail-h) / var(--k, 1)); min-width: 0; min-height: 0; font-size: calc(var(--rail-font) / var(--k, 1)); }
  .sp-app[data-band] :is(#sp-chooseBtn, #startPlanBtn) .sp-arrow-disc { width: calc(var(--rail-disc) / var(--k, 1)); height: calc(var(--rail-disc) / var(--k, 1)); }
  .sp-app[data-band] .sp-ui-welcome .sp-cta-anchor { left: auto; right: calc(var(--rail-r) / var(--k, 1)); top: calc(var(--rail-top) / var(--k, 1)); bottom: auto; }
}

/* ---- Welcome copy (Product; the approved Deep Space R7 20261025 rule, restored 2026-11-09) ----
   Landscape: the greeting and the line under it form one block, vertically centred, whose right edge
   keeps clamp(80px, 10vw, 144px) from the main planet's left tangent (61.8% of the width); the text
   stays left-aligned inside it. Screen px divided by K for the scaled layer. Font sizes unchanged. */
@media (min-aspect-ratio: 1/1) {
  .sp-app .sp-w-copy {
    --copy-gap: clamp(80px, 10cqw, 144px);
    position: absolute; top: 50%; transform: translateY(-50%);
    right: calc((38.2cqw + var(--copy-gap)) / var(--k, 1));
    width: max-content; max-width: calc((61.8cqw - var(--copy-gap)) / var(--k, 1) - var(--pp-l, 60px));
  }
}

/* Portrait (Product; D1-A approved 2026-11-10): the copy block sits left, centred in the sky between the
   brand and the planet's top edge (2026-11-11: the horizon planet shared with Result, top at 78% of the
   height); its left edge follows the width. */
@media (max-aspect-ratio: 999/1000) {
  .sp-app .sp-w-copy {
    --copy-l: clamp(24px, 6.5cqw, 60px);
    position: absolute; left: var(--copy-l); top: calc((max(18px, env(safe-area-inset-top)) + 30px + 78cqh) / 2); transform: translateY(-50%);
    width: max-content; max-width: calc(100cqw - 2 * var(--copy-l));
  }
}

/* ---- Welcome: theme dots + legal links (Product; absent from R12) on the button rail's centre line ---- */
.sp-app .sp-welcome-aux { position: absolute; left: 60px; right: 60px; bottom: 48px; height: 58px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.sp-app[data-band="cmp"] .sp-welcome-aux { left: var(--pp-l); right: var(--pp-r); bottom: 40px; height: 52px; }
.sp-app[data-band="shr"] .sp-welcome-aux { left: var(--pp-l); right: var(--pp-r); bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 10px)); height: 48px; }
@media (min-aspect-ratio: 1/1), (max-aspect-ratio: 999/1000) {
  .sp-app[data-band] .sp-welcome-aux { left: calc(var(--rail-l) / var(--k, 1)); right: calc(var(--rail-r) / var(--k, 1)); top: calc(var(--rail-top) / var(--k, 1)); bottom: auto; height: calc(var(--rail-h) / var(--k, 1)); }
}
.sp-app .sp-welcome-aux > * { pointer-events: auto; }
/* Bottom-left lines (approved 2026-11-09, landscape): the hint and the legal links exactly as on the Sky
   Welcome (13px/620 hint, 11px legal 5px under it, centred on the rail row; under the row with the
   hint hidden up to 720px wide), at the rail's left end, in light colours for the dark sky. The block
   is scaled by 1/K out of the K-scaled layer, so it lays out and renders at the Sky sizes. Portrait
   keeps the earlier legal-only line on the CTA's centre line. */
.sp-app .sp-welcome-aux .welcome-support { position: absolute; left: 0; top: 50%; transform: translateY(-50%); white-space: nowrap; }
.sp-app .sp-welcome-aux .swipe-hint { display: none; }
.sp-app .sp-welcome-aux .welcome-legal { font-size: 11px; line-height: 1.35; font-weight: 400; color: rgba(255,255,255,.42); }
.sp-app .sp-welcome-aux .welcome-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (min-aspect-ratio: 1/1) {
  .sp-app .sp-welcome-aux .welcome-support { top: 0; transform: none; height: var(--rail-h, 58px); display: flex; flex-direction: column; justify-content: center; transform-origin: 0 0; scale: calc(1 / var(--k, 1)); }
  .sp-app .sp-welcome-aux .swipe-hint { display: block; font-size: 13px; font-weight: 620; line-height: normal; color: rgba(255,255,255,.72); }
  .sp-app .sp-welcome-aux .welcome-legal { margin-top: 5px; color: rgba(255,255,255,.5); }
}
@media (max-width: 720px) and (min-aspect-ratio: 1/1) {
  .sp-app .sp-welcome-aux .welcome-support { top: calc(100% + 2px); height: auto; }
  .sp-app .sp-welcome-aux .swipe-hint { display: none; }
  .sp-app .sp-welcome-aux .welcome-legal { margin-top: 0; }
}
.sp-app .sp-welcome-aux .theme-dots { display: flex; gap: 9px; }
/* Portrait (Product, 2026-11-10): as on the Sky portrait Welcome — up to 720px wide the dots open the
   button row on the left and the legal links sit just under it (hint hidden); wider, the hint and the
   links are on the left and the dots in the middle. The planet's bright face lies under this row, so
   the dots and the lines get a faint dark backing to stay readable. */
@media (max-aspect-ratio: 999/1000) {
  .sp-app .sp-welcome-aux .welcome-support { top: 0; transform: none; height: var(--rail-h, 58px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
  .sp-app .sp-welcome-aux .swipe-hint { display: block; font-size: 13px; font-weight: 620; line-height: normal; color: rgba(255,255,255,.82); }
  .sp-app .sp-welcome-aux .welcome-legal { margin-top: 5px; color: rgba(255,255,255,.72); }
  .sp-app .sp-welcome-aux :is(.swipe-hint, .welcome-legal) { padding: 1px 7px; margin-left: -7px; border-radius: 8px; background: rgba(5,6,10,.34); width: max-content; }
  .sp-app .sp-welcome-aux .theme-dots { padding: 7px 9px; border-radius: 999px; background: rgba(5,6,10,.34); }
}
@media (max-width: 720px) and (max-aspect-ratio: 999/1000) {
  /* the dots over the legal line, both inside the button row, so the line keeps clear of the screen edge */
  .sp-app .sp-welcome-aux { justify-content: flex-start; align-items: flex-start; }
  .sp-app .sp-welcome-aux .theme-dots { margin: 2px 0 0 -9px; }
  .sp-app .sp-welcome-aux .welcome-support { top: auto; bottom: 1px; height: auto; }
  .sp-app .sp-welcome-aux .swipe-hint { display: none; }
  .sp-app .sp-welcome-aux .welcome-legal { margin-top: 0; }
}

.sp-app .sp-welcome-aux .theme-dot { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,.30); cursor: pointer; transition: width .24s ease, background .24s ease; }
.sp-app .sp-welcome-aux .theme-dot.active { width: 26px; background: #fff; }

/* ---- Plan: the Product list (#planItems) styled as the R12 list (R12 V13/V14 + responsive bands) ---- */
.sp-app .sp-plan-list .plan-item { position: relative; display: block; flex: 0 0 auto; box-sizing: border-box; height: var(--ih, 68px); overflow: hidden; border-radius: 20px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: height .22s ease, opacity .22s ease, margin .22s ease, transform .16s ease, border-color .2s, box-shadow .2s; }
/* R12 puts this shadow on .plan-surface inside an overflow:hidden .plan-item, so its outer glow is clipped away: only the inset ring shows. */
.sp-app .sp-plan-list .plan-item[data-active="true"] { border-color: var(--sc); box-shadow: 0 0 0 1px var(--sc) inset; }
.sp-app .sp-plan-list .plan-item.dragging { z-index: 5; box-shadow: 0 18px 40px rgba(0,0,0,.5); background: rgba(30,32,56,.95); }
.sp-app .sp-plan-list .plan-item-surface { position: relative; z-index: 2; height: 100%; display: grid; grid-template-columns: 20px 44px minmax(0, 1fr) auto 32px; align-items: center; gap: 14px; padding: 0 8px; transition: transform .22s ease; }
.sp-app .sp-plan-list .plan-item.swiping .plan-item-surface { transition: none; }
.sp-app .sp-plan-list .plan-item.delete-open .plan-item-surface { transform: translateX(-92px); }
.sp-app .sp-plan-list .swipe-delete-action { position: absolute; right: 8px; top: 8px; bottom: 8px; width: 76px; z-index: 1; border: 0; border-radius: 14px; background: linear-gradient(135deg, #ff6b86, #d6455d); color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; opacity: 0; pointer-events: none; transform: scale(.92); transition: opacity .18s ease, transform .22s ease; }
.sp-app .sp-plan-list .plan-item:is(.delete-open, .swiping, .delete-reveal-active) .swipe-delete-action { opacity: 1; pointer-events: auto; transform: scale(1); }
/* Device feedback D4 (2026-11-13): the row is see-through, so the action showed at full strength until a
   swipe back had settled, then faded. It now follows the swipe: --swipe-reveal (0–1, plan.js) while the
   finger moves, and the row's own .22s ease while the row settles open or closed. */
.sp-app .sp-plan-list .plan-item:is(.swiping, .swipe-settling) .swipe-delete-action { opacity: var(--swipe-reveal, 1); transform: scale(calc(.92 + .08 * var(--swipe-reveal, 1))); }
.sp-app .sp-plan-list .plan-item.swiping .swipe-delete-action { transition: none; }
.sp-app .sp-plan-list .plan-item.swipe-settling .swipe-delete-action { transition: opacity .22s ease, transform .22s ease; }
.sp-app .sp-plan-list .drag-handle { position: relative; width: 20px; height: 100%; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--text-muted); cursor: grab; touch-action: none; }
.sp-app .sp-plan-list .drag-handle::after { content: ''; position: absolute; inset: 0 -12px; }
.sp-app .sp-plan-list .drag-handle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.sp-app .sp-plan-list .type-button { position: relative; width: 44px; height: 44px; padding: 0; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: inherit; cursor: pointer; transition: transform .15s ease; }
.sp-app .sp-plan-list .type-button:active { transform: scale(.9); }
.sp-app .sp-plan-list .type-button::after { content: ''; position: absolute; inset: -4px; }
.sp-app .sp-plan-list .type-button svg { width: 20px; height: 20px; fill: none; stroke: var(--sc, #00F2FE); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sp-app .sp-plan-list .item-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-app .sp-plan-list .item-copy input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: inherit; font-family: inherit; text-overflow: ellipsis; user-select: text; -webkit-user-select: text; }
.sp-app .sp-plan-list .item-copy input.item-name { font-size: 16px; font-weight: 600; margin: 0; --sp-field-k: 1; }
.sp-app .sp-plan-list .item-copy input.item-note { font-size: 16px; color: var(--text-muted); --sp-field-k: .75; }
/* Device feedback (2026-11-13, as Sky B1): iPhone Safari zooms the page when a field under 16px takes focus.
   Every Space field is typed at 16px or more and drawn at its design size with a scale: --sp-field-k =
   design size / 16 (design sizes in the rules below: title 16/15/20px, note 12/14px, minutes 14/18px).
   The box keeps the design footprint: the height is the 16px line times k (margins take up the
   difference); the width is divided by k with a matching negative end margin. */
.sp-app .sp-plan-list .item-copy input:is(.item-name, .item-note), .sp-app .sp-plan-list .duration-input {
  line-height: 1.1667; height: 1.1667em;
  margin-block: calc(18.667px * (var(--sp-field-k, 1) - 1) / 2);
  transform: scale(var(--sp-field-k, 1));
}
.sp-app .sp-plan-list .item-copy input:is(.item-name, .item-note) {
  transform-origin: 0 50%;
  width: calc(100% / var(--sp-field-k, 1));
  margin-right: calc(100% - 100% / var(--sp-field-k, 1));
}
.sp-app .sp-plan-list .item-note::placeholder { color: rgba(255,255,255,.28); }
.sp-app .sp-plan-list .item-copy input:focus { box-shadow: 0 1px 0 rgba(255,255,255,.35); }
/* R12 shows "45m"; Product keeps the number editable and adds −/+ (1-minute steps, as Oxygen/Sky),
   drawn in the R12 control language: hairline discs like the type button, muted until pressed. */
.sp-app .sp-plan-list .duration-control { display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 44px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sp-app .sp-plan-list .duration-control .step-btn { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: var(--text-muted); font-size: 0; cursor: pointer; transition: background .15s ease, color .15s ease, transform .15s ease; }
/* The glyph is drawn centred on the disc, independent of the button's own (hidden) text. */
.sp-app .sp-plan-list .duration-control .step-btn::before { content: ''; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; background: linear-gradient(currentColor, currentColor) center / 10px 1.6px no-repeat; }
.sp-app .sp-plan-list .duration-control .step-btn[data-step="1"]::before { background: linear-gradient(currentColor, currentColor) center / 10px 1.6px no-repeat, linear-gradient(currentColor, currentColor) center / 1.6px 10px no-repeat; }
.sp-app .sp-plan-list .duration-control .step-btn::after { content: ''; position: absolute; inset: -9px -3px; }
.sp-app .sp-plan-list .duration-control .step-btn:hover { color: #fff; background: rgba(255,255,255,.10); }
.sp-app .sp-plan-list .duration-control .step-btn:active { transform: scale(.9); }
.sp-app[data-band="shr"] .sp-plan-list .duration-control { gap: 8px; }
.sp-app[data-band="shr"] .sp-plan-list .duration-control .step-btn { width: 24px; height: 24px; }
.sp-app .sp-plan-list .duration-input-wrap { display: inline-flex; align-items: baseline; }
.sp-app .sp-plan-list .duration-input { width: 2ch; min-width: 1ch; padding: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; text-align: right; -moz-appearance: textfield; appearance: textfield; user-select: text; -webkit-user-select: text; }
/* Minutes: typed at 16px (the control's 14px design size, k = .875). The width is --sp-dur-n ch at 16px
   (space-plan.js), so the scaled digits keep their design width; the start margin gives back the rest. */
.sp-app .sp-plan-list .duration-input { font-size: 16px; --sp-field-k: .875; transform-origin: 100% 50%; margin-left: calc(var(--sp-dur-n, 2) * 1ch * (var(--sp-field-k) - 1)); }
.sp-app .sp-plan-list .duration-input::-webkit-inner-spin-button,
.sp-app .sp-plan-list .duration-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sp-app .sp-plan-list .duration-unit { font-size: 0; }
.sp-app .sp-plan-list .duration-unit::after { content: 'm'; font-size: 14px; }
.sp-app .sp-plan-list .item-more-btn { position: relative; width: 32px; height: 32px; padding: 0; border: 0; background: none; color: var(--text-muted); font-size: 0; cursor: pointer; }
.sp-app .sp-plan-list .item-more-btn::before { content: '···'; font-size: 18px; letter-spacing: 1px; }
.sp-app .sp-plan-list .item-more-btn::after { content: ''; position: absolute; inset: -6px; }
.sp-app .sp-plan-list .plan-empty { padding: 24px 8px; font-size: 14px; line-height: 1.75; color: var(--text-muted); }
.sp-app[data-band="cmp"] .sp-plan-list .swipe-delete-action,
.sp-app[data-band="shr"] .sp-plan-list .swipe-delete-action { top: 4px; bottom: 4px; }
.sp-app[data-band="shr"] .sp-plan-list .plan-item-surface { grid-template-columns: 20px 38px minmax(0, 1fr) auto 32px; gap: 10px; }
.sp-app[data-band="shr"] .sp-plan-list .type-button { width: 38px; height: 38px; border-radius: 12px; }
.sp-app[data-band="shr"] .sp-plan-list .item-copy input.item-name { --sp-field-k: .9375; }
/* The Product start / add buttons carry the R12 .cta-btn / .add-btn classes; the add icon is R12's "＋" disc. */
.sp-app .sp-add-btn > svg { display: none; }

/* ---- Plan layout (Product; approved redesign 2026-11-07, rail and alignment 2026-11-08, vertical
   centring 2026-11-09) ----
   Same structure as the Oxygen/Sky Plan: the title on its own row; below it the list on the left and,
   on the right, the planet slot above the overview card (with the music switch). Landscape (portrait
   keeps the 2026-11-07 layout): the block spans the button rail (the list and "添加计划项" start at its
   left edge, the card and "开始今日计划" end at its right edge; the start button sits on the rail spot).
   The main block (title top to list / card bottom) is centred between the brand's bottom line and the
   button row's top: equal spacer rows above and below (at least 12px). The list row is exactly the
   six-row list (--sp-list-h, set by space-plan.js), so the sixth item and the card share a bottom
   edge; the right column spans the title and list rows, so the planet slot starts at the title's top. */
.sp-app .sp-ui-plan { padding-bottom: 48px; }
.sp-app[data-band="cmp"] .sp-ui-plan { padding-bottom: 40px; }
.sp-app[data-band="shr"] .sp-ui-plan { padding-bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 10px)); }
@media (min-aspect-ratio: 1/1) {
  .sp-app[data-band] .sp-ui-plan { padding-top: calc((max(18px, env(safe-area-inset-top)) + var(--sp-brand-m, 30px)) / var(--k, 1)); padding-left: calc(var(--rail-l) / var(--k, 1)); padding-right: calc(var(--rail-r) / var(--k, 1)); padding-bottom: calc((100cqh - var(--rail-top) - var(--rail-h)) / var(--k, 1)); }
}
.sp-app .sp-plan-layout { flex: 1 1 0; min-height: var(--pl-min, 402px); grid-template-columns: minmax(0, 1fr) var(--pc-l, 360px); }
.sp-app .sp-plan-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sp-app .sp-plan-header { margin-top: 0; flex: 0 0 auto; }
.sp-app .sp-plan-list-host { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.sp-app .sp-plan-list { padding-right: 0; scrollbar-gutter: auto; }
.sp-app .sp-plan-side { position: relative; z-index: 10; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sp-app .sp-plan-foot { margin-bottom: 0; grid-template-columns: minmax(0, 1fr) var(--pc-l, 360px); }
@media (min-aspect-ratio: 1/1) {
  .sp-app .sp-plan-layout { --sp-gap-min: 12px; min-height: 0; grid-template-rows: minmax(var(--sp-gap-min), 1fr) auto var(--sp-list-h, 0px) minmax(var(--sp-gap-min), 1fr); row-gap: 0; }
  .sp-app .sp-plan-main { display: contents; }
  .sp-app .sp-plan-header { grid-column: 1; grid-row: 2; }
  .sp-app .sp-plan-list-host { grid-column: 1; grid-row: 3; }
  .sp-app .sp-plan-side { grid-column: 2; grid-row: 2 / 4; }
  .sp-app .sp-plan-side .sp-plan-slot { flex: 1 1 0; min-height: 0; height: auto; }
  .sp-app[data-band] .sp-plan-foot { margin-top: 0; grid-template-columns: minmax(0, 1fr) auto; }
}
/* Portrait (Product; D3-A approved 2026-11-10): the landscape modules stacked — the title with the
   planet beside it (a square of 30% of the width, at most 17% of the height), the whole six-row list,
   then the overview card (compact chips, which the satellites dock onto) with the music switch; add and
   start on the button rail. As in landscape the block is centred between the brand line and the button
   row (spacers of at least 12px); the list row is the six rows (--sp-list-h from space-plan.js). */
@media (max-aspect-ratio: 999/1000) {
  .sp-app[data-band] .sp-ui-plan { padding: calc(max(18px, env(safe-area-inset-top)) + var(--sp-brand-m, 30px)) var(--rail-r) calc(100cqh - var(--rail-top) - var(--rail-h)) var(--rail-l); overflow: hidden; }
  .sp-app .sp-plan-layout { --sp-gap-min: 12px; flex: 1 1 0; min-height: 0; height: auto; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(var(--sp-gap-min), 1fr) auto calc(var(--sp-list-h, 0px) + 14px) auto minmax(var(--sp-gap-min), 1fr); gap: 0 12px; }
  .sp-app :is(.sp-plan-main, .sp-plan-side) { display: contents; }
  .sp-app .sp-plan-header { grid-column: 1; grid-row: 2; align-self: center; margin: 0; }
  .sp-app .sp-plan-header h2 { word-break: keep-all; line-height: 1.12; }
  .sp-app .sp-plan-side .sp-plan-slot { grid-column: 2; grid-row: 2; flex: none; width: min(30cqw, 17cqh); height: min(30cqw, 17cqh); }
  .sp-app .sp-plan-list-host { grid-column: 1 / -1; grid-row: 3; margin-top: 14px; }
  .sp-app .sp-plan-list { gap: 8px; }
  .sp-app .sp-plan-summary { grid-column: 1 / -1; grid-row: 4; margin-top: 12px; }
  .sp-app[data-band] .sp-plan-foot { margin-top: 0; grid-template-columns: minmax(0, 1fr) auto; }
  .sp-app[data-band] .sp-plan-foot .sp-add-btn { height: var(--rail-h); min-height: 0; min-width: 0; max-width: calc(100cqw - var(--rail-l) - var(--rail-r) - var(--rail-w) - 12px); padding-right: 22px; font-size: var(--rail-font); }
  .sp-app[data-band] .sp-plan-foot .sp-add-btn > span { flex: none; padding-left: 12px; }
  .sp-app[data-band] .sp-plan-foot .sp-add-btn::before { width: var(--rail-disc); height: var(--rail-disc); }
  /* Device feedback A3 (2026-11-13): "添加计划项" is the mirror of "开始今日计划": the same width and
     height, its disc on the left edge as the arrow disc is on the right, the label centred in the rest.
     Where two rail buttons and an 8px gap do not fit (narrow phones) both narrow together. */
  .sp-app[data-band] .sp-plan-foot { --sp-foot-btn-w: min(var(--rail-w), (100cqw - var(--rail-l) - var(--rail-r) - 8px) / 2); }
  .sp-app[data-band] .sp-plan-foot :is(#startPlanBtn, .sp-add-btn) { width: var(--sp-foot-btn-w); }
  .sp-app[data-band] .sp-plan-foot .sp-add-btn { max-width: none; padding: 0 0 0 8px; }
  .sp-app[data-band] .sp-plan-foot .sp-add-btn > span { flex: 1; padding-left: 0; text-align: center; }
}
/* Phones (up to 720px wide): the list rows take the short band's tighter row (R12 shr values), so the
   item names and notes keep their room next to the duration steppers. */
@media (max-width: 720px) and (max-aspect-ratio: 999/1000) {
  .sp-app .sp-plan-list .plan-item-surface { grid-template-columns: 20px 38px minmax(0, 1fr) auto 28px; gap: 10px; padding: 0 6px; }
  .sp-app .sp-plan-list .type-button { width: 38px; height: 38px; border-radius: 12px; }
  .sp-app .sp-plan-list .item-copy input.item-name { --sp-field-k: .9375; }
  .sp-app .sp-plan-list .duration-control { gap: 8px; }
  .sp-app .sp-plan-list .duration-control .step-btn { width: 24px; height: 24px; }
  .sp-app .sp-plan-list .item-more-btn { width: 28px; }
}
.sp-app .sp-plan-foot .sp-add-wrap { grid-column: 1; justify-self: start; }
@media (min-aspect-ratio: 1/1) { .sp-app[data-band] .sp-plan-foot .sp-add-btn { height: calc(var(--rail-h) / var(--k, 1)); min-height: 0; } }
.sp-app .sp-plan-foot .sp-cta-btn { grid-column: 2; justify-self: end; }
.sp-app .sp-plan-foot .sp-picker { left: 0; right: auto; }
/* Short band: five scene chips fit the 300px overview card without clipping their minutes
   (R12's chip spacing clips "20m" once all five scenes are planned). */
.sp-app[data-band="shr"] #sp-sumRows { gap: 4px; }
.sp-app[data-band="shr"] .sp-sum-row { padding: 0 4px; gap: 3px; }
.sp-app[data-band="shr"] .sp-sum-min { font-size: 11px; letter-spacing: -.02em; }

/* Compact overview card (Product; approved 2026-11-09): short landscape screens of the middle band
   (height below 580px, data-sum="compact" from space-page.js) take the short band's card, the R12 shr
   values plus the Product chip and music-row tightening above and below, so the planet keeps its room. */
.sp-app[data-band="cmp"][data-sum="compact"] .sp-plan-summary { padding: 8px 10px; margin-top: 6px; border-radius: 22px; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-top { margin-bottom: 6px; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-title { font-size: 12px; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-total { font-size: 22px; }
.sp-app[data-band="cmp"][data-sum="compact"] #sp-sumRows { display: flex; gap: 4px; min-height: 0; height: 30px; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-row { flex: 1 1 0; min-width: 0; height: 30px; margin: 0; padding: 0 4px; grid-template-columns: 22px 1fr; gap: 3px; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-planet { width: 22px; height: 22px; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-name { display: none; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-min { font-size: 11px; letter-spacing: -.02em; text-align: right; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-plan-summary .music-switch-row { margin-top: 6px; padding: 6px 4px 0; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-plan-summary .music-switch-copy strong { font-size: 13px; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-plan-summary .music-switch-copy span { display: none; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-plan-summary .switch { width: 42px; height: 24px; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-plan-summary .switch::after { width: 16px; height: 16px; }
.sp-app[data-band="cmp"][data-sum="compact"] .sp-plan-summary .switch.on::after { transform: translateX(18px); }
/* Wide portrait screens (tablets): the chips are wide, so each shows its scene name with the minutes,
   centred, as the full card's rows read. */
@media (min-width: 721px) and (max-aspect-ratio: 999/1000) {
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-row { grid-template-columns: 22px auto auto; justify-content: center; gap: 8px; }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-name { display: block; font-size: 13px; white-space: nowrap; }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-name small { display: none; }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-min { font-size: 13px; text-align: left; letter-spacing: 0; }
}

/* ---- Plan: background-music switch (Product; R12 has none), the overview card's last row as on the
   Sky Plan: copy left, switch right; the "on" pill is white with a void knob, the R12 CTA pairing. ---- */
.sp-app .sp-plan-summary .music-switch-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 0; padding: 12px 10px 2px; border-top: 1px solid rgba(255,255,255,.06); }
.sp-app .sp-plan-summary .music-switch-copy { min-width: 0; white-space: nowrap; }
.sp-app .sp-plan-summary .music-switch-copy strong { display: block; font-size: 14px; font-weight: 600; color: var(--text-main); }
.sp-app .sp-plan-summary .music-switch-copy span { display: block; margin-top: 3px; font-size: 12px; color: var(--text-muted); }
.sp-app .sp-plan-summary .switch { position: relative; flex: 0 0 auto; width: 46px; height: 28px; padding: 3px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.sp-app .sp-plan-summary .switch::before { content: ''; position: absolute; inset: -8px -6px; }
.sp-app .sp-plan-summary .switch::after { content: ''; display: block; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.62); box-shadow: none; transition: transform .22s cubic-bezier(.2,.8,.2,1), background .2s ease; }
.sp-app .sp-plan-summary .switch.on { background: var(--text-main); border-color: var(--text-main); }
.sp-app .sp-plan-summary .switch.on::after { background: var(--space-void); transform: translateX(18px); }
.sp-app[data-band="cmp"] .sp-plan-summary .music-switch-row { padding-top: 10px; }
.sp-app[data-band="shr"] .sp-plan-summary .music-switch-row { margin-top: 6px; padding: 6px 4px 0; }
.sp-app[data-band="shr"] .sp-plan-summary .music-switch-copy strong { font-size: 13px; }
.sp-app[data-band="shr"] .sp-plan-summary .music-switch-copy span { display: none; }
.sp-app[data-band="shr"] .sp-plan-summary .switch { width: 42px; height: 24px; }
.sp-app[data-band="shr"] .sp-plan-summary .switch::after { width: 16px; height: 16px; }
.sp-app[data-band="shr"] .sp-plan-summary .switch.on::after { transform: translateX(18px); }
@media (prefers-reduced-motion: reduce) { .sp-app .sp-plan-summary .switch::after, .sp-app .sp-plan-list .step-btn { transition: none; } }

/* ---- Result portrait (Product; D5-A / D6-a / D7-b approved 2026-11-10) ----
   The landscape modules stacked from the brand down: heading and minutes, the return button (rail size),
   the three stat cards in a row, the chart. The horizon planet (stage) sits under them with the R12
   31-bead necklace, and the dawn is a wide low band on the horizon (space-result.js). Sizes follow the
   height so the stack ends above the necklace on short phones; as in landscape the stack is centred in
   the room above the horizon zone (78% of the height less the necklace's 80px). */
@media (max-aspect-ratio: 999/1000) {
  .sp-app[data-band] .sp-ui-result { padding: calc(max(18px, env(safe-area-inset-top)) + 30px + clamp(12px, 1.8cqh, 40px)) var(--rail-r) calc(22cqh + 80px) var(--rail-l); }
  .sp-app .sp-result-layout { margin: auto 0; display: flex; flex-direction: column; gap: clamp(14px, 2cqh, 24px); }
  .sp-app .sp-result-left { justify-content: flex-start; }
  .sp-app .sp-r-title { font-size: 12px; margin-bottom: 6px; }
  .sp-app .sp-r-head2 { font-size: clamp(22px, 6cqw, 30px); }
  .sp-app .sp-rl-mid { margin-top: clamp(4px, 1cqh, 12px); }
  .sp-app .sp-massive-achievement { font-size: clamp(56px, 8cqh, 112px); }
  .sp-app .sp-rl-mid .sp-massive-achievement { margin-bottom: .1em; }
  .sp-app .sp-massive-achievement small { font-size: clamp(20px, 2.4cqh, 30px); }
  .sp-app .sp-r-meta { font-size: 12px; line-height: 1.4; }
  .sp-app .sp-r-meta > span:first-child { white-space: normal; }
  .sp-app[data-band] #sp-returnBtn { margin-top: clamp(12px, 2cqh, 22px); width: var(--rail-w); height: var(--rail-h); min-width: 0; min-height: 0; font-size: var(--rail-font); }
  .sp-app[data-band] #sp-returnBtn .sp-arrow-disc { width: var(--rail-disc); height: var(--rail-disc); }
  .sp-app .sp-result-right { gap: clamp(8px, 1.2cqh, 14px); }
  .sp-app .sp-stats-grid { gap: 8px; }
  .sp-app .sp-stat-card { padding: clamp(8px, 1.3cqh, 16px) 12px; border-radius: 18px; gap: 2px; }
  .sp-app .sp-stat-card svg { width: 18px; height: 18px; margin-bottom: 2px; }
  .sp-app .sp-chart-panel { height: clamp(132px, 19cqh, 220px); padding: 12px 14px 10px; border-radius: 20px; gap: 6px; }
  .sp-app .sp-res-cap { font-size: 13px; text-shadow: 0 0 3px rgba(5,6,16,.8), 0 1px 12px rgba(5,6,16,.9); }
  .sp-app .sp-res-cap span { color: rgba(255,255,255,.92); }
  .sp-app .sp-dawn { mix-blend-mode: screen; -webkit-mask-image: none; mask-image: none; background: radial-gradient(ellipse 50% 50% at 50% 60%, rgba(255,240,210,.62) 0%, rgba(255,205,235,.34) 32%, rgba(170,150,255,.14) 62%, transparent 82%); }
  .sp-app .sp-ui-result.sp-done .sp-dawn { opacity: 1; }
}
/* Short portrait screens (below 800px tall): the stat cards drop their icons, as in the short band. */
@media (max-height: 799px) and (max-aspect-ratio: 999/1000) {
  .sp-app .sp-stat-card svg { display: none; }
}

/* ---- Result: a scene the plan did not finish shows "actual/planned m" without the tick, a little
   fainter than the finished ones (Product; decision 2026-11-09). ---- */
.sp-app .sp-bar-label small.sp-bar-part { opacity: .7; }

/* ---- Player: Calm / Black over the parent stage (R12 skin; R15 state machine) ---- */
/* R12 paints #app #02030a/#000 in Calm/Black; here that is the stage under the page, so the page
   root stays transparent and only the Black cover (#sp-pCover) is drawn in the page. */
.sp-app.sp-ui-root[data-pmode] { background: transparent; }
.sp-app :is(#sp-playerOrb, #sp-pCover):focus:not(:focus-visible) { outline: none; }
.sp-app #sp-pCover:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); }
/* Portrait (Product, 2026-11-10): the landscape module as is — the orb window with the controls under
   it, centred — sized by the width: the orb leaves clamp(24px, 8vw, 64px) on each side (still at most
   R12's 620px and the height left for the controls); the planet follows the orb (stage). */
@media (max-aspect-ratio: 999/1000) {
  .sp-app[data-band] .sp-ui-player { padding: calc(max(18px, env(safe-area-inset-top)) + 30px) var(--rail-r) calc(max(18px, env(safe-area-inset-bottom)) + 24px) var(--rail-l); }
  .sp-app .sp-player-orb { height: auto; width: min(var(--orb-max, 620px), calc(100vw - 2 * clamp(24px, 8vw, 64px))); max-height: calc(100% - 124px); }
}
/* Product: audio status line (R12 has none) in R12's help-line style. */
.sp-app .sp-p-status { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 40; text-align: center; font-size: 13px; color: rgba(255,255,255,.42); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.sp-app .sp-p-status.sp-on { opacity: 1; }
.sp-app[data-band="shr"] .sp-p-status { bottom: 8px; }

/* ---- Welcome under the Profile overlay (Product): copy, CTA, dots and legal links step aside ---- */
/* Leaving uses 400ms (the App cross-fade); coming back keeps R12's own entry (.8s after .4s). */
.sp-app.sp-ui-root[data-profile="open"] .sp-ui-welcome { opacity: 0; pointer-events: none; transition: opacity .4s ease; }
@media (prefers-reduced-motion: reduce) { .sp-app.sp-ui-root[data-profile="open"] .sp-ui-welcome { transition: none; } }

/* ---- Portrait: opaque cards (Product; decision 2026-11-10) ----
   The star dust is drawn by the stage under the page, so the cards' own blur cannot reach it and dust
   points showed through the text. In portrait only, the plan rows, the overview card and the Result
   cards take a nearly opaque void-tinted background; landscape and the dust layer are unchanged. */
@media (max-aspect-ratio: 999/1000) {
  .sp-app .sp-plan-list .plan-item { background: rgba(16,18,30,.94); }
  .sp-app .sp-plan-list .plan-item.dragging { background: rgba(30,32,56,.97); }
  .sp-app :is(.sp-plan-summary, .sp-stat-card, .sp-chart-panel).sp-glass-panel { background: rgba(12,14,24,.94); }
  .sp-app .sp-plan-summary .sp-sum-row.sp-cur { background: rgba(255,255,255,.05); }
}

/* ---- Tablet portrait (Product; decision 2026-11-10, after the Sky R6 iPad portrait) ----
   From 721px wide the Plan and Result content scales up with the width (row height, type, controls,
   stat figures, chart), as the Sky iPad portrait cards do. Spare height goes between the list and the
   button row (Plan) and between the chart and the horizon (Result: the planet drops to 86% at most),
   not into one big centred gap. Phones keep the values above. */
@media (min-width: 721px) and (max-aspect-ratio: 999/1000) {
  /* Header (Product, 2026-11-11): bigger title, smaller planet. The title rule now carries [data-band] —
     without it the band's 34px won and the title never grew. The planet is min(22cqw, 16cqh), down from
     min(30cqw, 22cqh), centred in a header row that keeps the old height (the header's min-height, which
     space-plan.js measures for the list), so the list and everything under it stay where they were. */
  .sp-app[data-band] .sp-plan-header { display: grid; align-content: center; min-height: min(30cqw, 22cqh); margin: 0; }
  .sp-app[data-band] .sp-plan-header h2 { font-size: clamp(44px, 6.4cqw, 64px); }
  .sp-app .sp-plan-side .sp-plan-slot { width: min(22cqw, 16cqh); height: min(22cqw, 16cqh); align-self: center; }
  .sp-app .sp-plan-list { gap: 12px; }
  .sp-app .sp-plan-list .plan-item { border-radius: 24px; }
  .sp-app .sp-plan-list .plan-item-surface { grid-template-columns: 24px 56px minmax(0, 1fr) auto 36px; gap: 18px; padding: 0 12px; }
  .sp-app .sp-plan-list .type-button { width: 56px; height: 56px; border-radius: 17px; }
  .sp-app .sp-plan-list .type-button svg { width: 24px; height: 24px; }
  .sp-app .sp-plan-list .item-copy { gap: 4px; }
  .sp-app .sp-plan-list .item-copy input.item-name { font-size: 20px; --sp-field-k: 1; margin-block: 0; }
  .sp-app .sp-plan-list .item-copy input.item-note { --sp-field-k: .875; }
  .sp-app .sp-plan-list .duration-control { font-size: 18px; gap: 16px; min-width: 56px; }
  .sp-app .sp-plan-list .duration-input { font-size: 18px; --sp-field-k: 1; margin-block: 0; }
  .sp-app .sp-plan-list .duration-unit::after { font-size: 18px; }
  .sp-app .sp-plan-list .duration-control .step-btn { width: 32px; height: 32px; }
  .sp-app .sp-plan-list .item-more-btn { width: 36px; }
  .sp-app .sp-plan-list .item-more-btn::before { font-size: 22px; }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-plan-summary { padding: 14px 18px 12px; border-radius: 26px; margin-top: 16px; }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-title { font-size: 15px; }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-total { font-size: 32px; }
  .sp-app[data-band="cmp"][data-sum="compact"] #sp-sumRows { height: 40px; gap: 8px; }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-row { height: 40px; grid-template-columns: 30px auto auto; border-radius: 14px; }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-planet { width: 30px; height: 30px; }
  .sp-app[data-band="cmp"][data-sum="compact"] :is(.sp-sum-name, .sp-sum-min) { font-size: 15px; }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-plan-summary .music-switch-row { margin-top: 12px; padding: 12px 4px 0; }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-plan-summary .music-switch-copy strong { font-size: 16px; }

  .sp-app[data-band] .sp-ui-result { padding-top: calc(max(18px, env(safe-area-inset-top)) + 30px + clamp(24px, 3.4cqh, 56px)); padding-bottom: calc(18cqh + 80px); }
  .sp-app .sp-result-layout { gap: clamp(22px, 2.8cqh, 40px); }
  .sp-app .sp-r-title { font-size: 15px; margin-bottom: 10px; }
  .sp-app .sp-r-head2 { font-size: clamp(34px, 5.2cqw, 52px); }
  .sp-app .sp-massive-achievement { font-size: clamp(96px, 10.5cqw, 140px); }
  .sp-app .sp-massive-achievement small { font-size: clamp(30px, 3.6cqw, 44px); }
  .sp-app .sp-r-meta { font-size: 16px; }
  .sp-app .sp-result-right { gap: 18px; }
  .sp-app .sp-stats-grid { gap: 16px; }
  .sp-app .sp-stat-card { padding: 22px 24px; border-radius: 26px; gap: 6px; }
  .sp-app .sp-stat-card svg { width: 26px; height: 26px; margin-bottom: 6px; }
  .sp-app .sp-stat-val { font-size: clamp(34px, 5cqw, 48px); }
  .sp-app .sp-stat-label { font-size: 15px; }
  .sp-app[data-band] .sp-chart-panel { height: clamp(240px, 24cqh, 340px); padding: 20px 26px 16px; border-radius: 28px; gap: 12px; }
  .sp-app .sp-chart-title { font-size: 17px; }
  .sp-app .sp-bar-orb { width: 44px; height: 44px; flex: 0 0 44px; }
  .sp-app .sp-bar { width: 40px; border-radius: 20px; }
  .sp-app .sp-bar i { border-radius: 20px; }
  .sp-app .sp-bar-label { font-size: 15px; }
  .sp-app .sp-bar-label small { font-size: 13px; }
  .sp-app .sp-res-cap { font-size: 16px; }
  .sp-app .sp-bead em { font-size: 13px; }
}
/* Shorter tablets (up to 1100px tall, e.g. 768×1024): the same scale-up with tighter vertical sizes,
   so the necklace keeps its clearance under the chart. */
@media (min-width: 721px) and (max-height: 1100px) and (max-aspect-ratio: 999/1000) {
  .sp-app .sp-result-layout { gap: 18px; }
  .sp-app .sp-r-head2 { font-size: 34px; }
  .sp-app .sp-massive-achievement { font-size: 88px; }
  .sp-app .sp-stat-card { padding: 14px 20px; }
  .sp-app .sp-stat-card svg { display: none; }
  .sp-app .sp-stat-val { font-size: 34px; }
  .sp-app[data-band] .sp-chart-panel { height: 196px; padding: 16px 22px 12px; }
  .sp-app .sp-bar-orb { width: 38px; height: 38px; flex: 0 0 38px; }
}

/* ---- Result: footprint necklace, date review and sliding (Product, 2026-11-10) ----
   A day with a record opens from its bead (the Oxygen / Sky rule): it gets a pointer, a 32×44 touch
   target and, once chosen, a ring and its day number. Landscape gains only this selected state.
   On a phone held upright the month slides along the arc (app/space/necklace.js): every bead then has
   the touch target so a drag can start anywhere on the necklace; vertical pans stay with the page. */
.sp-app .sp-bead s { display: none; position: absolute; left: -16px; top: -22px; width: 32px; height: 44px; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.sp-app .sp-bead[data-has-footprint] s, .sp-app .sp-res-month[data-slide] .sp-bead s { display: block; }
.sp-app .sp-bead[data-has-footprint] { cursor: pointer; }
.sp-app .sp-bead:focus { outline: none; }
.sp-app .sp-bead:focus-visible i { outline: 2px solid #fff; outline-offset: 5px; }
.sp-app .sp-bead.sp-sel i { box-shadow: 0 0 0 3px rgba(5,6,16,.6), 0 0 0 4.5px #fff, 0 0 16px 6px rgba(255,255,255,.55); }
.sp-app .sp-bead.sp-sel em { color: #fff; font-weight: 600; }
/* At the ends of the sliding arc the day number fades faster than its bead (decision 2026-11-11), so a
   number never outshines a dim bead: bead opacity × --fade². */
.sp-app .sp-res-month[data-slide] .sp-bead em { opacity: calc(var(--fade, 1) * var(--fade, 1)); }
/* …and on a day without a record (a dim dot or ring) it is as dim as that bead. */
.sp-app .sp-res-month[data-slide] .sp-bead:is(.sp-n, .sp-f) em { color: rgba(255,255,255,.4); }
.sp-app .sp-res-month[data-slide] .sp-bead { user-select: none; -webkit-user-select: none; }
.sp-app .sp-res-month[data-slide] .sp-res-streak { -webkit-mask-image: linear-gradient(90deg, transparent var(--nk0), #000 var(--nk1), #000 var(--nk2), transparent var(--nk3)); mask-image: linear-gradient(90deg, transparent var(--nk0), #000 var(--nk1), #000 var(--nk2), transparent var(--nk3)); }
.sp-app .sp-massive-achievement .sp-day-label { margin-left: 10px; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--text-muted); white-space: nowrap; }

/* Device R1 P1-08: actual items flow left to right in five equal columns.
   These are visual widths, not fixed scene-category slots. */
@media (max-width: 720px) and (max-aspect-ratio: 999/1000) {
  .sp-app[data-band="cmp"][data-sum="compact"] #sp-sumRows {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); justify-content: start;
  }
}

/* P2-09: centre minutes in the area from the planet edge to the chip edge. */
@media (max-width: 720px) and (max-aspect-ratio: 999/1000) {
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-row {
    grid-template-columns: 22px minmax(0, 1fr); column-gap: 0; padding-right: 0;
  }
  .sp-app[data-band="cmp"][data-sum="compact"] .sp-sum-min { text-align: center; min-width: 0; }
}

/* The bright point disappears with the first darkening of the planet. */
.sp-app.sp-state-player:is([data-pmode="calm"], [data-pmode="black"]) .sp-r-head {
  opacity: 0;
  transition: opacity var(--tr, 2.2s) cubic-bezier(.08,.88,.15,1);
}

/* When Safari's toolbars leave too little room for six full rows, keep the
   original row sizes and give the middle section its own scroll above the buttons. */
@media (max-aspect-ratio: 999/1000) {
  .sp-app .sp-plan-layout[data-short-scroll] { overflow-y: auto; scrollbar-width: none; }
}
