/* The Studio demo. Look and feel from store/theme/DESIGN.md: Literata, cocoa ink, cream grounds, the warm well,
   one terracotta button (Add to cart), 16px corners, soft warm shadows. */
@font-face { font-family: 'Literata UI'; src: url('/engine/fonts/Literata-w400-o9.6.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Literata UI'; src: url('/engine/fonts/Literata-w700-o9.6.woff2') format('woff2'); font-weight: 700; font-display: swap; }
:root { --ink: #4a2619; --ink-soft: rgba(74,38,25,.72); --line: rgba(74,38,25,.14); --cream: #faf8f5; --well: #f7ede5; --terracotta: #b5573f; --sand: #f2eee7; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.5 'Literata UI', Georgia, serif; -webkit-text-size-adjust: 100%; }
.top { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.top__brand { font-weight: 700; }
.top__note { font-size: 13px; color: var(--ink-soft); }
.loading { padding: 40px 16px; color: var(--ink-soft); }

.studio { display: grid; gap: 18px; padding: 16px; max-width: 1400px; margin: 0 auto; }
@media (min-width: 960px) { .studio { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); align-items: start; padding: 24px; } .studio__stage { position: sticky; top: 16px; } }
.studio__stage { display: grid; gap: 8px; min-width: 0; }
.studio__book { width: 100%; aspect-ratio: 16 / 10; --bv-background: var(--well); --bv-radius: 16px; box-shadow: 0 10px 30px -14px rgba(43,42,40,.25); }
@media (max-width: 959px) { .studio__book { aspect-ratio: 3 / 2; } }
.studio__tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.studio__mode { font-size: 12px; color: var(--ink-soft); margin-left: auto; }
.studio__status { min-height: 1.4em; margin: 0; font-size: 14px; color: var(--ink-soft); }
.tool { font: inherit; font-size: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 14px; cursor: pointer; min-height: 40px; }
.tool[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tool:disabled { opacity: .5; }

.studio__side { min-width: 0; display: grid; gap: 14px; }
.trail { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.trail__step button { display: flex; gap: 6px; align-items: center; font: inherit; font-size: 13px; background: none; border: 0; color: var(--ink-soft); padding: 6px 8px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.trail__dot { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--sand); font-size: 12px; transition: background .3s, color .3s, transform .3s; }
.trail__step.is-done .trail__dot { background: #d9e4d2; }
.trail__step.is-now button { color: var(--ink); }
.trail__step.is-now .trail__dot { background: var(--ink); color: #fff; transform: scale(1.08); }
@media (max-width: 959px) { .trail__step:not(.is-now) .trail__label { display: none; } }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 20px; }
.step { display: grid; gap: 14px; animation: stepIn .35s ease both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } }
.step h2 { margin: 0; font-size: 22px; font-weight: 700; }
.step h3 { margin: 6px 0 0; font-size: 16px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 14px; font-weight: 700; }
.hint { font-size: 13px; color: var(--ink-soft); margin: 0; }
input[type="text"], textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; min-height: 46px; background: var(--cream); }
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--cream); color: var(--ink); border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.swatch:hover { border-color: rgba(74,38,25,.35); }
.swatch.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.swatch.pop { animation: pop .32s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 0% { transform: scale(.92); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.person, .favs { display: grid; gap: 14px; }
.fav { display: grid; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }

.btn { font: inherit; border-radius: 999px; padding: 10px 18px; min-height: 44px; cursor: pointer; border: 1px solid transparent; }
.btn--next { justify-self: start; background: var(--ink); color: #fff; }
.btn--soft { background: var(--sand); color: var(--ink); border-color: var(--line); text-decoration: none; display: inline-flex; align-items: center; }
.btn--link { background: none; border: 0; padding: 6px 0; color: #9a4632; text-decoration: underline; text-underline-offset: 3px; min-height: 0; }
.btn--cart { background: var(--terracotta); color: #fff; width: 100%; font-size: 17px; min-height: 52px; }
.btn--cart:disabled { background: rgba(181,87,63,.4); cursor: not-allowed; }
.approve { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; background: var(--cream); border-radius: 12px; padding: 12px; }
.approve input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--terracotta); }

.clip { border: 0; border-radius: 16px; padding: 16px; max-width: min(92vw, 560px); color: var(--ink); background: var(--cream); }
.clip::backdrop { background: rgba(43,42,40,.55); }
.clip video { width: 100%; border-radius: 12px; background: #000; display: block; margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .step, .swatch.pop { animation: none; } }
