/* store-site/css/kit.css: docs/wip/design/perch-2026-11/studio/kit.css (R335, 2-NOT-SPEC 12-01), what the store's pages and the
   Studio share, ported unchanged but for the Cinzel @font-face: the font is in the asset bundle, whose version a static file cannot know,
   so js/shell.js writes that rule once the config says where the bundle is. The paintings carry the colour; the layout stands back. */
:root {
  --paper: #F5F2EC; --paper2: #ECE8E0; --card: #FFFFFF; --ink: #1B1916; --ink2: #5E5850; --ink3: #736C63; --hair: rgba(27,25,22,.12);
  --fill: rgba(27,25,22,.06); --gold: #94702F; --ok: #2F7D5B; --night: #0C0B0A; --on: #FFFFFF;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --latin: "Cinzel", "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  --out: cubic-bezier(.2, .7, .2, 1);
  /* a real spring (it overshoots a little and settles), and three durations for everything: a press, content, a sheet or the picture */
  --spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 19.4%, 1.067 22.5%, 1.089 25.9%, 1.085 30%, 1.036 39.9%, 1.011 46.5%, .996 54.4%, .999 76.9%, 1);
  --t1: .2s; --t2: .35s; --t3: .55s;
}
@media (prefers-color-scheme: dark) { :root { --paper: #100F0D; --paper2: #191714; --card: #211E1A; --ink: #F3EFE8; --ink2: #B1AAA0; --ink3: #8D867C;
  --hair: rgba(243,239,232,.14); --fill: rgba(243,239,232,.08); --gold: #D9B26A; --ok: #63C398; --on: #100F0D; } }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, textarea { font: inherit; color: inherit; } button { cursor: pointer; border: 0; background: none; padding: 0; } a { color: inherit; text-decoration: none; }
img { display: block; } [hidden] { display: none !important; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--ink) 55%, transparent); outline-offset: 3px; border-radius: 6px; }
.dark :focus-visible, .glass:focus-visible { outline-color: rgba(255,255,255,.8); }

/* names */
.nm { font-family: var(--serif); font-weight: 700; letter-spacing: .04em; }
.en { font-family: var(--latin); font-weight: 400; letter-spacing: .16em; text-transform: uppercase; font-size: 12px; }
.ph { font-size: 12px; color: var(--ink3); }                                  /* 「价是占位」 */

/* buttons: one ink */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 25px; font-weight: 600; font-size: 17px;
  background: var(--ink); color: var(--on); transition: transform .18s var(--out), opacity .18s; white-space: nowrap; }
.btn:active { transform: scale(.97); opacity: .86; } .btn.wide { width: 100%; } .btn.sm { min-height: 36px; padding: 0 16px; font-size: 15px; border-radius: 18px; }
.btn.quiet { background: var(--fill); color: var(--ink); } .btn.line { background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair); }
.btn.text { background: none; color: var(--ink); min-height: 44px; padding: 0 8px; font-weight: 500; } .btn[disabled] { opacity: .38; pointer-events: none; }
.btn b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* a control drawn smaller than 44 points still takes a 44-point touch */
.hit { position: relative; } .hit::after { content: ""; position: absolute; inset: -7px -4px; }

