:root {
  --page-title: clamp(36px, 3.2vw, 48px);
  --section-title: clamp(24px, 2.3vw, 34px);
  --control-height: 46px;
  --signal-orange: #f06a2d;
  --signal-orange-deep: #c94b16;
}

/* Ambient geometry */
.app-shell { position: relative; z-index: 1; }
.ambient-geometry-field { position: fixed; z-index: 6; inset: 0; overflow: hidden; pointer-events: none; contain: layout style paint; -webkit-mask-image: linear-gradient(180deg, transparent, #000 7% 93%, transparent); mask-image: linear-gradient(180deg, transparent, #000 7% 93%, transparent); }
.ambient-geometry-dialog-field { position: absolute; z-index: 0; inset: 0; display: block; overflow: hidden; pointer-events: none; contain: layout style paint; -webkit-mask-image: linear-gradient(180deg, transparent, #000 8% 92%, transparent); mask-image: linear-gradient(180deg, transparent, #000 8% 92%, transparent); }
.ambient-geometry-piece { position: absolute; top: -10vh; left: var(--geometry-x); width: var(--geometry-size); height: var(--geometry-size); opacity: 0; border: 1px solid rgba(185, 65, 20, .54); background: linear-gradient(145deg, rgba(255, 158, 105, .34), rgba(255, 253, 248, .1)); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .55); animation: geometry-fall var(--geometry-duration) linear var(--geometry-delay) infinite; }
.ambient-geometry-piece:nth-child(3n + 2) { border-color: rgba(85, 91, 81, .38); background: linear-gradient(145deg, rgba(126, 132, 119, .22), rgba(255, 253, 248, .08)); }
.ambient-geometry-piece.is-prism { clip-path: polygon(50% 0, 100% 88%, 12% 100%); background: linear-gradient(135deg, rgba(229, 93, 36, .34), rgba(85, 91, 81, .12)); }
.ambient-geometry-piece.is-hex { clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); background: linear-gradient(150deg, rgba(255, 158, 105, .3), rgba(255, 253, 248, .08)); }
.ambient-geometry-piece.is-sliver { width: calc(var(--geometry-size) * .34); border-radius: 50%; background: rgba(116, 121, 109, .2); border-color: rgba(85, 91, 81, .34); }
.ambient-geometry-dialog-field .ambient-geometry-piece { top: -14vh; }
body.auth-required .ambient-geometry-piece:nth-child(3n + 2),
body.admin-auth .ambient-geometry-piece:nth-child(3n + 2) { border-color: rgba(255, 249, 240, .38); background: linear-gradient(145deg, rgba(255, 245, 232, .19), rgba(255, 139, 85, .1)); }
.confirm-dialog { overflow: hidden; }
.confirm-dialog > div { position: relative; z-index: 1; }
@keyframes geometry-fall {
  0% { opacity: 0; transform: translate3d(0, -12vh, 0) rotate(var(--geometry-spin, 0deg)); }
  10% { opacity: var(--geometry-opacity); }
  28% { transform: translate3d(var(--geometry-drift-a), 28vh, 0) rotate(calc(var(--geometry-spin, 0deg) + var(--geometry-turn-a))); }
  52% { transform: translate3d(var(--geometry-drift-b), 57vh, 0) rotate(calc(var(--geometry-spin, 0deg) + var(--geometry-turn-b))); }
  76% { transform: translate3d(var(--geometry-drift-c), 86vh, 0) rotate(calc(var(--geometry-spin, 0deg) + var(--geometry-turn-c))); }
  82% { opacity: var(--geometry-opacity); }
  100% { opacity: 0; transform: translate3d(var(--geometry-drift), 118vh, 0) rotate(calc(var(--geometry-spin, 0deg) + var(--geometry-turn))); }
}

/* Required interaction signal */
.required-interaction, .required-choice { transition: border-color .22s ease, background-color .22s ease, box-shadow .22s ease, transform .22s ease; }
.required-interaction { border-color: rgba(230, 93, 36, .54) !important; }
.required-interaction.is-required-pending { color: var(--ink); background-color: #fffaf5 !important; box-shadow: inset 3px 0 0 rgba(230, 93, 36, .8), 0 0 0 0 rgba(230, 93, 36, 0); animation: required-control-breathe 2.8s cubic-bezier(.45, 0, .25, 1) var(--required-cue-delay, 0s) infinite; }
.required-interaction.is-required-complete { border-color: rgba(230, 93, 36, .42) !important; box-shadow: inset 2px 0 0 rgba(230, 93, 36, .52); }
.has-required-pending > span b { color: var(--signal-orange-deep); text-shadow: 0 0 18px rgba(230, 93, 36, .16); }
.product-upload-zone.required-interaction { isolation: isolate; }
.product-upload-zone.required-interaction::after { content: ''; position: absolute; z-index: -1; inset: 0; opacity: 0; background: linear-gradient(105deg, transparent 22%, rgba(255, 255, 255, .76) 48%, transparent 72%); transform: translateX(-100%); animation: required-sheen 4.8s ease-in-out var(--required-cue-delay, 0s) infinite; }
.required-choice { position: relative; overflow: hidden; border-color: rgba(230, 93, 36, .26) !important; }
.required-choice::after { content: ''; position: absolute; inset: auto 16px 11px; height: 1px; opacity: .42; background: linear-gradient(90deg, transparent, var(--signal-orange), transparent); transform: scaleX(.5); transition: opacity .22s ease, transform .22s ease; }
.required-choice:hover { border-color: rgba(230, 93, 36, .7) !important; }
.required-choice:hover::after, .required-choice.is-required-complete::after { opacity: .92; transform: scaleX(1); }
.required-choice.is-required-complete { border-color: rgba(230, 93, 36, .92) !important; animation: required-choice-breathe 3.2s cubic-bezier(.45, 0, .25, 1) var(--required-cue-delay, 0s) infinite; }
.production-stepper button.active span { animation: required-step-breathe 3.4s cubic-bezier(.45, 0, .25, 1) infinite; }
.required-primary-action { isolation: isolate; position: relative; overflow: hidden; color: #fff !important; background: linear-gradient(125deg, var(--signal-orange-deep), var(--signal-orange) 58%, #f58047) !important; border-color: #d4521c !important; box-shadow: 0 9px 22px rgba(185, 65, 20, .2), 0 0 0 0 rgba(230, 93, 36, .26); animation: required-button-breathe 2.65s cubic-bezier(.45, 0, .25, 1) infinite; }
.required-primary-action::after { content: ''; position: absolute; z-index: -1; inset: 0; opacity: .54; background: linear-gradient(104deg, transparent 25%, rgba(255, 255, 255, .38) 49%, transparent 70%); transform: translateX(-110%); animation: required-sheen 4.2s ease-in-out infinite; }
.required-primary-action:hover { background: linear-gradient(125deg, #b84012, #ed6226 55%, #ff8e56) !important; border-color: #b84012 !important; box-shadow: 0 12px 28px rgba(185, 65, 20, .28), 0 0 0 5px rgba(230, 93, 36, .1); transform: translateY(-2px); }
.required-primary-action:active { transform: translateY(1px); }
@keyframes required-control-breathe {
  0%, 100% { border-color: rgba(230, 93, 36, .46); box-shadow: inset 3px 0 0 rgba(230, 93, 36, .72), 0 0 0 0 rgba(230, 93, 36, 0); }
  50% { border-color: rgba(230, 93, 36, .9); box-shadow: inset 3px 0 0 var(--signal-orange), 0 0 0 5px rgba(230, 93, 36, .1), 0 8px 22px rgba(185, 65, 20, .09); }
}
@keyframes required-choice-breathe {
  0%, 100% { box-shadow: inset 4px 0 0 var(--orange), 0 0 0 0 rgba(230, 93, 36, 0); }
  50% { box-shadow: inset 4px 0 0 var(--orange), 0 0 0 5px rgba(230, 93, 36, .09), 0 10px 24px rgba(185, 65, 20, .08); }
}
@keyframes required-button-breathe {
  0%, 100% { box-shadow: 0 8px 20px rgba(185, 65, 20, .2), 0 0 0 0 rgba(230, 93, 36, 0); }
  50% { box-shadow: 0 12px 30px rgba(185, 65, 20, .3), 0 0 0 6px rgba(230, 93, 36, .11); }
}
@keyframes required-step-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 93, 36, 0); }
  50% { box-shadow: 0 0 0 5px rgba(230, 93, 36, .11); }
}
@keyframes required-sheen {
  0%, 58% { opacity: 0; transform: translateX(-110%); }
  68% { opacity: .56; }
  82%, 100% { opacity: 0; transform: translateX(110%); }
}

button { min-height: 44px; color: inherit; }
button:active, .primary-button:active, .secondary-button:active { transform: translateY(1px); }
.section-kicker { display: block; margin-bottom: 10px; color: var(--orange-dark); font-size: 12px; font-weight: 750; }
.quiet-button { min-height: 44px; padding: 7px 2px; color: #555850; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); cursor: pointer; font-size: 12px; font-weight: 650; }
.icon-button { min-height: 44px; padding: 0 14px; color: var(--ink); background: transparent; border: 1px solid var(--line-strong); cursor: pointer; font-weight: 700; }
.field > span { font-size: 13px; }
.field > span b { color: var(--orange-dark); }
.field > span small, .field-helper { color: #5e615a; font-size: 12px; line-height: 1.6; }
.field input, .field textarea, .field select { min-height: var(--control-height); padding: 13px 14px; background: #fffefb; font-size: 14px; }
.field textarea { min-height: 116px; }
.field [aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.field-error { min-height: 18px; color: #91352e; font-size: 12px; font-weight: 650; line-height: 1.5; }
.form-message { color: #91352e; font-size: 12px; }
.primary-button, .secondary-button { min-height: var(--control-height); white-space: nowrap; }
.primary-button:focus-visible, .secondary-button:focus-visible, button:focus-visible, a:focus-visible { outline-color: rgba(185, 65, 20, .55); }
.skeleton-block { width: 210px !important; height: 26px !important; border: 0 !important; background: linear-gradient(90deg,#e7e2d7,#f8f5ed,#e7e2d7); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Shell */
.nav-icon { width: 8px; height: 8px; margin: 0 auto; font-size: 0; background: #5c6058; }
.nav-item.active .nav-icon { background: #ff8b55; }
.nav-item small { color: #93978e; font-size: 11px; }
.top-create-action { min-width: 104px !important; place-items: center; background: var(--ink); }
.top-actions > .top-create-action span { color: #fff; font-size: 12px; font-weight: 750; }
.top-help-action { align-self: stretch; padding: 0 16px; color: #4f514c; background: transparent; border: 0; border-left: 1px solid var(--line); cursor: pointer; font-size: 11px; font-weight: 700; }
.top-help-action:hover { color: var(--orange-dark); background: var(--orange-soft); }
.credit-state small { margin-top: 2px; color: #a9ada4; font-size: 8px; white-space: nowrap; }
.service-state.online { display: none; }
.low-credit-banner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; width: 100%; padding: 6px 38px; color: var(--ink); background: var(--orange-soft); border-bottom: 1px solid var(--line); border-left: 3px solid var(--orange); }
.low-credit-banner p { margin: 0; flex: 1 1 12em; font-size: 13px; line-height: 1.55; }
.low-credit-banner a { color: var(--orange-dark); border-bottom: 1px solid var(--orange); }
.low-credit-banner [data-dismiss-low-credit] { flex: none; min-width: 44px; min-height: 44px; padding: 0 12px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); cursor: pointer; font-size: 12px; font-weight: 650; }

/* Authentication */
.admin-login .auth-story { justify-content: center; }
@media (prefers-reduced-motion: no-preference) {
  .auth-layout:not(.admin-login) .auth-story > * {
    animation: auth-story-rise .55s cubic-bezier(.16, 1, .3, 1) both;
  }
  .auth-layout:not(.admin-login) .auth-story > *:nth-child(1) { animation-delay: .02s; }
  .auth-layout:not(.admin-login) .auth-story > *:nth-child(2) { animation-delay: .06s; }
  .auth-layout:not(.admin-login) .auth-story > *:nth-child(3) { animation-delay: .1s; }
  .auth-layout:not(.admin-login) .auth-story > *:nth-child(4) { animation-delay: .14s; }
  .auth-layout:not(.admin-login) .auth-story > *:nth-child(5) { animation-delay: .18s; }
  .auth-layout:not(.admin-login) .auth-story > *:nth-child(n+6) { animation-delay: .22s; }
  .auth-panel { transition: border-color .2s ease; }
  .auth-panel:focus-within { border-color: #c4b8a4; }
}
@keyframes auth-story-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.auth-trial { position: relative; z-index: 1; display: grid; gap: 4px; margin-top: 14px; padding: 12px 14px; color: #f4f1e9; background: #2a2d28; border-left: 3px solid var(--orange); border-radius: 2px; }
.auth-trial b { font-size: 13px; }
.auth-trial span { color: #b4b8af; font-size: 12px; }
.auth-story .auth-boundary { margin-top: 12px; color: #8b8f86; font-size: 12px; line-height: 1.6; }
.auth-error-summary { margin-bottom: 12px; padding: 12px 14px; color: #7c3029; background: var(--red-soft); border-left: 3px solid var(--red); border-radius: 2px; }
.auth-error-summary b, .auth-error-summary p { margin: 0; font-size: 12px; }
.auth-error-summary p { margin-top: 4px; }
.auth-jump { display: none; width: 100%; color: var(--orange-dark); background: transparent; border: 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.auth-panel header p { margin: 4px 0 0; color: #555850; font-size: 12px; line-height: 1.5; }
.auth-panel .field { margin-bottom: 14px; }
.auth-panel .field > span { color: #3d3f3a; }
.auth-panel .field input { color: var(--ink); background: #fff; border-color: var(--line-strong); border-radius: 2px; }
.auth-panel .field-error { display: block; }
.auth-panel .primary-button { width: 100%; white-space: nowrap; }
.admin-login .auth-panels { grid-template-columns: minmax(0, 410px); }
@media (min-width: 1101px) and (max-height: 860px) {
  .auth-layout:not(.admin-login) .auth-story { padding-block: 32px; }
  .auth-layout:not(.admin-login) .auth-story h1 { margin-top: 8px; }
  .auth-layout:not(.admin-login) .auth-story .auth-promise { margin-top: 10px; }
  .auth-layout:not(.admin-login) .auth-price,
  .auth-layout:not(.admin-login) .auth-story .auth-counter { margin-top: 12px; padding-top: 12px; }
  .auth-layout:not(.admin-login) .auth-trial { margin-top: 12px; padding: 10px 12px; }
  .auth-layout:not(.admin-login) .auth-panels { padding-block: 28px; }
  .auth-layout:not(.admin-login) .auth-panel { padding: 22px 20px; }
}
@media (max-width: 390px) {
  .auth-story { padding: 28px 16px 24px; }
  .auth-story h1 { max-width: 100%; font-size: 28px; letter-spacing: -.02em; }
  .auth-story .auth-promise { max-width: 100%; font-size: 17px; }
  .auth-story .auth-lead,
  .auth-story > p { font-size: 13px; }
}
.page:has(> .admin-login) { width: 100%; min-height: calc(100vh - var(--topbar)); padding: 0; }
.admin-login.auth-layout { min-height: calc(100vh - var(--topbar)); }
body.admin-auth .page:has(> .admin-login),
body.admin-auth .admin-login.auth-layout { min-height: 100vh; }
#admin-state #admin-name { max-width: 160px; }
.admin-shell [data-shell="user"],
.admin-shell .top-create-action,
.admin-shell #credit-state,
.admin-shell #account-state,
.admin-shell #help-button,
.admin-shell #low-credit-banner,
.admin-shell .sidebar-foot { display: none !important; }
body:not(.admin-shell) [data-shell="admin"],
body:not(.admin-shell) #admin-state { display: none !important; }
.admin-shell #admin-state { display: flex; }
.admin-shell #admin-state #admin-name { display: inline; }

/* Home */
.home-hero { min-height: 390px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: stretch; margin-bottom: 28px; color: #f6f2e8; background: var(--ink); border: 1px solid #373a34; }
.home-hero > div { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px, 5vw, 70px); }
.home-hero .section-kicker { color: #ff9a69; }
.home-hero h1 { max-width: 760px; margin: 0; font-size: var(--page-title); line-height: 1.08; letter-spacing: -.045em; }
.home-hero > div > p { max-width: 590px; margin: 18px 0 0; color: #b9bdb4; font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.home-hero .primary-button { color: #201f1b; background: #ff8350; border-color: #ff8350; }
.home-hero .secondary-button { color: #f7f3ea; border-color: #74786e; }
.home-hero .secondary-button:hover { color: var(--ink); }
.home-hero > aside { display: grid; align-content: center; padding: 32px 28px; background: #2b2e29; border-left: 1px solid #454941; }
.home-hero > aside > span { color: #aeb2a9; font-size: 12px; }
.home-hero > aside strong { margin-top: 10px; color: #ff8b55; font: 500 56px/1 'DM Mono', monospace; }
.home-hero > aside strong small { font-size: 14px; }
.home-hero > aside p { margin: 12px 0 0; color: #c9ccc4; font-size: 13px; }
.home-recharge-link { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid #454941; }
.home-recharge-link a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #201f1b; background: #ff8350; border: 1px solid #ff8350; border-radius: 2px; padding: 0 16px; font-size: 13px; font-weight: 750; }
.home-recharge-link a::after { content: '→'; font-weight: 500; }
.home-recharge-link a:hover { background: #ff9a69; border-color: #ff9a69; transform: translateY(-1px); }
.home-secondary-tools { margin: 0 0 28px; padding: 26px; background: var(--surface); border: 1px solid var(--line); }
.home-secondary-tools .section-kicker { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.home-secondary-tools h2 { margin: 6px 0 0; font-size: 22px; }
.home-secondary-tools .section-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.home-tool-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.home-tool-card { min-height: 112px; display: flex; flex-direction: column; gap: 6px; padding: 16px; background: #f7f4ee; border: 1px solid var(--line); transition: transform .16s ease, border-color .16s ease; }
.home-tool-card:hover { transform: translateY(-2px); border-color: var(--orange); }
.home-tool-card b { font-size: 14px; }
.home-tool-card small { color: var(--muted); font-size: 12px; line-height: 1.55; }
.home-tool-card em { margin-top: auto; color: #8f938a; font-size: 11px; font-style: normal; }
.image-tools-index, .image-tool-page { display: grid; gap: 22px; }
.image-tool-form { display: grid; gap: 18px; padding: 26px; background: var(--surface); border: 1px solid var(--line); }
.image-tool-result { display: grid; gap: 14px; padding: 26px; background: var(--surface); border: 1px solid var(--line); }
.image-tool-result img { width: min(100%, 520px); background: repeating-conic-gradient(#ddd 0% 25%, #fff 0% 50%) 0 0 / 16px 16px; }
.first-run-checklist { margin-bottom: 28px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--orange); }
.first-run-checklist > header { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.first-run-checklist h2 { margin: 0; font-size: 22px; }
.first-run-checklist header p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.first-run-checklist ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px 0 0; padding: 0; background: var(--line); list-style: none; }
.first-run-checklist li { display: grid; grid-template-columns: 36px 1fr; gap: 13px; padding: 22px; background: var(--surface); }
.first-run-checklist li > span { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--orange); font: 600 11px 'DM Mono', monospace; }
.first-run-checklist li b { font-size: 14px; }
.first-run-checklist li p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.first-run-checklist.is-collapsed ol { display: none; }
.workspace-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 52px; background: var(--ink); border: 1px solid #383b35; }
.workspace-summary a { min-height: 138px; display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 6px 20px; padding: 24px 28px; color: #f7f3eb; border-right: 1px solid #454841; }
.workspace-summary a:last-child { border-right: 0; }
.workspace-summary a:hover { background: #30332e; }
.workspace-summary span { color: #b4b8af; font-size: 13px; }
.workspace-summary strong { grid-row: 1 / 3; grid-column: 2; color: #ff8b55; font: 500 38px 'DM Mono', monospace; }
.workspace-summary small { color: #8f938a; font-size: 11px; }
.recent-work { padding-top: 10px; }
.recent-work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.recent-work-card { min-width: 0; display: grid; grid-template-columns: 130px 1fr; background: var(--surface); border: 1px solid var(--line); transition: transform .16s ease, border-color .16s ease; }
.recent-work-card:hover { transform: translateY(-2px); border-color: var(--orange); }
.recent-work-thumb { min-height: 154px; display: grid; place-items: center; overflow: hidden; background: #dfdcd4; }
.recent-work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-work-thumb[data-aspect="1/1"] { aspect-ratio: 1 / 1; }
.recent-work-thumb[data-aspect="3/4"] { aspect-ratio: 3 / 4; }
.recent-work-thumb[data-aspect="9/16"] { aspect-ratio: 9 / 16; }
.record-placeholder { color: var(--muted); font-size: 11px; }
.recent-work-card > div:last-child { min-width: 0; padding: 18px; }
.recent-work-card h3 { margin: 0; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.recent-work-card p { margin: 8px 0 12px; color: var(--muted); font-size: 12px; }
.recent-work-card time { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; }

/* Help dialog */
.help-dialog, .confirm-dialog { width: min(840px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 28px 90px rgba(26, 28, 24, .3); }
.help-dialog::backdrop, .confirm-dialog::backdrop, .contact-dialog::backdrop { background: rgba(25, 27, 23, .72); backdrop-filter: blur(3px); }
.contact-dialog { inset: 0; width: min(400px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 28px 90px rgba(26, 28, 24, .3); }
.contact-dialog > * { position: relative; z-index: 1; }
.contact-dialog-shell { padding: 22px 22px 24px; }
.contact-dialog .pricing-contact-heading { align-items: flex-start; }
.contact-dialog .pricing-contact-heading > div { min-width: 0; }
.contact-dialog .pricing-contact-heading .icon-button { flex: none; margin-left: auto; min-height: 44px; padding: 0 12px; font-size: 12px; }
.contact-wechat { display: grid; justify-items: center; gap: 10px; margin: 0 0 16px; padding: 16px 12px; background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.contact-wechat-id { margin: 0; color: var(--ink); font-size: 14px; }
.contact-wechat-id strong { font-family: 'DM Mono', monospace; font-size: 16px; letter-spacing: .02em; }
.contact-wechat .secondary-button { min-height: 44px; }
.contact-wechat-qr { width: min(220px, 100%); margin: 4px auto 0; }
.contact-wechat-qr img { width: 100%; height: auto; aspect-ratio: 1; margin: 0 auto; object-fit: contain; background: #fff; border-radius: 8px; }
.contact-wechat-qr figcaption { margin-top: 8px; color: var(--muted); font-size: 12px; }
.help-dialog-shell { padding: clamp(24px, 4vw, 42px); }
.help-dialog-shell > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.help-dialog h2 { margin: 0; font-size: 32px; }
.help-lead { max-width: 42em; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.help-steps { display: grid; gap: 0; margin: 28px 0; padding: 0; border-block: 1px solid var(--line); list-style: none; }
.help-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.help-steps li:last-child { border-bottom: 0; }
.help-steps li > span { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: var(--orange); }
.help-steps p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.help-examples > h3 { margin: 0; font-size: 19px; }
.help-examples > p { color: var(--muted); font-size: 12px; }
.help-examples > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.help-examples article { display: flex; flex-direction: column; align-items: flex-start; padding: 17px; background: #f7f3eb; border: 1px solid var(--line); }
.help-examples article > span { color: var(--orange-dark); font-size: 11px; font-weight: 700; }
.help-examples article > b { margin-top: 10px; font-size: 15px; }
.help-examples article > small { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.help-examples article .example-preview { margin-top: 12px; }
.help-examples article .secondary-button { margin-top: 14px; }
.example-preview { width: 100%; margin-top: 14px; padding: 10px 12px; background: #fffdf8; border-left: 3px solid var(--orange); }
.example-preview strong, .example-preview em { display: block; }
.example-preview strong { font-size: 12px; }
.example-preview em { margin-top: 4px; color: var(--muted); font-size: 11px; font-style: normal; line-height: 1.55; }
.example-applied-banner { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding: 16px 18px; color: #654a14; background: var(--yellow-soft); border-left: 3px solid var(--yellow); scroll-margin-top: calc(var(--topbar) + 12px); }
.example-applied-banner[hidden] { display: none !important; }
.example-applied-banner b, .example-applied-banner p { margin: 0; }
.example-applied-banner p { margin-top: 6px; font-size: 12px; line-height: 1.65; }
.example-applied-banner .secondary-button { flex: none; }

/* Guided production */
.production-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.production-heading h1 { margin: 0; font-size: var(--page-title); line-height: 1.08; letter-spacing: -.045em; }
.production-heading p { max-width: 650px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.production-stepper { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 28px; border-block: 1px solid var(--line-strong); }
.production-stepper button { min-height: 76px; display: flex; align-items: center; gap: 11px; padding: 12px 14px; color: #777a72; background: transparent; border: 0; border-right: 1px solid var(--line); cursor: pointer; text-align: left; }
.production-stepper button:last-child { border-right: 0; }
.production-stepper button span { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border: 1px solid var(--line-strong); font: 600 10px 'DM Mono', monospace; }
.production-stepper button b { font-size: 13px; }
.production-stepper button.active { color: var(--ink); background: var(--orange-soft); }
.production-stepper button.active span { color: #fff; background: var(--orange); border-color: var(--orange); }
.production-stepper button:disabled { cursor: default; opacity: .52; }
.form-error-summary { margin-bottom: 22px; padding: 18px 20px; color: #6f2f2a; background: var(--red-soft); border-left: 4px solid var(--red); }
.form-error-summary b { font-size: 15px; }
.form-error-summary p { margin: 6px 0 10px; font-size: 12px; }
.form-error-summary div { display: grid; gap: 5px; }
.form-error-summary button { width: max-content; max-width: 100%; padding: 3px 0; color: #7d302a; background: transparent; border: 0; border-bottom: 1px solid #d8aaa5; cursor: pointer; text-align: left; }
.production-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 28px; align-items: start; }
.production-main { min-width: 0; }
.production-step { scroll-margin-top: calc(var(--topbar) + 24px); }
.production-step > header { margin-bottom: 22px; }
.production-step > header > span { color: var(--orange-dark); font-size: 12px; font-weight: 750; }
.production-step > header h2 { margin: 6px 0 0; font-size: var(--section-title); }
.production-step > header p { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.canvas-preset-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.canvas-preset-cards label { cursor: pointer; }
.canvas-preset-cards input { position: absolute; opacity: 0; }
.canvas-preset-card { min-height: 0; display: grid; justify-items: center; gap: 10px; padding: 18px 16px 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.canvas-preset-frame { width: min(72px, 42%); background: var(--paper); border: 1px solid var(--line-strong); }
.canvas-preset-card b { font-size: 16px; }
.canvas-preset-card small, .canvas-preset-card em { display: block; color: var(--muted); font-size: 12px; font-style: normal; }
.canvas-preset-cards input:checked + .canvas-preset-card { background: var(--orange-soft); border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange); }
.canvas-preset-cards input:focus-visible + .canvas-preset-card { outline: 3px solid rgba(230,93,36,.34); outline-offset: 2px; }
.copy-destination-label { margin: 18px 0 8px; color: var(--muted); font-size: 12px; }
.copy-destination-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-destination-chips label { cursor: pointer; }
.copy-destination-chips input { position: absolute; opacity: 0; }
.copy-destination-chips span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.copy-destination-chips input:checked + span { background: var(--orange-soft); border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange); }
.copy-destination-chips input:focus-visible + span { outline: 3px solid rgba(230,93,36,.34); outline-offset: 2px; }
.production-summary.is-compact dl, .production-summary.is-compact > p, .production-summary.is-compact > span { display: none; }
.production-summary.is-compact > strong { margin-top: 0; font-size: 14px; }
.platform-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.platform-cards label { cursor: pointer; }
.platform-cards input { position: absolute; opacity: 0; }
.platform-cards label > span { min-height: 100px; display: grid; align-content: center; padding: 20px; background: var(--surface); border: 1px solid var(--line); }
.platform-cards b, .platform-cards small { display: block; }
.platform-cards b { font-size: 16px; }
.platform-cards small { margin-top: 7px; color: var(--muted); font-size: 12px; }
.platform-cards input:checked + span { background: var(--orange-soft); border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange); }
.platform-cards input:focus-visible + span { outline: 3px solid rgba(230,93,36,.34); outline-offset: 2px; }
.example-section { margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--line-strong); }
.example-section h3, .example-section p { margin: 0; }
.example-section h3 { font-size: 19px; }
.example-section header p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.example-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.example-cards button { min-height: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 18px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; }
.example-cards button:hover { border-color: var(--orange); transform: translateY(-2px); }
.example-cards span { color: var(--orange-dark); font-size: 11px; font-weight: 700; }
.example-cards b { margin-top: 15px; font-size: 15px; }
.example-cards small { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.example-cards .example-preview { margin-top: 12px; }
.production-item-panel { margin-bottom: 18px; padding: clamp(22px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); scroll-margin-top: calc(var(--topbar) + 24px); }
.item-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.item-panel-heading > div { display: flex; align-items: center; gap: 13px; }
.item-panel-heading > div > span { width: 40px; height: 40px; display: grid; place-items: center; flex: none; color: #fff; background: var(--ink); font: 600 11px 'DM Mono', monospace; }
.item-panel-heading h2, .item-panel-heading p { margin: 0; }
.item-panel-heading h2 { font-size: 20px; }
.item-panel-heading p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.item-panel-actions { display: flex; align-items: center; gap: 12px; }
.edit-item-panel { display: none; }
.production-item-panel.is-collapsed { padding-block: 18px; box-shadow: none; }
.production-item-panel.is-collapsed > :not(.item-panel-heading) { display: none; }
.production-item-panel.is-collapsed .item-panel-heading { align-items: center; margin: 0; padding: 0; border: 0; }
.production-item-panel.is-collapsed .edit-item-panel { display: inline-block; }
.reference-role-comparison { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin-bottom: 24px; }
.reference-role-comparison > div { padding: 18px; background: #f6f2e9; border: 1px solid var(--line); }
.reference-role-comparison b, .reference-role-comparison span { display: block; }
.reference-role-comparison b { font-size: 14px; }
.reference-role-comparison span { margin-top: 6px; color: var(--orange-dark); font-size: 12px; }
.reference-role-comparison i { color: var(--muted); font-style: normal; }
.product-upload-zone { position: relative; min-height: 150px; display: grid; place-items: center; margin-top: 5px; overflow: hidden; background: #f7f4ec; border: 1px dashed var(--line-strong); cursor: pointer; text-align: center; }
.product-upload-zone:hover, .product-upload-zone.is-dragging, .product-upload-zone:focus-within { color: var(--orange-dark); background: var(--orange-soft); border-color: var(--orange); }
.product-upload-zone input { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; }
.product-upload-zone span b, .product-upload-zone span small { display: block; }
.product-upload-zone span small { margin-top: 8px; color: var(--muted); font-size: 11px; }
.product-file-previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 10px; }
.product-file-previews article { min-width: 0; position: relative; padding: 8px; background: #f7f4ec; border: 1px solid var(--line); }
.product-file-previews img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #dfdcd3; }
.product-file-previews article > div { padding: 9px 2px 3px; }
.product-file-previews b, .product-file-previews small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-file-previews b { font-size: 11px; }
.product-file-previews small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.product-file-previews button { position: absolute; top: 13px; right: 13px; padding: 5px 7px; color: #fff; background: rgba(31,33,30,.86); border: 0; cursor: pointer; font-size: 10px; }
.source-picker { margin: 26px 0 0; padding: 0; border: 0; border-top: 1px solid var(--line); }
.source-picker legend { padding: 22px 0 0; font-size: 16px; font-weight: 750; }
.source-picker legend small { color: var(--green); font-size: 12px; font-weight: 650; }
.source-picker > p { margin: 7px 0 15px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.source-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.source-options label { cursor: pointer; }
.source-options input { position: absolute; opacity: 0; }
.source-options span { min-height: 46px; display: grid; place-items: center; padding: 7px 10px; background: #f8f5ed; border: 1px solid var(--line); font-size: 12px; font-weight: 650; text-align: center; }
.source-options input:checked + span { color: #fff; background: var(--ink); border-color: var(--ink); }
.source-options input:focus-visible + span { outline: 3px solid rgba(230,93,36,.34); outline-offset: 2px; }
.source-control { margin-top: 14px; padding: 16px; background: #f8f5ed; border: 1px solid var(--line); }
.source-control .field { margin: 0; }
.selection-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.selection-preview:empty { display: none; }
.selection-preview img { width: 92px; height: 70px; object-fit: cover; border: 1px solid var(--line); }
.selection-preview b, .selection-preview small { display: block; }
.selection-preview b { font-size: 12px; }
.selection-preview small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.copy-preview { padding: 13px; color: #3d5449; background: var(--green-soft); font-size: 12px; line-height: 1.65; }
.copy-requirement-grid { display: grid; grid-template-columns: minmax(180px, .38fr) 1fr; gap: 14px; }
.image-count-field { max-width: 300px; }
.production-navigation { display: flex; justify-content: space-between; gap: 10px; padding: 20px 0 38px; }
.production-navigation [data-next], .production-navigation [data-confirm-submit] { margin-left: auto; }
.production-summary { position: sticky; top: calc(var(--topbar) + 24px); padding: 22px; color: #f6f2e8; background: var(--ink); border: 1px solid #373a34; }
.production-summary > span { color: #a9ada4; font-size: 11px; }
.production-summary > strong { display: block; margin-top: 8px; font-size: 16px; line-height: 1.45; }
.production-summary dl { margin: 22px 0; border-block: 1px solid #454941; }
.production-summary dl > div { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #3d403a; }
.production-summary dl > div:last-child { border-bottom: 0; }
.production-summary dt { color: #a9ada4; font-size: 11px; }
.production-summary dd { margin: 0; color: #fff; font-size: 12px; font-weight: 750; text-align: right; }
.production-summary dd.is-negative { color: #ff9c91; }
.production-summary > p { margin: 0; color: #9da198; font-size: 10px; line-height: 1.65; }
.review-items { display: grid; gap: 12px; }
.review-items > article { padding: 22px; background: var(--surface); border: 1px solid var(--line); }
.review-items article > header { display: flex; align-items: flex-start; gap: 13px; }
.review-items article > header > span { width: 38px; height: 38px; display: grid; place-items: center; flex: none; color: #fff; background: var(--orange); font: 600 10px 'DM Mono', monospace; }
.review-items article > header > div { min-width: 0; flex: 1; }
.review-items h3, .review-items header p { margin: 0; }
.review-items h3 { font-size: 19px; }
.review-items header p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.review-items dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; margin: 20px 0; border-top: 1px solid var(--line); }
.review-items dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-items dt { color: var(--muted); font-size: 11px; }
.review-items dd { margin: 0; font-size: 12px; font-weight: 700; }
.review-items details { color: var(--muted); font-size: 12px; }
.review-items details p { white-space: pre-wrap; line-height: 1.7; }
.add-item { width: 100%; margin-top: 12px; border-style: dashed; }
.confirm-dialog > div { padding: clamp(24px, 4vw, 40px); }
.confirm-dialog h2 { margin: 7px 0 0; font-size: 30px; }
.confirm-dialog header > span { color: var(--orange-dark); font-size: 12px; font-weight: 750; }
.confirm-dialog dl { margin: 24px 0; border-block: 1px solid var(--line); }
.confirm-dialog dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.confirm-dialog dl > div:last-child { border-bottom: 0; }
.confirm-dialog dt { color: var(--muted); }
.confirm-dialog dd { margin: 0; font-weight: 750; }
.safety-note { padding: 14px; color: #684b11; background: var(--yellow-soft); border-left: 3px solid var(--yellow); font-size: 12px; line-height: 1.65; }
.confirm-dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.batch-table > a > div { min-width: 0; display: grid; gap: 4px; }
.batch-table strong, .batch-table small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-table strong { font-size: 13px; }
.batch-table small { color: var(--muted); font-size: 10px; }

/* Records and results */
.records-heading h1, .result-hero h1 { font-size: var(--page-title); }
.record-list { display: grid; gap: 10px; }
.record-card { min-width: 0; display: grid; grid-template-columns: 128px minmax(0, 1fr) auto 70px; align-items: center; gap: 22px; padding-right: 22px; background: var(--surface); border: 1px solid var(--line); transition: border-color .16s ease, transform .16s ease; }
.record-card:hover { transform: translateX(3px); border-color: var(--orange); }
.record-thumb { width: 128px; height: 112px; display: grid; place-items: center; overflow: hidden; color: var(--muted); background: #dfdcd4; font-size: 11px; }
.record-thumb img { width: 100%; height: 100%; object-fit: cover; }
.record-thumb[data-aspect="1/1"] { aspect-ratio: 1 / 1; height: auto; }
.record-thumb[data-aspect="3/4"] { aspect-ratio: 3 / 4; height: auto; }
.record-thumb[data-aspect="9/16"] { aspect-ratio: 9 / 16; height: auto; }
.result-image[data-aspect="1/1"] img { aspect-ratio: 1 / 1; object-fit: contain; }
.result-image[data-aspect="3/4"] img { aspect-ratio: 3 / 4; object-fit: contain; }
.result-image[data-aspect="9/16"] img { aspect-ratio: 9 / 16; object-fit: contain; }
.record-main { min-width: 0; padding-block: 16px; }
.record-main h2 { margin: 0; overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.record-main p { margin: 7px 0; color: var(--muted); font-size: 12px; }
.record-main time { color: var(--muted); font-size: 10px; }
.record-main code { display: block; margin-top: 6px; overflow: hidden; color: #777a72; font: 9px 'DM Mono', monospace; text-overflow: ellipsis; white-space: nowrap; }
.record-arrow { color: var(--muted); font-size: 11px; text-align: right; }
.user-status { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 7px 9px; font-size: 10px; font-weight: 750; }
.user-status i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.user-status.running { color: #775615; background: var(--yellow-soft); }
.user-status.success { color: #23694f; background: var(--green-soft); }
.user-status.warning { color: #7b4a14; background: var(--yellow-soft); }
.user-status.error { color: #91352e; background: var(--red-soft); }
.user-status.neutral { color: #555850; background: #e6e3da; }
.result-hero { padding-bottom: 28px; border-bottom: 1px solid var(--line-strong); }
.result-hero .back-link { display: inline-block; margin-bottom: 34px; }
.result-hero-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.result-hero h1 { max-width: 900px; margin: 0; line-height: 1.08; letter-spacing: -.045em; }
.result-hero-main > div > p { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.result-primary-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.publish-check { display: flex; gap: 14px; margin-top: 24px; padding: 15px 17px; color: #654a14; background: var(--yellow-soft); border-left: 3px solid var(--yellow); font-size: 12px; }
.result-meta { display: flex; align-items: center; gap: 14px; margin-top: 18px; color: var(--muted); font-size: 10px; }
.result-meta code { font: 9px 'DM Mono', monospace; }
.generation-progress { margin: 28px 0 36px; padding: 26px; color: #f6f2e8; background: var(--ink); }
.generation-progress h2 { margin: 6px 0 0; font-size: 24px; }
.generation-progress header > span { color: #ff8b55; font-size: 11px; font-weight: 750; }
.generation-progress header p { margin: 8px 0 0; color: #aeb2a9; font-size: 12px; }
.generation-progress ol { display: grid; grid-template-columns: repeat(6, 1fr); margin: 26px 0 0; padding: 0; list-style: none; }
.generation-progress li { position: relative; display: grid; justify-items: start; gap: 7px; color: #777c72; }
.generation-progress li::after { content: ''; position: absolute; top: 13px; left: 29px; right: 7px; height: 1px; background: #4b4e47; }
.generation-progress li:last-child::after { display: none; }
.generation-progress li span { width: 27px; height: 27px; display: grid; place-items: center; z-index: 1; background: #373a34; font: 600 9px 'DM Mono', monospace; }
.generation-progress li b { font-size: 10px; }
.generation-progress li.done, .generation-progress li.current { color: #fff; }
.generation-progress li.done span { background: var(--green); }
.generation-progress li.current span { background: var(--orange); }
.retry-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 26px 0; padding: 19px 21px; background: var(--red-soft); border-left: 3px solid var(--red); }
.retry-panel b, .retry-panel p { margin: 0; }
.retry-panel p { margin-top: 5px; color: #754b47; font-size: 11px; }
.result-item > header p { color: var(--muted); font-size: 11px; }
.image-set-card { padding: 12px; }
.image-card-heading { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.image-card-heading > span { font-size: 12px; font-weight: 750; }
.branch-status { display: inline-flex; width: max-content; padding: 6px 8px; font-size: 9px; font-weight: 750; }
.branch-status.success { color: var(--green); background: var(--green-soft); }
.branch-status.running { color: var(--yellow); background: var(--yellow-soft); }
.branch-status.warning { color: #7b4a14; background: var(--yellow-soft); }
.branch-status.error { color: var(--red); background: var(--red-soft); }
.image-set-card .result-image { min-height: 320px; margin: 0; }
.image-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.scene-details { margin-top: 12px; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.scene-details summary { color: var(--ink); cursor: pointer; font-weight: 700; }
.scene-details p { line-height: 1.65; }
.scene-details small { line-height: 1.6; }
.user-exception { min-height: 260px; display: grid; align-content: center; padding: 22px; color: #713b36; background: var(--red-soft); border-left: 3px solid var(--red); }
.user-exception b { font-size: 14px; }
.user-exception p { margin: 9px 0; font-size: 12px; line-height: 1.7; }
.user-exception details { font-size: 11px; }
.user-exception code, .user-exception small { display: block; margin-top: 7px; overflow-wrap: anywhere; }
.planning-state:empty { display: none; }
.item-copy-result > header span { color: var(--green); font-size: 11px; font-weight: 750; }
.item-copy-result > header h3 { margin-top: 4px; }
.copy-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.artifact-wait .skeleton-image { width: 80%; height: 220px; background: linear-gradient(90deg,#e1ddd2,#f3f0e7,#e1ddd2); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.artifact-wait .skeleton-copy { width: 90%; height: 90px; background: linear-gradient(90deg,#dfe7e2,#f2f7f4,#dfe7e2); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 58px; padding: 24px 0; border-top: 1px solid #d3aaa6; }
.danger-zone b, .danger-zone p { margin: 0; }
.danger-zone p { margin-top: 5px; color: var(--muted); font-size: 11px; }

/* Pricing catalog */
.page:has(.pricing-island) { padding-inline: clamp(20px, 3vw, 48px); }
.pricing-heading h1 { max-width: 780px; }
.pricing-heading .section-kicker { color: var(--orange-dark); font: 500 10px/1.4 'DM Mono', monospace; letter-spacing: .16em; }
.pricing-heading > div > p:first-of-type { margin: 12px 0 0; color: var(--ink); font-size: 15px; font-weight: 400; line-height: 1.7; }
.pricing-heading > div > p:first-of-type b { color: #ff8b55; font: 500 17px/1.15 'DM Mono', monospace; }
.pricing-heading > a { flex: none; color: var(--orange-dark); border-bottom: 1px solid var(--orange); font-size: 13px; font-weight: 700; }
.pricing-contact-note { margin: 0 0 16px; padding: 14px 16px; color: #654a14; background: var(--yellow-soft); border-left: 3px solid var(--yellow); font-size: 13px; line-height: 1.65; }
.pricing-contact-note p { margin: 0 0 8px; }
.pricing-contact-note p:last-child { margin-bottom: 0; }
.pricing-contact-email { color: var(--ink); font-weight: 750; }
.pricing-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pricing-island { margin-bottom: 28px; padding: 16px; color: #f6f2e8; background: var(--ink); border: 1px solid #373a34; }
.pricing-island .primary-button { color: #201f1b; background: #ff8350; border-color: #ff8350; border-radius: 2px; box-shadow: none; }
.pricing-island .primary-button:hover { color: #201f1b; background: #ff8350; border-color: #ff8350; }
.pricing-island .secondary-button { color: #f7f3ea; background: var(--ink); border-color: #74786e; border-radius: 2px; box-shadow: none; }
.pricing-island .secondary-button:hover { color: var(--ink); background: #f6f2e8; }
.pricing-island .primary-button, .pricing-island .secondary-button { min-height: 44px; height: 44px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.pricing-island .pricing-badge { margin-left: 0; padding: 2px 6px; color: #ff8350; background: #1f211e; border-radius: 0; }
.pricing-island .pricing-badge.muted { color: #a9ada4; background: transparent; padding: 0; font-weight: 500; }
.pricing-pack-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.pricing-pack-card { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 22px 14px; color: #c9ccc4; background: #2b2e29; border-left: 1px solid #454941; }
.pricing-pack-card.is-recommended { padding-top: 28px; }
.pricing-pack-card.is-recommended::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--orange); }
.pricing-pack-recommend { position: relative; z-index: 1; color: #ff8350; font: 500 10px/1.4 'DM Mono', monospace; letter-spacing: .12em; }
.pricing-pack-card > .pricing-badge { position: relative; z-index: 1; margin-left: 0; }
.pricing-pack-name { margin: 14px 0 0; color: #f6f2e8; font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.pricing-pack-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; max-width: 100%; margin: 12px 0 0; }
.pricing-pack-price strong { color: #f6f2e8; font: 500 26px/1 'DM Mono', monospace; white-space: nowrap; }
.pricing-pack-price s { color: #a9ada4; font: 400 12px/1 'DM Mono', monospace; }
.pricing-pack-price small { flex: 1 0 100%; color: #a9ada4; font-size: 12px; font-weight: 400; }
.pricing-pack-card > .primary-button, .pricing-pack-card > .secondary-button { align-self: stretch; width: 100%; max-width: 100%; margin-top: 16px; }
.pricing-pack-quota { align-self: stretch; margin-top: 18px; color: #c9ccc4; font-size: 13px; }
.pricing-pack-ticks { display: flex; gap: 3px; margin-top: 10px; }
.pricing-pack-ticks span { width: 8px; height: 3px; flex: none; background: #3a3d37; }
.pricing-pack-ticks span.is-on { background: #ff8350; }
.pricing-pack-unit { align-self: stretch; margin-top: 14px; padding: 10px 12px; background: #32352f; border: 1px solid #454941; }
.pricing-pack-unit p { margin: 0; color: #c9ccc4; font-size: 12px; line-height: 1.65; }
.pricing-pack-unit p + p { margin-top: 6px; }
.pricing-pack-list { align-self: stretch; margin: auto 0 0; padding: 14px 0 0; list-style: none; }
.pricing-pack-list li { position: relative; margin: 0 0 6px; padding-left: 16px; color: #c9ccc4; font-size: 12px; line-height: 1.65; }
.pricing-pack-list li:last-child { margin-bottom: 0; }
.pricing-pack-list li::before { content: '✓'; position: absolute; left: 0; color: #ff8350; font-size: 11px; }
.pricing-panel { margin-bottom: 28px; padding: 26px; background: var(--surface); border: 1px solid var(--line); }
.pricing-panel > header { margin-bottom: 18px; }
.pricing-panel h2 { margin: 0; font-size: var(--section-title); }
.pricing-panel header p, .pricing-panel > p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.pricing-panel > p { max-width: 820px; }
.pricing-table-wrap { overflow-x: auto; margin: 16px 0; -webkit-overflow-scrolling: touch; }
.pricing-table { width: 100%; min-width: 520px; border-collapse: collapse; background: #fffefb; }
.pricing-table th, .pricing-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.pricing-table thead th { color: #f6f2e8; background: var(--ink); font-size: 12px; font-weight: 700; }
.pricing-table tbody th { font-size: 15px; font-weight: 750; }
.pricing-table tbody tr:last-child th, .pricing-table tbody tr:last-child td { border-bottom: 0; }
.pricing-table tbody tr:hover { background: var(--orange-soft); }
.pricing-badge { display: inline-block; margin-left: 8px; padding: 3px 8px; color: var(--orange-dark); background: var(--orange-soft); font-size: 11px; font-weight: 750; vertical-align: middle; }
.pricing-badge.muted { color: var(--muted); background: #f1eee5; font-weight: 650; }
.pricing-first { border-top: 4px solid var(--orange); }
.pricing-notes { margin: 16px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.pricing-notes li { margin-bottom: 4px; }

/* Admin credit grant */
.admin-grant-form { max-width: 640px; padding: clamp(24px, 3vw, 38px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.admin-grant-form > header { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 24px; }
.admin-grant-form > header > span { width: auto; min-width: 70px; min-height: 38px; display: grid; place-items: center; padding-inline: 10px; color: var(--orange-dark); border: 1px solid var(--orange); font-size: 11px; font-weight: 750; }
.admin-grant-form h2 { margin: 0; font-size: 25px; }
.admin-grant-form header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.admin-grant-form .primary-button { width: 100%; margin-top: 8px; }
.admin-user-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 8px; }
.admin-user-search .field { margin-bottom: 0; }
.admin-user-results { list-style: none; display: grid; gap: 8px; margin: 12px 0 16px; padding: 0; }
.admin-user-result { width: 100%; display: grid; gap: 3px; min-height: 44px; padding: 12px 14px; color: inherit; text-align: left; background: #fffefb; border: 1px solid var(--line); cursor: pointer; }
.admin-user-result b { font-size: 14px; }
.admin-user-result span { color: var(--muted); font-size: 12px; }
.admin-user-result small { color: var(--ink); font-size: 12px; }
.admin-user-result:hover, .admin-user-result.is-selected { border-color: var(--orange); background: var(--orange-soft); }
.admin-selected-user { margin: 0 0 18px; padding: 16px 18px; background: #fffefb; border: 1px solid var(--line); border-left: 3px solid var(--orange); }
.admin-selected-user > span { color: var(--orange-dark); font-size: 11px; font-weight: 750; }
.admin-selected-user h3 { margin: 6px 0 0; font-size: 18px; }
.admin-selected-user p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.admin-selected-user p b { color: var(--ink); }
.admin-claim-panel { margin-bottom: 18px; }
.admin-claim-results { list-style: none; display: grid; gap: 8px; margin: 12px 0 0; padding: 0; }
.admin-claim-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.admin-selected-ledger { margin-top: 14px; }
.admin-reset-password { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.account-profile { max-width: 640px; margin-bottom: 18px; }
.account-password-form { margin-bottom: 28px; }
.account-ledger-panel { max-width: 640px; }
.account-ledger-panel h2 { margin: 0 0 12px; font-size: 22px; }
.account-ledger-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.account-ledger { width: 100%; min-width: 420px; border-collapse: collapse; background: #fffefb; }
.account-ledger th, .account-ledger td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.account-ledger thead th { color: #f6f2e8; background: var(--ink); font-size: 12px; font-weight: 700; }
.account-ledger tbody tr:last-child td { border-bottom: 0; }

/* Reference library language refresh */
.ingest-panel > header div > p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.reference-heading h1 { max-width: 780px; font-size: var(--page-title); }
.section-heading > div > p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 1439px) {
  .pricing-pack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pricing-island { padding: 18px; }
  .pricing-pack-card { padding: 24px 20px; }
  .pricing-pack-card.is-recommended { padding-top: 30px; }
  .pricing-pack-name { font-size: 22px; }
  .pricing-pack-price strong { font-size: 32px; }
  .pricing-island .primary-button, .pricing-island .secondary-button { padding: 0 16px; font-size: 13px; }
}

@media (max-width: 1100px) {
  .production-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; }
  .record-card { grid-template-columns: 110px minmax(0, 1fr) auto; }
  .record-thumb { width: 110px; }
  .record-arrow { display: none; }
}

@media (max-width: 1099px) {
  .pricing-pack-grid { grid-template-columns: minmax(0, 1fr); }
  .pricing-heading { margin-bottom: 18px; }
  .pricing-island { padding: 14px; }
  .pricing-pack-card { padding: 20px 18px; }
  .pricing-pack-card.is-recommended { padding-top: 28px; }
  .pricing-pack-name { margin-top: 10px; font-size: 22px; }
  .pricing-pack-price { margin-top: 8px; }
  .pricing-pack-price strong { font-size: 34px; }
  .pricing-pack-card > .primary-button, .pricing-pack-card > .secondary-button { margin-top: 14px; }
  .pricing-pack-quota { margin-top: 14px; }
  .pricing-pack-unit { margin-top: 12px; }
  .pricing-pack-list { padding-top: 12px; }
}

@media (max-width: 900px) {
  .canvas-preset-cards { grid-template-columns: 1fr; }
  .top-create-action { display: none !important; }
  .low-credit-banner { padding-inline: 18px; }
  .home-hero { grid-template-columns: 1fr 210px; }
  .home-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .first-run-checklist ol { grid-template-columns: 1fr; }
  .workspace-summary { grid-template-columns: 1fr 1fr 1fr; }
  .production-layout { grid-template-columns: 1fr; }
  .production-summary { position: static; grid-row: 1; }
  .help-examples > div { grid-template-columns: 1fr; }
  .auth-jump { display: block; }
}

@media (max-width: 760px) {
  .pricing-panel { padding: 20px; }
  .pricing-table { min-width: 460px; }
  .pricing-pack-price strong { font-size: 32px; }
  .page { padding-bottom: 110px; }
  .toast-region { right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); left: 14px; }
  .toast { max-width: none; }
  .home-hero { min-height: 0; grid-template-columns: 1fr; }
  .home-secondary-tools { padding: 20px; }
  .home-tool-grid { grid-template-columns: 1fr; }
  .home-hero > aside { border-top: 1px solid #454941; border-left: 0; }
  .home-hero > aside strong { font-size: 44px; }
  .workspace-summary { grid-template-columns: 1fr; }
  .workspace-summary a { min-height: 104px; border-right: 0; border-bottom: 1px solid #454841; }
  .workspace-summary a:last-child { border-bottom: 0; }
  .recent-work-grid { grid-template-columns: 1fr; }
  .production-heading { align-items: flex-start; flex-direction: column; }
  .production-main { grid-row: 1; }
  .production-summary { grid-row: 2; }
  .production-stepper { grid-template-columns: repeat(4, minmax(64px, 1fr)); position: sticky; z-index: 7; top: var(--topbar); background: var(--paper); }
  .production-stepper button { min-width: 0; justify-content: center; padding-inline: 6px; }
  .production-stepper button b { display: none; }
  .production-step, .production-item-panel { scroll-margin-top: calc(var(--topbar) + 96px); }
  .platform-cards, .example-cards, .field-row, .copy-requirement-grid { grid-template-columns: 1fr; }
  .product-file-previews { grid-template-columns: repeat(2, 1fr); }
  .source-options { grid-template-columns: 1fr; }
  .source-options span { justify-content: start; padding-inline: 14px; }
  .reference-role-comparison { grid-template-columns: 1fr; }
  .reference-role-comparison i { display: none; }
  .production-navigation { position: fixed; z-index: 8; right: 0; bottom: 0; left: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(244,241,233,.97); border-top: 1px solid var(--line-strong); backdrop-filter: blur(10px); }
  .production-navigation .primary-button { flex: 1; }
  .ambient-geometry-field[data-geometry-mode="compact"] { -webkit-mask-image: linear-gradient(180deg, transparent 0 16%, #000 21% 87%, transparent 94%); mask-image: linear-gradient(180deg, transparent 0 16%, #000 21% 87%, transparent 94%); }
  .review-items dl { grid-template-columns: 1fr; }
  .record-card { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding-right: 14px; }
  .record-thumb { width: 92px; height: 118px; }
  .record-card > .user-status { grid-column: 2; margin: -10px 0 13px; }
  .result-hero-main { align-items: flex-start; flex-direction: column; }
  .result-primary-actions { align-items: stretch; flex-direction: column; }
  .result-primary-actions > * { width: 100%; }
  .publish-check { align-items: flex-start; flex-direction: column; }
  .result-meta { align-items: flex-start; flex-wrap: wrap; }
  .result-meta code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .generation-progress ol { grid-template-columns: repeat(3, 1fr); gap: 20px 0; }
  .retry-panel, .danger-zone { align-items: stretch; flex-direction: column; }
}

@media (max-width: 520px) {
  .pricing-table th, .pricing-table td { padding: 11px 12px; font-size: 13px; }
  .admin-grant-form { padding: 22px 18px; }
  .admin-user-search { grid-template-columns: 1fr; }
  .admin-claim-row { grid-template-columns: 1fr; }
  .top-help-action { padding-inline: 10px; font-size: 10px; }
  .credit-state { padding-inline: 10px; }
  .credit-state small { display: none; }
  .low-credit-banner { flex-wrap: wrap; padding-inline: 16px; }
  .pricing-heading h1 { font-size: 32px; }
  .pricing-heading > div > p:first-of-type { font-size: 14px; }
  .pricing-heading > div > p:first-of-type b { font-size: 16px; }
  .pricing-pack-card { padding: 18px 16px; }
  .pricing-pack-card.is-recommended { padding-top: 26px; }
  .pricing-pack-price strong { font-size: 28px; }
  .home-hero > div { padding: 34px 24px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .first-run-checklist { padding: 20px; }
  .first-run-checklist > header { flex-direction: column; }
  .recent-work-card { grid-template-columns: 100px 1fr; }
  .recent-work-thumb { min-height: 168px; }
  .production-item-panel { padding: 18px; }
  .item-panel-heading { align-items: flex-start; flex-direction: column; }
  .product-file-previews { grid-template-columns: 1fr; }
  .confirm-dialog footer { align-items: stretch; flex-direction: column-reverse; }
  .confirm-dialog footer > * { width: 100%; }
  .help-dialog-shell { padding: 22px; }
  .help-dialog h2 { font-size: 27px; }
  .contact-dialog { width: calc(100vw - 24px); max-width: calc(100vw - 24px); }
  .contact-dialog-shell { padding: 18px; }
  .contact-wechat-qr img { width: 168px; height: 168px; }
  .example-applied-banner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .skeleton-block, .skeleton-image, .skeleton-copy { animation: none !important; }
  .ambient-geometry-field, .ambient-geometry-dialog-field { display: none; }
  .required-interaction.is-required-pending, .required-choice.is-required-complete, .required-primary-action, .production-stepper button.active span { animation: none !important; }
  .required-interaction::after, .required-primary-action::after { animation: none !important; }
}
