:root {
  color-scheme: light;
  --ink: #172021;
  --muted: #65706f;
  --line: #d9e0dd;
  --panel: #f7f8f4;
  --surface: #ffffff;
  --accent: #d84b39;
  --accent-dark: #a53428;
  --teal: #287c74;
  --gold: #c78b2c;
  --shadow: 0 24px 80px rgba(26, 35, 36, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, rgba(216, 75, 57, 0.08), transparent 28rem),
    linear-gradient(135deg, #f2f5ee 0%, #eef4f1 44%, #f7f1e7 100%);
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  grid-template-columns: 400px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
}

.desktop-app-header {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.74);
  border-bottom: 1px solid rgba(23, 32, 33, 0.08);
  backdrop-filter: blur(18px);
}

.desktop-brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.desktop-brand .brand-mark {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.desktop-brand strong,
.desktop-brand span {
  display: block;
}

.desktop-brand strong {
  font-size: 18px;
  line-height: 1.2;
}

.desktop-brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-flow {
  display: grid;
  grid-template-columns: repeat(3, auto);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.desktop-flow span {
  position: relative;
  padding: 7px 12px;
  background: rgba(40, 124, 116, 0.08);
  border: 1px solid rgba(40, 124, 116, 0.12);
  border-radius: 999px;
}

.desktop-auth-actions,
.auth-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 28px 22px;
  background: rgba(247, 248, 244, 0.92);
  border-right: 1px solid rgba(23, 32, 33, 0.1);
}

.desktop-presets {
  display: grid;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.preset-card {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 11px 12px;
  color: var(--ink);
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(221, 235, 231, 0.72));
  border: 1px solid rgba(40, 124, 116, 0.14);
  border-radius: 8px;
}

.preset-card.is-active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(40, 124, 116, 0.12);
}

.preset-card strong {
  font-size: 14px;
}

.preset-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.brand-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
}

.side-panel > .brand-row,
.side-panel > .auth-card {
  display: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  background:
    radial-gradient(circle at 69% 30%, rgba(255, 255, 255, 0.9) 0 4px, transparent 5px),
    linear-gradient(135deg, var(--accent), var(--teal));
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.camera-logo::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 7px;
}

.camera-logo::after {
  content: "";
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  transform: translateX(-50%);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.15;
}

.brand-row p,
.upload-meta,
.section-title span,
.eyebrow,
.status-pill {
  color: var(--muted);
  font-size: 13px;
}

.control-group {
  display: grid;
  gap: 12px;
}

.strength-control,
.is-hidden {
  display: none !important;
}

.requirement-note {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(23, 32, 33, 0.08);
  border-radius: 8px;
}

.requirement-note:empty {
  display: none;
}

.id-sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.id-sample-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid rgba(23, 32, 33, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 33, 0.06);
}

.id-sample-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #eef4f1;
  border-radius: 8px;
}

.id-sample-card figcaption {
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.maker-flow {
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 32, 33, 0.1);
  border-radius: 8px;
}

.maker-title-with-back {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.maker-back-arrow {
  width: 34px;
  min-height: 34px;
  font-size: 18px;
  background: #eef4f1;
}

.app-shell.is-making .maker-steps,
.app-shell.is-making .maker-requirements {
  display: none !important;
}

.maker-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.maker-step {
  display: grid;
  min-height: 34px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: #edf3ef;
  border: 1px solid rgba(40, 124, 116, 0.12);
  border-radius: 8px;
}

.maker-step.is-active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.maker-effect-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px;
  background: var(--surface);
  border: 1px solid rgba(23, 32, 33, 0.1);
  border-radius: 8px;
  cursor: zoom-in;
}

.maker-effect-card img {
  display: block;
  width: 76px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: #eef4f1;
  cursor: zoom-in;
}

.maker-effect-card strong,
.maker-effect-card span {
  display: block;
}

.maker-effect-card strong {
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 1.35;
}

.maker-effect-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.maker-price-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #fff8f6;
  border: 1px solid rgba(216, 75, 57, 0.18);
  border-radius: 8px;
}

.maker-price-card strong,
.maker-price-card span {
  display: block;
}

.maker-price-card strong {
  margin-bottom: 5px;
  font-size: 14px;
}

.maker-price-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.maker-price-card b {
  color: var(--accent);
  font-size: 15px;
  white-space: nowrap;
}

