:root {
  --ink: #26231f;
  --muted: #766f66;
  --paper: #f7f3ec;
  --panel: #fffdfa;
  --line: #ded6ca;
  --accent: #d97338;
  --accent-dark: #b85a25;
  --accent-soft: rgba(217, 115, 56, 0.08);
  --olive: #56614a;
  --eyebrow: #4a5040;
  --shadow: 0 18px 50px rgba(38, 35, 31, 0.12);
  --shadow-lift: 0 26px 60px -28px rgba(38, 35, 31, 0.28);
  --source-aspect: 16 / 9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", "Noto Sans TC", "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

button,
textarea,
input {
  font: inherit;
}

button,
.file-button,
.download-link {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
  text-align: center;
  line-height: 1.2;
}

button:hover,
.file-button:hover,
.download-link:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.file-button input,
.upload-drop input {
  display: none;
}

.landing-page {
  min-height: 100vh;
  background: var(--paper);
}

.example-hero {
  min-height: 92vh;
  align-items: flex-start;
  padding: clamp(18px, 3.5vw, 52px);
  background:
    linear-gradient(135deg, rgba(255, 253, 250, 0.96), rgba(239, 231, 218, 0.92)),
    #f1eadf;
}

.example-hero::before {
  display: none;
}

.example-hero-inner {
  width: min(1440px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(640px, 1.35fr);
  gap: clamp(22px, 3vw, 48px);
  align-items: center;
}

.example-hero .landing-logo {
  width: min(480px, 86vw);
  margin-bottom: clamp(22px, 4vw, 44px);
}

.example-hero .landing-hero-copy {
  max-width: 650px;
}

.example-hero .landing-hero-copy h1 {
  max-width: 650px;
  font-size: clamp(38px, 4.8vw, 72px);
}

.example-hero .landing-hero-copy p {
  color: #5f584f;
}

.use-case-showcase {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -32px rgba(38, 35, 31, 0.18);
  padding: clamp(14px, 1.8vw, 24px);
}

.use-case-tabs-wrap {
  margin-bottom: clamp(14px, 2vw, 22px);
}

.use-case-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: #f1ece2;
  border: 1px solid var(--line);
}

.use-tab {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.01em;
  transition: background 0.18s ease, color 0.18s ease;
}

.use-tab:hover {
  color: var(--ink);
  background: rgba(255, 253, 250, 0.6);
}

.use-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(184, 90, 37, 0.45);
}

.use-case-panel {
  display: none;
}

.use-case-panel.active {
  display: block;
}

.use-case-banner {
  display: block;
  width: 84%;
  height: auto;
  margin: 0 auto;
  border-radius: 2px;
}

.use-case-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: baseline;
  padding: 2px 2px 0;
}

.use-case-copy span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.use-case-copy h2 {
  font-size: clamp(24px, 2.5vw, 38px);
  line-height: 1.15;
}

.use-case-copy p {
  grid-column: 2;
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.case-media {
  display: grid;
  gap: clamp(14px, 1.6vw, 22px);
  align-items: stretch;
}

.case-media-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-media-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 26px);
}

.case-media-with-reference {
  grid-template-columns: 1fr clamp(150px, 14vw, 200px) 1fr;
  align-items: center;
  gap: clamp(14px, 1.8vw, 26px);
}

.case-media figure {
  position: relative;
  min-width: 0;
  margin: 0;
  background: #ece5d8;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 18px 32px -22px rgba(38, 35, 31, 0.45);
}

.case-media-wide figure {
  aspect-ratio: 4 / 3;
}

.case-media-two figure {
  aspect-ratio: 16 / 10;
}

.case-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.case-media-with-reference .reference-figure,
.case-media-with-reference .swatch-stack {
  position: relative;
  align-self: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #fffdfa;
  border: 1px solid var(--line);
  padding: 14px 14px 32px;
  box-shadow: 0 20px 40px -20px rgba(38, 35, 31, 0.32);
  overflow: visible;
}

.case-media-with-reference .reference-figure::before,
.case-media-with-reference .swatch-stack::before {
  content: "REFERENCE";
  position: absolute;
  top: -11px;
  left: 50%;
  padding: 4px 10px;
  background: var(--ink);
  color: #fffdfa;
  border: none;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  transform: translateX(-50%);
}

