:root {
  color-scheme: dark;
  --ink: #f4f1e9;
  --muted: #9b9ca2;
  --paper: #050607;
  --surface: rgba(13, 15, 19, 0.7);
  --surface-strong: rgba(9, 11, 15, 0.88);
  --line: rgba(255, 255, 255, 0.14);
  --red: #caff70;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
  --radius: 28px;
  --pointer-x: 50vw;
  --pointer-y: 48vh;
  font-family: "Helvetica Neue", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  overflow-x: hidden;
}

.aurora-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 112%, rgba(45, 18, 82, 0.54), transparent 42%),
    #050607;
}

.aurora-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.aurora-ribbon {
  position: absolute;
  width: 82vw;
  height: 38vw;
  min-width: 760px;
  min-height: 380px;
  border-radius: 50%;
  filter: blur(68px);
  opacity: 0.42;
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora-ribbon-one {
  left: -24vw;
  top: -12vw;
  background: linear-gradient(112deg, rgba(54, 255, 193, 0.64), rgba(24, 111, 255, 0.5) 48%, rgba(149, 47, 255, 0.16));
  animation: aurora-drift-one 17s ease-in-out infinite alternate;
}

.aurora-ribbon-two {
  right: -22vw;
  top: 18vh;
  background: linear-gradient(128deg, rgba(61, 49, 255, 0.28), rgba(236, 44, 255, 0.48) 46%, rgba(255, 75, 137, 0.12));
  animation: aurora-drift-two 21s ease-in-out infinite alternate;
}

.aurora-ribbon-three {
  left: 8vw;
  bottom: -22vw;
  background: linear-gradient(100deg, rgba(202, 255, 112, 0.2), rgba(17, 199, 255, 0.38) 45%, rgba(67, 39, 255, 0.28));
  animation: aurora-drift-three 24s ease-in-out infinite alternate;
}

.aurora-cursor {
  position: absolute;
  left: var(--pointer-x);
  top: var(--pointer-y);
  z-index: 3;
  width: min(58vw, 760px);
  height: min(58vw, 760px);
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  background: radial-gradient(circle at 48% 48%, rgba(222, 255, 180, 0.2), rgba(51, 229, 255, 0.17) 24%, rgba(104, 66, 255, 0.13) 47%, transparent 72%);
  filter: blur(24px);
  mix-blend-mode: screen;
  will-change: left, top;
}

@keyframes aurora-drift-one {
  from { transform: translate3d(-4%, -3%, 0) rotate(-8deg) scale(0.96); }
  to { transform: translate3d(22%, 16%, 0) rotate(9deg) scale(1.18); }
}

@keyframes aurora-drift-two {
  from { transform: translate3d(12%, -8%, 0) rotate(12deg) scale(1.08); }
  to { transform: translate3d(-24%, 13%, 0) rotate(-7deg) scale(0.94); }
}

@keyframes aurora-drift-three {
  from { transform: translate3d(-12%, 11%, 0) rotate(-4deg) scale(1); }
  to { transform: translate3d(18%, -18%, 0) rotate(10deg) scale(1.22); }
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.app-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(23, 23, 21, 0.1);
  background: rgba(5, 6, 7, 0.62);
  backdrop-filter: blur(16px);
}

.nav-side { display: flex; align-items: center; gap: 8px; }
.nav-side-right { justify-content: flex-end; }

.wordmark { text-align: center; line-height: 1; letter-spacing: 0.1em; }
.wordmark span { display: block; font-size: 12px; font-weight: 600; }
.wordmark small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: 0.16em; }

.icon-button,
.text-button,
.tab-button,
.ghost-button,
.solid-button,
.primary-action,
.heart-button,
.remove-button {
  border: 0;
  background: none;
  cursor: pointer;
}

.icon-button {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(13, 15, 19, 0.7);
  font-size: 22px;
}

.text-button { padding: 10px 8px; color: var(--muted); }
.text-button:hover { color: var(--ink); }