.generation-status-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f4f8f5;
  border: 1px solid rgba(40, 124, 116, 0.16);
  border-radius: 8px;
}

.generation-status-card.is-done {
  background: #fff8f6;
  border-color: rgba(216, 75, 57, 0.2);
}

.generation-status-card.is-error {
  background: #fff4f1;
  border-color: rgba(216, 75, 57, 0.34);
}

.generation-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.generation-status-head span {
  color: var(--teal);
  font-weight: 800;
}

.generation-progress {
  height: 8px;
  overflow: hidden;
  background: rgba(40, 124, 116, 0.12);
  border-radius: 999px;
}

.generation-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.generation-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.app-shell.is-making .side-panel > .control-group:not(#makerFlow),
.app-shell.is-making .side-panel > .brand-row,
.app-shell.is-making .side-panel > .auth-card,
.app-shell.is-making .mobile-effect-preview,
.app-shell.is-making .desktop-category-tabs,
.app-shell.is-making .desktop-template-grid {
  display: none !important;
}

.app-shell.is-making .side-panel {
  gap: 12px;
}

.app-shell.is-making .bottom-price-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 12px;
  background: #fff8f6;
  border: 1px solid rgba(216, 75, 57, 0.18);
  border-radius: 8px;
}

.app-shell.is-making .action-row {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.app-shell.is-making #printBtn {
  display: none !important;
}

.app-shell:not(.is-generated) #downloadBtn {
  display: none !important;
}

.app-shell.is-generated .action-row,
.app-shell.is-making.is-generated .action-row {
  grid-template-columns: minmax(0, 1fr) minmax(118px, 0.78fr);
}

.maker-requirements {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  background: #f4f8f5;
  border: 1px solid rgba(40, 124, 116, 0.14);
  border-radius: 8px;
}

.maker-requirements strong,
.maker-photo-head strong {
  font-size: 14px;
}

.maker-requirement-list {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.maker-requirement-list span {
  position: relative;
  padding-left: 14px;
}

.maker-requirement-list span::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 5px;
  height: 5px;
  content: "";
  background: var(--teal);
  border-radius: 50%;
}

.maker-photo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.maker-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.maker-upload-action {
  display: inline-grid;
  place-items: center;
}

.maker-upload-action input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.demo-only {
  display: none;
}

.app-shell.is-demo-preview .demo-only {
  display: inline-grid;
}

.upload-history-grid {
  position: relative;
  display: block;
  gap: 8px;
  min-height: 94px;
}

.upload-history-track {
  display: flex;
  gap: 8px;
  min-width: 0;
  grid-column: 1 / -1;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.upload-history-track::-webkit-scrollbar {
  display: none;
}

.upload-history-arrow {
  position: absolute;
  top: 0;
  z-index: 2;
  display: inline-grid;
  width: 30px;
  height: 72px;
  place-items: center;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(23, 32, 33, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(23, 32, 33, 0.06);
}

.upload-history-arrow:first-child {
  left: 0;
}

.upload-history-arrow + .upload-history-track {
  padding-left: 38px;
  padding-right: 38px;
}

.upload-history-track + .upload-history-arrow {
  position: absolute;
  top: 0;
  right: 0;
}

.upload-history-card {
  display: grid;
  gap: 6px;
  flex: 0 0 78px;
  padding: 6px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid rgba(23, 32, 33, 0.1);
  border-radius: 8px;
}

.upload-history-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(216, 75, 57, 0.12);
}

.upload-history-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: #eef4f1;
}

.upload-history-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-history-empty {
  grid-column: 1 / -1;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.66);
  border: 1px dashed rgba(23, 32, 33, 0.16);
  border-radius: 8px;
}

.maker-selected-photo {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 60px;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 32, 33, 0.08);
  border-radius: 8px;
}

.maker-selected-photo.is-empty {
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: #f7faf8;
  border-style: dashed;
}

.maker-selected-photo.is-required {
  background: #fff8f6;
  border-color: rgba(216, 75, 57, 0.38);
}

.maker-selected-photo.is-required strong {
  color: #d84b39;
}

.maker-selected-photo img {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}

.maker-selected-photo strong,
.maker-selected-photo span {
  display: block;
}

.maker-selected-photo strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
}

.maker-empty-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.maker-empty-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.source-actions {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 10px;
}

