:root {
  --cream: #fff8ec;
  --ink: #2b3a4a;
  --ink-soft: #6b7a8c;
  --coral: #ff7a59;
  --coral-dark: #e85f3f;
  --teal: #2bb3a3;
  --gold: #ffc93c;
  --line: #f0dcc0;
  --shadow: 0 6px 20px rgba(120, 80, 40, .18);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; width: 100%; position: fixed; inset: 0; overflow: hidden; touch-action: manipulation; background: #fdeed6; color: var(--ink); overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }

/* ---------- HUD ---------- */
#hud {
  position: fixed; left: 0; right: 0; top: 0; z-index: 5;
  padding: calc(var(--sat) + 8px) 10px 0; max-width: 560px; margin: 0 auto;
  display: grid; gap: 6px; pointer-events: none;
}
.hud-row { display: flex; align-items: center; gap: 8px; }
.hud-row > * { pointer-events: auto; }
.spacer { flex: 1; }
.chip-day, .timer, .hearts {
  height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 18px;
  background: var(--cream); box-shadow: var(--shadow); font-weight: 800; font-size: 15px; white-space: nowrap;
}
.chip-day { background: var(--coral); color: #fff; }
.timer { font-variant-numeric: tabular-nums; min-width: 62px; justify-content: center; }
.timer.low { color: #e5484d; animation: pulse .8s infinite; }
.hearts { gap: 3px; padding: 0 10px; }
.hearts svg { width: 17px; height: 17px; fill: #ff5a6e; transition: .25s; }
.hearts svg.off { fill: #e6d6c2; transform: scale(.85); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--cream); box-shadow: var(--shadow);
  display: grid; place-items: center; flex: none;
}
.icon-btn svg { width: 20px; height: 20px; fill: var(--ink); stroke: var(--ink); stroke-width: 0; }
.icon-btn:active { transform: scale(.92); }
/* 视角开关：默认锁定，解锁后才能拖动/缩放视角。营业时在右下角，经营店铺时在左上角 */
#viewCtl { position: fixed; z-index: 5; display: none; gap: 8px; right: calc(var(--sar) + 12px); bottom: calc(var(--sab) + 12px); }
body[data-screen="play"] #viewCtl, body[data-screen="hub"] #viewCtl { display: flex; }
body[data-screen="hub"] #viewCtl { right: auto; bottom: auto; left: calc(var(--sal) + 12px); top: calc(var(--sat) + 12px); flex-direction: row-reverse; }
#viewCtl button { width: 38px; height: 38px; border-radius: 50%; background: var(--cream); box-shadow: var(--shadow); color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; }
#viewCtl button:active { transform: scale(.92); }
#viewCtl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#btnViewLock[aria-pressed="true"] { background: var(--teal); color: #fff; }
#btnViewReset { display: none !important; }
body.view-moved #btnViewReset { display: inline-flex !important; }
.goal {
  position: relative; height: 30px; border-radius: 15px; background: var(--cream); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 6px; padding: 0 12px; font-weight: 800; font-size: 14px; overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.goal > * { position: relative; }
.goal-fill { position: absolute !important; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ffe08a, var(--gold)); transition: width .3s; }
.goal.met .goal-fill { background: linear-gradient(90deg, #9be8c0, #4fd596); }
.goal-sep { color: var(--ink-soft); font-weight: 600; font-size: 13px; }
.goal-sep b { color: var(--ink); }
.goal-sep i { font-style: normal; color: #ff9a1f; letter-spacing: 1px; }
/* 一星、二星所在的位置；条填满是三星 */
.goal-tick { position: absolute !important; top: 5px; bottom: 5px; width: 2px; margin-left: -1px; border-radius: 1px; background: rgba(43, 58, 74, .22); }
.goal-stars { margin-left: auto; letter-spacing: 1px; color: #d9c6a8; font-size: 15px; }
.goal-stars i { font-style: normal; }
.goal-stars i.on { color: #ff9a1f; }
.coin {
  width: 16px; height: 16px; border-radius: 50%; flex: none; display: inline-block; vertical-align: -2px;
  background: radial-gradient(circle at 35% 35%, #fff3b0, #ffc93c 60%, #e6a700); box-shadow: inset 0 0 0 1.5px #e6a700;
}

#hint {
  position: fixed; left: 50%; bottom: calc(var(--sab) + 12px); transform: translateX(-50%); z-index: 5;
  max-width: min(92vw, 460px); padding: 9px 16px; border-radius: 18px; background: rgba(43, 58, 74, .9); color: #fff;
  font-size: 14px; font-weight: 600; line-height: 1.35; text-align: center; pointer-events: none;
}

/* ---------- 场景标签 ---------- */
.tag, .cust, .pop { position: absolute; left: 0; top: 0; will-change: transform; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 1.5px #fff; }
.tag.pill {
  display: flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 12px; margin-top: -4px;
  background: #fff; color: var(--c); border: 2px solid var(--c); font-size: 12px; font-weight: 800; line-height: 1.2;
  box-shadow: 0 2px 6px rgba(60, 40, 20, .2);
}
.tag.pill.fin { background: var(--c); color: #fff; animation: bob .7s ease-in-out infinite alternate; }
.tag.sel { outline: 3px solid var(--gold); outline-offset: 1px; }
.tag.ring {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) var(--p, 0deg), rgba(255, 255, 255, .9) 0);
  box-shadow: 0 2px 6px rgba(60, 40, 20, .25);
}
.tag.ring span {
  width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--c);
  display: grid; place-items: center; font-size: 14px; font-weight: 900;
}
.tag.bump { animation: bump .45s; }
.cust {
  display: flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 12px; background: #fff;
  box-shadow: 0 2px 6px rgba(60, 40, 20, .2);
}
.cust .bar { width: 30px; height: 7px; border-radius: 4px; background: #eadfce; overflow: hidden; display: block; }
.cust .bar b { display: block; height: 100%; width: 100%; border-radius: 4px; }
.cust.urgent { animation: shake .35s infinite; }
.chip { font-style: normal; font-size: 11px; font-weight: 900; color: #fff; width: 17px; height: 17px; border-radius: 6px; display: grid; place-items: center; }
.chip.iron { background: #8c7bff; }
.chip.rush { background: #ff5a5a; }
.chip.ride { background: #4c8dff; }
.phonetag {
  position: absolute; left: 0; top: 0; display: grid; justify-items: center; gap: 3px; padding: 5px 10px 6px; border-radius: 14px;
  background: #ff5a5a; color: #fff; font-size: 14px; font-weight: 900; box-shadow: 0 3px 10px rgba(200, 40, 40, .4);
  animation: ringpulse .5s ease-in-out infinite alternate;
}
.phonetag .bar { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; display: block; }
.phonetag .bar b { display: block; height: 100%; background: #fff; }
@keyframes ringpulse { to { scale: 1.12; } }
.pop.small { font-size: 15px; }
.pop { font-weight: 900; font-size: 22px; text-shadow: 0 2px 0 #fff, 0 0 6px #fff; animation: rise 1s ease-out forwards; }
.pop.coin { color: #f08a00; }
.pop.bad { color: #e5484d; }
.pop.ok { color: #1fa868; }

@keyframes rise { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } 20% { transform: translate(-50%, -90%) scale(1.15); opacity: 1; } to { transform: translate(-50%, -260%) scale(1); opacity: 0; } }
@keyframes bob { from { margin-top: -4px; } to { margin-top: -10px; } }
@keyframes bump { 40% { scale: 1.35; } }
@keyframes shake { 25% { margin-left: -2px; } 75% { margin-left: 2px; } }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- 弹层 ---------- */
#overlay {
  position: fixed; inset: 0; z-index: 10; display: grid; place-items: center;
  padding: calc(var(--sat) + 14px) 14px calc(var(--sab) + 14px);
  background: rgba(64, 44, 28, .38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
#overlay:empty { display: none; }
/* 经营界面：不遮店面，面板竖屏停在下方、横屏停在右侧；店里的价签可以直接点 */
#overlay.dock { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; padding: 0; place-items: end center; }
#overlay.dock > * { pointer-events: auto; }
.card.panel { width: 100%; max-width: 560px; max-height: 50%; border-radius: 26px 26px 0 0; padding-bottom: calc(var(--sab) + 18px); box-shadow: 0 -6px 30px rgba(80, 50, 20, .22); }
.pad-tag {
  position: fixed; left: 0; top: 0; z-index: 1; height: 30px; padding: 0 10px 0 8px; border-radius: 15px; background: var(--teal); color: #fff;
  font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; box-shadow: 0 3px 0 #1f8c80, 0 6px 14px rgba(40, 90, 80, .3);
  font-variant-numeric: tabular-nums; white-space: nowrap; will-change: transform;
}
.pad-tag::before { content: '+'; font-size: 16px; margin-right: 1px; }
.pad-tag:disabled { background: #fff; color: #a8977f; box-shadow: inset 0 0 0 2px var(--line); cursor: default; }
.pad-tag .coin { width: 12px; height: 12px; }
.hub-head h2 small { font-size: 14px; color: var(--ink-soft); font-weight: 700; margin-left: 4px; }
.rep { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.rep b { white-space: nowrap; }
.rep-bar { flex: 1; height: 10px; border-radius: 5px; background: #eadfce; overflow: hidden; }
.rep-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #ffc93c, #ff9a1f); }
.rent { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px; margin-top: 10px; padding: 8px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.rent b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.rent.warn { background: #fff0ee; box-shadow: inset 0 0 0 2px #ffb3a6; color: #c8432a; }
.rent.warn b { color: #c8432a; }
.sec small { font-weight: 600; letter-spacing: 0; margin-left: 6px; opacity: .8; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.chips span { padding: 4px 9px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); white-space: nowrap; }
.chips b { color: var(--ink); }
.chips i { font-style: normal; }
.panel .star-goals { justify-content: flex-start; margin-bottom: 0; }
.btn.mode { flex-direction: column; gap: 2px; min-height: 64px; padding: 8px 18px; }
.btn.mode b { font-size: 18px; }
.btn.mode small { font-size: 12px; }
.btn-row .btn:disabled { background: #f6ead8; color: #a8977f; box-shadow: inset 0 0 0 2px var(--line); cursor: default; transform: none; }
.unlock { display: grid; gap: 6px; margin: 0 0 12px; padding: 12px 14px 14px; border-radius: 18px; background: #eafaf3; box-shadow: inset 0 0 0 2px #9be8c0; text-align: center; }
.unlock b { font-size: 17px; color: #1f9a6b; }
.unlock span { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.btn.slim { margin-top: 4px; }
.btn.slim { min-height: 38px; font-size: 14px; box-shadow: none; background: none; color: var(--ink-soft); margin-top: 4px; }
.rep-line { margin: 0 0 14px; }
.rep-line > span { display: block; margin-top: 5px; font-size: 13px; font-weight: 700; text-align: center; }
.rep-line .up { color: #1f9a6b; background: none; box-shadow: none; padding: 0; }
.rep-line .down { color: #c8432a; }
.bill { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.bill b { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.bill.bad { background: #fff0ee; box-shadow: inset 0 0 0 2px #ffb3a6; }
.bill.bad b:last-child { color: #c8432a; }
#overlay.clear { background: linear-gradient(rgba(253, 238, 214, 0) 30%, rgba(253, 238, 214, .92) 62%); backdrop-filter: none; -webkit-backdrop-filter: none; place-items: end center; }
.card {
  width: min(100%, 440px); max-height: 100%; overflow: hidden auto; background: var(--cream); border-radius: 26px;
  padding: 20px 18px 18px; box-shadow: 0 16px 50px rgba(80, 50, 20, .35); animation: pop .22s ease-out;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
/* 滚动条：细的圆角滑块，轨道透明，上下留出圆角的位置 */
.card::-webkit-scrollbar { width: 12px; height: 12px; }
.card::-webkit-scrollbar-track { background: transparent; margin: 22px 0; }
.card::-webkit-scrollbar-thumb { background: #e6cfae; border-radius: 999px; border: 4px solid transparent; background-clip: content-box; }
.card::-webkit-scrollbar-thumb:hover { background-color: #d9b98c; }
.card::-webkit-scrollbar-thumb:active { background-color: var(--coral); }
.card::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) {
  .card { scrollbar-width: thin; scrollbar-color: #e6cfae transparent; }
}
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.card h2 { margin: 0 0 4px; font-size: 22px; text-align: center; }
.card .sub { margin: 0 0 14px; text-align: center; color: var(--ink-soft); font-size: 14px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 0 18px;
  border-radius: 25px; font-size: 17px; font-weight: 800; background: #fff; color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line);
}
.btn + .btn, .btn-row + .btn, .btn + .btn-row { margin-top: 10px; }
.btn.primary { background: var(--coral); color: #fff; box-shadow: 0 4px 0 var(--coral-dark); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn small { font-weight: 600; opacity: .85; font-size: 13px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin: 0; }

.title { text-align: center; width: min(100%, 440px); padding-bottom: 4vh; }
.title h1 { margin: 0; font-size: clamp(40px, 12vw, 58px); letter-spacing: 2px; color: var(--coral); text-shadow: 0 3px 0 #fff, 0 6px 16px rgba(160, 80, 30, .25); }
.title p { margin: 6px 0 18px; color: var(--ink-soft); font-weight: 700; }

.wallet { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; background: #fff; padding: 6px 12px; border-radius: 16px; box-shadow: inset 0 0 0 2px var(--line); font-variant-numeric: tabular-nums; }
.hub-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hub-head h2 { margin: 0; text-align: left; }
.sec { margin: 14px 0 8px; font-size: 13px; font-weight: 800; color: var(--ink-soft); letter-spacing: 1px; }
.days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.day {
  aspect-ratio: 1 / 1; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px var(--line);
  display: grid; place-content: center; justify-items: center; gap: 1px; font-weight: 900; font-size: 20px; padding: 0;
}
.day small { font-size: 11px; letter-spacing: 1px; color: #d9c6a8; font-weight: 400; }
.day small i { font-style: normal; }
.day small i.on { color: #ff9a1f; }
.day.sel { box-shadow: inset 0 0 0 3px var(--coral); background: #fff1ea; }
.day:disabled { color: #cdbda6; background: #f6ead8; cursor: default; }
.ups { display: grid; gap: 8px; }
.up { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 9px 10px 9px 12px; box-shadow: inset 0 0 0 2px var(--line); }
.up-main { flex: 1; min-width: 0; }
.up-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.up-desc { font-size: 12px; color: var(--ink-soft); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 8px; height: 8px; border-radius: 50%; background: #eadfce; }
.pips i.on { background: var(--teal); }
.buy {
  flex: none; min-width: 84px; height: 40px; border-radius: 20px; background: var(--teal); color: #fff; font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; box-shadow: 0 3px 0 #1f8c80; font-variant-numeric: tabular-nums;
}
.buy:active { transform: translateY(2px); box-shadow: none; }
.buy:disabled { background: #eadfce; color: #a8977f; box-shadow: none; cursor: default; transform: none; }
.sticky { position: sticky; bottom: -18px; margin: 14px -18px -18px; padding: 12px 18px 18px; background: linear-gradient(rgba(255, 248, 236, 0), var(--cream) 30%); }

.stars { display: flex; justify-content: center; gap: 6px; font-size: 44px; line-height: 1; margin: 6px 0 10px; color: #e6d6c2; }
.stars i { font-style: normal; }
.stars i.on { color: #ffb020; animation: starpop .5s backwards; text-shadow: 0 3px 0 #e08a00; }
.stars i.on:nth-child(2) { animation-delay: .18s; }
.stars i.on:nth-child(3) { animation-delay: .36s; }
@keyframes starpop { from { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.3); } }
.star-goals { display: flex; justify-content: center; gap: 6px; margin: 0 0 14px; font-variant-numeric: tabular-nums; }
.star-goals span { display: flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-size: 13px; font-weight: 800; white-space: nowrap; }
.star-goals i { font-style: normal; color: #d9c6a8; font-size: 12px; letter-spacing: 0; }
.star-goals span.on { background: #fff4d6; box-shadow: inset 0 0 0 2px #ffd36b; }
.star-goals span.on i, .day-goals .star-goals i { color: #ff9a1f; }
.day-goals { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.day-goals .star-goals { margin: 0; }
.pay { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 6px; margin: -6px 0 14px; font-size: 14px; font-weight: 700; }
.pay b { color: #1f9a6b; font-size: 16px; }
.note { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.card:not(.panel) .chips { margin-top: 8px; }
.pay > span:not(.coin) { flex-basis: 100%; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 16px; }
.stat { background: #fff; border-radius: 14px; padding: 9px 4px; text-align: center; box-shadow: inset 0 0 0 2px var(--line); }
.stat b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink-soft); }
.steps { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 9px; counter-reset: s; }
.steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.steps li::before {
  counter-increment: s; content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--coral); color: #fff; font-weight: 900; font-size: 13px; display: grid; place-items: center;
}
.k { display: inline-block; padding: 0 5px; border-radius: 6px; color: #fff; font-weight: 800; font-size: 12px; }

@media (min-width: 700px) and (min-height: 520px) {
  .title { padding-bottom: 8vh; }
}
@media (max-height: 460px) {
  .card { padding: 12px 16px; border-radius: 20px; }
  .btn { min-height: 42px; }
  .stars { font-size: 32px; }
}
/* 横屏：标题在左，店铺在右 */
@media (min-aspect-ratio: 11/10) {
  #overlay.clear {
    place-items: center start; padding-left: calc(var(--sal) + 4vw);
    background: linear-gradient(90deg, rgba(253, 238, 214, .94) 28%, rgba(253, 238, 214, 0) 52%);
  }
  .title { width: min(38vw, 440px); padding-bottom: 0; }
  #overlay.dock { place-items: stretch end; }
  .card.panel { width: min(400px, 44vw); max-height: none; border-radius: 26px 0 0 26px; padding-right: calc(var(--sar) + 18px); padding-bottom: 18px; box-shadow: -6px 0 30px rgba(80, 50, 20, .22); }
  .title h1 { font-size: clamp(30px, 6.4vw, 58px); }
}
/* 手机横屏：高度很小，HUD 压成一行，提示放到左下角 */
@media (max-height: 500px) and (orientation: landscape) {
  #hud {
    max-width: none; grid-template-columns: minmax(170px, 270px) 1fr; align-items: center;
    padding: calc(var(--sat) + 6px) calc(var(--sar) + 10px) 0 calc(var(--sal) + 10px);
  }
  .hud-row { order: 1; justify-content: flex-end; }
  .hud-row .spacer { display: none; }
    .card.panel { width: min(320px, 42vw); }
  /* 提示放在顶栏中间的空位，不占店面 */
  #hint { top: calc(var(--sat) + 8px); bottom: auto; max-width: 27vw; font-size: 12px; line-height: 1.25; padding: 5px 10px; border-radius: 12px; }
  #overlay { padding-left: calc(var(--sal) + 14px); padding-right: calc(var(--sar) + 14px); }
}
/* 平板：界面元素放大一档 */
@media (min-width: 700px) and (min-height: 700px) {
  #hud { max-width: 640px; gap: 8px; padding-top: calc(var(--sat) + 14px); }
  .chip-day, .timer, .hearts { height: 44px; font-size: 18px; padding: 0 16px; border-radius: 22px; }
  .hearts svg { width: 21px; height: 21px; }
  .icon-btn { width: 48px; height: 48px; }
  .goal { height: 36px; font-size: 16px; border-radius: 18px; }
  .tag.pill { font-size: 14px; padding: 4px 10px 4px 8px; }
  .tag.ring { width: 48px; height: 48px; }
  .tag.ring span { width: 34px; height: 34px; font-size: 17px; }
  .cust { padding: 5px 9px; }
  .cust .bar { width: 40px; height: 8px; }
  .chip { width: 20px; height: 20px; font-size: 13px; }
  #hint { font-size: 16px; padding: 11px 20px; }
  .card { width: min(100%, 520px); }
}
@media (prefers-reduced-motion: reduce) {
  .tag.pill.fin, .cust.urgent, .timer.low { animation: none; }
}
