
  :root {
    --size: 48px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --frost: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.08));
    --edge: rgba(255,255,255,.20);
    --top: max(22px, env(safe-area-inset-top));
    --side: max(22px, env(safe-area-inset-left));
    --dark: rgba(28,28,30,.66);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  html, body {
    height: 100%; background: #000; color: #fff; overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none;
  }
  button { font: inherit; color: inherit; }
  [hidden] { display: none !important; }
  .screen { position: fixed; inset: 0; }

  /* ---------- shared frosted bits ---------- */
  .pill {
    display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 20px;
    border-radius: 999px; border: 1px solid var(--edge); outline: 0; cursor: pointer;
    font-size: 14px; letter-spacing: .005em; white-space: nowrap; background: var(--frost);
    -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
    box-shadow: 0 14px 40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.32);
    transition: background .25s ease, color .25s ease, transform .35s var(--ease), opacity .3s ease;
  }
  .pill:hover { background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.12)); }
  .pill:active { transform: scale(.98); }
  .pill:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.8), 0 14px 40px rgba(0,0,0,.55); }
  .pill small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
  .pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .85; transition: transform .35s var(--ease); }
  .pill.on { background: rgba(255,255,255,.92); color: #000; }
  .round { padding: 0; width: 44px; justify-content: center; }
  .round svg { width: 18px; height: 18px; opacity: 1; }
  .round[disabled] { opacity: .35; pointer-events: none; }

  /* ---------- landing ---------- */
  #landing { display: grid; place-items: center; background: #000; transition: opacity .6s ease; }
  .choices { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; padding: 24px; }
  .pill.big { height: 66px; padding: 0 52px; font-size: 19px; letter-spacing: .01em; }
  .pill.big svg { width: 18px; height: 18px; }
  .fadein { animation: fadein .9s ease both; }
  @keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

  /* ---------- studio ---------- */
  #vp {
    position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: default;
  }
  .world { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
  #gl { visibility: hidden; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  #comp { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  .card { position: absolute; overflow: hidden; background-repeat: no-repeat; background-color: #1b1c21; }
  .layerbox { position: absolute; left: 0; top: 0; }
  .txt { position: absolute; white-space: pre; user-select: none; }
  .imgl { position: absolute; background-size: cover; background-position: center; background-repeat: no-repeat; }
  .cardsel { position: absolute; outline: calc(3px * var(--inv, 1)) solid #fff; outline-offset: calc(5px * var(--inv, 1)); }
  .cardlabel { position: absolute; font-size: calc(13px * var(--inv, 1)); color: rgba(255,255,255,.5); white-space: nowrap; transform: translateX(-50%); letter-spacing: .02em; }
  .cardlabel.on { color: #fff; }
  .frame { position: absolute; border: calc(2px * var(--inv, 1)) solid #fff; box-shadow: 0 0 0 calc(1px * var(--inv, 1)) rgba(0,0,0,.45); }
  .hd { position: absolute; width: calc(16px * var(--inv, 1)); height: calc(16px * var(--inv, 1)); background: #fff; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: auto; box-shadow: 0 1px calc(4px * var(--inv, 1)) rgba(0,0,0,.5); }
  .hd[data-h="nw"], .hd[data-h="se"] { cursor: nwse-resize; }
  .hd[data-h="ne"], .hd[data-h="sw"] { cursor: nesw-resize; }
  .hd[data-h="rot"] { cursor: grab; background: #0a84ff; }
  .stem { position: absolute; left: 50%; width: calc(2px * var(--inv, 1)); height: calc(28px * var(--inv, 1)); top: calc(-28px * var(--inv, 1)); background: #fff; transform: translateX(-50%); }

  #topbar { position: fixed; z-index: 9; top: var(--top); left: var(--side); right: max(22px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 10px; pointer-events: none; }
  #topbar > * { pointer-events: auto; }
  #topbar .spacer { flex: 1; pointer-events: none; }
  #st-title { cursor: default; }
  #st-title b { font-weight: 600; }
  #st-title span { color: rgba(255,255,255,.6); }

  .nav { position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 999px; background: var(--frost);
    -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); border: 1px solid var(--edge);
    box-shadow: 0 18px 50px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.32), inset 0 -1px 0 rgba(255,255,255,.05); }
  .nv { height: 48px; padding: 0 24px; border: 0; outline: 0; border-radius: 999px; cursor: pointer; font-size: 14.5px; letter-spacing: .005em; white-space: nowrap; background: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); transition: background .25s ease, color .25s ease, transform .3s var(--ease); }
  .nv:hover { background: rgba(255,255,255,.22); }
  .nv:active { transform: scale(.97); }
  .nv.on { background: rgba(255,255,255,.92); color: #000; }
  .nv:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
  #arrows { position: fixed; z-index: 9; right: max(22px, env(safe-area-inset-right)); bottom: max(28px, env(safe-area-inset-bottom)); display: flex; gap: 10px; }
  #arrows .pill { width: 48px; height: 48px; }

  /* popovers above the nav */
  .pop { position: fixed; z-index: 10; left: 50%; bottom: calc(max(28px, env(safe-area-inset-bottom)) + 74px); width: min(500px, calc(100vw - 28px)); max-height: min(58vh, 520px);
    display: flex; flex-direction: column; border-radius: 28px; background: var(--dark);
    -webkit-backdrop-filter: blur(34px) saturate(1.8); backdrop-filter: blur(34px) saturate(1.8); border: 1px solid var(--edge);
    box-shadow: 0 24px 60px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.18);
    opacity: 0; visibility: hidden; transform: translate(-50%, 12px) scale(.98); transform-origin: bottom center;
    transition: opacity .25s ease, transform .4s var(--ease), visibility 0s linear .4s; }
  .pop.open { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
  .pop-body { overflow-y: auto; padding: 4px 14px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
  .rules { margin: 12px 4px 2px; padding-left: 18px; font-size: 12px; line-height: 1.6; color: rgba(255,255,255,.5); }

  /* side panels */
  .panel { position: fixed; z-index: 8; top: calc(var(--top) + 56px); bottom: 118px; width: min(316px, calc(100vw - 2 * var(--side)));
    display: flex; flex-direction: column; border-radius: 28px; background: rgba(28,28,30,.62);
    -webkit-backdrop-filter: blur(34px) saturate(1.8); backdrop-filter: blur(34px) saturate(1.8); border: 1px solid var(--edge);
    box-shadow: 0 24px 60px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.18);
    opacity: 0; visibility: hidden; transform: scale(.98); transition: opacity .25s ease, transform .4s var(--ease), visibility 0s linear .4s; }
  .panel.right { right: max(22px, env(safe-area-inset-right)); transform-origin: top right; transform: translateX(18px) scale(.98); }
  .panel.left { left: var(--side); transform-origin: top left; transform: translateX(-18px) scale(.98); }
  .panel.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 22px; gap: 8px; }
  .panel-head h2 { font-size: 15px; font-weight: 600; letter-spacing: .005em; }
  .panel-body { overflow-y: auto; padding: 0 14px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
  .mini { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 999px; border: 0; outline: 0; cursor: pointer; font-size: 13px; background: rgba(255,255,255,.14); transition: background .2s ease, color .2s ease, transform .3s var(--ease), opacity .2s ease; white-space: nowrap; }
  .mini svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .mini:hover { background: rgba(255,255,255,.24); }
  .mini:active { transform: scale(.96); }
  .mini:focus-visible, .go:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
  .mini.ico { width: 30px; height: 30px; padding: 0; flex: none; }
  .mini.ico svg { width: 15px; height: 15px; stroke-width: 2; }
  .mini.on { background: #fff; color: #000; }
  .mini[disabled] { opacity: .35; pointer-events: none; }
  .go { height: 36px; padding: 0 18px; border: 0; outline: 0; border-radius: 999px; cursor: pointer; font-size: 13.5px; background: #fff; color: #000; font-weight: 600; }
  .sec { margin-top: 14px; }
  .sec h3 { display: flex; justify-content: space-between; align-items: center; padding: 8px 6px 9px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
  .sec h3 span { letter-spacing: .02em; text-transform: none; color: rgba(255,255,255,.35); }
  .empty { padding: 4px 8px 6px; font-size: 12.5px; color: rgba(255,255,255,.4); line-height: 1.5; }
  .btns { display: flex; flex-wrap: wrap; gap: 8px; }
  .irow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 9px 2px 0; font-size: 13px; color: rgba(255,255,255,.75); }
  .irow > .lab { flex: none; color: rgba(255,255,255,.6); font-size: 12.5px; }
  .inp, .sel, .area { width: 100%; border-radius: 13px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.32); color: #fff; font: inherit; font-size: 13.5px; outline: 0; user-select: text; -webkit-user-select: text; }
  .inp, .sel { height: 36px; padding: 0 12px; }
  .area { padding: 10px 12px; min-height: 72px; resize: vertical; line-height: 1.4; }
  .inp:focus, .sel:focus, .area:focus { border-color: rgba(255,255,255,.55); }
  .sel { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; padding-right: 30px; }
  .sel option { background: #222; color: #fff; }
  input[type="color"].clr { -webkit-appearance: none; appearance: none; width: 36px; height: 36px; padding: 0; border: 1.5px solid rgba(255,255,255,.5); border-radius: 50%; background: none; cursor: pointer; overflow: hidden; flex: none; }
  input[type="color"].clr::-webkit-color-swatch-wrapper { padding: 0; }
  input[type="color"].clr::-webkit-color-swatch { border: 0; border-radius: 50%; }
  input[type="color"].clr::-moz-color-swatch { border: 0; border-radius: 50%; }
  .seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.09); }
  .seg button { padding: 6px 13px; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.72); font-size: 12.5px; cursor: pointer; transition: background .2s ease, color .2s ease; outline: 0; }
  .seg button.on { background: #fff; color: #000; }
  .seg button:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.8); }

  .sw { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 6px; }
  .sw button { aspect-ratio: 1; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.22); cursor: pointer; outline: 0; transition: transform .25s var(--ease), border-color .2s ease; }
  .sw button:hover { transform: scale(1.06); border-color: rgba(255,255,255,.7); }
  .sw button:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.8); }

  .agrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 10px; margin-top: 8px; }
  .atile { position: relative; display: flex; flex-direction: column; gap: 5px; }
  .athumb { position: relative; display: block; width: 100%; aspect-ratio: 3/4; border-radius: 11px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); background: #0b0b0c; cursor: pointer; padding: 0; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s ease; }
  .athumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
  .atile.on .athumb { outline-color: #fff; }
  .atile input { width: 100%; height: 22px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; color: rgba(255,255,255,.85); font: inherit; font-size: 11.5px; outline: 0; user-select: text; -webkit-user-select: text; text-overflow: ellipsis; }
  .atile input:focus { background: rgba(0,0,0,.4); }
  .atile .del { position: absolute; top: 4px; right: 4px; }
  .tag { position: absolute; left: 5px; top: 5px; padding: 1px 6px; border-radius: 999px; background: rgba(0,0,0,.6); font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.8); pointer-events: none; }
  .del { width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; background: rgba(0,0,0,.62); outline: 0; opacity: 0; transition: opacity .2s ease, background .2s ease; }
  .del svg { width: 11px; height: 11px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
  .atile:hover .del, .del:focus-visible { opacity: 1; }
  .del:hover { background: rgba(255,59,48,.9); }
  @media (hover: none) { .del { opacity: 1; } }
  .drop { margin-top: 10px; display: grid; place-items: center; min-height: 54px; border-radius: 14px; border: 1.5px dashed rgba(255,255,255,.28); font-size: 13px; color: rgba(255,255,255,.65); cursor: pointer; transition: border-color .2s ease, background .2s ease; text-align: center; padding: 10px; }
  .drop:hover, .drop.over { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.05); }

  .opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 11px 14px; border: 0; outline: 0; border-radius: 16px; cursor: pointer; text-align: left; background: transparent; transition: background .2s ease; }
  .opt:hover, .opt:focus-visible { background: rgba(255,255,255,.1); }
  .opt b { display: block; font-weight: 500; font-size: 14.5px; }
  .opt small { display: block; margin-top: 2px; font-size: 12px; color: rgba(255,255,255,.5); }
  .opt em { font-style: normal; font-size: 12.5px; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .opt.on { background: rgba(255,255,255,.14); }
  .opt .ck { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; flex: none; }
  .opt.on .ck { opacity: 1; }

  .chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
  .chips button { height: 44px; border-radius: 14px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); font-size: 16px; font-variant-numeric: tabular-nums; cursor: pointer; outline: 0; transition: background .2s ease, color .2s ease, transform .25s var(--ease); }
  .chips button:hover { background: rgba(255,255,255,.18); }
  .chips button.on { background: #fff; color: #000; font-weight: 600; }
  .chips button[disabled] { opacity: .25; pointer-events: none; }
  .stepper { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 10px 0 4px; }
  .stepper output { min-width: 64px; text-align: center; font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--edge); background: rgba(255,255,255,.12); font-size: 22px; cursor: pointer; outline: 0; }
  .stepper button:hover { background: rgba(255,255,255,.22); }
  .stepper button[disabled] { opacity: .3; pointer-events: none; }
  .warn { margin: 8px 4px 0; font-size: 12.5px; color: #ffb454; }

  .lrow { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 14px; cursor: pointer; transition: background .2s ease; }
  .lrow:hover { background: rgba(255,255,255,.07); }
  .lrow.on { background: rgba(255,255,255,.16); }
  .lrow .li { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.1); }
  .lrow .li svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .lrow .mid { flex: 1; min-width: 0; }
  .lrow input { width: 100%; height: 22px; padding: 0 4px; border: 0; background: transparent; color: #fff; font: inherit; font-size: 13px; outline: 0; border-radius: 6px; user-select: text; -webkit-user-select: text; text-overflow: ellipsis; }
  .lrow input:focus { background: rgba(0,0,0,.4); }
  .lrow small { display: block; padding: 0 4px; font-size: 11px; color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lrow .mini.ico { background: transparent; opacity: .7; }
  .lrow .mini.ico:hover { opacity: 1; background: rgba(255,255,255,.14); }
  .lrow.off { opacity: .45; }

  .srow { display: block; margin-top: 10px; }
  .sl { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,.65); }
  .sl em { font-style: normal; }
  .sl output { color: #fff; font-variant-numeric: tabular-nums; }
  .tint { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 24px; margin: 1px 0 0; background: transparent; cursor: pointer; outline: 0; --track: rgba(255,255,255,.2); }
  .tint::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: var(--track); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
  .tint::-moz-range-track { height: 8px; border-radius: 999px; background: var(--track); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
  .tint::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -6px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.12); transition: transform .25s var(--ease); }
  .tint::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
  .tint:active::-webkit-slider-thumb { transform: scale(1.12); }
  .tint:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 2px 8px rgba(0,0,0,.5); }

  /* ---------- theme studio (the device viewer) ---------- */
  #stage { position: fixed; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
  #stage.ready { opacity: 1; }
  #stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
  .vnav { position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 999px; background: var(--frost);
    -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); border: 1px solid var(--edge);
    box-shadow: 0 18px 50px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.32), inset 0 -1px 0 rgba(255,255,255,.05); }
  .btn { position: relative; flex: none; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; border: 0; outline: 0; cursor: grab; background: rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); touch-action: none; transition: background .25s ease, color .25s ease, transform .35s var(--ease), box-shadow .25s ease; }
  .btn.tap { cursor: pointer; }
  .btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
  .btn:hover { background: rgba(255,255,255,.24); }
  .btn.on { background: rgba(255,255,255,.92); color: #000; transform: scale(.94); cursor: grabbing; box-shadow: 0 0 28px rgba(255,255,255,.35); }
  .btn.tap.on { cursor: pointer; transform: none; }
  .btn:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
  .btn::after, .fold::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 20px); transform: translate(-50%, 6px); opacity: 0; pointer-events: none; padding: 7px 12px; border-radius: 999px; white-space: nowrap; font-size: 12.5px; letter-spacing: .01em; color: rgba(255,255,255,.88); background: rgba(30,30,32,.72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.12); transition: opacity .25s ease, transform .35s var(--ease); }
  .btn:hover::after, .btn.on::after, .fold:hover::after, .fold.on::after { opacity: 1; transform: translate(-50%, 0); }
  .btn.on:not(.tap)::after { opacity: 0; }
  @media (hover: none) { .btn:hover::after, .fold:hover::after { opacity: 0; } }
  .fold { position: relative; flex: none; width: 176px; height: var(--size); border-radius: 999px; background: rgba(255,255,255,.08); box-shadow: inset 0 1px 2px rgba(0,0,0,.35); }
  .fold input { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: var(--size); margin: 0; background: transparent; cursor: grab; outline: 0; touch-action: none; --p: 0; }
  .fold input:active { cursor: grabbing; }
  .fold input::-webkit-slider-runnable-track { height: var(--size); border-radius: 999px; background: linear-gradient(90deg, rgba(255,255,255,.26) calc(var(--p) * (100% - var(--size)) + var(--size) / 2), transparent 0); }
  .fold input::-moz-range-track { height: var(--size); border-radius: 999px; background: transparent; }
  .fold input::-moz-range-progress { height: var(--size); border-radius: 999px; background: rgba(255,255,255,.26); }
  .fold input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: var(--size); height: var(--size); border-radius: 50%; border: 0; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='8' height='15' rx='2.2'/%3E%3Crect x='13' y='4.5' width='8' height='15' rx='2.2'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: 0 4px 14px rgba(0,0,0,.45), inset 0 1px 0 #fff; transition: transform .3s var(--ease), box-shadow .3s ease; }
  .fold input::-moz-range-thumb { width: var(--size); height: var(--size); border-radius: 50%; border: 0; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='8' height='15' rx='2.2'/%3E%3Crect x='13' y='4.5' width='8' height='15' rx='2.2'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
  .fold input:active::-webkit-slider-thumb { transform: scale(.94); }
  .picker { position: fixed; top: var(--top); z-index: 9; }
  .picker.centre { left: 50%; transform: translateX(-50%); }
  .picker.left { left: calc(var(--side) + 54px); }
  .picker.open .pill .chev { transform: rotate(180deg); }
  .pick-list { position: absolute; top: calc(100% + 10px); min-width: 100%; width: max-content; max-width: 86vw; padding: 6px; list-style: none; border-radius: 24px; background: var(--dark); -webkit-backdrop-filter: blur(34px) saturate(1.8); backdrop-filter: blur(34px) saturate(1.8); border: 1px solid var(--edge); box-shadow: 0 24px 60px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.18); opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transition: opacity .25s ease, transform .35s var(--ease), visibility 0s linear .35s; }
  .centre .pick-list { left: 50%; transform: translate(-50%, -6px) scale(.98); transform-origin: top center; }
  .left .pick-list { left: 0; transform-origin: top left; }
  .picker.open .pick-list { opacity: 1; visibility: visible; transform: translateY(0) scale(1); transition-delay: 0s; }
  .centre.open .pick-list { transform: translate(-50%, 0) scale(1); }
  .pick-list button { display: flex; align-items: center; justify-content: space-between; gap: 22px; width: 100%; padding: 12px 16px; border: 0; outline: 0; border-radius: 18px; cursor: pointer; font-size: 14.5px; text-align: left; color: rgba(255,255,255,.88); background: transparent; transition: background .2s ease; }
  .pick-list button:hover, .pick-list button:focus-visible { background: rgba(255,255,255,.12); }
  .pick-list button svg { width: 16px; height: 16px; flex: none; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
  .pick-list button[aria-selected="true"] svg { opacity: 1; }
  .pill .phone { display: none; width: 18px; height: 18px; stroke-width: 1.8; opacity: 1; }
  #th-back { position: fixed; top: var(--top); left: var(--side); z-index: 9; }
  .part { margin-top: 12px; padding: 14px 14px 12px; border-radius: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
  .part:first-child { margin-top: 4px; }
  .part header { display: flex; align-items: center; gap: 11px; }
  .swatch { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.55); box-shadow: inset 0 1px 2px rgba(255,255,255,.35), 0 2px 8px rgba(0,0,0,.4); }
  .pname { min-width: 0; flex: 1; }
  .pname b { display: block; font-size: 14px; font-weight: 600; letter-spacing: .005em; }
  .pname small { display: block; margin-top: 1px; font-size: 11.5px; color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .finish { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); font-size: 10.5px; letter-spacing: .02em; }
  .hex { flex: none; font-size: 11.5px; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; letter-spacing: .03em; text-transform: uppercase; }
  .saved { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
  .chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 6px 0 13px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 12.5px; cursor: pointer; border: 0; outline: 0; }
  .chip:hover { background: rgba(255,255,255,.22); }
  .chip i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: 13px; opacity: .6; }
  .chip i:hover { opacity: 1; background: rgba(255,59,48,.8); }
  .saverow { display: flex; gap: 8px; margin: 2px 0 12px; }
  body[data-mode] { cursor: grabbing; }

  @media (max-width: 560px) {
    :root { --size: 44px; }
    .fold { width: 140px; }
    .pill small { display: none; }
    .nv { padding: 0 14px; font-size: 13px; }
    .pill.big { padding: 0 40px; }
    .picker.left .pill { padding: 0; width: 44px; justify-content: center; }
    .picker.left .pill .phone { display: block; }
    .picker.left .pill .chev, .picker.left .devname { display: none; }
    .panel { left: 12px; right: 12px; width: auto; top: auto; max-height: 40vh; }
    #st-title, #topbar .tx, .long { display: none; }
    #st-layers-btn, #st-theme-btn { padding: 0; width: 44px; justify-content: center; }
    #st-layers-btn svg, #st-theme-btn svg { width: 18px; height: 18px; opacity: 1; }
    #topbar { gap: 8px; }
    #arrows { bottom: calc(max(28px, env(safe-area-inset-bottom)) + 66px); }
    .panel { bottom: calc(max(28px, env(safe-area-inset-bottom)) + 66px + 58px); }
    .pop { bottom: calc(max(28px, env(safe-area-inset-bottom)) + 70px); }
  }
  @media (prefers-reduced-motion: reduce) { .panel, .pop, .pick-list, #stage { transition-duration: .01s; } .fadein { animation: none; } }

/* ---- landing: a looping 3D scene above each choice (assets/js/choose-hero.js) ---- */
.choices { align-items: flex-end; gap: 34px 44px; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero { width: min(400px, 82vw); aspect-ratio: 3 / 2; position: relative; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .7s ease; }
.hero canvas.on { opacity: 1; }
.soon { flex: 0 0 100%; text-align: center; margin: 4px 0 0; font-size: 15px; letter-spacing: .02em; color: rgba(255,255,255,.55); }
@media (max-width: 720px) { .hero { width: min(300px, 70vw); } .choices { gap: 20px; padding: 16px; } }
@media (prefers-reduced-motion: reduce) { .hero canvas { transition: none; } }

  /* text effects: each block is closed until its switch is turned on */
  .sec.fx { margin-top: 10px; padding: 8px 10px 10px; border-radius: 16px; background: rgba(255,255,255,.05); }
  .fxhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .fxhead b { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); }
  .fxbody { display: none; margin-top: 4px; }
  .sec.fx.open .fxbody { display: block; }
