:root {
  --ink: #24170d;
  --muted: #6f5b45;
  --line: #eadcc7;
  --paper: #fffaf2;
  --card: #ffffff;
  --gold: #b8822e;
  --gold-dark: #7a4b10;
  --soft: #f8ead4;
  --danger: #a73621;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #fff3d8, transparent 34rem), #fffaf2;
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button {
  font: inherit;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 42px 0 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-dark);
  font-weight: 800;
  letter-spacing: .04em;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 16px;
  font-size: clamp(36px, 7vw, 64px);
  line-height: .98;
  letter-spacing: -.02em;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
}

h3 {
  margin-bottom: 0;
  font-size: 22px;
}

.lead {
  max-width: 690px;
  margin-bottom: 0;
  color: #59442e;
  font-size: 18px;
  line-height: 1.7;
}

.status-card,
.panel,
.menu-card,
.draft-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 24px 60px rgba(77, 51, 16, .12);
}

.status-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 178px;
  padding: 14px 18px;
  color: var(--muted);
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22a05a;
  box-shadow: 0 0 0 6px rgba(34, 160, 90, .12);
}

.panel {
  padding: 28px;
}

.menu-card,
.draft-card {
  padding: clamp(18px, 4vw, 34px);
}

.menu-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.menu-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.language-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-content: flex-start;
}

.language-row button,
.tag-button,
.product-button,
.option-button,
.primary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.language-row button {
  padding: 9px 12px;
  background: #f3e5d0;
  color: #4a3016;
  font-weight: 800;
}

.language-row button.active,
.tag-button.active,
.option-button.active {
  background: #24170d;
  color: #fff8ee;
}

.step-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr 1.05fr;
  gap: 18px;
}

.step-panel {
  min-height: 320px;
  padding: 20px;
  border: 1px solid #efdfc6;
  border-radius: 24px;
  background: linear-gradient(180deg, #fffdf8, #fff6e8);
}

.step-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.step-title span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fffaf2;
  font-weight: 900;
}

.tag-grid {
  display: grid;
  gap: 10px;
}

.tag-button,
.option-button {
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #eadbc4;
  text-align: left;
  font-weight: 800;
}

.product-list {
  display: grid;
  gap: 12px;
}

.product-button {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border: 1px solid #eadbc4;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.product-button.active {
  box-shadow: 0 0 0 3px rgba(184, 130, 46, .18);
}

.product-button img,
.product-fallback {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--soft);
}

.product-fallback {
  display: grid;
  place-items: center;
  color: var(--gold-dark);
  font-weight: 900;
}

.product-button strong {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
}

.product-button p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.5;
}

.price {
  color: var(--gold-dark);
  font-weight: 900;
}

.empty-state {
  padding: 24px;
  border: 1px dashed #dbc39c;
  border-radius: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.detail-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.option-group {
  margin: 18px 0;
}

.option-group h4 {
  margin: 0 0 10px;
  font-size: 17px;
}

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

.option-button {
  min-width: 84px;
  text-align: center;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #ecdcc5;
}

.total-row strong {
  font-size: 26px;
}

.primary-button {
  padding: 13px 18px;
  background: linear-gradient(135deg, #2b1a0c, #8d5a19);
  color: #fffaf2;
  font-weight: 900;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.draft-card {
  margin-top: 22px;
  background: #211407;
  color: #fff8ee;
}

.draft-card .eyebrow,
.draft-card .small-note {
  color: #f1c27c;
}

.draft-card h2 {
  color: #fff;
  font-size: clamp(34px, 7vw, 54px);
}

.draft-card p {
  color: #f7e6cf;
  line-height: 1.7;
}

.staff-card {
  margin: 18px 0;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .1);
}

.small-note {
  margin-bottom: 0;
  font-size: 14px;
}

.return-member-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(241, 194, 124, .32);
  border-radius: 20px;
  background: rgba(255, 255, 255, .08);
}

.return-member-card:empty {
  display: none;
}

.return-member-card strong {
  display: block;
  margin-bottom: 4px;
  color: #fff8ee;
  font-size: 20px;
}

.return-member-card p {
  margin: 0;
}

.return-card-note {
  color: #f1c27c !important;
  font-size: 14px;
}

.return-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.return-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #f1c27c;
  color: #211407;
  font-weight: 900;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.error {
  color: var(--danger);
  font-weight: 800;
}

@media (max-width: 880px) {
  .hero,
  .menu-header,
  .step-grid {
    grid-template-columns: 1fr;
  }

  .menu-header {
    display: grid;
  }

  .language-row {
    justify-content: flex-start;
  }

  .step-panel {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .menu-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .hero {
    padding-top: 22px;
  }

  .product-button {
    grid-template-columns: 64px 1fr;
  }

  .product-button img,
  .product-fallback {
    width: 64px;
    height: 64px;
  }

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

  .primary-button,
  .return-link-button {
    width: 100%;
  }

  .return-member-card {
    grid-template-columns: 1fr;
  }

  .return-action-row {
    justify-content: stretch;
  }
}
