/* Sticker Studio · customer front-end
   Warm paper, ink type, vermilion accent. */

:root {
  --paper: #f2ece0;
  --paper-soft: #fbf7ee;
  --card: #fffdf8;
  --ink: #211b14;
  --ink-2: #3a3128;
  --muted: #756a5c;
  --line: rgba(33, 27, 20, 0.13);
  --line-strong: rgba(33, 27, 20, 0.24);
  --accent: #c8452d;
  --accent-dark: #a33420;
  --accent-soft: #f7e4de;
  --gold: #b8873a;
  --green: #2f7a5b;
  --red: #b23a2a;
  --shadow: 0 24px 60px -34px rgba(33, 27, 20, 0.5);
  --shadow-soft: 0 12px 30px -22px rgba(33, 27, 20, 0.38);
  --radius: 24px;
  --radius-sm: 16px;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--sans);
  color: var(--ink);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.018'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(1200px 640px at 84% -8%, rgba(200, 69, 45, 0.10), transparent 62%),
    radial-gradient(900px 520px at 4% 12%, rgba(184, 135, 58, 0.10), transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }

::selection { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(242, 236, 224, 0.94);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-head.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(251, 247, 238, 0.985);
}

.head-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: block;
  border-radius: 13px;
  object-fit: cover;
  background: var(--paper-soft);
  box-shadow: 0 10px 18px -12px rgba(33, 27, 20, 0.45);
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy b { font-family: var(--serif); font-size: 20px; letter-spacing: 0.04em; }
.brand-copy small { font-size: 9px; letter-spacing: 0.34em; color: var(--muted); margin-top: 5px; }

.head-nav {
  display: flex;
  gap: 26px;
  margin-left: 12px;
}

.head-nav a {
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
}

.head-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transition: right 0.25s ease;
}

.head-nav a:hover::after { right: 0; }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.nav-btn {
  border: 0;
  background: none;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 8px 2px;
  text-decoration: none;
}

.nav-btn:hover { color: var(--accent); }

.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 248, 0.7);
  border-radius: 999px;
  padding: 6px 16px 6px 6px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.account-chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.account-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper-soft);
  font-family: var(--serif);
  font-size: 16px;
  flex: none;
}

.account-chip.is-on .account-dot { background: var(--accent); }

.account-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.account-copy b { font-size: 12.5px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { font-size: 10.5px; color: var(--muted); margin-top: 1px; }

/* ---------------------------------------------------------------- hero */

main { position: relative; z-index: 1; }

.hero {
  max-width: 1320px;
  margin: 0 auto;
  padding: 76px 28px 54px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 48px;
  align-items: center;
}

.eyebrow, .kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 22px;
  font-family: var(--serif);
  font-size: clamp(42px, 5.6vw, 78px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 6px;
  height: 10px;
  background: rgba(200, 69, 45, 0.16);
  z-index: -1;
  border-radius: 6px;
}

.lede {
  max-width: 520px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.85;
}

.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.hero-plaza-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 69, 45, 0.28);
  padding-bottom: 2px;
}

.hero-plaza-link:hover { border-bottom-color: var(--accent); }

.hero-facts {
  display: flex;
  gap: 40px;
  list-style: none;
  padding: 0;
  margin: 42px 0 0;
}

.hero-facts li { display: flex; flex-direction: column; gap: 4px; }
.hero-facts b { font-family: var(--serif); font-size: 24px; }
.hero-facts span { font-size: 11.5px; color: var(--muted); letter-spacing: 0.08em; }