.favorite-count {
  position: absolute;
  right: -5px;
  top: -5px;
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  background: var(--red);
  color: white;
  font-size: 10px;
}

main { position: relative; z-index: 1; width: min(1180px, calc(100% - 36px)); margin: 0 auto; }

.screen { min-height: calc(100vh - 74px); padding: clamp(54px, 8vw, 112px) 0 100px; }
.screen[hidden] { display: none; }

.screen-landing {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 52px;
  min-height: calc(100vh - 74px);
}

.landing-copy { max-width: 940px; }
.eyebrow { margin: 0 0 18px; color: var(--red); font-size: 11px; letter-spacing: 0.18em; font-weight: 600; }
h1 { margin: 0; font-family: "Helvetica Neue", "PingFang SC", sans-serif; font-size: clamp(44px, 7vw, 92px); font-weight: 300; letter-spacing: -0.065em; line-height: 1.03; }
.landing-english { margin: 20px 0 0; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(18px, 2vw, 25px); }

.primary-action {
  min-width: 154px;
  padding: 15px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #080a0b;
  font-weight: 600;
  transition: transform 180ms ease, background-color 180ms ease;
}
.primary-action:hover:not(:disabled) { transform: translateY(-2px); background: var(--red); }
.primary-action:disabled { opacity: 0.35; cursor: not-allowed; }
.primary-action.compact { margin-top: 24px; min-width: 138px; }

.screen-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: clamp(38px, 6vw, 74px); }
.screen-heading h1 { font-size: clamp(44px, 6vw, 76px); }
.screen-heading h1 span { font-size: 1.3em; color: var(--red); }

.mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.mode-card {
  position: relative;
  display: flex;
  min-height: 360px;
  align-items: flex-end;
  padding: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 11, 15, 0.52);
  backdrop-filter: blur(20px);
  text-align: left;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.mode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, transparent 24%, rgba(202, 255, 112, 0.1), rgba(69, 92, 255, 0.08));
  opacity: 0;
  transition: opacity 220ms ease;
}
.mode-card:hover { transform: translateY(-5px); border-color: rgba(180, 59, 49, 0.55); box-shadow: var(--shadow); }
.mode-card:hover::before { opacity: 1; }
.mode-verb { position: relative; z-index: 1; font-family: "Helvetica Neue", "PingFang SC", sans-serif; font-size: clamp(86px, 11vw, 142px); font-weight: 250; letter-spacing: -0.09em; line-height: 0.75; }
.mode-card { flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.mode-verb { font-size: clamp(38px, 5vw, 68px); letter-spacing: -0.065em; line-height: 1.08; }
.mode-object { margin: 12px 0 0; }
.mode-object small { display: block; font-size: 13px; margin-top: 10px; }
.screen-heading { align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.screen-heading h1 { font-size: clamp(34px, 5.6vw, 70px); }
h1 small { display: block; font-size: 16px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 16px; }
label small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 5px; }
button small { display: block; font-size: 11px; font-weight: 400; margin-top: 3px; opacity: .72; }
.file-button { flex-direction: column; align-items: flex-start; }
.prompt-details { margin-top: 16px; }
.prompt-details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.prompt-details summary small { display: inline-block; margin-left: 8px; font-size: 11px; }
.prompt-details[open] .keyword-pair { margin-top: 22px; }
.prompt-kit .ghost-button { margin-top: 0; }
.style-words { font-size: 13px; line-height: 1.55; letter-spacing: 0; }
.style-chip small, h3 small { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.mode-object { position: relative; z-index: 1; margin: 0 0 4px 8px; color: var(--muted); font-size: 18px; }
.mode-arrow { position: absolute; right: 28px; top: 24px; font-size: 30px; font-weight: 300; }

.search-panel,
.creation-form {
  max-width: 820px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 11, 15, 0.68);
  backdrop-filter: blur(22px);
}

.search-panel label,
.creation-form > label,
.field-heading label { display: block; margin-bottom: 12px; font-weight: 600; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

input[type="search"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
}
input[type="search"], select, textarea { padding: 15px 16px; }
textarea { resize: vertical; min-height: 116px; }

.solid-button,
.ghost-button,
.tab-button {
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 600;
}
.solid-button { background: var(--ink); color: #080a0b; }
.solid-button:hover { background: var(--red); }
.ghost-button { margin-top: 14px; border: 1px solid var(--line); background: transparent; }
.ghost-button:hover { border-color: var(--ink); }
.status-line { min-height: 22px; margin: 26px 0 14px; color: var(--muted); }

.style-results {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 0 0 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}
.style-card {
  position: relative;
  flex: 0 0 min(850px, 78vw);
  height: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 11, 15, 0.72);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  isolation: isolate;
}
.style-visual { position: relative; width: 100%; height: auto; aspect-ratio: 16 / 9; overflow: hidden; }
.prompt-kit { position: relative; padding: 24px 28px; background: rgba(5,6,8,.9); border-top: 1px solid var(--line); }
.prompt-kit-heading { font-size: 20px; margin-bottom: 20px; }
.prompt-kit-heading small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.prompt-kit p { line-height: 1.6; overflow-wrap: anywhere; }
.keyword-pair { margin-bottom: 24px; }
.keyword-pair small, .prompt-translation { color: var(--muted); line-height: 1.6; }
.copy-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.copy-status { display: block; min-height: 20px; margin-top: 12px; font-size: 12px; color: var(--red); }
.style-card-main {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  width: min(48%, 390px);
  min-width: 320px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background: rgba(5, 6, 8, 0.76);
  backdrop-filter: blur(24px);
  text-align: left;
  cursor: default;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(0.94);
  transition: transform 360ms ease, background-color 240ms ease;
}
.style-card h2 { margin: 0; font-family: "Helvetica Neue", "PingFang SC", sans-serif; font-size: clamp(30px, 5vw, 56px); font-weight: 300; letter-spacing: -0.045em; }
.style-card h2 small { display: block; margin-top: 8px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.34em; letter-spacing: 0.04em; }
.style-words { margin: 22px 0 0; color: var(--muted); letter-spacing: 0.08em; }
.heart-button { color: var(--muted); font-size: 31px; line-height: 1; }
.heart-button.is-saved { color: var(--red); }
.style-visual > .heart-button {
  position: absolute;
  right: 22px;
  top: 20px;
  z-index: 5;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 6, 8, 0.7);
  backdrop-filter: blur(16px);
}
.moodboard {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 1;
  pointer-events: none;
}
.style-card .art-tile {
  position: absolute;
  width: 27%;
  height: 34%;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  isolation: isolate;
  opacity: 0.55;
  transform: scale(1.04) rotate(var(--tile-rotation));
  transition: transform 500ms cubic-bezier(.2,.72,.2,1), opacity 320ms ease, filter 320ms ease;
  filter: saturate(0.78) brightness(0.82);
  pointer-events: auto;
}
.style-card .art-tile:nth-child(1) { --tile-rotation: -6deg; left: -3%; top: -2%; }
.style-card .art-tile:nth-child(2) { --tile-rotation: 5deg; right: -2%; top: 1%; }
.style-card .art-tile:nth-child(3) { --tile-rotation: 4deg; left: 3%; bottom: -4%; }
.style-card .art-tile:nth-child(4) { --tile-rotation: -7deg; right: 2%; bottom: -5%; }
.style-card .art-tile:nth-child(5) { --tile-rotation: 8deg; left: 22%; top: -12%; width: 23%; height: 29%; }
.style-card .art-tile:nth-child(6) { --tile-rotation: -9deg; right: 21%; bottom: -13%; width: 23%; height: 29%; }
.style-card .art-tile:nth-child(7) { --tile-rotation: -3deg; left: -10%; top: 34%; width: 26%; height: 31%; }
.style-card .art-tile:nth-child(8) { --tile-rotation: 4deg; right: -10%; top: 35%; width: 26%; height: 31%; }
.style-card .art-tile:hover, .style-card .art-tile:focus-within { z-index: 2; }
.style-card .art-tile.tile-v2::before { transform: translate(18%, -12%) scale(0.8); }
.style-card .art-tile.tile-v3::after { transform: translate(-18%, 10%) scale(1.2); }
.style-card .art-tile.tile-v4::before { transform: translate(-15%, 20%) scale(1.12); }
.style-card .art-tile.tile-v5 { filter: saturate(0.7) brightness(0.72) hue-rotate(12deg); }
.style-card .art-tile.tile-v6 { filter: saturate(0.92) contrast(1.08) hue-rotate(-10deg); }
.style-card .art-tile.tile-v7 { filter: saturate(0.65) brightness(1.05); }
.style-card .art-tile.tile-v8 { filter: saturate(1.08) contrast(0.92); }
.art-tile .heart-button { position: absolute; right: 10px; top: 10px; z-index: 3; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: rgba(9,11,15,.78); font-size: 24px; backdrop-filter: blur(8px); }
.open-reference { position: absolute; inset: 0; z-index: 2; width: 100%; border: 0; background: transparent; color: var(--ink); cursor: zoom-in; }
.open-reference span { position: absolute; left: 10px; bottom: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(5,6,8,.8); }
.view-references { display: block; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 18px; padding: 9px 15px; color: var(--ink); background: rgba(5,6,8,.88); cursor: pointer; }
.view-references small { display: block; }
.reference-dialog { width: min(780px, calc(100vw - 32px)); max-height: 92dvh; overflow-y: auto; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: #090b0f; color: var(--ink); box-shadow: var(--shadow); }
.reference-dialog::backdrop { background: rgba(0,0,0,.85); backdrop-filter: blur(12px); }
.reference-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.reference-toolbar h2 { margin: 0; font-size: 20px; font-weight: 400; overflow-wrap: anywhere; }
.reference-toolbar > div { min-width: 0; }
.reference-toolbar .ghost-button { flex-shrink: 0; }
.reference-toolbar small { color: var(--muted); }
.reference-toolbar .ghost-button { margin: 0; white-space: nowrap; }
.reference-image-wrap { position: relative; }
.reference-heart { position: absolute; right: 10px; top: 10px; z-index: 4; width: 44px; height: 44px; border-radius: 50%; background: rgba(9,11,15,.86); cursor: pointer; }
.reference-preview { position: relative; width: min(100%, 430px, 40.5dvh); aspect-ratio: 3 / 4; margin: 0 auto; overflow: hidden; border-radius: 14px; }
.reference-preview.has-original { width: 100%; aspect-ratio: auto; min-height: 80px; display: grid; place-items: center; }
.reference-preview img { display: block; width: auto; height: auto; max-width: 100%; max-height: 54dvh; object-fit: contain; }
.reference-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.reference-controls .ghost-button { margin: 0; }
.reference-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.reference-number { position: relative; border: 2px solid transparent; color: var(--ink); width: 42px; height: 48px; border-radius: 8px; cursor: pointer; }
.reference-number span { background: rgba(5,6,8,.8); padding: 2px 5px; border-radius: 4px; }
.reference-number[aria-pressed="true"] { border-color: var(--ink); }
.reference-number { overflow: hidden; }
.reference-number img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reference-number span { position: relative; z-index: 1; }
.has-reference::before, .has-reference::after { display: none; }
.has-reference .reference-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.has-reference .reference-thumb[hidden] { display: none; }
.style-card .art-tile.has-reference { filter: none; opacity: .92; }
.style-card .art-tile.has-reference.tile-v5, .style-card .art-tile.has-reference.tile-v6,
.style-card .art-tile.has-reference.tile-v7, .style-card .art-tile.has-reference.tile-v8 { filter: none; }
.image-unavailable { display: grid; place-items: center; height: 100%; padding: 15px; background: #13161d; font-size: 12px; color: var(--muted); }
.reference-credit { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.reference-credit p { margin: 6px 0; color: var(--muted); }
.reference-credit a { display: inline-block; margin: 4px 18px 8px 0; color: var(--ink); }
.reference-credit a small { display: block; }
.reference-credit > small { display: block; color: var(--muted); }
.reference-controls button:disabled { opacity: .3; cursor: default; }
.art-tile::before,
.art-tile::after { content: ""; position: absolute; border-radius: 50%; filter: blur(22px); }
.art-diffuse { background: linear-gradient(145deg, #eee8d6, #b7d0c0 38%, #f29ab3 72%, #7c69d3); }
.art-diffuse::before { width: 75%; height: 52%; left: -12%; top: 8%; background: rgba(242,232,143,.85); }
.art-diffuse::after { width: 62%; height: 48%; right: -10%; bottom: 2%; background: rgba(77,80,212,.72); }
.art-nihilism { background: linear-gradient(180deg, #cbc9c3, #777773 58%, #242422); }
.art-nihilism::before { width: 34%; height: 64%; left: 33%; top: 12%; border-radius: 45% 45% 12% 12%; background: rgba(20,20,19,.72); filter: blur(5px); }
.art-nihilism::after { width: 120%; height: 2px; left: -10%; bottom: 28%; background: rgba(239,237,230,.55); filter: none; }
.art-retro { background: linear-gradient(155deg, #192024, #7f262d 50%, #d1a353); }
.art-retro::before { width: 130px; height: 130px; right: -10px; top: 18px; border: 18px solid rgba(226,198,119,.84); background: transparent; filter: none; }
.art-retro::after { width: 62%; height: 38%; left: -14%; bottom: 2%; border-radius: 0; background: repeating-linear-gradient(90deg, #5c8d8a 0 16px, #d3b166 16px 30px); filter: none; transform: skewY(-9deg); }
.art-baroque { background: radial-gradient(circle at 50% 25%, #7a2830, #171315 54%, #030303); }
.art-baroque::before { width: 56%; height: 70%; left: 22%; top: 10%; border: 2px solid rgba(214,177,92,.74); background: repeating-radial-gradient(circle at 50% 50%, transparent 0 14px, rgba(214,177,92,.24) 15px 17px); filter: none; }
.art-baroque::after { width: 30%; height: 42%; left: 35%; bottom: 0; border-radius: 50% 50% 8px 8px; background: #080808; filter: none; }
.art-surreal { background: linear-gradient(135deg, #cbd8d2, #e5c5b2 48%, #718b9b); }
.art-surreal::before { width: 58%; height: 42%; left: 21%; top: 20%; background: #ece9d8; box-shadow: 0 0 0 18px rgba(66,54,105,.3); filter: none; }
.art-surreal::after { width: 26%; height: 26%; right: 10%; bottom: 9%; background: #d34a40; filter: blur(2px); }
.art-punk { background: linear-gradient(150deg, #101010 0 52%, #dfde48 52%); }
.art-punk::before { width: 75%; height: 22%; left: 8%; top: 22%; border-radius: 0; background: #d94432; filter: none; transform: rotate(-7deg); }
.art-punk::after { width: 78%; height: 48%; right: -13%; bottom: -8%; border-radius: 0; background: repeating-linear-gradient(-25deg, transparent 0 12px, rgba(0,0,0,.75) 13px 20px); filter: none; }
.art-soft { background: linear-gradient(145deg, #efe5d5, #c8c3ae 44%, #aab7a4); }
.art-soft::before { width: 60%; height: 62%; left: 8%; top: 12%; background: rgba(255,250,236,.7); filter: blur(9px); }
.art-soft::after { width: 48%; height: 42%; right: 5%; bottom: 8%; background: rgba(173,143,123,.44); }

.upload-zone { position: relative; max-width: 820px; border: 1px dashed rgba(255,255,255,.32); border-radius: var(--radius); background: rgba(9,11,15,.58); backdrop-filter: blur(20px); }
.upload-zone.is-dragging { border-color: var(--red); background: rgba(180,59,49,.06); }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-zone label { display: grid; min-height: 270px; place-content: center; justify-items: center; gap: 9px; cursor: pointer; }
.upload-zone label strong { font-family: "Helvetica Neue", "PingFang SC", sans-serif; font-size: 28px; font-weight: 400; }
.upload-zone label span, .upload-zone label small { color: var(--muted); }
.upload-feedback { min-height: 22px; margin-top: 10px; color: var(--red); }
.upload-previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 820px; margin-top: 18px; }
.upload-previews.small { grid-template-columns: repeat(3, minmax(0, 150px)); margin-top: 10px; }
.preview-item { position: relative; overflow: hidden; min-height: 170px; border-radius: 18px; background: var(--surface-strong); }
.upload-previews.small .preview-item { min-height: 110px; }
.preview-item img { display: block; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.remove-button { position: absolute; right: 8px; top: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; background: rgba(9,11,15,.88); }
.prototype-note { max-width: 820px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.analysis-results, .creation-summary { max-width: 820px; margin-top: 34px; }
.analysis-card, .common-thread, .summary-card { margin-top: 14px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.analysis-card h3, .common-thread h3, .summary-card h3 { margin: 0 0 14px; font-family: "Helvetica Neue", "PingFang SC", sans-serif; font-size: 25px; font-weight: 400; }
.analysis-options { display: flex; flex-wrap: wrap; gap: 8px; }
.style-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.08); }
.style-chip .heart-button { font-size: 18px; }
.common-thread p, .summary-card p { margin: 6px 0 0; color: var(--muted); line-height: 1.7; }

.creation-form { display: grid; gap: 16px; }
.field-block { margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.field-heading { display: flex; justify-content: space-between; gap: 14px; }
.field-heading small { color: var(--muted); }
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.file-button {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  cursor: pointer;
  font-weight: 600;
}
.file-button:hover { border-color: var(--ink); }

.favorite-tabs { display: flex; gap: 8px; margin-bottom: 28px; }
.tab-button { border: 1px solid var(--line); }
.tab-button.is-active { background: var(--ink); color: var(--paper); }
.favorite-empty { padding: 38px 0; color: var(--muted); }
.favorite-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.favorite-item { position: relative; min-width: 0; min-height: 170px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.favorite-item h3 { margin: 0; font-family: "Helvetica Neue", "PingFang SC", sans-serif; font-size: 24px; font-weight: 400; }
.favorite-item p { color: var(--muted); }
.favorite-image-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.favorite-image-media { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; flex-shrink: 0; }
.favorite-image-info { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.favorite-image-info h3 { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.favorite-image-info p { font-size: 13px; line-height: 1.5; }
.favorite-image-info p small { display: block; }
.favorite-image-info .favorite-remove { position: static; align-self: flex-start; margin-top: auto; }
.favorite-remove small { display: block; font-size: 12px; line-height: 1.4; }
.favorite-style-remove { margin-top: 14px; }
.direction-browser { margin-top: 18px; }
.direction-browser summary { cursor: pointer; }
.direction-browser small { display: block; color: var(--muted); }
.direction-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.direction-chips .ghost-button { margin: 0; padding: 9px 14px; }
.direction-result { flex: 0 0 min(540px, 92vw); min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); scroll-snap-align: start; }
.direction-result h2 { font-size: 28px; }
.direction-result h2 small { display: block; font-size: 14px; margin-top: 6px; }
.direction-result p { line-height: 1.6; overflow-wrap: anywhere; }
.direction-result > small, .direction-result p[lang="zh-CN"] { color: var(--muted); }
.direction-links { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0; }
.direction-links a { color: var(--ink); }

.draw-stage {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}
.draw-stage[hidden] { display: none; }
.draw-stage-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 5, 0.92);
}
.draw-stage-content {
  position: relative;
  display: grid;
  width: min(920px, 94vw);
  max-height: 92vh;
  justify-items: center;
  overflow-y: auto;
}
.draw-stage-content > .eyebrow { margin-bottom: 12px; }
.draw-deck {
  position: absolute;
  left: 50%;
  top: min(42%, 36dvh);
  z-index: 1;
  width: 112px;
  height: 146px;
  transform: translate(-50%, -50%);
}
.draw-deck span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(41,214,183,.42), rgba(73,69,222,.48), rgba(216,57,197,.32));
  box-shadow: 0 18px 50px rgba(0,0,0,.38);
}
.draw-deck span:nth-child(1) { transform: rotate(-9deg) translate(-14px, 4px); }
.draw-deck span:nth-child(2) { transform: rotate(8deg) translate(14px, 2px); }
.draw-deck span:nth-child(3) { transform: rotate(0deg); }
.drawn-card-host {
  position: relative;
  z-index: 3;
  width: 100%;
  opacity: 0;
  transform: translate3d(0, 32px, 0) scale(0.15) rotate(-7deg);
  transform-origin: 50% min(40%, 36dvh);
  transition: transform 520ms cubic-bezier(.22,.7,.25,1), opacity 180ms ease;
}
.draw-stage:not([hidden]) .drawn-card-host { will-change: transform, opacity; }
.draw-stage.is-closing .drawn-card-host { transition-duration: 180ms; }
.drawn-card-host .style-card, .drawn-card-host .style-card-main, .drawn-card-host .heart-button { backdrop-filter: none; }
.draw-stage.is-revealed .drawn-card-host { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
.drawn-card-host .style-card {
  width: 100%;
  height: auto;
  margin: 0;
  flex: none;
}
.drawn-card-host .style-visual { height: auto; aspect-ratio: 16 / 9; }
.draw-stage.is-revealed .draw-deck { opacity: 0.35; transform: translate(-50%, -50%) scale(0.82); transition: transform 500ms ease, opacity 500ms ease; }
.draw-stage-actions {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 10px;
  margin-top: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease 340ms, transform 180ms ease 340ms;
}
.draw-stage-actions button { min-width: 112px; white-space: nowrap; }
.draw-stage.is-revealed .draw-stage-actions { opacity: 1; transform: translateY(0); }

@media (max-width: 820px) {
  .app-nav { grid-template-columns: 1fr auto; }
  .wordmark { display: none; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: 220px; }
  .mode-verb { font-size: 58px; }
  .style-card { flex-basis: 92vw; height: auto; }
  .style-visual, .drawn-card-host .style-visual { height: auto; aspect-ratio: 3 / 4; }
  .style-card-main { width: min(68%, 380px); min-width: 280px; }
  .style-card .art-tile { width: 46%; height: 36%; }
  .favorite-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  main { width: min(100% - 24px, 1180px); }
  .app-nav { padding: 9px 12px; min-height: 64px; }
  .screen { min-height: calc(100vh - 64px); padding-top: 44px; }
  .screen-landing { min-height: calc(100vh - 64px); }
  .screen-heading { margin-bottom: 34px; }
  .search-row { grid-template-columns: 1fr; }
  .solid-button { width: 100%; }
  .upload-previews, .upload-previews.small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .favorite-list { grid-template-columns: 1fr; }
  .field-heading { display: block; }
  .field-heading small { display: block; margin: -6px 0 10px; }
  .landing-copy { max-width: 100%; }
  .style-card { flex-basis: calc(100vw - 24px); height: auto; }
  .style-visual { height: auto; aspect-ratio: 3 / 4; }
  .style-card h2 { font-size: 29px; }
  .prompt-kit { padding: 22px; }
  .style-card-main { width: 78%; min-width: 0; padding: 22px; }
  .style-card .art-tile { width: 52%; height: 34%; border-radius: 14px; }
  .style-card .art-tile:nth-child(5),
  .style-card .art-tile:nth-child(6) { width: 38%; height: 24%; }
  .style-card .art-tile:nth-child(7),
  .style-card .art-tile:nth-child(8) { width: 38%; height: 25%; }
  .draw-stage { padding: 12px; }
  .draw-stage-content { width: 100%; }
  .drawn-card-host .style-card { height: auto; }
  .reference-dialog { padding: 16px; }
  .reference-picker { width: 100%; order: 3; }
  .reference-number { width: 36px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .aurora-cursor { left: 50%; top: 48%; }
}
