* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f4f5f7; color: #1d1d1f; padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
header {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 12px; background: #fff; border-bottom: 1px solid #e8e8ec; font-weight: 600;
}
header h1 { font-size: 17px; margin: 0; flex: 1; text-align: center; }
header a.back { color: #1d1d1f; text-decoration: none; font-size: 26px; width: 32px; }
header .spacer { width: 32px; }
main { padding: 12px; }
.banner {
  display: block; padding: 14px 16px; border-radius: 12px; color: #fff; text-decoration: none;
  background: linear-gradient(120deg, #ff6a3d, #ff9a3d); margin-bottom: 12px;
}
.banner strong { display: block; font-size: 17px; }
.list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card {
  display: block; background: #fff; border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card .pic { height: 110px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 34px; }
.card .info { padding: 8px 10px 10px; }
.card .name { font-size: 14px; margin: 0 0 4px; }
.price { color: #ff4d2d; font-weight: 600; }
.muted { color: #8a8a8e; font-size: 13px; }
.section { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.section h2 { font-size: 15px; margin: 0 0 10px; }
.hero { height: 200px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 56px; margin-bottom: 12px; }
label.field { display: block; margin-bottom: 12px; }
label.field span { display: block; font-size: 13px; color: #6e6e73; margin-bottom: 4px; }
input, select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #dcdce0; border-radius: 10px; background: #fff; color: inherit;
}
textarea { min-height: 64px; resize: vertical; }
.row { display: flex; gap: 8px; align-items: center; }
.row > input { flex: 1; }
button {
  font: inherit; border: 0; border-radius: 10px; padding: 10px 16px; background: #eef0f3; color: #1d1d1f; cursor: pointer;
}
button.primary { background: #ff4d2d; color: #fff; font-weight: 600; }
button:disabled { opacity: .5; }
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e8e8ec;
}
.bar .total { flex: 1; }
.bar button { min-width: 120px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty input { width: 72px; text-align: center; }
.error-box { background: #fff2f0; color: #c4321c; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; display: none; }
.error-box.show { display: block; }
#toast {
  position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); background: rgba(0,0,0,.78); color: #fff;
  padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20;
}
#toast.show { opacity: 1; }