.hero-art {
  position: relative;
  min-height: 460px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-orbit {
  position: absolute;
  width: 84%;
  aspect-ratio: 1;
  border: 1px dashed rgba(33, 27, 20, 0.22);
  border-radius: 50%;
  animation: spin 42s linear infinite;
}

.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-orbit::before { top: 10%; left: 10%; }
.hero-orbit::after { bottom: 12%; right: 9%; background: var(--gold); }

.hero-card {
  position: absolute;
  width: 46%;
  aspect-ratio: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.hero-card img { width: 100%; height: 100%; object-fit: contain; }

.hc-1 { transform: rotate(-9deg) translate(-24%, -8%); animation: float1 8s ease-in-out infinite; }
.hc-2 { transform: rotate(7deg) translate(26%, -20%); animation: float2 9s ease-in-out infinite; z-index: 2; }
.hc-3 { transform: rotate(3deg) translate(-4%, 34%); animation: float3 10s ease-in-out infinite; }

.hero-tag {
  position: absolute;
  bottom: 8%;
  right: 2%;
  z-index: 3;
  background: var(--ink);
  color: var(--paper-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float1 { 0%, 100% { transform: rotate(-9deg) translate(-24%, -8%); } 50% { transform: rotate(-7deg) translate(-24%, -12%); } }
@keyframes float2 { 0%, 100% { transform: rotate(7deg) translate(26%, -20%); } 50% { transform: rotate(5deg) translate(26%, -25%); } }
@keyframes float3 { 0%, 100% { transform: rotate(3deg) translate(-4%, 34%); } 50% { transform: rotate(5deg) translate(-4%, 30%); } }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 13px 24px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; }

.btn.lg { padding: 16px 30px; font-size: 14.5px; }
.btn.sm { padding: 9px 16px; font-size: 12.5px; }
.btn.wide { width: 100%; }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8ef;
  box-shadow: 0 14px 26px -18px var(--accent);
}

.btn.primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-soft);
}

.btn.ghost { background: transparent; }

.link-btn {
  border: 0;
  background: none;
  padding: 4px;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover { color: var(--accent); }
.link-btn.center { display: block; margin: 10px auto 0; }
.link-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.mini-btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  color: var(--ink-2);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.mini-btn:hover { border-color: var(--accent); color: var(--accent); }
a.mini-btn { display: inline-flex; align-items: center; text-decoration: none; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 19px;
  line-height: 1;
  color: var(--muted);
}

.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------------- demo note */

.demo-note {
  max-width: 1264px;
  margin: 0 auto 26px;
  padding: 12px 20px;
  border: 1px dashed var(--gold);
  border-radius: 14px;
  background: rgba(184, 135, 58, 0.08);
  font-size: 12.5px;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.demo-link { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------------- layout */

.workspace {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 394px;
  gap: 26px;
  align-items: start;
}

.col-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.col-side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 86px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px 18px;
}

.card-head h2 {
  font-family: var(--serif);
  font-size: 26px;
  margin-top: 8px;
  letter-spacing: -0.01em;
}

.card-note { font-size: 12px; color: var(--muted); white-space: nowrap; }
.card-note b { color: var(--accent); font-family: var(--serif); font-size: 18px; }

/* ---------------------------------------------------------------- upload */

.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 26px;
  padding: 0 28px 28px;
}

.dropzone {
  position: relative;
  min-height: 330px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(245, 237, 222, 0.75), rgba(255, 253, 248, 0.6));
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover, .dropzone.is-drag { border-color: var(--accent); background: var(--accent-soft); }

.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 24px; }
.drop-empty b { font-family: var(--serif); font-size: 19px; }
.drop-empty small { color: var(--muted); font-size: 12px; line-height: 1.7; max-width: 260px; }

.drop-plus {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  position: relative;
  margin-bottom: 4px;
}

.drop-plus::before,
.drop-plus::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.drop-plus::before { width: 18px; height: 1.5px; }
.drop-plus::after { width: 1.5px; height: 18px; }

#characterPreview {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
  padding: 18px;
}

.drop-edit {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(33, 27, 20, 0.86);
  color: var(--paper-soft);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
}

.upload-info { display: flex; flex-direction: column; gap: 14px; }
.upload-info h3 { font-family: var(--serif); font-size: 21px; }
.upload-info > p { color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }

.upload-tips { margin: 0; padding: 0 0 0 18px; color: var(--muted); font-size: 12.5px; line-height: 2; }

.upload-actions { display: flex; align-items: center; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 11.5px; letter-spacing: 0.08em; color: var(--muted); }