.upload-zone {
  display: grid;
  min-height: 132px;
  place-items: center;
  padding: 18px;
  text-align: center;
  background: var(--surface);
  border: 1.5px dashed #bac7c1;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(23, 32, 33, 0.05);
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 30px;
  line-height: 1;
  border: 1px solid #b9d4ce;
  border-radius: 50%;
}

.upload-title {
  display: block;
  font-size: 16px;
  font-weight: 750;
}

.camera-entry {
  display: grid;
  min-height: 132px;
  place-items: center;
  padding: 14px 10px;
  color: #fff;
  text-align: center;
  background: linear-gradient(145deg, var(--teal), #174c57);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(23, 32, 33, 0.12);
}

.camera-entry span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  font-size: 26px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
}

.camera-entry strong {
  font-size: 15px;
}

.camera-entry small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title h2 {
  font-size: 15px;
  letter-spacing: 0;
}

.package-list {
  display: grid;
  gap: 8px;
}

.package-btn {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid #d1dbd6;
  border-radius: 8px;
}

.package-btn.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(216, 75, 57, 0.12);
}

.package-btn strong {
  font-size: 14px;
}

.package-btn span {
  color: var(--accent);
  font-weight: 800;
}

.package-btn small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.option-list {
  display: grid;
  gap: 8px;
}

.option-btn {
  display: grid;
  gap: 4px;
  min-height: 54px;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid #d1dbd6;
  border-radius: 8px;
}

.option-btn.is-active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(40, 124, 116, 0.12);
}

.option-btn strong {
  font-size: 14px;
}

.option-btn small {
  color: var(--muted);
  font-size: 12px;
}

.swatch-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.swatch-btn {
  display: grid;
  min-height: 48px;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid #d1dbd6;
  border-radius: 8px;
}

.swatch-btn.is-active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(40, 124, 116, 0.12);
}

.swatch-dot {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(23, 32, 33, 0.18);
  border-radius: 50%;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-template-list {
  display: none !important;
}

.template-btn {
  position: relative;
  min-height: 96px;
  overflow: hidden;
  padding: 10px;
  color: #fff;
  text-align: left;
  border: 0;
  border-radius: 8px;
  isolation: isolate;
  box-shadow: 0 10px 22px rgba(23, 32, 33, 0.12);
}

.template-btn::before,
.template-btn::after {
  position: absolute;
  inset: 0;
  content: "";
  z-index: -1;
}

.template-btn::before {
  background: var(--thumb-bg);
}

.template-btn::after {
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.52) 100%),
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.55), transparent 4.5rem);
}

.template-btn.is-active {
  outline: 3px solid rgba(216, 75, 57, 0.5);
  outline-offset: 2px;
}

.template-btn strong {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 28px;
  font-size: 14px;
}

.template-btn span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  font-size: 12px;
  opacity: 0.88;
}

.range {
  width: 100%;
  accent-color: var(--accent);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  background: #e5ece8;
  border: 1px solid #d1dbd6;
  border-radius: 8px;
}

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

.segment {
  min-height: 36px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.segment.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(23, 32, 33, 0.1);
}

.action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: auto;
}

#downloadBtn {
  display: none;
}

.app-shell.is-generated #downloadBtn {
  display: grid;
}

.bottom-price-summary {
  display: none;
}

.bottom-price-summary strong,
.bottom-price-summary span {
  display: block;
}

.bottom-price-summary strong {
  margin-bottom: 4px;
  font-size: 14px;
}

.bottom-price-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.bottom-price-summary b {
  color: var(--accent);
  font-size: 16px;
  white-space: nowrap;
}

.span-2 {
  grid-column: 1 / -1;
}

.primary-btn,
.icon-btn,
.download-action-btn {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
}

.primary-btn {
  color: #fff;
  font-weight: 800;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(216, 75, 57, 0.24);
}

.primary-btn:hover {
  background: var(--accent-dark);
}

.icon-btn {
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 22px;
  background: #ddebe7;
}

.icon-btn.is-highlight {
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(40, 124, 116, 0.16), 0 14px 26px rgba(40, 124, 116, 0.24);
}

.download-action-btn {
  display: grid;
  place-items: center;
  padding: 0 14px;
  color: var(--teal);
  font-weight: 900;
  background: #ddebe7;
}

.download-action-btn.is-highlight {
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(40, 124, 116, 0.16), 0 14px 26px rgba(40, 124, 116, 0.24);
  animation: downloadPulse 1.2s ease-in-out infinite;
}

