:root {
  --bg: #f2ede5;
  --bg-deep: #e4ddd2;
  --surface: rgba(255, 251, 246, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(25, 33, 30, 0.12);
  --line-strong: rgba(18, 33, 28, 0.22);
  --ink: #13211c;
  --ink-soft: #59645f;
  --accent: #183f31;
  --accent-soft: #dfe9e2;
  --accent-warm: #8f5a3c;
  --danger: #a43f36;
  --shadow: 0 24px 70px rgba(19, 33, 28, 0.12);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --font-serif: "Georgia", "Songti SC", "SimSun", serif;
  --font-sans: "Segoe UI Variable Display", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(143, 90, 60, 0.18), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(24, 63, 49, 0.14), transparent 26%),
    linear-gradient(180deg, #f6f1e8 0%, #eee6da 42%, #e6ddd0 100%);
}

img {
  display: block;
  max-width: 100%;
}

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

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

.site-shell {
  width: min(1360px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.admin-shell {
  width: min(1460px, calc(100vw - 32px));
}

.topbar,
.nav-row,
.hero-actions,
.stats-row,
.toolbar,
.action-row,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  align-items: center;
  margin-bottom: 28px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, #243a31 100%);
  color: #f6f2ec;
  font-family: var(--font-serif);
  font-size: 26px;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 14px;
}

.nav-row a,
.button {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button {
  border: none;
  background: linear-gradient(135deg, var(--accent) 0%, #214335 100%);
  color: #f5f7f6;
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.button.danger {
  background: linear-gradient(135deg, #af4a40 0%, #8c362f 100%);
}

.nav-row a:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(18, 41, 31, 0.08);
}

.hero-panel,
.panel-card,
.hero-floating-card,
.stat-card,
.task-card,
.price-card,
.empty-card,
.auth-card,
.upload-card,
.feedback-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-panel,
.panel-card,
.hero-floating-card,
.upload-card {
  padding: 24px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 24px;
  overflow: hidden;
  position: relative;
}

.hero-panel.compact {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(24, 63, 49, 0.2), transparent 66%);
  pointer-events: none;
}

.hero-copy h1,
.section-head h2,
.subhead strong {
  margin: 0;
  font-family: var(--font-serif);
  line-height: 1.06;
}

.hero-copy h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 5.7vw, 76px);
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.section-head.compact h2 {
  font-size: 30px;
}

.hero-copy p,
.section-head p,
.support-text,
.plain-list,
.feedback-card,
.meta-text,
.task-card p,
.detail-meta-card span {
  color: var(--ink-soft);
  line-height: 1.72;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section {
  margin-top: 28px;
}

.reveal {
  animation: fadeUp 0.7s ease both;
}

.hero-side,
.right-stack,
.left-stack,
.stack-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-floating-card {
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.9), rgba(242, 237, 229, 0.92));
}

.stats-row {
  margin-top: 18px;
}

.stat-card,
.detail-meta-card,
.price-card,
.order-row,
.user-row,
.task-row {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.68);
}

.stat-card strong,
.price-card strong,
.detail-meta-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.pricing-grid,
.task-grid,
.option-grid,
.swatch-grid,
.service-grid,
.field-grid,
.upload-grid,
.account-grid,
.workspace-grid,
.admin-layout,
.task-meta-grid,
.thumb-grid,
.auth-split,
.member-stats {
  display: grid;
  gap: 16px;
}

.pricing-grid,
.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-grid,
.workspace-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.admin-layout {
  grid-template-columns: 380px minmax(0, 1fr);
  align-items: start;
}

.field-grid,
.upload-grid,
.auth-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.swatch-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.thumb-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.task-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.field,
.field.full {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.subhead strong,
.subhead span {
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.toolbar input,
.toolbar select,
.auth-card input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.field textarea,
.prompt-viewer {
  min-height: 150px;
  resize: vertical;
}

.prompt-viewer {
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #12241d 0%, #1d342b 100%);
  color: #eef4f0;
  line-height: 1.68;
}

.prompt-viewer.light {
  min-height: 220px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.dark-card {
  background: linear-gradient(180deg, rgba(15, 30, 24, 0.96), rgba(30, 51, 42, 0.98));
}

.dark-card .eyebrow,
.dark-card h2 {
  color: #ecf4ef;
}

.dark-card .section-head p {
  color: rgba(234, 243, 238, 0.72);
}

.price-card.featured {
  background: linear-gradient(180deg, rgba(235, 245, 238, 0.94), rgba(255, 255, 255, 0.92));
}

.price-card .price-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.price-card .price-amount {
  font-size: 40px;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
}

.plain-list li + li {
  margin-top: 8px;
}

.task-card {
  padding: 20px;
}

.task-card h3,
.auth-card h3,
.price-card h3 {
  margin: 0 0 8px;
}

.task-meta-grid,
.member-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-meta-card {
  padding: 16px;
}

.task-chip,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(24, 63, 49, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.tag.danger {
  background: rgba(164, 63, 54, 0.12);
  color: var(--danger);
}

.swatch-card,
.option-card,
.service-card,
.task-row {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.swatch-card:hover,
.option-card:hover,
.service-card:hover,
.task-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(20, 37, 30, 0.08);
}

.swatch-card.is-selected,
.option-card.is-selected,
.service-card.is-selected,
.task-row.is-selected {
  border-color: rgba(24, 63, 49, 0.44);
  background: linear-gradient(180deg, rgba(231, 242, 235, 0.96), rgba(255, 255, 255, 0.88));
}

.swatch-chip {
  display: inline-flex;
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.upload-card input {
  margin-top: 12px;
}

.thumb-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.thumb-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.thumb-card figcaption {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--ink-soft);
}

.empty-card,
.feedback-card,
.notice-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink-soft);
}

.empty-card.small {
  font-size: 13px;
}

.feedback-card[data-type="success"] {
  background: rgba(24, 63, 49, 0.12);
  color: var(--accent);
}

.feedback-card[data-type="error"] {
  background: rgba(164, 63, 54, 0.12);
  color: var(--danger);
}

.notice-card {
  border-left: 4px solid var(--danger);
  background: rgba(164, 63, 54, 0.08);
  color: #7d3029;
}

.auth-card,
.price-card {
  padding: 22px;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.order-row,
.user-row,
.task-row {
  width: 100%;
  text-align: left;
}

.task-list,
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-row-top,
.row-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.subhead {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.section-head.compact {
  margin-bottom: 2px;
}

.admin-list .row-head strong,
.task-row-top strong {
  display: block;
}

.row-foot {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}

.hidden {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .hero-panel,
  .account-grid,
  .workspace-grid,
  .admin-layout,
  .pricing-grid,
  .service-grid,
  .field-grid,
  .upload-grid,
  .auth-split,
  .task-meta-grid,
  .member-stats,
  .detail-meta-grid,
  .swatch-grid {
    grid-template-columns: 1fr;
  }

  .task-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-shell,
  .admin-shell {
    width: min(100vw - 20px, 100%);
    padding: 14px 0 34px;
  }

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

  .hero-panel,
  .panel-card,
  .hero-floating-card,
  .price-card,
  .auth-card,
  .upload-card {
    padding: 18px;
    border-radius: 24px;
  }

  .nav-row,
  .hero-actions,
  .stats-row,
  .toolbar,
  .action-row,
  .detail-actions {
    width: 100%;
  }

  .nav-row a,
  .button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