.field input,
.field select,
.field textarea,
.search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(251, 247, 238, 0.8);
  padding: 11px 13px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200, 69, 45, 0.12);
}

.field textarea { resize: vertical; min-height: 58px; line-height: 1.65; }

/* ---------------------------------------------------------------- catalog */

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px 18px;
  flex-wrap: wrap;
}

.chips { display: flex; gap: 7px; flex-wrap: wrap; }

.chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--ink-2);
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper-soft); }
.chip-add { border-style: dashed; color: var(--muted); }
.chip-add:hover { border-style: solid; }
.chip-publish { border-color: rgba(200, 69, 45, 0.4); background: rgba(200, 69, 45, 0.06); color: var(--accent); }
.chip-publish:hover { background: rgba(200, 69, 45, 0.12); }

.toolbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search { width: 200px; padding: 8px 13px; border-radius: 999px; }

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
  padding: 0 28px 30px;
}

/* ---------------------------------------------------------------- style & tone */

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  padding: 0;
}

.style-option {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper-soft);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.style-option b { display: block; font-family: var(--serif); font-size: 14.5px; color: var(--ink); }
.style-option small { display: block; margin-top: 5px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.style-option:hover { border-color: var(--accent); transform: translateY(-2px); }
.style-option.is-active { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 2px rgba(200, 69, 45, 0.16); }
.style-option.is-active b { color: var(--accent); }
.style-option.is-custom { border-style: dashed; }

.hint.style-hint { padding: 12px 0 2px; }
.hint.style-lead { padding: 0 0 14px; }

.style-custom { padding: 2px 0 0; }
.style-custom[hidden] { display: none; }

.style-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 4px 0 0;
  align-items: start;
}

.style-modal { width: min(760px, 100%); }

.state-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-soft);
  padding: 10px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.state-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.state-card.is-selected { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 2px rgba(200, 69, 45, 0.16); }

.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 13px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(200, 69, 45, 0.08), rgba(184, 135, 58, 0.10)),
    var(--paper);
  display: grid;
  place-items: center;
}

.thumb img { width: 100%; height: 100%; object-fit: contain; }

.thumb .placeholder {
  font-family: var(--serif);
  font-size: 21px;
  color: rgba(33, 27, 20, 0.42);
  letter-spacing: 0.06em;
  text-align: center;
  padding: 8px;
}

.state-card.is-generating .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.65) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer { to { transform: translateX(100%); } }

.status {
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(33, 27, 20, 0.82);
  color: #fff;
}

.status.generating { background: var(--accent); }
.status.review, .status.done { background: var(--green); }
.status.failed { background: var(--red); }
.status.queued { background: var(--gold); }