/* glass: over a painting */
.glass { background: rgba(255,255,255,.16); -webkit-backdrop-filter: blur(22px) saturate(1.8) brightness(1.06); backdrop-filter: blur(22px) saturate(1.8) brightness(1.06);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.34), inset 0 1px 0 rgba(255,255,255,.26), 0 6px 22px rgba(0,0,0,.16); color: #fff; }
.glass.deep { background: rgba(24,21,19,.62); -webkit-backdrop-filter: blur(40px) saturate(1.3); backdrop-filter: blur(40px) saturate(1.3); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.14), inset 0 1px 0 rgba(255,255,255,.22), 0 10px 30px rgba(0,0,0,.3); }
.glass.dim { background: rgba(20,17,15,.36); -webkit-backdrop-filter: blur(30px) saturate(1.3); backdrop-filter: blur(30px) saturate(1.3); }   /* a round control over any painting: it does not take the painting's colour */
.glass.lit { background: rgba(255,255,255,.9); color: #1B1916; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.6), 0 6px 22px rgba(0,0,0,.2); }
.cap { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 17px; border-radius: 22px; font-size: 16px; font-weight: 600; transition: transform .18s var(--out); }
.cap:active { transform: scale(.95); } .cap.round { width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 24px; font-weight: 300; }

/* the live picture (stage.js) */
.stage { position: relative; width: 390px; aspect-ratio: 390 / 844; overflow: hidden; background: #0d0c0b; transform-origin: 50% 0;
  transform: translateY(var(--ty, 0px)) scale(var(--sx, 1)); transition: transform .55s var(--spring), border-radius .45s var(--out), opacity .3s; }
.stage-fit { position: absolute; left: 0; top: 0; width: 390px; height: 844px; transform-origin: 0 0; }
.stage iframe { position: absolute; inset: 0; width: 390px; height: 844px; border: 0; background: transparent; pointer-events: none; transition: opacity .42s ease; }
.stage iframe.back { opacity: 0; }

/* ---- the phone the iOS prototypes are drawn in. At phone width the page IS the phone; wider, it is a device on a table ---- */
body.ios { background: #E9E5DD; overflow: hidden; }
@media (prefers-color-scheme: dark) { body.ios { background: #090807; } }
.device { position: relative; width: 390px; height: 844px; overflow: hidden; background: var(--paper); isolation: isolate; }
.device.dark { background: var(--night); color: #fff; }
@media (min-width: 520px) {
  body.ios { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0 44px; min-height: 100%; padding: 24px; overflow: auto; }
  .device { grid-column: 2; border-radius: 54px; box-shadow: 0 0 0 11px #141312, 0 0 0 12.5px #3a3835, 0 40px 80px rgba(20,14,8,.28); transform-origin: 50% 50%; transform: scale(var(--dk, 1)); }
  .aside { grid-column: 3; max-width: 300px; align-self: center; } .aside.left { grid-column: 1; justify-self: end; grid-row: 1; }
}
@media (max-width: 519.9px) { .device { width: 100vw; height: 100dvh; } .aside { display: none; } }
.aside { font-size: 13px; line-height: 1.6; color: var(--ink2); }
.aside h2 { font: 600 21px/1.3 var(--sans); color: var(--ink); margin: 0 0 6px; } .aside p { margin: 0 0 10px; } .aside b { color: var(--ink); font-weight: 600; }
.aside .seg { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 2px; margin: 0 0 12px; } .aside .seg button { padding: 5px 12px; border-radius: 8px; font-size: 13px; }
.aside .seg button[aria-pressed=true] { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.aside .links { display: flex; flex-wrap: wrap; gap: 6px; } .aside .links a, .aside .links button { padding: 4px 11px; border-radius: 14px; background: var(--fill); font-size: 12.5px; color: var(--ink); }
.aside ol { margin: 0 0 10px; padding-left: 18px; } .aside li { margin-bottom: 3px; }

/* iOS furniture */
.status { position: absolute; left: 0; right: 0; top: 0; height: 54px; z-index: 60; pointer-events: none; color: var(--ink); font: 600 16.5px/1 var(--sans); }
.device.dark .status, .status.w { color: #fff; }
.status .t { position: absolute; left: 0; width: 132px; top: 18px; text-align: center; letter-spacing: -.01em; }
.status .island { position: absolute; left: 50%; top: 11px; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; background: #000; }
.status svg { position: absolute; right: 30px; top: 19px; height: 13px; fill: currentColor; }
.homebar { position: absolute; left: 50%; bottom: 8px; width: 138px; height: 5px; margin-left: -69px; border-radius: 3px; background: var(--ink); opacity: .9; z-index: 61; pointer-events: none; }
.device.dark .homebar, .homebar.w { background: #fff; }
.grab { width: 36px; height: 5px; border-radius: 3px; background: color-mix(in srgb, currentColor 32%, transparent); margin: 6px auto 0; }

/* a sheet (pulled down to put away: no ✕, R302) */
.veil { position: absolute; inset: 0; z-index: 70; background: rgba(8,7,6,.42); opacity: 0; pointer-events: none; transition: opacity .3s; } .veil.on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 71; background: var(--card); color: var(--ink); border-radius: 30px 30px 0 0; padding: 0 20px 34px; transform: translateY(105%);
  transition: transform .5s var(--spring); max-height: 92%; overflow: auto; touch-action: pan-y; }
.sheet.on { transform: none; box-shadow: 0 -10px 40px rgba(0,0,0,.18); } .sheet .grab { margin-bottom: 14px; }
.sheet h3 { font: 600 21px/1.3 var(--sans); margin: 0 0 4px; } .sheet p { margin: 0 0 12px; color: var(--ink2); font-size: 15px; }

/* rows */
.rows { background: var(--card); border-radius: 18px; overflow: hidden; } .device .rows { box-shadow: 0 0 0 .5px var(--hair); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; position: relative; text-align: left; width: 100%; }
.row + .row::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: .5px; background: var(--hair); }
.row .g { flex: 1; min-width: 0; } .row small { display: block; color: var(--ink3); font-size: 13px; } .row .v { color: var(--ink2); font-variant-numeric: tabular-nums; }
.row .chev::after { content: ""; display: block; width: 8px; height: 8px; border-right: 2px solid var(--ink3); border-top: 2px solid var(--ink3); transform: rotate(45deg); opacity: .7; }
.thumb { width: 44px; aspect-ratio: 390 / 844; border-radius: 9px; object-fit: cover; background: var(--paper2); flex: none; }
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01s !important; animation-duration: .01s !important; } }