.case-media-with-reference .reference-figure img,
.case-media-with-reference .swatch-stack img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  padding: 0;
}

.swatch-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
}

.case-media-with-reference .swatch-stack img {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.case-media figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(38, 35, 31, 0.86);
  color: #fffdfa;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-media-with-reference .reference-figure figcaption,
.case-media-with-reference .swatch-stack figcaption {
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  background: var(--ink);
}

.landing-hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(36px, 5vw, 86px);
  background:
    radial-gradient(circle at 88% 18%, rgba(217, 115, 56, 0.1), transparent 55%),
    radial-gradient(circle at 8% 90%, rgba(86, 97, 74, 0.1), transparent 60%),
    var(--paper);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(transparent 95%, rgba(38, 35, 31, 0.04) 95%),
    linear-gradient(90deg, transparent 95%, rgba(38, 35, 31, 0.04) 95%);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.55;
}

.landing-hero-inner {
  position: relative;
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.landing-logo {
  width: min(480px, 78vw);
  height: auto;
  aspect-ratio: 1920 / 555;
  object-fit: contain;
  display: block;
  margin-bottom: clamp(20px, 3.6vw, 40px);
}

.landing-hero-copy {
  max-width: 640px;
}

.landing-hero-copy .eyebrow {
  color: var(--olive);
}

.landing-hero-copy h1 {
  max-width: 640px;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 900;
}

.landing-hero-copy p {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.landing-primary,
.landing-secondary {
  min-height: 52px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: "Manrope", "Noto Sans TC", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.landing-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 14px 28px -16px rgba(184, 90, 37, 0.45);
}

.landing-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px -14px rgba(184, 90, 37, 0.5);
}

.landing-secondary {
  background: transparent;
  color: var(--ink);
}

.landing-secondary:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

.hero-microcopy {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-microcopy span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-microcopy span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.hero-demo {
  position: relative;
  width: 100%;
  max-width: 560px;
  justify-self: end;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px 14px 18px;
  box-shadow: var(--shadow-lift);
}

.hero-demo-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #ece5d8;
  overflow: hidden;
  border: 1px solid var(--line);
  --split: 50%;
}

.hero-demo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.hero-demo-frame .hero-demo-after {
  clip-path: inset(0 var(--split) 0 0);
}

.hero-demo-label {
  position: absolute;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(38, 35, 31, 0.86);
  color: #fffdfa;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  z-index: 3;
}

.hero-demo-label.before {
  left: 12px;
}

.hero-demo-label.after {
  right: 12px;
}

.hero-demo-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% - var(--split));
  width: 2px;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(38, 35, 31, 0.25);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}

.hero-demo-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 8px 18px -6px rgba(38, 35, 31, 0.45);
  transform: translate(-50%, -50%);
}

.hero-demo-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 8px;
  background:
    linear-gradient(to right, var(--ink) 30%, transparent 30%, transparent 70%, var(--ink) 70%);
  transform: translate(-50%, -50%);
  z-index: 1;
}

.hero-demo-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: ew-resize;
  z-index: 4;
}

.hero-demo-range:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero-demo-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 100%;
  background: transparent;
  cursor: ew-resize;
}

.hero-demo-range::-moz-range-thumb {
  width: 44px;
  height: 100%;
  background: transparent;
  border: none;
  cursor: ew-resize;
}

.hero-demo-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero-demo-caption strong {
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-demo-scrubber {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.hero-demo-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
}

.hero-demo-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: var(--ink);
  border-radius: 3px;
  pointer-events: none;
}

.hero-demo-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 0 2px 12px -2px rgba(38, 35, 31, 0.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.hero-demo-bar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 2;
}

.landing-section {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(42px, 6vw, 82px) 0;
}

.use-case-section {
  width: min(1280px, calc(100% - 52px));
  padding-top: clamp(54px, 7vw, 92px);
  border-top: 1px solid var(--line);
}

.use-case-section .section-heading {
  max-width: 840px;
}

