:root {
  --bg: #08080d;
  --bg-2: #0f0f17;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f4f3f8;
  --muted: #9b99ab;
  --dim: #6b697b;
  --violet: #c4b5fd;
  --pink: #f0abfc;
  --gold: #fde68a;
  --grad: linear-gradient(100deg, #c4b5fd 0%, #f0abfc 45%, #fde68a 100%);
  --paper: #fbfaf7;
  --ink: #0b0b12;
  --danger: #fb7185;
  --ok: #86efac;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
::selection { background: rgba(240, 171, 252, 0.35); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- ambient background ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(120px); opacity: 0.22; animation: drift 28s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: #7c3aed; top: -25vmax; left: -15vmax; }
.aurora span:nth-child(2) { background: #db2777; top: -20vmax; right: -25vmax; animation-delay: -9s; opacity: 0.14; }
.aurora span:nth-child(3) { background: #ca8a04; bottom: -40vmax; left: 20vmax; animation-delay: -16s; opacity: 0.1; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.1); } }
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(8, 8, 13, 0.6);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: 0.02em; }
.brand-mark { width: 30px; height: 30px; }
.brand em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 6px; font-size: 14px; letter-spacing: 0.04em; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.credit-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel);
  font-size: 13px; color: var(--muted);
}
.credit-pill b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.credit-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.credit-pill.low .dot { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; letter-spacing: 0.01em; white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s, border-color 0.2s, opacity 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--grad); color: var(--ink); box-shadow: 0 10px 30px -10px rgba(240, 171, 252, 0.55); }
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(240, 171, 252, 0.8); transform: translateY(-1px); }
.btn-ghost { background: var(--panel); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--panel-2); border-color: rgba(255, 255, 255, 0.24); }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn-cost { font-size: 12px; font-weight: 500; opacity: 0.65; padding-left: 10px; border-left: 1px solid currentColor; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: clamp(64px, 11vw, 132px) 20px 40px; max-width: 1100px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel); font-size: 13px; color: var(--muted);
}
.spark { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 {
  margin: 26px 0 20px; font-size: clamp(38px, 6.6vw, 80px); line-height: 1.08;
  letter-spacing: -0.035em; font-weight: 800;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 680px; margin: 0 auto; }
.hero-cta { display: flex; justify-content: center; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.hero-points i { font-style: normal; font-size: 9px; margin-right: 6px; vertical-align: 2px; color: var(--pink); }

.marquee {
  margin: 72px calc(50% - 50vw) 0; overflow: hidden; padding: 6px 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; gap: 18px; width: max-content; animation: scroll 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.marquee-item {
  width: 168px; height: 168px; flex: none; border-radius: 20px; padding: 18px;
  display: grid; place-items: center; background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04), 0 20px 40px -24px rgba(0, 0, 0, 0.8);
}
.marquee-item.dark { background: #15151e; box-shadow: inset 0 0 0 1px var(--line); }
.marquee-item svg { width: 100%; height: 100%; }

/* ---------- sections ---------- */
section { scroll-margin-top: 80px; }
.section-head { max-width: 1240px; margin: 0 auto 28px; padding: 0 clamp(16px, 4vw, 48px); }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pink); }
.section-head h2 { margin: 8px 0 6px; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.025em; line-height: 1.15; }
.section-head p { margin: 0; color: var(--muted); }
.studio, .history, .faq { padding: 72px 0 24px; }

/* ---------- studio ---------- */
.studio-grid {
  max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px);
  display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 24px; align-items: start;
}
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px;
  box-shadow: var(--shadow);
}
.brief { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { font-size: 13px; font-weight: 600; color: #d9d7e3; }
label sup { color: var(--pink); }
.opt { font-weight: 400; color: var(--dim); margin-left: 4px; }
input, textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.25); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, textarea:focus { border-color: rgba(240, 171, 252, 0.6); box-shadow: 0 0 0 4px rgba(240, 171, 252, 0.12); background: rgba(0, 0, 0, 0.35); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button, .refine-quick button {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; font-size: 13px; color: var(--muted); transition: all 0.18s;
}
.chips button:hover, .refine-quick button:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.chips button.on { color: var(--ink); background: var(--grad); border-color: transparent; font-weight: 600; }

.segmented { display: flex; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.segmented button { flex: 1; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; font-size: 12.5px; color: var(--muted); white-space: nowrap; transition: all 0.18s; }
.segmented button.on { background: rgba(255, 255, 255, 0.1); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset; }

.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch-row button {
  width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; background: var(--c);
  box-shadow: 0 0 0 1px var(--line-2); transition: transform 0.15s, box-shadow 0.15s;
}
.swatch-row button:hover { transform: scale(1.08); }
.swatch-row button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--pink); }
.sw-any { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; font-size: 10px; font-weight: 700; background: var(--panel-2); color: var(--muted); }
.form-note { margin: -6px 0 0; text-align: center; font-size: 12.5px; color: var(--dim); min-height: 1em; }

/* ---------- results ---------- */
.results {
  min-height: 640px; border-radius: var(--r-lg); border: 1px dashed var(--line-2);
  background: rgba(255, 255, 255, 0.015); padding: 24px; position: relative;
}
.results.has { border-style: solid; border-color: var(--line); }
.empty, .loading { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 590px; }
.empty h3, .loading h3 { margin: 22px 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.empty p { margin: 0; color: var(--muted); }
.empty-art { position: relative; width: 200px; height: 200px; color: var(--muted); }
.empty-art svg { position: absolute; inset: 0; animation: spin 60s linear infinite; }
.empty-art .orb { position: absolute; inset: 62px; border-radius: 50%; background: var(--grad); filter: blur(2px); opacity: 0.9; box-shadow: 0 0 80px rgba(240, 171, 252, 0.45); animation: breathe 5s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(0.88); opacity: 0.7; } }

.loader-stage { position: relative; width: 112px; height: 112px; }
.loader-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 30%, #c4b5fd, #f0abfc, #fde68a); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: spin 1.4s linear infinite; }
.loader-core { position: absolute; inset: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.12), rgba(255,255,255,.02)); border: 1px solid var(--line); animation: breathe 2.4s ease-in-out infinite; }
.steps { list-style: none; padding: 0; margin: 14px 0 14px; display: grid; gap: 8px; text-align: left; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 14px; transition: color 0.4s; }
.steps li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; transition: all 0.4s; }
.steps li.active { color: var(--text); }
.steps li.active::before { border-color: var(--pink); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.steps li.done { color: var(--muted); }
.steps li.done::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b0b12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--ok); }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: 100%; max-width: 640px; margin-top: 26px; }
.skeleton-grid i { aspect-ratio: 1; border-radius: 16px; background: linear-gradient(110deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.04) 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.results-head h3 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.results-head p { margin: 2px 0 0; }
.bg-toggle { display: flex; gap: 6px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.bg-toggle button { width: 26px; height: 26px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: box-shadow .15s; }
.bg-toggle button[data-bg="light"] { background: var(--paper); }
.bg-toggle button[data-bg="dark"] { background: #16161f; }
.bg-toggle button[data-bg="grid"] { background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
.bg-toggle button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--pink); }

.logo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.logo-card {
  border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
  animation: rise 0.6s cubic-bezier(.2,.7,.2,1) both;
}
.logo-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.logo-stage { position: relative; aspect-ratio: 1 / 0.82; display: grid; place-items: center; cursor: zoom-in; transition: background .3s; }
.logo-stage img { width: 76%; height: 92%; object-fit: contain; transition: transform .4s ease; }
.logo-card:hover .logo-stage img { transform: scale(1.03); }
.bg-light { background: var(--paper); }
.bg-dark { background: #14141c; }
.bg-dark img { filter: none; }
.bg-grid { background: repeating-conic-gradient(#ececec 0 25%, #fff 0 50%) 0 0 / 18px 18px; }
.fav-btn {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; display: grid; place-items: center; background: rgba(255,255,255,.75); color: #555;
  backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgba(0,0,0,.08); font-size: 16px; opacity: 0; transition: opacity .2s, transform .2s;
}
.bg-dark .fav-btn { background: rgba(255,255,255,.1); color: #ddd; }
.logo-card:hover .fav-btn, .fav-btn.on { opacity: 1; }
.fav-btn.on { color: #e11d48; }
.fav-btn:hover { transform: scale(1.08); }
.tag-new { position: absolute; top: 12px; left: 12px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--ink); color: var(--gold); letter-spacing: .04em; }
.logo-meta { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.logo-meta h4 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.logo-meta p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dots { display: flex; gap: 4px; flex: none; }
.dots i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.card-actions .btn { padding: 8px 12px; font-size: 13px; flex: 1; }

/* ---------- history ---------- */
.history-list { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); display: grid; gap: 14px; }
.history-empty { padding: 40px; text-align: center; color: var(--dim); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.history-item { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.history-item h4 { margin: 0 0 2px; font-size: 16px; }
.history-item .muted { font-size: 12.5px; }
.history-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 4px; scrollbar-width: thin; }
.history-thumbs button { flex: none; width: 92px; height: 92px; border-radius: 14px; border: 0; padding: 8px; background: var(--paper); display: grid; place-items: center; position: relative; transition: transform .2s, box-shadow .2s; }
.history-thumbs button:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--pink); }
.history-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.history-thumbs .heart { position: absolute; top: 4px; right: 6px; font-size: 11px; color: #e11d48; }
.history-thumbs .sub { position: absolute; bottom: 4px; left: 6px; font-size: 9.5px; font-weight: 700; color: #8a6d00; background: #fff6cc; padding: 0 5px; border-radius: 4px; }

/* ---------- faq ---------- */
.faq-grid { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); padding: 16px 18px; transition: background .2s; }
details[open] { background: var(--panel-2); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
summary::-webkit-details-marker { display: none; }
details p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.footer { max-width: 1240px; margin: 64px auto 0; padding: 28px clamp(16px, 4vw, 48px) 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); font-size: 13px; }

/* ---------- modals ---------- */
.modal { padding: 0; border: 0; background: transparent; color: var(--text); max-width: 100vw; max-height: 100vh; }
.modal::backdrop { background: rgba(4, 4, 8, 0.72); backdrop-filter: blur(8px); }
.modal[open] .modal-card { animation: pop .35s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.modal-card { position: relative; background: #111119; border: 1px solid var(--line-2); border-radius: 24px; box-shadow: 0 40px 120px -20px rgba(0,0,0,.9); }
.modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--panel-2); color: var(--muted); font-size: 20px; line-height: 1; z-index: 2; }
.modal-x:hover { color: var(--text); background: rgba(255,255,255,.12); }
.redeem-card { width: min(440px, calc(100vw - 32px)); padding: 36px 32px 28px; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.redeem-card h3 { margin: 6px 0 0; font-size: 22px; }
.redeem-card p { margin: 0; }
.redeem-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; font-size: 24px; color: var(--ink); background: var(--grad); box-shadow: 0 14px 40px -12px rgba(240,171,252,.7); }
.code-input { margin-top: 10px; text-align: center; font-family: var(--mono); font-size: 17px; letter-spacing: .12em; padding: 14px; text-transform: uppercase; }
.form-error { color: var(--danger); font-size: 13px; min-height: 1.2em; }
.buy-link { font-size: 13px; color: var(--muted); margin-top: 4px; }
.buy-link:hover { color: var(--pink); }

.detail-card { width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 0; }
.detail-grid { display: grid; grid-template-columns: 1.25fr 1fr; }
.detail-left { padding: 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.detail-preview { aspect-ratio: 1.25; border-radius: 18px; display: grid; place-items: center; cursor: pointer; transition: background .3s; }
.detail-preview img { width: 70%; height: 86%; object-fit: contain; }
.mockups { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 12px; }
.mock { border-radius: 14px; overflow: hidden; position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.mock-card { aspect-ratio: auto; background: linear-gradient(135deg, #f7f5ef, #ebe7dc); padding: 16px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.mock-card img { width: 46%; }
.mock-card .lines { width: 100%; display: grid; gap: 5px; }
.mock-card .lines i { display: block; height: 4px; border-radius: 2px; background: rgba(0,0,0,.14); }
.mock-card .lines i:first-child { width: 55%; background: rgba(0,0,0,.4); height: 5px; }
.mock-card .lines i:nth-child(2) { width: 38%; }
.mock-app { background: radial-gradient(circle at 50% 30%, #2a2a38, #121219); }
.mock-app .icon { width: 58%; aspect-ratio: 1; border-radius: 24%; background: #fff; display: grid; place-items: center; box-shadow: 0 12px 24px -8px rgba(0,0,0,.6); }
.mock-app .icon img { width: 82%; height: 82%; object-fit: contain; }
.mock-fav { background: #e9e9ee; display: flex; flex-direction: column; gap: 6px; padding: 10px; justify-content: center; }
.mock-fav .tab { width: 100%; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 8px 8px 0 0; padding: 6px 8px; font-size: 10px; color: #333; overflow: hidden; white-space: nowrap; }
.mock-fav .tab img { width: 16px; height: 16px; flex: none; }
.mock-fav .sizes { display: flex; align-items: flex-end; gap: 8px; justify-content: center; }
.mock-fav .sizes img { background: #fff; border-radius: 4px; padding: 1px; }
.mock-label { position: absolute; bottom: 6px; right: 8px; font-size: 9.5px; color: rgba(0,0,0,.4); font-family: var(--mono); }
.mock-app .mock-label { color: rgba(255,255,255,.4); }

.detail-right { padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.detail-right h3 { margin: 0; font-size: 26px; letter-spacing: -0.02em; line-height: 1.2; }
.detail-right > p { margin: 0; font-size: 14px; }
.palette { display: flex; gap: 8px; flex-wrap: wrap; }
.palette button { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.palette button:hover { color: var(--text); }
.palette i { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-actions .btn { flex: 1; }
.refine { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.refine-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.refine-quick button { padding: 5px 11px; font-size: 12px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 100;
  padding: 12px 20px; border-radius: 999px; background: #1b1b26; border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.8); font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s ease; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(251,113,133,.5); color: #fecdd3; }
.toast.ok { border-color: rgba(134,239,172,.4); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .studio-grid { grid-template-columns: 1fr; }
  .brief { position: static; }
  .results { min-height: 0; }
  .empty, .loading { min-height: 420px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-left { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .brand em { display: none; }
  .hide-sm { display: none; }
  .logo-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .history-item { grid-template-columns: 1fr; }
  .skeleton-grid { grid-template-columns: repeat(2, 1fr); }
  .results { padding: 16px; }
  .panel { padding: 18px; }
  .mockups { grid-template-columns: 1fr 1fr; }
  .mock-card { grid-column: span 2; aspect-ratio: 1.75; }
  .hero-points { gap: 14px; }
  .credit-pill { padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
