/* Geometry from the WeChat accessory-free Sketch template (1125 × 2436). */
/* Register the preview to the transparent display in the iPhone 18 Pro render. */

/* ===== 1. layer 1 ===== */
*,*::before,*::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--body); }
body:has(dialog[open]) { overflow: hidden; }
button,input,textarea,select { font: inherit; color: inherit; }
button,a,input,textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
::selection { background: #eed2c4; color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: fixed; z-index: 10; top: 8px; left: 8px; width: auto; height: auto; margin: 0; clip-path: none; padding: 12px; background: var(--surface); }
header { border-bottom: 1px solid var(--line); }
.brand-icon::after { content: ""; width: 8px; height: 8px; border: 1px solid #fee0ab; border-radius: 50%; margin-top: 4px; background: #ad3327; }
nav { margin-left: auto; display: flex; align-items: center; gap: 27px; color: var(--muted); font-size: 14px; }
nav a { padding: 10px 0; }
nav a:hover { color: var(--red); }
.button:not(:disabled):active { transform: translateY(1px); }
.button.primary { background: var(--red); color: #fffaf1; }
.button.primary:not(:disabled):hover { background: var(--deep); }
.button.secondary { background: var(--surface); border-color: var(--line); }
.button.secondary:not(:disabled):hover { border-color: #b99a83; background: #fbf3e7; }
.button.ghost { background: transparent; border-color: var(--line); }
.button.ghost:not(:disabled):hover { border-color: #b99a83; }
.wallet-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.coin { font-size: 17px; color: var(--red); line-height: 1; }
.arrow { font-family: var(--body); font-size: 19px; line-height: 1; }
.section { border-top: 1px solid var(--line); padding: 35px 0 44px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 17px; }
.section-head h2 { margin: 0; font: 800 clamp(27px, 3.2vw, 37px)/1.17 var(--body); }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.field-label,.form-panel legend { display: block; padding: 0; margin: 0 0 8px; color: var(--ink); font-size: 14px; font-weight: 700; }
.field-label span { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 4px; }
.choices { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { background: #f8f4ec; border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; min-height: 39px; font-size: 13px; color: #5a5149; text-align: left; }
.chip:hover,.chip[aria-pressed="true"] { color: var(--deep); background: var(--pale); border-color: #dea899; }
.chip[aria-pressed="true"] { font-weight: 700; }
textarea,input[type="text"] { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; background: #fbf8f2; font-size: 16px; }
textarea::placeholder,input::placeholder { color: #7b7065; opacity: 1; }
.text-button { color: var(--red); padding: 2px 0; border: 0; background: none; font: inherit; font-weight: 650; text-underline-offset: 4px; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.reference .button { min-height: 39px; font-size: 13px; padding: 7px 10px; font-weight: 600; }
.reference-thumb { width: 37px; height: 37px; object-fit: cover; border-radius: 6px; }
.reference-name { max-width: 25ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.form-actions .primary { flex: 1; min-height: 49px; }
.form-actions .button small { font-size: 12px; font-weight: 500; opacity: 1; }
.form-actions .ghost { min-height: 49px; }
.status { min-height: 1lh; color: var(--muted); font-size: 13px; margin: 9px 0 0; overflow-wrap: anywhere; }
.status:empty { min-height: 0; margin: 0; }
.status[data-level="error"] { color: var(--deep); }
.status[data-level="success"] { color: var(--green); }
.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin-bottom: 12px; }
.preview-head span { font-size: 12px; color: var(--muted); }
.preview-modes button[aria-pressed="true"] { background: #f7eee1; border-color: #dbccbc; color: var(--ink); font-weight: 700; }
.preview-modes button:not(:disabled):hover { background: #f7eee1; }
.preview-scene { flex: 1; min-height: 330px; display: grid; place-items: center; position: relative; isolation: isolate; }
.preview-card::after { content: ""; position: absolute; inset: 9px; border: 1px solid #fbe5b76b; border-radius: 7px; pointer-events: none; }
.preview-card img { width: 100%; height: 100%; object-fit: contain; background: #261912; position: absolute; inset: 0; }
.preview-card:has(img:not([hidden]))::after { display: none; }
.preview-blank { position: absolute; inset: 11% 12% 13%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.preview-blank .seal { width: 77px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #f1c08094; border-radius: 50%; font: 800 41px/1 var(--body); margin-bottom: 7px; }
.preview-blank strong { font-size: 14px; }
.preview-blank small { color: #f5dbb6; font-size: 12px; }
.spinner { width: 28px; height: 28px; border: 2px solid #ffe8b76e; border-top-color: #fff5cf; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.preview-foot p { margin: 0; font-size: 12px; color: var(--muted); }
.empty-history { border: 1px dashed #d9cabb; border-radius: 11px; text-align: center; margin: 0; color: var(--muted); padding: 29px 12px; }
.history-card { min-width: 0; display: block; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 13px; padding: 11px; }
.history-card:hover { border-color: #ba907d; }
.history-card strong,.history-card small { display: block; overflow-wrap: anywhere; }
.history-card strong { margin-top: 7px; font-size: 14px; }
.history-card small { color: var(--muted); }
dialog { max-height: calc(100dvh - 25px); width: min(600px,calc(100% - 24px)); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); padding: 0; box-shadow: 0 20px 80px #31211b43; }
dialog::backdrop { background: #251b16a0; backdrop-filter: blur(5px); }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dialog-head h2 { font: 800 25px/1.2 var(--body); margin: 0; }
.close:hover { color: var(--red); border-color: #b99a83; }
.dialog-body { padding: 18px 22px 24px; }
.dialog-body p { margin-bottom: 12px; }
.wallet-line { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: #f6eee1; border: 1px solid #ecdfd0; border-radius: 10px; padding: 12px; margin-bottom: 17px; }
.wallet-line strong { color: var(--deep); }
.inline-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.inline-form .status { grid-column: 1/-1; }
details { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-size: 14px; font-weight: 700; }
.detail-content { padding-top: 10px; color: var(--muted); font-size: 13px; }
.detail-content .button { min-height: 40px; }
.copy-line { margin: 10px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.copy-line code { border-radius: 7px; background: var(--sand); color: var(--ink); padding: 5px 8px; overflow-wrap: anywhere; }
.packages { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 14px 0 19px; }
.package { position: relative; min-width: 0; background: #faf5ed; text-align: left; border: 1px solid var(--line); padding: 11px; border-radius: 10px; }
.package:hover,.package[aria-pressed="true"] { border-color: var(--red); background: #f8e9e1; }
.package .name,.package .unit,.package .credits,.package .price { display: block; }
.package .name,.package .unit { color: var(--muted); font-size: 12px; }
.package .credits { margin: 5px 0; font-weight: 700; font-size: 15px; }
.package .price { color: var(--deep); font-family: var(--body); font-size: 21px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.package .description { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.methods { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; border: 0; margin: 0 0 14px; }
.methods legend { margin-bottom: 6px; }
.method { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 14px; }
.method input { accent-color: var(--red); width: 17px; height: 17px; }
.payment-state { text-align: center; padding: 10px 0 0; }
.payment-state h3 { margin: 0 0 5px; font-size: 16px; }
.payment-state p { color: var(--muted); font-size: 13px; }
.payment-qr { width: 185px; height: 185px; margin: 9px auto 13px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; image-rendering: pixelated; background: white; }
@media (max-width:860px) {
  .wrap { width: calc(100% - 44px); }
  .topbar { gap: 18px; }
  nav { gap: 15px; }
  .workspace { grid-template-columns: minmax(0,1fr) minmax(249px,.65fr); }
  .form-panel { padding: 19px; }
  .preview-panel { padding: 19px; }
}
@media (max-width:690px) {
  .wrap { width: calc(100% - 32px); }
  .topbar { min-height: 62px; gap: 8px; }
  .brand { font-size: 16px; gap: 7px; letter-spacing: normal; }
  .brand-icon { width: 25px; height: 29px; }
  .top-actions { gap: 5px; }
  .top-actions .button { min-height: 39px; font-size: 12px; padding: 7px 9px; gap: 4px; }
  nav { display: none; }
  h1 { margin-bottom: 13px; font-size: clamp(48px,12vw,70px); }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; margin-bottom: 15px; }
  .hero-actions .button { min-height: 43px; padding: 9px 13px; font-size: 13px; }
  .section { padding: 26px 0 31px; }
  .section-head { align-items: start; flex-direction: column; gap: 4px; margin-bottom: 12px; }
  .workspace { grid-template-columns: 1fr; gap: 11px; }
  .panel { border-radius: 14px; }
  .preview-scene { min-height: 293px; }
  .preview-card { width: 200px; }
  .form-panel,.preview-panel { padding: 16px; }
  .history { grid-template-columns: repeat(2,1fr); gap: 8px; }
}
@media (max-width:365px) {
  .wrap { width: calc(100% - 24px); }
  .coin { display: none; }
  .hero-actions { gap: 7px; }
  .form-panel,.preview-panel { padding: 13px; }
  .form-actions { gap: 7px; }
  .form-actions .button { padding-inline: 10px; }
  .dialog-head,.dialog-body { padding-inline: 14px; }
  .package { padding: 8px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition: none !important; }
}
:root { color-scheme: light; --paper: #f8f5ef; --surface: #fffdf9; --ink: #242019; --muted: #6e655b; --red: #a32724; --deep: #7b1e1a; --pale: #f5e7df; --line: #e4dbcd; --sand: #eee6d9; --green: #33624c; --body: "PingFang SC","Noto Sans CJK SC","Microsoft YaHei",sans-serif; --p-bg: #f8f5ef; --p-surface: #fffdf9; --p-ink: #242019; --p-muted: #6e655b; --p-accent: #a32724; --p-accent-ink: #f8f5ef; --p-action: #a32724; --p-action-ink: #f8f5ef; --p-inv-bg: #242019; --p-inv-surface: #302c25; --p-inv-ink: #f8f5ef; --p-inv-muted: #a09c96; --p-inv-accent: #f8f5ef; --p-inv-accent-ink: #242019; --p-inv-action: #f8f5ef; --p-inv-action-ink: #242019; --font-display: var(--body); --font-text: var(--body); --font-mono: ui-monospace,monospace; --display-weight: 500; --display-tracking: -.03em; --display-tracking-xl: -.04em; --bg: var(--paper); --action: var(--red); --nav-h: 72px; --radius: 18px; --wrap-width: 1160px; }
.wrap { margin-inline: auto; width: min(var(--wrap-width),calc(100% - clamp(32px,8vw,120px))); }
.topbar { align-items: center; justify-content: space-between; min-height: calc(var(--nav-h) - 1px); display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 700; letter-spacing: .05em; white-space: nowrap; justify-self: start; min-height: 44px; padding-block: 4px; }
.brand-icon { flex: none; position: relative; background: var(--red); border-radius: 5px 5px 7px 7px; display: grid; place-items: center; box-shadow: 0 2px 0 #801c19; width: 25px; height: 28px; }
.brand-icon::before { content: ""; position: absolute; inset: 3px 1px auto; border-bottom: 1px solid #f2af84; border-radius: 0 0 50% 50%; height: 10px; }
.topbar nav { margin: 0; }
.top-actions { display: flex; gap: 9px; align-items: center; justify-self: end; }
.nav-text { flex: none; padding: 0; min-height: 44px; border: 0; background: none; color: var(--muted); }
.nav-text:hover { color: var(--deep); text-decoration: underline; text-underline-offset: 5px; }
.button,.text-button,.close,.chip,.preview-modes button,.reference .button,.detail-content .button { min-height: 44px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; border: 1px solid transparent; padding: 9px 17px; font-weight: 650; line-height: 1.35; text-align: center; transition: background .18s ease,border-color .18s ease,transform .18s ease; border-radius: 9px; }
.close { height: 41px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 25px; line-height: 1; color: var(--muted); width: 44px; }
.nowrap { white-space: nowrap; }
.hero-copy { text-align: center; }
.hero-lead { max-width: 40em; margin: 0 auto 23px; color: var(--muted); font-size: clamp(15px,1.32vw,19px); line-height: 1.65; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }
.hero-actions .button { min-height: 46px; padding-inline: 22px; }
.silk-ground { position: absolute; inset: 0; z-index: -1; background: linear-gradient(140deg,#f6e5d9,#e8cbb9 54%,#dcb49f); pointer-events: none; }
.silk-ground canvas { display: block; width: 100%; height: 100%; }
.app-frame { border: 1px solid #e3d8cc; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.inspiration { width: min(100%,836px); background: #fffaf3; box-shadow: 0 14px 32px #4e2b1e20; }
.app-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 11px 17px; min-height: 44px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.app-bar strong { color: var(--ink); font-size: 14px; }
.cover-grid { display: flex; align-items: center; justify-content: center; gap: clamp(9px,2.1vw,30px); padding: clamp(12px,2.3vh,24px) 14px; }
.cover-tile img { width: 100%; height: 100%; object-fit: cover; }
.studio h2 { font: 800 clamp(30px,3.4vw,49px)/1.12 var(--body); letter-spacing: -.04em; }
.studio .section-head .button { font-size: 13px; flex: none; }
.workspace { display: grid; align-items: stretch; gap: 0; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); }
.studio-bar { grid-column: 1/-1; justify-content: space-between; }
.panel { min-width: 0; overflow: hidden; border: 0; border-radius: 0; }
.form-panel { background: var(--surface); padding: clamp(16px,2.4vw,32px); }
.preview-panel { display: flex; flex-direction: column; background: #f0e7dc; padding: clamp(16px,2.3vw,31px); }
.preview-scene::before { content: ""; pointer-events: none; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at center,#e4d2bb,transparent 75%); display: none; }
.preview-card { aspect-ratio: 957/1278; position: relative; overflow: hidden; border-radius: 12px; color: #f5dba0; background: radial-gradient(ellipse at 62% 23%,#bc5941,transparent 72%),linear-gradient(151deg,#a5372c,#801f23 68%); width: min(100%,290px); box-shadow: 0 13px 32px #643a282d; }
.preview-foot:has([hidden]) { margin-top: 0; }
.preview-foot .button { padding: 7px 11px; font-size: 13px; flex: none; min-height: 44px; }
.form-panel fieldset { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; margin-bottom: 14px; }
.prompt-field { margin-bottom: 13px; }
.field-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; color: var(--muted); font-size: 12px; gap: 8px; }
textarea { resize: vertical; min-height: 92px; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.reference { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.history-dialog { width: min(780px,calc(100% - 24px)); }
.history { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill,minmax(min(100%,145px),1fr)); }
.history-image { width: 100%; aspect-ratio: 1.3; object-fit: cover; object-position: center 32%; border-radius: 7px; background: #f0e2d4; display: grid; place-items: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.wallet-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.wallet-wechat { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.wallet-wechat h3 { margin: 0 0 6px; font-size: 14px; }
.wallet-wechat p { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.wallet-wechat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-entry-actions,.account-entry-guest { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.account-entry-actions .account-entry { min-height: 44px; padding-inline: 11px; white-space: nowrap; }
.account-dialog { width: min(420px,calc(100% - 24px)); }
.account-dialog .dialog-head h2 { font: 700 19px/1.3 var(--body); }
.account-form { display: grid; gap: 12px; }
.account-form .field-label { margin-bottom: 4px; }
.account-form input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; background: var(--paper); font-size: 16px; }
.account-form input[aria-invalid="true"] { border-color: var(--red); }
.account-dialog .account-hint { margin: 0; color: var(--muted); font-size: 13px; }
.account-dialog .account-address { margin: 0 0 14px; overflow-wrap: anywhere; font-weight: 650; }
.account-dialog .account-switch { justify-self: center; min-height: 44px; font-size: 13px; }
.account-options { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.account-options .text-button { min-height: 44px; font-size: 13px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 26px 0; }
@media (max-width:760px) {
  :root { --nav-h: 64px; }
  .topbar { display: flex; gap: 8px; }
  .topbar nav { display: none; }
  .top-actions .button { min-height: 44px; }
  .hero-inner { padding: clamp(32px,6vh,52px) 0 24px; gap: 25px; }
  .hero h1 { font-size: clamp(39px,10.5vw,68px); max-width: 9em; margin-inline: auto; text-wrap: balance; }
  .hero-lead { max-width: 23em; margin-inline: auto; }
  .hero__window { padding: 15px 11px; }
  .cover-grid { gap: 8px; padding: 15px 8px; }
  .cover-tile { flex: 1 1 26%; width: 0; height: auto; border-radius: 7px; }
  .cover-tile.featured { flex-basis: 35%; height: auto; }
  .cover-tile img { height: auto; aspect-ratio: 3/4; }
  .app-bar { padding: 9px 11px; }
  .studio .section-head { flex-direction: row; justify-content: space-between; gap: 8px; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .studio-bar { align-items: start; }
  .preview-panel { scroll-margin-top: 12px; }
  .preview-scene { padding-block: 12px; min-height: 290px; }
  .preview-card { width: min(100%,230px); }
  footer .wrap { gap: 8px 15px; }
}
@media (max-width:365px) {
  .hero h1 { font-size: 37px; }
  .hero-actions .button { padding-inline: 18px; }
  .studio h2 { font-size: 27px; }
  .studio .section-head .button { padding-inline: 8px; }
  .preview-head { margin-bottom: 6px; }
}
.hero__window { position: relative; isolation: isolate; display: grid; flex: 1; place-items: center; min-height: 0; border-radius: var(--radius); padding: clamp(17px,4vh,37px) clamp(16px,6.5vw,95px); background: #ead1c0; overflow: hidden; padding-block: clamp(13px,2vh,29px); }
.cover-tile { width: auto; aspect-ratio: 3/4; border: 0; background: #b66447; padding: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 12px #54271924; height: clamp(130px,24vh,264px); }
.cover-tile.featured { height: clamp(156px,30vh,315px); }
.studio { padding: 0; background: #efebe3; border-top: 0; }
#preview-source { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.preview-head h3 { font-size: 15px; margin: 0; flex: none; }
footer .wrap { justify-content: space-between; gap: 12px; flex-wrap: wrap; display: block; }
footer p { margin: 0; }
footer p + p { margin-top: 5px; }
footer strong { margin-right: 10px; color: var(--ink); }
@media (min-width:761px) and (max-height:840px) {
  .studio-inner { padding-block: 23px; }
  .studio .section-head { margin-bottom: 11px; }
  .form-panel,.preview-panel { padding-block: 15px; }
  .form-panel fieldset { margin-bottom: 8px; }
  .prompt-field { margin-bottom: 8px; }
  .field-label,.form-panel legend { margin-bottom: 5px; }
  textarea { min-height: 73px; }
  .form-actions { margin-top: 11px; }
}
@media (max-width:760px) {
  .hero-inner { gap: 22px; padding-top: clamp(30px,5.5vh,49px); }
  .cover-grid { display: grid; grid-template-columns: minmax(0,2.2fr) minmax(0,1fr); grid-template-rows: 1fr 1fr; padding: 12px; gap: 9px; }
  .cover-tile,.cover-tile.featured { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; }
  .cover-tile img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; }
  .cover-tile.featured { grid-area: 1/1/3/2; aspect-ratio: 3/4; }
  .cover-tile:first-child { grid-area: 1/2; }
  .cover-tile:last-child { grid-area: 2/2; }
}
html[data-motion] { --ease: cubic-bezier(.2,.8,.2,1); }
html { scroll-behavior: auto; scroll-padding-top: 0; }
header.nav { z-index: 8; top: 0; background: var(--paper); position: fixed; inset: 0 0 auto; }
.hero { display: block; padding: 0; min-height: 100svh; }
.hero-inner { min-height: inherit; display: flex; flex-direction: column; align-items: stretch; padding: clamp(30px,5.7vh,68px) 0 36px; gap: clamp(19px,3.3vh,36px); padding-top: calc(var(--nav-h) + clamp(28px,4.7vh,54px)); }
.hero-inner .hero-text { display: flex; flex: 1; flex-direction: column; gap: inherit; min-width: 0; }
.hero-inner .cover-grid { align-items: stretch; }
.hero-inner .cover-tile,.hero-inner .cover-tile.featured { height: clamp(147px,min(29vh,24vw),300px); }
.hero h1 { font-family: var(--body); font-size: clamp(47px,5.25vw,76px); font-weight: 800; line-height: 1.14; letter-spacing: -.048em; margin: 0 0 14px; text-wrap: balance; }
.button,.button .arrow,.button #generate-label { font-size: 14px; }
.studio-inner { padding: clamp(34px,5.5vh,62px) 0 42px; padding-block: clamp(28px,4.2vh,48px); min-height: 100svh; padding-top: calc(var(--nav-h) + 14px); padding-bottom: 16px; }
.studio .panel { padding-block: 22px; }
.studio .section-head { align-items: center; margin-bottom: 11px; }
.studio-notes { border: 0; padding: 8px 0 0; display: flex; gap: 6px 16px; justify-content: space-between; flex-wrap: wrap; }
.studio-notes p { margin: 0; }
main :is(button,a,input,textarea):focus-visible { scroll-margin-top: calc(var(--nav-h) + 16px); }
#preview { scroll-margin-top: calc(var(--nav-h) + 12px); }
@media (min-width:1024px) {
  .wrap { width: min(1240px,calc(100% - 128px)); }
}
@media (min-width:761px) and (max-height:880px) {
  .hero-inner { gap: 20px; padding-bottom: 22px; }
  .studio-inner { padding-bottom: 8px; }
  .studio .panel { padding-block: 11px; }
  .form-panel fieldset,.prompt-field { margin-bottom: 8px; }
  .form-actions { margin-top: 10px; }
  .preview-card { width: min(100%,245px); }
}
@media (max-width:760px) {
  .hero-inner { padding-top: calc(var(--nav-h) + clamp(35px,5.5vh,49px)); gap: 30px; }
  .hero h1 { font-size: clamp(28px,8vw,57px); max-width: none; overflow-wrap: anywhere; text-wrap: wrap; }
  .hero-inner .cover-tile,.hero-inner .cover-tile.featured { height: 100%; }
  .top-actions .button { font-size: 12px; }
  .studio-inner { padding-top: calc(var(--nav-h) + 17px); }
  .studio-notes { font-size: 12px; }
}
.guide-entry { white-space: nowrap; color: var(--deep); padding-inline: 5px; }
.guide-dialog { width: min(680px,calc(100% - 24px)); }
.guide-dialog .dialog-head h2 { font-size: clamp(19px,4vw,25px); }
.guide-body { font-size: 15px; }
.guide-body section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.guide-body h3 { font-size: 18px; margin: 0 0 9px; }
.guide-body ol,.guide-body ul { margin: 0 0 12px; padding-inline-start: 1.55em; }
.guide-body li + li { margin-top: 7px; }
.guide-shots { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; max-width: 520px; margin: 18px auto; }
.guide-shot h4 { margin: 0 0 7px; font-size: 14px; }
.guide-shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width:520px) {
  .guide-shots { grid-template-columns: minmax(0,1fr); max-width: 300px; }
}
.guide-body .guide-sources { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; }
.guide-sources a { display: inline-flex; min-height: 44px; align-items: center; color: var(--deep); text-decoration: underline; text-underline-offset: 4px; }
.preview-foot { display: flex; align-items: center; margin-top: 12px; justify-content: center; gap: 12px; flex-wrap: wrap; }
.preview-foot:has(#download-result[hidden]) [data-open="guide"] { display: none; }
@media (max-width:420px) {
  .guide-entry { font-size: 12px; padding-inline: 3px; }
  .top-actions .button { padding-inline: 7px; white-space: nowrap; }
}
.preview-modes { justify-content: center; margin-top: 5px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
.preview-modes button { background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 6px 9px; min-height: 34px; font-size: 12px; color: #594e44; padding-inline: 3px; white-space: nowrap; }
.envelope-simulator { width: min(100%,304px); margin: 12px auto 0; color: #352720; }
.sim-header { display: flex; justify-content: space-between; gap: 6px; align-items: center; min-height: 36px; padding: 4px 5px 8px; font-size: 12px; }
.sim-header span { color: #6e5243; }
.preview-phone { position: relative; isolation: isolate; aspect-ratio: 454 / 926; filter: drop-shadow(0 14px 15px #3f2a2533); }
.phone-bezel { position: absolute; z-index: 4; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.sim-viewport { position: absolute; left: 4.85%; top: 1.94%; width: 90.31%; height: 96.11%; display: grid; place-items: center; container-type: inline-size; overflow: hidden; border-radius: 16.1% / 7.4%; background: #f4eee6; }
.sim-status { position: absolute; z-index: 3; inset: 2.05% 12.5% auto; display: flex; justify-content: space-between; align-items: center; color: #28221e; font-size: 4cqw; font-weight: 650; line-height: 1; pointer-events: none; }
.sim-battery { position: relative; width: 5.7cqw; height: 2.8cqw; border: 1px solid currentColor; border-radius: 2px; }
.sim-battery::before { content: ""; position: absolute; inset: 1px; border-radius: 1px; background: currentColor; }
.sim-battery::after { content: ""; position: absolute; left: calc(100% + 2px); top: 20%; bottom: 20%; width: 1px; background: currentColor; }
.phone-home { position: absolute; z-index: 3; left: 50%; bottom: 1.15%; translate: -50% 0; width: 33%; height: 3px; border-radius: 4px; background: #28221e; opacity: .82; pointer-events: none; }
.sim-viewport .preview-card { width: min(88%,240px); }
.sim-viewport section { --u: calc(100cqw / 1125); position: absolute; inset: 0; }
.sim-note { padding: 10px 0 1px; margin: 0; font-size: 11px; color: #6e5243; text-align: center; }
.sim-note a { color: inherit; text-underline-offset: 3px; }
.sim-chat { background: #eee9e0; }
.sim-chat-heading { position: absolute; top: calc(153 * var(--u)); width: 100%; text-align: center; font-size: 13px; font-weight: 650; }
.sim-message { position: absolute; top: calc(331 * var(--u)); left: calc(33 * var(--u)); display: flex; align-items: start; gap: calc(49 * var(--u)); }
.sim-avatar { display: inline-grid; flex: none; place-items: center; width: calc(113 * var(--u)); height: calc(113 * var(--u)); border-radius: 7px; background: #f4dbab; color: #642d25; font-weight: 750; font-size: 12px; }
.sim-bubble::before { content: ""; position: absolute; right: 100%; top: calc(39 * var(--u)); border-width: calc(21 * var(--u)) calc(16 * var(--u)) calc(21 * var(--u)) 0; border-style: solid; border-color: transparent #803126 transparent transparent; }
.sim-bubble img,.sim-packet > img,.sim-detail-cover img { position: absolute; inset: 0; width: 100%; object-fit: cover; object-position: top center; }
.sim-bubble img { height: 100%; border-radius: inherit; z-index: -2; }
.sim-bubble::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: linear-gradient(90deg,#641e18df,#641e1649); }
.sim-bubble { position: relative; isolation: isolate; align-items: center; width: calc(720 * var(--u)); height: calc(264 * var(--u)); border: 0; border-radius: 4px 11px 11px 11px; color: #fff8e9; text-align: left; display: grid; grid-template-rows: 1fr auto; gap: 2px; padding: 0; background: #883e2d; }
.sim-bubble-body { display: flex; align-items: center; gap: calc(28 * var(--u)); padding: 5px calc(32 * var(--u)); min-width: 0; }
.sim-bubble-icon { position: relative; display: grid; place-items: center; flex: none; width: calc(88 * var(--u)); aspect-ratio: 4/5; overflow: hidden; border-radius: 4px; background: #a63a27; border: 1px solid #ffd28d99; color: #ffda89; font-size: clamp(8px,4cqw,12px); }
.sim-bubble-icon::before { content: ""; position: absolute; inset: 0 -12% auto; height: 49%; border-bottom: 1px solid #ffd28d95; border-radius: 50%; }
.sim-bubble-body strong { min-width: 0; font-size: clamp(9px,4.55cqw,13px); text-wrap: balance; }
.sim-bubble-footer { display: flex; justify-content: space-between; border-top: 1px solid #ffecce70; padding: 2px calc(32 * var(--u)); color: #fff0db; font-size: clamp(8px,3.65cqw,10px); line-height: 1.45; }
.sim-chat-order { position: absolute; inset-inline: 10px; bottom: calc(10px + 3cqw); display: flex; justify-content: center; gap: 7px; }
.sim-chat-order button { padding: 4px 8px; min-height: 36px; border: 1px solid transparent; border-radius: 6px; background: none; color: #653a2d; font-size: 11px; }
.sim-chat-order button[aria-pressed="true"] { border-color: #cbb6a4; background: #faf2e7; }
.sim-message.is-outgoing { left: auto; right: calc(33 * var(--u)); flex-direction: row-reverse; }
.sim-message.is-outgoing .sim-bubble { border-radius: 11px 4px 11px 11px; }
.sim-message.is-outgoing .sim-bubble::before { right: auto; left: 100%; transform: scaleX(-1); }
.sim-unopened { background: #ddd1c4; }
.sim-packet { position: absolute; isolation: isolate; top: calc(375 * var(--u)); left: calc(84 * var(--u)); width: calc(957 * var(--u)); height: calc(1584 * var(--u)); border-radius: 9px; overflow: hidden; text-align: center; color: #fff0d6; background: #a23e30; }
.sim-packet > img { height: calc(1278 * var(--u)); z-index: -2; clip-path: polygon(0 0,100% 0,100% 91%,98% 92.3%,88% 95.5%,73% 98.4%,60% 99.8%,50% 100%,40% 99.8%,27% 98.5%,12% 95.5%,2% 92.3%,0 91%); }
.sim-packet::after { content: ""; position: absolute; inset: 0 0 auto; height: 55%; z-index: -1; background: linear-gradient(#422018ab,transparent); }
.sim-packet-copy { position: absolute; top: calc(251 * var(--u)); inset-inline: 5px; }
.sim-packet-copy strong,.sim-sender { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: clamp(10px,4.55cqw,13px); }
.sim-packet-copy .sim-avatar,.sim-sender .sim-avatar { width: calc(69 * var(--u)); height: calc(69 * var(--u)); border-radius: 5px; }
.sim-packet-copy p { margin: calc(27 * var(--u)) 0 0; font-size: clamp(12px,5.9cqw,17px); text-shadow: 0 1px 4px #3b150c; }
.sim-open-button { position: absolute; left: 50%; top: calc(1245 * var(--u)); translate: -50% -50%; width: calc(305 * var(--u)); height: calc(305 * var(--u)); border: 2px solid #f8d891; border-radius: 50%; background: #eec27a; color: #682b20; font: 800 clamp(19px,9cqw,25px)/1 var(--body); box-shadow: inset 0 0 0 3px #bc844551,0 3px 9px #56211770; }
.sim-open-button:hover { background: #f8dc9b; }
.sim-opened { background: #fffaf1; text-align: center; }
.sim-detail-cover { position: absolute; inset: 0 0 auto; height: calc(1122 * var(--u)); overflow: hidden; clip-path: polygon(0 0,100% 0,100% 87%,98% 89.5%,88% 94%,73% 98%,60% 99.6%,50% 100%,40% 99.6%,27% 98%,12% 94%,2% 89.5%,0 87%); background: #a84734; }
.sim-detail-cover img { height: calc(1502 * var(--u)); }
.sim-detail { position: absolute; top: calc(1222 * var(--u)); inset-inline: 4px; padding: 0 6px; }
.sim-detail p { margin: calc(26 * var(--u)) 0 0; font-size: 12px; color: #755b4c; }
.sim-amount { margin-top: calc(35 * var(--u)); color: #8a531d; font-size: clamp(26px,14cqw,39px); line-height: 1.13; font-weight: 650; font-variant-numeric: tabular-nums; }
.sim-amount span { font-size: 12px; }
.sim-detail .sim-example { font-size: 11px; margin-top: 4px; }
.sim-back { border: 0; min-height: 44px; padding: 4px 10px; color: #6f3827; background: none; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.sim-unopened > .sim-back { position: absolute; left: 50%; top: calc(2016 * var(--u)); translate: -50% 0; white-space: nowrap; }
.sim-flight { position: absolute; z-index: 2; overflow: hidden; pointer-events: none; background: #a84734; }
.sim-viewport.is-fading { transition: opacity 270ms ease !important; }
.sim-open-button.is-pressing { transition: transform 160ms ease !important; transform: scale(.78); }
.sim-open-button.is-turning { transition: transform 230ms ease-out !important; transform: perspective(320px) rotateY(-42deg) scale(1.08); }
.sim-flight.is-unfolding { transition: top 680ms cubic-bezier(.22,.72,.24,1), left 680ms cubic-bezier(.22,.72,.24,1), width 680ms cubic-bezier(.22,.72,.24,1), height 680ms cubic-bezier(.22,.72,.24,1), clip-path 680ms cubic-bezier(.22,.72,.24,1) !important; }
.sim-detail.is-arriving { opacity: 0; transform: translateY(14px); }
.sim-detail.is-arriving.is-visible { opacity: 1; transform: translateY(0); transition: opacity 260ms ease, transform 260ms ease !important; }
.sim-flight img { display: block; width: 100%; height: auto; }
.sim-detail-cover.is-in-flight { visibility: hidden; }
/*
  taste-skill motion.css - the micro-interactions a company site has (figma.com, x.ai): one small
  opt-in layer over system.css and ui/cards.css. Link it after them (data-motion on <html> is optional);
  load motion.js once (it adds the tab indicator, the number tick and the card loops).
  The layer is ON as soon as this file is linked: no attribute is needed (a hover shot of a linked card or photo
  shows the 2px lift and the 1.03 zoom). <html data-motion="off"> switches the whole layer off; data-motion="live"
  is the number tick in a headless shot (motion.js).
  references/motion.md says what moves and how fast. Everything here answers the pointer, the
  keyboard or a number coming into view once, plus the hero's one entrance on load (the end of this
  file); nothing moves because the page scrolled (that is a dealt moment's job, assets/moments).

  Hover moves sit under (hover: hover) and (pointer: fine): a phone never keeps a stuck hover.
  Hover out runs 120ms against 150ms in (motion.md, tokens).
  Under prefers-reduced-motion colours still change and a press still shows; nothing moves or scales.
*/
/* ---------------------------------------------------------------- buttons */
/* the tone moves toward the ground: a black button greys a little on white, a white one on black */
/* the step: a button rises 1px on hover (2px on the large size) and presses 1px down with a 1.5% shrink on
   click; pointer only. The text-link secondary (arrow and block looks) keeps its underline and does not step.
   Reduced motion keeps the colour change only (see the end of this file). */
/* the arrow: the text arrow (.btn--arrow, .link) nudges 3px; the drawn arrow (.m-arrow) grows its
   stem and moves its head 3px, the way a good product site's "Learn more" does. The pointer's move
   only for a fine pointer; keyboard focus shows it anywhere */
/* a pill that is a link (the line above a hero headline) */
/* ---------------------------------------------------------------- links: an underline that draws *//* .link and links in running text: a rest line, and the ink line draws left to right on hover and
   leaves to the right. A link in a sentence rests on its own colour at 45% (about 3.3:1 on its
   ground), so it reads as a link even when it is the same colour as the text (WCAG 1.4.1); .link
   and .m-link carry an arrow or sit alone and rest on the faint hairline */
/* set on its own rule: the shared rule above is (0,3,1) through :is(.footer .link) and would win */
/* the link's arrow is not underlined: the line runs under the words only */
/* ---------------------------------------------------------------- navigation *//* the nav words take no pill (ST-08, ST-11): system.css draws the underline under a word from the left on hover and focus, and
   takes it away to the right; the page you are on keeps its still bar (system.css draws it, at the same inset) */
/* the phone sheet slides in 8px and fades (system.js opens it) */
/* ---------------------------------------------------------------- tabs: the indicator slides */
/* the pill takes its new size at once and travels by transform alone (motion.js: it starts scaled to
   the old tab's size at the old place and settles to scale 1 at the new one), so nothing is laid out
   again while it moves and its corners are true at rest */
/* ---------------------------------------------------------------- focus *//* the ring (system.css) is drawn in full in the frame the focus lands; no transition *//* ---------------------------------------------------------------- cards: a 2px lift *//* the card rises 2px, its border and shadow deepen; a card without its own box (.card--open) lifts
   its panel. Never tilts, flips or follows the pointer */
/* ---------------------------------------------------------------- photographs: 1.03 inside the mask *//* a photograph in a link or a linked card grows 3% inside its own mask (the frame, the tile, a .m-zoom wrapper);
   the mask clips it, so the box never moves. .m-zoom is the hook for any other photograph: wrap it. */
/* ---------------------------------------------------------------- inputs, switches, checks */
/* a switch: <button class="m-switch" role="switch" aria-checked="false" aria-label="..."></button>
   (motion.js flips aria-checked on click unless the page handles it). The knob slides in 180ms and
   stretches 4px while pressed, both by transform (a scaleX from its left edge; on, the 12px shift
   keeps its right edge where it rests). The off track is ink at 48% (3.3:1 or more against the knob
   and the ground, the 3:1 a control needs) */
/* a check box: <input type="checkbox" class="m-check">, the tick fades in as it grows from 70% to full size, 160ms */
/* ---------------------------------------------------------------- FAQ
   Every answer stays open (ST-47, system.css): nothing here opens, closes or animates its height. *//* ---------------------------------------------------------------- numbers that tick once */
/* ---------------------------------------------------------------- loops inside a card's panel *//* a CSS loop the page writes inside [data-m-loop] runs one cycle in --m-cycle (2.5-4 s) and repeats
   while on screen; motion.js pauses it off screen and restarts it on hover (motion.md) */
/* the pause button (a 32px disc 12px in from the bottom-right corner) gets a clear band: content in
   the flow ends --m-safe (48px) above the bottom edge, and a fading stage dissolves above that band,
   never under the button. Size the panel so the loop's subject sits above the fade */
/* on a phone (as ui.js does) and under reduced motion a loop holds its finished picture: the frame at
   --m-still (0-1) of the cycle, set on the loop where the picture is complete */
/* ---------------------------------------------------------------- the hero's entrance *//* Once on load the hero enters (motion.js enter(), motion.md): the h1 line by line out of word masks,
   then its lead, each button and its facts 60ms apart, the picture settling; about 1.1 s.
   Markup: data-enter on the hero <section> and the one head line that sets html.m-enter before the
   first paint (with its 700ms safety mark, m-enter-done). Only the words wait, and only in that window
   until motion.js takes over (.is-entering): no script, reduced motion, print and data-motion="off"
   show the hero as written; a script later than the mark finds the words fading in here.
   The pictures (a photograph, a window, the collage) are never hidden, so nothing blinks or flashes
   the hero's ground: a photograph waits at 1.05 and a window or collage at .98, by the scale property
   (it composes with any transform of their own), and they settle by transition as soon as the
   entrance starts or the mark passes. */
/* while it runs: each word of the h1 in its own mask (the masks go when the h1 gets its own nodes back) */
/* ---------------------------------------------------------------- reduced motion */

/* ===== 2. motion.css ===== */
:root { --m-in: 150ms; /* hover in: buttons, links, nav, tabs */ --m-out: 120ms; /* hover out */
  --m-press: 90ms; /* a press */
  --m-panel: 200ms; /* a menu or sheet opening */
  --m-close: 120ms; /* a menu closing */
  --m-slide: 240ms; /* an indicator travelling between two tabs or links */
  --m-image: 600ms; /* a photograph scaling inside its mask */
  --m-image-out: 400ms; /* ...and settling back */
  --m-ease: var(--ease, cubic-bezier(.2, .8, .2, 1)); /* the one ui ease-out (system.css --ease): fast start, soft landing */ --m-ease-io: cubic-bezier(.65, 0, .35, 1); /* the indicator: leaves and lands softly */ --m-ease-enter: cubic-bezier(.22, 1, .36, 1); /* an entrance settling: long soft tail, never past its mark */ --m-cycle: 3.2s; /* one cycle of a card's loop (2.5-4 s) */
  --m-lift: -2px; }
html:not([data-motion="off"]) .btn { position: relative; transition: background-color var(--m-out) var(--m-ease), color var(--m-out) var(--m-ease), border-color var(--m-out) var(--m-ease), box-shadow var(--m-out) var(--m-ease), transform var(--m-press) var(--m-ease); }
html:not([data-motion="off"]) .btn--primary:hover { background: color-mix(in oklab, var(--action) 84%, var(--bg)); }
html:not([data-motion="off"]) .btn--secondary:hover { background: color-mix(in oklab, var(--bg) 92%, var(--ink)); border-color: color-mix(in oklab, var(--ink) 32%, transparent); }
html:not([data-motion="off"]) .btn:hover { transition-duration: var(--m-in), var(--m-in), var(--m-in), var(--m-in), var(--m-press); }
html:not([data-motion="off"]) .btn:active { transform: translateY(1px) scale(.985); }
@media (hover: hover) and (pointer: fine) {
  html:not([data-motion="off"]) .btn:hover { transform: translateY(-1px); }
  html:not([data-motion="off"]) .btn--xl:hover { transform: translateY(-2px); }
  html:not([data-motion="off"]):is([data-buttons="arrow"], [data-buttons="block"]) .btn--secondary:hover { transform: none; }
  html:not([data-motion="off"]) .btn:active { transform: translateY(1px) scale(.985); }
  html:not([data-motion="off"]):is([data-buttons="arrow"], [data-buttons="block"]) .btn--secondary:active { transform: scale(.985); }
}
html:not([data-motion="off"]) :is(.btn--arrow, .link)::after { transition: transform var(--m-out) var(--m-ease); }
html:not([data-motion="off"]) :is(.btn--arrow, .link):focus-visible::after { transform: translateX(3px); transition-duration: var(--m-in); }
.m-arrow { width: 12px; height: 12px; flex: none; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.m-arrow__stem { opacity: 0; transform: scaleX(.2); transform-origin: 1px 50%; transform-box: fill-box; transition: opacity var(--m-out) var(--m-ease), transform var(--m-out) var(--m-ease); }
.m-arrow__head { transition: transform var(--m-out) var(--m-ease); }
:is(a, button):focus-visible > .m-arrow .m-arrow__stem { opacity: 1; transform: none; transition-duration: var(--m-in); }
:is(a, button):focus-visible > .m-arrow .m-arrow__head { transform: translateX(3px); transition-duration: var(--m-in); }
@media (hover: hover) and (pointer: fine) {
  html:not([data-motion="off"]) :is(.btn--arrow, .link):hover::after { transform: translateX(3px); transition-duration: var(--m-in); }
  :is(a, button):hover > .m-arrow .m-arrow__stem { opacity: 1; transform: none; transition-duration: var(--m-in); }
  :is(a, button):hover > .m-arrow .m-arrow__head { transform: translateX(3px); transition-duration: var(--m-in); }
}
html:not([data-motion="off"]) a.pill { transition: background-color var(--m-out) var(--m-ease), border-color var(--m-out) var(--m-ease); }
html:not([data-motion="off"]) a.pill:hover { background: color-mix(in oklab, var(--card) 90%, var(--ink)); border-color: var(--line-strong); transition-duration: var(--m-in); }
html:not([data-motion="off"]) :is(.link, .m-link, p a:not([class]), .footer ul a, .footer .link) { text-decoration: none; background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--m-rest, var(--line-strong)), var(--m-rest, var(--line-strong))); background-repeat: no-repeat; background-size: 0% 1px, 100% 1px; background-position: right 0 bottom 0, 0 100%; transition: background-size var(--m-out) var(--m-ease), color var(--m-out) var(--m-ease); padding-bottom: 2px; }
html:not([data-motion="off"]) p a:not([class]) { --m-rest: color-mix(in oklab, currentColor 45%, transparent); }
html:not([data-motion="off"]) :is(.footer ul a, .m-link--bare):not(:hover, :focus-visible) { background-size: 0% 1px, 0% 1px; }
html:not([data-motion="off"]) :is(.link, .m-link, p a:not([class]), .footer ul a, .footer .link):is(:hover, :focus-visible) { background-size: 100% 1px, 100% 1px; background-position: left 0 bottom 0, 0 100%; transition-duration: var(--m-in); }
html:not([data-motion="off"]) .link { background-size: 0% 1px, calc(100% - 1em - var(--s-2)) 1px; }
html:not([data-motion="off"]) .link:is(:hover, :focus-visible) { background-size: calc(100% - 1em - var(--s-2)) 1px, calc(100% - 1em - var(--s-2)) 1px; }
html:not([data-motion="off"]) .link, html:not([data-motion="off"]) .link:is(:hover, :focus-visible) { background-position: 0 100%, 0 100%; }
html:not([data-motion="off"]) .footer ul a:hover { color: var(--ink); }
@media (min-width: 1024px) {
  html:not([data-motion="off"]) .nav__menu { transform: translateY(-6px); transition: opacity var(--m-close) var(--m-ease), transform var(--m-close) var(--m-ease), visibility 0s linear var(--m-close); }
  html:not([data-motion="off"]) .nav__item:is(:hover, :focus-within) > .nav__menu { transition: opacity var(--m-panel) var(--m-ease) 150ms, transform var(--m-panel) var(--m-ease) 150ms, visibility 0s linear 150ms; }
  html:not([data-motion="off"]) .nav.m-menu-open .nav__menu, html:not([data-motion="off"]) .nav.m-menu-open .nav__item:is(:hover, :focus-within) > .nav__menu { transition-duration: 0s; transition-delay: 0s; }
  html:not([data-motion="off"]) .menu-col a { transition: color var(--m-out) var(--m-ease); }
  html:not([data-motion="off"]) .menu-col a:hover { transition-duration: var(--m-in); }
  html:not([data-motion="off"]) .menu-card .panel { transition: border-color var(--m-out) var(--m-ease); }
}
@media (max-width: 1023px) {
  html:not([data-motion="off"]) .nav.is-open .nav__links { transition: opacity var(--m-panel) var(--m-ease), transform var(--m-panel) var(--m-ease); }
  @starting-style { html:not([data-motion="off"]) .nav.is-open .nav__links { opacity: 0; transform: translateY(-8px); } }
}
html:not([data-motion="off"]) .tabs.m-has-ind { position: relative; isolation: isolate; }
html:not([data-motion="off"]) .tabs.m-has-ind .tab { position: relative; z-index: 1; }
html:not([data-motion="off"]) .tabs.m-has-ind .tab[aria-selected="true"] { background: transparent; border-color: transparent; }
.m-tab-ind { position: absolute; left: 0; top: 0; z-index: 0; width: var(--w, 0px); height: var(--h, 0px); border-radius: var(--r-btn); background: var(--ink); pointer-events: none; transform: translate(var(--x, 0px), var(--y, 0px)) scale(var(--sx, 1), var(--sy, 1)); transform-origin: 0 0; transition: transform var(--m-slide) var(--m-ease-io); }
.m-tab-ind.is-jump { transition: none; }
html:not([data-motion="off"]) .tab { transition: color var(--m-slide) var(--m-ease), border-color var(--m-out) var(--m-ease), background-color var(--m-out) var(--m-ease); }
html:not([data-motion="off"]) .card:not(.card--open, .card--plan) { transition: transform var(--m-out) var(--m-ease), border-color var(--m-out) var(--m-ease), box-shadow var(--m-out) var(--m-ease); }
html:not([data-motion="off"]) .card--open > .panel { transition: transform var(--m-out) var(--m-ease), box-shadow var(--m-out) var(--m-ease); }
@media (hover: hover) and (pointer: fine) {
  html:not([data-motion="off"]) .card:not(.card--open, .card--plan, .m-nolift):hover { transform: translateY(var(--m-lift)); border-color: color-mix(in oklab, var(--ink) 16%, transparent); /* the shadow is deeper on a dark card (its lightness l): about .2 on white, .64 on near-black */ box-shadow: inset 0 1px 0 var(--c-hi, transparent), 0 1px 2px rgb(0 0 0 / .06), 0 14px 32px -18px oklch(from var(--card, #fff) 0 0 0 / calc(0.75 - l * 0.55)); transition-duration: 180ms; }
  html:not([data-motion="off"]) .card--open:not(.m-nolift):hover > .panel { transform: translateY(var(--m-lift)); box-shadow: 0 14px 32px -18px oklch(from var(--bg, #fff) 0 0 0 / calc(0.75 - l * 0.55)); transition-duration: 180ms; }
}
.m-zoom { overflow: clip; }
html:not([data-motion="off"]) :is(.frame__img, .tile__media > img, .m-zoom img, .m-zoom > video) { transition: transform var(--m-image-out) var(--m-ease); }
@media (hover: hover) and (pointer: fine) {
  html:not([data-motion="off"]) :is(a, .card:has(a), .m-zoom):hover :is(.frame__img, .tile__media > img), html:not([data-motion="off"]) .m-zoom:hover :is(img, video) { transform: scale(1.03); transition-duration: var(--m-image); }
}
html:not([data-motion="off"]) .field :is(input, select, textarea), .m-input { transition: border-color var(--m-out) var(--m-ease), box-shadow var(--m-out) var(--m-ease), background-color var(--m-out) var(--m-ease); }
html:not([data-motion="off"]) .field :is(input, select, textarea):hover, .m-input:hover { border-color: color-mix(in oklab, var(--ink) 48%, transparent); }
html:not([data-motion="off"]) .field :is(input, select, textarea):focus, .m-input:focus { /* the field's own ring in place of the outline: a 2px line in --action (3:1 on the ground) and a soft halo, there at once like every focus ring (the hover's fade does not apply to focus) */ outline: none; border-color: var(--action); box-shadow: 0 0 0 1px var(--action), 0 0 0 4px color-mix(in oklab, var(--action) 20%, transparent); transition-duration: 0s; }
.m-switch { position: relative; flex: none; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; background: color-mix(in oklab, var(--ink) 48%, var(--bg)); transition: background-color 180ms var(--m-ease); }
.m-switch::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 999px; background: var(--bg); box-shadow: 0 1px 3px rgb(0 0 0 / .25); transform-origin: 0 50%; transition: transform 180ms var(--m-ease); }
.m-switch[aria-checked="true"] { background: var(--action); }
.m-switch[aria-checked="true"]::before { transform: translateX(16px); background: var(--action-ink); }
.m-switch:active::before { transform: scaleX(1.22); transition-duration: var(--m-press); }
.m-switch[aria-checked="true"]:active::before { transform: translateX(12px) scaleX(1.22); }
.m-switch:hover:not([aria-checked="true"]) { background: color-mix(in oklab, var(--ink) 58%, var(--bg)); }
.m-check { appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 20px; height: 20px; border-radius: 6px; cursor: pointer; border: 1px solid color-mix(in oklab, var(--ink) 48%, var(--bg)); background: var(--bg) no-repeat center / 14px 14px; display: inline-grid; place-items: center; transition: background-color var(--m-in) var(--m-ease), border-color var(--m-in) var(--m-ease); }
.m-check::before { content: ""; width: 10px; height: 6px; margin-top: -2px; border: solid var(--action-ink); border-width: 0 0 2px 2px; opacity: 0; transform: rotate(-45deg) scale(.7); transform-origin: 50% 50%; transition: transform 160ms var(--m-ease), opacity 100ms var(--m-ease); }
.m-check:hover:not(:checked) { border-color: color-mix(in oklab, var(--ink) 64%, var(--bg)); }
.m-check:checked { background-color: var(--action); border-color: var(--action); }
.m-check:checked::before { opacity: 1; transform: rotate(-45deg) scale(1); }
[data-m-count] { font-variant-numeric: tabular-nums; }
[data-m-loop] { --m-cycle: 3.2s; --m-still: 0.6; --m-safe: 48px; }
[data-m-loop]:not(:has(> .stage)) { padding-bottom: var(--m-safe); }
[data-m-loop] > .stage:is(.stage--fade-b, .stage--fade-br) { bottom: var(--m-safe); }
@media (max-width: 639px) {
  [data-m-loop] * { animation-duration: var(--m-cycle) !important; animation-delay: calc(-1 * var(--m-still) * var(--m-cycle)) !important; animation-play-state: paused !important; }
}
[data-m-loop].is-m-off *, [data-m-loop].is-m-paused * { animation-play-state: paused !important; }
@media screen and (prefers-reduced-motion: no-preference) {
  html.m-enter:not(.m-enter-done, [data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entering, .is-entered) :is(h1, h1 ~ *, :has(> h1) ~ *, :has(~ h1)):not([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage, :has([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage)) { opacity: 0; }
  html.m-enter.m-enter-done:not([data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entering, .is-entered) :is(h1, h1 ~ *, :has(> h1) ~ *, :has(~ h1)) { transition: opacity 400ms var(--m-ease); }
  html.m-enter:not([data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-still) :is(:is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):is(img, picture, video), :is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage) > :is(img, picture, video, .frame__img)) { transition: scale 1100ms var(--m-ease-enter), clip-path 1100ms var(--m-ease-enter); }
  .hero[data-enter] :is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):is(img, picture, video) { clip-path: inset(0); }
  html.m-enter:not([data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-still) :is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):not(img, picture, video, :has(> :is(img, picture, video, .frame__img))) { transition: scale 900ms var(--m-ease-enter); }
  html.m-enter:not(.m-enter-done, [data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entering, .is-entered) :is(:is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):is(img, picture, video), :is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage) > :is(img, picture, video, .frame__img)) { scale: 1.05; }
  html.m-enter:not(.m-enter-done, [data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entering, .is-entered) :is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):is(img, picture, video) { clip-path: inset(2.381%); }
  html.m-enter:not(.m-enter-done, [data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entering, .is-entered) :is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):not(img, picture, video, :has(> :is(img, picture, video, .frame__img))) { scale: .98; }
  html.m-enter:not([data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entered) { overflow: clip; }
}
.hero[data-enter] .m-w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.hero[data-enter] .m-w__in { display: inline-block; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="off"]) .card:hover, html:not([data-motion="off"]) .card--open:hover > .panel, html:not([data-motion="off"]) :is(a, .card:has(a), .m-zoom):hover :is(.frame__img, .tile__media > img, img, video), html:not([data-motion="off"]) .btn:is(:hover, :active), html:not([data-motion="off"]) :is(.btn--arrow, .link):hover::after, :is(a, button):hover > .m-arrow :is(.m-arrow__head, .m-arrow__stem) { transform: none !important; }
  .m-arrow__stem { opacity: 1; transform: none; }
  html:not([data-motion="off"]) .nav__menu { transform: none !important; }
  .m-tab-ind { transition: none; }
  .m-switch::before { transition-property: background-color; }
  .m-switch:active::before { transform: none; }
  .m-switch[aria-checked="true"]::before, .m-switch[aria-checked="true"]:active::before { transform: translateX(16px); }
  .m-check::before { transform: rotate(-45deg) scale(1); transition-property: opacity; }
  html:not([data-motion="off"]) :is(.link, .m-link, p a:not([class]), .footer ul a, .footer .link) { transition-property: color, opacity, background-color, border-color; }
  html:not([data-motion="off"]) .btn--primary:active { background: color-mix(in oklab, var(--action) 74%, var(--bg)); }
  html:not([data-motion="off"]) .btn--secondary:active { background: color-mix(in oklab, var(--bg) 86%, var(--ink)); }
  [data-m-loop] * { animation-duration: var(--m-cycle) !important; animation-iteration-count: infinite !important; animation-delay: calc(-1 * var(--m-still) * var(--m-cycle)) !important; animation-play-state: paused !important; }
}

/* ===== 3. base layout and studio ===== */
:root { --paper: #f8f5f0; --surface: #fffdf9; --ink: #25211e; --muted: #6f645c; --line: #e7ded4; --red: #9c2829; --deep: #771b21; --pale: #f6e8e3; --radius: 16px; --nav-h: 62px; }
.wrap { width: min(1200px,calc(100% - clamp(32px,8vw,112px))); }
.topbar { gap: 20px; }
.brand { font-size: 16px; letter-spacing: .02em; gap: 8px; }
.topbar nav { gap: 19px; font-size: 13px; }
.top-actions { gap: 8px; font-size: 13px; }
.top-actions .button { padding-inline: 11px; font-size: 13px; }
.guide-entry { color: var(--muted); }
.button { font-weight: 620; }
.studio { min-height: 0; background: var(--paper); }
.studio-inner { min-height: 0; padding-top: calc(var(--nav-h) + clamp(35px,6vw,68px)); padding-bottom: clamp(20px,3vw,32px); }
.studio-intro { margin-bottom: 23px; }
.studio-intro h1 { margin: 0 0 7px; font: 750 clamp(28px,3.8vw,42px)/1.24 var(--body); letter-spacing: -.025em; }
.studio-intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.workspace { grid-template-columns: minmax(0,1.13fr) minmax(0,1fr); align-items: stretch; box-shadow: 0 8px 24px #54322208; }
.studio .form-panel,.studio .preview-panel { padding: clamp(16px,2.4vw,28px); }
.studio .form-panel { display: flex; flex-direction: column; }
.form-panel #prompt { min-height: 146px; margin-bottom: 1px; font-size: 15px; line-height: 1.65; background: #fbf8f3; }
.prompt-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.prompt-heading .field-label { margin: 0; }
.prompt-heading .field-bottom { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.form-panel .prompt-field { margin-bottom: 0; }
.form-panel .form-actions { margin-top: 20px; gap: 14px; }
.form-panel .form-actions .primary { flex: 0 1 auto; min-width: 150px; min-height: 44px; }
.form-panel .form-actions .text-button { min-height: 44px; color: var(--muted); font-size: 13px; }
.form-panel .form-actions .text-button:hover { color: var(--deep); }
.creation-options { margin-top: 16px; padding-top: 3px; }
.creation-options summary { width: fit-content; min-height: 44px; line-height: 44px; color: var(--muted); font-size: 13px; }
.creation-options-body { padding-top: 7px; }
.creation-options-body .reference { margin-top: 12px; }
.studio .preview-panel { border-left: 1px solid var(--line); background: radial-gradient(ellipse at 50% 64%,#fff8ed 0%,#f4ece2 65%,#f4eee7 100%); }
.preview-head { margin-bottom: 8px; }
.preview-head #preview-title { flex: none; margin: 0; font: 700 14px/1.5 var(--body); letter-spacing: 0; }
.preview-modes { margin-top: 0; }
.preview-modes button { min-height: 44px; border-radius: 7px; font-size: 12px; }
.preview-modes button[aria-pressed="true"] { background: var(--surface); border-color: var(--line); }
.preview-settings { margin: 10px auto 0; width: min(100%,340px); border-bottom: 1px solid var(--line); }
.preview-settings summary { padding: 10px 2px; min-height: 44px; cursor: pointer; color: var(--deep); font-size: 13px; font-weight: 650; }
.preview-config { display: grid; gap: 10px; padding: 0 2px 14px; }
.preview-config label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.preview-config input[type="text"] { padding: 7px 9px; min-height: 44px; }
.preview-config-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.preview-config-actions button { min-height: 44px; font-size: 13px; }
.preview-config .status { margin: 0; }
.sim-avatar { overflow: hidden; }
.sim-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sim-chat-heading { padding-inline: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-packet-copy strong > span:last-child,.sim-sender strong,[data-preview-greeting] { min-width: 0; overflow-wrap: anywhere; }
.preview-scene { min-height: 0; padding: 20px 0 12px; }
.preview-scene > .preview-card { width: min(100%,228px); }
.preview-scene > .envelope-simulator { margin-top: 0; }
.preview-foot { justify-content: space-between; margin-top: 6px; }
.preview-foot:has(#download-result[hidden]) { justify-content: center; }
.preview-format { margin: 0; text-align: center; font-size: 12px; color: #5d4e43; }
.inspiration-section { padding-block: clamp(20px,2.5vw,30px) 40px; scroll-margin-top: var(--nav-h); border-top: 1px solid var(--line); }
.inspiration-section h2 { margin: 0; font: 750 clamp(23px,2.5vw,31px)/1.24 var(--body); letter-spacing: -.025em; }
.inspiration-category { margin-top: 22px; }
.inspiration-category + .inspiration-category { margin-top: clamp(26px,4vw,48px); }
.inspiration-category h3 { display: flex; align-items: center; gap: 14px; margin: 0 0 13px; font: 650 15px/1.4 var(--body); }
.inspiration-category h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.inspiration-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: start; gap: clamp(12px,2.1vw,24px); margin: 0; padding: 0; list-style: none; }
.inspiration-card { min-width: 0; }
.inspiration-tile { display: grid; width: 100%; min-width: 0; padding: 0; border: 0; background: none; text-align: left; }
.inspiration-artwork { display: block; aspect-ratio: 3/4; overflow: hidden; border-radius: 12px; background: var(--pale); box-shadow: 0 0 0 1px #603c2313; }
.inspiration-artwork img { width: 100%; height: 100%; object-fit: cover; transition: transform .22s ease; }
@media (hover:hover) and (pointer:fine) {
  .inspiration-tile:hover .inspiration-artwork img { transform: scale(1.025); }
  .inspiration-tile:hover .inspiration-name { color: var(--deep); }
}
.inspiration-name { display: flex; align-items: center; min-height: 44px; gap: 6px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; font-weight: 650; }
.inspiration-name > span { margin-inline-start: auto; color: var(--deep); }
.inspiration-name small { margin-inline-start: auto; color: var(--muted); font-size: 11px; font-weight: 500; }
.inspiration-name small + span { margin-inline-start: 0; }
.inspiration-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 24px; }
.inspiration-actions .text-button { min-height: 44px; color: var(--muted); font-size: 13px; }
.button.price-entry { min-width: 44px; white-space: nowrap; border-color: #cba89e; color: var(--deep); }
.button.price-entry[aria-current="page"] { background: var(--pale); }
.home-info { padding-block: clamp(34px,6vw,76px); scroll-margin-top: var(--nav-h); border-top: 1px solid var(--line); }
.home-info h2 { margin: 0; font: 750 clamp(23px,2.5vw,31px)/1.24 var(--body); letter-spacing: -.025em; }
.home-info h2 + p { max-width: 36rem; margin: 10px 0 0; color: var(--muted); }
.cover-steps { background: var(--surface); }
.cover-step-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(12px,2.2vw,24px); margin: 24px 0 0; padding: 0; list-style: none; }
.cover-step-list li { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 12px; align-items: start; padding: clamp(14px,2vw,22px); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.step-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pale); color: var(--deep); font-size: 13px; font-weight: 750; }
.cover-step-list h3 { margin: 3px 0 5px; font-size: 16px; line-height: 1.45; }
.cover-step-list p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.cover-faq-layout { display: grid; grid-template-columns: minmax(160px,.65fr) minmax(0,1.55fr); gap: clamp(24px,6vw,96px); }
.cover-faq-cards { min-width: 0; border-top: 1px solid var(--line); }
.cover-faq-cards details { border-bottom: 1px solid var(--line); }
.cover-faq-cards summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 53px; padding: 12px 3px; list-style: none; cursor: pointer; font-weight: 650; }
.cover-faq-cards summary::-webkit-details-marker { display: none; }
.cover-faq-cards summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 5px; border: solid var(--deep); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.cover-faq-cards details[open] summary { color: var(--deep); }
.cover-faq-cards details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.cover-faq-cards p { max-width: 40rem; margin: 0 0 14px; padding-inline: 3px 14px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.cover-faq-cards p a { color: var(--deep); text-decoration: underline; text-underline-offset: 3px; }
.cover-faq-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 7px; color: var(--deep); text-decoration: underline; text-underline-offset: 4px; font-size: 14px; }
.site-footer { border-top: 1px solid var(--line); background: #f2ebe3; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 30px; padding-block: 20px; }
.site-footer nav { margin: 0; flex-wrap: wrap; gap: 2px clamp(12px,3vw,28px); }
.site-footer a,.site-footer button { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .text-button { color: inherit; font-weight: 500; }
@media (max-width:700px) {
  .cover-step-list,.cover-faq-layout { grid-template-columns: minmax(0,1fr); }
  .cover-step-list { margin-top: 18px; }
  .cover-faq-layout { gap: 12px; }
}
.recipe-details { margin: 0; }
.recipe-details[open] { border-bottom: 1px solid var(--line); }
.recipe-details summary { width: fit-content; min-height: 44px; line-height: 44px; color: var(--deep); font-size: 13px; cursor: pointer; }
.recipe-details p { margin: 0; color: #5d4e43; font-size: 13px; line-height: 1.65; }
.recipe-details .text-button { min-height: 44px; }
.recipe-feedback:not(:empty) { padding-bottom: 10px; }
.dialog-head h2,.guide-dialog .dialog-head h2 { font-size: clamp(18px,3.4vw,21px); }
.history-image { aspect-ratio: 957/1278; }
.creation-switch { margin-top: 6px; }
.creation-switch .text-button { min-height: 44px; color: var(--muted); font-size: 13px; }
.creation-switch .text-button:hover { color: var(--deep); }
.photo-fields { display: grid; gap: 14px; }
.photo-fields fieldset { margin: 0; }
.photo-fields .choices { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.photo-fields .photo-templates { grid-template-columns: repeat(auto-fit,minmax(min(100%, 76px),1fr)); }
.photo-fields .chip { min-width: 0; min-height: 44px; padding-inline: 4px; text-align: center; }
.photo-templates .chip {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface);
}
.photo-templates .chip img {
  flex: none;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
.photo-templates .chip span { padding: 5px 2px; font-size: 13px; font-weight: 650; }
.photo-templates .chip[aria-pressed="true"] { background: var(--pale); border-color: var(--red); }
.photo-templates .chip[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--red);
}
.photo-templates .chip[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 10px;
  width: 4px;
  height: 7px;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  z-index: 1;
}
.preview-card img[src*="/assets/styles/"] { object-fit: cover; }
@media (max-width: 520px) {
  .photo-fields .photo-templates { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
.photo-upload { padding: 11px 12px; border: 1px dashed #cab5a1; border-radius: 9px; background: #fbf8f3; }
.photo-upload.is-dragging { border-color: var(--red); background: var(--pale); }
.photo-upload .reference { margin: 4px 0 0; }
.photo-upload-notes { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.photo-upload-notes + .photo-upload-notes { margin-top: 4px; }
.photo-upload #reference-status:not(:empty) { margin-top: 5px; }
.family-photos-list { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.family-photos-list li { display: grid; grid-template-columns: 36px minmax(24px,1fr) auto; align-items: center; gap: 6px; min-width: 0; padding: 3px 0; border-bottom: 1px solid var(--line); }
.family-photos-list img { width: 36px; height: 42px; border-radius: 5px; object-fit: cover; }
.family-photos-list strong,.family-photos-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.family-photos-list strong { font-size: 13px; }
.family-photos-list small { font-size: 11px; color: var(--muted); }
.family-photo-actions { display: flex; gap: 2px; }
.family-photo-actions button { min-width: 44px; min-height: 44px; padding: 3px; font-size: 12px; }
.family-photo-actions button:disabled { opacity: .45; }
.photo-prompt-field { margin-bottom: 14px; }
.photo-prompt-field textarea { min-height: 78px; vertical-align: top; }
@media (max-width:680px) {
  .photo-fields { gap: 11px; }
  .photo-fields .chip { font-size: 12px; }
}
@media (max-width:950px) {
  .topbar { display: flex; }
  .topbar nav { gap: 12px; }
  .top-actions { gap: 5px; }
}
@media (max-width:820px) {
  :root { --nav-h: 60px; }
  .topbar .nav__links { display: none; }
  .studio-inner { padding-top: calc(var(--nav-h) + 29px); }
}
@media (max-width:680px) {
  :root { --nav-h: 64px; }
  .top-actions .button,.top-actions > .nav-text { padding-inline: 6px; font-size: 12px; }
  .studio-inner { padding-top: calc(var(--nav-h) + 21px); padding-bottom: 16px; }
  .studio .form-panel,.studio .preview-panel { padding-block: 14px; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .studio .preview-panel { border-left: 0; border-top: 1px solid var(--line); }
  .studio-intro { margin-bottom: 14px; }
  .studio-intro h1 { font-size: clamp(26px,7vw,34px); }
  .studio-intro p { font-size: 14px; }
  .form-panel #prompt { min-height: 92px; font-size: 16px; }
  .form-panel .form-actions { gap: 13px; margin-top: 13px; }
  .form-panel .form-actions .primary { flex: 1 1 auto; min-width: 0; padding-inline: 9px; }
  .creation-options { margin-top: 12px; }
  .preview-scene { padding-block: 12px 8px; }
  .preview-scene > .preview-card { width: min(100%,180px); }
  .inspiration-section { padding-bottom: 32px; }
  .inspiration-name { font-size: 13px; }
}
@media (max-width:760px) {
  .inspiration-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:520px) {
  .top-actions > [data-open="purchase"] { display: none; }
}
@media (max-width:365px) {
  .top-actions .guide-entry { display: none; }
  .preview-modes button { font-size: 11px; }
}
@media (prefers-reduced-motion:reduce) {
  .inspiration-tile:hover .inspiration-artwork img { transform: none; }
}
/* 8 · ease-of-use pass: a clearer upload target, a fuller generate action, a tidy gallery, calmer small screens. */

/* ===== 4. studio, gallery, home sections ===== */
.photo-upload { display: flex; flex-direction: column; gap: 8px; }
.photo-upload #photo-reference-slot { order: -1; }
.photo-upload .reference { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0; }
.photo-upload .reference .button { flex: 1 1 100%; min-height: 64px; padding-inline: 14px; border: 1px solid #d8b9a6; border-radius: 10px; background: var(--pale); color: var(--deep); font-size: 16px; font-weight: 700; letter-spacing: .01em; transition: background var(--m-out) var(--m-ease), border-color var(--m-out) var(--m-ease), transform var(--m-press) var(--m-ease); }
.photo-upload .reference .button:not(:disabled):hover { background: #f1dcd2; border-color: #c79a82; }
.photo-upload .reference .button:not(:disabled):active { transform: scale(.99); }
.photo-upload .reference .button:disabled { opacity: .6; }
.photo-upload .reference-name { flex: 1 1 auto; max-width: none; font-size: 13px; color: var(--muted); }
.photo-upload .reference-thumb { order: 5; flex: 1 1 100%; width: 100%; max-height: 180px; object-fit: contain; border-radius: 8px; background: #f6eee4; }
.photo-upload .photo-upload-notes { font-size: 12px; }
.photo-upload #photo-privacy { font-size: 11px; opacity: .85; }
.photo-upload #photo-demo-note { font-size: 11px; opacity: .85; }
.form-panel .form-actions { align-items: center; }
.form-panel .form-actions .primary { flex: 1 1 auto; min-height: 50px; }
.credit-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.credit-hint[hidden] { display: none; }
.credit-hint .text-button { min-height: 36px; color: var(--deep); font-size: 13px; font-weight: 650; }
.inspiration-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.theme-inspiration-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.inspiration-actions { justify-content: center; gap: 6px 18px; margin-top: 30px; }
.inspiration-actions .primary { min-height: 48px; padding-inline: 26px; }
.cover-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.cover-facts li { display: flex; align-items: center; gap: 8px; }
.cover-facts li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.cover-faq-lead { max-width: 20rem; margin: 10px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.cover-faq-link { margin-top: 0; text-decoration: none; }
.empty-history { display: grid; justify-items: center; gap: 14px; padding: 36px 16px; }
.empty-history p { margin: 0; }
.wallet-actions { gap: 8px 14px; }
.wallet-actions #demo-voucher:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: 18px; border: 1px solid var(--red); border-radius: 9px; color: var(--deep); font-size: 14px; font-weight: 700; }
.package { position: relative; }
.package-badge { position: absolute; top: 10px; right: 10px; padding: 1px 7px; border-radius: 999px; background: var(--deep); color: #fdf6ee; font-size: 11px; font-weight: 700; line-height: 18px; }
.package.is-featured .credits { margin-right: 58px; }
.package.is-featured { box-shadow: inset 0 0 0 1.5px var(--red); }
#pay-button { width: 100%; min-height: 48px; }
@media (max-width:760px) {
  .inspiration-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .theme-inspiration-grid { --gutter: clamp(16px,4vw,56px); display: flex; gap: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .theme-inspiration-grid::-webkit-scrollbar { display: none; }
  .theme-inspiration-grid .inspiration-card { flex: 0 0 min(64%,250px); scroll-snap-align: start; }
}
@media (max-width:680px) {
  .top-actions .guide-entry { display: none; }
  .top-actions .account-entry-guest .button { display: none; }
  .photo-upload { padding: 12px; }
  .photo-upload .reference .button { min-height: 68px; font-size: 17px; }
  .form-panel .form-actions .primary { min-height: 50px; }
  .inspiration-actions { margin-top: 22px; }
}
.empty-history[hidden] { display: none; }
@media (max-width:680px) {
  .top-actions .coin { display: none; }
}

/* ===== 5. layer 5 ===== */
html[data-share-page] header.nav, html[data-share-page] .site-footer, html[data-share-page] main > :not(#public-share-view) { display: none; }
.portrait-share-actions { display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.portrait-share-actions .text-button { min-height: 44px; }
.share-dialog { width: min(540px,calc(100% - 24px)); }
.share-dialog .dialog-head h2 { font-size: 20px; }
.share-compose { display: grid; gap: 16px; grid-template-columns: 122px minmax(0,1fr); align-items: start; }
.share-thumb { width: 100%; aspect-ratio: 957/1278; object-fit: cover; border-radius: 8px; background: #f1e4d8; }
.share-compose label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 650; }
.share-compose textarea { min-height: 0; font-size: 16px; }
.share-hint { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: #67584d; }
.share-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.share-link-box { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 14px; }
.share-link-box input { font-size: 16px; }
.share-link-box .text-button { margin-left: auto; min-height: 44px; }
.share-dialog .status { margin-bottom: 0; }
.public-share-view { min-height: 100svh; padding: 24px 16px 44px; background: radial-gradient(ellipse at 50% 21%,#f7e5d4 0%,var(--paper) 65%); }
.public-share-wrap { width: min(100%,448px); margin-inline: auto; }
.public-share-brand { display: inline-flex; min-height: 44px; color: var(--ink); text-decoration: none; }
.public-share-content { display: grid; justify-items: center; padding: 25px clamp(18px,5vw,38px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: center; box-shadow: 0 12px 44px #61311b12; }
.public-share-content h1 { margin: 0 0 18px; font: 700 clamp(23px,6vw,29px)/1.3 var(--body); }
.public-share-content img { width: min(100%,244px); height: auto; aspect-ratio: 957/1278; object-fit: cover; border-radius: 9px; background: #f1e4d8; }
.public-share-message { max-width: 25ch; margin: 16px 0; overflow-wrap: anywhere; white-space: pre-line; font: 650 16px/1.65 var(--body); }
.public-share-status { margin: 0 0 13px; color: #67584d; font-size: 14px; }
.public-share-content .button { min-height: 44px; }
@media (max-width:440px) {
  .share-compose { grid-template-columns: 76px minmax(0,1fr); gap: 12px; }
}