.use-case-section .section-heading h2 {
  font-size: clamp(34px, 4vw, 58px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 46px);
}

.section-heading p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.step-grid,
.example-grid,
.benefit-list {
  display: grid;
  gap: 14px;
}

.step-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.example-grid,
.benefit-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card,
.example-card,
.benefit-list > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 12px 34px rgba(38, 35, 31, 0.08);
}

.step-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.step-card h3,
.example-card h3,
.benefit-list h3 {
  margin-top: 10px;
}

.step-card p,
.example-card p,
.benefit-list p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.benefit-list {
  gap: clamp(16px, 1.6vw, 22px);
}

.benefit-list > .benefit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 26px 28px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.benefit-list > .benefit-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(38, 35, 31, 0.28);
}

.benefit-list .benefit-num {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: clamp(46px, 5vw, 68px);
  font-weight: 950;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(38, 35, 31, 0.16);
  letter-spacing: -0.02em;
  pointer-events: none;
}

.benefit-list .benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
}

.benefit-list .benefit-icon svg {
  width: 22px;
  height: 22px;
}

.benefit-list h3 {
  margin-top: 6px;
  font-size: clamp(18px, 1.5vw, 22px);
  letter-spacing: -0.01em;
}

.example-placeholder {
  min-height: 150px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px dashed var(--line);
  background:
    linear-gradient(135deg, rgba(217, 115, 56, 0.08), rgba(86, 97, 74, 0.1)),
    #f0e9dd;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.landing-benefits {
  border-top: 1px solid var(--line);
}

.landing-final {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(48px, 6vw, 88px) 0 clamp(56px, 7vw, 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.landing-final h2 {
  max-width: 720px;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 900;
}

.landing-final-sub {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.7;
}

.landing-final .landing-primary {
  margin-top: 14px;
  min-height: 56px;
  padding: 0 32px;
}

.landing-footer {
  background: var(--ink);
  color: rgba(255, 253, 250, 0.86);
  padding: clamp(32px, 4vw, 56px) clamp(20px, 4vw, 60px);
}

.landing-footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}

.landing-footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.landing-footer-brand img {
  width: 130px;
  height: auto;
  aspect-ratio: 1920 / 555;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.landing-footer-brand p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 253, 250, 0.7);
  max-width: 200px;
}

.landing-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.landing-footer-nav a {
  color: #fffdfa;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.landing-footer-nav a:hover {
  border-bottom-color: var(--accent);
  color: #fff;
}

.landing-footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 253, 250, 0.55);
}

.landing-footer-privacy {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 253, 250, 0.12);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 253, 250, 0.55);
}

.studio-privacy {
  margin: 24px auto 0;
  max-width: 1180px;
  padding: 14px 18px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(38, 35, 31, 0.6);
  text-align: center;
  border-top: 1px solid rgba(38, 35, 31, 0.08);
}

.app-shell {
  min-height: 100vh;
  padding: 22px;
}

.topbar,
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  min-height: 250px;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 520px;
  min-width: 0;
  min-height: 230px;
}

.brand-logo {
  width: clamp(360px, 52vw, 900px);
  height: auto;
  aspect-ratio: 1920 / 555;
  flex: 0 0 auto;
  object-fit: contain;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand-home-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
  text-decoration: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.brand-home-link:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

.brand-lockup > div {
  display: none;
}

.brand-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--eyebrow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Manrope", "Noto Sans TC", sans-serif;
  letter-spacing: -0.015em;
  font-weight: 800;
}

h1 {
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 850;
}

h2 {
  font-size: 19px;
}

h3 {
  font-size: 15px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-end;
}

.topbar .actions {
  flex: 1 1 420px;
  width: min(560px, 100%);
  max-width: 560px;
  justify-content: center;
}

.action-row {
  display: grid;
  gap: 8px;
}