@keyframes downloadPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.icon-btn.small {
  width: 40px;
  min-height: 40px;
  font-size: 24px;
}

.secondary-btn {
  min-height: 48px;
  color: var(--teal);
  font-weight: 750;
  background: #ddebe7;
  border: 0;
  border-radius: 8px;
}

.stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 18px;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 28px;
}

.desktop-home {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.desktop-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
  min-height: 188px;
  padding: 28px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 32, 33, 0.92), rgba(40, 124, 116, 0.78)),
    radial-gradient(circle at 82% 22%, rgba(216, 75, 57, 0.42), transparent 280px);
  border: 1px solid rgba(23, 32, 33, 0.14);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(23, 32, 33, 0.16);
}

.desktop-hero .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.desktop-hero h2 {
  max-width: 620px;
  margin: 6px 0 10px;
  font-size: 34px;
  line-height: 1.12;
}

.desktop-hero p:not(.eyebrow) {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.7;
}

.hero-actions {
  display: grid;
  grid-template-columns: 128px 128px;
  gap: 10px;
}

.desktop-sticky-action {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(23, 32, 33, 0.08);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(23, 32, 33, 0.1);
  backdrop-filter: blur(16px);
}

.desktop-sticky-action span,
.desktop-sticky-action strong {
  display: block;
}

.desktop-sticky-action span {
  color: var(--muted);
  font-size: 12px;
}

.desktop-sticky-action strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-category-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 14px;
  overflow-x: auto;
}

.category-tab {
  min-height: 38px;
  padding: 0 16px;
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 32, 33, 0.08);
  border-radius: 999px;
}

.category-tab.is-active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.desktop-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  padding-bottom: 18px;
}

.desktop-template-card {
  position: relative;
  display: grid;
  align-content: end;
  min-height: unset;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 14px;
  color: #fff;
  text-align: left;
  background: #172021;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(23, 32, 33, 0.16);
  isolation: isolate;
}

.desktop-template-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.16) 46%, rgba(0, 0, 0, 0.78) 100%),
    var(--template-image) center top / cover no-repeat,
    var(--template-bg);
}

.desktop-template-card .template-photo {
  display: none;
}

.desktop-template-card .template-kind {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.desktop-template-card strong,
.desktop-template-card small,
.desktop-template-card em {
  display: block;
  font-style: normal;
}

.desktop-template-card strong {
  font-size: 16px;
  line-height: 1.25;
}

.desktop-template-card small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.desktop-template-card em {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

.desktop-template-card.is-active {
  box-shadow: 0 0 0 3px rgba(216, 75, 57, 0.26), 0 18px 44px rgba(23, 32, 33, 0.18);
}

@media (min-width: 861px) {
  .app-shell:not(.admin-shell).is-making:not(.is-generated) {
    grid-template-columns: 1fr;
    background:
      linear-gradient(rgba(247, 248, 244, 0.82), rgba(247, 248, 244, 0.82)),
      radial-gradient(circle at 18% 18%, rgba(216, 75, 57, 0.12), transparent 340px),
      radial-gradient(circle at 82% 28%, rgba(40, 124, 116, 0.14), transparent 360px);
  }

  .app-shell:not(.admin-shell).is-making:not(.is-generated) .side-panel {
    width: min(620px, calc(100vw - 56px));
    max-height: calc(100vh - 112px);
    justify-self: center;
    margin: 20px 0;
    padding: 22px;
    background: rgba(247, 248, 244, 0.96);
    border: 1px solid rgba(23, 32, 33, 0.1);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(23, 32, 33, 0.14);
  }

  .app-shell:not(.admin-shell).is-making:not(.is-generated) .stage {
    display: none;
  }

  .app-shell.is-making .maker-flow {
    padding: 16px;
    background: rgba(255, 255, 255, 0.82);
  }

  .app-shell.is-making .bottom-price-summary {
    position: sticky;
    bottom: 78px;
    z-index: 7;
    box-shadow: 0 -10px 24px rgba(247, 248, 244, 0.92);
  }

  .app-shell.is-making .action-row {
    position: sticky;
    bottom: 0;
    z-index: 8;
    padding: 8px 0 2px;
    background: linear-gradient(180deg, rgba(247, 248, 244, 0), rgba(247, 248, 244, 0.98) 28%);
  }

  .app-shell:not(.admin-shell):not(.is-editing):not(.is-making) {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  .app-shell:not(.admin-shell):not(.is-editing):not(.is-making) .side-panel {
    display: none;
  }

  .app-shell:not(.admin-shell):not(.is-editing):not(.is-making) .stage {
    grid-column: 1 / -1;
    padding-left: 36px;
    padding-right: 36px;
  }

  .app-shell:not(.admin-shell):not(.is-editing):not(.is-making) .canvas-wrap,
  .app-shell:not(.admin-shell):not(.is-editing):not(.is-making) .history-strip {
    display: none;
  }

  .app-shell.is-editing .desktop-home,
  .app-shell.is-making .desktop-home {
    display: none;
  }

  .app-shell.is-editing .stage,
  .app-shell.is-making.is-generated .stage {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
}

.desktop-showcase {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-height: 138px;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(23, 32, 33, 0.9), rgba(40, 124, 116, 0.78)),
    radial-gradient(circle at 84% 18%, rgba(216, 75, 57, 0.38), transparent 260px);
  border: 1px solid rgba(23, 32, 33, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(23, 32, 33, 0.16);
}

.showcase-copy {
  align-self: center;
  color: #fff;
}

.showcase-copy .eyebrow {
  color: rgba(255, 255, 255, 0.64);
}

.showcase-copy strong {
  display: block;
  max-width: 180px;
  font-size: 18px;
  line-height: 1.35;
}

.showcase-rail {
  display: grid;
  grid-auto-columns: 128px;
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.showcase-card {
  position: relative;
  min-height: 106px;
  overflow: hidden;
  padding: 10px;
  color: #fff;
  text-align: left;
  background: var(--showcase-bg);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  isolation: isolate;
}

.showcase-card::before,
.showcase-card::after {
  position: absolute;
  content: "";
  z-index: -1;
}

.showcase-card::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.48)),
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.58), transparent 42px);
}

