/* 《不可能手搖》— 手機直向優先 */
:root {
  --cream: #FFF6EA;
  --paper: #FFFDF8;
  --ink: #5A3424;
  --ink2: #8A5E48;
  --pink: #FF7EA8;
  --pink-d: #E0538A;
  --pink-l: #FFD6E3;
  --mint: #4FD1B2;
  --mint-d: #23A88A;
  --yellow: #FFD15C;
  --yellow-d: #E3A92A;
  --sky: #9BD8FF;
  --wood: #F0C08F;
  --wood-d: #C98E5E;
  --line: #F1DCCB;
  --radius: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "PingFang HK", "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 15%, #FFE6EF 0 12%, transparent 12.5%) 0 0/120px 120px,
    radial-gradient(circle at 70% 65%, #E3F7F1 0 10%, transparent 10.5%) 0 0/120px 120px,
    #FFF1E6;
  overflow: hidden;
  overscroll-behavior: none;
}
button { font-family: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
svg { display: block; }

#app {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  box-shadow: 0 0 0 1px #F3DCCB, 0 20px 60px rgba(90, 52, 36, .12);
  overflow: hidden;
  overflow: clip;
}

/* ---------- 頂部 ---------- */
.topbar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + var(--safe-t)) 10px 8px;
  background: linear-gradient(#FFFDF8, #FFF4EA);
  border-bottom: 2px solid var(--line);
  z-index: 20;
}
#app[data-screen="title"] .topbar { display: none; }
.icon-btn {
  width: 44px; height: 44px; flex: 0 0 44px;
  border: 0; border-radius: 14px;
  background: #fff; color: var(--ink2);
  box-shadow: 0 3px 0 #EBD5C3, inset 0 0 0 2px #F3E1D2;
  display: grid; place-items: center;
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #EBD5C3, inset 0 0 0 2px #F3E1D2; }
.icon-btn .snd-off { display: none; }
.icon-btn[aria-pressed="false"] .snd-on { display: none; }
.icon-btn[aria-pressed="false"] .snd-off { display: block; }

.steps { flex: 1; display: flex; justify-content: space-between; margin: 0; padding: 0 2px; list-style: none; position: relative; }
.steps::before { content: ""; position: absolute; left: 16px; right: 16px; top: 15px; height: 4px; border-radius: 4px; background: #F1E0D2; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: #C4A898; }
.steps b {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 3px solid #F1E0D2; font-size: 14px; color: #C4A898;
  transition: all .3s;
}
.steps li.done b { background: var(--mint); border-color: var(--mint); color: #fff; }
.steps li.done { color: var(--mint-d); }
.steps li.now b { background: var(--pink); border-color: #fff; color: #fff; box-shadow: 0 0 0 3px var(--pink); transform: scale(1.08); }
.steps li.now { color: var(--pink-d); }

/* ---------- 畫面切換 ---------- */
.screens { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; overflow: clip; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateX(24px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s .35s;
}
.screen.on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .35s ease, visibility 0s; }
.screen.leave { transform: translateX(-24px); }

/* ---------- 按鈕 ---------- */
.btn {
  --bg: #fff; --sh: #E8D2C0; --fg: var(--ink);
  min-height: 52px; padding: 0 22px;
  border: 0; border-radius: 18px;
  background: var(--bg); color: var(--fg);
  font-size: 17px; font-weight: 900; letter-spacing: .5px;
  box-shadow: 0 5px 0 var(--sh), 0 8px 18px rgba(90, 52, 36, .12);
  transition: transform .08s, box-shadow .08s, filter .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active, .btn.pressed { transform: translateY(4px); box-shadow: 0 1px 0 var(--sh), 0 3px 8px rgba(90, 52, 36, .12); }
.btn:disabled { filter: grayscale(.7) opacity(.6); }
.btn-big { min-height: 60px; font-size: 19px; border-radius: 22px; }
.btn-pink { --bg: linear-gradient(#FF9DBE, var(--pink)); --sh: var(--pink-d); --fg: #fff; text-shadow: 0 2px 0 rgba(200, 50, 100, .35); }
.btn-mint { --bg: linear-gradient(#7FE4CB, var(--mint)); --sh: var(--mint-d); --fg: #fff; text-shadow: 0 2px 0 rgba(20, 120, 100, .35); }
.btn-yellow { --bg: linear-gradient(#FFE08A, var(--yellow)); --sh: var(--yellow-d); --fg: var(--ink); }
.btn-ghost { --bg: #fff; --sh: #EBD5C3; }
.mini-btn {
  border: 0; border-radius: 999px; padding: 6px 12px; min-height: 32px;
  background: #fff; color: var(--ink2); font-size: 13px; font-weight: 800;
  box-shadow: inset 0 0 0 2px #F1DCCB;
}
.mini-btn:active { background: #FFF0E4; }
.link-btn { border: 0; background: none; color: var(--ink2); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 10px; min-height: 44px; }

/* ---------- 底部導航 ---------- */
.navbar {
  flex: 0 0 auto; display: flex; gap: 10px;
  padding: 10px 12px calc(12px + var(--safe-b));
  background: linear-gradient(#FFF4EA, #FFEBDD);
  border-top: 2px solid var(--line);
  z-index: 20;
}
.navbar .btn-ghost { flex: 0 0 auto; padding: 0 16px; }
.navbar .btn-next { flex: 1; }
#app[data-screen="title"] .navbar, #app[data-screen="make"] .navbar, #app[data-screen="result"] .navbar { display: none; }

/* ---------- 牆 + 枱 (共用) ---------- */
.wall {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.45) 50%, transparent 50%) 0 0/36px 100%,
    linear-gradient(#FFD9E5, #FFE9DF 70%);
}
.counter {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background:
    linear-gradient(#FFE7C9 0 10px, #F3C796 10px 14px, transparent 14px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 3px, transparent 3px 46px),
    linear-gradient(#F7CC9C, #E8AE77);
  box-shadow: 0 -4px 0 rgba(255,255,255,.6) inset;
}
.counter::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: linear-gradient(#FFF6E8, #FFE2C2);
  box-shadow: 0 3px 0 #E7B47E;
}

/* ---------- 首頁 ---------- */
#scr-title { background: linear-gradient(#FFE0EA, #FFF1E2 55%, #FFE6CC); overflow: hidden; }
.awning {
  height: 64px; flex: 0 0 auto;
  background: repeating-linear-gradient(90deg, var(--pink) 0 40px, #fff 40px 80px);
  -webkit-mask: radial-gradient(circle at 20px 64px, transparent 19px, #000 20px) 0 0/40px 100% repeat-x;
          mask: radial-gradient(circle at 20px 64px, transparent 19px, #000 20px) 0 0/40px 100% repeat-x;
  filter: drop-shadow(0 4px 0 rgba(224, 83, 138, .3));
  margin-top: var(--safe-t);
}
.title-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; padding: 6px 20px calc(18px + var(--safe-b)); min-height: 0; }
.sign {
  text-align: center; background: var(--paper); border-radius: 28px; padding: 14px 28px 12px;
  box-shadow: 0 8px 0 #F2C6A0, 0 18px 40px rgba(224, 83, 138, .2);
  border: 4px solid #fff; outline: 3px dashed #FFC1D4; outline-offset: -12px;
  transform: rotate(-2deg);
  animation: signSwing 4s ease-in-out infinite;
}
@keyframes signSwing { 50% { transform: rotate(2deg); } }
.sign small { display: block; font-size: 12px; letter-spacing: 4px; font-weight: 900; color: var(--mint-d); }
.sign h1 { margin: 2px 0; line-height: 1; font-size: clamp(48px, 15vw, 72px); font-weight: 900; letter-spacing: 2px; }
.sign h1 span { display: block; color: var(--pink); -webkit-text-stroke: 2px #fff; text-shadow: 0 4px 0 var(--pink-d), 0 7px 0 rgba(90, 52, 36, .15); }
.sign h1 span + span { color: var(--yellow); text-shadow: 0 4px 0 var(--yellow-d), 0 7px 0 rgba(90, 52, 36, .15); font-size: 1.12em; }
.sign p { margin: 6px 0 0; font-weight: 800; color: var(--ink2); letter-spacing: 3px; }
.title-cup { position: relative; width: min(56vw, 230px); height: min(40dvh, 320px); }
.title-cup svg { width: 100%; height: 100%; }
.floaters { position: absolute; inset: -10% -40%; pointer-events: none; }
.floaters .ico { position: absolute; width: 48px; height: 48px; animation: floaty 4s ease-in-out infinite; filter: drop-shadow(0 4px 4px rgba(90, 52, 36, .15)); }
@keyframes floaty { 50% { transform: translateY(-14px) rotate(8deg); } }
#btnStart { width: min(100%, 360px); }
.tip { margin: 0; font-size: 13px; color: var(--ink2); font-weight: 600; }

/* ---------- 揀杯 ---------- */
#scr-cup { background: linear-gradient(#FFF6EA, #FFEEDD); overflow-y: auto; }
.scr-head { text-align: center; padding: 16px 16px 4px; }
.scr-head h2 { margin: 0; font-size: 26px; font-weight: 900; }
.scr-head p { margin: 4px 0 0; color: var(--ink2); font-weight: 600; }
.cup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px 16px 20px; align-content: start; }
.cup-card {
  position: relative; border: 0; border-radius: 24px; padding: 8px 8px 12px;
  background: #fff; box-shadow: 0 6px 0 #EBD5C3, 0 10px 24px rgba(90, 52, 36, .08);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform .15s, box-shadow .15s;
}
.cup-card svg { width: 100%; height: clamp(120px, 24dvh, 210px); }
.cup-card b { font-size: 20px; font-weight: 900; }
.cup-card span { font-size: 15px; font-weight: 800; color: var(--ink2); background: #FFF2E6; border-radius: 999px; padding: 2px 12px; }
.cup-card.sel { box-shadow: 0 6px 0 var(--pink-d), 0 0 0 4px var(--pink), 0 14px 30px rgba(255, 126, 168, .35); transform: translateY(-3px); }
.cup-card.sel::after {
  content: "✓"; position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--pink); color: #fff; display: grid; place-items: center; font-weight: 900;
  animation: pop .3s;
}
.cup-card:active { transform: scale(.97); }

/* ---------- 製作配方：舞台 ---------- */
#scr-build { background: var(--cream); }
.stage { position: relative; flex: 0 0 clamp(200px, 33dvh, 340px); min-width: 0; overflow: hidden; }
.board {
  position: absolute; left: 12px; top: 12px; z-index: 1;
  background: #4A6B5A; color: #fff; border-radius: 10px; padding: 6px 10px; border: 4px solid #C98E5E;
  font-size: 12px; line-height: 1.3; transform: rotate(-4deg); box-shadow: 0 4px 0 rgba(90,52,36,.2);
}
.board b { display: block; color: var(--yellow); }
.board span { font-size: 15px; font-weight: 900; }
.shelf { position: absolute; right: 8px; top: 18px; display: flex; gap: 2px; padding: 0 6px 4px; border-bottom: 6px solid #E2A974; border-radius: 0 0 4px 4px; }
.shelf .ico { width: 34px; height: 34px; }
.stage-cup { position: absolute; left: 50%; bottom: 9%; height: 89%; aspect-ratio: 220 / 340; transform: translateX(-50%); z-index: 2; }
.stage-cup svg { width: 100%; height: 100%; }
.meter {
  position: absolute; right: 10px; bottom: 26px; z-index: 3; width: 120px;
  background: rgba(255, 253, 248, .94); border-radius: 16px; padding: 8px 10px; box-shadow: 0 4px 0 #EBD5C3;
}
.meter-label { display: flex; align-items: baseline; gap: 3px; font-weight: 900; }
.meter-label b { font-size: 20px; }
.meter-label span { font-size: 12px; color: var(--ink2); }
.meter-bar { height: 10px; border-radius: 6px; background: #F2E3D6; overflow: hidden; margin-top: 4px; }
.meter-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--yellow)); border-radius: 6px; transition: width .35s; }
.meter.over .meter-bar i { background: repeating-linear-gradient(45deg, var(--pink) 0 8px, #FF9DBE 8px 16px); animation: barber 1s linear infinite; }
@keyframes barber { to { background-position: 22px 0; } }
.meter em { display: block; font-style: normal; font-size: 11px; font-weight: 800; margin-top: 3px; color: var(--ink2); min-height: 14px; }
.meter.over em { color: var(--pink-d); }
.stage-badges { position: absolute; left: 10px; top: 74px; z-index: 3; display: flex; flex-direction: column; gap: 5px; }
.stage-badges span { background: rgba(255, 253, 248, .94); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 800; box-shadow: 0 3px 0 #EBD5C3; animation: pop .3s; }
#scr-build[data-mode="ing"] .stage-badges { display: none; }

/* ---------- 已選材料 ---------- */
.side { flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--paper); border-radius: 26px 26px 0 0; margin-top: -18px; position: relative; z-index: 4; box-shadow: 0 -6px 20px rgba(90, 52, 36, .08); }
.tray { flex: 0 0 auto; padding: 10px 12px 6px; border-bottom: 2px dashed var(--line); }
.tray-head { display: flex; align-items: center; justify-content: space-between; font-weight: 900; font-size: 15px; }
.tray-list { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 6px; scrollbar-width: none; min-height: 58px; align-items: center; }
.tray-list::-webkit-scrollbar { display: none; }
.tray-empty { color: var(--ink2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 6px;
  background: #fff; border-radius: 999px; box-shadow: inset 0 0 0 2px #F1DCCB, 0 3px 0 #F1DCCB;
  font-size: 14px; font-weight: 800; animation: pop .25s;
}
.chip .ico { width: 30px; height: 30px; }
.chip em { font-style: normal; color: var(--pink-d); font-size: 13px; }
.chip button {
  width: 34px; height: 34px; border-radius: 50%; border: 0; font-size: 20px; font-weight: 900; line-height: 1;
  background: #FFF0F5; color: var(--pink-d); display: grid; place-items: center;
}
.chip button.plus { background: #E6FAF4; color: var(--mint-d); }
.chip button:active { transform: scale(.9); }

/* ---------- 材料面板 ---------- */
.panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#scr-build[data-mode="ing"] .panel-set, #scr-build[data-mode="set"] .panel-ing { display: none; }
#scr-build[data-mode="set"] .tray { display: none; }
.search { flex: 0 0 auto; margin: 10px 12px 0; display: flex; align-items: center; gap: 6px; background: #FFF4EA; border-radius: 16px; padding: 0 6px 0 12px; box-shadow: inset 0 0 0 2px #F1DCCB; }
.search svg { width: 20px; height: 20px; color: var(--ink2); flex: 0 0 auto; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); height: 46px; }
.search input::-webkit-search-cancel-button { display: none; }
.search:focus-within { box-shadow: inset 0 0 0 3px var(--pink); background: #fff; }
.search button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #F1DCCB; color: var(--ink); font-size: 20px; font-weight: 900; display: none; }
.search.has button { display: grid; place-items: center; }
.tabs { flex: 0 0 auto; display: flex; gap: 6px; padding: 10px 12px 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: 1 1 0; min-width: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 58px; padding: 4px 2px 5px;
  border: 0; border-radius: 16px; background: #fff; font-size: 14px; font-weight: 900; color: var(--ink2); line-height: 1.1;
  box-shadow: inset 0 0 0 2px #F1DCCB, 0 3px 0 #F1DCCB;
}
.tab .ico { width: 30px; height: 30px; }
.tab small { position: absolute; top: 3px; right: 5px; font-size: 10px; color: #BFA393; }
.tab.on { background: var(--c, var(--pink)); color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.tab.on small { color: rgba(255,255,255,.85); }
.search.has ~ .tabs .tab.on { background: #fff; color: var(--ink2); box-shadow: inset 0 0 0 2px #F1DCCB, 0 3px 0 #F1DCCB; }
.grid-wrap { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 10px 14px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.grid-note { margin: 4px 4px 6px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.tile {
  position: relative; border: 0; border-radius: 18px; background: #fff; padding: 6px 4px 8px; min-height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  box-shadow: inset 0 0 0 2px #F5E6DA, 0 4px 0 #F1DCCB;
  font-size: 13px; font-weight: 800; line-height: 1.2; text-align: center; color: var(--ink);
  transition: transform .1s;
  animation: tileIn .3s both;
}
.tile .ico { width: 50px; height: 50px; transition: transform .2s; }
.tile:active { transform: scale(.93); }
.tile:active .ico { transform: scale(1.12) rotate(-6deg); }
.tile .cnt {
  position: absolute; top: -4px; right: -2px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px;
  background: var(--pink); color: #fff; font-size: 14px; font-weight: 900; display: grid; place-items: center;
  box-shadow: 0 2px 0 var(--pink-d), 0 0 0 2px #fff;
}
.tile.has { box-shadow: inset 0 0 0 3px var(--pink), 0 4px 0 #F6B9CD; background: #FFF7FA; }
.tile .cat { font-size: 10px; color: #BFA393; font-weight: 700; }
@keyframes tileIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }

/* ---------- 調校面板 ---------- */
.panel-set { overflow-y: auto; padding: 10px 12px 16px; gap: 10px; }
.set-group { background: #fff; border-radius: 20px; padding: 10px 10px 12px; box-shadow: inset 0 0 0 2px #F5E6DA, 0 4px 0 #F1DCCB; }
.set-group h3 { margin: 0 0 6px 4px; font-size: 16px; font-weight: 900; display: flex; align-items: center; gap: 6px; }
.set-group h3 i { font-style: normal; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  flex: 1 0 auto; min-width: 60px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 16px;
  background: #FFF4EA; font-size: 16px; font-weight: 900; color: var(--ink2);
  box-shadow: inset 0 0 0 2px #F1DCCB; transition: transform .12s, background .2s;
}
.pill small { display: block; font-size: 11px; font-weight: 700; opacity: .75; }
.pill.on { background: linear-gradient(#FF9DBE, var(--pink)); color: #fff; box-shadow: 0 4px 0 var(--pink-d); transform: translateY(-2px); }
.pill:active { transform: scale(.95); }
.weird { min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.weird span { background: #FFF0F5; color: var(--pink-d); border-radius: 14px; padding: 8px 12px; font-weight: 800; font-size: 14px; animation: pop .3s; }

/* ---------- 製作 ---------- */
#scr-make { background: var(--cream); }
.make-scene { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; touch-action: none; }
.make-scene .counter { height: 22%; }
.hint {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 8;
  background: var(--paper); border-radius: 20px; padding: 10px 18px 12px; text-align: center; min-width: 230px;
  box-shadow: 0 5px 0 #EBD5C3, 0 10px 24px rgba(90, 52, 36, .1);
}
.hint b { display: block; font-size: 22px; font-weight: 900; color: var(--pink-d); }
.hint span { display: block; font-size: 14px; font-weight: 700; color: var(--ink2); }
.hint .progress { height: 12px; border-radius: 8px; background: #F2E3D6; margin-top: 8px; overflow: hidden; }
.hint .progress i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--mint), var(--yellow), var(--pink)); transition: width .15s; }
.hint.flash { animation: pop .35s; }

.shaker { position: absolute; left: 50%; top: 54%; height: 54%; aspect-ratio: 160 / 290; transform: translate(-50%, -50%); z-index: 5; transition: left .6s cubic-bezier(.5,1.6,.5,1), top .6s cubic-bezier(.5,1.4,.5,1), transform .6s cubic-bezier(.5,1.4,.5,1), opacity .4s; }
.shaker-inner { width: 100%; height: 100%; will-change: transform; }
.shaker svg { width: 100%; height: 100%; overflow: visible; }
.shaker.pour { left: 67%; top: 27%; height: 32%; transform: translate(-50%, -50%) rotate(-118deg); }
.shaker.away { left: 120%; top: 20%; opacity: 0; }
.shaker.wiggle .shaker-inner { animation: wiggle .6s ease-in-out infinite; }
@keyframes wiggle { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
#shkCap { transition: transform .4s, opacity .4s; }
.shaker.pour #shkCap { transform: translateY(-60px); opacity: 0; }

.make-cup { position: absolute; left: 50%; bottom: 7%; height: 57%; aspect-ratio: 220 / 340; transform: translate(-50%, 30px); opacity: 0; z-index: 4; transition: transform .5s cubic-bezier(.4,1.6,.5,1), opacity .4s; }
.make-cup.show { transform: translate(-50%, 0); opacity: 1; }
.make-cup svg { width: 100%; height: 100%; overflow: visible; }

.stream { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; overflow: visible; }
.stream path { fill: none; stroke-linecap: round; opacity: 0; transition: opacity .15s; }
.stream.on path { opacity: 1; }
#streamPath { stroke-width: 12; }
#streamHi { stroke: #fff; stroke-width: 3; stroke-dasharray: 10 18; animation: flow .4s linear infinite; opacity: 0; }
.stream.on #streamHi { opacity: .6; }
@keyframes flow { to { stroke-dashoffset: -28; } }

.sealer { position: absolute; left: 50%; top: 120px; width: 60%; max-width: 250px; transform: translate(-50%, -40px); opacity: 0; z-index: 9; transition: transform .5s cubic-bezier(.4,1.5,.5,1), opacity .3s; pointer-events: none; }
.sealer.show { transform: translate(-50%, 0); opacity: 1; }
.sealer-arm { width: 22px; height: 14px; margin: 0 auto; background: linear-gradient(90deg, #9AA4AE, #F4F7FA, #7F8A95); }
.sealer-head { position: relative; height: 58px; border-radius: 22px; background: linear-gradient(#FFB3CB, var(--pink)); box-shadow: 0 6px 0 var(--pink-d), inset 0 4px 0 rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-weight: 900; font-size: 18px; text-shadow: 0 2px 0 rgba(200,50,100,.4); }
.sealer-head i { width: 18px; height: 18px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,255,255,.6); }
.sealer.hot .sealer-head i { background: #FF4D4D; box-shadow: 0 0 12px 4px #FF8A8A; }
.sealer-plate { width: 84%; height: 14px; margin: 0 auto; border-radius: 0 0 10px 10px; background: linear-gradient(90deg, #9AA4AE, #F4F7FA, #7F8A95); }
.sealer.press { transition: transform .22s cubic-bezier(.6,0,.9,.5); }

.straw-drag { position: absolute; left: 50%; top: 12%; width: 22px; height: 30%; transform: translateX(-50%) rotate(14deg); z-index: 9; opacity: 0; transition: opacity .3s; pointer-events: none; }
.straw-drag i { display: block; width: 100%; height: 100%; border-radius: 12px; background: linear-gradient(90deg, #E85A8A, #FF9DBE 30%, #FF7EA8 60%, #D94A7A); box-shadow: 0 6px 12px rgba(90,52,36,.2); }
.straw-drag::before { content: ""; position: absolute; left: 50%; top: -6px; width: 22px; height: 10px; border-radius: 50%; background: #C94A76; transform: translateX(-50%); }
.straw-drag.show { opacity: 1; }
.straw-drag.stab { transition: transform .25s cubic-bezier(.6,0,.9,.6), opacity .2s .25s; }

.swipe-guide { position: absolute; right: 7%; top: 50%; transform: translateY(-50%); z-index: 8; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; opacity: 0; transition: opacity .3s; }
.swipe-guide.show { opacity: 1; }
.swipe-guide .arr { font-size: 22px; color: var(--pink); animation: blink 1s infinite; text-shadow: 0 2px 0 #fff; }
.swipe-guide .arr.down { animation-delay: .5s; }
.swipe-guide .finger { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.9); border: 4px solid var(--pink); box-shadow: 0 0 0 8px rgba(255,126,168,.25); animation: fingerUD 1s ease-in-out infinite; }
.swipe-guide.down .finger { animation: fingerD 1.1s ease-in infinite; }
.swipe-guide.down .arr.up { display: none; }
@keyframes fingerUD { 0%, 100% { transform: translateY(-34px); } 50% { transform: translateY(34px); } }
@keyframes fingerD { 0% { transform: translateY(-40px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
@keyframes blink { 50% { opacity: .2; } }
.combo { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); z-index: 9; font-size: 34px; font-weight: 900; color: #fff; -webkit-text-stroke: 1.5px var(--pink-d); text-shadow: 0 4px 0 var(--pink-d); pointer-events: none; white-space: nowrap; }
.combo.go { animation: comboPop .6s ease-out forwards; }
@keyframes comboPop { 0% { transform: translate(-50%, 10px) scale(.6); opacity: 0; } 30% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -30px) scale(1); opacity: 0; } }
.touch-layer { position: absolute; inset: 0; z-index: 7; touch-action: none; }
.make-actions { flex: 0 0 auto; padding: 10px 14px calc(6px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; background: linear-gradient(#FFF4EA, #FFEBDD); border-top: 2px solid var(--line); }
.make-actions .btn { width: 100%; max-width: 420px; }
.make-actions .btn.hidden { visibility: hidden; }
#btnAction.holding { animation: pulse .5s infinite; }
@keyframes pulse { 50% { filter: brightness(1.12); } }

/* ---------- 出品 ---------- */
#scr-result { overflow-y: auto; -webkit-overflow-scrolling: touch; background: linear-gradient(#FFE0EA, var(--cream) 380px); }
.result-hero { position: relative; flex: 0 0 auto; height: clamp(280px, 46dvh, 420px); overflow: hidden; }
.rays {
  position: absolute; left: 50%; top: 52%; width: 760px; height: 760px; margin: -380px 0 0 -380px;
  background: repeating-conic-gradient(rgba(255,255,255,.7) 0 10deg, transparent 10deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 60%); mask: radial-gradient(circle, #000 18%, transparent 60%);
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.result-cup { position: absolute; left: 50%; bottom: 4%; height: 92%; aspect-ratio: 220 / 340; transform: translateX(-50%); }
.result-cup svg { width: 100%; height: 100%; overflow: visible; }
.result-cup.enter { animation: hero 1s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes hero { from { transform: translateX(-50%) translateY(60px) scale(.6) rotate(-10deg); opacity: 0; } }
.result-cup.idle svg { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(2deg); } }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(480px) rotate(720deg); opacity: 0; } }
.result-card { position: relative; margin: -24px 12px 0; padding: 16px 16px calc(24px + var(--safe-b)); background: var(--paper); border-radius: 28px; box-shadow: 0 -4px 20px rgba(90,52,36,.08), 0 6px 0 #F1DCCB; z-index: 2; }
.r-kicker { margin: 0; text-align: center; font-size: 13px; letter-spacing: 3px; font-weight: 900; color: var(--mint-d); }
#rName { margin: 4px 0 12px; text-align: center; font-size: clamp(22px, 6.4vw, 30px); line-height: 1.25; font-weight: 900; color: var(--ink); word-break: break-word; }
.r-score { background: #FFF4EA; border-radius: 18px; padding: 10px 14px; }
.r-score-top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 900; }
.r-score-top b { font-size: 30px; color: var(--pink-d); }
.r-score-top b::after { content: "%"; font-size: 16px; }
.r-bar { height: 14px; border-radius: 8px; background: #F2E3D6; overflow: hidden; margin: 4px 0 6px; }
.r-bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--mint), var(--yellow), var(--pink)); transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.r-rank { display: flex; justify-content: space-between; align-items: center; font-weight: 900; }
.r-rank span { color: var(--yellow-d); font-size: 20px; letter-spacing: 2px; }
.r-rank em { font-style: normal; background: var(--pink); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 14px; }
.r-comment { margin-top: 14px; background: #fff; border-radius: 20px; padding: 12px 14px; box-shadow: inset 0 0 0 2px #FFD6E3; position: relative; }
.r-comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.r-comment-head b { flex: 1; color: var(--pink-d); font-size: 16px; }
.chef { width: 34px; height: 34px; border-radius: 50%; background: #FFE8D6; position: relative; box-shadow: inset 0 0 0 2px #F1DCCB; }
.chef::before { content: ""; position: absolute; left: 4px; right: 4px; top: -10px; height: 16px; background: #fff; border-radius: 10px 10px 4px 4px; box-shadow: 0 0 0 2px #F1DCCB; }
.chef::after { content: "‿"; position: absolute; inset: 8px 0 0; text-align: center; font-weight: 900; color: var(--ink); font-size: 14px; }
#rComment p { margin: 6px 0; font-size: 16px; line-height: 1.6; font-weight: 700; animation: fadeUp .4s both; }
#rComment p::before { content: "「"; color: var(--pink); }
#rComment p::after { content: "」"; color: var(--pink); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.r-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.r-specs span { background: #E9FAF5; color: #17836B; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 800; }
.r-specs span.warn { background: #FFF0F5; color: var(--pink-d); }
.r-h3 { margin: 18px 0 8px; font-size: 17px; font-weight: 900; }
.r-h3 small { font-size: 12px; color: var(--ink2); font-weight: 600; }
.r-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.r-list li { display: flex; align-items: center; gap: 6px; background: #FFF8F1; border-radius: 14px; padding: 4px 8px 4px 4px; font-weight: 800; font-size: 14px; }
.r-list .ico { width: 34px; height: 34px; flex: 0 0 34px; }
.r-list li span { flex: 1; min-width: 0; }
.r-list li em { font-style: normal; color: var(--pink-d); }
.r-list .empty { grid-column: 1 / -1; color: var(--ink2); justify-content: center; padding: 12px; }
.r-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; align-items: stretch; }
.r-actions-row { display: flex; gap: 10px; }
.r-actions-row .btn { flex: 1; padding: 0 10px; }
.r-actions .link-btn { align-self: center; }
.history { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; }
.history .h-item { flex: 0 0 100px; background: #fff; border-radius: 16px; padding: 4px 4px 8px; box-shadow: inset 0 0 0 2px #F5E6DA; text-align: center; font-size: 12px; font-weight: 800; line-height: 1.25; }
.history .h-item svg { width: 100%; height: 100px; }
.history .h-item b { color: var(--pink-d); }

/* ---------- 飛入動畫 / Toast ---------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
#fx .fly { position: fixed; left: 0; top: 0; width: 54px; height: 54px; will-change: transform; }
#fx .fly svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 6px rgba(90,52,36,.25)); }
#fx .plus { position: fixed; left: 0; top: 0; font-size: 22px; font-weight: 900; color: var(--pink-d); text-shadow: 0 2px 0 #fff, 0 0 6px #fff; }
#fx .splash { position: fixed; width: 10px; height: 10px; border-radius: 50%; }
#toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 120;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 800; font-size: 15px;
  opacity: 0; pointer-events: none; transition: all .3s; max-width: 90vw; text-align: center;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 杯 SVG 動畫 ---------- */
.cupview { overflow: visible; }
.cupview.bump { animation: cupBump .45s cubic-bezier(.3,1.8,.5,1); transform-origin: 50% 95%; }
@keyframes cupBump { 30% { transform: scale(1.06, .94); } 60% { transform: scale(.97, 1.04); } }
.ice-bob { animation: iceBob 2.8s ease-in-out infinite; }
@keyframes iceBob { 50% { transform: translateY(-3px) rotate(4deg); } }
.steam-p { animation: steam 2.2s ease-out infinite; opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes steam { 0% { opacity: 0; transform: translateY(10px) scaleY(.6); } 30% { opacity: .75; } 100% { opacity: 0; transform: translateY(-26px) scaleY(1.1); } }
.spark { animation: blink 1.8s ease-in-out infinite; }
.drip { transform-box: fill-box; transform-origin: 50% 0; animation: drip 2s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(.3); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1.05); } }
.cupview.drop-in .c-tops, .cupview.drop-in .c-ices { animation: dropIn .7s cubic-bezier(.3,1.5,.5,1) both; }
.cupview.drop-in .c-ices { animation-delay: .25s; }
@keyframes dropIn { from { transform: translateY(-170px); opacity: 0; } 40% { opacity: 1; } }
.cupview .c-seal { transition: opacity .2s; }

@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- 桌面版 ---------- */
@media (min-width: 900px) {
  #app { max-width: 1120px; height: min(100dvh, 860px); margin-top: max(0px, calc((100dvh - 860px) / 2)); border-radius: 0; }
  @supports (height: 100dvh) { #app { border-radius: 28px; } }
  .steps li { font-size: 13px; }
  .topbar { padding-left: 18px; padding-right: 18px; }
  .steps { max-width: 620px; margin: 0 auto; }
  #scr-build { flex-direction: row; }
  #scr-build .stage { flex: 1 1 52%; height: 100%; }
  #scr-build .side { flex: 1 1 48%; margin: 0; border-radius: 0; box-shadow: -6px 0 20px rgba(90,52,36,.06); }
  .stage-cup { height: 72%; bottom: 10%; }
  .stage .counter { height: 24%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .cup-grid { grid-template-columns: repeat(4, 1fr); max-width: 980px; margin: 0 auto; width: 100%; padding-top: 30px; }
  .cup-card svg { height: 300px; }
  #scr-result { flex-direction: row; overflow: hidden; }
  .result-hero { flex: 1 1 48%; height: 100%; }
  .result-cup { height: 78%; bottom: 10%; }
  .result-card { flex: 1 1 52%; margin: 0; border-radius: 0; overflow-y: auto; }
  .navbar { justify-content: flex-end; }
  .navbar .btn-next { flex: 0 0 360px; }
  .make-scene .shaker { height: 58%; }
  #toast { bottom: 110px; }
  .floaters { inset: -10% -90%; }
}
@media (max-height: 720px) {
  .stage { flex-basis: clamp(160px, 26dvh, 240px); }
  .board, .shelf { transform: scale(.82); transform-origin: top left; }
  .shelf { transform-origin: top right; }
  .tray { padding: 6px 10px 2px; }
  .tray-head { font-size: 13px; }
  .tray-list { min-height: 46px; padding: 4px 2px; }
  .chip { font-size: 13px; }
  .chip .ico { width: 24px; height: 24px; }
  .chip button { width: 30px; height: 30px; font-size: 18px; }
  .search { margin-top: 6px; }
  .search input { height: 40px; }
  .tabs { padding: 6px 12px 4px; }
  .tab { min-height: 50px; font-size: 13px; }
  .tab .ico { width: 24px; height: 24px; }
  .grid-note { margin: 2px 4px 4px; font-size: 12px; }
  .navbar { padding-top: 8px; padding-bottom: calc(8px + var(--safe-b)); }
  .navbar .btn { min-height: 48px; }
  .meter { bottom: 22px; }
  .stage-badges { top: 62px; }
}
@media (max-height: 640px) {
  .steps span { display: none; }
  .steps b { width: 28px; height: 28px; }
  .steps::before { top: 12px; }
  .tile { min-height: 84px; }
  .tile .ico { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* =========================================================
   新搖杯機制：計時、時間軸、即時表現、8 字指引、特效
   ========================================================= */
.hint { min-width: min(300px, 86%); }
.hint .timer { position: absolute; right: 14px; top: 10px; font-style: normal; font-weight: 900; font-size: 15px; color: var(--ink2); background: #FFF0E4; border-radius: 999px; padding: 2px 10px; display: none; font-variant-numeric: tabular-nums; }
.timeline { display: none; position: relative; margin-top: 8px; height: 26px; border-radius: 13px; overflow: hidden; background: #F2E3D6; }
.timeline span { position: relative; z-index: 1; float: left; height: 100%; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #B79B8A; border-right: 2px solid #fff; transition: background .3s, color .3s; }
.timeline span:nth-child(1), .timeline span:nth-child(2) { width: 37.5%; }
.timeline span:nth-child(3) { width: 25%; border-right: 0; }
.timeline span.on { background: var(--pink); color: #fff; }
.timeline span.done { background: #BFEDE1; color: #17836B; }
.timeline .head { position: absolute; z-index: 2; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--ink); border-radius: 2px; box-shadow: 0 0 0 2px #fff; }
.make-scene.shaking .hint .progress { display: none; }
.make-scene.shaking .hint .timeline, .make-scene.shaking .hint .timer { display: block; }
.make-scene.shaking .hint { text-align: left; padding-right: 74px; }
.make-scene.shaking .hint b, .make-scene.shaking .hint span { text-align: left; }
.make-scene.shaking .timeline span { text-align: center; }

.shake-hud {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 8; pointer-events: none;
  display: none; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: center;
  background: rgba(255, 253, 248, .94); border-radius: 18px; padding: 8px 10px; box-shadow: 0 4px 0 #EBD5C3;
}
.make-scene.shaking .shake-hud { display: grid; }
.hud-m span { display: block; font-size: 12px; font-weight: 900; color: var(--ink2); margin-bottom: 3px; }
.hud-bar { position: relative; height: 10px; border-radius: 6px; background: #F2E3D6; overflow: hidden; }
.hud-bar i { position: relative; z-index: 1; display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--mint), var(--yellow)); transition: width .12s linear; }
.hud-bar.power i { background: linear-gradient(90deg, var(--yellow), var(--pink)); opacity: .9; }
.hud-bar b { position: absolute; top: 0; bottom: 0; background: rgba(79, 209, 178, .35); border-left: 2px solid var(--mint-d); border-right: 2px solid var(--mint-d); display: none; }
.hud-bar b.slow { display: block; left: 11%; width: 45%; }
.hud-bar b.fast { display: block; left: 75%; width: 25%; }
.hud-mix { text-align: center; min-width: 54px; }
.hud-mix small { display: block; font-size: 11px; font-weight: 800; color: var(--ink2); }
.hud-mix b { font-size: 20px; font-weight: 900; color: var(--pink-d); font-variant-numeric: tabular-nums; }

.swipe-guide.lr { top: auto; bottom: 30%; right: auto; left: 50%; transform: translateX(-50%); flex-direction: row; gap: 10px; }
.swipe-guide.lr .arr.up { transform: rotate(-90deg); }
.swipe-guide.lr .arr.down { transform: rotate(-90deg); }
.swipe-guide.lr .finger { animation: fingerLR 1.1s ease-in-out infinite; }
.swipe-guide .guide-label { display: none; }
.swipe-guide.lr .guide-label { display: block; position: absolute; top: 58px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--pink); color: #fff; font-size: 14px; padding: 4px 12px; border-radius: 999px; box-shadow: 0 3px 0 var(--pink-d); }
@keyframes fingerLR { 0%, 100% { transform: translateX(-40px); } 50% { transform: translateX(40px); } }

.guide8, .trail { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; overflow: visible; }
.guide8 { opacity: 0; transition: opacity .3s; }
.guide8.show { opacity: 1; }
#g8path { fill: none; stroke: var(--pink); stroke-width: 5; stroke-dasharray: 10 10; stroke-linecap: round; opacity: .7; animation: flow 1s linear infinite; }
.g8dot { fill: #fff; stroke: var(--pink); stroke-width: 4; }
#trailLine { fill: none; stroke: rgba(255, 126, 168, .55); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }

#shakerSvg { transform-origin: 50% 60%; }
#shakerSvg.squash { animation: squash .22s ease-out; }
@keyframes squash { 40% { transform: scale(1.08, .9) translateY(6px); } }
#shakerSvg.spin { animation: spin360 .9s cubic-bezier(.4,1.4,.5,1); }
@keyframes spin360 { to { transform: rotate(360deg); } }
.make-scene.quake { animation: quake .6s ease-out; }
@keyframes quake { 10%, 50%, 90% { transform: translate(-6px, 3px); } 30%, 70% { transform: translate(6px, -3px); } }
.make-scene.cosmic .wall { animation: cosmic 2.2s linear; }
@keyframes cosmic { 0% { filter: hue-rotate(0) saturate(1); } 50% { filter: hue-rotate(180deg) saturate(1.8); } 100% { filter: hue-rotate(360deg) saturate(1); } }

.btn.ghost { --bg: #fff; --sh: #EBD5C3; --fg: var(--ink2); text-shadow: none; font-size: 16px; }

.fx-layer { position: absolute; inset: 0; z-index: 10; pointer-events: none; overflow: hidden; }
.fx-spark { position: absolute; font-size: 22px; font-style: normal; text-shadow: 0 0 6px rgba(255,255,255,.9); }
.fx-icon { position: absolute; width: 48px; height: 48px; }
.fx-icon svg { width: 100%; height: 100%; }
.fx-ring { position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: conic-gradient(#FF7EA8, #FFD15C, #4FD1B2, #9BD8FF, #B993D6, #FF7EA8); -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); animation: ring 1s ease-out forwards; }
@keyframes ring { to { transform: scale(14); opacity: 0; } }
.fx-flash { position: absolute; inset: 0; background: #fff; animation: flash .5s ease-out forwards; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }
.fx-star { position: absolute; top: -30px; font-size: 26px; font-style: normal; color: #FFD15C; text-shadow: 0 0 8px #fff; animation: starfall 1.6s ease-in forwards; }
@keyframes starfall { to { transform: translateY(110vh) rotate(540deg); } }
.fx-banner { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); white-space: nowrap; font-size: 38px; font-weight: 900; color: #fff; -webkit-text-stroke: 2px var(--pink-d); text-shadow: 0 5px 0 var(--pink-d), 0 10px 20px rgba(224, 83, 138, .35); animation: banner 1.6s cubic-bezier(.3,1.6,.5,1) forwards; }
.fx-banner.t2 { font-size: 46px; }
.fx-banner.t3 { font-size: clamp(30px, 9vw, 52px); color: #FFE07A; -webkit-text-stroke: 2px #8E6BD6; text-shadow: 0 5px 0 #8E6BD6, 0 0 30px #fff; }
@keyframes banner { 0% { transform: translate(-50%, -50%) scale(.2) rotate(-12deg); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(1.15) rotate(3deg); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1); opacity: 0; } }

.shake-card {
  position: absolute; left: 50%; top: 50%; z-index: 11; width: min(88%, 380px);
  transform: translate(-50%, -40%) scale(.9); opacity: 0; visibility: hidden; transition: all .35s cubic-bezier(.3,1.5,.5,1);
  background: var(--paper); border-radius: 26px; padding: 16px 18px 12px; text-align: center;
  box-shadow: 0 8px 0 #EBD5C3, 0 24px 60px rgba(90, 52, 36, .25); border: 4px solid #fff; outline: 3px dashed #FFC1D4; outline-offset: -11px;
}
.shake-card.show { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; pointer-events: auto; }
.sc-kicker { margin: 0; font-size: 12px; letter-spacing: 3px; font-weight: 900; color: var(--mint-d); }
.shake-card h3 { margin: 2px 0 10px; font-size: 24px; font-weight: 900; color: var(--pink-d); }
.sc-bars { display: flex; flex-direction: column; gap: 7px; }
.sc-row { display: grid; grid-template-columns: 52px 1fr 46px; gap: 8px; align-items: center; font-weight: 900; font-size: 14px; text-align: left; }
.sc-row b { text-align: right; color: var(--pink-d); font-variant-numeric: tabular-nums; }
.sc-bar { height: 12px; border-radius: 7px; background: #F2E3D6; overflow: hidden; }
.sc-bar i { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, var(--mint), var(--yellow), var(--pink)); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.sc-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.sc-badges:empty { display: none; }
.sc-badges span { background: #FFF0F5; color: var(--pink-d); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 900; animation: pop .35s both; }
.sc-comment { margin: 10px 0 4px; font-size: 16px; font-weight: 800; line-height: 1.5; }
.sc-tap { color: #BFA393; font-weight: 700; font-size: 12px; }

.r-shake { margin-top: 14px; background: #F2FBF8; border-radius: 20px; padding: 12px 14px; box-shadow: inset 0 0 0 2px #CDEFE5; }
.r-shake-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.r-shake-head b { font-size: 16px; color: #17836B; }
.r-shake-head em { font-style: normal; font-weight: 900; color: #fff; background: var(--mint-d); border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.r-shake .sc-badges { justify-content: flex-start; }
#rShakeComment p { margin: 8px 0 0; font-size: 15px; font-weight: 700; line-height: 1.55; animation: fadeUp .4s both; }
#rShakeComment p::before { content: "🥤 "; }

.result-cup.orbit .c-tops { animation: orbit 2.2s ease-in-out infinite; }
@keyframes orbit { 0%, 100% { transform: translateX(-14px); } 50% { transform: translateX(14px); } }
.result-hero .galaxy { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; border: 6px dotted rgba(255, 209, 92, .9); box-shadow: 0 0 0 14px rgba(255, 126, 168, .15); animation: spin 6s linear infinite; }
.result-hero .note { position: absolute; bottom: 20%; font-size: 30px; font-style: normal; font-weight: 900; color: var(--mint-d); text-shadow: 0 2px 0 #fff; animation: noteUp 3.2s ease-out infinite; opacity: 0; }
@keyframes noteUp { 0% { transform: translateY(0) rotate(-10deg); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-220px) rotate(15deg); opacity: 0; } }

@media (max-height: 720px) {
  .shake-hud { padding: 6px 8px; gap: 6px; }
  .hud-mix b { font-size: 17px; }
  .fx-banner { font-size: 30px; }
}

/* =========================================================
   挑戰、突發狀況、回饋、招式圖鑑
   ========================================================= */
.hint-ch { display: none; margin-top: 7px; font-size: 12px; font-weight: 800; color: var(--ink2); line-height: 1.35; }
.make-scene.shaking .hint-ch { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.hint-ch span { background: #FFF4EA; border-radius: 999px; padding: 2px 9px; }
.hint-ch b { color: var(--pink-d); }
.hint-ch em { font-style: normal; background: #FFF3C4; color: #9A6A00; border-radius: 999px; padding: 2px 9px; }
.weird span.ch { background: #EAF8F3; color: #17836B; }

.event-pop {
  position: absolute; left: 50%; top: 140px; z-index: 9; width: min(90%, 360px); pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #FFF6D6; border-radius: 20px; border: 3px solid var(--yellow-d); box-shadow: 0 6px 0 rgba(227, 169, 42, .5), 0 12px 30px rgba(90, 52, 36, .2);
  transform: translate(-50%, -16px) scale(.85); opacity: 0; transition: transform .3s cubic-bezier(.3,1.6,.5,1), opacity .25s;
}
.event-pop.show { transform: translate(-50%, 0) scale(1); opacity: 1; animation: evShake .5s .1s; }
@keyframes evShake { 20%, 60% { margin-left: -5px; } 40%, 80% { margin-left: 5px; } }
.event-pop.ok { background: #E3FAF2; border-color: var(--mint-d); box-shadow: 0 6px 0 rgba(35, 168, 138, .4), 0 12px 30px rgba(90, 52, 36, .15); }
.event-pop.fail { background: #FFEAF1; border-color: var(--pink-d); box-shadow: 0 6px 0 rgba(224, 83, 138, .4), 0 12px 30px rgba(90, 52, 36, .15); }
.ev-icon { font-style: normal; font-size: 34px; line-height: 1; flex: 0 0 auto; animation: wiggle .5s infinite; }
.event-pop.ok .ev-icon, .event-pop.fail .ev-icon { animation: none; }
.ev-body { flex: 1; min-width: 0; }
.ev-body b { display: block; font-size: 18px; font-weight: 900; color: var(--ink); }
.ev-body span { display: block; font-size: 13px; font-weight: 800; color: var(--ink2); }
.ev-bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.8); margin-top: 5px; overflow: hidden; }
.ev-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--mint), var(--mint-d)); transition: width .1s; }
.ev-time { flex: 0 0 8px; align-self: stretch; border-radius: 4px; background: rgba(255,255,255,.8); display: flex; align-items: flex-end; overflow: hidden; }
.ev-time i { display: block; width: 100%; height: 100%; background: var(--pink); border-radius: 4px; transition: height .1s; }
.event-pop.ok .ev-time, .event-pop.fail .ev-time, .event-pop.ok .ev-bar, .event-pop.fail .ev-bar { visibility: hidden; }
.fx-fail { position: absolute; font-style: normal; font-size: 24px; }
.fx-fail.bubble { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, rgba(235, 248, 255, .85) 50%, rgba(190, 225, 255, .6)); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.95); }
#shakerSvg.dizzy { animation: dizzy .9s ease-in-out; }
@keyframes dizzy { 20% { transform: rotate(-10deg) scale(1.03, .97); } 45% { transform: rotate(8deg); } 70% { transform: rotate(-5deg); } }

.shake-card { max-height: calc(100% - 20px); overflow-y: auto; }
.sc-ch { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.sc-ch:empty { display: none; }
.sc-ch span { border-radius: 12px; padding: 6px 10px; font-size: 13px; font-weight: 800; text-align: left; }
.sc-ch span.ok { background: #E3FAF2; color: #17836B; }
.sc-ch span.no { background: #FFF4EA; color: var(--ink2); }
.sc-ch b { margin: 0 2px; }
.sc-new { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.sc-new:empty { display: none; }
.sc-new span { background: linear-gradient(90deg, #FFE07A, #FFB3CB); color: var(--ink); border-radius: 12px; padding: 7px 10px; font-weight: 900; font-size: 14px; animation: newMove 1.2s cubic-bezier(.3,1.6,.5,1) both; box-shadow: 0 3px 0 rgba(224, 83, 138, .35); }
@keyframes newMove { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 50% { transform: scale(1.1) rotate(2deg); opacity: 1; } 100% { transform: scale(1); } }
.sc-tip { margin: 6px 0 0; padding: 8px 10px; border-radius: 12px; background: #EEF6FF; color: #2C5F8A; font-size: 14px; font-weight: 800; line-height: 1.5; text-align: left; }
.sc-tip:empty { display: none; }
.sc-best { margin: 6px 0 4px; font-size: 13px; font-weight: 800; color: #9A6A00; }
.sc-best:empty { display: none; }
.sc-best b { color: var(--pink-d); }

.r-moves-now { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.r-moves-now:empty { display: none; }
.r-moves-now small { width: 100%; font-weight: 800; color: var(--ink2); }
.r-moves-now span { background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 900; box-shadow: inset 0 0 0 2px #CDEFE5; }
.r-moves-now span.new { box-shadow: inset 0 0 0 2px var(--yellow-d); background: #FFF6D6; }
.r-moves-now span b { color: #fff; background: var(--pink); border-radius: 6px; padding: 0 5px; font-size: 11px; }
#rTip, #rBest { text-align: left; }

.move-book { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mv { background: #F6F0EA; border-radius: 16px; padding: 10px; display: grid; grid-template-columns: 38px 1fr; gap: 0 8px; align-items: center; color: #A89082; }
.mv i { grid-row: span 3; font-style: normal; font-size: 26px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #EADFD4; color: #B9A698; font-weight: 900; }
.mv b { font-size: 14px; font-weight: 900; }
.mv small { font-size: 11px; font-weight: 700; line-height: 1.35; }
.mv em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--mint-d); }
.mv.on { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px #FFD6E3, 0 3px 0 #F1DCCB; }
.mv.on i { background: linear-gradient(#FFF3C4, #FFD6E3); }

#btnBook { width: min(100%, 360px); min-height: 48px; font-size: 16px; margin-top: -6px; }
.modal { position: fixed; inset: 0; z-index: 130; background: rgba(90, 52, 36, .45); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.show { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-card { width: min(100%, 480px); max-height: 88dvh; overflow-y: auto; background: var(--paper); border-radius: 26px; padding: 14px 14px 18px; box-shadow: 0 8px 0 #EBD5C3; animation: pop .3s; }
.modal-head { display: flex; align-items: center; gap: 8px; }
.modal-head b { font-size: 20px; font-weight: 900; }
.modal-head small { flex: 1; color: var(--ink2); font-weight: 700; }
.modal-sub { margin: 6px 0 12px; font-size: 13px; font-weight: 700; color: var(--ink2); line-height: 1.5; }

/* 招式成品特效 */
.result-hero .tornado { position: absolute; left: 50%; top: 50%; width: 340px; height: 340px; margin: -170px 0 0 -170px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(143, 211, 255, .55) 0 12deg, transparent 12deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 18%, #000 30%, #000 50%, transparent 70%); mask: radial-gradient(circle, transparent 18%, #000 30%, #000 50%, transparent 70%);
  animation: spin 1.6s linear infinite; }
.result-hero .twinkle, .result-hero .bolt, .result-hero .leaf { position: absolute; font-style: normal; }
.result-hero .twinkle { font-size: 22px; color: #FFD15C; text-shadow: 0 0 8px #fff; animation: blink 1.4s ease-in-out infinite; }
.result-hero .bolt { top: 18%; font-size: 54px; filter: drop-shadow(0 0 10px #FFE07A); animation: bolt 1.8s steps(1) infinite; }
.result-hero .bolt.l { left: 10%; } .result-hero .bolt.r { right: 10%; animation-delay: .9s; }
@keyframes bolt { 0%, 12%, 24% { opacity: 1; transform: scale(1.1); } 6%, 18%, 30%, 100% { opacity: 0; transform: scale(.9); } }
.result-hero .pulse { position: absolute; left: 50%; top: 55%; }
.result-hero .pulse i { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; border: 4px solid rgba(79, 209, 178, .7); animation: pulseRing 1.5s ease-out infinite; }
.result-hero .pulse i:nth-child(2) { animation-delay: .5s; } .result-hero .pulse i:nth-child(3) { animation-delay: 1s; }
@keyframes pulseRing { from { transform: scale(.5); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.result-hero .leaf { top: -30px; font-size: 26px; animation: leafFall 4.2s ease-in-out infinite; opacity: 0; }
@keyframes leafFall { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(30px, 200px) rotate(120deg); } 100% { transform: translate(-20px, 420px) rotate(260deg); opacity: 0; } }
.result-cup.zen.idle svg { animation: bob 5s ease-in-out infinite; }
.result-hero .hero-flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(255, 240, 160, .75), transparent 55%); animation: heroFlash 2.4s ease-in-out infinite; }
@keyframes heroFlash { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.result-hero .stamp { position: absolute; right: 6%; top: 10%; z-index: 3; transform: rotate(12deg); border: 4px solid var(--pink-d); color: var(--pink-d); background: rgba(255,255,255,.85); border-radius: 14px; padding: 6px 12px; font-size: 18px; font-weight: 900; text-align: center; line-height: 1.2; animation: stampIn .5s .9s cubic-bezier(.3,1.8,.5,1) both; }
.result-hero .stamp small { display: block; font-size: 12px; }
@keyframes stampIn { from { transform: rotate(12deg) scale(2.4); opacity: 0; } }
.history .h-item i { display: block; font-style: normal; color: var(--mint-d); }
.hint .hint-ch span { display: inline; }
.hint .hint-ch b { display: inline; font-size: inherit; color: var(--pink-d); }
.hint .hint-ch em { position: static; display: inline; }
@media (max-height: 720px) {
  .make-scene.shaking .hint-ch { flex-wrap: nowrap; overflow: hidden; }
  .make-scene.shaking .hint-ch span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; display: block; }
  .make-scene.shaking .hint-ch em { white-space: nowrap; flex: 0 0 auto; }
  .make-scene .shaker:not(.pour):not(.away) { top: 60%; height: 48%; }
  .timeline { margin-top: 6px; height: 22px; }
}
.make-scene.shaking .hint { width: min(92%, 380px); min-width: 0; }
.make-scene.shaking .hint-ch span { min-width: 0; }
.hint-ch .ch-desc { font-style: normal; }
@media (max-height: 720px) { .hint-ch .ch-desc { display: none; } }
.make-scene.shaking .hint .timeline, .make-scene.shaking .hint .hint-ch { margin-right: -58px; }

/* =========================================================
   兩個玩法、客人點單、不可能菜單、分享
   ========================================================= */
#app[data-screen="order"] .navbar, #app[data-screen="shared"] .navbar, #app[data-screen="levels"] .navbar { display: none; }
.title-cup { height: min(30dvh, 260px); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(100%, 420px); }
.mode-card {
  border: 0; border-radius: 24px; padding: 14px 8px 12px; min-height: 118px; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: 0 6px 0 var(--sh), 0 12px 24px rgba(90, 52, 36, .15); transition: transform .1s, box-shadow .1s;
}
.mode-card.free { background: linear-gradient(#FF9DBE, var(--pink)); --sh: var(--pink-d); }
.mode-card.order { background: linear-gradient(#7FE4CB, var(--mint)); --sh: var(--mint-d); }
.mode-card i { font-style: normal; font-size: 36px; line-height: 1.1; filter: drop-shadow(0 3px 0 rgba(0,0,0,.12)); }
.mode-card b { font-size: 21px; font-weight: 900; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.mode-card small { font-size: 12.5px; font-weight: 800; opacity: .92; }
.mode-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--sh); }
.title-links { display: flex; gap: 10px; width: min(100%, 420px); }
.title-links .btn { flex: 1; min-height: 46px; font-size: 15px; padding: 0 8px; }
#btnBook { width: auto; margin: 0; min-height: 46px; font-size: 15px; }

/* 點單畫面 */
#scr-order { background: var(--cream); }
.order-scene { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.order-scene .counter { height: 24%; z-index: 2; }
.awning.small { position: absolute; top: 0; left: 0; right: 0; height: 40px; margin: 0; z-index: 1;
  -webkit-mask: radial-gradient(circle at 20px 40px, transparent 19px, #000 20px) 0 0/40px 100% repeat-x;
          mask: radial-gradient(circle at 20px 40px, transparent 19px, #000 20px) 0 0/40px 100% repeat-x; }
.customer { position: absolute; left: 50%; bottom: 14%; width: min(58vw, 250px, 40dvh); aspect-ratio: 1; transform: translateX(-50%); z-index: 1; }
.customer .avatar { width: 100%; height: 100%; animation: custIdle 2.6s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(90,52,36,.18)); }
.customer.enter { animation: custIn .7s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes custIn { from { transform: translateX(60%); opacity: 0; } }
@keyframes custIdle { 50% { transform: translateY(-5px) rotate(-1.5deg); } }
.cust-name { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); z-index: 3; background: var(--ink); color: #fff; font-weight: 900; padding: 5px 16px; border-radius: 999px; font-size: 16px; }
.bubble {
  position: absolute; left: 50%; top: 52px; transform: translateX(-50%); z-index: 3; width: min(90%, 420px);
  background: #fff; border-radius: 24px; padding: 12px 16px 14px; box-shadow: 0 6px 0 #EBD5C3, 0 12px 30px rgba(90,52,36,.12);
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -14px; width: 28px; height: 28px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 4px; box-shadow: 6px 6px 0 #EBD5C3; z-index: -1; }
.bubble.enter { animation: pop .45s .35s both; }
.bubble small { display: inline-block; background: var(--pink); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 900; }
.bubble p { margin: 6px 0 0; font-size: clamp(18px, 5.2vw, 22px); font-weight: 900; line-height: 1.45; }
.order-panel { flex: 0 0 auto; padding: 12px 14px calc(12px + var(--safe-b)); background: var(--paper); border-top: 2px solid var(--line); }
.order-panel h3 { margin: 0 0 6px; font-size: 16px; font-weight: 900; }
.order-panel h3 small { color: var(--ink2); font-weight: 700; font-size: 12px; }
.focus { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.focus li { background: #FFF4EA; border-radius: 12px; padding: 6px 10px; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.focus li::before { content: "•"; color: var(--pink); font-weight: 900; }
.sw { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px #E6D6C8; vertical-align: middle; margin-left: 4px; }
.order-actions { display: flex; gap: 10px; }
.order-actions .btn-ghost { flex: 0 0 auto; padding: 0 14px; }
.order-actions .btn-big { flex: 1; }

/* 客人要求小貼士 */
.order-chip {
  display: flex; align-items: center; gap: 6px; border: 0; text-align: left; cursor: pointer;
  background: rgba(255,255,255,.96); border-radius: 16px; padding: 4px 10px 4px 4px; box-shadow: 0 3px 0 #EBD5C3;
  font-size: 12.5px; font-weight: 800; color: var(--ink); line-height: 1.3;
}
.order-chip .avatar { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #FFF0E4; }
.order-chip span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.order-chip b { color: var(--pink-d); }
.order-chip.in-cup { margin: 8px 16px 0; }
.order-chip.in-stage { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 5; width: min(70%, 320px); }
#scr-build[data-mode="set"] .order-chip.in-stage { top: 8px; }

/* 出品頁：客人反應 */
.r-cust { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; margin-bottom: 14px; padding: 12px; border-radius: 22px; background: #FFF8EF; box-shadow: inset 0 0 0 2px #FFE0CC; }
.r-cust[data-mood="love"] { background: #FFF0F5; box-shadow: inset 0 0 0 2px #FFC1D4; }
.r-cust[data-mood="bad"] { background: #F3F3F7; }
.r-cust[data-mood="opp"] { background: #F3EEFF; box-shadow: inset 0 0 0 2px #D8C8FF; }
.r-cust-av { position: relative; width: 96px; height: 96px; border-radius: 50%; background: #fff; box-shadow: 0 4px 0 #EBD5C3; }
.r-cust-av .avatar { width: 100%; height: 100%; }
.r-cust-av.react .avatar { animation: react .6s cubic-bezier(.3,1.8,.5,1); }
@keyframes react { 0% { transform: scale(.7) rotate(-8deg); } 60% { transform: scale(1.12) rotate(3deg); } }
.r-cust[data-mood="sip"] .avatar { animation: sip 0.8s ease-in-out infinite; }
@keyframes sip { 50% { transform: translateY(-3px) rotate(4deg); } }
.cust-fx { position: absolute; top: 10px; font-style: normal; font-size: 22px; pointer-events: none; animation: custFx 1.4s ease-out forwards; opacity: 0; }
@keyframes custFx { 0% { transform: translateY(0) scale(.5); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-70px) scale(1.1); opacity: 0; } }
.r-cust-body small { font-weight: 900; color: var(--mint-d); font-size: 13px; }
.r-cust-line { margin: 4px 0 8px; font-size: 16px; font-weight: 900; line-height: 1.5; }
.r-cust-score { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-weight: 900; font-size: 13px; }
.r-cust-score b { font-size: 22px; color: var(--pink-d); min-width: 34px; text-align: right; }
.r-cust-notes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.r-cust-notes span { background: #fff; border-radius: 999px; padding: 3px 9px; font-size: 12.5px; font-weight: 800; display: inline-flex; align-items: center; }
.r-cust-notes span.no { color: #9A8274; }
.r-cust-notes .sw { width: 16px; height: 16px; border-width: 2px; }
.r-cust .sc-tip { margin-top: 8px; }
.r-cust-coins { display: block; margin-top: 6px; font-style: normal; font-weight: 900; color: #9A6A00; font-size: 13px; }

/* 改名 + 分享 */
.r-name-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 12px; }
.r-name-row #rName { margin: 0; }
.r-name-row input { display: none; flex: 1; min-width: 0; font: inherit; font-size: 20px; font-weight: 900; border: 0; border-radius: 14px; padding: 8px 12px; box-shadow: inset 0 0 0 3px var(--pink); color: var(--ink); background: #fff; }
.r-name-row.editing #rName { display: none; }
.r-name-row.editing input { display: block; }
.r-name-row .mini-btn { flex: 0 0 auto; }
.r-share { width: 100%; margin-bottom: 12px; }
.history .h-item { border: 0; cursor: pointer; font-family: inherit; color: var(--ink); }

/* 彈窗：菜單 */
.menu-card { width: min(100%, 560px); }
.menu-h { margin: 14px 0 8px; font-size: 16px; font-weight: 900; }
.menu-h small { font-size: 12px; color: var(--ink2); font-weight: 700; }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.award { display: grid; grid-template-columns: 46px 1fr; gap: 6px; align-items: center; border: 0; text-align: left; background: #fff; border-radius: 16px; padding: 6px 8px 6px 4px; box-shadow: inset 0 0 0 2px #FFE0A8, 0 3px 0 #F1DCCB; font-family: inherit; color: var(--ink); cursor: pointer; min-height: 72px; }
.award svg { width: 46px; height: 66px; }
.award small { display: block; font-size: 11.5px; font-weight: 900; color: #9A6A00; }
.award b { display: block; font-size: 13.5px; font-weight: 900; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.award em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--pink-d); }
.award.empty { box-shadow: inset 0 0 0 2px #EFE5DC; background: #FAF6F2; color: #B9A698; cursor: default; }
.award.empty i { font-style: normal; font-size: 24px; text-align: center; filter: grayscale(1); opacity: .5; }
.menu-list { display: flex; flex-direction: column; gap: 10px; }
.mi { display: grid; grid-template-columns: 64px 1fr; gap: 8px; background: #fff; border-radius: 18px; padding: 8px 10px 10px 6px; box-shadow: inset 0 0 0 2px #F5E6DA, 0 3px 0 #F1DCCB; transition: box-shadow .3s; }
.mi.flash { box-shadow: inset 0 0 0 3px var(--pink), 0 3px 0 #F1DCCB; }
.mi-cup { width: 64px; height: 96px; }
.mi-name { display: flex; align-items: center; gap: 6px; }
.mi-name b { flex: 1; font-size: 16px; font-weight: 900; line-height: 1.3; }
.mi-name input { display: none; flex: 1; min-width: 0; font: inherit; font-size: 15px; font-weight: 800; border: 0; border-radius: 10px; padding: 6px 8px; box-shadow: inset 0 0 0 2px var(--pink); }
.mi-name.editing b { display: none; }
.mi-name.editing input { display: block; }
.mi-meta, .mi-cust { margin: 2px 0 0; font-size: 12px; font-weight: 700; color: var(--ink2); }
.mi-cust { color: var(--mint-d); font-weight: 800; }
.mi details { margin-top: 4px; font-size: 13px; }
.mi summary { cursor: pointer; font-weight: 800; color: var(--ink2); }
.mi-items { margin: 4px 0 0; font-weight: 700; line-height: 1.5; }
.mi-acts { display: flex; gap: 6px; margin-top: 8px; }
.mi-acts .btn { min-height: 40px; font-size: 14px; padding: 0 12px; border-radius: 14px; box-shadow: 0 3px 0 var(--sh); }
.mi-acts .btn-pink { flex: 1; }
.menu-empty { text-align: center; color: var(--ink2); font-weight: 700; padding: 20px; }

/* 彈窗：分享 */
.share-card { width: min(100%, 460px); }
.share-img { position: relative; margin-top: 8px; border-radius: 18px; overflow: hidden; background: #FFF0E4; aspect-ratio: 4 / 5; display: grid; place-items: center; }
.share-img img { width: 100%; height: 100%; object-fit: contain; display: block; -webkit-touch-callout: default; }
.share-img p { color: var(--ink2); font-weight: 800; }
.modal-sub.center { text-align: center; margin: 8px 0; }
.share-btns { display: flex; gap: 8px; }
.share-btns .btn { flex: 1; min-height: 48px; font-size: 15px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.share-link { display: flex; gap: 6px; margin-bottom: 8px; }
.share-link input { flex: 1; min-width: 0; border: 0; border-radius: 12px; padding: 10px; font-size: 13px; background: #FFF4EA; box-shadow: inset 0 0 0 2px #F1DCCB; color: var(--ink2); }
.offscreen { position: fixed; left: -9999px; top: 0; width: 220px; height: 340px; pointer-events: none; }
.offscreen svg { width: 220px; height: 340px; }

/* 分享飲品畫面（用返出品頁樣式） */
#scr-shared { overflow-y: auto; background: linear-gradient(#E3F7F1, var(--cream) 380px); }
#scr-shared .result-card { padding-bottom: calc(24px + var(--safe-b)); }

@media (max-height: 720px) {
  .title-cup { height: min(24dvh, 200px); }
  .sign h1 { font-size: clamp(40px, 12vw, 60px); }
  .mode-card { min-height: 96px; padding: 10px 6px; }
  .mode-card i { font-size: 28px; }
  .mode-card b { font-size: 18px; }
  .bubble { top: 46px; padding: 10px 14px; }
  .bubble p { font-size: 17px; }
  .customer { bottom: 15%; width: min(46vw, 34dvh); }
  .focus li { font-size: 13px; padding: 5px 9px; }
}
@media (min-width: 900px) {
  #scr-shared { flex-direction: row; overflow: hidden; }
  #scr-shared .result-hero { flex: 1 1 48%; height: 100%; }
  #scr-shared .result-card { flex: 1 1 52%; margin: 0; border-radius: 0; overflow-y: auto; }
  #scr-order { flex-direction: row; }
  .order-scene { flex: 1 1 55%; }
  .order-panel { flex: 1 1 45%; display: flex; flex-direction: column; justify-content: center; border-top: 0; border-left: 2px solid var(--line); padding: 24px; }
  .customer { width: min(36vw, 300px, 46dvh); }
  .modes, .title-links { width: 480px; }
}
.bubble.enter { animation: bubbleIn .45s .35s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes bubbleIn { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.order-chip.in-stage { left: 112px; right: 8px; width: auto; transform: none; }

/* 新畫風客人（半身 160×180） */
.customer { aspect-ratio: 160 / 180; bottom: 3%; width: min(60vw, 270px, 46dvh); z-index: 3; }
.cust-name { bottom: 1.5%; z-index: 4; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.r-cust { grid-template-columns: 104px 1fr; }
.r-cust-av { width: 104px; height: 117px; border-radius: 22px; overflow: hidden; background: linear-gradient(#FFF6EC, #FFE6D2); box-shadow: inset 0 0 0 2px #F1DCCB, 0 4px 0 #EBD5C3; }
.r-cust[data-mood="love"] .r-cust-av { background: linear-gradient(#FFF0F6, #FFD3E2); }
.r-cust[data-mood="opp"] .r-cust-av { background: linear-gradient(#F6F0FF, #E2D6FF); }
.r-cust-av .cust-fx { z-index: 2; }
.order-chip .avatar { background: #FFE9DA; }
@media (max-height: 720px) { .customer { bottom: 3%; width: min(48vw, 38dvh); } }
@media (min-width: 900px) { .customer { width: min(34vw, 320px, 52dvh); } }

/* ===== 已選材料：一行緊湊版 + 手機版可捲動 ===== */
#scr-build[data-mode="set"] .ing-head { display: none; }
.ing-head { flex: 0 0 auto; background: var(--paper); border-radius: 26px 26px 0 0; }
.tray { display: flex; align-items: center; gap: 8px; padding: 8px 10px 7px; }
.tray-count {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 46px; height: 42px;
  border-radius: 14px; background: #FFF0E4; box-shadow: inset 0 0 0 2px #F1DCCB; font-size: 12px; font-weight: 900; line-height: 1.05; color: var(--ink2);
}
.tray-count b { font-size: 17px; color: var(--pink-d); }
.tray-count small { font-size: 10px; font-weight: 800; }
.tray-count.pop { animation: pop .35s; }
.tray-list { flex: 1 1 auto; min-width: 0; min-height: 42px; padding: 0 2px; gap: 6px; }
.tray-empty { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
#trayClear { flex: 0 0 auto; padding: 6px 10px; min-height: 34px; }
.chip { padding: 2px 3px 2px 5px; gap: 3px; font-size: 13px; box-shadow: inset 0 0 0 2px #F1DCCB, 0 2px 0 #F1DCCB; }
.chip .ico { width: 26px; height: 26px; }
.chip button { width: 30px; height: 30px; font-size: 18px; }
.ing-head .search { margin-top: 6px; }

@media (max-width: 899px) {
  #scr-build[data-mode="ing"] { display: block; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  #scr-build[data-mode="ing"] .stage { height: clamp(190px, 31dvh, 320px); }
  #scr-build[data-mode="ing"] .side { display: block; min-height: 100%; }
  #scr-build[data-mode="ing"] .ing-head { position: sticky; top: 0; z-index: 6; box-shadow: 0 8px 12px -10px rgba(90, 52, 36, .35); }
  #scr-build[data-mode="ing"] .panel-ing { display: block; }
  #scr-build[data-mode="ing"] .grid-wrap { overflow: visible; padding-bottom: 18px; }
}
@media (max-width: 899px) and (max-height: 720px) {
  #scr-build[data-mode="ing"] .stage { height: clamp(160px, 27dvh, 240px); }
  .tray { padding: 6px 10px 5px; }
  .tray-count { height: 38px; min-width: 42px; }
}

/* 首頁左邊：不可能菜單、招式圖鑑 */
.title-side { position: absolute; left: max(10px, env(safe-area-inset-left)); top: clamp(250px, 40%, 440px); z-index: 5; display: flex; flex-direction: column; gap: 10px; }
.side-btn {
  width: 66px; padding: 8px 4px 7px; border: 0; border-radius: 18px; background: #fff; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 900; line-height: 1.2;
  box-shadow: 0 4px 0 #EBD5C3, 0 8px 16px rgba(90, 52, 36, .12); transition: transform .08s, box-shadow .08s;
}
.side-btn i { font-style: normal; font-size: 26px; line-height: 1.1; }
.side-btn.menu { background: linear-gradient(#FFE89A, var(--yellow)); box-shadow: 0 4px 0 var(--yellow-d), 0 8px 16px rgba(90, 52, 36, .12); }
.side-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #EBD5C3; }
.side-btn.menu:active { box-shadow: 0 1px 0 var(--yellow-d); }
@media (max-height: 720px) {
  .title-side { top: clamp(220px, 38%, 400px); gap: 8px; }
  .side-btn { width: 60px; padding: 6px 3px; font-size: 11px; }
  .side-btn i { font-size: 22px; }
}
@media (min-width: 900px) { .title-side { left: 24px; top: 42%; } .side-btn { width: 78px; font-size: 13px; } }

.title-side { left: auto; right: calc(100% + 12px); top: 50%; transform: translateY(-50%); }
@media (max-height: 720px) { .title-side { top: 50%; } }
@media (min-width: 900px) { .title-side { left: auto; top: 50%; right: calc(100% + 40px); } }

/* 水果塊浮動 */
.fruit-bob { animation: fruitBob 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes fruitBob { 50% { transform: translateY(-3px) rotate(6deg); } }

/* ===== 搖杯尾段爆發 + 8 字大招 ===== */
.fx-dim { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 56%, rgba(30, 15, 40, 0) 18%, rgba(30, 15, 40, .45) 58%, rgba(20, 10, 30, .72) 100%); }
.make-scene.final-sec .shaker-inner svg { filter: drop-shadow(0 0 14px rgba(255, 224, 122, .95)); }
.make-scene.final-sec .hint .timer { background: var(--pink); color: #fff; animation: pulse .5s infinite; }
.vortex-ring { animation: vortexSpin 1s linear infinite; }
.vortex-ring.v1 { animation-duration: .8s; } .vortex-ring.v2 { animation-duration: .6s; } .vortex-ring.v3 { animation-duration: .45s; }
@keyframes vortexSpin { to { stroke-dashoffset: -80; } }
.shaker.zoom { transform: translate(-50%, -50%) scale(1.32); }
.fx-blob { position: absolute; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); }
.fx-flash.soft { background: radial-gradient(circle at 50% 55%, rgba(255,255,255,.95), rgba(255,255,255,0) 62%); }
.reveal {
  position: absolute; left: 50%; top: 50%; z-index: 12; width: min(86%, 360px); pointer-events: none; text-align: center;
  transform: translate(-50%, -40%) scale(.7); opacity: 0; transition: transform .45s cubic-bezier(.3,1.7,.5,1), opacity .25s;
  background: rgba(255, 253, 248, .96); border-radius: 28px; padding: 16px 18px 14px; border: 4px solid #fff;
  box-shadow: 0 8px 0 #F2C6A0, 0 0 0 6px rgba(255, 209, 92, .55), 0 24px 60px rgba(90, 52, 36, .35);
}
.reveal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.reveal small { display: block; font-weight: 900; letter-spacing: 3px; color: var(--mint-d); font-size: 13px; }
.reveal h2 { margin: 4px 0 8px; font-size: clamp(22px, 6.6vw, 30px); line-height: 1.25; font-weight: 900; color: var(--ink); word-break: break-word; }
.rv-score { display: flex; align-items: baseline; justify-content: center; gap: 6px; font-weight: 900; color: var(--ink2); }
.rv-score b { font-size: 56px; line-height: 1; color: var(--pink-d); text-shadow: 0 4px 0 rgba(224, 83, 138, .2); font-variant-numeric: tabular-nums; }
.rv-score i { font-style: normal; font-size: 22px; color: var(--pink-d); }
.rv-rank { margin-top: 4px; font-weight: 900; color: var(--yellow-d); font-size: 16px; }

/* ===== 材料入杯反應 ===== */
#fx .fx-ripple { position: absolute; border: 2.5px solid #fff; border-radius: 50%; box-sizing: border-box; }
#fx .fx-drop { position: absolute; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; box-shadow: inset -2px -2px 0 rgba(0,0,0,.08), inset 2px 2px 0 rgba(255,255,255,.5); }
#fx .fx-foam { position: absolute; border-radius: 50% 50% 40% 40%; background: radial-gradient(ellipse at 50% 60%, #fff 0 45%, rgba(255,250,235,.9) 60%, rgba(255,250,235,0) 72%); }
#fx .fx-swirl { position: absolute; }
#fx .fx-syrup { position: absolute; width: 16px; height: 20px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; box-shadow: 0 2px 6px rgba(90,52,36,.25); }
#fx .fx-gloss { position: absolute; border: 3px solid #FFE9A8; border-radius: 50%; box-sizing: border-box; box-shadow: 0 0 10px rgba(255,233,168,.9); }
#fx .fx-leaf { position: absolute; width: 12px; height: 7px; border-radius: 0 100% 0 100%; background: linear-gradient(135deg, #9BE36B, #3E9E3A); box-shadow: 0 0 0 1px rgba(46,125,50,.4); }
#fx .fx-spark { position: absolute; font-size: 22px; }
.cupview.thud { animation: cupThud .55s cubic-bezier(.3,1.8,.5,1); transform-origin: 50% 95%; }
@keyframes cupThud { 0% { transform: translateY(0); } 25% { transform: translateY(5px) scale(1.1, .86); } 55% { transform: translateY(-3px) scale(.96, 1.06); } 100% { transform: none; } }

/* ===== 配方氣氛 ===== */
.mood { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .7s; }
.stage > .mood-cosmic, .stage > .mood-rainbow, .make-scene > .mood-cosmic, .make-scene > .mood-rainbow { z-index: 0; }
.stage > .mood-frost, .stage > .mood-syrup { z-index: 6; }
.make-scene > .mood-frost, .make-scene > .mood-syrup { z-index: 6; }
.result-hero > .mood-frost, .result-hero > .mood-syrup { z-index: 3; }
.mood-cosmic { background: radial-gradient(ellipse at 50% 28%, #4A3590 0%, #241A55 55%, #130F30 100%); }
.mood-cosmic i { position: absolute; inset: 0;
  background-image: radial-gradient(1.6px 1.6px at 18% 28%, #fff, transparent), radial-gradient(1.2px 1.2px at 68% 18%, #fff, transparent),
    radial-gradient(2.2px 2.2px at 42% 66%, #FFE07A, transparent), radial-gradient(1.2px 1.2px at 86% 58%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 8% 82%, #CDB8FF, transparent), radial-gradient(1px 1px at 55% 42%, #fff, transparent);
  background-size: 150px 150px; animation: starTwinkle 2.6s ease-in-out infinite alternate; }
@keyframes starTwinkle { from { opacity: .55; } to { opacity: 1; } }
.mood-rainbow { background: linear-gradient(120deg, rgba(255, 90, 122, .5), rgba(255, 209, 92, .5), rgba(79, 209, 178, .5), rgba(91, 168, 255, .5), rgba(185, 147, 214, .5), rgba(255, 90, 122, .5));
  background-size: 300% 300%; animation: rainbowShift 7s linear infinite; }
@keyframes rainbowShift { to { background-position: 300% 0; } }
.mood-syrup {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='48'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23F2A83A'/%3E%3Cstop offset='1' stop-color='%23C8701A'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 0H120V12C110 12 108 20 106 30C105 39 98 39 97 30C95 18 90 14 80 14C70 14 66 16 64 22C63 27 58 27 57 22C55 14 48 12 40 12C32 12 28 16 27 26C26 43 18 43 17 30C16 18 10 12 0 12Z' fill='url(%23g)' opacity='.88'/%3E%3Cpath d='M8 5H50M70 5H100' stroke='white' stroke-width='3' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E") repeat-x top / 120px 48px,
    linear-gradient(115deg, transparent 38%, rgba(255, 240, 200, .45) 48%, transparent 58%) 0 0 / 260% 100% no-repeat;
  animation: syrupSheen 3.4s ease-in-out infinite; }
@keyframes syrupSheen { from { background-position: 0 0, 160% 0; } to { background-position: 0 0, -60% 0; } }
.mood-frost { box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .75), inset 0 0 40px 14px rgba(200, 235, 255, .9); }
.mood-frost i { position: absolute; width: 92px; height: 92px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='92'%3E%3Cg fill='%23F2FBFF' stroke='%23A8D8F5' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpolygon points='0,0 36,0 14,24'/%3E%3Cpolygon points='0,0 0,42 18,16'/%3E%3Cpolygon points='10,8 54,4 26,32'/%3E%3Cpolygon points='4,10 8,60 30,28'/%3E%3Cpolygon points='22,22 42,42 16,46'/%3E%3C/g%3E%3Cg stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M60 20h12M66 14v12M62 16l8 8M70 16l-8 8'/%3E%3Cpath d='M20 64h10M25 59v10'/%3E%3C/g%3E%3C/svg%3E") no-repeat; }
.mood-frost i:nth-child(1) { left: 0; top: 0; }
.mood-frost i:nth-child(2) { right: 0; top: 0; transform: scaleX(-1); }
.mood-frost i:nth-child(3) { left: 0; bottom: 0; transform: scaleY(-1); }
.mood-frost i:nth-child(4) { right: 0; bottom: 0; transform: scale(-1, -1); }

/* ===== 出品時刻 ===== */
.result-cup.rise { animation: cupRise .75s cubic-bezier(.25,1.3,.5,1) both; }
@keyframes cupRise { from { transform: translateX(-50%) translateY(110%); } }
.result-hero .r-press { position: absolute; top: 0; height: 16px; z-index: 4; border-radius: 0 0 10px 10px;
  background: linear-gradient(90deg, #9AA4AE, #F4F7FA, #7F8A95); box-shadow: 0 6px 12px rgba(90, 52, 36, .2); }
.result-hero .r-press::before { content: "封口"; position: absolute; left: 8%; right: 8%; bottom: 16px; height: 46px; border-radius: 18px 18px 6px 6px;
  background: linear-gradient(#FFB3CB, var(--pink)); box-shadow: inset 0 4px 0 rgba(255,255,255,.5); color: #fff; font-weight: 900; font-size: 15px;
  display: grid; place-items: center; text-shadow: 0 2px 0 rgba(200,50,100,.4); }
.result-hero .r-press::after { content: ""; position: absolute; left: 50%; bottom: 62px; width: 18px; height: 120px; margin-left: -9px; background: linear-gradient(90deg, #9AA4AE, #F4F7FA, #7F8A95); }
.cupview.seal-in .c-seal { animation: sealIn .4s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes sealIn { from { transform: scale(1.25, 1.6); opacity: 0; } }
.cupview.straw-in .c-straw { animation: strawIn .45s cubic-bezier(.5,0,.6,1.5) both; }
@keyframes strawIn { from { transform: translate(18px, -90px); opacity: 0; } 40% { opacity: 1; } }
.result-hero .r-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 56%, rgba(255, 255, 255, .95), rgba(255, 245, 210, .4) 30%, transparent 60%);
  animation: glowOut 1.3s ease-out forwards; z-index: 2; }
@keyframes glowOut { 0% { opacity: 0; transform: scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); } }
.result-hero .r-say { position: absolute; left: 10px; top: 12px; z-index: 5; max-width: min(55%, 300px); display: flex; align-items: flex-start; gap: 6px; animation: pop .45s cubic-bezier(.3,1.6,.5,1) both; }
.result-hero .r-say-who { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 3px 0 #EBD5C3; overflow: hidden; display: grid; place-items: center; }
.result-hero .r-say-who .avatar { width: 100%; height: 100%; }
.result-hero .r-say-who .chef { transform: scale(.9); margin-top: 6px; }
.result-hero .r-say p { margin: 0; background: #fff; border-radius: 4px 16px 16px 16px; padding: 7px 11px; font-size: 13.5px; font-weight: 800; line-height: 1.45; box-shadow: 0 3px 0 #EBD5C3; }

/* ===== 小費罐 ===== */
.tip-jar { position: absolute; right: 10px; bottom: calc(24% + 10px); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 1px; background: #FFF8E6; border-radius: 16px;
  padding: 7px 10px 6px; text-align: center; min-width: 64px; box-shadow: 0 3px 0 #EBCB7E, 0 6px 14px rgba(90,52,36,.12); border: 2px solid #FFE3A0; }
.tip-jar i { font-style: normal; font-size: 24px; line-height: 1; }
.tip-jar span { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.tip-jar small { font-size: 10.5px; font-weight: 800; color: #A07A2C; }
.tip-jar b { font-size: 20px; font-weight: 900; color: #9A6A00; }
.tip-jar em { font-style: normal; font-size: 10px; font-weight: 800; color: #B79453; }
@media (min-width: 900px) { .tip-jar { right: 18px; bottom: calc(24% + 16px); padding: 10px 14px 8px; } .tip-jar b { font-size: 24px; } }
.mode-tips { display: inline-block; margin-top: 4px; background: rgba(255,255,255,.92); color: #9A6A00; font-size: 11.5px; font-weight: 900; padding: 2px 9px; border-radius: 999px; text-shadow: none; }
.order-chip .oc-tips { flex: 0 0 auto; margin-left: auto; font-style: normal; font-weight: 900; font-size: 12px; color: #9A6A00; background: #FFF4D6; border-radius: 999px; padding: 2px 8px; }
.r-cust-money { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.r-cust-money .r-cust-coins { margin-top: 0; }
.r-cust-jar { display: inline-flex; align-items: baseline; gap: 5px; background: #FFF4D6; border: 2px solid #FFE3A0; color: #9A6A00; font-weight: 800; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; }
.r-cust-jar b { font-size: 16px; font-weight: 900; }
.r-cust-jar small { font-size: 10.5px; color: #B79453; font-weight: 800; }
.r-cust-jar.gain { animation: jarGain .6s .75s cubic-bezier(.3,1.8,.5,1) both; }
@keyframes jarGain { 0% { transform: scale(1); } 40% { transform: scale(1.18); box-shadow: 0 0 0 6px rgba(255,214,102,.45); } 100% { transform: scale(1); } }
#fx .fx-coin { position: fixed; font-size: 20px; z-index: 101; }

/* =========================================================
   關卡挑戰、預處理小遊戲、切料、成品評級
   ========================================================= */
/* 首頁三個玩法：上面兩格，關卡挑戰橫跨下面 */
.mode-card.level { grid-column: 1 / -1; min-height: 0; flex-direction: row; gap: 10px; padding: 10px 14px; background: linear-gradient(#FFDC7A, var(--yellow-d)); --sh: #C18A14; }
.mode-card.level i { font-size: 28px; }
.mode-card.level small { margin-left: auto; background: rgba(255,255,255,.28); padding: 3px 10px; border-radius: 999px; }
@media (max-height: 700px) { .mode-card { min-height: 96px; } .mode-card.level { min-height: 0; padding: 8px 12px; } }

/* 選關畫面 */
#scr-levels { background: linear-gradient(#FFF6EA, #FFEEDD); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lv-head { text-align: center; padding: 16px 16px 6px; }
.lv-head h2 { margin: 0; font-size: 26px; font-weight: 900; }
.lv-head p { margin: 6px auto 0; display: inline-block; background: #fff; border-radius: 999px; padding: 4px 14px; font-weight: 800; color: var(--ink2); box-shadow: 0 3px 0 var(--line); font-size: 13.5px; }
.lv-list { padding: 4px 14px calc(24px + var(--safe-b)); max-width: 720px; margin: 0 auto; }
.lv-stage { display: flex; align-items: baseline; gap: 8px; margin: 16px 4px 8px; font-size: 16px; }
.lv-stage b { color: var(--pink-d); font-weight: 900; }
.lv-stage span { font-size: 12px; color: var(--ink2); font-weight: 700; }
.lv-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; background: #fff; border-radius: 20px; padding: 10px 12px; margin-bottom: 10px; box-shadow: inset 0 0 0 2px #F5E6DA, 0 4px 0 #F1DCCB; }
.lv-card.current { box-shadow: inset 0 0 0 3px var(--pink), 0 4px 0 var(--pink-d); animation: lvPulse 1.6s ease-in-out infinite; }
@keyframes lvPulse { 50% { box-shadow: inset 0 0 0 3px var(--pink), 0 4px 0 var(--pink-d), 0 0 0 6px rgba(255,126,168,.22); } }
.lv-card.locked { opacity: .55; filter: grayscale(.5); }
.lv-num { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; font-weight: 900; color: #fff; background: linear-gradient(#FF9DBE, var(--pink)); box-shadow: 0 3px 0 var(--pink-d); }
.lv-card.done .lv-num { background: linear-gradient(#7FE4CB, var(--mint)); box-shadow: 0 3px 0 var(--mint-d); }
.lv-card.locked .lv-num { background: #E8DCD2; box-shadow: 0 3px 0 #D3C3B6; font-size: 18px; }
.lv-body { min-width: 0; }
.lv-body b { font-size: 16.5px; font-weight: 900; }
.lv-body p { margin: 2px 0 4px; font-size: 12.5px; font-weight: 700; color: var(--ink2); line-height: 1.35; }
.lv-body small { font-size: 11px; color: #B79B8A; font-weight: 800; }
.lv-mats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; align-items: center; }
.lv-mats em { font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--ink2); }
.lv-mat { display: inline-flex; align-items: center; gap: 2px; background: #FFF4EA; border-radius: 999px; padding: 1px 7px 1px 2px; font-size: 11px; font-weight: 800; }
.lv-mat .ico { width: 20px; height: 20px; }
.lv-mat i { font-style: normal; }
.lv-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lv-stars i, .rl-stars i { font-style: normal; color: #E8DCD2; font-size: 18px; }
.lv-stars i.on, .rl-stars i.on { color: var(--yellow-d); text-shadow: 0 2px 0 #fff; }
.lv-go { padding: 8px 14px; font-size: 14px; border-radius: 14px; min-height: 0; }

/* 揀料：鎖頭、要切 */
.tile.locked { background: #F6F0EA; box-shadow: inset 0 0 0 2px #EDE2D8; color: #B7A495; }
.tile.locked .ico { filter: grayscale(1) opacity(.45); }
.tile .lock { font-style: normal; font-size: 10.5px; font-weight: 900; color: #A08A7A; background: #fff; border-radius: 999px; padding: 1px 7px; margin-top: 1px; }
.tile .tile-tag { position: absolute; left: 4px; top: 4px; font-style: normal; font-size: 10px; font-weight: 900; background: #FFF0D6; color: #B07A12; border-radius: 999px; padding: 1px 5px; }

/* 關卡提示條 */
.order-chip.lv-chip { align-items: center; }
.lv-chip-n { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 900; color: #fff; background: linear-gradient(#FFDC7A, var(--yellow-d)); }
.order-chip.lv-chip span { -webkit-line-clamp: 3; }
.order-chip.lv-chip em { font-style: normal; margin-right: 6px; white-space: nowrap; }
.order-chip.lv-chip em.ok { color: var(--mint-d); }
.order-chip.lv-chip em.later { color: #B79B8A; }

/* 預處理面板（煮茶、煮小料、搗汁）*/
.prep { position: absolute; inset: 0; z-index: 9; display: none; flex-direction: column; align-items: center; padding: 12px 12px 8px; background: radial-gradient(ellipse at 50% 60%, rgba(255,250,240,.6), rgba(255,240,226,.92)); }
.prep.show { display: flex; animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; } }
.make-scene.prepping .hint, .make-scene.prepping .shaker, .make-scene.prepping .swipe-guide { visibility: hidden; }
.prep-card { background: var(--paper); border-radius: 20px; padding: 10px 18px; text-align: center; box-shadow: 0 5px 0 #EBD5C3; max-width: 92%; }
.prep-card b { display: block; font-size: 19px; font-weight: 900; color: var(--pink-d); }
.prep-card span { display: block; font-size: 13px; font-weight: 700; color: var(--ink2); }
.prep-stage { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; touch-action: none; }
.prep-svg { width: min(100%, 360px); max-height: 100%; aspect-ratio: 300 / 260; overflow: visible; }
.prep.muddle .prep-stage { cursor: pointer; }
.prep-cue { min-height: 34px; font-size: 15px; font-weight: 900; color: var(--ink2); background: #fff; border-radius: 999px; padding: 6px 16px; box-shadow: 0 3px 0 var(--line); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s, background .25s, color .25s; }
.prep-cue.show { opacity: 1; transform: none; }
.prep-cue.ok { background: #DDF8EE; color: #128064; box-shadow: 0 3px 0 #9FE3CC, 0 0 0 4px rgba(79,209,178,.25); animation: cuePulse .8s ease-in-out infinite; }
.prep-cue.over { background: #FFE6D9; color: #C2410C; box-shadow: 0 3px 0 #F7C3A6; }
@keyframes cuePulse { 50% { transform: scale(1.05); } }
.prep-quick { margin-top: 6px; border: 0; background: none; color: var(--ink2); font-weight: 800; font-size: 13px; text-decoration: underline; padding: 4px 10px; }
.prep-stamp { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%) scale(.6); opacity: 0; background: #fff; border-radius: 22px; padding: 14px 22px; font-size: 19px; font-weight: 900; box-shadow: 0 6px 0 var(--line), 0 14px 30px rgba(90,52,36,.18); white-space: nowrap; pointer-events: none; }
.prep-stamp.show { animation: stampIn .45s cubic-bezier(.3,1.6,.5,1) forwards; }
.prep-stamp.ok { color: var(--mint-d); box-shadow: 0 6px 0 #9FE3CC, 0 14px 30px rgba(35,168,138,.25); }
.prep-stamp.meh { color: #C2410C; }
@keyframes stampIn { to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
#app[data-screen="make"] .make-scene.prepping ~ * #btnAction { animation: none; }

/* 倒入：慢倒區 */
.hint.pouring .progress { position: relative; overflow: visible; }
.hint.pouring .progress::after { content: "慢倒"; position: absolute; left: 78%; top: -4px; bottom: -4px; border-left: 2px dashed var(--pink-d); font-size: 10px; font-weight: 900; color: var(--pink-d); padding-left: 3px; line-height: 20px; }

/* 切料彈窗 */
.cut-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(90,52,36,.35); opacity: 0; transition: opacity .25s; padding: 16px; }
.cut-modal.show { opacity: 1; }
.cut-card { width: min(100%, 420px); background: var(--paper); border-radius: 26px; padding: 16px 16px 14px; text-align: center; box-shadow: 0 8px 0 #EBD5C3, 0 20px 40px rgba(90,52,36,.25); animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
.cut-card small { display: block; font-size: 12px; font-weight: 900; color: var(--mint-d); letter-spacing: .2em; }
.cut-card > b { font-size: 22px; font-weight: 900; }
.cut-card p { margin: 4px 0 8px; font-size: 13.5px; font-weight: 700; color: var(--ink2); }
.cut-card p strong { color: var(--pink-d); }
.cut-stage { touch-action: none; }
.cut-svg { width: 100%; aspect-ratio: 320 / 190; cursor: crosshair; }
.cut-meter { display: grid; grid-template-columns: auto 1fr 64px; gap: 8px; align-items: center; margin: 6px 4px 10px; font-weight: 800; font-size: 13px; }
.cut-meter b { font-size: 14px; color: var(--pink-d); text-align: right; }
.cut-meter .sc-bar i { transition: width .3s; }
.cut-actions { display: flex; gap: 10px; }
.cut-actions .btn { flex: 1; }
.cut-actions .btn:disabled { opacity: .5; }

/* 出品：關卡結果 */
.r-level { margin-bottom: 14px; padding: 12px 14px; border-radius: 22px; background: linear-gradient(#FFF9E6, #FFF3D1); box-shadow: inset 0 0 0 2px #FFE3A0; }
.rl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rl-head small { font-size: 12px; font-weight: 900; color: #A07A2C; width: 100%; }
.rl-head b { font-size: 19px; font-weight: 900; }
.rl-stars { margin-left: auto; }
.rl-stars i { font-size: 30px; display: inline-block; }
.rl-stars i.on { animation: starPop .5s cubic-bezier(.3,1.8,.5,1) both; }
@keyframes starPop { from { transform: scale(0) rotate(-40deg); } }
.rl-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rl-list li { font-size: 13.5px; font-weight: 800; }
.rl-list li.ok { color: #8A5E00; }
.rl-list li.no { color: #B79B8A; }
.rl-list li span { display: block; font-size: 12px; font-weight: 700; color: var(--ink2); margin: 1px 0 0 20px; }
.rl-unlock { margin-top: 8px; padding: 8px 10px; border-radius: 14px; background: #fff; font-weight: 900; font-size: 13.5px; color: var(--mint-d); box-shadow: 0 3px 0 #FFE3A0; }

/* 出品：成品評級 */
.r-craft { margin: 0 0 14px; padding: 12px 14px; border-radius: 22px; background: #F4FBFF; box-shadow: inset 0 0 0 2px #CFE9FA; animation: fadeIn .4s var(--d, 0s) both; }
.rc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-head b { font-size: 15px; font-weight: 900; }
.rc-stars { font-size: 18px; letter-spacing: 1px; }
.rc-stars i { font-style: normal; color: #D8E6EF; }
.rc-title { margin-left: auto; font-style: normal; font-weight: 900; font-size: 13px; color: #fff; padding: 3px 10px; border-radius: 999px; background: #9FB4C2; }
.rc-title.s5 { background: linear-gradient(90deg, #FFB800, var(--pink)); }
.rc-title.s4 { background: var(--mint); }
.rc-title.s3 { background: #6DB6E8; }
.rc-dims { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.rc-dim { display: grid; grid-template-columns: 88px 1fr minmax(64px, auto); gap: 8px; align-items: center; font-size: 12.5px; font-weight: 800; }
.rc-dim em { font-style: normal; font-size: 11.5px; color: var(--ink2); text-align: right; white-space: nowrap; }
@media (min-width: 900px) { .prep-svg { width: min(100%, 470px); } .prep-card b { font-size: 22px; } }

/* ===== 關卡（配方制）===== */
.lv-intro { margin: 2px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink2); background: none !important; box-shadow: none !important; padding: 0 !important; }
.lv-head-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.lv-head-row p { margin: 0 !important; }
.lv-book { padding: 7px 14px; font-size: 14px; border-radius: 999px; min-height: 0; }
.lv-card { display: block; }
.lv-top { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; }
.lv-recs { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 6px; }
.lv-rec { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; background: #FFF8F1; border-radius: 14px; padding: 7px 8px 7px 10px; }
.lv-rec.made { background: #EEFBF6; }
.lv-rec.bonus { background: #F6F4FF; }
.lv-rec-body { min-width: 0; display: flex; flex-direction: column; }
.lv-rec-body b { font-size: 14px; font-weight: 900; }
.lv-rec-body small { font-size: 11.5px; font-weight: 700; color: var(--ink2); line-height: 1.35; }
.lv-rec-body small.spec, .rb-item small.spec { color: #B07A12; }
.tag { font-style: normal; font-size: 10px; font-weight: 900; color: #fff; background: #9C8AE0; border-radius: 999px; padding: 1px 6px; margin-right: 4px; vertical-align: 2px; }
.tag.main { background: var(--pink); margin-left: 4px; }
.lv-stars.sm i { font-size: 13px; }
.lv-rec .lv-go { padding: 7px 10px; font-size: 13px; white-space: nowrap; }
.lv-rw { font-size: 11px; color: #B79B8A; font-weight: 800; }
.rl-recipe { margin: 4px 0 2px; font-size: 12.5px; font-weight: 800; color: var(--ink2); background: #fff; border-radius: 12px; padding: 6px 10px; line-height: 1.45; }
.rl-rows { display: flex !important; flex-wrap: wrap; gap: 3px 10px; }
.rl-rows span { display: inline !important; margin: 0 !important; font-size: 12px; }
.rl-rows .ok { color: var(--mint-d); }
.rl-rows .no { color: #C2410C; }
.rl-unlock.todo { color: var(--ink2); }
.rl-remix { margin-top: 8px; width: 100%; font-size: 14px; padding: 9px; }
.rb-list { display: flex; flex-direction: column; gap: 8px; }
.rb-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: #fff; border-radius: 16px; padding: 9px 10px; box-shadow: inset 0 0 0 2px #F5E6DA; }
.rb-item b { font-size: 15px; font-weight: 900; }
.rb-item small { display: block; font-size: 12px; font-weight: 700; color: var(--ink2); }
.rb-remix { padding: 8px 12px; font-size: 13.5px; white-space: nowrap; }
.rb-more { text-align: center; font-weight: 800; color: #B79B8A; font-size: 13px; }
.order-chip.lv-chip { font-size: 12px; }
.order-chip.lv-chip em { margin-right: 5px; }
.order-chip.lv-chip em.no { color: #C2410C; }

/* =========================================================
   尖峰時段（rush.js）：頂部狀態條唔遮住任何操作區（會推低內容）
   ========================================================= */
.rush-bar { display: none; flex: 0 0 auto; z-index: 19; position: relative; overflow: hidden; }
.rush-bar.show { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 2px solid var(--line); }
.rush-bar.order { background: linear-gradient(90deg, #FFE3C8, #FFD3DF); border-bottom-color: #F7B48F; }
.rush-bar.level { background: linear-gradient(90deg, #E2F7EF, #E9F3FF); border-bottom-color: #A9DCCB; }
#app[data-screen="title"] .rush-bar { display: none; }
/* 預告 */
.rb-warn { position: relative; flex: 1; min-height: 70px; padding-bottom: 26px !important; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; padding: 4px 6px 4px 10px; }
.rb-warn b { grid-column: 1; font-size: 23px; font-weight: 900; line-height: 1.15; color: #D9480F; text-shadow: 0 2px 0 #fff; position: relative; z-index: 1; }
.rush-bar.level .rb-warn b { color: var(--mint-d); font-size: 19px; }
.rb-warn span { grid-column: 1; font-size: 13px; font-weight: 800; color: var(--ink2); position: relative; z-index: 1; }
.rb-count { grid-column: 2; grid-row: 1 / 3; font-style: normal; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 900; color: #fff; background: #FF6B3D; box-shadow: 0 4px 0 #C2410C, 0 0 0 6px rgba(255,107,61,.2); animation: countPop 1s ease-out infinite; position: relative; z-index: 1; }
.rush-bar.level .rb-count { background: var(--mint); box-shadow: 0 4px 0 var(--mint-d), 0 0 0 6px rgba(79,209,178,.2); width: 46px; height: 46px; font-size: 26px; }
@keyframes countPop { 0% { transform: scale(1.35); } 30% { transform: scale(1); } }
.rb-parade { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; pointer-events: none; overflow: hidden; }
.rb-parade i { position: absolute; bottom: 1px; left: -40px; font-style: normal; font-size: 21px; opacity: .8; animation: parade 3.2s linear infinite; }
.rush-bar.level .rb-parade i { opacity: .35; animation-duration: 4.5s; }
@keyframes parade { from { transform: translateX(0) translateY(0); } 25% { transform: translateX(25vw) translateY(-3px); } 50% { transform: translateX(50vw) translateY(0); } 75% { transform: translateX(75vw) translateY(-3px); } to { transform: translateX(110vw) translateY(0); } }
.rush-bar.order.warn { animation: warnFlash .5s ease-in-out infinite alternate; }
@keyframes warnFlash { to { background: linear-gradient(90deg, #FFD2B0, #FFC2D2); } }
/* 進行中 */
.rb-state { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 2px 4px; }
.rb-state b { font-size: 12.5px; font-weight: 900; color: #D9480F; white-space: nowrap; }
.rush-bar.level .rb-state b { color: var(--mint-d); }
.rb-state span { font-size: 12px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rb-state em { font-style: normal; font-size: 10.5px; font-weight: 900; color: #fff; background: var(--pink); border-radius: 999px; padding: 0 6px; margin-top: 1px; }
.rb-cards { flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; }
.rb-card { flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: 30px 1fr auto; gap: 5px; align-items: center; border: 0; background: #fff; border-radius: 14px; padding: 4px 6px; box-shadow: 0 2px 0 rgba(90,52,36,.12); text-align: left; color: var(--ink); font: inherit; }
.rb-card.making { box-shadow: inset 0 0 0 2px var(--mint), 0 2px 0 rgba(90,52,36,.12); }
.rb-card.rushed { box-shadow: inset 0 0 0 2px #FF8A3D, 0 2px 0 rgba(90,52,36,.12); }
.rb-card.low.wait { animation: lowShake .5s ease-in-out infinite; }
@keyframes lowShake { 50% { transform: translateX(-1.5px); } }
.rb-face { width: 30px; height: 30px; border-radius: 50%; background: #FFF0E4; overflow: hidden; display: block; }
.rb-face .avatar { width: 100%; height: 100%; }
.rb-ico { font-style: normal; font-size: 20px; text-align: center; }
.rb-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rb-txt b { font-size: 11.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-pat { display: block; height: 5px; border-radius: 3px; background: #F2E3D6; overflow: hidden; }
.rb-pat i { display: block; height: 100%; border-radius: 3px; background: var(--mint); transition: width .25s linear; }
.rb-card.mid .rb-pat i { background: var(--yellow-d); }
.rb-card.low .rb-pat i { background: #F0533C; }
.rb-card em { font-style: normal; font-size: 11px; font-weight: 900; color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rb-card.low em { color: #D9480F; }
.rb-card.making em { color: var(--mint-d); }
.rb-more { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; font-weight: 900; font-size: 16px; color: #D9480F; line-height: 1; padding: 0 2px; }
.rb-more small { font-size: 10px; color: var(--ink2); margin-top: 2px; }
.rb-empty { font-size: 12px; font-weight: 800; color: var(--ink2); align-self: center; }
.rb-end { flex: 1; text-align: center; font-size: 14px; font-weight: 900; color: var(--mint-d); padding: 4px 0; animation: pop .4s; }
.rb-end span { display: block; font-size: 12px; font-weight: 800; color: var(--ink2); }
/* 店門口人潮 */
.crowd { position: absolute; left: 6px; bottom: calc(24% + 4px); z-index: 4; display: flex; gap: 2px; pointer-events: none; }
.crowd i { font-style: normal; font-size: 26px; animation: crowdIn .6s cubic-bezier(.3,1.5,.5,1) both, crowdBob 1s ease-in-out infinite alternate; filter: drop-shadow(0 2px 0 rgba(90,52,36,.2)); }
@keyframes crowdIn { from { transform: translateX(-60px); opacity: 0; } }
@keyframes crowdBob { to { translate: 0 -3px; } }
#app.rush-warn.rush-order #scr-order .customer, #app.rush-warn.rush-order #scr-order .bubble, #app.rush-warn.rush-order #scr-order .cust-name { visibility: hidden; }
#app.rush-warn.rush-order #btnTakeOrder, #app.rush-warn.rush-order #btnNewCust { opacity: .5; pointer-events: none; }
.rl-unlock.rush { color: #C2410C; }
@media (prefers-reduced-motion: reduce) { .rb-parade i, .rush-bar.order.warn, .rb-card.low.wait { animation: none; } }

.rb-say { flex: 1; display: flex; align-items: center; gap: 8px; padding: 6px 4px; min-height: 58px; animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
.rb-chef { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 24px; box-shadow: 0 3px 0 #A9DCCB; }
.rb-say p { margin: 0; background: #fff; border-radius: 4px 16px 16px 16px; padding: 8px 12px; font-size: 15px; font-weight: 900; color: var(--ink); box-shadow: 0 3px 0 #A9DCCB; }

/* =========================================================
   小費商店、營業結算、外觀收藏（只係裝飾）
   ========================================================= */
.side-btn.shop { background: linear-gradient(#FFE3A3, #FFC94D); }
.shop-card { width: min(100%, 520px); }
.shop-bal { margin-left: auto; margin-right: 8px; font-weight: 800; color: #9A6A00; background: #FFF4D6; border-radius: 999px; padding: 3px 10px; }
.shop-bal b { font-size: 16px; }
.shop-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 10px; background: #F6EDE4; border-radius: 16px; padding: 4px; }
.shop-tab { border: 0; border-radius: 12px; padding: 9px 6px; font: inherit; font-weight: 900; font-size: 14.5px; color: var(--ink2); background: transparent; }
.shop-tab.on { background: #fff; color: var(--pink-d); box-shadow: 0 2px 0 var(--line); }
.shop-note { margin: 0 0 10px; font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.up-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; background: #fff; border-radius: 18px; padding: 10px 12px; margin-bottom: 8px; box-shadow: inset 0 0 0 2px #F5E6DA; }
.up-ico { width: 44px; height: 44px; border-radius: 14px; background: #FFF4EA; display: grid; place-items: center; font-size: 24px; }
.up-body b { font-size: 15.5px; font-weight: 900; }
.up-body small { display: block; font-size: 12px; font-weight: 700; color: var(--ink2); line-height: 1.35; }
.up-lv { display: flex; align-items: center; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.up-lv i { width: 16px; height: 8px; border-radius: 4px; background: #EADDD2; }
.up-lv i.on { background: var(--mint); }
.up-lv span { font-size: 11.5px; font-weight: 800; color: #B07A12; margin-left: 4px; }
.up-buy { padding: 9px 12px; font-size: 14px; white-space: nowrap; }
.up-buy:disabled { opacity: .45; }
.up-max { font-style: normal; font-weight: 900; color: var(--mint-d); font-size: 13px; }
.cos-h { margin: 10px 2px 6px; font-size: 14px; font-weight: 900; }
.cos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.cos-item { border: 0; background: #fff; border-radius: 16px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; color: var(--ink); box-shadow: inset 0 0 0 2px #F5E6DA; }
.cos-item.owned { background: #F4FBF8; }
.cos-item.on { box-shadow: inset 0 0 0 3px var(--mint); }
.cos-item[data-poor] { opacity: .55; }
.cos-item b { font-size: 12.5px; font-weight: 900; }
.cos-item em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--ink2); }
.cos-item.on em { color: var(--mint-d); }
.cos-prev { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: #FFF4EA; }
.cos-seal-mint { background: repeating-conic-gradient(#7FD9B9 0 25%, #BDEEDD 0 50%) 0 0 / 14px 14px; }
.cos-seal-star { background: #3C3A7A; }
.cos-seal-lemon { background: repeating-linear-gradient(35deg, #FFD84A 0 6px, #FFF3A6 6px 12px); }
.cos-seal-basic { background: radial-gradient(circle, #fff 22%, transparent 24%) 0 0 / 12px 12px, #FF8FB5; }
.cos-fx-rainbow { background: linear-gradient(90deg, #FF5A7A, #FFD15C, #4FD1B2, #5BA8FF, #B993D6); }
.round-card { text-align: center; }
.rd-n { font-size: 20px; font-weight: 900; color: var(--pink-d); margin: 6px 0 10px; }
.rd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rd-grid div { background: #fff; border-radius: 16px; padding: 10px 6px; box-shadow: inset 0 0 0 2px #F5E6DA; }
.rd-grid small { display: block; font-size: 12px; font-weight: 800; color: var(--ink2); }
.rd-grid b { font-size: 22px; font-weight: 900; }
.rd-grid .tip b { color: var(--mint-d); }
.rd-grid .bal { background: #FFF4D6; box-shadow: inset 0 0 0 2px #FFE3A0; }
.rd-grid .bal b { color: #9A6A00; }
.rd-note { font-size: 12.5px; font-weight: 700; color: var(--ink2); margin: 8px 0 0; }
.rd-actions { display: flex; gap: 10px; margin-top: 14px; }
.rd-actions .btn { flex: 1; }
#app.skin-cup-pink .cupview .c-body { fill: rgba(255, 190, 212, .5); }
#app.skin-cup-pink .cupview .c-edge { stroke: #F59AB9; }
#app.skin-cup-pink .cupview .c-rimfront, #app.skin-cup-pink .cupview .c-rimback { stroke: #FFD3E2; }
#app.skin-cup-mint .cupview .c-body { fill: rgba(190, 240, 222, .55); }
#app.skin-cup-mint .cupview .c-edge { stroke: #6CCBA8; }
#app.skin-cup-mint .cupview .c-glass { opacity: .75; }
#app.skin-cup-gold .cupview .c-rimfront, #app.skin-cup-gold .cupview .c-rimback { stroke: #E8B931; }
#app.skin-cup-gold .cupview .c-edge { stroke: #D9A520; stroke-opacity: .9; }
#app.skin-seal-mint .cupview .c-sealE { fill: url(#pSealMint); }
#app.skin-seal-star .cupview .c-sealE { fill: url(#pSealStar); }
#app.skin-seal-lemon .cupview .c-sealE { fill: url(#pSealLemon); }
#app.skin-fx-rainbow #trailLine { stroke: url(#gRainbowH); stroke-opacity: .8; }
#app.skin-fx-gold #trailLine { stroke: rgba(255, 196, 60, .8); filter: drop-shadow(0 0 6px rgba(255, 210, 90, .9)); }
#app.skin-fx-heart #trailLine { stroke: rgba(255, 90, 140, .65); stroke-dasharray: 2 16; stroke-width: 12; }
#app.skin-fx-gold .make-scene.shaking .shaker-inner { filter: drop-shadow(0 0 10px rgba(255, 210, 90, .7)); }
#app.skin-fx-heart .make-scene.shaking .shaker-inner { filter: drop-shadow(0 0 10px rgba(255, 120, 160, .6)); }
#app.skin-fx-rainbow .make-scene.shaking .shaker-inner { filter: drop-shadow(0 0 10px rgba(120, 200, 255, .6)); }
.decor { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.decor .dc { position: absolute; font-style: normal; }
.decor .dc-l, .decor .dc-r { bottom: calc(24% - 4px); font-size: 40px; filter: drop-shadow(0 3px 0 rgba(90,52,36,.15)); }
.decor .dc-l { left: 4px; } .decor .dc-r { right: 4px; }
.decor .dc-cat { right: 8px; bottom: calc(24% + 2px); font-size: 38px; }
.decor .dc-cat b { position: absolute; right: -8px; top: -6px; font-size: 18px; animation: wave 1s ease-in-out infinite alternate; transform-origin: bottom left; }
@keyframes wave { to { transform: rotate(-25deg); } }
.decor .dc-lights { top: 2px; left: 0; right: 0; text-align: center; font-size: 16px; letter-spacing: 6px; animation: twinkle 1.2s steps(2) infinite; }
@keyframes twinkle { 50% { filter: hue-rotate(120deg) brightness(1.2); } }
.decor .dc-neon { top: 6px; right: 8px; font-size: 13px; font-weight: 900; color: #fff; padding: 3px 9px; border-radius: 10px; border: 2px solid #FF7EA8; text-shadow: 0 0 6px #FF7EA8, 0 0 12px #FF7EA8; box-shadow: 0 0 10px rgba(255,126,168,.7), inset 0 0 8px rgba(255,126,168,.5); background: rgba(60,20,40,.55); animation: neon 2.4s ease-in-out infinite; }
@keyframes neon { 45%, 55% { opacity: .7; } 50% { opacity: .35; } }
.stage .decor .dc-cat, .stage .decor .dc-r { display: none; }
.stage .decor .dc-neon { top: auto; bottom: 30%; right: auto; left: 6px; font-size: 11px; }
.stage .decor .dc-l { bottom: 20%; font-size: 30px; }
@media (prefers-reduced-motion: reduce) { .decor .dc-lights, .decor .dc-neon, .decor .dc-cat b { animation: none; } }
#shopModal { z-index: 140; }
.decor .dc-cat { right: auto; left: 10px; } #app.rush-on .decor .dc-cat, #app.rush-warn .decor .dc-cat { left: auto; right: 90px; }
.rl-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.rl-actions .btn { margin: 0; font-size: 13.5px; padding: 9px 6px; }
.rl-next { width: 100%; margin-top: 10px; font-size: 16px; padding: 12px; }
