:root {
  --mango: #f58b2c;
  --mango-deep: #d66f16;
  --leaf: #5a8a3e;
  --leaf-soft: #7ea85c;
  --ink: #2f241d;
  --muted: #7d6a5d;
  --mist: #fff6ea;
  --paper: rgba(255, 252, 247, 0.92);
  --line: rgba(96, 62, 28, 0.12);
  --danger: #d94f4f;
  --warning: #f0ad37;
  --shadow: 0 24px 60px rgba(98, 52, 0, 0.14);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --font-main: "Avenir Next", "PingFang TC", "Noto Sans TC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-main);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(245, 166, 35, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(90, 138, 62, 0.18), transparent 26%),
    linear-gradient(160deg, #fff7ee 0%, #fffdf8 45%, #fdf3e3 100%);
}

.ambient {
  position: fixed;
  width: 32vw;
  max-width: 360px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.5;
  pointer-events: none;
}

.ambient-left {
  top: -10rem;
  left: -6rem;
  background: rgba(245, 166, 35, 0.28);
}

.ambient-right {
  right: -7rem;
  bottom: -10rem;
  background: rgba(90, 138, 62, 0.22);
}

.app-frame {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 28px));
  margin: 24px auto;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
}

.report-frame {
  grid-template-columns: 320px minmax(0, 1fr);
}

.brand-panel,
.surface-panel {
  backdrop-filter: blur(18px);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}

.brand-panel {
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 20px;
  align-self: start;
}

.surface-panel {
  border-radius: calc(var(--radius-xl) + 4px);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand-mark,
.eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--leaf);
  font-weight: 800;
}

.brand-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.08;
}

.brand-copy,
.panel-head p,
.support-card p,
.field small,
.micro-copy,
.preview-meta,
.privacy-copy,
.step-caption,
.info-card p {
  color: var(--muted);
}

.brand-copy,
.panel-head p {
  margin: 0;
  line-height: 1.7;
}

.context-chip,
.summary-pill,
.support-card,
.info-card,
.privacy-card,
.upload-card,
.success-card,
.banner,
.product-card,
.choice-card,
.payment-card,
.stack-card,
.summary-layout section {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.context-chip,
.summary-pill {
  padding: 14px 16px;
}

.context-chip {
  font-size: 14px;
  line-height: 1.6;
}

.summary-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.14), rgba(90, 138, 62, 0.08)),
    rgba(255, 255, 255, 0.86);
}

.summary-pill strong {
  font-size: 24px;
}

.single-line {
  min-height: 82px;
}

.step-rail {
  display: grid;
  gap: 10px;
}