.showcase-card::after {
  right: 16px;
  bottom: 30px;
  width: 42px;
  height: 58px;
  background: rgba(255, 255, 255, 0.54);
  border-radius: 999px 999px 8px 8px;
  box-shadow: 0 -28px 0 -10px rgba(255, 255, 255, 0.72);
}

.showcase-card.is-active {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22), 0 12px 28px rgba(0, 0, 0, 0.26);
}

.showcase-card span {
  display: block;
  width: 28px;
  height: 4px;
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
}

.showcase-card strong,
.showcase-card small {
  display: block;
}

.showcase-card strong {
  font-size: 14px;
}

.showcase-card small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  line-height: 1.3;
}

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

.topbar h2 {
  font-size: 30px;
  line-height: 1.1;
}

.eyebrow {
  margin-bottom: 5px;
  text-transform: uppercase;
}

.status-pill {
  flex: 0 0 auto;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 32, 33, 0.08);
  border-radius: 999px;
}

.canvas-wrap {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(23, 32, 33, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

canvas {
  display: block;
  width: auto;
  height: min(100%, 70vh);
  max-width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(23, 32, 33, 0.2);
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(40, 124, 116, 0.06), rgba(199, 139, 44, 0.12)),
    rgba(255, 255, 255, 0.4);
}

.empty-state.is-hidden {
  display: none;
}

.empty-frame {
  position: relative;
  width: min(34vw, 300px);
  max-height: 62vh;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(23, 32, 33, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(216, 75, 57, 0.16), transparent 44%),
    linear-gradient(20deg, rgba(40, 124, 116, 0.18), rgba(255, 255, 255, 0.74));
}

.portrait-glow {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 38%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 50%;
}

.portrait-line {
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 20%;
  height: 35%;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 50% 50% 8px 8px;
}

.history-strip {
  display: grid;
  grid-auto-columns: minmax(96px, 128px);
  grid-auto-flow: column;
  gap: 10px;
  align-items: start;
  min-height: 92px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.app-shell.is-history .desktop-home,
.app-shell.is-history .canvas-wrap {
  display: none !important;
}

.app-shell.is-history .history-strip {
  display: grid !important;
  grid-auto-columns: minmax(132px, 168px);
  grid-auto-rows: max-content;
  align-items: start;
  min-height: 0;
  margin-top: 18px;
}

.app-shell.is-history .history-item img {
  height: 210px;
}

.history-item {
  position: relative;
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 33, 0.1);
  border-radius: 8px;
  background: #fff;
}

.history-preview-btn {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  line-height: 0;
}

.history-item img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.history-download-btn {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-height: 28px;
  padding: 0 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(40, 124, 116, 0.92);
  border: 0;
  border-radius: 999px;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 32, 33, 0.1);
  border-radius: 8px;
}

