﻿:root {
  color: #342d2b;
  background: #fbf7f1;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(251, 247, 241, 0.94), rgba(246, 239, 229, 0.94)),
    repeating-linear-gradient(90deg, rgba(92, 72, 56, 0.04) 0 1px, transparent 1px 24px);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar,
.panel-heading,
.actions,
.admin-sidebar nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #7c6b5b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.step-label {
  width: fit-content;
  margin: 0;
  border-radius: 999px;
  background: #eef4ed;
  color: #526f57;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 10px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.3rem;
}

h3 {
  margin-bottom: 10px;
}

.ghost-link,
.admin-sidebar a,
.admin-sidebar button,
.inline-form button {
  border: 1px solid rgba(52, 45, 43, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #342d2b;
  cursor: pointer;
  padding: 10px 14px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.ghost-link:hover,
.admin-sidebar a:hover,
.admin-sidebar button:hover,
.inline-form button:hover {
  border-color: #a45f49;
  background: #fff;
  transform: translateY(-1px);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: stretch;
  margin: 28px 0;
  padding: 28px;
  border: 1px solid rgba(115, 89, 67, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.intro-band h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.intro-band p {
  color: #6b5b50;
  font-size: 1.02rem;
  line-height: 1.8;
}

.sample-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 220px;
}

.sample-strip span,
.image-slot {
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px dashed rgba(123, 91, 65, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(195, 145, 112, 0.12), rgba(108, 139, 121, 0.12)),
    #fffaf4;
  color: #8a7767;
  font-size: 0.92rem;
  overflow: hidden;
}

.image-slot.has-image {
  min-height: 180px;
  border-style: solid;
  padding: 0;
  background: #fff;
}

.image-slot img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
}

.watermark-frame {
  position: relative;
  display: block;
  overflow: hidden;
}

.watermark-frame::after {
  content: attr(data-watermark);
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: max-content;
  max-width: 92%;
  transform: translate(-50%, -50%);
  color: rgba(52, 45, 43, 0.32);
  font-size: clamp(1.05rem, 3.2vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  user-select: none;
}

.thumb-button .watermark-frame {
  border-radius: 8px;
}

.accessory-sheet-grid .image-slot.has-image,
.accessory-sheet-grid .image-slot img {
  min-height: 220px;
}

.accessory-sheet-grid .image-slot img {
  object-fit: contain;
  background: #fffaf4;
}

.sample-strip span:first-child {
  grid-row: span 2;
}

.order-form,
.form-section,
.panel,
.success-panel {
  display: grid;
  gap: 18px;
}

.form-section,
.panel,
.success-panel {
  padding: 22px;
  border: 1px solid rgba(115, 89, 67, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 50px rgba(76, 55, 36, 0.07);
}

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

.section-help {
  margin: -4px 0 0;
  color: #6b5b50;
  line-height: 1.7;
}

.option-groups {
  display: grid;
  gap: 16px;
}

.option-group {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffdf9;
  padding: 14px;
}

.option-group-heading {
  display: grid;
  gap: 4px;
}

.option-group-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.option-group-heading small {
  color: #78685c;
  line-height: 1.5;
}

.option-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}

.option-chip {
  min-height: 42px;
  border: 1px solid rgba(52, 45, 43, 0.14);
  border-radius: 8px;
  background: #fffaf4;
  color: #342d2b;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 9px 10px;
  text-align: center;
}

.option-chip.selected {
  border-color: #a45f49;
  background: #fff0e6;
  box-shadow: 0 0 0 2px rgba(164, 95, 73, 0.12);
}

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

.step-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
  margin-bottom: 2px;
}

.step-dot {
  display: grid;
  gap: 5px;
  justify-items: center;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #6b5b50;
  cursor: pointer;
  padding: 9px 6px;
}

.step-dot span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #f1e6da;
  color: #6b5b50;
  font-size: 0.82rem;
  font-weight: 900;
}

.step-dot small {
  font-size: 0.76rem;
  font-weight: 800;
}

.step-dot.active {
  border-color: #a45f49;
  background: #fff7ed;
}

.step-dot.active span,
.step-dot.done span {
  background: #a45f49;
  color: #fffdf9;
}

.step-screen {
  min-height: 360px;
}

.step-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: sticky;
  bottom: 0;
  z-index: 10;
  border-top: 1px solid rgba(52, 45, 43, 0.1);
  background: rgba(251, 247, 241, 0.94);
  padding: 12px 0 0;
  backdrop-filter: blur(10px);
}

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

