html { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: #e8eee9;
  font: 14px Inter, system-ui, sans-serif;
}
body:has(dialog:modal) { overflow: hidden; }
button, textarea, select, input { font: inherit; color: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, textarea:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid #2b6557;
  outline-offset: 2px;
}
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.page {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--ink);
  --ink: #163744;
  --muted: #34525b;
  --accent: #16495d;
  --line: rgba(37, 70, 79, .16);
  --glass: rgba(255, 255, 255, .34);
  --glass-edge: rgba(255, 255, 255, .62);
  --dock-width: clamp(375px, 34vw, 460px);
  --dock-inset: clamp(22px, 2.5vw, 40px);
  --motion: cubic-bezier(.22, .8, .24, 1);
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  transition: color .42s ease;
}
.page[data-scene="flower"] { --ink: #492b36; --muted: #684855; --accent: #783c52; }
.page[data-scene="daylight"] { --ink: #384333; --muted: #4d5b48; --accent: #475c42; }
.page[data-scene="tram"] { --ink: #242e48; --muted: #485574; --accent: #344269; }

.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #d9e4e5; }
.ambient-scene {
  position: absolute; inset: 0; overflow: hidden; opacity: 0; visibility: hidden;
  background: var(--scene-color);
  transition: opacity .82s var(--motion), visibility 0s linear .82s;
}
.ambient-scene.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.ambient-scene[data-scene="coast"] { --scene-color: linear-gradient(180deg, #e5e7de 0%, #f1e9d9 32%, #9dccd7 56%, #77b5c7 74%, #f1e8d7 100%); }
.ambient-scene[data-scene="flower"] { --scene-color: linear-gradient(180deg, #f2e8e2 0%, #f0e6dd 30%, #d5b9c6 67%, #f1dfdb 100%); }
.ambient-scene[data-scene="daylight"] { --scene-color: linear-gradient(180deg, #f1e9db 0%, #eae6d2 30%, #bdcbb4 68%, #e7e4d2 100%); }
.ambient-scene[data-scene="tram"] { --scene-color: linear-gradient(180deg, #eae9ef 0%, #dedde9 29%, #a5b9d4 68%, #dedce8 100%); }
.ambient-photo {
  position: absolute; top: -4%; left: -4%; width: 108%; height: 108%; object-fit: cover;
  filter: blur(15px) saturate(.89); opacity: .34;
}
.ambient-scene::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 75% 13%, #fff8eac9, transparent 57%), linear-gradient(0deg, #fff6e986, transparent 24%);
}

.shelf-content { max-width: 1500px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) clamp(14px, 3vw, 42px) 24px; }
.shelf-stage { transition: transform .64s var(--motion); }
.workspace-link, .blank-button, .balance {
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 8px 28px -16px #213d52a1, inset 0 1px 0 #ffffff62;
}
.studio-bar {
  min-height: 46px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.brand, .top-actions { display: flex; align-items: center; gap: 10px; }
.top-actions { min-width: 0; }
.brand { white-space: nowrap; color: #2b1b33; font: 500 26px/1 var(--serif, Georgia, serif); letter-spacing: -.025em; }
.brand-mark { display: block; flex: none; width: 32px; height: 32px; }
.history-link, .balance {
  min-height: 44px; padding: 0 12px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; white-space: nowrap;
}
.balance { gap: 7px; padding: 0 16px; }
.top-actions .balance { flex: none; }
#account-button { min-width: 0; max-width: 22rem; }
#account-button-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.numeric-pill {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  min-width: 22px; min-height: 22px; padding: 0 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent); font-size: 11px; font-weight: 650; line-height: 1; white-space: nowrap;
}
.numeric-pill, .wallet-balance, .wallet-buy, .quote, .primary-cost,
.library-count, .job-meta, .personal-meta, .audio-empty { font-variant-numeric: tabular-nums; }
.numeric-pill:empty { display: none; }
.wallet-unit { color: var(--muted); font-size: 12px; }

.shelf-screen { text-align: center; padding: clamp(17px, 3vh, 30px) 0 0; }
.shelf-title {
  font: 500 clamp(34px, min(4.6vw, 6.4vh), 55px)/1.05 var(--serif);
  letter-spacing: -.046em;
}
.shelf-subtitle { margin-bottom: 9px; color: var(--muted); font-size: 13px; }
.deck {
  --card-width: clamp(220px, min(43vw, 39vh), 340px);
  --spread: calc(var(--card-width) * .70);
  --drag-x: 0px;
  width: 100%; max-width: 860px; height: calc(var(--card-width) * 1.30); margin: clamp(16px, 2.8vh, 25px) auto 0;
  position: relative; isolation: isolate; perspective: 1480px; touch-action: pan-y; user-select: none;
}
.style-card {
  position: absolute; top: 0; left: 50%; display: block; overflow: hidden; isolation: isolate;
  width: var(--card-width); aspect-ratio: 10 / 13; margin-left: calc(var(--card-width) / -2); border-radius: 30px;
  background: #758887; box-shadow: 0 36px 64px -35px #152a44d1;
  transform-origin: center; transition: transform .72s var(--motion), opacity .58s ease;
}
.style-card::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px #ffffff58;
  background: linear-gradient(126deg, #ffffff22, transparent 42%);
}
.style-card-left, .style-card-right { z-index: 1; opacity: .82; }
.style-card-left { transform: translate3d(calc(var(--drag-x) - var(--spread)), 5px, -105px) rotateY(31deg) scale(.91); }
.style-card-right { transform: translate3d(calc(var(--drag-x) + var(--spread)), 5px, -105px) rotateY(-31deg) scale(.91); }
.style-card-center { z-index: 2; transform: translate3d(var(--drag-x), 0, 0); }
.style-card-back { z-index: 0; transform: translate3d(var(--drag-x), 10px, -255px) scale(.75); opacity: 0; pointer-events: none; }
.deck.is-dragging .style-card { transition: none; }
@media (hover: hover) and (pointer: fine) {
  .deck:not(.is-dragging) .style-card-center:hover { transform: translate3d(0, -5px, 0); }
}
.style-photo, .style-card-wash { display: block; width: 100%; height: 100%; }
.style-photo, .image-preview, .personal-image { object-fit: cover; }
.style-video {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 40%; pointer-events: none;
  opacity: 0; transition: opacity .22s ease;
}
.style-video.is-playing { opacity: 1; }
.style-card-wash {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, #101b20e0, #101b203b 33%, transparent 58%);
}
.style-caption {
  position: absolute; bottom: 21px; left: 23px; right: 19px; z-index: 1;
  display: flex; flex-direction: column; gap: 3px; color: #fffefa; text-align: left;
  text-shadow: 0 2px 8px #12202c7d;
  transition: opacity .42s ease;
}
.style-caption small { font-size: 12px; opacity: .9; }
.style-card-title { font: 500 clamp(21px, 2.5vw, 32px)/1.04 var(--serif); letter-spacing: -.035em; }
.style-card-left .style-caption { right: 40%; }
.style-card-right .style-caption { left: 40%; text-align: right; }
.style-card-left .style-card-title, .style-card-right .style-card-title { font-size: clamp(18px, 1.85vw, 26px); }
.shelf-details { width: 100%; max-width: 392px; margin: 0 auto; }
.deck-navigation { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 45px; margin: 6px 0; }
.deck-arrow, .editor-close, .wallet-close {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  flex: none; border-radius: 50%; background: rgba(255, 255, 255, .72);
  font-size: 30px; line-height: 1;
}
.deck-arrow { background: transparent; color: var(--ink); }
.shelf-position { display: flex; gap: 3px; color: var(--ink); }
.deck-dot { display: grid; place-items: center; width: 31px; height: 44px; border-radius: 99px; }
.deck-dot::before {
  content: ""; display: block; width: 21px; height: 4px; border-radius: 99px;
  background: currentColor; opacity: .29; transform: scaleX(.78); transition: transform .38s var(--motion), opacity .38s ease;
}
.deck-dot[aria-current="true"]::before { opacity: .88; transform: scaleX(1.3); }
.shelf-actions { display: flex; justify-content: center; gap: 9px; }
.make-template, .blank-button {
  display: flex; align-items: center; justify-content: center; gap: 13px;
  min-height: 52px; padding: 0 20px; border-radius: 29px; font-size: 14px; font-weight: 700;
  transition: transform .32s var(--motion), background-color .42s ease;
}
.make-template { color: #fffefa; background: var(--accent); box-shadow: 0 15px 24px -15px #182c42a3, inset 0 1px 0 #ffffff44; }
.make-template:active, .blank-button:active, .primary:active { transform: scale(.97); }
.blank-button { color: var(--accent); }

.workspace-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  max-width: 392px; margin: 15px auto 0;
}
.workspace-link {
  min-height: 49px; width: 100%; min-width: 0; border-radius: 25px; padding: 0 12px;
  display: flex; gap: 5px; align-items: center; justify-content: flex-start; white-space: nowrap;
}
.workspace-link .section-title {
  min-width: 0; margin-right: auto; overflow: hidden; text-overflow: ellipsis; font-size: 13px;
}
.link-arrow { flex: none; font-size: 20px; line-height: 1; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job-summary-tail { display: flex; align-items: center; gap: 9px; }
.fold-arrow {
  display: inline-block; flex: none; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 290ms cubic-bezier(.2, .82, .22, 1);
}
.fold-arrow.is-expanded { transform: rotate(225deg) translate(-1px, -1px); }
.section-title { font-size: 15px; font-weight: 740; }
.muted, .empty, .job-meta, .entry-time { color: var(--muted); font-size: 12px; }
.empty { padding-top: 10px; }
.history-empty { padding: 2px 0 14px; }
.job-fold {
  display: grid; grid-template-rows: 0fr; opacity: 0; pointer-events: none;
  transition: grid-template-rows 320ms cubic-bezier(.2, .82, .22, 1), opacity 240ms ease;
}
.job-fold.is-expanded { grid-template-rows: 1fr; opacity: 1; pointer-events: auto; }
.fold-clip { min-height: 0; overflow: hidden; }
.job { border-top: 1px solid var(--line); }
.job-summary {
  width: 100%; text-align: left; min-height: 57px; padding: 7px 4px 7px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.job-main { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.job-title { font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 670; }
.job-status { color: #325b4f; font-size: 12px; font-weight: 700; white-space: nowrap; }
.job-details {
  padding: 10px 12px; margin: 1px 0 10px; border-radius: 13px;
  background: rgba(255, 255, 255, .48);
}
.job-prompt { display: block; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 6px; }
.progress { height: 4px; margin-top: 9px; border-radius: 5px; background: rgba(49, 90, 79, .15); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 5px; background: #477668; transition: width 320ms ease; }

.editor-overlay, .wallet-overlay, .history-overlay, .personal-overlay,
.editor-scrim, .wallet-scrim, .history-scrim, .personal-scrim { position: fixed; inset: 0; }
.editor-overlay { z-index: 5; }
.history-overlay, .personal-overlay { z-index: 7; }
.wallet-overlay { z-index: 8; }
.editor-scrim, .wallet-scrim, .history-scrim, .personal-scrim {
  background: rgba(23, 44, 41, .24);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: scrim-in 330ms ease both;
}
.editor-panel, .wallet-panel, .library-panel {
  position: absolute;
  background: rgba(250, 252, 250, .86);
  backdrop-filter: blur(18px) saturate(1.22);
  -webkit-backdrop-filter: blur(18px) saturate(1.22);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 26px 68px -25px #18374866, inset 0 1px 0 #ffffff65;
  color: var(--ink);
  --panel-x: 0px;
  animation: panel-in 365ms cubic-bezier(.2, .82, .22, 1) both;
}
.editor-panel {
  top: 76px; right: var(--dock-inset); bottom: 26px; left: auto;
  width: var(--dock-width); max-width: none;
  height: calc(100dvh - 102px);
  background: linear-gradient(180deg, #fffdf477, #ffffff6b 52%, #fffcf482);
  border-radius: 31px; overflow: hidden; transform-origin: right center;
  animation: dock-in .52s var(--motion) both;
  display: flex; flex-direction: column;
}
@media (min-width: 900px) {
  .page:has(#editor[open]:not(.is-closing)) .shelf-stage {
    transform: translateX(calc((var(--dock-width) + var(--dock-inset)) / -2));
  }
  .page::after {
    content: ""; position: fixed; inset: 0; z-index: 3;
    background: #15344016; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  }
  .page:has(#editor[open]:not(:modal, .is-closing))::after { opacity: 1; }
}
@keyframes dock-in {
  from { transform: translate3d(36px, 0, 0) scale(.986); opacity: 0; }
  to { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
}
@keyframes dock-out {
  from { transform: translate3d(0, 0, 0); opacity: 1; }
  to { transform: translate3d(28px, 0, 0) scale(.988); opacity: 0; }
}
.is-closing .editor-scrim, .is-closing .wallet-scrim, .is-closing .history-scrim, .is-closing .personal-scrim { animation: scrim-out 230ms ease both; }
.is-closing .editor-panel, .is-closing .wallet-panel, .is-closing .library-panel {
  animation: panel-out 230ms cubic-bezier(.42, 0, .6, 1) both;
  pointer-events: none;
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrim-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes panel-in {
  from { transform: translate(var(--panel-x), 28px) scale(.985); opacity: 0; }
  to { transform: translate(var(--panel-x), 0) scale(1); opacity: 1; }
}
@keyframes panel-out {
  from { transform: translate(var(--panel-x), 0) scale(1); opacity: 1; }
  to { transform: translate(var(--panel-x), 20px) scale(.985); opacity: 0; }
}
.editor-heading {
  display: flex; align-items: center; flex: none; gap: 10px;
  min-height: 75px; padding: 14px 17px 10px 20px;
}
.editor-cover { width: 42px; height: 54px; border-radius: 10px; object-fit: cover; flex: none; }
.editor-heading-text { flex: 1; min-width: 0; }
.editor-kicker { font-size: 12px; color: var(--muted); }
.editor-title { font: 500 clamp(23px, 2.3vw, 31px)/1.05 var(--serif); letter-spacing: -.035em; overflow-wrap: anywhere; }
.editor-wallet { min-height: 42px; border-radius: 23px; padding: 0 9px; background: #ffffff6f; color: var(--accent); white-space: nowrap; font-size: 12px; }
.editor-close, .wallet-close { font-size: 22px; color: var(--accent); }
.editor-close { background: #ffffff8a; }
.editor-body { flex: 1; min-height: 0; width: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.editor-group { padding: 10px 20px; }
.editor-group .section-title { color: var(--muted); font-size: 12px; font-weight: 740; letter-spacing: .055em; text-transform: uppercase; }
.sample-video { width: 100%; max-height: 245px; border-radius: 15px; margin-top: 8px; background: #203433; }
.prompt {
  display: block; width: 100%; height: 108px; min-height: 82px; margin-top: 8px; padding: 12px 13px;
  border: 1px solid var(--glass-edge); border-radius: 17px; background: #ffffff70;
  color: var(--ink); font-size: 13px; line-height: 1.55;
}
.placeholder { color: var(--muted); }
.image-scroll { margin-top: 8px; width: 100%; overflow-x: auto; }
.image-list { display: flex; gap: 8px; align-items: flex-start; }
.image-item { flex: 0 0 82px; position: relative; }
.image-preview { display: block; width: 82px; height: 70px; border-radius: 12px; background: #d5e2d9; }
.image-remove {
  position: absolute; top: 2px; right: 2px; border-radius: 50%; width: 25px; height: 25px;
  color: #fff; background: rgba(21, 44, 37, .77); font-size: 15px;
}
.image-replace { min-height: 36px; width: 100%; border-radius: 10px; color: var(--accent); font-size: 12px; }
.media-button {
  flex: 0 0 80px; height: 70px; border: 1px dashed #58788198; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--accent); background: rgba(255, 255, 255, .48); font-size: 12px;
}
.audio-add { min-height: 37px; padding: 0 9px; color: var(--accent); font-size: 12px; font-weight: 700; border-radius: 18px; background: rgba(255, 255, 255, .65); }
.audio-empty { margin-top: 4px; }
.audio-item { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.audio-item + .audio-item { border-top: 1px solid var(--line); }
.audio-play { width: 40px; height: 36px; flex: none; border-radius: 18px; color: var(--accent); background: rgba(255, 255, 255, .79); }
.audio-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.audio-replace, .audio-remove { min-width: 42px; min-height: 42px; color: var(--accent); font-size: 12px; }
.audio-remove { font-size: 20px; }
.spec-group { border-bottom: 0; }
.spec-line { display: flex; align-items: center; gap: 11px; margin-top: 7px; }
.spec-label { min-width: 33px; color: var(--muted); font-size: 12px; }
.choices { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.option {
  padding: 0 11px; min-height: 35px; border-radius: 19px; font-size: 12px;
  color: var(--muted); background: rgba(255, 255, 255, .65);
}
.option.selected { color: #fffdf4; background: #3b6260; font-weight: 740; }
button[disabled] { opacity: .5; }
.editor-footer { flex: none; padding: 12px 19px 16px; background: #ffffff39; border-top: 1px solid #ffffff80; }
.generate-bar { display: grid; gap: 7px; }
.generate-bar .primary { width: 100%; }
.quote { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 8px; padding: 0 3px; }
.quote-spec { font-size: 13px; font-weight: 750; }
.quote-balance { color: var(--muted); font-size: 12px; }
.form-notice, .low-balance { color: #8b3e46; }
.form-notice { font-size: 12px; margin: 0 0 7px; }
.editor-tools { display: flex; gap: 7px; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.save-template, .editor-records {
  min-height: 37px; padding: 0 11px; border-radius: 20px; color: var(--accent);
  font-size: 12px; font-weight: 700; background: #ffffff78;
}
.editor-records { margin-left: auto; }
.submission-receipt, .personal-notice {
  padding: 6px 9px; margin-bottom: 7px; border-radius: 9px;
  color: #355b4f; background: rgba(224, 238, 228, .77); font-size: 12px;
}
.primary {
  display: flex; gap: 9px; min-height: 47px; align-items: center; justify-content: center;
  padding: 0 13px; border-radius: 26px; background: var(--accent); color: #fffaf0;
  font-size: 14px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 14px 24px -17px #193041a6, inset 0 1px 0 #ffffff3b;
  transition: transform .32s var(--motion), background-color .42s ease;
}
.primary-cost { border-left: 1px solid rgba(255, 255, 255, .36); padding-left: 9px; font-size: 12px; }

.wallet-panel {
  top: 6vh; right: 20px; width: calc(100% - 40px); max-width: 365px; max-height: 88vh;
  overflow: auto; padding: 16px 17px 22px; border-radius: 29px;
}
.wallet-title { font-size: 24px; font-weight: 750; }
.wallet-total { padding: 12px 0; }
.wallet-balance { font-size: 48px; font-weight: 760; letter-spacing: -.04em; }
.wallet-buy {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-height: 48px; width: 100%; padding: 0 13px; border-radius: 24px;
  background: var(--accent); color: #fffaf0; font-size: 13px; font-weight: 700;
}
.wallet-history-title { margin: 15px 0 4px; }
.wallet-entry { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.entry-info { display: flex; flex-direction: column; gap: 3px; }
.entry-label { font-size: 13px; }
.entry-amount { font-size: 14px; font-weight: 740; white-space: nowrap; }
.entry-gain { color: #276b4e; }

.library-panel {
  top: 10vh; left: 50%; width: calc(100% - 34px); max-width: 510px; max-height: 80vh;
  --panel-x: -50%; transform: translateX(-50%); border-radius: 28px; overflow: hidden;
  display: flex; flex-direction: column;
}
.library-heading {
  padding: 12px 15px 10px 17px; flex: none; display: flex;
  align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line);
}
.library-title { display: block; font-weight: 740; font-size: 22px; line-height: 1.3; }
.library-count { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.library-close {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .72);
  color: var(--accent); font-size: 22px;
}
.library-body { max-height: 61vh; flex: 1; min-height: 0; padding: 0 15px; overflow-y: auto; }
.library-body .job:first-child { border-top: 0; }
.library-footer { flex: none; padding: 9px 15px 12px; border-top: 1px solid var(--line); }
.new-template {
  min-height: 45px; width: 100%; border-radius: 24px;
  color: #fffaf0; background: var(--accent); font-size: 14px; font-weight: 700;
}
.personal-empty, .history-empty { padding: 14px 0; }
.personal-item {
  display: flex; align-items: center; width: 100%; gap: 10px; padding: 9px 0;
  text-align: left; border-bottom: 1px solid var(--line); min-height: 69px;
}
.personal-cover {
  width: 49px; height: 49px; flex: none; border-radius: 11px; overflow: hidden; background: #d9e9df;
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.personal-image { width: 100%; height: 100%; }
.personal-item-copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.personal-item-title { font-weight: 730; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.personal-meta, .personal-use { color: var(--muted); font-size: 11px; white-space: nowrap; }
.personal-use { font-weight: 700; }

@media (max-width: 600px) {
  .shelf-content { padding: max(12px, env(safe-area-inset-top)) 13px 26px; }
  .studio-bar { min-height: 47px; }
  .brand { font-size: 21px; gap: 7px; }
  .brand-mark { width: 31px; height: 31px; }
  .top-actions { gap: 2px; }
  .balance, .history-link { padding: 0 9px; min-height: 44px; }
  .shelf-screen { padding: 23px 0 0; }
  .shelf-title { font-size: clamp(29px, 8.8vw, 42px); }
  .shelf-subtitle { font-size: 13px; }
  .deck { --card-width: clamp(165px, 56vw, 278px); --spread: calc(var(--card-width) * .46); margin-top: 20px; perspective: 930px; }
  .style-card { border-radius: 23px; }
  .style-caption { left: 13px; right: 12px; bottom: 15px; }
  .style-card-title { font-size: clamp(19px, 5.4vw, 29px); }
  .style-caption small { font-size: 11px; }
  .style-card-left .style-caption, .style-card-right .style-caption { opacity: 0; }
  .shelf-details { max-width: 346px; }
  .workspace-links { margin-top: 14px; max-width: 346px; }
  .editor-heading { min-height: 70px; padding: 10px 10px 8px 14px; }
  .editor-group { padding: 10px 13px; }
  .editor-footer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .wallet-panel { right: 10px; width: calc(100% - 20px); }
  .library-panel {
    top: auto; bottom: 0; left: 0; width: 100%; max-width: none; max-height: 83vh;
    --panel-x: 0px; transform: none; border-radius: 26px 26px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}
@media (max-width: 350px) {
  .history-link { padding: 0 4px; }
  .balance { min-width: 0; }
  .balance:has(.numeric-pill:not(:empty)) { flex-direction: column; gap: 2px; padding: 0 7px; font-size: 11px; }
  .balance .numeric-pill:not(:empty) {
    display: block; min-width: 0; max-width: 100%; min-height: 17px; padding-inline: 4px;
    overflow: hidden; text-overflow: ellipsis; line-height: 17px;
  }
  .brand-mark { width: 25px; height: 25px; }
  .make-template, .blank-button { padding-inline: 13px; }
  .workspace-link { gap: 4px; padding: 0 7px; }
  .workspace-link .section-title { font-size: 12px; }
  .workspace-link .numeric-pill { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .page, .shelf-stage, .ambient-scene, .style-card, .style-video, .style-caption, .deck-dot::before, .make-template,
  .blank-button, .primary, .job-fold, .fold-arrow, .progress-fill {
    transition-duration: 1ms; transition-delay: 0s;
  }
  .editor-scrim, .wallet-scrim, .editor-panel, .wallet-panel,
  .history-scrim, .personal-scrim, .library-panel,
  .is-closing .editor-scrim, .is-closing .wallet-scrim, .is-closing .editor-panel, .is-closing .wallet-panel,
  .is-closing .history-scrim, .is-closing .personal-scrim, .is-closing .library-panel {
    animation-duration: 1ms;
  }
}

.preview-note { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.site-footer { margin: 14px auto 0; text-align: center; }
.site-footer .preview-note { margin: 0 0 6px; }
.footer-links, .account-actions { display: flex; flex-wrap: wrap; gap: 7px 14px; }
.footer-links { justify-content: center; }
.footer-links a { color: var(--ink, #253a38); font-size: 12px; text-underline-offset: 3px; }
.utility-retry { align-self: flex-start; margin: 0 17px 12px; }
.checkout-link { display: inline-block; margin-top: 12px; color: var(--accent); text-underline-offset: 3px; }
.site-notice {
  position: fixed; z-index: 2; bottom: 20px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 30px); padding: 10px 15px; border: 1px solid var(--line);
  border-radius: 20px; text-align: center; background: #f8fff8; box-shadow: 0 6px 24px #253a3826;
}
dialog { margin: 0; padding: 0; position: fixed !important; }
dialog:not([open]) { display: none; }
dialog::backdrop { background: rgba(23, 44, 41, .24); backdrop-filter: blur(6px); animation: scrim-in 300ms ease both; }
dialog.is-closing { animation: panel-out 220ms cubic-bezier(.42, 0, .6, 1) both; }
dialog.is-closing::backdrop { animation: scrim-out 220ms ease both; }
#editor { z-index: 5; }
#editor::backdrop { background: #15344016; backdrop-filter: none; }
#editor.is-closing { animation: dock-out 220ms ease both; }
.editor-form { min-height: 0; display: flex; flex-direction: column; flex: 1; }
.prompt { resize: vertical; }
.settings-fields { display: flex; gap: 10px; margin-top: 8px; }
.settings-fields label { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
.settings-fields select, .utility-form input {
  display: block; width: 100%; min-height: 36px; margin-top: 4px; padding: 5px 8px;
  border: 1px solid var(--glass-edge); border-radius: 11px; background: #ffffff85;
}
.image-view { display: block; }
.wallet-packs { display: grid; gap: 8px; margin: 15px 0 8px; }
.wallet-buy { text-align: left; }
.utility-body { padding: 15px 17px; }
.utility-body p { margin-bottom: 10px; }
#account-email { overflow-wrap: anywhere; }
.utility-notice { padding: 0 17px 10px; }
.utility-form { display: grid; gap: 12px; }
.utility-form p { margin-bottom: 0; }
.utility-form button[type="submit"] { justify-self: start; }
.utility-form label { color: var(--muted); }
.utility-form input { min-height: 44px; }
.preview-image { display: block; width: 100%; max-height: 65vh; object-fit: contain; }
.job-status.failed { color: #8b3e46; }
.job-status.queued, .job-status.running, .job-status.review { color: #62501f; }
.form-notice { color: #8b3e46; }
.review-message {
  margin: 9px 0;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.appeal-form, .review-decision { display: grid; gap: 10px; }
.appeal-form label, .review-decision label { color: var(--muted); }
.review-input {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff9c;
  color: var(--ink);
  resize: vertical;
}
.appeal-form .primary { justify-self: start; }
.appeal-form .primary:disabled, .review-decision button:disabled { opacity: .6; }
.review-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
}
.review-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.review-page {
  background: radial-gradient(ellipse at 76% 2%, #fff8e9, transparent 62%), #e5edf0;
}
.review-shell {
  width: min(100% - 30px, 760px);
  margin: 0 auto;
  padding: 18px 0 38px;
}
.review-shell .brand { text-decoration: none; }
.review-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0 15px;
}
.review-heading h1 { font: 500 clamp(29px, 6vw, 40px)/1.1 var(--serif); }
.review-list { display: grid; gap: 13px; }
.review-card {
  min-width: 0;
  padding: clamp(15px, 3vw, 23px);
  border: 1px solid var(--glass-edge);
  border-radius: 20px;
  background: #ffffffa1;
  box-shadow: 0 12px 32px -25px #213d5299;
}
.review-card h2 { font-size: 16px; }
.review-card .job-meta { margin-top: 4px; overflow-wrap: anywhere; }
.review-card .sample-video { max-height: 350px; }
.review-decision { margin-top: 15px; }
.review-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.review-actions .save-template { min-height: 44px; }
.review-actions .reject-appeal { color: #8b3e46; }
.review-shell > .form-notice { margin-bottom: 13px; }
@media (max-width: 899px) {
  .editor-panel {
    top: auto; right: 0; bottom: 0; left: 0; width: 100%; height: min(92dvh, 760px);
    border-radius: 28px 28px 0 0; transform-origin: center bottom;
    background: linear-gradient(180deg, #fffdf4bc, #ffffff91 52%, #fffcf4b8);
    animation: panel-in .44s var(--motion) both;
  }
  #editor::backdrop { background: #16374528; }
  #editor.is-closing { animation-name: panel-out; }
}
@media (max-width: 600px) {
  .utility-panel { max-height: 83dvh; overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) {
  #editor, #editor.is-closing, dialog::backdrop, dialog.is-closing { animation-duration: 1ms; }
  .page::after { transition-duration: 1ms; }
}

.information-page {
  width: min(740px, calc(100% - 28px)); margin: 24px auto; padding: clamp(18px, 4vw, 38px);
  color: #253a38; background: #f6faf6; border: 1px solid #fff; border-radius: 28px;
  box-shadow: 0 20px 55px rgba(24, 47, 44, .12); line-height: 1.55;
}
.information-page a { color: #264d4d; text-underline-offset: 3px; }
.information-page .brand { display: inline-flex; color: #2b1b33; text-decoration: none; }
.information-page .brand:hover { text-decoration: underline; }
.information-page h1 { font: 700 clamp(32px, 7vw, 50px)/1.2 Georgia, serif; margin: 12px 0 10px; }
.information-page h2 { font-size: 19px; margin: 16px 0 6px; }
.information-page p { margin: 0 0 10px; }
.information-page .footer-links { justify-content: flex-start; margin-top: 22px; }
.info-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0; }
.info-pack { border: 1px solid #d5e3da; background: #fff; border-radius: 18px; padding: 12px 16px; }
.info-pack h2 { margin: 0 0 5px; }
.info-pack p { margin: 0; }