.auth-card strong,
.auth-card span {
  display: block;
}

.auth-card strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.auth-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.compact {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.history-empty {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
}

.mobile-effect-preview {
  display: none;
}

.mobile-art-selector {
  display: none;
}

.mobile-art-grid {
  display: grid;
  grid-auto-columns: 128px;
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mobile-art-card {
  display: grid;
  gap: 7px;
  min-height: 190px;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid rgba(23, 32, 33, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(23, 32, 33, 0.06);
}

.mobile-art-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(216, 75, 57, 0.12), 0 10px 26px rgba(23, 32, 33, 0.08);
}

.mobile-art-card img {
  width: 112px;
  height: 128px;
  object-fit: cover;
  border-radius: 8px;
}

.mobile-art-card strong,
.mobile-art-card span {
  display: block;
}

.mobile-art-card strong {
  font-size: 13px;
  line-height: 1.25;
}

.mobile-art-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.mobile-effect-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--surface);
  border: 1px solid rgba(23, 32, 33, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 32, 33, 0.06);
  cursor: zoom-in;
}

.mobile-effect-card img {
  display: block;
  width: 96px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  background: #eef4f1;
  cursor: zoom-in;
}

.mobile-effect-card strong,
.mobile-effect-card span {
  display: block;
}

.mobile-effect-card strong {
  margin-bottom: 7px;
  font-size: 15px;
  line-height: 1.35;
}

.mobile-effect-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(18, 24, 25, 0.48);
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(18, 24, 25, 0.72);
}

.image-preview-modal.is-open {
  display: flex;
}

.image-preview-panel {
  position: relative;
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  justify-items: center;
}

.image-preview-panel img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 88px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

.image-preview-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  color: #172021;
  background: rgba(255, 255, 255, 0.9);
}

.image-preview-title {
  max-width: 100%;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  background: rgba(18, 24, 25, 0.42);
  border-radius: 8px;
}

.login-modal.is-open {
  display: flex;
}

.login-panel {
  width: min(430px, 100%);
  padding: 18px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(23, 32, 33, 0.12);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(23, 32, 33, 0.24);
}

.login-message {
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-message:empty {
  display: none;
}

.login-actions,
.phone-login {
  display: grid;
  gap: 10px;
}

.login-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.login-modal.is-production-login .login-actions {
  grid-template-columns: 1fr;
}

.login-modal.is-mobile-wechat-only .login-actions {
  grid-template-columns: 1fr;
}

.login-modal.is-mobile-wechat-only .phone-login {
  display: none;
}

.phone-login {
  grid-template-columns: 1fr;
}

.phone-password-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wechat-web-box {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.wechat-web-box a {
  color: var(--ink);
  font-weight: 700;
}

.wechat-qr-login {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.wechat-qr-login iframe {
  width: min(320px, 100%);
  height: 360px;
  background: #fff;
  border: 1px solid rgba(23, 32, 33, 0.12);
  border-radius: 8px;
}

.wechat-qr-login span {
  color: var(--muted);
  font-size: 12px;
}

.admin-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.admin-shell {
  grid-template-rows: minmax(0, 1fr);
  grid-template-columns: 340px minmax(0, 1fr);
}

.admin-shell .side-panel {
  display: flex;
}

.admin-shell .stage {
  height: 100vh;
  overflow-y: auto;
}

.admin-shell .desktop-home,
.admin-shell .canvas-wrap,
.admin-shell .history-strip {
  display: none;
}

.admin-shell.is-logged-out .admin-refresh-panel,
.admin-shell.is-logged-out .admin-module-nav,
.admin-shell.is-logged-out .admin-grid {
  display: none;
}

.admin-shell.is-logged-out .stage {
  display: grid;
  align-content: start;
  gap: 16px;
}

.admin-locked-state {
  display: none;
  place-items: center;
  min-height: 360px;
  padding: 28px;
  color: var(--ink);
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 32, 33, 0.08);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(23, 32, 33, 0.08);
}

.admin-shell.is-logged-out .admin-locked-state {
  display: grid;
}

.admin-shell.is-logged-in .admin-locked-state {
  display: none;
}

.admin-locked-state h2 {
  margin: 12px 0 6px;
  font-size: 22px;
}

.admin-locked-state p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.admin-module-nav {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(23, 32, 33, 0.08);
  border-radius: 8px;
}

.admin-module-btn {
  min-height: 42px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}

.admin-module-btn.is-active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 10px 24px rgba(40, 124, 116, 0.18);
}

.admin-session-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 32, 33, 0.08);
  border-radius: 8px;
}