.review-list {
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffdf9;
  padding: 14px;
}

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

.settlement-panel > div {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffaf4;
  padding: 16px;
}

.settlement-panel h3,
.settlement-panel p {
  margin: 0;
}

.settlement-panel strong {
  color: #a45f49;
  font-size: 1.35rem;
  font-weight: 900;
}

.settlement-panel small {
  color: #6b5b50;
  line-height: 1.55;
}

.count-button {
  min-height: 46px;
  border: 1px solid rgba(52, 45, 43, 0.14);
  border-radius: 8px;
  background: #fffdf9;
  color: #342d2b;
  cursor: pointer;
  font-weight: 800;
}

.count-button.selected {
  border-color: #a45f49;
  background: #fff0e6;
  box-shadow: 0 0 0 2px rgba(164, 95, 73, 0.12);
}

.people-stack {
  display: grid;
  gap: 18px;
}

.person-panel {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: #fffaf4;
  padding: 16px;
}

.person-heading {
  display: grid;
  gap: 4px;
}

.person-heading h3 {
  margin: 0;
  font-size: 1.15rem;
}

.person-heading small {
  color: #78685c;
  line-height: 1.5;
}

.person-name-field {
  display: grid;
  gap: 10px;
  border: 2px solid rgba(164, 95, 73, 0.36);
  border-radius: 8px;
  background: #fff1e6;
  padding: 14px;
  box-shadow: 0 0 0 4px rgba(164, 95, 73, 0.08);
}

.person-name-field strong {
  color: #8f4f3d;
  font-size: 1.02rem;
}

.person-name-field span {
  color: #6b5b50;
  line-height: 1.45;
}

.compact-group {
  background: #fffdf9;
  padding: 12px;
}

.visual-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.visual-option {
  display: grid;
  gap: 8px;
  min-height: 144px;
  border: 1px solid rgba(52, 45, 43, 0.14);
  border-radius: 8px;
  background: #fffdf9;
  color: #342d2b;
  cursor: pointer;
  padding: 8px;
  text-align: center;
}

.visual-option.selected {
  border-color: #a45f49;
  background: #fff0e6;
  box-shadow: 0 0 0 2px rgba(164, 95, 73, 0.12);
}

.visual-option span:last-child {
  align-self: center;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.thumb-button {
  display: block;
  border-radius: 8px;
  outline: none;
}

.option-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  border: 1px solid rgba(123, 91, 65, 0.22);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(28, 22, 18, 0.55);
  padding: 20px;
}

.preview-modal {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  border-radius: 8px;
  background: #fffdf9;
  padding: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.preview-modal h2 {
  margin-bottom: 0;
}

.preview-close {
  justify-self: end;
  border: 1px solid rgba(52, 45, 43, 0.16);
  border-radius: 8px;
  background: #fff;
  color: #342d2b;
  cursor: pointer;
  font-weight: 800;
  padding: 8px 12px;
}

.preview-crop {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  border: 1px solid rgba(123, 91, 65, 0.22);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.preview-crop img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

label,
.edit-stack {
  display: grid;
  gap: 8px;
  color: #5a4a41;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(52, 45, 43, 0.16);
  border-radius: 8px;
  background: #fffdf9;
  color: #342d2b;
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #a45f49;
  box-shadow: 0 0 0 3px rgba(164, 95, 73, 0.12);
}

.choice-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 210px;
  border: 1px solid rgba(52, 45, 43, 0.14);
  border-radius: 8px;
  background: #fffdf9;
  color: #342d2b;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.theme-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.theme-card {
  gap: 12px;
  min-height: 0;
}

.theme-card .image-slot.has-image {
  aspect-ratio: 4 / 3;
  min-height: 0;
  background: #fffaf4;
}

.theme-card .image-slot img {
  min-height: 0;
  object-fit: contain;
  background: #fffaf4;
}

.theme-title {
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.35;
}

.theme-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.theme-meta-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(115, 89, 67, 0.12);
}

.theme-meta-row dt,
.theme-meta-row dd {
  margin: 0;
}

.theme-meta-row dt {
  color: #8a7767;
  font-size: 0.82rem;
  font-weight: 800;
}

.theme-meta-row dd {
  display: grid;
  gap: 4px;
  color: #4c3d34;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.choice-card.compact {
  min-height: 250px;
}