.check {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(33, 27, 20, 0.35);
  background: rgba(255, 253, 248, 0.8);
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.state-card.is-selected .check { background: var(--accent); border-color: var(--accent); }

.state-card.is-selected .check::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.state-meta { padding: 10px 3px 3px; }
.state-meta h3 { font-family: var(--serif); font-size: 16px; display: flex; justify-content: space-between; gap: 6px; }
.state-meta h3 span { font-family: var(--mono); font-size: 9.5px; color: var(--muted); font-weight: 400; padding-top: 3px; }
.state-meta p { margin-top: 5px; font-size: 11px; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-error {
  margin: 7px 3px 0;
  font-size: 10.5px;
  color: var(--red);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tools { display: flex; align-items: center; gap: 6px; padding: 8px 3px 1px; }

.card-edit {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.card-edit:hover { border-color: var(--accent); color: var(--accent); }
.card-edit:disabled { opacity: 0.4; cursor: not-allowed; }
.custom-tag { font-size: 9px; color: var(--gold); letter-spacing: 0.08em; }

/* ---------------------------------------------------------------- order */

.order-card { padding-bottom: 24px; }
.order-card .card-head { padding-bottom: 10px; }

.live-dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(47, 122, 91, 0.45);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(3.2); opacity: 0; }
}

.order-fields { padding: 0 24px; display: flex; flex-direction: column; gap: 12px; }

.style-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: calc(100% - 48px);
  margin: 2px 24px 16px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-soft);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.style-trigger:hover { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 2px rgba(200, 69, 45, 0.12); }
.style-trigger-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.style-trigger-copy b { font-family: var(--serif); font-size: 14.5px; color: var(--ink); }
.style-trigger-copy small { font-size: 11px; line-height: 1.55; color: var(--muted); }
.style-trigger-action { flex: none; font-size: 11px; color: var(--accent); border: 1px solid rgba(200, 69, 45, 0.3); border-radius: 999px; padding: 4px 11px; }

.model-field { margin: 2px 24px 16px; }
.model-field[hidden] { display: none; }
.model-note { font-size: 11px; line-height: 1.55; color: var(--muted); }

.summary {
  margin: 20px 24px 16px;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.summary-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.summary-row b { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.summary-row b.accent { color: var(--accent); font-family: var(--serif); font-size: 19px; }
.summary-row i { font-style: normal; }

.order-card > .btn.wide { width: calc(100% - 48px); margin: 0 24px; }

.asset-toggle {
  margin: 0 24px 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--paper-soft);
  font-size: 12px;
  color: var(--ink-2);
}
.asset-toggle-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.asset-toggle-head span { display: flex; align-items: center; gap: 8px; }
.asset-toggle input { width: 15px; height: 15px; accent-color: var(--accent); }
.asset-toggle b { font-family: var(--serif); font-size: 13.5px; color: var(--accent); white-space: nowrap; }

.asset-picks {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 10px;
}
.asset-picks[hidden] { display: none; }
.asset-picks label { display: flex; align-items: center; gap: 7px; padding: 4px 2px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.asset-picks input { width: 14px; height: 14px; }

.hint { padding: 10px 24px 0; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.hint.asset-note { padding: 0 24px 13px; }

.progress-panel {
  margin: 18px 24px 0;
  background: linear-gradient(155deg, #2a221a, #1a1510);
  border-radius: 18px;
  padding: 18px;
  color: var(--paper-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.progress-head span { color: rgba(251, 247, 238, 0.74); line-height: 1.5; }
.progress-head b { font-family: var(--serif); font-size: 22px; color: #f3c96f; }

.progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  margin: 12px 0 10px;
  overflow: hidden;
}

.progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #e7b24f, #f3d493);
  transition: width 0.5s ease;
}

.progress-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: rgba(251, 247, 238, 0.55); }

.live-list { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; max-height: 232px; overflow-y: auto; scrollbar-width: thin; }

.live-row { display: flex; align-items: center; gap: 9px; font-size: 11.5px; padding: 6px 8px; border-radius: 9px; background: rgba(255, 255, 255, 0.045); }
.live-row .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); flex: none; }
.live-row .word { flex: 1; color: rgba(251, 247, 238, 0.86); }
.live-row .state { font-size: 10.5px; color: rgba(251, 247, 238, 0.52); }
.live-row .plaza-publish {
  flex: none;
  border: 1px solid rgba(243, 201, 111, 0.4);
  background: transparent;
  color: #f3c96f;
  font-size: 10px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.live-row .plaza-publish:hover:not(:disabled) { background: rgba(243, 201, 111, 0.14); border-color: #f3c96f; }
.live-row .plaza-publish:disabled { opacity: 0.55; cursor: wait; }
.live-row .plaza-published { flex: none; font-size: 10px; color: rgba(102, 195, 154, 0.85); }
.live-row.is-generating .dot { background: #f3c96f; animation: blink 1s infinite; }
.live-row.is-generating .state { color: #f3c96f; }
.live-row.is-done .dot { background: #66c39a; }
.live-row.is-done .state { color: #66c39a; }
.live-row.is-failed .dot { background: #ef7d6a; }
.live-row.is-failed .state { color: #ef7d6a; }
.live-row.is-clickable { cursor: pointer; }
.live-row.is-clickable:hover { background: rgba(255, 255, 255, 0.1); }
.live-plaza-hint { margin-top: 8px; font-size: 10.5px; line-height: 1.6; color: rgba(243, 201, 111, 0.72); }

.live-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px dashed rgba(243, 201, 111, 0.28);
  border-radius: 10px;
  background: rgba(243, 201, 111, 0.06);
}
.live-tools[hidden] { display: none; }
.live-tools-note { font-size: 10px; color: rgba(251, 247, 238, 0.5); }
.plaza-publish-all {
  flex: none;
  border: 1px solid rgba(243, 201, 111, 0.5);
  background: rgba(243, 201, 111, 0.12);
  color: #f3c96f;
  font-size: 10.5px;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.plaza-publish-all:hover:not(:disabled) { background: rgba(243, 201, 111, 0.22); border-color: #f3c96f; }
.plaza-publish-all:disabled { opacity: 0.55; cursor: wait; }
.plaza-all-done { flex: none; font-size: 10.5px; color: rgba(102, 195, 154, 0.9); }
.plaza-all-done[hidden] { display: none; }

@keyframes blink { 50% { opacity: 0.3; } }

.asset-block { margin-top: 14px; padding-top: 13px; border-top: 1px dashed rgba(255, 255, 255, 0.12); }
.asset-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 10.5px; letter-spacing: 0.1em; color: rgba(251, 247, 238, 0.52); }
.asset-head b { font-family: var(--serif); font-size: 13px; letter-spacing: 0; color: #f3c96f; }
.asset-grid { margin-top: 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.asset-card { display: flex; flex-direction: column; gap: 5px; padding: 6px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 12px; background: rgba(255, 255, 255, 0.045); color: inherit; cursor: zoom-in; text-align: left; transition: border-color 0.18s ease, background 0.18s ease; }
.asset-card:hover { border-color: rgba(243, 201, 111, 0.5); background: rgba(255, 255, 255, 0.09); }
.asset-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 8px; background: rgba(0, 0, 0, 0.2); }
.asset-card span { padding: 0 2px 1px; font-size: 10.5px; color: rgba(251, 247, 238, 0.72); }
.asset-empty { grid-column: 1 / -1; margin: 0; padding: 14px 12px; border: 1px dashed rgba(255, 255, 255, 0.16); border-radius: 10px; font-size: 11px; line-height: 1.7; color: rgba(251, 247, 238, 0.5); }

.order-receipt { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; color: rgba(251, 247, 238, 0.55); }
.order-receipt b { color: #f3c96f; font-weight: 600; }

.deliver { padding: 20px 24px 0; }
.deliver .hint { padding: 10px 0 0; }

.tips-card { padding: 24px; }
.tips-card h3 { font-family: var(--serif); font-size: 19px; margin: 10px 0 12px; }
.tips-card ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: 12px; line-height: 1.95; }
.tips-card b { color: var(--ink-2); }

/* ---------------------------------------------------------------- footer */

.site-foot {
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 28px 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
}

.foot-links { display: flex; gap: 20px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 22, 16, 0.52);
  backdrop-filter: blur(8px);
}

.modal.is-open { display: flex; animation: fadeIn 0.18s ease; }

@keyframes fadeIn { from { opacity: 0; } }

.modal-card {
  width: min(520px, 100%);
  max-height: min(84vh, 900px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.55);
  padding: 26px;
  animation: rise 0.22s ease;
}

@keyframes rise { from { transform: translateY(14px); opacity: 0; } }

.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.modal-head h2 { font-family: var(--serif); font-size: 25px; margin-top: 7px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.auth-card { width: min(460px, 100%); }
.form-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.auth-code-row { display: flex; align-items: stretch; gap: 8px; }
.auth-code-row input { flex: 1; min-width: 0; }
.auth-code-row .mini-btn { flex: none; padding: 0 14px; white-space: nowrap; }
.auth-code-row .mini-btn:disabled { opacity: 0.6; cursor: wait; }
.form-error { margin-top: 12px; min-height: 16px; font-size: 12px; color: var(--red); }
.auth-gift { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px; background: var(--accent-soft); border-radius: 12px; font-size: 11.5px; color: var(--accent-dark); }
.auth-gift b { font-family: var(--serif); font-size: 16px; }
.auth-forgot { margin-right: auto; align-self: center; padding-left: 0; padding-right: 0; font-size: 12px; }

.works-card { width: min(820px, 100%); }
.works-summary { display: flex; align-items: center; gap: 30px; padding: 16px 18px; border-radius: 16px; background: var(--paper-soft); border: 1px solid var(--line); flex-wrap: wrap; }
.works-summary > div { display: flex; flex-direction: column; gap: 2px; }
.works-summary b { font-family: var(--serif); font-size: 24px; }
.works-summary span { font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; }
.works-account { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.works-copy { padding: 5px 10px; font-size: 11px; }

.redeem-entry {
  margin-top: 14px; padding: 14px 16px; border-radius: 16px;
  border: 1px dashed var(--line-strong); background: var(--paper);
  display: flex; flex-direction: column; gap: 9px;
}
.redeem-entry-text { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.redeem-entry-text b { font-family: var(--serif); font-size: 16px; }
.redeem-entry-text span { font-size: 11.5px; color: var(--muted); }
.redeem-entry-row { display: flex; gap: 10px; align-items: stretch; }
.redeem-entry-row input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper-soft); padding: 9px 12px; outline: none;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
}
.redeem-entry-row input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(200, 69, 45, 0.12); }
.redeem-msg { margin: 0; min-height: 15px; font-size: 11.5px; color: var(--red); }
.redeem-msg.is-ok { color: var(--green); }

.section-title { font-family: var(--serif); font-size: 17px; margin: 22px 0 10px; }

.works-list { display: flex; flex-direction: column; gap: 12px; }
.work-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--paper-soft); }
.work-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; align-content: start; }
.work-thumbs img { width: 100%; aspect-ratio: 1; object-fit: contain; background: rgba(33, 27, 20, 0.04); border-radius: 8px; }
.work-noimg { grid-column: 1/-1; aspect-ratio: 2.2; display: grid; place-items: center; font-size: 11px; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }
.work-meta { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.work-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.work-top b { font-family: var(--serif); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-state { font-size: 10.5px; padding: 3px 9px; border-radius: 999px; background: var(--paper); color: var(--muted); white-space: nowrap; }
.work-state.review, .work-state.done { background: rgba(47, 122, 91, 0.12); color: var(--green); }
.work-state.failed { background: rgba(178, 58, 42, 0.12); color: var(--red); }
.work-state.queued, .work-state.generating { background: rgba(184, 135, 58, 0.14); color: var(--gold); }
.work-sub { font-size: 11.5px; color: var(--muted); }
.work-links { display: flex; gap: 14px; margin-top: auto; flex-wrap: wrap; }
.work-links a, .work-links button { border: 0; background: none; padding: 0; font-size: 12px; color: var(--accent); text-decoration: none; cursor: pointer; }
.work-links button { color: var(--muted); }
.work-links button:hover { color: var(--accent); }

.point-list { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow-y: auto; }
.point-row { display: flex; align-items: center; gap: 12px; font-size: 11.5px; padding: 8px 10px; border-radius: 10px; background: var(--paper-soft); }
.point-time { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.point-reason { flex: 1; color: var(--ink-2); }
.point-row b { color: var(--green); }
.point-row.minus b { color: var(--red); }
.point-balance { color: var(--muted); font-size: 10.5px; }

.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 12.5px; }

.preview-card { width: min(520px, 100%); }
.preview-stage { background: var(--paper-soft); border: 1px solid var(--line); border-radius: 18px; min-height: 300px; display: grid; place-items: center; padding: 20px; }
.preview-stage img { max-height: 420px; object-fit: contain; }

.confirm-card { width: min(440px, 100%); }
.cat-card { width: min(440px, 100%); }
.confirm-text { font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }

.edit-card { width: min(540px, 100%); }
.edit-note { padding: 0 0 4px; }
.edit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-publish { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.65; color: var(--ink-2); cursor: pointer; }
.edit-publish input { margin-top: 3px; accent-color: var(--accent); }
.edit-publish span { color: var(--muted); }
.danger-ghost { margin-right: auto; color: var(--red); border-color: rgba(178, 58, 42, 0.28); }
.danger-ghost:hover { color: var(--red); border-color: var(--red); }

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  z-index: 200;
  background: var(--ink);
  color: var(--paper-soft);
  font-size: 12.5px;
  line-height: 1.6;
  padding: 12px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: min(560px, calc(100vw - 40px));
  text-align: center;
  box-shadow: var(--shadow);
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------- redemption fireworks */
/* Sits above the modals but below the toast, and never eats a click. */
.fx-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 190;
  pointer-events: none;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1120px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 350px; }
  .head-nav { display: none; }
  .hero { gap: 24px; }
  .hero-art { min-height: 400px; }
}

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-art { min-height: 360px; width: min(520px, 100%); margin: 8px auto 0; }
  .workspace { grid-template-columns: 1fr; }
  .col-side { position: static; }
  .account-copy b { max-width: 120px; }
}

@media (max-width: 720px) {
  .head-inner { padding: 12px 16px; gap: 12px; }
  .brand-copy small { display: none; }
  .brand-mark { width: 38px; height: 38px; font-size: 20px; }
  .brand-copy b { font-size: 17px; }
  .nav-btn { display: none; }
  .account-chip { padding: 5px 12px 5px 5px; }
  .account-copy b { max-width: 92px; font-size: 11.5px; }
  .account-copy small { display: none; }
  .account-dot { width: 30px; height: 30px; font-size: 14px; }

  .hero { padding: 42px 18px 34px; }
  .hero h1 { font-size: clamp(36px, 10vw, 52px); }
  .hero-facts { gap: 26px; margin-top: 30px; }
  .hero-art { min-height: 300px; }
  .hero-card { border-radius: 18px; padding: 8px; }
  .hero-tag { font-size: 8.5px; padding: 8px 12px; }

  .workspace { padding: 0 14px 56px; gap: 16px; }
  .col-main { gap: 16px; }
  .col-side { gap: 16px; }
  .card { border-radius: 20px; }
  .card-head { padding: 20px 18px 14px; }
  .card-head h2 { font-size: 22px; }

  .upload-grid { grid-template-columns: 1fr; padding: 0 18px 20px; gap: 18px; }
  .dropzone { min-height: 250px; }

  .catalog-toolbar { padding: 0 18px 14px; gap: 10px; }
  .toolbar-right { margin-left: 0; width: 100%; }
  .search { flex: 1; width: auto; }

  .catalog { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; padding: 0 18px 22px; }
  .state-meta h3 { font-size: 14.5px; }
  .state-meta p { display: none; }

  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0; }
  .style-option { padding: 10px 11px; }
  .style-option b { font-size: 13px; }
  .style-option small { font-size: 10.5px; }
  .style-form { grid-template-columns: 1fr; }
  .hint.style-hint { padding-left: 0; padding-right: 0; }

  .order-fields { padding: 0 18px; }
  .model-field { margin: 2px 18px 14px; }
  .style-trigger { width: calc(100% - 36px); margin: 0 18px 14px; }
  .summary { margin: 16px 18px 14px; }
  .asset-toggle { margin-left: 18px; margin-right: 18px; }
  .asset-picks { grid-template-columns: 1fr; }
  .hint.asset-note { padding-left: 18px; padding-right: 18px; }
  .order-card > .btn.wide { width: calc(100% - 36px); margin: 0 18px; }
  .hint { padding-left: 18px; padding-right: 18px; }
  .progress-panel { margin: 14px 18px 0; }
  .deliver { padding: 18px 18px 0; }

  .work-item { grid-template-columns: 110px minmax(0, 1fr); }
  .redeem-entry-row { flex-direction: column; }
  .edit-row { grid-template-columns: 1fr; }
  .modal { padding: 12px; }
  .modal-card { padding: 20px; border-radius: 20px; }
  .site-foot { padding: 22px 18px 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