.action-row-start,
.action-row-finish {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-row-mark {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.topbar .actions button,
.topbar .actions .file-button {
  min-height: 50px;
  padding: 6px 10px;
  flex-direction: column;
  gap: 2px;
  white-space: normal;
}

.button-step {
  display: block;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.72;
}

.result-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

#designButton {
  background: var(--accent);
  border-color: var(--accent);
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(420px, 1fr) 320px;
  gap: 16px;
  margin-top: 18px;
  min-height: 660px;
}

.panel,
.result-section {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
  overflow: auto;
}

.hint,
.editor-empty,
.status {
  color: var(--muted);
  line-height: 1.5;
}

.status:empty {
  display: none;
}

.process-log {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fffdfa;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.process-log strong {
  color: var(--ink);
}

.process-log div + div {
  margin-top: 4px;
}

.compact {
  margin: 0;
  font-size: 13px;
}

.canvas-stage {
  position: relative;
  height: 660px;
  min-height: 660px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  background:
    linear-gradient(90deg, rgba(38, 35, 31, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(38, 35, 31, 0.05) 1px, transparent 1px),
    #ebe4d8;
  background-size: 28px 28px;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), var(--shadow);
}

#canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.canvas-mode-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 4;
  max-width: calc(100% - 48px);
  padding: 10px 16px;
  background: rgba(38, 35, 31, 0.82);
  color: #fffdfa;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(38, 35, 31, 0.18);
  pointer-events: none;
  white-space: nowrap;
}

.zoom-toolbar {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  display: inline-grid;
  grid-template-columns: 38px 62px 38px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(38, 35, 31, 0.2);
  background: rgba(255, 253, 250, 0.92);
  box-shadow: 0 10px 24px rgba(38, 35, 31, 0.14);
}

.zoom-toolbar button {
  min-height: 36px;
  padding: 0;
  border: 0;
  background: #fffdfa;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.zoom-toolbar span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.result-zoom {
  position: static;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
}

.empty-state strong {
  color: var(--ink);
  font-size: 24px;
}

.annotation-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.annotation-item {
  width: 100%;
  border: 1px solid var(--line);
  background: #faf6ef;
  color: var(--ink);
  min-height: 62px;
  justify-content: flex-start;
  text-align: left;
}

.annotation-item.active {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

.annotation-title {
  display: block;
  font-weight: 800;
}

.annotation-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.annotation-editor {
  display: grid;
  gap: 16px;
}

.hidden {
  display: none !important;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field label {
  font-weight: 800;
  font-size: 13px;
}

.style-preset-select {
  min-width: 190px;
  max-width: 62%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #fffdfa;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 12px;
  min-height: 130px;
}

.upload-drop {
  border: 1px dashed var(--olive);
  background: #f2eee5;
  color: var(--muted);
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 14px;
  cursor: pointer;
  text-align: center;
}

.reference-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.danger {
  background: #fff;
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}

.editor-design-button {
  min-height: 50px;
  width: 100%;
  padding: 6px 10px;
  flex-direction: column;
  gap: 2px;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.result-section {
  margin-top: 16px;
  padding: 18px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  column-gap: 16px;
  row-gap: 6px;
  margin-top: 16px;
  align-items: start;
}

.compare-panel {
  display: contents;
}

.compare-panel > * {
  min-width: 0;
}

.compare-panel-footer {
  display: block;
}

.slot-retry-btn {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.slot-retry-btn:hover {
  opacity: 0.85;
}

.compare-panel {
  display: grid;
  gap: 8px;
}

.compare-panel h3 {
  color: var(--muted);
}

.image-meta {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compare-image-wrap {
  position: relative;
  aspect-ratio: var(--source-aspect);
  max-height: 430px;
  background: #eee7dc;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 16px;
}

.result-loader {
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 850;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 4px solid rgba(38, 35, 31, 0.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.compare-image {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 980px) {
  .example-hero {
    min-height: auto;
  }

  .example-hero-inner {
    grid-template-columns: 1fr;
  }

  .example-hero .landing-hero-copy {
    padding-top: 0;
  }

  .use-case-tabs {
    display: flex;
    overflow-x: auto;
    padding: 6px;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 90%, transparent 100%);
            mask-image: linear-gradient(to right, #000 0, #000 90%, transparent 100%);
  }

  .use-tab {
    flex: 0 0 auto;
    min-width: 138px;
    scroll-snap-align: start;
  }

  .landing-hero {
    min-height: auto;
  }

  .landing-hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-demo {
    justify-self: stretch;
    max-width: 100%;
  }

  .landing-logo {
    margin-bottom: 18px;
  }

  .step-grid,
  .example-grid,
  .benefit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .landing-footer-meta {
    grid-column: 1 / -1;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 1280px) {
  .topbar {
    justify-content: center;
    gap: 12px;
  }

  .brand-lockup {
    flex-basis: 100%;
    justify-content: center;
    min-height: 190px;
  }

  .brand-logo {
    width: min(760px, 86vw);
  }

  .topbar .actions {
    flex: 0 1 min(640px, 100%);
    max-width: min(640px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .canvas-stage {
    height: 520px;
    min-height: 520px;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 12px;
  }

  .example-hero {
    padding: 16px;
  }

  .example-hero .landing-logo {
    width: min(340px, 100%);
    margin-bottom: 18px;
  }

  .example-hero .landing-hero-copy h1 {
    font-size: clamp(32px, 12vw, 48px);
  }

  .example-hero .landing-hero-copy {
    padding-top: 0;
  }

  .use-case-showcase {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .use-case-section .section-heading h2 {
    font-size: clamp(26px, 7vw, 34px);
  }

  .use-case-tabs-wrap {
    display: none;
  }

  .use-case-panel,
  .use-case-panel.active {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 18px -8px rgba(38, 35, 31, 0.18);
  }

  .use-case-banner {
    width: 100%;
  }

  .case-media,
  .case-media-two {
    grid-template-columns: 1fr;
  }

  .case-media-wide {
    grid-template-columns: 1fr 1fr;
  }

  .case-media-wide figure:first-child {
    grid-column: 1 / -1;
  }

  .case-media-with-reference {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .case-media-with-reference .reference-figure,
  .case-media-with-reference .swatch-stack {
    width: min(220px, 70%);
    margin: 6px auto 0;
    aspect-ratio: 3 / 4;
  }

  .field-label-row {
    flex-direction: column;
    align-items: stretch;
  }

  .style-preset-select {
    width: 100%;
    max-width: none;
  }

  .case-media figure,
  .case-media-wide figure,
  .case-media-two figure {
    aspect-ratio: 4 / 3;
  }

  .landing-hero {
    padding: 22px;
  }

  .landing-logo {
    width: min(360px, 100%);
    margin-bottom: 20px;
  }

  .landing-hero-copy {
    padding-top: 0;
  }

  .landing-hero-copy h1 {
    font-size: clamp(30px, 9vw, 44px);
  }

  .hero-demo {
    padding: 10px 10px 14px;
  }

  .hero-demo-scrubber {
    display: flex;
    height: 48px;
    margin-top: 8px;
  }

  .hero-demo-track {
    height: 8px;
    border-radius: 4px;
  }

  .hero-demo-knob {
    width: 32px;
    height: 32px;
  }

  .landing-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .landing-primary,
  .landing-secondary {
    width: 100%;
  }

  .landing-section,
  .landing-final {
    width: calc(100% - 28px);
  }

  .landing-final .landing-primary {
    width: auto;
    align-self: center;
  }

  .landing-footer {
    padding: 32px 20px 40px;
  }

  .landing-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .landing-footer-brand {
    flex-direction: column;
    align-items: center;
  }

  .landing-footer-brand p {
    max-width: 260px;
  }

  .landing-footer-nav {
    justify-content: center;
  }

  .landing-footer-meta {
    align-items: center;
    text-align: center;
  }

  .step-grid,
  .example-grid,
  .benefit-list {
    grid-template-columns: 1fr;
  }

  .topbar,
  .result-header {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-lockup {
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 120px;
  }

  .brand-logo {
    width: min(420px, 92vw);
    height: auto;
    aspect-ratio: 1920 / 555;
  }

  .topbar {
    min-height: 0;
    gap: 14px;
  }

  .topbar .actions {
    flex: 0 1 auto;
    width: 100%;
    max-width: none;
  }

  .action-row-start,
  .action-row-finish,
  .action-row-mark {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions {
    justify-content: stretch;
  }

  .actions > *,
  .result-actions > * {
    flex: 1 1 auto;
  }
}
