:root {
  color-scheme: light;
  --page: #f5f4ee;
  --panel: #fffefa;
  --text: #232720;
  --muted: #606359;
  --line: #dedfd3;
  --accent: #d8f084;
  --dark: #252d21;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.frame-currency-icon { color: var(--accent); vertical-align: middle; flex-shrink: 0; }
.video-crop-dialog { width: min(94vw, 36rem); max-height: 92vh; padding: 1.25rem; border: 0; border-radius: 1rem; }
.video-crop-dialog::backdrop { background: rgb(0 0 0 / 65%); }
.video-crop-preview { position: relative; width: fit-content; max-width: 100%; margin: 0.75rem auto; overflow: hidden; }
.video-crop-preview img { display: block; max-width: 100%; max-height: 43vh; }
.video-crop-preview span { position: absolute; inset: 0; outline: 2px solid white; box-shadow: 0 0 0 100vmax rgb(0 0 0 / 55%); pointer-events: none; }
.video-crop-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; }
.video-crop-controls input { display: block; width: 100%; }
.video-crop-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }
.video-crop-actions .video-crop-apply { background: var(--accent); color: #17200d; }
body { margin: 0; background: var(--page); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #5b762c; outline-offset: 3px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem max(1.25rem, calc((100% - 1120px) / 2)); background: var(--dark); color: #fff; }
.brand { display: flex; align-items: center; font-size: 1.65rem; font-weight: 850; letter-spacing: -.08em; }
.mark { display: grid; place-items: center; width: 35px; height: 35px; margin-right: .55rem; background: var(--accent); color: var(--dark); border-radius: 10px; font-size: 1.2rem; }
.brand-accent, .balance > span:first-child { color: var(--accent); }
nav { display: flex; gap: .3rem; }
nav a, .balance { padding: .55rem .8rem; border-radius: .55rem; font-size: .9rem; }
nav a[aria-current="page"], .balance:hover { background: #424a3f; }
.balance { border: 1px solid #65715e; white-space: nowrap; }
main { max-width: 1160px; margin: auto; padding: 2.4rem 1.25rem 4rem; }
.intro { margin-bottom: 1.7rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 4.7rem); line-height: 1; letter-spacing: -.075em; font-weight: 820; }
h1 span { color: #65832c; }
.intro p { color: var(--muted); margin-top: .75rem; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: .7rem; margin-bottom: 1rem; }
.mode { display: grid; justify-items: start; text-align: left; gap: .2rem; border: 1px solid var(--line); background: var(--panel); border-radius: .85rem; padding: .85rem; }
.mode:hover { border-color: #83916f; }
.mode.selected { background: var(--accent); border-color: #849a44; }
.mode-icon, .upload-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: .5rem; background: #e8ebdd; font-size: 1.3rem; margin-bottom: .15rem; }
.selected .mode-icon { background: #eff8cd; }
small { font-size: .875rem; color: var(--muted); }
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 1rem; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 3vw, 1.4rem); }
h2 { font-size: 1.25rem; letter-spacing: -.035em; }
.muted { color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.drop { cursor: pointer; display: grid; justify-items: center; text-align: center; padding: 1rem .5rem; background: #f5f6ef; border: 1px dashed #9da38f; border-radius: .7rem; margin: .8rem 0 .4rem; }
.drop.over, .drop:focus-within { background: #e9f4ce; }
#generation:has(#files:focus-visible) .drop { outline: 3px solid #5b762c; outline-offset: 3px; }
.drop small { margin-top: .25rem; }
.thumbs { display: flex; flex-wrap: wrap; gap: .4rem; }
.thumb { position: relative; margin: .35rem 0; }
.thumb img { display: block; width: 60px; height: 60px; object-fit: cover; border-radius: .4rem; }
.thumb button { position: absolute; top: 0; right: 0; width: 24px; height: 24px; padding: 0; border: 0; border-radius: .35rem; background: var(--dark); color: white; }
.thumb .replace-source-photo { position: static; width: 100%; height: auto; margin-top: .25rem; padding: .25rem; font-size: .75rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
label:not(.drop) { display: block; margin: .65rem 0 .3rem; font-size: .875rem; font-weight: 650; }
input:not([type=file]), textarea, select { padding: .53rem .7rem; border: 1px solid #c9cdbf; border-radius: .55rem; background: #fff; width: 100%; }
textarea { display: block; resize: vertical; }
.options { display: flex; gap: .75rem; }
.options > div { flex: 1; }
.generate { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .45rem; width: 100%; padding: .7rem; border-radius: .6rem; border: 1px solid #afc36c; background: var(--accent); font-weight: 750; margin-top: .9rem; }
.generate:hover:not(:disabled) { background: #c9e76e; }
.generate:disabled { opacity: .58; cursor: default; }
#cost { font-size: .85rem; font-weight: 600; }
.message, .job-error { color: #8c392b; font-size: .875rem; margin-top: .65rem; }
.results { min-height: 390px; }
.job-list { display: grid; gap: .7rem; margin-top: .7rem; }
.history { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.empty { display: grid; place-content: center; text-align: center; color: var(--muted); min-height: 300px; padding: 1rem; background: #f5f6ef; border-radius: .7rem; }
.empty-icon { color: #688240; font-size: 2rem; }
.job { background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; padding: .75rem; overflow: hidden; }
.job-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.job-header h3 { font-size: 1rem; overflow-wrap: anywhere; }
.job-version { display: block; color: var(--muted); margin-top: .2rem; }
.job-status { font-size: .875rem; white-space: nowrap; padding: .15rem .45rem; background: #edf0e3; border-radius: .4rem; }
.job[data-status="done"] .job-status { background: #e5f3be; }
.job[data-status="failed"] .job-status { background: #f5e1de; }
.job-output img, .job-output video { width: 100%; max-height: 420px; object-fit: contain; display: block; margin-top: .6rem; background: #f1f1ea; border-radius: .5rem; }
.job-output a { display: inline-block; font-weight: 700; text-decoration: underline; padding-top: .5rem; }
.account { max-width: 500px; }
.account-balance { font-size: 2rem; font-weight: 800; }
.selected-layout { margin: .55rem 0 0; }
.selected-layout figcaption { margin-top: .3rem; font-size: .85rem; }
.selected-template-preview:not([hidden]) { display: block; width: min(100%, 150px); height: auto; max-height: 200px; object-fit: contain; border: 1px solid var(--line); border-radius: .55rem; }
.account-ledger { margin-top: 1rem; }
.admin-table-scroll { overflow-x: auto; }
#admin-accounts { width: 100%; border-collapse: collapse; text-align: left; }
#admin-accounts :is(td, th) { padding: .6rem; border-bottom: 1px solid var(--line); }
#admin-accounts form { display: flex; align-items: center; gap: .45rem; }
#admin-accounts input { width: 6rem; }
#admin-pagination { display: flex; gap: .5rem; margin-top: 1rem; }
.admin-prompt { white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-export { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem 1rem; }
#admin-user-history details { margin: .55rem 0; }
#admin-user-history summary { cursor: pointer; }
#account-ledger-list { list-style: none; padding: 0; margin: 0; }
#account-ledger-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .75rem; padding: .65rem 0; border-top: 1px solid var(--line); }
#account-ledger-list small { grid-column: 1 / -1; }
#account-identity { overflow-wrap: anywhere; }
.product-fields { min-width: 0; border: 1px solid var(--line); border-radius: .65rem; margin: .85rem 0 0; padding: .65rem .75rem; }
.product-fields summary { cursor: pointer; font-weight: 700; }
.product-fields legend { font-weight: 700; padding-inline: .35rem; }
.secondary { background: #edf0e3; border: 1px solid #c9cdbf; border-radius: .5rem; padding: .38rem .64rem; font-weight: 650; }
.secondary:hover:not(:disabled) { background: var(--accent); }
.secondary:disabled { opacity: .58; cursor: default; }
#analyze { margin-top: .55rem; }
.job-output .secondary { display: inline-block; margin: .55rem .6rem 0 0; }
#card-editor { width: min(810px, calc(100vw - 1.5rem)); max-height: 92vh; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; }
#card-editor::backdrop { background: #1c211bb0; }
.editor-heading { display: flex; justify-content: space-between; gap: .75rem; align-items: center; margin-bottom: .8rem; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 1rem; align-items: start; }
#card-preview { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #edf0e3; border-radius: .5rem; }
#editor-comparison-frames:has(#editor-source-frame:not([hidden])) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
#editor-comparison-frames p { margin: 0 0 .35rem; font-size: .85rem; }
#editor-source-photo { display: block; width: 100%; max-height: 40vh; object-fit: contain; border-radius: .5rem; background: #edf0e3; }
#editor-source-file { max-width: 100%; }
.editor-thumbnail { margin: .65rem 0; }
.editor-thumbnail canvas { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: .4rem; }
.editor-thumbnail figcaption { margin-top: .35rem; font-size: .85rem; }
#editor-review h3 { margin-top: 0; }
#editor-review-claims { list-style: none; margin: 0; padding: 0; }
#editor-review-claims label { display: flex; align-items: flex-start; gap: .55rem; overflow-wrap: anywhere; }
#editor-review-claims input { width: auto; flex: none; margin: .25em 0 0; }
.editor-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.plan-button { margin-top: .65rem; }
.plan-slide { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .7rem; }
.set-slides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: .65rem; margin-top: .75rem; }
.set-slide { min-width: 0; border: 1px solid var(--line); border-radius: .65rem; padding: .65rem; }
.set-slide > h3 { font-size: .95rem; margin-bottom: .35rem; }
.set-slide > button { margin-top: .45rem; }
.set-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.plan-slide-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.plan-slide-actions .secondary { font-size: .875rem; }
.set-slide .set-run-option input { width: auto; margin: 0 .4rem 0 0; vertical-align: middle; }
#set-plan-editor { width: min(670px, calc(100vw - 1.5rem)); max-height: 92vh; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: .9rem; padding: 1rem; }
#set-plan-editor::backdrop { background: #1c211bb0; }
.template-image { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: .55rem; margin: .55rem 0; background: #edf0e3; }
.template-card button { margin-top: .65rem; }
.preset-library { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: .75rem; margin-top: .7rem; }
.preset-card { display: flex; flex-direction: column; gap: .5rem; min-width: 0; padding: .65rem; }
.preset-card h3 { font-size: 1.05rem; line-height: 1.2; }
.preset-card canvas { display: block; width: 100%; aspect-ratio: 3/4; object-fit: contain; border-radius: .55rem; background: #e6e9e1; }
.preset-card button { margin-top: auto; align-self: flex-start; }
.preset-card .preset-preview { display: block; width: 100%; padding: 0; border: 0; margin: 0; background: transparent; }
.preset-card .preset-preview:hover { outline: 2px solid #879d65; outline-offset: 2px; border-radius: .55rem; }
#template-preview { width: min(460px, calc(100vw - 1.5rem)); max-height: 94vh; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: .9rem; padding: 1rem; }
#template-preview::backdrop { background: #1c211bb0; }
#template-preview-image { width: 100%; max-height: 70vh; object-fit: contain; display: block; border-radius: .5rem; }
.saved-template-section { margin-top: 1.5rem; }
.saved-template-section .empty { min-height: 125px; }
.step-upload { display: grid; gap: .3rem; padding-bottom: .45rem; }
.step-upload input { width: 100%; }
.step-upload img { width: 92px; height: 66px; object-fit: cover; border-radius: .35rem; }
.step-upload button { justify-self: start; }
#editor-dimensions input[type="range"], .callout-fields input[type="range"] { width: 100%; padding: 0; }
#replacement-fields { margin: 0 0 .85rem; }
#replacement-file { max-width: 100%; }
#replacement-preview { display: block; width: 92px; height: 110px; object-fit: contain; border-radius: .45rem; margin-top: .5rem; background: #edf0e3; }
.reference-form { max-width: 520px; }
.reference-form input[type="file"] { max-width: 100%; }
.reference-form input[type="checkbox"] { width: auto; margin: 0 .4rem 0 0; vertical-align: middle; }
.reference-library-link { display: inline-block; font-size: .9rem; text-decoration: underline; margin-top: .5rem; }
#reference-preview { display: block; width: 110px; max-height: 100px; object-fit: contain; margin-top: .5rem; border-radius: .45rem; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .45rem; }
.project-create .project-actions input { flex: 1 1 230px; }
.project-history-heading { margin-top: 1.4rem; }
.project-expenses { margin-top: 1rem; }
.project-expenses summary { cursor: pointer; font-weight: 700; }
#project-expense-list { list-style: none; padding: 0; margin: 0; }
#project-expense-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .75rem; padding: .65rem 0; border-top: 1px solid #deded1; }
#project-expense-list small { grid-column: 1 / -1; overflow-wrap: anywhere; }
.project-tile a { display: inline-block; margin-top: .6rem; }
#project-photos img { width: 68px; height: 68px; object-fit: cover; border-radius: .4rem; }
.callout-fields + .callout-fields { border-top: 1px solid var(--line); margin-top: .5rem; }
.benefit-suggestions { margin-top: .75rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.benefit-suggestions h3 { font-size: 1rem; }
.benefit-suggestions ul { list-style: none; padding: 0; margin: .45rem 0 0; }
.benefit-suggestions li { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .45rem; padding: .5rem 0; }
.benefit-suggestions small { display: block; color: var(--muted); }
.frame-list, .frame-comparison { display: grid; gap: .55rem; margin-top: .65rem; }
.frame-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; border-top: 1px solid var(--line); padding-top: .45rem; }
.frame-row span { overflow-wrap: anywhere; min-width: 0; }
.frame-comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.frame-comparison figure { margin: 0; }
.frame-comparison img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: .45rem; background: #edf0e3; display: block; }
.frame-comparison figcaption { margin-top: .3rem; font-size: .875rem; }
.frame-comparison button { justify-self: start; grid-column: 1 / -1; }
@media (max-width: 600px) {
  .top { flex-wrap: wrap; }
  .top nav { order: 2; width: 100%; justify-content: center; flex-wrap: wrap; }
}
@media (max-width: 600px) { .editor-layout { grid-template-columns: 1fr; } #card-preview { max-height: 40vh; } }
@media (max-width: 730px) { .workbench { grid-template-columns: 1fr; } }
@media (max-width: 475px) { .top { gap: .4rem; padding-inline: .65rem; } .balance, nav a { padding-inline: .4rem; } .balance > span:last-child { display: none; } .modes { grid-template-columns: repeat(2, 1fr); } }

@media (prefers-reduced-motion: no-preference) {
  :root {
    --motion-ease: cubic-bezier(.2, .75, .25, 1);
    --motion-fast: 160ms;
    --motion-enter: 290ms;
  }

  .view:not([hidden]) > .intro { animation: studio-enter var(--motion-enter) var(--motion-ease) both; }
  .view:not([hidden]) > :is(.modes, .workbench, .set-slides, .preset-library) {
    animation: studio-enter var(--motion-enter) var(--motion-ease) 35ms both;
  }

  nav a, .balance, .mode, .secondary, .generate, .drop, .preset-card {
    transition: background-color var(--motion-fast), border-color var(--motion-fast),
      box-shadow var(--motion-fast), transform var(--motion-fast) var(--motion-ease);
  }
  nav a { position: relative; }
  nav a::after {
    content: "";
    position: absolute;
    inset: auto .8rem 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 230ms var(--motion-ease);
  }
  nav a[aria-current="page"]::after { transform: scaleX(1); }
  .mode-icon, .upload-icon { transition: transform 220ms var(--motion-ease), background-color var(--motion-fast); }
  .mode.selected .mode-icon { transform: rotate(-6deg); }
  .drop.over .upload-icon { transform: translateY(-4px); }
  .secondary:active:not(:disabled), .generate:active:not(:disabled), .mode:active { transform: translateY(1px); }
  @media (hover: hover) {
    .mode:hover, .preset-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px #23272013; }
    .generate:hover:not(:disabled) { box-shadow: 0 4px 12px #65832c30; }
  }

  dialog[open] { animation: studio-dialog 250ms var(--motion-ease) both; }
  dialog[open]::backdrop { animation: studio-fade 200ms ease-out both; }
  #template-controls :is(img, canvas):not([hidden]), #preset-selected-example:not([hidden]) {
    animation: studio-fade var(--motion-fast) ease-out;
  }
  .job-arrived .job-output { animation: studio-enter 360ms var(--motion-ease) both; }
  .job-arrived .job-status { animation: studio-ready 460ms var(--motion-ease); }

  #generate[aria-busy="true"] > [aria-hidden], #analyze[aria-busy="true"]::before, .job-actions button[aria-busy="true"]::before,
  .job:is([data-status="queued"], [data-status="submitting"], [data-status="running"]) .job-status::before {
    content: "";
    display: inline-block;
    width: .75em;
    height: .75em;
    box-sizing: border-box;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: studio-spin 850ms linear infinite;
  }
  #generate[aria-busy="true"] > [aria-hidden] { font-size: 0; width: 12px; height: 12px; }
  #analyze[aria-busy="true"]::before, .job-actions button[aria-busy="true"]::before, .job-status::before { margin-inline-end: .4em; }
}

@keyframes studio-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes studio-dialog {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes studio-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes studio-spin { to { transform: rotate(1turn); } }
@keyframes studio-ready {
  0%, 100% { box-shadow: 0 0 0 0 #c9e76e00; }
  35% { box-shadow: 0 0 0 4px #c9e76e80; }
}

:root {
  --page: #f3f0ed;
  --panel: #fffefc;
  --dark: #142319;
  --accent: #d7ff32;
  --line: #dedfd7;
  --studio-shadow: 0 12px 30px #312c2018, 0 2px 6px #312c2010;
}
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 24rem;
  background:
    linear-gradient(180deg, #10201800 42%, var(--page) 100%),
    radial-gradient(ellipse at 93% 36%, #7e9b38 0%, #233d26 24%, transparent 57%),
    radial-gradient(ellipse at 12% 9%, #365339 0%, #12251a 57%);
}
.top {
  background: #101b15de;
  border-bottom: 1px solid #ffffff24;
  padding-inline: max(1.25rem, calc((100% - 1350px) / 2));
}
.brand { letter-spacing: -.06em; line-height: .96; }
.brand small { display: block; margin-top: .35rem; color: #e2ebdd; font-size: .68rem; letter-spacing: 0; font-weight: 550; }
.mark { background: transparent; color: var(--accent); border: 2px solid currentColor; margin-right: .65rem; }
nav a { font-weight: 650; }
nav a[aria-current="page"], .balance[aria-current="page"] { background: var(--accent); color: #17200d; }
nav a[aria-current="page"]::after { display: none; }
.balance { border-color: #9cbb4a; }
main { max-width: 1400px; padding-top: 1.65rem; }
.view > .intro { color: #fff; }
.view > .intro p { color: #e8eee1; }
#create > .intro { display: flex; align-items: center; flex-wrap: wrap; column-gap: 2.4rem; row-gap: .85rem; }
#create > .intro p { margin: 0; }
#create h1 { font-style: italic; position: relative; }
#create h1::after {
  content: "";
  position: absolute;
  right: -.2em;
  bottom: -.13em;
  width: 52%;
  height: .09em;
  border-radius: 100%;
  background: var(--accent);
  transform: rotate(-5deg);
}
.modes { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1rem; }
.card-mode-menu { position: relative; }
.card-mode-menu > summary { cursor: pointer; list-style: none; }
.card-mode-menu > summary::-webkit-details-marker { display: none; }
.card-mode-options {
  position: absolute; z-index: 3; inset-block-start: calc(100% + .35rem); inset-inline-start: 0;
  width: max-content; min-width: 100%; padding: .3rem; display: grid; gap: .15rem;
  background: #263a2d; border: 1px solid #63796a; border-radius: .75rem; box-shadow: var(--studio-shadow);
}
.card-mode-options > :is(button, a) {
  display: block; padding: .55rem .7rem; color: white; text-align: left; text-decoration: none;
  background: transparent; border: 0; border-radius: .4rem; font-weight: 650;
}
.card-mode-options > :is(button, a):is(:hover, :focus-visible) { background: #3c5446; }
.card-mode-options > .selected { background: var(--accent); color: #17200d; }
.mode { display: flex; align-items: center; gap: .45rem; padding: .52rem .95rem; border-radius: 999px;
  background: #263a2d; border-color: #63796a; color: #fff; }
.mode small { display: none; }
.mode-icon, .selected .mode-icon { background: transparent; margin: 0; width: 1.35rem; height: 1.35rem; line-height: 1; }
.mode.selected { background: var(--accent); color: #17200d; border-color: #e6ff70; box-shadow: 0 0 18px #d7ff3266; }
.workbench { grid-template-columns: minmax(0, .86fr) minmax(0, 1.28fr); }
#generation, #create .results { box-shadow: var(--studio-shadow); }
#generation .drop { background: #f7f8f2; border-color: #a7b49a; }
#generation .drop.over { background: #efffc1; }
#generation .thumb img { width: 88px; height: 72px; }
.tryon-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: .55rem; }
.tryon-choice { display: flex; flex-direction: column; gap: .35rem; padding: .3rem; text-align: center; border: 1px solid var(--line); border-radius: .65rem; cursor: pointer; }
.tryon-choice:has(input:checked) { border-color: #708913; background: #e9f4c2; }
.tryon-choice:focus-within { outline: 2px solid #708913; outline-offset: 2px; }
.tryon-choice input { width: auto; margin: .25rem auto; }
.tryon-choice img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: .4rem; }
#product-fields { margin-top: .4rem; padding: 0; border: 0; }
#analyze { background: #efffc1; border-color: #abc747; }
#card-fields { background: #faf9f7; }
#template-controls { padding-bottom: .65rem; border-bottom: 1px solid var(--line); }
.picker-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.picker-heading a { font-size: .8rem; text-decoration: underline; }
.visual-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.visual-picker:not(:empty) { margin: .25rem 0 .45rem; }
.visual-picker button, .result-strip button {
  position: relative; min-width: 0; border-radius: .65rem; border: 1px solid #d5d7cf; background: #fff;
  padding: .25rem; line-height: 1.15;
}
.visual-picker button[aria-pressed="true"], .result-strip button[aria-pressed="true"] {
  border-color: #94ae1d; box-shadow: 0 0 0 2px var(--accent); background: #f5ffd8;
}
.visual-picker button[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: .15rem; right: .15rem; border-radius: 50%; background: var(--accent);
  color: #182010; width: 1.25rem; height: 1.25rem; display: grid; place-items: center; font-weight: 800;
}
.visual-picker canvas { display: block; width: 100%; aspect-ratio: 1.4; object-fit: cover; border-radius: .4rem; }
#layout-tiles canvas { object-fit: contain; background: #eaece4; }
.visual-picker span { display: block; padding: .32rem .05rem .1rem; font-size: .71rem; overflow-wrap: anywhere; }
.visual-picker:has([aria-pressed="true"]) ~ :is(.selected-layout, #template-selected-example) { display: none; }
.generate { background: linear-gradient(180deg, #ecff72, #cbfa23); border-color: #b7d92f; box-shadow: 0 5px 14px #9fb72d38; }
.featured-job { border: 0; padding: 0; overflow: visible; }
.featured-job .job-status { font-weight: 750; padding: .36rem .7rem; border-radius: 999px; }
.featured-job .job-output {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(7.5rem, .34fr); gap: .5rem; align-items: start;
  align-content: start; margin-top: .7rem;
}
.featured-job .job-output > :is(img, video, canvas) {
  display: block; width: 100%; grid-column: 1; grid-row: 1; max-height: 68vh; object-fit: contain;
  background: #f1f0eb; border: 5px solid white; border-radius: .85rem; box-shadow: var(--studio-shadow); margin: 0;
}
.featured-job .job-actions { grid-column: 2; display: grid; gap: .5rem; }
.featured-job .job-downloads { display: grid; gap: .5rem; border-top: 1px solid var(--line); padding-top: .65rem; margin-top: .15rem; }
.featured-job .job-actions :is(button, a) { width: 100%; margin: 0; font-size: .82rem; padding: .53rem .5rem; text-align: center; }
.featured-job .job-output .featured-edit { background: var(--accent); border-color: #a7c130; }
.result-strip { display: flex; flex-wrap: wrap; gap: .55rem; }
.result-strip button { width: 70px; min-height: 48px; font-size: .71rem; }
.result-strip img { display: block; width: 100%; height: 58px; object-fit: cover; border-radius: .4rem; }
.studio-demo-link { font-size: .9rem; font-weight: 750; color: var(--accent); text-decoration: underline; }
#demo-sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: .55rem 0; }
#demo-sources img, .demo-slide canvas { display: block; width: 100%; aspect-ratio: 3/4; object-fit: contain; border-radius: .6rem; background: #ede8e1; }
#demo-slides { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
#showcase-preview, #service-page-preview { display: block; width: min(100%, 460px); height: auto; margin-top: .65rem; border-radius: .65rem; }
#service-page-form .editor-actions { flex-wrap: wrap; }
#service-page-reference-preview, #card-gallery-reference-preview { display: block; max-width: min(100%, 180px); max-height: 210px; object-fit: contain; border-radius: .5rem; }
#card-gallery-reference-preview { -webkit-touch-callout: none; user-select: none; }
#showcase-items input[type="file"] { max-width: 100%; }
.demo-slide { display: grid; gap: .45rem; align-content: start; }
.demo-slide h3 { font-size: .94rem; }
.demo-slide button { justify-self: start; }
.help-lesson { margin-bottom: 1rem; }
#help-video { display: block; width: min(100%, 980px); margin: .8rem 0; border-radius: .65rem; background: #17291e; }
.help-chapters { display: flex; flex-wrap: wrap; gap: .45rem; }
.help-question { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.help-question summary { font-weight: 700; cursor: pointer; }
.help-answer { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: start; gap: 1rem; margin-top: .75rem; }
.help-illustration { aspect-ratio: 16/9; border-radius: .55rem; background: #eee url("/help-scenes.jpg") no-repeat; background-size: 200% 400%; }
.help-shot { background-position: 0 0; }
.help-upload { background-position: 0 33.333%; }
.help-recognize { background-position: 100% 33.333%; }
.help-prompt { background-position: 0 66.667%; }
.help-set { background-position: 100% 66.667%; }
.help-review { background-position: 0 100%; }
.help-export { background-position: 100% 100%; }
.help-fields { margin: 0; }
.help-fields dt { font-weight: 750; margin-top: .4rem; }
.help-fields dd { margin-left: 0; }
.help-answer blockquote { margin: .65rem 0; background: #f3f5e9; border-left: 3px solid #718823; padding: .65rem; }
.help-demo { display: inline-block; margin-top: .85rem; }
@media (max-width: 760px) { .help-answer { grid-template-columns: 1fr; } }
#gallery-status { color: var(--muted); background: var(--panel); border-radius: .6rem; padding: .6rem .8rem; }
#gallery-status:empty { display: none; }
.gallery-card { display: grid; align-content: start; gap: .45rem; padding: .65rem; overflow-wrap: anywhere; }
.gallery-media { position: relative; -webkit-touch-callout: none; user-select: none; }
.gallery-image { width: 100%; padding: 0; border: 0; display: block; border-radius: .6rem; background: #e7e9df; }
.gallery-image :is(img, canvas) { display: block; width: 100%; aspect-ratio: 3/4; object-fit: contain; border-radius: inherit; }
.gallery-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; margin-bottom: .65rem; }
.gallery-filters > div { flex: 1 1 160px; min-width: 0; }
.gallery-filters label { margin-top: 0; }
.gallery-reactions { display: flex; flex-wrap: wrap; gap: .4rem; }
.gallery-reactions button[aria-pressed="true"], #gallery-saved-filter[aria-pressed="true"] { background: var(--accent); }
.gallery-overlay { position: absolute; inset: auto .45rem .45rem; }
.gallery-overlay button { width: 100%; background: var(--accent); border-color: #9eaf4b; }
.gallery-card h2 { font-size: 1.03rem; }
.gallery-card details p { white-space: pre-wrap; margin: .35rem 0; font-size: .88rem; }
#gallery-publish { width: min(520px, calc(100vw - 1.5rem)); max-height: 92vh; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: .9rem; padding: 1rem; }
#gallery-publish::backdrop { background: #1c211bb0; }
.gallery-consent input[type="checkbox"] { width: auto; margin: .2rem .3rem .2rem 0; }
@media (max-width: 900px) {
  .featured-job .job-output { display: flex; flex-direction: column; }
  .featured-job .job-actions { width: 100%; }
}
@media (max-width: 850px) {
  .top { flex-wrap: wrap; }
  .top nav { order: 2; width: 100%; justify-content: center; flex-wrap: wrap; }
}
@media (max-width: 730px) {
  .workbench { grid-template-columns: minmax(0, 1fr); }
  #create > .intro { margin-bottom: 1.4rem; }
  #create > .intro p br { display: none; }
  .view > .intro > a {
    display: inline-block; padding: .45rem .7rem; border-radius: .55rem;
    background: #24372b; color: #eef9d9;
  }
  body::before { height: 28rem; }
}
@media (max-width: 420px) {
  .visual-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode { padding-inline: .57rem; font-size: .84rem; }
}
