/* 欧恩焙感恩节 H5 · 竖屏手机优先。设计坐标 750×1624，这里按 CSS 像素自适应。 */
:root {
  color-scheme: light;
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: #4a2f22;
  background: #f3e3c9;
  --accent: #a8402c;
  --accent-dark: #7d2c1c;
  --gold: #e0b25f;
  --cream: #fffaf0;
  --line: #dcbf98;
  --shadow: 0 6px 18px #6b3a1e2e;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: #f3e3c9; }
#app { display: flex; flex-direction: column; min-height: 100dvh; max-width: 480px; margin: 0 auto; background: var(--cream); box-shadow: 0 0 40px #6b3a1e1f; }
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.screen > * { margin: 0; }
.boot { padding: 2rem 1rem; text-align: center; color: var(--accent); font-weight: 700; }
.screen > button.secondary { margin: .5rem .9rem 1rem; }
.screen > p { padding: .6rem 1rem; }

h1 { font-family: "Songti SC", Georgia, serif; color: var(--accent-dark); font-size: clamp(1.5rem, 6.4vw, 2.1rem); line-height: 1.2; margin: 0; }
h2 { font-size: 1.05rem; color: var(--accent-dark); margin: 0; }
p { line-height: 1.55; margin: 0; }

button, input, select { font: inherit; }
button {
  min-height: 44px; border: 0; border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer;
  background: linear-gradient(#c04a32, var(--accent)); color: #fff8ee; font-weight: 700;
  box-shadow: 0 3px 0 var(--accent-dark), 0 6px 14px #7d2c1c33;
  transition: transform .08s ease, filter .12s ease;
}
button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-dark); }
button:disabled { opacity: .5; box-shadow: none; cursor: not-allowed; }
button.big { width: 100%; min-height: 52px; font-size: 1.05rem; }
button.secondary { background: #fff; color: var(--accent); border: 1.5px solid var(--line); box-shadow: none; font-weight: 600; }
select { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); padding: .3rem .6rem; background: #fff; width: 100%; }

/* ---------- 通用页面（首页 / 卖点 / 进度 / 餐桌） ---------- */
.page {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 1rem .9rem 1.2rem; background: #f7e7cd center/cover no-repeat;
}
.card {
  display: grid; gap: .7rem; justify-items: center; text-align: center;
  padding: 1.2rem 1rem; border-radius: 22px; background: #fffaf0f2;
  border: 1.5px solid #e8cfa8; box-shadow: var(--shadow); backdrop-filter: blur(2px);
}
.card > p { max-width: 30em; }
.eyebrow { color: var(--accent); font-size: .72rem; letter-spacing: .16em; font-weight: 700; margin: 0; }
.benefit { font-size: 1.05rem; font-weight: 700; color: var(--accent-dark); }
.tiny { font-size: .74rem; color: #8a6a53; line-height: 1.45; }
.steps { font-size: .8rem; color: #8a6a53; background: #fdf1dc; border-radius: 12px; padding: .45rem .7rem; }
.hero { width: min(52%, 170px); height: auto; }
.pack { height: 118px; width: auto; max-width: 70%; object-fit: contain; }
.compare { display: flex; gap: .6rem; width: 100%; }
.compare > figure { flex: 1; margin: 0; display: grid; gap: .3rem; justify-items: center; }
.comparison-image { width: 100%; height: 96px; object-fit: contain; border-radius: 12px; background: #fdf1dc; }
figcaption { font-size: .76rem; color: #8a6a53; }
.screen progress { width: 100%; height: 14px; accent-color: var(--accent); }
.reveal img { transition: clip-path .3s ease; }
.reveal-0 img { opacity: .18; }
.reveal-35 img { clip-path: inset(65% 0 0); }
.reveal-70 img { clip-path: inset(30% 0 0); }
.rewards { padding-inline-start: 1.1rem; text-align: left; }
.qr { width: min(100%, 200px); }
.code { font: 700 1.3rem ui-monospace, monospace; letter-spacing: .06em; word-break: break-all; user-select: all; background: #fdf1dc; border-radius: 12px; padding: .6rem .8rem; }
.reward-line { font-weight: 600; color: var(--accent-dark); }
.pill { display: inline-block; padding: .2rem .65rem; border-radius: 999px; background: var(--accent); color: #fff8ee; font-size: .76rem; font-weight: 700; }
.pill.ghost { background: #fff6e6cc; color: var(--accent-dark); border: 1px solid #e0bd8c; }

/* ---------- 厨房 ---------- */
.kitchen {
  position: relative; flex: 1; display: flex; flex-direction: column; gap: .45rem;
  min-height: calc(100dvh - 108px); padding: .55rem .6rem .7rem;
  background: #8a5a3b center/cover no-repeat;
}
.hud { display: grid; gap: .35rem; padding: .5rem .55rem; border-radius: 16px; background: #fffaf0e8; box-shadow: 0 4px 12px #4a2f2233; }
.hud-row { display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .78rem; }
.menu { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip {
  display: inline-flex; align-items: center; gap: .22rem; padding: .12rem .42rem .12rem .16rem;
  border-radius: 999px; background: #fff; border: 1.5px solid #e3c69c; font-size: .76rem; line-height: 1.2;
}
.chip b { font-weight: 700; color: #4a2f22; }
.chip i { font-style: normal; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.chip.done { background: #e8f3e0; border-color: #a9c895; }
.chip.done b { color: #4b6b3a; }
.chip.highlight { background: #fff3c4; border-color: var(--gold); box-shadow: 0 0 0 2px #ffe06688; }
.chip-art { width: 22px; height: 22px; object-fit: contain; display: block; }
.chip-text { display: grid; place-items: center; font-size: .7rem; color: #8a6a53; }

.pile { flex: 1; display: grid; place-items: center; min-height: 0; }
.ingredients {
  display: block; width: 100%; max-width: 430px; height: auto; aspect-ratio: 360 / 270;
  cursor: pointer; touch-action: manipulation;
  filter: drop-shadow(0 6px 10px #3a241555);
}
.bubble {
  align-self: center; max-width: 96%; text-align: center; font-size: .8rem; font-weight: 600;
  padding: .3rem .8rem; border-radius: 999px; background: #fffaf0ee; color: #5a3a29;
  box-shadow: 0 3px 10px #3a241533;
}
.bubble.warn { background: #ffe9c2; color: #8a4b12; }
.bubble.bad { background: #ffdcd2; color: #9c2c14; }

.dock { display: grid; gap: .4rem; }
.plate {
  display: flex; gap: .28rem; padding: .42rem; border-radius: 18px;
  background: linear-gradient(#fffdf7, #f4ddb9);
  box-shadow: inset 0 0 0 2px #fff, 0 5px 0 #cfae83, 0 10px 16px #3a241533;
}
.cell {
  flex: 1; aspect-ratio: 1 / 1; display: grid; place-items: center;
  border-radius: 12px; background: #fff; border-bottom: 4px solid #f0c79a; min-width: 0;
}
.cell .chip-art { width: 78%; height: 78%; }
.cell-last { border: 2px dashed #c8975a; border-bottom: 4px solid #e7b483; }
.plate.warning .cell-last { animation: flash .55s alternate infinite; }
.plate.failed .cell-last { background: #ffd9cc; border-color: #b4402a; }
@keyframes flash { from { background: #fff2b8; } to { background: #ffb9a0; border-color: #b4402a; } }
.dock-actions { display: flex; gap: .5rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.dock-actions button { flex: 1 1 auto; }

/* 调温 / 出炉 */
.oven-card {
  flex: 1; display: grid; gap: .7rem; align-content: center; justify-items: center; text-align: center;
  padding: 1rem; border-radius: 22px; background: #fffaf0f2; box-shadow: var(--shadow);
}
.oven-art { width: min(46%, 170px); height: auto; }
.temps { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; }
button.temp { min-height: 40px; padding: .3rem .7rem; border-radius: 12px; background: #fff; color: var(--accent-dark); border: 1.5px solid var(--line); box-shadow: none; font-variant-numeric: tabular-nums; }
button.temp[aria-pressed="true"] { background: linear-gradient(#c04a32, var(--accent)); color: #fff8ee; border-color: var(--accent-dark); }

/* ---------- 答题 ---------- */
fieldset { border: 1.5px solid var(--line); border-radius: 16px; padding: .6rem .8rem; margin: 0; display: grid; gap: .45rem; background: #fff; }
legend { font-weight: 700; color: var(--accent-dark); padding-inline: .3rem; }
fieldset label { display: flex; align-items: center; gap: .6rem; padding: .35rem .2rem; border-radius: 10px; }
fieldset label:has(input:checked) { background: #fdf1dc; }
.timer { font: 700 1.35rem ui-monospace, monospace; color: var(--accent); text-align: center; }

/* ---------- 底栏 / 提示 ---------- */
#notice { margin: 0; padding: .15rem 1rem; min-height: 1.5rem; color: var(--accent); font-weight: 650; font-size: .82rem; text-align: center; }
.tabbar {
  display: flex; gap: .3rem; padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: #fffaf0f5; position: sticky; bottom: 0;
}
.tabbar button { flex: 1; min-height: 40px; background: transparent; color: var(--accent); box-shadow: none; font-weight: 650; font-size: .85rem; }
.tabbar button:active { background: #fdf1dc; }

.flying-piece { position: fixed; inset: 0 auto auto 0; z-index: 3; pointer-events: none; background: #fff1cc; color: var(--accent); padding: .2rem .4rem; border-radius: 6px; font-size: .8rem; font-weight: 700; }
.accessible-pick { width: 100%; font-size: .8rem; }
.accessible-pick summary { color: var(--accent); cursor: pointer; }
.accessible-pick button { min-height: 34px; font-size: .78rem; margin: .12rem; padding: .2rem .6rem; }
.operator { max-width: 760px; }
.operator form { display: grid; gap: .65rem; }
.operator label { display: grid; gap: .3rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