.admin-session-panel.is-hidden {
  display: none !important;
}

.admin-session-panel span,
.admin-session-panel strong {
  display: block;
}

.admin-session-panel span {
  color: var(--muted);
  font-size: 12px;
}

.admin-session-panel strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-input {
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-box {
  min-height: 280px;
  padding: 16px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 32, 33, 0.08);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(23, 32, 33, 0.08);
}

.admin-box[data-admin-module] {
  display: none;
}

.admin-box[data-admin-module].is-active {
  display: block;
}

.admin-box h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.admin-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-metric-card {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-metric-card span,
.admin-metric-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.admin-metric-card strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
}

.admin-job-list {
  display: grid;
  gap: 10px;
}

.admin-job-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-job-item strong,
.admin-job-item span {
  display: block;
}

.admin-job-item strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

.admin-job-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-job-error {
  display: block;
  margin-top: 7px;
  padding: 8px 10px;
  color: #a63a2c;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
  background: #fff0ee;
  border: 1px solid #f1c7bf;
  border-radius: 8px;
}

.admin-job-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: var(--teal);
  background: #edf8f5;
  border: 1px solid #c8e3dd;
  border-radius: 999px;
  font-size: 12px;
}

.admin-job-status.is-failed {
  color: var(--accent);
  background: #fff0ee;
  border-color: #f1c7bf;
}

.admin-empty-state {
  display: grid;
  min-height: 120px;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed rgba(23, 32, 33, 0.14);
  border-radius: 8px;
}

.admin-box-wide {
  grid-column: 1 / -1;
}

.admin-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.small-admin-btn {
  min-height: 38px;
  padding: 0 14px;
}

.admin-progress {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f4f8f5;
  border: 1px solid rgba(40, 124, 116, 0.14);
  border-radius: 8px;
}

.admin-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.admin-progress-track {
  height: 10px;
  overflow: hidden;
  background: rgba(40, 124, 116, 0.12);
  border-radius: 999px;
}

.admin-progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-form.is-editing {
  padding: 12px;
  background: rgba(216, 75, 57, 0.05);
  border: 1px solid rgba(216, 75, 57, 0.16);
  border-radius: 8px;
}

