:root {
  --bg: #fbfaf7;
  --page: #e9e5dc;
  --ink: #15140f;
  --ink-2: #3d3a33;
  --muted: #6d685e;
  --line: #e6e1d6;
  --soft: #f3efe7;
  --accent: #15140f;
  --accent-ink: #5c4523;
  --accent-soft: #efe8da;
  --hi: #a47e4c;
  --ok: #0f7a4a;
  --warn: #a4570a;
  --radius: 18px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--page); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

#app { position: relative; max-width: 480px; min-height: 100%; margin: 0 auto; background: var(--bg);
  display: flex; flex-direction: column; }
@media (min-width: 560px) {
  body { padding: 24px 0; }
  #app { min-height: calc(100vh - 48px); border-radius: 32px; box-shadow: 0 30px 80px rgba(17, 24, 39, .12); overflow: hidden; }
}
.view { flex: 1; display: flex; flex-direction: column; padding: 0 22px calc(22px + env(safe-area-inset-bottom));
  animation: enter .34s cubic-bezier(.2, .8, .2, 1); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view, .sheet, .scene, .toast { animation: none !important; } * { transition: none !important; } }

/* top bar */
.bar { height: 60px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; background: none; border: 0; padding: 0; }
.bar h2 { font-size: 17px; font-weight: 600; }
.icon-btn { width: 44px; height: 44px; margin: 0 -10px; display: grid; place-items: center; border: 0; background: none; border-radius: 12px; color: var(--ink); }
.pill { height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.spacer { width: 24px; }

/* buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 0 18px; border: 0;
  border-radius: 16px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 600; text-align: center; text-decoration: none;
  transition: transform .12s ease, opacity .15s ease; }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn.plain { background: none; color: var(--accent); min-height: 44px; font-size: 15px; }
.btn.grey { background: var(--soft); color: var(--ink); }
.btn.sm { min-height: 44px; font-size: 15px; border-radius: 12px; width: auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.note { font-size: 13px; color: var(--muted); text-align: center; }

/* home */
.hero { display: flex; flex-direction: column; align-items: stretch; }
.demo { position: relative; align-self: center; width: 200px; aspect-ratio: 9 / 16; margin: 6px 0 26px; border-radius: 26px; overflow: hidden;
  background: #111; box-shadow: 0 24px 60px rgba(17, 24, 39, .2), 0 2px 6px rgba(17, 24, 39, .08); }
.demo video { width: 100%; height: 100%; object-fit: cover; }
.demo .tag { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 10px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 11px; font-weight: 600; }
.hero h1 { font-size: 31px; line-height: 1.12; font-weight: 700; letter-spacing: -.028em; }
.hero p.lead { margin: 10px 0 24px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.how { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.how h3, .mine h3 { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step b { flex: none; width: 28px; height: 28px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: 13px; }
.step div { font-size: 15px; color: var(--ink-2); }
.step strong { display: block; color: var(--ink); font-weight: 600; }
.mine { margin-top: 30px; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; width: 100%; }
.row .thumb { width: 40px; height: 56px; border-radius: 8px; background: var(--soft) center/cover; flex: none; }
.row .meta { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.legal { margin-top: 28px; font-size: 12px; color: var(--muted); text-align: center; }

/* working */
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; }
.big { font-size: 44px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.track { width: 100%; height: 6px; border-radius: 3px; background: #ececf0; overflow: hidden; margin: 10px 0 4px; }
.track i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .5s ease; }
.stage { font-size: 17px; font-weight: 600; }
.checks { width: 100%; margin-top: 22px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.check { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.check.on { color: var(--ink); font-weight: 600; }
.check.done { color: var(--ink); }
.dot { flex: none; width: 22px; height: 22px; border-radius: 11px; border: 2px solid #d4d4da; display: grid; place-items: center; }
.check.on .dot { border-color: var(--accent); }
.check.on .dot::after { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
.check.done .dot { border-color: var(--accent); background: var(--accent); color: #fff; }
@keyframes pulse { 50% { transform: scale(.55); opacity: .6; } }
.grid { width: 100%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 24px; }
.grid i { aspect-ratio: 1; border-radius: 7px; background: var(--soft) center/cover; }

/* storyboard */
.summary { font-size: 15px; color: var(--muted); margin: 2px 0 16px; }
.summary b { color: var(--ink); font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 14px; background: #ececf0; }
.seg button { height: 44px; border: 0; border-radius: 11px; background: none; font-size: 15px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg small { color: var(--muted); font-weight: 500; }
.scenes { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.scene { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  animation: enter .3s cubic-bezier(.2, .8, .2, 1) backwards; }
.scene.still { animation: none; }
.frames { flex: none; display: flex; align-items: center; gap: 5px; }
.frame { width: 50px; aspect-ratio: 9 / 16; border-radius: 9px; background: var(--soft) center/cover; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.frames svg { color: var(--accent); flex: none; }
.frame.ghost { background: repeating-linear-gradient(135deg, #f5f5f7 0 6px, #ececf0 6px 12px); }
.scene .txt { flex: 1; min-width: 0; }
.scene .n { font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.scene .t { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.scene .s { font-size: 13px; color: var(--muted); }
.scene .acts { display: flex; flex-direction: column; gap: 2px; margin-right: -4px; }
.scene .acts button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--muted); display: grid; place-items: center; }
.scene .acts button:active { background: var(--soft); }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--soft); color: var(--muted); }
.badge.ok { background: #e7f5ee; color: var(--ok); }
.badge.live { background: var(--accent-soft); color: var(--accent-ink); }
.badge.warn { background: #fdf0e1; color: var(--warn); }
details.extra { border-radius: var(--radius); background: var(--soft); padding: 0 14px; }
details.extra summary { list-style: none; height: 52px; display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 600; cursor: pointer; }
details.extra summary::-webkit-details-marker { display: none; }
details.extra[open] summary svg { transform: rotate(180deg); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 14px; }
.fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.fields label.wide { grid-column: 1 / -1; }
.fields input[type="text"] { height: 44px; padding: 0 12px; border: 1px solid #dcdce2; border-radius: 10px; background: #fff; font-size: 16px; font-weight: 500; color: var(--ink); width: 100%; }
.switch-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 500; color: var(--ink); min-height: 44px; }
.switch { width: 51px; height: 31px; padding: 0; border: 0; border-radius: 16px; background: #d4d4da; position: relative; transition: background .2s ease; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s ease; }
.switch[aria-pressed="true"] { background: var(--accent); }
.switch[aria-pressed="true"]::after { transform: translateX(20px); }
.foot { position: sticky; bottom: 0; margin: 18px -22px calc(-22px - env(safe-area-inset-bottom)); padding: 14px 22px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 22%); display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; }

/* result */
.player { align-self: center; width: min(270px, 72%); aspect-ratio: 9 / 16; border-radius: 24px; overflow: hidden; background: #111;
  box-shadow: 0 22px 56px rgba(17, 24, 39, .2); margin-bottom: 16px; }
.player video { width: 100%; height: 100%; object-fit: cover; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.caption { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--soft); margin-bottom: 10px; }
.caption div { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caption small { display: block; font-size: 12px; color: var(--muted); }
.alert { padding: 12px 14px; border-radius: 14px; background: #fdf0e1; color: #7a3f04; font-size: 14px; margin-bottom: 10px; }

/* sheets + toast */
.scrim { position: fixed; inset: 0; background: rgba(11, 11, 12, .4); z-index: 20; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; padding: 10px 22px calc(24px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #fff;
  animation: up .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(100%); } }
.grab { width: 40px; height: 5px; border-radius: 3px; background: #d4d4da; margin: 0 auto 16px; }
.sheet h2 { font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.sheet p.sub { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.plan { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; margin-bottom: 10px; }
.plan[aria-pressed="true"] { border: 2px solid var(--accent); padding: 14px; }
.plan .radio { flex: none; margin-top: 2px; width: 22px; height: 22px; border-radius: 11px; border: 2px solid #c9c9cf; display: grid; place-items: center; }
.plan[aria-pressed="true"] .radio { border-color: var(--accent); }
.plan[aria-pressed="true"] .radio::after { content: ""; width: 10px; height: 10px; border-radius: 5px; background: var(--accent); }
.plan .body { flex: 1; }
.plan .name { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.plan .desc { font-size: 14px; color: var(--muted); }
.plan .cost { text-align: right; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.plan .cost small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.ticks { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 18px; font-size: 14px; color: var(--ink-2); }
.ticks div { display: flex; gap: 10px; }
.ticks svg { flex: none; color: var(--accent); margin-top: 1px; }
.field { width: 100%; height: 52px; padding: 0 14px; border: 1px solid #dcdce2; border-radius: 14px; font-size: 16px; margin-bottom: 12px; }
.toast { position: fixed; left: 50%; top: calc(18px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 40; max-width: 88vw; padding: 11px 18px; border-radius: 22px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); animation: fade .2s ease; }

/* words and voice */
.fields textarea { min-height: 104px; padding: 10px 12px; border: 1px solid #dcdce2; border-radius: 10px; background: #fff; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--ink); width: 100%; resize: vertical; }
.fields textarea[readonly] { color: var(--ink-2); background: #fbfbfc; }
.fit { grid-column: 1 / -1; font-size: 13px; color: var(--muted); margin-top: -2px; }
.fit.warn { color: var(--warn); }
.fit.bad { color: #b3261e; font-weight: 600; }
.hint { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: 13px; }
.read { padding: 14px; border-radius: 14px; background: var(--soft); font-size: 16px; line-height: 1.5; color: var(--ink); margin-bottom: 12px; }
.agree { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 0 16px; border: 0; background: none; text-align: left; font-size: 14px; color: var(--ink-2); }
.agree .box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid #c9c9cf; display: grid; place-items: center; color: transparent; }
.agree[aria-pressed="true"] .box { background: var(--accent); border-color: var(--accent); color: #fff; }
.live-dot { width: 10px; height: 10px; border-radius: 5px; background: #d92d20; animation: pulse 1.1s ease-in-out infinite; }

/* ---- the look: warm ivory, ink, one bronze accent, serif headlines ---- */
.brand .wm { font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: .005em; line-height: 1; }
.brand .wm i { font: 600 10px var(--font); font-style: normal; letter-spacing: .24em; text-transform: uppercase; margin-left: 7px; color: var(--hi); vertical-align: 2px; }
.bar h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.pill { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-weight: 500; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1; letter-spacing: -.012em; }
.hero p.lead { font-size: 16px; }
.sheet { background: var(--bg); }
.sheet h2 { font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.05; letter-spacing: -.005em; }
.big { font-family: var(--serif); font-weight: 500; font-size: 64px; line-height: 1; letter-spacing: -.01em; }
.stage { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.btn { border-radius: 14px; letter-spacing: .005em; }
.btn.soft { color: var(--ink); }
.btn.plain, .link { color: var(--accent-ink); }
.btn.grey { box-shadow: inset 0 0 0 1px var(--line); background: none; }
:focus-visible { outline-color: var(--hi); }
.track { background: var(--line); height: 3px; }
.track i { background: var(--hi); }
.check.on .dot { border-color: var(--hi); }
.check.on .dot::after { background: var(--hi); }
.check.done .dot { border-color: var(--hi); background: var(--hi); }
.step b { background: none; box-shadow: inset 0 0 0 1px var(--hi); color: var(--accent-ink); font-family: var(--serif); font-size: 16px; }
.seg { background: #e9e4d8; }
.scene { border-color: var(--line); }
.scene .n { color: var(--hi); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.scene .t { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.1; letter-spacing: 0; }
.frames svg { color: var(--hi); }
.frame { position: relative; overflow: hidden; }
.badge.live { background: var(--accent-soft); color: var(--accent-ink); }
.switch[aria-pressed="true"] { background: var(--ink); }
.plan { border-color: var(--line); }
.plan .cost { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; }
.ticks svg { color: var(--hi); }
.foot { background: linear-gradient(180deg, rgba(251, 250, 247, 0), var(--bg) 22%); }
.demo, .player { box-shadow: 0 28px 64px rgba(40, 30, 12, .22), 0 2px 6px rgba(40, 30, 12, .08); }
.how h3, .mine h3 { letter-spacing: .14em; font-size: 11px; }
.invite { display: flex; align-items: center; gap: 12px; width: 100%; margin: 6px 0 10px; padding: 14px 16px; border: 0; border-radius: var(--radius); background: var(--accent-soft); text-align: left; color: var(--ink-2); font-size: 13px; }
.invite span { flex: 1; }
.invite strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ink); line-height: 1.15; margin-bottom: 2px; }
.invite svg { color: var(--hi); flex: none; }
/* small pleasures: the finished video arrives, and a scene glints while it renders */
.player { animation: arrive .9s cubic-bezier(.2, .8, .2, 1); }
@keyframes arrive { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.scene:has(.badge.live) .frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .6) 50%, transparent 65%); animation: glint 1.7s ease-in-out infinite; }
@keyframes glint { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .player, .frame::after { animation: none !important; } }
.legal.links { margin-top: 8px; } .legal.links a { color: var(--muted); margin: 0 8px; }