.step-pill {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.step-pill strong {
  display: block;
}

.step-pill small {
  color: var(--muted);
}

.step-pill.is-active {
  transform: translateX(6px);
  border-color: rgba(245, 166, 35, 0.55);
  background: rgba(255, 244, 228, 0.96);
}

.step-index {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(90, 138, 62, 0.12);
  font-weight: 800;
  color: var(--leaf);
}

.support-card {
  padding: 18px;
  line-height: 1.7;
}

.support-card p {
  margin: 0 0 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.support-card strong {
  font-size: 16px;
}

.banner {
  padding: 14px 16px;
  line-height: 1.7;
}

.banner-warning {
  border-color: rgba(240, 173, 55, 0.35);
  background: rgba(255, 246, 214, 0.96);
}

.banner-success {
  border-color: rgba(90, 138, 62, 0.3);
  background: rgba(238, 247, 232, 0.95);
}

.banner-error {
  border-color: rgba(217, 79, 79, 0.3);
  background: rgba(255, 240, 240, 0.96);
}

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

.step-panel {
  display: none;
  animation: rise-in 240ms ease;
}

.step-panel.is-active {
  display: block;
}

.panel-head {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
}

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

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(88, 52, 25, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  padding: 14px 14px 15px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(245, 139, 44, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 139, 44, 0.12);
}

.inline-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.choice-grid,
.payment-grid,
.product-grid {
  display: grid;
  gap: 16px;
}

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

.choice-card,
.payment-card {
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.choice-card:hover,
.payment-card:hover,
.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 139, 44, 0.4);
}

.choice-card.is-selected,
.payment-card.is-selected {
  background: rgba(255, 244, 228, 0.98);
  border-color: rgba(245, 139, 44, 0.54);
}

.choice-card strong,
.payment-card strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.choice-card p,
.payment-card p {
  margin: 8px 0 0;
  line-height: 1.6;
  color: var(--muted);
}

.choice-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(90, 138, 62, 0.11);
  color: var(--leaf);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.stack-block {
  display: grid;
  gap: 14px;
}

.stack-card,
.info-card {
  padding: 18px;
  line-height: 1.7;
}

.stack-card h3,
.info-card h3,
.summary-layout h3,
.success-card h3 {
  margin: 0 0 10px;
}

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

.product-card {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.product-title {
  margin: 0;
  font-size: 21px;
}

.product-spec {
  margin: 6px 0 0;
  color: var(--muted);
}

.product-price {
  font-size: 28px;
  font-weight: 800;
}

.product-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.product-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.quantity-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quantity-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: none;
  background: var(--ink);
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.quantity-button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.quantity-value {
  min-width: 44px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 18px;
  font-weight: 700;
}

.switch-row input {
  width: 20px;
  height: 20px;
}

.privacy-card {
  overflow: hidden;
}

.privacy-card summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  list-style: none;
}

.privacy-card summary::-webkit-details-marker {
  display: none;
}

.privacy-copy {
  padding: 0 18px 18px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.summary-layout {
  display: grid;
  gap: 14px;
}

.summary-layout section {
  padding: 18px;
}

.summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed rgba(96, 62, 28, 0.12);
  padding-bottom: 10px;
}

.summary-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.summary-kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 14px;
  line-height: 1.7;
}

.summary-kv dt {
  color: var(--muted);
}

.summary-kv dd {
  margin: 0;
}

.success-card {
  padding: 24px;
  line-height: 1.8;
}

.success-card strong {
  display: block;
  font-size: 26px;
  margin-bottom: 8px;
}

.wizard-nav {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
}

.report-nav {
  padding-top: 18px;
}

.primary-button,
.ghost-button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  border: none;
  color: white;
  background: linear-gradient(135deg, var(--mango), var(--mango-deep));
  box-shadow: 0 12px 30px rgba(214, 111, 22, 0.24);
}

.ghost-button,
.button-link {
  border: 1px solid rgba(88, 52, 25, 0.14);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.primary-button:hover,
.ghost-button:hover,
.button-link:hover {
  transform: translateY(-1px);
}

.primary-button[disabled],
.ghost-button[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.upload-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 22px;
  margin-top: 18px;
  border-style: dashed;
  cursor: pointer;
}

.upload-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-title {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(90, 138, 62, 0.1);
  color: var(--leaf);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-wrap {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.preview-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
}

.preview-meta {
  display: grid;
  align-content: center;
  gap: 6px;
}

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

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

.payment-card.is-disabled,
.choice-card.is-disabled,
.product-card.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.status-open {
  background: rgba(90, 138, 62, 0.12);
  color: var(--leaf);
}

.status-hot,
.status-low {
  background: rgba(245, 139, 44, 0.12);
  color: var(--mango-deep);
}

.status-wait {
  background: rgba(74, 144, 217, 0.12);
  color: #3c78b7;
}

.status-stop {
  background: rgba(125, 106, 93, 0.12);
  color: var(--muted);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .app-frame,
  .report-frame {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-frame {
    width: min(100% - 18px, 100%);
    margin: 10px auto 18px;
  }

  .surface-panel,
  .brand-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .grid-two,
  .choice-grid,
  .product-grid,
  .payment-grid,
  .compact-grid,
  .preview-wrap {
    grid-template-columns: 1fr;
  }

  .wizard-nav {
    flex-direction: column-reverse;
  }

  .summary-kv {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