.admin-form.is-flashing {
  box-shadow: 0 0 0 4px rgba(216, 75, 57, 0.14);
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.admin-form-wide,
.admin-check,
.admin-actions {
  grid-column: 1 / -1;
}

.admin-textarea {
  min-height: 96px;
  padding-top: 10px;
  resize: vertical;
}

.prompt-textarea {
  min-height: 180px;
}

.admin-check {
  display: flex !important;
  grid-template-columns: unset !important;
  align-items: center;
  gap: 8px !important;
}

.admin-check input {
  width: 16px;
  height: 16px;
}

.admin-actions {
  display: flex;
  gap: 12px;
}

.admin-actions button {
  min-height: 44px;
}

.admin-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-upload-row .admin-help {
  margin: 0;
}

.model-provider-list {
  display: grid;
  gap: 10px;
}

.model-provider-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.model-provider-main {
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

.model-provider-item strong {
  display: block;
  margin-bottom: 4px;
}

.model-provider-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.model-provider-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.model-provider-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.model-provider-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.compact {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.model-provider-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  color: var(--teal);
  background: #edf8f5;
  border: 1px solid #c8e3dd;
  border-radius: 999px;
  font-size: 12px;
}

.admin-inline-action {
  cursor: pointer;
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.admin-inline-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.camera-modal,
.payment-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(23, 32, 33, 0.58);
  z-index: 10;
}

.camera-modal.is-open,
.payment-modal.is-open {
  display: grid;
}

.camera-panel,
.payment-panel {
  display: grid;
  width: min(94vw, 720px);
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.payment-panel {
  width: min(94vw, 420px);
}

.camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.camera-header h2 {
  font-size: 24px;
}

.camera-view {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(40, 124, 116, 0.16), rgba(216, 75, 57, 0.1)),
    #111819;
  border-radius: 8px;
}

.camera-view video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-message {
  position: absolute;
  inset: auto 16px 16px;
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  text-align: center;
  background: rgba(0, 0, 0, 0.48);
  border-radius: 8px;
}

.camera-message.is-hidden {
  display: none;
}

.camera-controls {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
}

.order-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #f3f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-summary strong {
  font-size: 18px;
}

.order-summary span {
  color: var(--muted);
  font-size: 13px;
}

.wechat-code {
  display: grid;
  width: 180px;
  height: 180px;
  place-items: center;
  justify-self: center;
  color: var(--teal);
  font-weight: 800;
  background:
    linear-gradient(90deg, rgba(40, 124, 116, 0.12) 50%, transparent 50%) 0 0 / 18px 18px,
    linear-gradient(rgba(40, 124, 116, 0.12) 50%, transparent 50%) 0 0 / 18px 18px,
    #fff;
  border: 12px solid #eef5f2;
  border-radius: 8px;
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
    min-height: 100vh;
  }

  .desktop-app-header,
  .desktop-presets,
  .desktop-showcase,
  .desktop-home {
    display: none;
  }

  .mobile-template-list {
    display: none !important;
  }

  .mobile-art-selector:not(.is-hidden) {
    display: grid;
  }

  .mobile-effect-preview {
    display: grid;
    gap: 12px;
  }

  .mobile-effect-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .mobile-effect-card img {
    width: 112px;
    height: 140px;
  }

  .side-panel > .brand-row,
  .side-panel > .auth-card {
    display: grid;
  }

  .side-panel {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 32, 33, 0.1);
  }

  .stage {
    grid-template-rows: minmax(0, 1fr) auto;
    height: auto;
    min-height: 720px;
    overflow: visible;
    padding: 20px;
  }

  .stage .topbar {
    display: none;
  }

  .app-shell:not(.admin-shell):not(.is-editing):not(.is-history) .stage {
    display: none;
  }

  .app-shell:not(.admin-shell).is-editing .stage,
  .app-shell:not(.admin-shell).is-making .stage {
    display: none;
  }

  .app-shell:not(.admin-shell).is-history .stage {
    display: grid !important;
    grid-template-rows: auto;
    align-content: start;
    min-height: 360px;
  }

  .app-shell:not(.admin-shell).is-generated .stage {
    display: grid;
  }

  .topbar h2 {
    font-size: 24px;
  }

  canvas {
    width: min(100%, 62vh);
    height: auto;
  }
}

@media (min-width: 1200px) {
  .stage {
    padding: 30px 36px;
  }

  .canvas-wrap {
    padding: 28px;
  }

  canvas {
    height: min(100%, 68vh);
  }
}

@media (min-width: 1400px) {
  .desktop-template-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 861px) and (max-width: 1150px) {
  .desktop-template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-height: 760px) and (min-width: 861px) {
  .side-panel {
    gap: 14px;
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .upload-zone,
  .camera-entry {
    min-height: 108px;
  }

  .topbar h2 {
    font-size: 26px;
  }

  canvas {
    height: min(100%, 64vh);
  }
}

@media (max-width: 1100px) and (min-width: 861px) {
  .app-shell {
    grid-template-columns: 340px minmax(0, 1fr);
  }

  .side-panel,
  .stage {
    padding-left: 22px;
    padding-right: 22px;
  }

  canvas {
    width: min(100%, 62vh);
    height: auto;
  }
}

@media (max-width: 520px) {
  .side-panel,
  .stage {
    padding: 16px;
  }

  .source-actions,
  .camera-controls {
    grid-template-columns: 1fr;
  }

  .entry-segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .upload-history-grid {
    min-height: 86px;
  }

  .upload-history-card {
    flex-basis: 66px;
  }

  .upload-history-arrow {
    position: absolute;
    top: 8px;
    width: 28px;
    height: 64px;
    background: rgba(255, 255, 255, 0.94);
  }

  .upload-history-arrow:first-child {
    left: 0;
  }

  .upload-history-track + .upload-history-arrow {
    right: 0;
  }

  .upload-history-arrow + .upload-history-track {
    padding-left: 34px;
    padding-right: 34px;
  }

  .camera-entry {
    min-height: 92px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
