/* The component page (/c/<id>): the stage on the left — Preview or Code, the component live, Replay
   under it — and every one of its settings on the right. Bluma's own black and white. */
:root{
  --bg:#FFFFFF; --ink:#111110; --ink-2:#6F6E69; --ink-3:#A3A29C; --line:#ECEBE7;
  --soft:#F6F5F1; --pill:#F2F1ED; --pill-hover:#E8E7E2; --row:#EFEEE9; --row-fill:#E2E1DB;
  --primary:#111110; --on-primary:#FFFFFF; --green:#22B455; --accent:#111110;
  --stage-light:#F3F2EE; --stage-dark:#101010;
  --shadow:0 1px 2px rgba(17,17,16,.04),0 18px 48px -18px rgba(17,17,16,.16);
  /* the chosen thing and the main key: flat ink here, a raised graphite slab in dark */
  --raise:var(--primary); --raise-ring:0 0 0 0 transparent;
  --pic-on-bg:var(--bg); --pic-on-ring:inset 0 0 0 2px var(--ink);
  /* the lit rim on every rounded edge (the welcome page's dark theme, 2026-11-25): bright where a corner turns,
     brightest top left. --ring is what a thing wears: black in light, white in dark (the stage: by its own scheme) */
  --rim-on:radial-gradient(circle 26px at 0 0,rgba(255,255,255,0.21),rgba(255,255,255,0)),radial-gradient(circle 26px at 100% 0,rgba(255,255,255,0.1),rgba(255,255,255,0)),radial-gradient(circle 26px at 0 100%,rgba(255,255,255,0.05),rgba(255,255,255,0)),radial-gradient(circle 26px at 100% 100%,rgba(255,255,255,0.03),rgba(255,255,255,0)),linear-gradient(rgba(255,255,255,.04) 0 0);
  --rim-on-big:radial-gradient(circle 90px at 0 0,rgba(255,255,255,0.25),rgba(255,255,255,0)),radial-gradient(circle 90px at 100% 0,rgba(255,255,255,0.12),rgba(255,255,255,0)),radial-gradient(circle 90px at 0 100%,rgba(255,255,255,0.07),rgba(255,255,255,0)),radial-gradient(circle 90px at 100% 100%,rgba(255,255,255,0.04),rgba(255,255,255,0)),linear-gradient(rgba(255,255,255,.05) 0 0);
  --rim-ink:radial-gradient(circle 26px at 0 0,rgba(17,17,16,0.21),rgba(17,17,16,0)),radial-gradient(circle 26px at 100% 0,rgba(17,17,16,0.1),rgba(17,17,16,0)),radial-gradient(circle 26px at 0 100%,rgba(17,17,16,0.05),rgba(17,17,16,0)),radial-gradient(circle 26px at 100% 100%,rgba(17,17,16,0.03),rgba(17,17,16,0)),linear-gradient(rgba(17,17,16,.05) 0 0);
  --rim-ink-big:radial-gradient(circle 90px at 0 0,rgba(17,17,16,0.2),rgba(17,17,16,0)),radial-gradient(circle 90px at 100% 0,rgba(17,17,16,0.09),rgba(17,17,16,0)),radial-gradient(circle 90px at 0 100%,rgba(17,17,16,0.05),rgba(17,17,16,0)),radial-gradient(circle 90px at 100% 100%,rgba(17,17,16,0.03),rgba(17,17,16,0)),linear-gradient(rgba(17,17,16,.06) 0 0);
  --ring:var(--rim-ink); --ring-big:var(--rim-ink-big);
  /* glass settings (the user, 2026-11-25): pill rows you see through, the value a glass capsule; soft shapes behind them so the glass shows (light too) */
  --glass-row:rgba(255,255,255,.2);
  --glass:rgba(255,255,255,.34);
  --glass-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 -1px 0 rgba(17,17,16,.05),0 10px 22px -12px rgba(17,17,16,.35);
  --handle:var(--ink);
  --glass-ring:radial-gradient(circle 30px at 0 0,rgba(17,17,16,0.19),rgba(17,17,16,0)),radial-gradient(circle 30px at 100% 0,rgba(17,17,16,0.08),rgba(17,17,16,0)),radial-gradient(circle 30px at 0 100%,rgba(17,17,16,0.06),rgba(17,17,16,0)),radial-gradient(circle 30px at 100% 100%,rgba(17,17,16,0.14),rgba(17,17,16,0)),linear-gradient(rgba(17,17,16,.1) 0 0);
  --panel-bg:rgba(246,245,241,.36); --aurora:radial-gradient(38% 34% at 16% 18%,rgba(17,17,16,0.22),rgba(17,17,16,0) 72%),radial-gradient(44% 38% at 86% 30%,rgba(255,255,255,0.95),rgba(255,255,255,0) 72%),radial-gradient(50% 40% at 30% 80%,rgba(17,17,16,0.18),rgba(17,17,16,0) 72%),radial-gradient(40% 34% at 84% 86%,rgba(255,255,255,0.9),rgba(255,255,255,0) 72%),radial-gradient(26% 22% at 55% 50%,rgba(17,17,16,0.12),rgba(17,17,16,0) 72%);
}
/* dark (2026-11-25, the user's reference, as on the welcome page): near-black, hairlines, grey words */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0A0A0A; --ink:#EDEDED; --ink-2:#8A8A8A; --ink-3:#575757; --line:#1C1C1C;
    --soft:#101010; --pill:#181818; --pill-hover:#1E1E1E; --row:#151515; --row-fill:#232323;
    --primary:#1F1F1F; --on-primary:#F2F2F2; --accent:#EDEDED;
    --shadow:0 1px 2px rgba(0,0,0,.5),0 18px 48px -18px rgba(0,0,0,.85);
    --raise:linear-gradient(180deg,#262626,#1A1A1A);
    --raise-ring:inset 0 1px 0 rgba(255,255,255,.08),0 0 0 1px rgba(255,255,255,.06),0 2px 8px rgba(0,0,0,.55);
    --ring:var(--rim-on); --ring-big:var(--rim-on-big);
    --pic-on-bg:var(--raise); --pic-on-ring:inset 0 0 0 1px rgba(255,255,255,.14),0 2px 8px rgba(0,0,0,.5);
    --glass-row:rgba(255,255,255,.025);
    --glass:rgba(255,255,255,.05);
    --glass-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 10px 24px -10px rgba(0,0,0,.65);
    --handle:#FFFFFF; --glass-ring:radial-gradient(circle 30px at 0 0,rgba(255,255,255,0.3),rgba(255,255,255,0)),radial-gradient(circle 30px at 100% 0,rgba(255,255,255,0.14),rgba(255,255,255,0)),radial-gradient(circle 30px at 0 100%,rgba(255,255,255,0.11),rgba(255,255,255,0)),radial-gradient(circle 30px at 100% 100%,rgba(255,255,255,0.22),rgba(255,255,255,0)),linear-gradient(rgba(255,255,255,.16) 0 0);
    --panel-bg:rgba(14,14,14,.34); --aurora:radial-gradient(38% 34% at 16% 18%,rgba(255,255,255,0.26),rgba(255,255,255,0) 72%),radial-gradient(44% 38% at 86% 30%,rgba(255,255,255,0.17),rgba(255,255,255,0) 72%),radial-gradient(50% 40% at 30% 80%,rgba(255,255,255,0.2),rgba(255,255,255,0) 72%),radial-gradient(40% 34% at 84% 86%,rgba(255,255,255,0.14),rgba(255,255,255,0) 72%),radial-gradient(26% 22% at 55% 50%,rgba(255,255,255,0.1),rgba(255,255,255,0) 72%);
  }
}
:root[data-theme="dark"]{
  --bg:#0A0A0A; --ink:#EDEDED; --ink-2:#8A8A8A; --ink-3:#575757; --line:#1C1C1C;
  --soft:#101010; --pill:#181818; --pill-hover:#1E1E1E; --row:#151515; --row-fill:#232323;
  --primary:#1F1F1F; --on-primary:#F2F2F2; --accent:#EDEDED;
  --shadow:0 1px 2px rgba(0,0,0,.5),0 18px 48px -18px rgba(0,0,0,.85);
  --raise:linear-gradient(180deg,#262626,#1A1A1A);
  --raise-ring:inset 0 1px 0 rgba(255,255,255,.08),0 0 0 1px rgba(255,255,255,.06),0 2px 8px rgba(0,0,0,.55);
  --ring:var(--rim-on); --ring-big:var(--rim-on-big);
  --pic-on-bg:var(--raise); --pic-on-ring:inset 0 0 0 1px rgba(255,255,255,.14),0 2px 8px rgba(0,0,0,.5);
  --glass-row:rgba(255,255,255,.025);
  --glass:rgba(255,255,255,.05);
  --glass-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 10px 24px -10px rgba(0,0,0,.65);
  --handle:#FFFFFF; --glass-ring:radial-gradient(circle 30px at 0 0,rgba(255,255,255,0.3),rgba(255,255,255,0)),radial-gradient(circle 30px at 100% 0,rgba(255,255,255,0.14),rgba(255,255,255,0)),radial-gradient(circle 30px at 0 100%,rgba(255,255,255,0.11),rgba(255,255,255,0)),radial-gradient(circle 30px at 100% 100%,rgba(255,255,255,0.22),rgba(255,255,255,0)),linear-gradient(rgba(255,255,255,.16) 0 0);
  --panel-bg:rgba(14,14,14,.34); --aurora:radial-gradient(38% 34% at 16% 18%,rgba(255,255,255,0.26),rgba(255,255,255,0) 72%),radial-gradient(44% 38% at 86% 30%,rgba(255,255,255,0.17),rgba(255,255,255,0) 72%),radial-gradient(50% 40% at 30% 80%,rgba(255,255,255,0.2),rgba(255,255,255,0) 72%),radial-gradient(40% 34% at 84% 86%,rgba(255,255,255,0.14),rgba(255,255,255,0) 72%),radial-gradient(26% 22% at 55% 50%,rgba(255,255,255,0.1),rgba(255,255,255,0) 72%);
}

*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:400 14px/1.45 Geist,-apple-system,BlinkMacSystemFont,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit}
a{color:inherit;text-decoration:none}
svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ── the two halves ── */
.cp{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:12px;padding:12px}
.cp.no-panel{grid-template-columns:minmax(0,1fr)}
.cp.no-panel .panel{display:none}