.choice-card.selected {
  border-color: #a45f49;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(164, 95, 73, 0.12);
}

.choice-card small,
.list-row small,
.catalog-row small,
.wechat-box small {
  color: #78685c;
  line-height: 1.5;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: #a45f49;
  color: #fffdf9;
  cursor: pointer;
  font-weight: 800;
  padding: 13px 18px;
}

.primary-button:hover {
  background: #8f4f3d;
}

.empty-state {
  margin: 0;
  border: 1px dashed rgba(123, 91, 65, 0.3);
  border-radius: 8px;
  background: #fffaf4;
  color: #78685c;
  padding: 16px;
}

.success-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.success-panel {
  width: min(640px, 100%);
}

.stacked-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.wechat-box {
  display: grid;
  gap: 8px;
  border-left: 4px solid #6f8a73;
  background: #f4f8f1;
  padding: 16px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  display: flex;
  position: sticky;
  top: 0;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid rgba(52, 45, 43, 0.12);
  background: #f7efe4;
}

.admin-sidebar h1 {
  font-size: 2.2rem;
}

.admin-sidebar nav {
  align-items: stretch;
  flex-direction: column;
}

.admin-sidebar button,
.admin-sidebar a {
  width: 100%;
  text-align: left;
}

.admin-sidebar button.active {
  border-color: #a45f49;
  background: #fff;
}

.admin-content {
  padding: 24px;
}

.admin-login-page {
  min-height: 100vh;
  place-items: center;
}

.admin-login-panel {
  width: min(460px, 100%);
}

.admin-login-error {
  margin: 0;
  border-radius: 8px;
  background: #fff0e6;
  color: #8f3f2d;
  font-weight: 800;
  padding: 10px 12px;
}

.image-export-panel {
  align-content: start;
}

.image-export-list {
  margin-top: 4px;
}

.image-export-row {
  cursor: default;
}

.image-export-row .ghost-link {
  width: auto;
  white-space: nowrap;
}

.image-export-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.export-progress {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffdf9;
  padding: 12px;
}

.export-progress p {
  margin: 0;
  color: #6b5b50;
  font-weight: 700;
}

.export-progress-bar {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #efe6d8;
}

.export-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #a45f49;
  transition: width 0.2s ease;
}

.admin-grid {
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
}

.order-list,
.admin-list,
.accessory-list {
  display: grid;
  gap: 10px;
}

.list-row,
.catalog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: #fffdf9;
  color: #342d2b;
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.list-row span,
.catalog-row span {
  display: grid;
  gap: 4px;
}

.list-row.active,
.catalog-row.active {
  border-color: #a45f49;
  background: #fff7ed;
}

.list-row em,
.catalog-row em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef4ed;
  color: #526f57;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
  padding: 6px 10px;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid rgba(52, 45, 43, 0.08);
  padding-bottom: 12px;
}

.detail-list dt {
  color: #7c6b5b;
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
  line-height: 1.7;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(160px, 1fr) auto;
  gap: 10px;
}

.inline-form button {
  background: #342d2b;
  color: #fffdf9;
  font-weight: 800;
}

.subheading {
  border-top: 1px solid rgba(52, 45, 43, 0.1);
  margin-top: 6px;
  padding-top: 18px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.switch input {
  width: 18px;
  height: 18px;
}

.accessory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: #fffdf9;
  padding: 14px;
}

.management-form {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffaf4;
  padding: 14px;
}

.management-form + .management-form,
.management-form + .admin-list {
  margin-top: 14px;
}

.option-thumb-empty {
  display: grid;
  place-items: center;
  padding: 8px;
  color: #78685c;
  font-weight: 800;
}

@media (max-width: 860px) {
  .intro-band,
  .field-grid,
  .choice-grid,
  .admin-grid,
  .catalog-layout,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-sidebar nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page,
  .admin-content {
    width: min(100% - 20px, 1120px);
    padding: 14px 0 36px;
  }

  .topbar,
  .panel-heading,
  .actions,
  .accessory-row {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .intro-band,
  .form-section,
  .panel,
  .success-panel {
    padding: 16px;
  }

  .sample-strip,
  .inline-form,
  .person-count-row,
  .step-actions,
  .settlement-panel {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    padding: 18px;
  }

  .admin-sidebar nav {
    grid-template-columns: 1fr;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
