* { box-sizing: border-box; }

:root {
  --bg: #f4f4f7;
  --card: #ffffff;
  --ink: #1f2430;
  --sub: #8a8f9a;
  --line: #eef0f3;
  --brand: #b45309;      /* 琥珀色,画室质感 */
  --brand-dark: #92400e;
  --soft: #f7f6f3;
}

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  padding-bottom: 84px;
}

.topbar {
  text-align: center;
  padding: 22px 16px 16px;
  background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
  color: #fff;
}
.topbar h1 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.topbar p { margin: 6px 0 0; font-size: 13px; opacity: .9; }

.container { max-width: 640px; margin: 0 auto; padding: 14px 12px 0; }

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(20, 20, 40, .05);
}

.info-card h2,
.group-card .group-head h3 {
  font-size: 16px;
  margin: 0 0 12px;
  color: var(--ink);
}

.field { margin-bottom: 12px; }
.field:last-of-type { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 5px;
}
select, input[type="text"] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
select { background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%238a8f9a' d='M6 8L2 4h8z'/></svg>") no-repeat right 12px center; padding-right: 34px; }
input:focus, select:focus { outline: none; border-color: var(--brand); }

.btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .05s;
}
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-ghost { background: var(--soft); color: var(--brand-dark); }

.hint-card {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--sub);
  background: var(--soft);
}
.hint-dot {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 7px;
}

.group-card { padding: 14px 16px; }
.group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.group-head h3 { margin: 0; }
.group-sub { font-size: 12px; color: var(--sub); }
.group-sub b { color: var(--brand-dark); font-weight: 600; }

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.item:last-child { border-bottom: none; }
.item-info { flex: 1; padding-right: 10px; min-width: 0; }
.item-name { display: block; font-size: 14px; color: var(--ink); }
.item-price { display: block; font-size: 12px; color: var(--sub); margin-top: 2px; }
.qty {
  flex: 0 0 70px;
  width: 70px;
  min-width: 0;
  padding: 8px 6px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
}
.qty:focus { outline: none; border-color: var(--brand); }

.footer-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 10px 0;
  z-index: 50;
  box-shadow: 0 -2px 12px rgba(20, 20, 40, .05);
}
.footer-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.footer-total { flex: 1; }
.footer-total span { font-size: 13px; color: var(--sub); display: block; }
.footer-total strong { font-size: 21px; color: var(--brand); }
.footer-inner .btn-primary { width: auto; min-width: 132px; }

.toast {
  position: fixed;
  bottom: 98px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(25, 25, 35, .9);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: 90vw;
  z-index: 100;
  white-space: pre-line;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 641px) {
  .topbar { padding-top: 28px; padding-bottom: 22px; }
  .topbar h1 { font-size: 24px; }
}