/* ── the stage ── */
.stage{position:relative;min-width:0;border-radius:28px;overflow:hidden;background:var(--stage-light);color:#111110;transition:background-color .25s ease,color .25s ease}
.stage{--ring:var(--rim-ink);--ring-big:var(--rim-ink-big)}
.stage[data-scheme="dark"]{background:var(--stage-dark);color:#EDEDED;--ring:var(--rim-on);--ring-big:var(--rim-on-big)}
.st-top,.st-right{position:absolute;top:14px;z-index:3;display:flex;align-items:center;gap:8px}
.st-top{left:14px}
.st-right{right:14px}
/* Preview | Code in the MIDDLE of the stage's top (the user, 2026-11-22: "make it in the center, not aligned to the left");
   a stage too narrow for the middle (a phone) keeps it beside Back, clear of the keys on the right */
.stage{container:stage/inline-size}
@container stage (min-width:560px){.st-top .seg{position:absolute;left:calc(50cqw - 14px);top:50%;transform:translate(-50%,-50%)}}
.round{width:40px;height:40px;border-radius:50%;border:0;display:grid;place-items:center;cursor:pointer;background:rgba(17,17,16,.06);color:inherit;transition:background-color .15s ease,transform .15s ease}
.round:hover{background:rgba(17,17,16,.11)}
.round:active{transform:scale(.94)}
.round.sm{width:36px;height:36px}
.round.sm svg{width:17px;height:17px}
.stage[data-scheme="dark"] .round{background:rgba(255,255,255,.05)}
.stage[data-scheme="dark"] .round:hover{background:rgba(255,255,255,.1)}
.round .sun{display:none}
.stage[data-scheme="dark"] .round .sun{display:block}
.stage[data-scheme="dark"] .round .moon{display:none}

.seg{display:inline-flex;padding:4px;border-radius:999px;background:rgba(17,17,16,.06)}
.stage[data-scheme="dark"] .seg{background:rgba(255,255,255,.04)}
.seg button{border:0;background:transparent;border-radius:999px;padding:7px 16px;font-size:14px;font-weight:500;cursor:pointer;opacity:.6;transition:opacity .15s ease,background-color .2s ease,box-shadow .2s ease}
.seg button:hover{opacity:.85}
.seg button.on{opacity:1;background:#FFFFFF;color:#111110;box-shadow:0 1px 2px rgba(0,0,0,.08),0 2px 8px -2px rgba(0,0,0,.08)}
.stage[data-scheme="dark"] .seg button.on{background:linear-gradient(180deg,#262626,#1A1A1A);color:#F2F2F2;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 0 0 1px rgba(255,255,255,.06),0 2px 8px rgba(0,0,0,.55)}

/* the component's frame: laid out 1/k bigger and drawn at k, so a big component shows whole and the
   zoom keys make it bigger or smaller without it laying out again (component.js sets --k) */
.frame-box{position:absolute;inset:0;--k:1}
.frame-box iframe{position:absolute;left:0;top:0;border:0;background:transparent;width:calc(100% / var(--k));height:calc(100% / var(--k));transform:scale(var(--k));transform-origin:0 0;transition:opacity .22s ease}
.frame-box iframe.incoming{opacity:0}

.st-bottom{position:absolute;left:14px;right:14px;bottom:14px;z-index:3;display:flex;align-items:flex-end;justify-content:space-between;gap:10px;pointer-events:none}
.st-bottom > *{pointer-events:auto}
.replay{display:flex;flex-wrap:wrap;gap:6px;padding:5px;border-radius:999px;background:rgba(255,255,255,.72);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 1px 2px rgba(0,0,0,.06)}
.stage[data-scheme="dark"] .replay{background:rgba(20,20,20,.78)}
.replay:empty{display:none}
.replay button{display:flex;align-items:center;gap:6px;border:0;background:transparent;border-radius:999px;padding:7px 12px;font-size:13px;font-weight:500;cursor:pointer;opacity:.75;transition:opacity .15s ease,background-color .15s ease}
.replay button svg{width:15px;height:15px}
.replay button:hover{opacity:1;background:rgba(17,17,16,.06)}
.stage[data-scheme="dark"] .replay button:hover{background:rgba(255,255,255,.06)}
.replay button.on{opacity:1}
.replay .rp-ok svg{color:var(--green)}
.replay .rp-err svg{color:#E5484D}
.st-tools{display:flex;gap:8px;margin-left:auto}   /* bottom right, also when the Replay bar is hidden (the Code view) */
.st-tools .heart{width:40px;height:40px;border-radius:999px;border:0;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 12px;width:auto;min-width:40px;background:rgba(17,17,16,.06);color:inherit;cursor:pointer}
.stage[data-scheme="dark"] .st-tools .heart{background:rgba(255,255,255,.05)}
.st-err{position:absolute;left:50%;top:70px;transform:translateX(-50%);margin:0;padding:8px 14px;border-radius:12px;background:#FFE9E8;color:#B42318;font-size:13px;z-index:4;max-width:80%}

/* ── the code ── */
.code-view{position:absolute;inset:66px 14px 70px;z-index:2;display:flex;flex-direction:column;gap:10px;min-height:0}
.code-head{display:flex;align-items:center;gap:10px;min-width:0}
.code-plat{flex:none;display:inline-flex;padding:4px;border-radius:999px;background:rgba(17,17,16,.06)}
.stage[data-scheme="dark"] .code-plat{background:rgba(255,255,255,.04)}
.code-plat button{border:0;background:transparent;border-radius:999px;padding:7px 14px;font-size:13px;font-weight:500;cursor:pointer;opacity:.6}
.code-plat button.on{opacity:1;background:#FFFFFF;color:#111110;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.stage[data-scheme="dark"] .code-plat button.on{background:linear-gradient(180deg,#262626,#1A1A1A);color:#F2F2F2;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 0 0 1px rgba(255,255,255,.06)}
.code-plat button[hidden]{display:none}
.code-use{flex:1;min-width:0;display:flex;align-items:center;gap:10px;padding:10px 12px 10px 16px;border-radius:16px;background:rgba(17,17,16,.05);font:500 13px/1.5 "Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;overflow:hidden}
.stage[data-scheme="dark"] .code-use{background:rgba(255,255,255,.04)}
.code-use code{flex:1;min-width:0;white-space:pre;overflow-x:auto}
.code-use button{flex:none;border:0;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:500;cursor:pointer;background:rgba(17,17,16,.08)}
.stage[data-scheme="dark"] .code-use button{background:rgba(255,255,255,.08)}
.code-pre{flex:1;min-height:0;margin:0;overflow:auto;padding:16px;border-radius:18px;background:rgba(17,17,16,.04);font:400 12.5px/1.6 "Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;tab-size:2}
.stage[data-scheme="dark"] .code-pre{background:rgba(0,0,0,.25)}
.code-pre code{white-space:pre}
.code-view.locked .code-pre{filter:blur(5px);user-select:none;pointer-events:none;opacity:.7}
.code-lock{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;width:min(340px,86%);padding:24px;border-radius:24px;background:var(--bg);color:var(--ink);box-shadow:var(--shadow)}
.code-lock svg{width:26px;height:26px}
.code-lock strong{font-size:16px;font-weight:600}
.code-lock span{color:var(--ink-2);font-size:13.5px}
.code-lock .btn-primary{margin-top:10px;align-self:stretch;width:100%;min-height:48px;font-size:15px}   /* the card's one key, across all of it (the user, 2026-11-22) */
.code-lock .btn-primary .g{width:18px;height:18px}
.lock-note{margin:2px 0 0;font-size:12px;line-height:1.45;color:var(--ink-2);opacity:.85}
.lock-note[hidden]{display:none}
.lock-note a{color:inherit;text-decoration:underline;text-underline-offset:2px}

/* ── the settings ── */
.panel{min-width:0;min-height:0;display:flex;flex-direction:column;border-radius:28px;background:var(--panel-bg);overflow:hidden}
.pn-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:20px 20px 6px}
.pn-title{display:flex;align-items:center;gap:10px;min-width:0}
.pn-title h1{margin:0;font-size:21px;font-weight:600;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.badge{flex:none;font-size:11.5px;font-weight:600;letter-spacing:.02em;padding:3px 9px;border-radius:999px;background:var(--pill);color:var(--ink-2)}
.badge.free{background:#E3F6E9;color:#167A3A}
:root[data-theme="dark"] .badge.free{background:#14301F;color:#6FD497}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .badge.free{background:#14301F;color:#6FD497}}
.round.ghost{background:transparent;color:var(--ink-2)}
.round.ghost:hover{background:var(--pill);color:var(--ink)}
.pn-hint{margin:0 20px 12px;padding:0;color:var(--ink-2);font-size:13px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
/* Get the code: the platform is chosen here, at the end — the settings are the same for all of them */
.pn-foot{position:relative}
/* the ways to take the code, in the Code view's bottom right, for the platform chosen at its top */
.code-take{display:flex;align-items:center;padding:5px;border-radius:999px;background:rgba(255,255,255,.72);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 1px 2px rgba(0,0,0,.06)}
.stage[data-scheme="dark"] .code-take{background:rgba(20,20,20,.78)}
.code-take[hidden],.ct-acts[hidden]{display:none}
.ct-acts{display:flex;align-items:center;gap:2px}
.ct-acts button{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:inherit;border-radius:999px;padding:8px 13px;font-size:13px;font-weight:500;cursor:pointer;opacity:.75;transition:opacity .15s ease,background-color .15s ease;white-space:nowrap}
.ct-acts button:hover{opacity:1;background:rgba(17,17,16,.06)}
.stage[data-scheme="dark"] .ct-acts button:hover{background:rgba(255,255,255,.06)}
.ct-acts button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ct-acts .ct-main,.ct-acts .ct-main:hover{opacity:1;background:#111110;color:#FFFFFF}
.stage[data-scheme="dark"] .ct-acts .ct-main{background:linear-gradient(180deg,#262626,#1A1A1A);color:#F2F2F2;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 0 0 1px rgba(255,255,255,.06)}
.ct-acts .ct-main:hover{opacity:.88}
.ct-acts button:focus-visible{outline:2px solid currentColor;outline-offset:2px}
/* a phone: in the Code view the ways to take the code have the bottom row to themselves (the heart and the link stay on
   the preview) — with them, "Xcode project" and "Copy" ran past the stage's edge */
@media (max-width:480px){
  .stage.on-code .st-tools .heart,.stage.on-code #link{display:none}
  .ct-acts button{padding:8px 11px}
}
.pn-note{margin:0;font-size:12.5px;color:var(--ink-2)}

.pn-groups{flex:1;min-height:0;overflow-y:auto;padding:4px 12px 16px;scrollbar-width:thin}
.grp{margin:0 0 6px}
.grp > summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 8px;cursor:pointer;font-size:12.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-2);border-radius:10px}
.grp > summary::-webkit-details-marker{display:none}
.grp > summary:hover{color:var(--ink)}
.grp > summary svg{width:15px;height:15px;transition:transform .2s ease}
.grp[open] > summary svg{transform:rotate(180deg)}
.rows{display:flex;flex-direction:column;gap:6px}

/* a row: the name on the left, its value on the right (a slider's fill runs under both) */
.row{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:0 18px;border-radius:999px;background:var(--glass-row);-webkit-backdrop-filter:blur(6px) saturate(1.3);backdrop-filter:blur(6px) saturate(1.3);overflow:hidden;font-size:14px}
.row[hidden]{display:none}
.row .lab{position:relative;z-index:1;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.row .val{position:relative;z-index:1;flex:none;font-variant-numeric:tabular-nums;font-weight:500;max-width:60%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row.changed .lab{color:var(--ink)}

.slide{cursor:ew-resize;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.slide .fill{position:absolute;left:0;top:0;bottom:0;min-width:48px;background:var(--glass);box-shadow:var(--glass-shadow);border-radius:999px}
.slide .fill::after{content:"";position:absolute;right:14px;top:50%;width:2px;height:18px;margin-top:-9px;border-radius:2px;background:var(--handle);opacity:.85;transition:opacity .15s ease}
.slide:hover .fill::after,.slide.dragging .fill::after{opacity:1}
.slide:focus-visible{outline-offset:-2px}

.pick select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;font-size:16px}
.pick .val{display:flex;align-items:center;gap:6px}
.pick .val svg{width:15px;height:15px;color:var(--ink-3)}
.pick:hover{background:var(--pill-hover)}

.words input{position:relative;z-index:1;flex:1;min-width:0;border:0;background:transparent;text-align:right;font:500 14px/1 Geist,-apple-system,system-ui,sans-serif;color:var(--ink);padding:12px 0}
.words input:focus{outline:none}
.words:focus-within{box-shadow:inset 0 0 0 1.5px var(--ink-3)}

.switch{cursor:pointer}
.switch .knob{position:relative;z-index:1;width:40px;height:24px;border-radius:999px;background:var(--ink-3);transition:background-color .2s ease;flex:none}
.switch .knob::after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .22s cubic-bezier(.3,1.4,.5,1)}
.switch[aria-checked="true"] .knob{background:var(--ink)}
.switch[aria-checked="true"] .knob::after{transform:translateX(16px)}
:root[data-theme="dark"] .switch[aria-checked="true"] .knob::after{background:#111110}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .switch[aria-checked="true"] .knob::after{background:#111110}}

.color{cursor:pointer}
.color:hover{background:var(--pill-hover)}
.color .val{display:flex;align-items:center;gap:10px;font-family:"Geist Mono",ui-monospace,monospace;font-size:12.5px;text-transform:uppercase;color:var(--ink-2)}
.sw{position:relative;width:24px;height:24px;border-radius:8px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);flex:none;overflow:hidden}
.sw input{position:absolute;inset:-8px;width:40px;height:40px;opacity:0;cursor:pointer;border:0;padding:0}
.color > input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.tones .val{display:flex;gap:6px}
.tones .sw{width:22px;height:22px;border-radius:50%}

/* the panel's foot: the big key, and the small ones over it */
.pn-foot{padding:12px 16px 16px;display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--line)}
.pn-more{display:flex;justify-content:space-between;align-items:center;gap:6px}
.mcp-link{display:inline-flex;align-items:center;gap:6px;text-decoration:none}
.mcp-link svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.link-btn{border:0;background:transparent;padding:6px 8px;border-radius:999px;font-size:13px;font-weight:500;color:var(--ink-2);cursor:pointer}
.link-btn:hover{color:var(--ink);background:var(--pill)}
.link-btn[hidden]{display:none}
.btn-primary{border:0;border-radius:999px;padding:10px 18px;background:var(--raise);box-shadow:var(--raise-ring);color:var(--on-primary);font-weight:500;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .15s ease,opacity .15s ease}
.btn-primary:hover{opacity:.9}
.btn-primary:active{transform:scale(.98)}
.btn-primary.big{width:100%;min-height:52px;font-size:15.5px}
.btn-primary svg{width:17px;height:17px}

.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:50;padding:10px 16px;border-radius:999px;background:var(--primary);color:var(--on-primary);font-size:13.5px;font-weight:500;box-shadow:var(--shadow)}

/* ── a phone: the stage first, the settings under it ── */
@media (max-width:860px){
  .cp{display:flex;flex-direction:column;height:auto;min-height:100%;padding:8px;gap:8px}
  .stage{height:62vh;min-height:420px;flex:none;border-radius:24px}
  .panel{border-radius:24px;overflow:visible}
  .pn-groups{overflow:visible}
  .pn-foot{position:sticky;bottom:0;z-index:5;background:var(--soft);border-radius:0 0 24px 24px}   /* solid: the rows scroll under it */
  .cp.no-panel .panel{display:flex}
  #panelHide,#panelShow{display:none}
  .replay button span{display:none}
  .replay button{padding:8px}
}
@media (max-width:480px){
  .st-top,.st-right{top:10px;gap:5px}
  .st-top{left:10px}.st-right{right:10px}
  .round{width:36px;height:36px}
  .round.sm{width:32px;height:32px}
  .round.sm svg{width:16px;height:16px}
  .seg{padding:3px}
  .seg button{padding:6px 11px;font-size:13px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
/* a choice made by picture (the voice components' Style, 2026-11-24) */
.row.pics{flex-direction:column;align-items:stretch;gap:10px;padding:12px 12px 12px;min-height:0;border-radius:22px}
.row.pics .lab{padding:2px 4px 0}
.pics-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pic{appearance:none;border:0;margin:0;padding:6px 6px 0;border-radius:12px;background:var(--bg);cursor:pointer;display:flex;flex-direction:column;align-items:stretch;
  box-shadow:inset 0 0 0 1px var(--line);transition:box-shadow .18s,transform .18s;font:inherit;color:var(--ink-2);-webkit-tap-highlight-color:transparent}
.pic:hover{box-shadow:inset 0 0 0 1px var(--ink-3)}
.pic:active{transform:scale(.97)}
.pic:focus-visible{outline:none;box-shadow:inset 0 0 0 1px var(--ink-3),0 0 0 3px var(--row-fill)}
.pic img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:8px;background:var(--soft);pointer-events:none}
.pic .cap{padding:7px 0 8px;font-size:12.5px;font-weight:500;text-align:center}
.pic.on{background:var(--pic-on-bg);box-shadow:var(--pic-on-ring);color:var(--ink)}

/* ── the lit rim on every rounded thing (see --ring): a 1px ring cut out with a mask, on ::before ── */
:where(.panel,.round,.seg,.seg button,.replay,.st-tools .heart,.badge,.pic,.code-take,.code-use,.code-plat,.code-plat button,.ct-acts button,.btn-primary,.row){position:relative}
.panel::before,.stage::before,.round::before,.seg::before,.seg button.on::before,.replay::before,.st-tools .heart::before,.badge::before,
.pic::before,.code-take::before,.code-use::before,.code-plat::before,.code-plat button.on::before,.ct-acts .ct-main::before,.btn-primary::before,
.code-lock::before,.row::before,.slide .fill::before,.st-right::before{
  content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;pointer-events:none;z-index:2;
  background:var(--ring);background-origin:border-box;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.panel::before,.stage::before{background:var(--ring-big);z-index:6}
.slide .fill::before{background:var(--glass-ring)}
/* a slider is the glass capsule alone (the user, 2026-11-25: no second shape behind it): its row has no track and no rim */
.row.slide{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}
.row.slide::before{display:none}

/* ── a living black-and-white gradient behind the WHOLE screen (the user, 2026-11-25: "more alive", "just black and white",
   "behind the entire screen"): soft shapes, blurred, drifting slowly; the settings are a see-through pane over it, the preview
   keeps its own solid colour. Still for reduced motion ── */
/* (the moving layer itself is Silk now — public/silk.js, on every page) */
.panel{isolation:isolate}
/* the preview keeps its own solid colour (the user, 2026-11-25): the moving background shows around it and behind the settings */

/* the stage's keys top right: ONE group, not three circles (the user, 2026-11-25) */
.st-right{gap:2px;padding:4px;border-radius:999px;background:rgba(17,17,16,.06)}
.stage[data-scheme="dark"] .st-right{background:rgba(255,255,255,.05)}
.st-right .round,.stage[data-scheme="dark"] .st-right .round{background:transparent}
.st-right .round:hover{background:rgba(17,17,16,.08)}
.stage[data-scheme="dark"] .st-right .round:hover{background:rgba(255,255,255,.08)}
.st-right .round::before{display:none}
