/* 毛手毛腳食堂 — UI「野餐貼紙」：粗暖棕描邊、硬陰影、番茄紅／芥末黃／青葉綠／天空藍、牛皮紙底 */
:root {
  --ink: #3b2a22;
  --ink-2: #6b4f3f;
  --ink-3: #9c8169;
  --paper: #f5e3c0;
  --paper-2: #ecd3a6;
  --paper-3: #e2c48f;
  --card: #fff8ea;
  --cream: #fffaf0;
  --tomato: #e5483b;
  --tomato-d: #b8322a;
  --mustard: #f2b632;
  --mustard-d: #c98d14;
  --leaf: #3fb35a;
  --leaf-d: #2a8a43;
  --sky: #3b8fe5;
  --sky-d: #2a6dba;
  --berry: #7a4fb0;
  --pink: #f59db0;
  --line: 3px;
  --sh: 4px 4px 0 var(--ink);
  --sh-lg: 6px 6px 0 var(--ink);
  --r: 18px;
  --font-title: "Huninn", "jf-openhuninn", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --gut: clamp(12px, 2.2vw, 28px);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .23 0 0 0 0 .16 0 0 0 0 .1 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --fiber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke='%23a0773f' stroke-opacity='.16' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M12 30c10 2 18 0 26-3M150 18c8 4 20 4 30 0M70 90c6 6 16 8 26 6M190 120c-6 8-6 16-2 24M30 170c12-2 20 2 26 8M120 200c10-4 22-4 30 2M200 210c6-6 14-8 22-6M90 150c4-6 12-8 18-6'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- 基本 ---------- */
.pp-ui {
  position: fixed; inset: 0; z-index: 10;
  pointer-events: none;
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  line-height: 1.45;
}
.pp-ui *, .pp-ui *::before, .pp-ui *::after { box-sizing: border-box; }
:where(.pp-ui) button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.pp-ui img { -webkit-user-drag: none; }
.pp-ico { display: inline-block; vertical-align: middle; flex: none; overflow: visible; }
.pp-layer { position: absolute; inset: 0; pointer-events: none; }
.pp-layer > * { pointer-events: auto; }
.pp-l-hud { z-index: 10; }
.pp-l-hud > * { pointer-events: none; }
.pp-l-screens { z-index: 20; }
.pp-l-overlays { z-index: 30; }
.pp-l-banner { z-index: 40; }
.pp-l-banner > * { pointer-events: none; }
.pp-l-toasts { z-index: 50; }
.pp-l-toasts > * { pointer-events: none; }
.pp-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 背景 ---------- */
.pp-bg-paper {
  background-color: var(--paper);
  background-image: var(--noise), var(--fiber),
    radial-gradient(120% 90% at 50% 0%, rgba(255, 250, 235, .7), transparent 60%),
    radial-gradient(90% 70% at 100% 100%, rgba(201, 141, 20, .16), transparent 70%);
}
.pp-bg-gingham {
  background-color: #fbefd6;
  background-image: var(--noise),
    linear-gradient(90deg, rgba(229, 72, 59, .17) 50%, transparent 50%),
    linear-gradient(rgba(229, 72, 59, .17) 50%, transparent 50%);
  background-size: 180px 180px, 64px 64px, 64px 64px;
}
.pp-dim { background: rgba(43, 28, 20, .52); }

/* ---------- 貼紙卡 ---------- */
.pp-card {
  position: relative;
  background-color: var(--card);
  background-image: var(--noise);
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--sh-lg);
}
.pp-tape {
  position: absolute; z-index: 2; width: 120px; height: 30px;
  top: -15px; left: 50%; margin-left: -60px;
  background: repeating-linear-gradient(-45deg, rgba(242, 182, 50, .9) 0 9px, rgba(255, 224, 140, .9) 9px 18px);
  clip-path: polygon(0 0, 5% 18%, 0 36%, 5% 54%, 0 72%, 5% 90%, 2% 100%, 98% 100%, 95% 82%, 100% 64%, 95% 46%, 100% 28%, 95% 10%, 100% 0);
  transform: rotate(-3deg);
  filter: drop-shadow(0 1px 0 rgba(59, 42, 34, .25));
}
.pp-tape.is-green { background: repeating-linear-gradient(-45deg, rgba(63, 179, 90, .82) 0 9px, rgba(150, 220, 160, .82) 9px 18px); }
.pp-tape.is-blue { background: repeating-linear-gradient(-45deg, rgba(59, 143, 229, .8) 0 9px, rgba(160, 205, 245, .8) 9px 18px); }
.pp-tape.is-red { background: repeating-linear-gradient(-45deg, rgba(229, 72, 59, .82) 0 9px, rgba(250, 170, 160, .82) 9px 18px); }

.pp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 4px 14px 4px 8px;
  font-family: var(--font-title); font-size: 18px; white-space: nowrap;
  background: var(--cream);
  border: var(--line) solid var(--ink); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
}
.pp-chip b { font-weight: 400; font-size: 20px; }

/* ---------- 按鈕：壓下去的手感 ---------- */
.pp-btn {
  --c: var(--tomato); --cd: var(--tomato-d);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; min-width: 52px; padding: 8px 22px;
  font-family: var(--font-title); font-size: 21px; letter-spacing: .04em; line-height: 1.1;
  color: #fff; white-space: nowrap;
  background: var(--c);
  border: var(--line) solid var(--ink); border-radius: 16px;
  box-shadow: inset 0 -5px 0 var(--cd), inset 0 3px 0 rgba(255, 255, 255, .35), 4px 4px 0 var(--ink);
  text-shadow: 0 2px 0 rgba(59, 42, 34, .4);
  cursor: pointer;
  transition: transform .09s cubic-bezier(.3, 1.6, .5, 1), box-shadow .09s, filter .15s;
  outline: none;
}
.pp-btn .pp-ico { filter: drop-shadow(0 1.5px 0 rgba(59, 42, 34, .3)); }
.pp-btn:hover { filter: brightness(1.06) saturate(1.05); transform: translate(-1px, -1px) rotate(-.6deg); box-shadow: inset 0 -5px 0 var(--cd), inset 0 3px 0 rgba(255, 255, 255, .35), 5px 5px 0 var(--ink); }
.pp-btn:active, .pp-btn.is-pressed {
  transform: translate(4px, 4px) scale(.985);
  box-shadow: inset 0 -2px 0 var(--cd), inset 0 3px 0 rgba(255, 255, 255, .3), 0 0 0 var(--ink);
  transition-duration: .04s;
}
.pp-btn:focus-visible, .pp-btn.is-focus { outline: 3px dashed var(--ink); outline-offset: 5px; animation: pp-hop .5s ease; }
.pp-btn.is-yellow { --c: var(--mustard); --cd: var(--mustard-d); color: var(--ink); text-shadow: 0 2px 0 rgba(255, 255, 255, .45); }
.pp-btn.is-green { --c: var(--leaf); --cd: var(--leaf-d); }
.pp-btn.is-blue { --c: var(--sky); --cd: var(--sky-d); }
.pp-btn.is-paper { --c: var(--cream); --cd: var(--paper-2); color: var(--ink); text-shadow: none; }
.pp-btn.is-berry { --c: var(--berry); --cd: #5a3787; }
.pp-btn[disabled], .pp-btn.is-disabled {
  --c: #e8d6b4; --cd: #d4be95; color: var(--ink-3); text-shadow: none;
  border-style: dashed; box-shadow: none; cursor: not-allowed; filter: none; transform: none;
}
.pp-btn[disabled] .pp-ico { opacity: .55; filter: grayscale(1); }
.pp-btn-round { width: 54px; height: 54px; padding: 0; border-radius: 50%; }
.pp-btn-sm { min-height: 44px; min-width: 44px; padding: 6px 14px; font-size: 17px; border-radius: 13px; }
.pp-btn-big { min-height: 64px; padding: 10px 28px; font-size: 26px; border-radius: 20px; }
.pp-btn small { font-family: var(--font-body); font-size: 12px; opacity: .85; letter-spacing: 0; }

@keyframes pp-hop { 0%, 100% { translate: 0 0; } 40% { translate: 0 -4px; } 70% { translate: 0 1px; } }

/* ---------- 畫面切換：貼上去、撕下來 ---------- */
.pp-screen {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; flex-direction: column;
  pointer-events: auto;
  animation: pp-in .46s cubic-bezier(.2, 1.3, .4, 1) both;
}
.pp-screen.is-leaving { animation: pp-out .24s ease-in both; pointer-events: none; }
@keyframes pp-in { from { opacity: 0; transform: translateY(22px) rotate(-1.4deg) scale(.965); } to { opacity: 1; transform: none; } }
@keyframes pp-out { to { opacity: 0; transform: translateY(-16px) rotate(1.2deg) scale(1.025); } }
.pp-pop { animation: pp-pop .5s cubic-bezier(.2, 1.6, .45, 1) both; animation-delay: var(--d, 0s); }
@keyframes pp-pop { from { opacity: 0; transform: scale(.55) rotate(var(--pr, -8deg)); } to { opacity: 1; transform: none; } }

/* 共用頁首 */
.pp-top {
  position: relative; z-index: 5; flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: calc(var(--sat) + 14px) calc(var(--sar) + var(--gut)) 10px calc(var(--sal) + var(--gut));
}
.pp-top-title {
  position: relative;
  font-family: var(--font-title); font-weight: 400; font-size: clamp(22px, 2.6vw, 32px); margin: 0;
  padding: 4px 22px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw;
  background: var(--cream); border: var(--line) solid var(--ink); border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink); transform: rotate(-1.2deg);
}
.pp-top-title small { font-family: var(--font-body); font-size: .5em; color: var(--ink-2); margin-left: 8px; letter-spacing: .06em; }
.pp-top-sp { flex: 1; }

/* ---------- 標題畫面 ---------- */
.pp-s-title { align-items: center; justify-content: center; }
.tt-sun {
  position: absolute; left: 50%; top: 44%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax;
  background: repeating-conic-gradient(from 0deg, rgba(242, 182, 50, .26) 0 7deg, transparent 7deg 18deg);
  -webkit-mask: radial-gradient(closest-side, #000 18%, transparent 72%); mask: radial-gradient(closest-side, #000 18%, transparent 72%);
  animation: tt-spin 90s linear infinite;
}
@keyframes tt-spin { to { transform: rotate(360deg); } }
.tt-doodles { position: absolute; inset: 0; pointer-events: none; }
.tt-dood { position: absolute; width: var(--s, 64px); height: var(--s, 64px); transform: rotate(var(--r, 0deg)); animation: tt-bob 5.5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.tt-dood svg { width: 100%; height: 100%; filter: drop-shadow(3px 3px 0 rgba(59, 42, 34, .9)); }
.tt-dood::before { content: ""; position: absolute; inset: -9%; border-radius: 50%; background: var(--cream); border: 2.5px solid var(--ink); z-index: -1; box-shadow: 3px 3px 0 var(--ink); }
@keyframes tt-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.tt-wrap {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: clamp(18px, 3.4vh, 40px);
  padding: calc(var(--sat) + 12px) calc(var(--sar) + 16px) calc(var(--sab) + 70px) calc(var(--sal) + 16px);
}
.tt-logo { position: relative; display: flex; flex-direction: column; align-items: center; }
.tt-line1 { display: flex; gap: .02em; font-size: clamp(54px, 9.2vw, 132px); line-height: 1; }
.tt-ch {
  position: relative; display: inline-block; font-family: var(--font-title); color: var(--c);
  transform: rotate(var(--r, 0deg)); animation: tt-wobble 3.2s ease-in-out infinite; animation-delay: var(--d, 0s);
}
.tt-ch::before, .tt-ch::after { content: attr(data-c); position: absolute; left: 0; top: 0; z-index: -1; }
.tt-ch::before { -webkit-text-stroke: .2em var(--ink); color: var(--ink); transform: translate(.05em, .06em); }
.tt-ch::after { -webkit-text-stroke: .12em var(--cream); color: var(--cream); }
@keyframes tt-wobble { 0%, 100% { translate: 0 0; } 30% { translate: 0 -.06em; } 55% { translate: 0 .01em; } }
.tt-sign {
  position: relative; margin-top: -.08em; z-index: 1;
  font-family: var(--font-title); font-size: clamp(40px, 6.4vw, 92px); line-height: 1; letter-spacing: .32em; text-indent: .32em;
  color: #fff; padding: .12em .5em .16em;
  background: var(--tomato); border: 4px solid var(--ink); border-radius: .28em;
  box-shadow: inset 0 0 0 5px var(--tomato), inset 0 0 0 7px rgba(255, 255, 255, .85), 6px 6px 0 var(--ink);
  transform: rotate(-2.4deg);
  text-shadow: 0 .05em 0 var(--tomato-d);
}
.tt-sign::before { content: ""; position: absolute; inset: 9px; border: 2.5px dashed rgba(255, 255, 255, .8); border-radius: .2em; pointer-events: none; }
.tt-en {
  margin-top: 14px; font-family: var(--font-title); font-size: clamp(15px, 1.6vw, 22px); letter-spacing: .3em;
  color: var(--ink); background: var(--mustard); padding: 3px 18px 4px; border: var(--line) solid var(--ink); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink); transform: rotate(1.6deg);
}
.tt-pan { position: absolute; right: -8%; top: -16%; width: clamp(64px, 9vw, 130px); transform: rotate(18deg); animation: tt-flip 4.8s ease-in-out infinite; }
.tt-pan svg { width: 100%; height: auto; filter: drop-shadow(4px 4px 0 var(--ink)); }
@keyframes tt-flip { 0%, 70%, 100% { transform: rotate(18deg); } 78% { transform: rotate(4deg) translateY(-6px); } 86% { transform: rotate(24deg); } }
.tt-menu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 16px; width: min(600px, 92vw); }
.tt-menu .pp-btn { width: 100%; }
.tt-menu .pp-btn:not(.tt-main) { flex-direction: column; gap: 4px; min-height: 92px; padding: 10px 8px; font-size: 21px; }
.tt-menu .tt-main { grid-column: 1 / -1; min-height: 76px; font-size: 32px; }
.tt-foot {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(var(--sab) + 14px);
  display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; padding: 0 16px;
  font-size: 14px; color: var(--ink-2);
}
.tt-foot .tt-hint { background: rgba(255, 250, 240, .8); padding: 4px 12px; border-radius: 10px; border: 2px dashed var(--ink-3); }
.tt-paws { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 70px); height: 60px; pointer-events: none; color: rgba(107, 79, 63, .5); }
.tt-paws span { position: absolute; bottom: 0; opacity: 0; animation: tt-step 7s linear infinite; animation-delay: var(--d); }
.tt-paws span:nth-child(odd) { bottom: 24px; }
.tt-paws .pp-ico { transform: rotate(90deg); width: 34px; height: 34px; }
.tt-paws .pp-ico ellipse { stroke: none; }
@keyframes tt-step { 0% { opacity: 0; } 4% { opacity: 1; } 40% { opacity: 1; } 55%, 100% { opacity: 0; } }

/* ---------- 世界地圖 ---------- */
.pp-s-map .wm-scroll {
  position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent;
  -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
}
.wm-board { position: relative; }
.wm-road { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wm-road .r-under { fill: none; stroke: var(--ink); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
.wm-road .r-base { fill: none; stroke: #f7e2b3; stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }
.wm-road .r-dash { fill: none; stroke: var(--tomato); stroke-width: 3.5; stroke-dasharray: 2 14; stroke-linecap: round; }
.wm-road .r-done { fill: none; stroke: var(--leaf); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 10 12; }
.wm-stop {
  --wc: var(--leaf);
  position: absolute; width: 168px; margin: -64px 0 0 -84px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 0; padding: 0; cursor: pointer; outline: none;
  animation: pp-pop .55s cubic-bezier(.2, 1.6, .45, 1) both; animation-delay: var(--d, 0s);
}
.wm-disc {
  position: relative; width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), transparent 55%), var(--wc);
  border: var(--line) solid var(--ink);
  box-shadow: inset 0 0 0 5px rgba(255, 250, 240, .9), inset 0 0 0 7px var(--ink), 5px 5px 0 var(--ink);
  transition: transform .15s cubic-bezier(.3, 1.6, .5, 1);
}
.wm-disc .pp-art { width: 70px; height: 70px; filter: drop-shadow(0 2px 0 rgba(59, 42, 34, .25)); }
.wm-label {
  display: flex; align-items: center; gap: 6px; max-width: 168px;
  font-family: var(--font-title); font-size: 18px; white-space: nowrap;
  background: var(--cream); border: var(--line) solid var(--ink); border-radius: 12px;
  padding: 3px 10px 4px 4px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(var(--tilt, -1deg));
}
.wm-no { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 8px; background: var(--wc); color: #fff; font-weight: 400; font-size: 15px; border: 2px solid var(--ink); }
.wm-name { overflow: hidden; text-overflow: ellipsis; }
.wm-stars { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-title); font-size: 15px; padding: 1px 9px 1px 4px; background: rgba(255, 250, 240, .92); border-radius: 999px; border: 2px solid var(--ink); }
.wm-stop:hover .wm-disc, .wm-stop:focus-visible .wm-disc, .wm-stop.is-focus .wm-disc { transform: scale(1.07) rotate(-3deg); }
.wm-stop:focus-visible .wm-disc, .wm-stop.is-focus .wm-disc { outline: 3px dashed var(--ink); outline-offset: 6px; }
.wm-stop:active .wm-disc { transform: translate(4px, 4px); box-shadow: inset 0 0 0 5px rgba(255, 250, 240, .9), inset 0 0 0 7px var(--ink), 0 0 0 var(--ink); }
.wm-stop.is-locked .wm-disc { filter: saturate(.5) brightness(1.06); }
.wm-stop.is-locked .wm-disc .pp-art { opacity: .78; }
.wm-land { position: absolute; width: 300px; height: 230px; margin: -115px 0 0 -150px; pointer-events: none; border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%; background: radial-gradient(closest-side, color-mix(in srgb, var(--wc) 30%, transparent), color-mix(in srgb, var(--wc) 14%, transparent) 70%, transparent); }
.wm-land.is-dim { filter: saturate(.6); opacity: .8; }
.wm-stop.is-locked .wm-no { background: var(--ink-3); }
.wm-badge { position: absolute; right: -6px; bottom: -4px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--cream); border: var(--line) solid var(--ink); border-radius: 50%; box-shadow: 2px 2px 0 var(--ink); }
.wm-soon {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; rotate: -14deg;
  font-family: var(--font-title); font-size: 17px; letter-spacing: .12em; white-space: nowrap;
  color: var(--tomato); padding: 1px 8px; border: 2.5px solid var(--tomato); border-radius: 6px;
  background: rgba(255, 250, 240, .86); box-shadow: 0 0 0 2px rgba(255, 250, 240, .86);
}
.wm-cond { font-size: 12.5px; color: var(--ink-2); background: rgba(255, 250, 240, .9); padding: 1px 8px; border-radius: 8px; border: 1.5px dashed var(--ink-3); white-space: nowrap; }
.wm-here { position: absolute; top: -34px; left: 50%; margin-left: -18px; animation: wm-bounce 1.2s ease-in-out infinite; filter: drop-shadow(2px 2px 0 var(--ink)); }
@keyframes wm-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.wm-deco { position: absolute; pointer-events: none; opacity: .9; }
.wm-deco svg { width: 100%; height: 100%; }
.wm-hint { position: absolute; z-index: 4; bottom: calc(var(--sab) + 12px); left: 50%; translate: -50% 0; font-size: 13px; color: var(--ink-2); background: rgba(255, 250, 240, .9); padding: 4px 12px; border-radius: 10px; border: 2px dashed var(--ink-3); white-space: nowrap; pointer-events: none; }

/* ---------- 關卡選擇 ---------- */
.pp-s-levels { background-color: var(--ground, #b9dc8c); }
.pp-s-levels::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--noise),
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .22) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(59, 42, 34, .08) 0 2px, transparent 3px);
  background-size: 180px 180px, 46px 46px, 38px 38px;
}
.lv-wrap { position: relative; flex: 1; min-height: 0; display: flex; gap: 16px; padding: 0 calc(var(--sar) + var(--gut)) calc(var(--sab) + 14px) calc(var(--sal) + var(--gut)); }
.lv-board { position: relative; flex: 1; min-width: 0; min-height: 0; }
.lv-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lv-path .p-under { fill: none; stroke: var(--ink); stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lv-path .p-base { fill: none; stroke: #f3dcae; stroke-width: 20; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lv-path .p-dash { fill: none; stroke: #c99d5c; stroke-width: 3; stroke-dasharray: 3 12; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lv-path .p-secret { fill: none; stroke: var(--ink); stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; opacity: .45; vector-effect: non-scaling-stroke; }
.lv-decor { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; pointer-events: none; filter: drop-shadow(2px 2px 0 rgba(59, 42, 34, .55)); }
.lv-decor svg { width: 100%; height: 100%; }
.lv-node {
  --nc: var(--cream); --ns: clamp(58px, 7.2vmin, 80px);
  position: absolute; width: var(--ns); height: var(--ns); margin: calc(var(--ns) / -2) 0 0 calc(var(--ns) / -2);
  background: none; border: 0; padding: 0; cursor: pointer; outline: none;
  animation: pp-pop .5s cubic-bezier(.2, 1.6, .45, 1) both; animation-delay: var(--d, 0s);
}
.lv-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-title); font-size: calc(var(--ns) * .42); line-height: 1; color: var(--ink);
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .65), transparent 50%), var(--nc);
  border: var(--line) solid var(--ink); border-radius: 50%;
  box-shadow: inset 0 -4px 0 rgba(59, 42, 34, .14), 4px 4px 0 var(--ink);
  transition: transform .14s cubic-bezier(.3, 1.6, .5, 1), box-shadow .1s;
}
.lv-node.is-cleared { --nc: var(--mustard); }
.lv-node.is-open:not(.is-cleared) { --nc: var(--cream); }
.lv-node.is-special { --ns: calc(clamp(58px, 7.2vmin, 80px) * 1.12); --nc: var(--sky); }
.lv-node.is-special .lv-badge { color: #fff; text-shadow: 0 2px 0 var(--sky-d); border-radius: 30%; transform: rotate(45deg); }
.lv-node.is-special .lv-badge > * { transform: rotate(-45deg); }
.lv-node.is-boss { --ns: calc(clamp(58px, 7.2vmin, 80px) * 1.38); --nc: var(--tomato); }
.lv-node.is-boss .lv-badge { color: #fff; text-shadow: 0 2px 0 var(--tomato-d); box-shadow: inset 0 0 0 5px var(--tomato), inset 0 0 0 7px rgba(255, 255, 255, .8), 5px 5px 0 var(--ink); }
.lv-node.is-secret { --ns: calc(clamp(58px, 7.2vmin, 80px) * 1.05); --nc: #4a3a63; }
.lv-node.is-secret .lv-badge { color: #fff6d8; border-style: dashed; }
.lv-node.is-secret.is-open .lv-badge { border-style: solid; background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .35), transparent 50%), conic-gradient(from 0deg, #7a4fb0, #3b8fe5, #3fb35a, #f2b632, #e5483b, #7a4fb0); }
.lv-node.is-locked .lv-badge { background: #e7d6b6; color: var(--ink-3); box-shadow: 2px 2px 0 var(--ink); border-style: dashed; }
.lv-node.is-locked.is-special .lv-badge, .lv-node.is-locked.is-boss .lv-badge { background: #d8c6a4; text-shadow: none; }
.lv-node.is-locked.is-secret .lv-badge { background: #6d5d84; color: #d9cdee; }
.lv-crown { position: absolute; left: 50%; top: -22px; margin-left: -20px; filter: drop-shadow(2px 2px 0 var(--ink)); }
.lv-kind {
  position: absolute; left: 50%; top: calc(100% + 1px); translate: -50% 0; z-index: 1;
  font-family: var(--font-title); font-size: 12.5px; white-space: nowrap; padding: 0 7px;
  background: var(--ink); color: var(--cream); border-radius: 6px;
}
.lv-stars { position: absolute; left: 50%; top: calc(100% - 8px); translate: -50% 0; display: flex; gap: 0; padding: 1px 5px 2px; background: var(--cream); border: 2px solid var(--ink); border-radius: 999px; z-index: 2; }
.lv-node.is-boss .lv-stars, .lv-node.is-special .lv-stars, .lv-node.is-secret .lv-stars { top: calc(100% + 12px); }
.lv-stars .pp-ico { width: 17px; height: 17px; margin: 0 -1px; }
.lv-node:hover .lv-badge, .lv-node.is-focus .lv-badge { transform: scale(1.08) rotate(-4deg); }
.lv-node.is-special:hover .lv-badge, .lv-node.is-special.is-focus .lv-badge { transform: scale(1.08) rotate(41deg); }
.lv-node:active .lv-badge { box-shadow: 0 0 0 var(--ink); translate: 4px 4px; }
.lv-node.is-sel .lv-badge { outline: 4px solid var(--cream); outline-offset: 3px; box-shadow: 0 0 0 10px var(--ink), 4px 4px 0 10px var(--ink); }
.lv-node:focus-visible .lv-badge { outline: 3px dashed var(--ink); outline-offset: 8px; }
.lv-pin { position: absolute; left: 50%; bottom: calc(100% + 6px); margin-left: -21px; z-index: 3; animation: wm-bounce 1.1s ease-in-out infinite; filter: drop-shadow(2px 2px 0 var(--ink)); pointer-events: none; }
.lv-node.is-boss .lv-pin, .lv-node.is-special .lv-pin { bottom: calc(100% + 18px); }

.lv-panel {
  position: relative; flex: none; width: 300px; align-self: center;
  display: flex; flex-direction: column; gap: 10px; padding: 26px 20px 20px;
}
.lv-panel .lp-no { font-family: var(--font-title); font-size: 15px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.lv-panel .lp-kind { font-size: 13px; padding: 1px 10px; border-radius: 999px; background: var(--ink); color: var(--cream); font-family: var(--font-title); }
.lv-panel .lp-kind.is-special { background: var(--sky); }
.lv-panel .lp-kind.is-boss { background: var(--tomato); }
.lv-panel .lp-kind.is-secret { background: var(--berry); }
.lv-panel h3 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 28px; line-height: 1.15; }
.lv-panel .lp-tip { margin: 0; font-size: 14px; color: var(--ink-2); min-height: 2.9em; }
.lv-panel .lp-row { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.lv-panel .lp-row b { font-family: var(--font-title); font-weight: 400; font-size: 22px; }
.lv-panel .lp-stars { display: flex; gap: 2px; }
.lv-panel .lp-stars .pp-ico { width: 30px; height: 30px; }
.lv-panel .lp-lock { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 8px 10px; background: var(--paper); border: 2px dashed var(--ink-3); border-radius: 12px; }
.lv-panel .pp-btn { width: 100%; margin-top: 4px; }

/* ---------- 選角 ---------- */
.cs-grid {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px);
  padding: 8px calc(var(--sar) + var(--gut)) 10px calc(var(--sal) + var(--gut));
  align-content: center;
}
.cs-card {
  --pc: var(--tomato);
  position: relative; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 14px 14px; text-align: center;
  animation: pp-pop .5s cubic-bezier(.2, 1.6, .45, 1) both; animation-delay: var(--d, 0s);
}
.cs-card::before { content: ""; position: absolute; left: -3px; right: -3px; top: -3px; height: 50px; background: var(--pc); border: var(--line) solid var(--ink); border-radius: 22px 22px 0 0; }
.cs-head { position: relative; width: 100%; height: 30px; margin-top: -6px; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #fff; }
.cs-p { font-family: var(--font-title); font-size: 24px; text-shadow: 0 2px 0 rgba(59, 42, 34, .5); }
.cs-card[data-slot="3"] .cs-head { color: var(--ink); }
.cs-card[data-slot="3"] .cs-p { text-shadow: 0 2px 0 rgba(255, 250, 240, .6); }
.cs-info { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cs-bot { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: auto; }
.cs-dev { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 1px 8px 1px 3px; background: var(--cream); color: var(--ink); border-radius: 999px; border: 2px solid var(--ink); white-space: nowrap; }
.cs-dev .pp-ico { width: 20px; height: 20px; }
.cs-stage { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 4px; }
.cs-por {
  position: relative; flex: 0 1 auto; width: 168px; min-width: 64px; aspect-ratio: 1;
  border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #fff8ea 0 30%, color-mix(in srgb, var(--pc) 35%, #fff8ea) 31% 100%);
  border: var(--line) solid var(--ink); box-shadow: inset 0 -8px 0 rgba(59, 42, 34, .1), 4px 4px 0 var(--ink);
}
.cs-por img, .cs-por .pp-art { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.cs-por.is-locked img { filter: brightness(0) saturate(0) opacity(.78) drop-shadow(0 0 0 #3b2a22); }
.cs-por.is-locked { background: repeating-linear-gradient(-45deg, #e7d6b6 0 10px, #dcc8a3 10px 20px); }
.cs-lockbadge { position: absolute; right: 2px; bottom: 2px; width: 46px; height: 46px; display: grid; place-items: center; background: var(--cream); border: var(--line) solid var(--ink); border-radius: 50%; box-shadow: 2px 2px 0 var(--ink); z-index: 2; }
.cs-arrow { flex: none; }
.cs-arrow.pp-btn { width: 46px; height: 46px; min-width: 46px; min-height: 46px; padding: 0; border-radius: 50%; }
.cs-name { font-family: var(--font-title); font-size: 26px; line-height: 1.1; display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.cs-name small { font-family: var(--font-body); font-size: 12px; color: var(--ink-3); }
.cs-perk { width: 100%; display: flex; flex-direction: column; gap: 1px; align-items: center; padding: 6px 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; }
.cs-perk b { font-family: var(--font-title); font-weight: 400; font-size: 17px; display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.cs-perk b .pp-ico { width: 20px; height: 20px; }
.cs-perk span { font-size: 13px; color: var(--ink-2); }
.cs-bio { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; min-height: 3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cs-cond { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 14px; color: var(--tomato-d); font-weight: 700; padding: 4px 10px; border: 2px dashed var(--tomato); border-radius: 10px; background: #fff0e8; }
.cs-dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.cs-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--paper-3); }
.cs-dots i.is-on { background: var(--pc); outline: 1.5px solid var(--ink); width: 9px; }
.cs-dots i.is-lock { background: #cdbb98; opacity: .6; }
.cs-ready.pp-btn { width: 100%; }
.cs-keys { font-size: 12px; color: var(--ink-3); min-height: 1.4em; }
.cs-card.is-ready .cs-por { box-shadow: 0 0 0 5px var(--leaf), 4px 4px 0 5px var(--ink); }
.cs-card.is-ready::after {
  content: "準備好了"; position: absolute; top: 108px; right: -10px; z-index: 3;
  font-family: var(--font-title); font-size: 18px; color: #fff; padding: 2px 12px;
  background: var(--leaf); border: var(--line) solid var(--ink); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(10deg); animation: rs-stamp .4s cubic-bezier(.2, 1.6, .45, 1) both;
}
.cs-card.is-empty { justify-content: center; gap: 14px; background: rgba(255, 248, 234, .55); border-style: dashed; box-shadow: none; cursor: pointer; min-height: 300px; }
.cs-card.is-empty::before { display: none; }
.cs-card.is-empty .cs-p { color: var(--ink-3); text-shadow: none; font-size: 40px; }
.cs-ghost { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; border: 3px dashed var(--ink-3); color: var(--ink-3); background: rgba(255, 250, 240, .6); animation: cs-bob 2.2s ease-in-out infinite; }
.cs-ghost .pp-ico { width: 54px; height: 54px; opacity: .55; }
@keyframes cs-bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.cs-joinbox { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cs-join { font-family: var(--font-title); font-size: 22px; animation: cs-blink 1.6s ease-in-out infinite; }
@keyframes cs-blink { 50% { opacity: .45; } }
.cs-devrow { display: flex; gap: 10px; justify-content: center; }
.cs-devrow .pp-ico { width: 34px; height: 34px; }
.cs-tap { font-size: 13px; color: var(--ink-2); }
.cs-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px calc(var(--sar) + var(--gut)) calc(var(--sab) + 16px) calc(var(--sal) + var(--gut)); }
.cs-devlist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.cs-devlist span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; background: rgba(255, 250, 240, .75); border: 2px solid var(--ink-3); border-radius: 999px; }
.cs-devlist .pp-ico { width: 20px; height: 20px; }
.cs-go.is-all { animation: cs-go 1s ease-in-out infinite; }
@keyframes cs-go { 50% { transform: scale(1.05) rotate(-1.5deg); } }

/* ---------- 關前卡 ---------- */
.pp-s-pre { align-items: center; justify-content: flex-start; padding: calc(var(--sat) + 22px) calc(var(--sar) + 16px) calc(var(--sab) + 16px) calc(var(--sal) + 16px); overflow: auto; }
.pl-card {
  width: min(760px, 100%); padding: 26px 26px 20px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px 24px;
  background-image: var(--noise), repeating-linear-gradient(transparent 0 31px, rgba(59, 143, 229, .16) 31px 33px);
  margin: auto;
}
.pl-card::after { content: ""; position: absolute; top: 0; bottom: 0; left: 46px; width: 2px; background: rgba(229, 72, 59, .28); pointer-events: none; }
.pl-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-left: 34px; }
.pl-no { font-family: var(--font-title); font-size: 18px; color: #fff; background: var(--tomato); padding: 2px 12px; border-radius: 10px; border: var(--line) solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.pl-head h2 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.1; }
.pl-kind { font-family: var(--font-title); font-size: 14px; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: var(--cream); }
.pl-sec { position: relative; padding-left: 34px; }
.pl-sec > h4 { margin: 0 0 6px; font-family: var(--font-title); font-weight: 400; font-size: 16px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.pl-dishes { display: flex; flex-direction: column; gap: 8px; }
.pl-dish { display: flex; align-items: center; gap: 10px; }
.pl-dish .pl-di { width: 58px; height: 58px; flex: none; display: grid; place-items: center; background: var(--cream); border: var(--line) solid var(--ink); border-radius: 14px; box-shadow: 2px 2px 0 var(--ink); }
.pl-dish .pl-di img { width: 50px; height: 50px; object-fit: contain; }
.pl-dish b { font-family: var(--font-title); font-weight: 400; font-size: 19px; display: block; line-height: 1.2; }
.pl-parts { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.pl-parts img { width: 24px; height: 24px; object-fit: contain; }
.pl-parts i { font-style: normal; color: var(--ink-3); margin: 0 1px; }
.pl-goal { display: flex; align-items: baseline; gap: 8px; font-size: 16px; }
.pl-goal b { font-family: var(--font-title); font-weight: 400; font-size: 46px; line-height: 1; color: var(--tomato); -webkit-text-stroke: 1.5px var(--ink); }
.pl-goal small { color: var(--ink-2); }
.pl-lines { display: flex; flex-direction: column; gap: 6px; }
.pl-line { display: flex; align-items: center; gap: 10px; padding: 3px 10px 3px 6px; border-radius: 12px; background: rgba(255, 250, 240, .85); border: 2px solid var(--ink); }
.pl-line .st { display: flex; min-width: 72px; }
.pl-line .st .pp-ico { width: 22px; height: 22px; margin-right: -2px; }
.pl-line b { font-family: var(--font-title); font-weight: 400; font-size: 22px; }
.pl-line small { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.pl-line.is-limit { background: #fff0e8; border-style: dashed; }
.pl-rule { grid-column: 1 / -1; margin-left: 34px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #e9f3ff; border: 2px solid var(--ink); border-radius: 14px; font-size: 15px; font-weight: 700; }
.pl-rule.is-boss { background: #ffe9e4; }
.pl-tip { grid-column: 1 / -1; margin: 0 0 0 34px; font-size: 14px; color: var(--ink-2); }
.pl-tip b { color: var(--leaf-d); }
.pl-ctrl { grid-column: 1 / -1; margin-left: 34px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); align-items: center; }
.pl-ctrl > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pl-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 12px; padding-top: 6px; }
.pl-actions .pp-btn-big { min-width: 200px; }
.kc {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px;
  font-family: var(--font-title); font-size: 14px; line-height: 1; color: var(--ink); white-space: nowrap;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 7px; box-shadow: 0 3px 0 var(--ink);
  translate: 0 -1px;
}
.kc.is-a { background: var(--leaf); color: #fff; border-radius: 50%; width: 28px; padding: 0; }
.kc.is-b { background: var(--tomato); color: #fff; border-radius: 50%; width: 28px; padding: 0; }
.kc.is-x { background: var(--sky); color: #fff; border-radius: 50%; width: 28px; padding: 0; }
.kc.is-y { background: var(--mustard); border-radius: 50%; width: 28px; padding: 0; }

/* ---------- HUD ---------- */
.pp-hud {
  position: absolute; inset: 0; pointer-events: none;
  padding: calc(var(--sat) + 10px) calc(var(--sar) + 12px) 0 calc(var(--sal) + 12px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "orders quota right"; align-items: start; align-content: start; gap: 10px;
  animation: hud-in .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes hud-in { from { opacity: 0; transform: translateY(-30px); } }
.hud-orders { grid-area: orders; display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.hud-quota { grid-area: quota; justify-self: center; }
.hud-right { grid-area: right; justify-self: end; display: flex; align-items: flex-start; gap: 10px; }
.hud-pause { pointer-events: auto; }
.hud-pause.pp-btn { width: 52px; height: 52px; min-width: 52px; padding: 0; border-radius: 50%; }

/* 點餐單 */
.tk {
  --tw: 112px;
  position: relative; width: var(--tw); flex: none;
  animation: tk-in .45s cubic-bezier(.2, 1.5, .45, 1) both;
  transform-origin: 50% 0;
}
@keyframes tk-in { from { transform: translateY(-120%) rotate(-12deg); opacity: 0; } to { transform: rotate(var(--tilt, 0deg)); opacity: 1; } }
.tk-paper {
  position: relative; padding: 12px 8px 10px;
  background: #fffdf6; background-image: repeating-linear-gradient(transparent 0 15px, rgba(59, 143, 229, .12) 15px 16px);
  border: var(--line) solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0;
  box-shadow: 3px 3px 0 var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  transform: rotate(var(--tilt, 0deg));
}
.tk-paper::after, .tk-paper::before {
  content: ""; position: absolute; left: -3px; right: -3px; height: 9px; top: 100%;
  background: linear-gradient(135deg, var(--zc) 50%, transparent 50%) 0 0 / 10px 9px repeat-x, linear-gradient(-135deg, var(--zc) 50%, transparent 50%) 0 0 / 10px 9px repeat-x;
}
.tk-paper::before { --zc: var(--ink); top: calc(100% + 3px); }
.tk-paper::after { --zc: #fffdf6; }
.tk-staple { position: absolute; top: -6px; left: 50%; width: 26px; height: 8px; margin-left: -13px; background: linear-gradient(#efe9df, #b9b0a2); border: 2px solid var(--ink); border-radius: 3px; z-index: 2; }
.tk-dish { width: 58px; height: 58px; display: grid; place-items: center; }
.tk-dish img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(59, 42, 34, .2)); }
.tk-name { font-family: var(--font-title); font-size: 13px; line-height: 1.1; text-align: center; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-parts { display: flex; gap: 1px; justify-content: center; flex-wrap: wrap; padding: 2px 4px; background: rgba(242, 182, 50, .18); border-radius: 8px; }
.tk-parts img { width: 22px; height: 22px; object-fit: contain; }
.tk-bar { position: relative; width: 100%; height: 12px; background: #eadbbd; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.tk-bar i { position: absolute; inset: 0; transform-origin: 0 50%; background: var(--leaf); border-radius: 999px; transition: background-color .3s; }
.tk-bar i::after { content: ""; position: absolute; left: 4px; right: 4px; top: 2px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .5); }
.tk.is-y .tk-bar i { background: var(--mustard); }
.tk.is-r .tk-bar i { background: var(--tomato); }
.tk-tag { position: absolute; top: 6px; right: -8px; z-index: 3; font-family: var(--font-title); font-size: 11.5px; padding: 0 6px; border: 2px solid var(--ink); border-radius: 7px; color: #fff; background: var(--leaf); transform: rotate(8deg); white-space: nowrap; }
.tk.is-y .tk-tag { background: var(--mustard); color: var(--ink); }
.tk.is-r .tk-tag { display: none; }
.tk.is-urgent .tk-paper { animation: tk-shake .45s ease-in-out infinite; }
@keyframes tk-shake { 0%, 100% { transform: rotate(var(--tilt, 0deg)); } 25% { transform: rotate(calc(var(--tilt, 0deg) - 3.5deg)) translateX(-1px); } 75% { transform: rotate(calc(var(--tilt, 0deg) + 3.5deg)) translateX(1px); } }
.tk.is-served { animation: tk-served .6s ease-in both; }
.tk-stamp { position: absolute; left: 50%; top: 34%; z-index: 4; translate: -50% -50%; rotate: -16deg; font-family: var(--font-title); font-size: 19px; padding: 1px 8px; border: 3px solid currentColor; border-radius: 8px; background: rgba(255, 253, 246, .85); white-space: nowrap; animation: rs-stamp .3s cubic-bezier(.2, 1.6, .45, 1) both; }
.tk.is-served .tk-stamp { color: var(--leaf-d); }
.tk.is-expired .tk-stamp { color: var(--tomato); }
@keyframes tk-served { 0%, 45% { transform: none; opacity: 1; } 100% { transform: translateY(-40px) scale(.7) rotate(10deg); opacity: 0; } }
.tk.is-expired { animation: tk-expired .7s ease-in both; }
@keyframes tk-expired { 0%, 40% { transform: none; opacity: 1; } 100% { transform: translateY(70px) rotate(-24deg); opacity: 0; } }

/* 已出／目標 */
.hud-quota {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 18px 9px; min-width: 150px;
  background: var(--cream); background-image: var(--noise);
  border: var(--line) solid var(--ink); border-radius: 16px; box-shadow: var(--sh);
}
.hud-quota::before, .hud-quota::after { content: ""; position: absolute; top: -14px; width: 3px; height: 14px; background: var(--ink); }
.hud-quota::before { left: 22%; } .hud-quota::after { right: 22%; }
.hq-row { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-title); white-space: nowrap; }
.hq-row span { font-size: 16px; color: var(--ink-2); }
.hq-row b { font-weight: 400; font-size: 34px; line-height: 1; }
.hq-row .hq-total { font-size: 22px; color: var(--ink-2); }
.hq-row b.is-bump { animation: hq-bump .4s cubic-bezier(.2, 1.8, .45, 1); color: var(--leaf-d); }
@keyframes hq-bump { 0% { transform: scale(1); } 40% { transform: scale(1.5) rotate(-6deg); } 100% { transform: scale(1); } }
.hq-plates { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; max-width: 220px; }
.hq-plates i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: #efe0bf; }
.hq-plates i.is-on { background: var(--mustard); }
.hq-bar { width: 100%; height: 10px; background: #efe0bf; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; display: none; }
.hq-bar i { display: block; height: 100%; background: var(--mustard); transform-origin: 0 50%; }
.hud-quota.is-many .hq-plates { display: none; }
.hud-quota.is-many .hq-bar { display: block; }

/* 番茄計時器＋星線 */
.hud-clock { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hud-timer {
  position: relative; width: 104px; height: 96px; flex: none;
  background: radial-gradient(circle at 32% 26%, #ff8a73 0 12%, transparent 30%), var(--tomato);
  border: var(--line) solid var(--ink); border-radius: 50% 50% 46% 46%;
  box-shadow: inset 0 -7px 0 var(--tomato-d), var(--sh);
  display: grid; place-items: center;
}
.hud-timer::before {
  content: ""; position: absolute; top: -13px; left: 50%; width: 44px; height: 20px; margin-left: -22px;
  background: var(--leaf); border: var(--line) solid var(--ink);
  border-radius: 50% 50% 40% 40% / 70% 70% 30% 30%;
  clip-path: polygon(0 60%, 18% 20%, 32% 55%, 50% 0, 68% 55%, 82% 20%, 100% 60%, 100% 100%, 0 100%);
}
.hud-timer::after { content: ""; position: absolute; top: -20px; left: 50%; width: 7px; height: 12px; margin-left: -3px; background: var(--leaf-d); border: 2px solid var(--ink); border-radius: 4px; }
.ht-face { width: 78px; height: 50px; margin-top: 6px; display: grid; place-items: center; background: var(--cream); border: var(--line) solid var(--ink); border-radius: 22px; box-shadow: inset 0 3px 0 rgba(59, 42, 34, .12); }
.ht-time { font-family: var(--font-title); font-size: 30px; line-height: 1; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.hud-timer.is-warn { animation: ht-warn .5s ease-in-out infinite; }
.hud-timer.is-warn .ht-time { color: var(--tomato-d); }
@keyframes ht-warn { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.hud-timer.is-tick { animation: ht-tick .35s ease-out; }
@keyframes ht-tick { 40% { transform: scale(1.12); } }
.hud-sl { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 10px 6px; background: rgba(255, 250, 240, .94); border: var(--line) solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); }
.hs-stars { display: flex; gap: 2px; }
.hs-stars .hs-s { position: relative; width: 28px; height: 28px; }
.hs-stars .hs-s .pp-ico { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .25s; }
.hs-stars .hs-s .is-off { opacity: 0; }
.hs-stars .hs-s.is-lost .is-on { animation: hs-lose .7s ease-in forwards; }
.hs-stars .hs-s.is-lost .is-off { opacity: 1; }
@keyframes hs-lose { 0% { transform: none; opacity: 1; } 30% { transform: translateY(-8px) rotate(-20deg) scale(1.2); } 100% { transform: translateY(26px) rotate(60deg) scale(.6); opacity: 0; } }
.hs-next { font-size: 12px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hs-next b { font-family: var(--font-title); font-weight: 400; font-size: 15px; color: var(--ink); }
.hs-track { width: 92px; height: 8px; background: #efe0bf; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.hs-track i { display: block; height: 100%; background: var(--leaf); transform-origin: 0 50%; }
.hud-sl.is-2 .hs-track i { background: var(--mustard); }
.hud-sl.is-1 .hs-track i, .hud-sl.is-0 .hs-track i { background: var(--tomato); }

.hud-floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hud-float {
  position: absolute; font-family: var(--font-title); font-size: 26px; white-space: nowrap;
  color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
  animation: hf-up 1.4s cubic-bezier(.2, 1.2, .4, 1) forwards;
}
.hud-float.is-good { color: #8ff0a3; }
.hud-float.is-bad { color: #ff9a8e; }
.hud-float small { font-size: .62em; margin-left: 4px; }
@keyframes hf-up { 0% { transform: translate(-50%, 10px) scale(.5); opacity: 0; } 15% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 30% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -46px); opacity: 0; } }

/* ---------- 暫停／結算／彈出 ---------- */
.pp-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: calc(var(--sat) + 16px) calc(var(--sar) + 16px) calc(var(--sab) + 16px) calc(var(--sal) + 16px);
  background: rgba(43, 28, 20, .55);
  overflow: auto; pointer-events: auto;
  animation: ov-in .25s ease both;
}
.pp-overlay.is-leaving { animation: ov-out .2s ease-in both; pointer-events: none; }
@keyframes ov-in { from { background: rgba(43, 28, 20, 0); } }
@keyframes ov-out { to { opacity: 0; } }
.pp-overlay > .pp-card { animation: card-in .5s cubic-bezier(.2, 1.5, .45, 1) both; margin: auto; }
@keyframes card-in { from { transform: translateY(40px) rotate(-4deg) scale(.85); opacity: 0; } to { transform: rotate(var(--tilt, 0deg)); opacity: 1; } }

.pa-card { --tilt: -1deg; width: min(420px, 100%); padding: 30px 26px 24px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; text-align: center; }
.pa-card h2 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 38px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.pa-card p { margin: 0 0 6px; color: var(--ink-2); font-size: 15px; }
.pa-card .pp-btn { width: 100%; }
.pa-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pa-row .pp-btn { padding-left: 8px; padding-right: 8px; }
.pa-mini { display: flex; justify-content: center; gap: 10px; margin-top: 2px; }

.rs-card { --tilt: .6deg; width: min(800px, 100%); padding: 56px 28px 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 28px; }
.rs-ribbon {
  position: absolute; left: 50%; top: -24px; translate: -50% 0; z-index: 3;
  font-family: var(--font-title); font-size: clamp(24px, 3vw, 34px); color: #fff; white-space: nowrap;
  padding: 6px 42px 8px; background: var(--leaf); border: var(--line) solid var(--ink);
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%);
  text-shadow: 0 2px 0 var(--leaf-d);
  filter: drop-shadow(4px 4px 0 var(--ink));
}
.rs-card.is-lose .rs-ribbon { background: var(--tomato); text-shadow: 0 2px 0 var(--tomato-d); }
.rs-left { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rs-level { font-family: var(--font-title); font-size: 17px; color: var(--ink-2); margin-top: 6px; text-align: center; }
.rs-stars { display: flex; align-items: flex-end; gap: 6px; margin: 4px 0; }
.rs-star { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.rs-star:nth-child(2) { width: 122px; height: 122px; translate: 0 -14px; }
.rs-star .pp-ico { position: absolute; inset: 0; width: 100%; height: 100%; }
.rs-star .rs-stamp { opacity: 0; }
.rs-star.is-on .rs-stamp { animation: rs-stamp .42s cubic-bezier(.2, 1.4, .45, 1) both; }
.rs-star.is-on::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; border: 4px solid var(--mustard); animation: rs-ring .6s ease-out both; pointer-events: none; }
.rs-star small { position: absolute; bottom: -20px; left: 50%; translate: -50% 0; font-family: var(--font-title); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
@keyframes rs-stamp { 0% { opacity: 0; transform: scale(2.8) rotate(-28deg); } 60% { opacity: 1; transform: scale(.88) rotate(4deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes rs-ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.rs-card.is-thud { animation: rs-thud .18s ease-out; }
@keyframes rs-thud { 50% { transform: rotate(var(--tilt, 0deg)) translateY(3px) scale(.995); } }
.rs-time { display: flex; flex-direction: column; align-items: center; margin-top: 14px; }
.rs-time span { font-size: 14px; color: var(--ink-2); }
.rs-time b { font-family: var(--font-title); font-weight: 400; font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.rs-best { display: flex; align-items: center; gap: 10px; font-size: 15px; flex-wrap: wrap; justify-content: center; min-height: 38px; }
.rs-best b { font-family: var(--font-title); font-weight: 400; font-size: 20px; }
.rs-new {
  font-family: var(--font-title); font-size: 18px; color: var(--ink); padding: 3px 14px; white-space: nowrap;
  background: var(--mustard); border: var(--line) solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-6deg); opacity: 0;
}
.rs-new.is-on { animation: rs-new .7s cubic-bezier(.2, 1.6, .45, 1) both, rs-glow 1.6s ease-in-out .7s infinite; }
@keyframes rs-new { 0% { opacity: 0; transform: scale(.2) rotate(-40deg); } 100% { opacity: 1; transform: scale(1) rotate(-6deg); } }
@keyframes rs-glow { 50% { transform: scale(1.08) rotate(-3deg); } }
.rs-right { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.rs-row { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: rgba(255, 250, 240, .9); border: 2px solid var(--ink); border-radius: 12px; font-size: 15px; }
.rs-row b { margin-left: auto; font-family: var(--font-title); font-weight: 400; font-size: 21px; font-variant-numeric: tabular-nums; }
.rs-row.is-good b { color: var(--leaf-d); }
.rs-row.is-bad b { color: var(--tomato-d); }
.rs-row .pp-ico { width: 24px; height: 24px; }
.rs-perfect { align-self: flex-start; font-family: var(--font-title); font-size: 16px; padding: 2px 12px; color: #fff; background: var(--sky); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink); transform: rotate(-3deg); }
.rs-actions { grid-column: 1 / -1; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.rs-actions .pp-btn { min-width: 150px; }

.pp-s-unlock { background: rgba(43, 28, 20, .7); }
.ul-card { --tilt: -1.5deg; width: min(380px, 100%); padding: 40px 24px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; overflow: visible; }
.ul-rays { position: absolute; left: 50%; top: 150px; width: 520px; height: 520px; margin: -260px 0 0 -260px; z-index: -1; pointer-events: none; background: repeating-conic-gradient(rgba(242, 182, 50, .55) 0 10deg, transparent 10deg 24deg); -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 75%); mask: radial-gradient(closest-side, #000 30%, transparent 75%); animation: tt-spin 14s linear infinite; }
.ul-ribbon { position: absolute; top: -22px; left: 50%; translate: -50% 0; font-family: var(--font-title); font-size: 26px; color: #fff; padding: 4px 30px 6px; background: var(--berry); border: var(--line) solid var(--ink); white-space: nowrap; clip-path: polygon(0 0, 100% 0, 93% 50%, 100% 100%, 0 100%, 7% 50%); filter: drop-shadow(4px 4px 0 var(--ink)); }
.ul-por { position: relative; width: 190px; height: 190px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle, #fff8ea 0 45%, #ffe3a1 46% 100%); border: var(--line) solid var(--ink); box-shadow: 5px 5px 0 var(--ink); animation: ul-flip .9s cubic-bezier(.2, 1.4, .45, 1) both; }
.ul-por img, .ul-por .pp-art { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.ul-por::after { content: ""; position: absolute; inset: -30%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .85) 50%, transparent 60%); animation: ul-shine 1.4s ease-out .7s both; }
@keyframes ul-flip { 0% { transform: rotateY(90deg) scale(.6); } 60% { transform: rotateY(-12deg) scale(1.05); } 100% { transform: none; } }
@keyframes ul-shine { from { transform: translateX(-70%); } to { transform: translateX(70%); } }
.ul-card h3 { margin: 4px 0 0; font-family: var(--font-title); font-weight: 400; font-size: 34px; }
.ul-perk { font-size: 15px; padding: 6px 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; }
.ul-perk b { font-family: var(--font-title); font-weight: 400; }
.ul-count { font-size: 13px; color: var(--ink-2); }
.ul-card .pp-btn { min-width: 200px; margin-top: 6px; }
.ul-confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.ul-confetti i { position: absolute; top: 40%; left: 50%; width: 10px; height: 16px; border: 2px solid var(--ink); border-radius: 3px; background: var(--c); animation: ul-conf 1.3s cubic-bezier(.2, .8, .4, 1) both; animation-delay: var(--d); }
@keyframes ul-conf { 0% { transform: translate(-50%, -50%) rotate(0) scale(.3); opacity: 1; } 100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)) scale(1); opacity: 0; } }

/* ---------- 連線大廳 ---------- */
.lb-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 10px calc(var(--sar) + var(--gut)) calc(var(--sab) + 18px) calc(var(--sal) + var(--gut)); }
.lb-entry { width: min(860px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: auto 0; }
.lb-panel { padding: 30px 22px 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.lb-panel h3 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 28px; display: flex; align-items: center; gap: 8px; }
.lb-panel p { margin: 0; font-size: 14px; color: var(--ink-2); }
.lb-panel .pp-btn { width: 100%; }
.lb-codein { position: relative; display: flex; gap: 10px; justify-content: center; }
.lb-codein input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; border: 0; cursor: text; }
.lb-box { width: 58px; height: 68px; display: grid; place-items: center; font-family: var(--font-title); font-size: 36px; background: var(--cream); border: var(--line) solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); }
.lb-box.is-cur { border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky), 3px 3px 0 3px var(--ink); }
.lb-codein:focus-within .lb-box.is-cur::after { content: ""; width: 3px; height: 34px; background: var(--ink); animation: cs-blink 1s steps(2) infinite; }
.lb-err { color: var(--tomato-d); font-weight: 700; font-size: 14px; min-height: 1.4em; }
.lb-room { width: min(1040px, 100%); display: flex; flex-direction: column; gap: 16px; margin: auto 0; }
.lb-codebar { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; font-family: var(--font-title); font-size: 18px; }
.lb-tiles { display: flex; gap: 8px; }
.lb-tiles i { font-style: normal; width: 52px; height: 60px; display: grid; place-items: center; font-size: 34px; color: #fff; background: var(--sky); border: var(--line) solid var(--ink); border-radius: 12px; box-shadow: inset 0 -5px 0 var(--sky-d), 3px 3px 0 var(--ink); }
.lb-tiles i:nth-child(2) { background: var(--tomato); box-shadow: inset 0 -5px 0 var(--tomato-d), 3px 3px 0 var(--ink); }
.lb-tiles i:nth-child(3) { background: var(--leaf); box-shadow: inset 0 -5px 0 var(--leaf-d), 3px 3px 0 var(--ink); }
.lb-tiles i:nth-child(4) { background: var(--mustard); color: var(--ink); box-shadow: inset 0 -5px 0 var(--mustard-d), 3px 3px 0 var(--ink); }
.lb-seats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lb-seat { --pc: var(--tomato); position: relative; padding: 14px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.lb-seat::before { content: ""; position: absolute; left: -3px; right: -3px; top: -3px; height: 14px; background: var(--pc); border: var(--line) solid var(--ink); border-radius: 22px 22px 0 0; }
.lb-seat .cs-por { width: 96px; }
.lb-seat b { font-family: var(--font-title); font-weight: 400; font-size: 20px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-seat .lb-st { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.lb-seat .lb-st .pp-ico { width: 22px; height: 22px; }
.lb-seat.is-empty { background: rgba(255, 248, 234, .5); border-style: dashed; box-shadow: none; color: var(--ink-3); justify-content: center; min-height: 190px; }
.lb-seat.is-empty::before { display: none; }
.lb-seat.is-you { box-shadow: 0 0 0 4px var(--pc), var(--sh-lg); }
.lb-host { position: absolute; top: -18px; right: 8px; filter: drop-shadow(2px 2px 0 var(--ink)); }
.lb-you { position: absolute; top: 14px; left: 8px; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 6px; background: var(--ink); color: var(--cream); }
.lb-wait { font-size: 13px; animation: cs-blink 1.6s ease-in-out infinite; }
.lb-ping { font-size: 11px; color: var(--ink-3); }
.lb-bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.lb-level { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.lb-level .lb-lv-t { font-size: 13px; color: var(--ink-2); }
.lb-level b { font-family: var(--font-title); font-weight: 400; font-size: 22px; display: block; line-height: 1.2; }
.lb-level .pp-btn { margin-left: auto; }
.lb-acts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- 設定 ---------- */
.st-body { flex: 1; min-height: 0; overflow: auto; padding: 14px calc(var(--sar) + var(--gut)) calc(var(--sab) + 18px) calc(var(--sal) + var(--gut)); }
.st-grid { width: min(1080px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 26px; align-items: start; }
.st-card { padding: 28px 22px 20px; display: flex; flex-direction: column; gap: 16px; }
.st-card h3 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 24px; display: flex; align-items: center; gap: 8px; }
.st-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 46px; align-items: center; gap: 12px; }
.st-row > label, .st-row > .st-l { display: flex; align-items: center; gap: 6px; font-family: var(--font-title); font-size: 18px; }
.st-row > label span, .st-row > .st-l span { white-space: nowrap; }
.st-row output { font-family: var(--font-title); font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.st-row.is-seg { grid-template-columns: 112px minmax(0, 1fr); }
.pp-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; touch-action: pan-y; }
.pp-range:focus { outline: none; }
.pp-range::-webkit-slider-runnable-track { height: 16px; border-radius: 999px; border: var(--line) solid var(--ink); background: linear-gradient(90deg, var(--leaf) 0 var(--v, 50%), #efe0bf var(--v, 50%)); }
.pp-range::-moz-range-track { height: 10px; border-radius: 999px; border: var(--line) solid var(--ink); background: #efe0bf; }
.pp-range::-moz-range-progress { height: 10px; border-radius: 999px; background: var(--leaf); }
.pp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 36px; height: 36px; margin-top: -13px; border-radius: 50%; background: var(--mustard); border: var(--line) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.pp-range::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: var(--mustard); border: var(--line) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.pp-range:focus-visible::-webkit-slider-thumb { outline: 3px dashed var(--ink); outline-offset: 3px; }
.pp-seg { display: flex; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 14px; padding: 3px; gap: 3px; box-shadow: 3px 3px 0 var(--ink); }
.pp-seg button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: transparent; font-family: var(--font-title); font-size: 17px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-2); padding: 0 8px; white-space: nowrap; }
.pp-seg button.is-on { background: var(--sky); color: #fff; box-shadow: inset 0 -3px 0 var(--sky-d); border: 2px solid var(--ink); text-shadow: 0 1px 0 var(--sky-d); }
.pp-seg button:focus-visible { outline: 3px dashed var(--ink); outline-offset: 1px; }
.st-note { font-size: 13px; color: var(--ink-2); margin: -6px 0 0 124px; }

/* 操作說明 */
.ch-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ch-tabs .pp-seg { width: 100%; }
.ch-pane { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 20px; align-items: center; padding: 6px 2px 0; }
.ch-move { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ch-move .ch-l { font-size: 13px; color: var(--ink-2); }
.ch-wasd { display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: 44px 44px; gap: 5px; }
.ch-wasd .kc { width: 44px; height: 44px; font-size: 18px; min-width: 0; }
.ch-wasd .kc:nth-child(1) { grid-area: 1 / 2; }
.ch-wasd .kc:nth-child(2) { grid-area: 2 / 1; }
.ch-wasd .kc:nth-child(3) { grid-area: 2 / 2; }
.ch-wasd .kc:nth-child(4) { grid-area: 2 / 3; }
.ch-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ch-list li { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.ch-list li .ch-k { display: flex; align-items: center; gap: 4px; min-width: 104px; }
.ch-emotes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
.ch-emotes span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; background: var(--cream); border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); }
.ch-menu { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); padding: 6px 10px; border-radius: 10px; background: rgba(59, 143, 229, .1); border: 2px dashed rgba(59, 143, 229, .5); }
.ch-pad { width: 150px; height: auto; }
.ch-phone { width: 170px; height: auto; }
.ch-card { --tilt: -.6deg; width: min(640px, 100%); padding: 28px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.ch-card h2 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 28px; display: flex; align-items: center; gap: 8px; }
.ch-card .ch-close { position: absolute; top: 12px; right: 12px; }
.ch-okrow { display: flex; justify-content: flex-end; }

/* ---------- 廚師圖鑑 ---------- */
.bk-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; padding: 6px calc(var(--sar) + var(--gut)) calc(var(--sab) + 16px) calc(var(--sal) + var(--gut)); }
.bk-grid { overflow: auto; display: grid; grid-auto-rows: max-content; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; align-content: start; padding: 6px 8px 14px 4px; overscroll-behavior: contain; }
.bk-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; background: var(--cream); border: var(--line) solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; outline: none; transform: rotate(var(--tilt, 0deg)); transition: transform .12s; min-height: 44px; }
.bk-item .bk-p { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; position: relative; background: var(--paper); border: 2px solid var(--ink); }
.bk-item .bk-p img, .bk-item .bk-p .pp-art { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; }
.bk-item b { font-family: var(--font-title); font-weight: 400; font-size: 15px; white-space: nowrap; }
.bk-item small { font-size: 10px; color: var(--ink-3); position: absolute; top: 4px; left: 7px; font-family: var(--font-title); }
.bk-item.is-locked { background: #ecdcbc; }
.bk-item.is-locked .bk-p img { filter: brightness(0) opacity(.7); }
.bk-item.is-locked .bk-lk { position: absolute; right: 2px; top: 52px; }
.bk-item:hover, .bk-item.is-focus { transform: rotate(0) scale(1.05); }
.bk-item.is-sel { background: var(--mustard); }
.bk-item:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
.bk-detail { align-self: start; padding: 28px 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.bk-detail .cs-por { width: 170px; }
.bk-detail h3 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 30px; }
.bk-detail p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* ---------- 橫幅與吐司 ---------- */
.pp-banner { position: absolute; inset: 0; display: grid; place-items: center; }
.bn-text {
  position: relative; font-family: var(--font-title); font-size: clamp(64px, 13vw, 180px); line-height: 1; white-space: nowrap;
  color: var(--c, var(--mustard));
  animation: bn-in .5s cubic-bezier(.2, 1.6, .45, 1) both;
}
.bn-text::before, .bn-text::after { content: attr(data-t); position: absolute; left: 0; top: 0; z-index: -1; }
.bn-text::before { color: var(--ink); -webkit-text-stroke: .16em var(--ink); transform: translate(.04em, .05em); }
.bn-text::after { color: var(--cream); -webkit-text-stroke: .1em var(--cream); }
.pp-banner.is-out .bn-text { animation: bn-out .35s ease-in both; }
@keyframes bn-in { 0% { transform: scale(2.4) rotate(-14deg); opacity: 0; } 100% { transform: scale(1) rotate(-4deg); opacity: 1; } }
@keyframes bn-out { to { transform: scale(.6) rotate(8deg) translateY(-40px); opacity: 0; } }
.bn-sub { position: absolute; top: calc(50% + clamp(50px, 8vw, 110px)); left: 50%; translate: -50% 0; font-family: var(--font-title); font-size: 22px; background: var(--cream); border: var(--line) solid var(--ink); border-radius: 12px; padding: 2px 16px; box-shadow: 3px 3px 0 var(--ink); animation: pp-pop .5s .15s both; }

.pp-toasts { position: absolute; left: 0; right: 0; top: calc(var(--sat) + 76px); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pp-toast {
  position: relative; max-width: min(420px, 90vw); padding: 10px 20px 10px 16px;
  display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700;
  background: #fff9c9; border: var(--line) solid var(--ink); border-radius: 4px 14px 14px 14px;
  box-shadow: 4px 4px 0 var(--ink); transform: rotate(-1.2deg);
  animation: to-in .4s cubic-bezier(.2, 1.6, .45, 1) both;
}
.pp-toast::before { content: ""; position: absolute; top: -10px; left: 50%; width: 60px; height: 18px; margin-left: -30px; background: rgba(242, 182, 50, .75); transform: rotate(3deg); }
.pp-toast.is-out { animation: to-out .3s ease-in both; }
@keyframes to-in { from { transform: translateY(-30px) rotate(-8deg); opacity: 0; } }
@keyframes to-out { to { transform: translateY(-20px) rotate(4deg); opacity: 0; } }

/* ---------- 響應式 ---------- */
/* 手機直向：標題頁貼紙改排在上下留白處，不擠選單 */
@media (orientation: portrait) and (max-width: 600px) {
  .tt-dood:nth-child(1) { left: 4% !important; top: 4% !important; }
  .tt-dood:nth-child(2) { left: 78% !important; top: 5% !important; }
  .tt-dood:nth-child(3) { left: 76% !important; top: 72% !important; }
  .tt-dood:nth-child(4) { left: 5% !important; top: 71% !important; }
  .tt-dood:nth-child(5), .tt-dood:nth-child(8) { display: none; }
  .tt-dood:nth-child(6) { left: 82% !important; top: 30% !important; }
  .tt-dood:nth-child(7) { left: 43% !important; top: 75% !important; }
}
@media (min-width: 1300px) and (min-height: 860px) {
  .cs-card .cs-por { width: 200px; }
  .cs-card { gap: 10px; }
}
@media (max-width: 1100px) {
  .lv-panel { width: 260px; }
  .bk-body { grid-template-columns: minmax(0, 1fr) 270px; }
}
@media (max-width: 900px) {
  .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-card { flex-direction: row; flex-wrap: wrap; justify-content: center; text-align: left; align-items: center; gap: 6px 12px; padding-top: 12px; }
  .cs-card .cs-head { flex-basis: 100%; }
  .cs-card .cs-stage { width: auto; margin: 0; }
  .cs-card .cs-por { width: 116px; }
  .cs-card .cs-info { flex: 1; width: auto; min-width: 150px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
  .cs-card .cs-perk { align-items: flex-start; }
  .cs-card .cs-name { justify-content: flex-start; }
  .cs-card .cs-bot { flex-basis: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  .cs-card.is-ready::after { top: 34px; right: 8px; }
  .cs-card.is-empty { min-height: 200px; flex-direction: column; text-align: center; }
  .st-grid { grid-template-columns: minmax(0, 1fr); }
  .lb-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-bottom { grid-template-columns: minmax(0, 1fr); }
  .bk-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .bk-detail { order: -1; flex-direction: row; text-align: left; align-self: stretch; padding: 20px 16px 14px; gap: 14px; flex-wrap: wrap; }
  .bk-detail .cs-por { width: 104px; }
  .bk-detail .bk-dt { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
}
@media (max-width: 900px) and (orientation: portrait) {
  /* 直向（手機、平板）：頭像＋左右鈕在左、名字天賦在右、準備鈕整排 */
  .cs-card:not(.is-empty) {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "head head" "stage info" "bot bot";
    gap: 8px 14px; align-items: center; text-align: left; padding: 10px 14px 12px;
  }
  .cs-card:not(.is-empty) .cs-head { grid-area: head; margin-bottom: 6px; }
  .cs-card:not(.is-empty)::before { height: 46px; }
  .cs-card:not(.is-empty) .cs-stage { grid-area: stage; width: auto; margin: 0; display: grid; grid-template-columns: 44px 44px; justify-content: center; gap: 6px 8px; }
  .cs-card:not(.is-empty) .cs-stage .cs-por { grid-column: 1 / -1; grid-row: 1; width: 96px; justify-self: center; }
  .cs-card:not(.is-empty) .cs-stage .cs-arrow { grid-row: 2; }
  .cs-card:not(.is-empty) .cs-info { grid-area: info; width: auto; min-width: 0; align-items: flex-start; gap: 6px; }
  .cs-card:not(.is-empty) .cs-name { justify-content: flex-start; font-size: 24px; }
  .cs-card:not(.is-empty) .cs-perk { align-items: flex-start; }
  .cs-card:not(.is-empty) .cs-bio { min-height: 0; }
  .cs-card:not(.is-empty) .cs-bot { grid-area: bot; }
}
@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) {
  .cs-card:not(.is-empty) .cs-stage .cs-por { width: 124px; }
}
@media (orientation: portrait) {
  .lv-wrap { flex-direction: column; gap: 10px; }
  .lv-panel { width: 100%; align-self: stretch; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "no no" "name act" "tip act" "row act"; gap: 4px 14px; padding: 22px 16px 14px; }
  .lv-panel .lp-no { grid-area: no; }
  .lv-panel h3 { grid-area: name; font-size: 24px; }
  .lv-panel .lp-tip { grid-area: tip; min-height: 0; }
  .lv-panel .lp-meta { grid-area: row; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
  .lv-panel .lp-act { grid-area: act; align-self: center; }
  .lv-panel .lp-act .pp-btn { width: auto; min-width: 120px; }
  .pp-hud { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "quota right" "orders orders"; row-gap: 12px; }
  .hud-quota { justify-self: start; }
}
@media (max-width: 760px) {
  .pp-top { gap: 10px; }
  .pp-top-title { font-size: 22px; padding: 3px 14px 5px; max-width: 50vw; }
  .pp-chip { font-size: 15px; min-height: 36px; padding: 3px 10px 3px 6px; }
  .tt-menu { gap: 12px; }
  .tt-menu .tt-main { min-height: 64px; font-size: 26px; }
  .tt-menu .pp-btn:not(.tt-main) { font-size: 17px; padding: 8px 4px; min-height: 84px; }
  .pl-card { grid-template-columns: minmax(0, 1fr); padding: 24px 16px 16px; }
  .pl-card::after { left: 30px; }
  .pl-head, .pl-sec { padding-left: 22px; }
  .pl-rule, .pl-tip, .pl-ctrl { margin-left: 22px; }
  .pl-actions .pp-btn-big { min-width: 0; flex: 1; }
  .rs-card { grid-template-columns: minmax(0, 1fr); padding: 34px 16px 18px; }
  .rs-actions .pp-btn { min-width: 0; flex: 1; padding: 8px 10px; }
  .lb-entry { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .lb-bottom { grid-template-columns: minmax(0, 1fr); }
  .lb-acts { justify-content: stretch; }
  .lb-acts .pp-btn { flex: 1; }
  .st-row { grid-template-columns: 98px minmax(0, 1fr) 40px; gap: 8px; }
  .st-row.is-seg { grid-template-columns: 98px minmax(0, 1fr); }
  .st-note { margin-left: 92px; }
  .ch-pane { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .ch-list li .ch-k { min-width: 92px; }
}
@media (max-width: 600px) {
  .cs-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; overflow: auto; padding-bottom: 16px; }
  .cs-card.is-empty ~ .cs-card.is-empty { display: none; }
  .cs-card .cs-keys { display: none; }
  .cs-card.is-ready::after { top: 42px; right: 10px; font-size: 15px; }
  .ch-tabs .pp-seg button { min-width: 0; padding: 0 4px; gap: 3px; font-size: 16px; }
  .ch-tabs .pp-seg button .pp-ico { display: none; }
  .cs-card.is-empty { min-height: 0; flex-direction: row; padding: 14px; gap: 12px; }
  .cs-card.is-empty .cs-p { font-size: 28px; }
  .cs-card.is-empty .cs-devrow .pp-ico { width: 26px; height: 26px; }
  .cs-foot { flex-direction: column; align-items: stretch; }
  .cs-foot .pp-btn { width: 100%; }
  .cs-devlist { justify-content: center; }
  .hud-orders { gap: 6px; }
  .tk { --tw: 80px; }
  .tk-paper { padding: 9px 5px 7px; gap: 3px; }
  .tk-dish { width: 42px; height: 42px; }
  .tk-name { font-size: 11px; }
  .tk-parts img { width: 16px; height: 16px; }
  .tk-bar { height: 10px; }
  .tk-tag { font-size: 10px; right: -6px; }
  .hud-timer { width: 84px; height: 78px; }
  .ht-face { width: 64px; height: 40px; border-radius: 18px; }
  .ht-time { font-size: 24px; }
  .hud-quota { min-width: 0; padding: 5px 12px 7px; }
  .hq-plates { gap: 2px; max-width: 172px; }
  .hq-plates i { width: 9px; height: 9px; border-width: 1.5px; box-sizing: content-box; }
  .hq-row b { font-size: 28px; }
  .hs-stars .hs-s { width: 22px; height: 22px; }
  .hs-track { width: 72px; }
  .hud-pause.pp-btn { width: 48px; height: 48px; min-width: 48px; }
  .lb-seats { gap: 10px; }
  .lb-acts { flex-wrap: wrap; }
  .lb-acts .pp-btn-big { flex-basis: 100%; }
  .lb-level b { font-size: 18px; }
  .lv-panel { grid-template-areas: "no no" "name name" "tip tip" "row act"; }
  .lv-panel .lp-meta { white-space: nowrap; }
  /* 關前卡太長要捲時，「開工！」一直黏在畫面底 */
  .pl-actions { position: sticky; bottom: 0; z-index: 3; margin: 2px -16px -16px; padding: 10px 16px calc(var(--sab) + 14px); background: var(--cream); border-top: 2px dashed rgba(59, 42, 34, .25); border-radius: 0 0 20px 20px; }
  .pa-row .pp-btn { flex-direction: column; gap: 2px; min-height: 64px; font-size: 16px; padding: 6px 4px; }
  .rs-actions .pp-btn { font-size: 17px; gap: 4px; padding: 8px 6px; }
  .rs-actions .pp-btn .pp-ico { width: 20px; height: 20px; }
  .st-row.is-seg { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .st-note { margin-left: 0; }
  .pp-top-title small { display: none; }
  .pp-top { gap: 8px; }
  .pp-top-title { padding: 3px 12px 5px; max-width: 58vw; }
  .lb-seat .cs-por { width: 72px; }
  .lb-tiles i { width: 44px; height: 52px; font-size: 28px; }
  .lb-box { width: 52px; height: 62px; }
  .bk-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 9px; }
  .bk-item .bk-p { width: 58px; height: 58px; }
  .bk-item.is-locked .bk-lk { top: 40px; }
  .rs-star { width: 66px; height: 66px; }
  .rs-star:nth-child(2) { width: 82px; height: 82px; }
  .rs-time b { font-size: 52px; }
}
@media (max-width: 380px) {
  .tk { --tw: 72px; }
  .tk-dish { width: 36px; height: 36px; }
  .tt-menu .pp-btn:not(.tt-main) { font-size: 15.5px; }
  .hud-quota { padding: 5px 8px 7px; }
  .hq-plates i { width: 7px; height: 7px; }
}

/* 手機橫向：高度很矮 */
@media (max-height: 520px) and (orientation: landscape) {
  .pp-top { padding-top: calc(var(--sat) + 8px); padding-bottom: 4px; }
  .pp-top-title { font-size: 20px; }
  .pp-btn-round { width: 46px; height: 46px; }
  .tt-wrap { flex-direction: row; gap: 4vw; padding-bottom: calc(var(--sab) + 40px); }
  .tt-line1 { font-size: clamp(44px, 8vw, 80px); }
  .tt-sign { font-size: clamp(34px, 6vw, 60px); }
  .tt-en { margin-top: 10px; font-size: 14px; }
  .tt-menu { width: min(430px, 50vw); gap: 10px; }
  .tt-menu .tt-main { min-height: 58px; font-size: 24px; }
  .tt-menu .pp-btn:not(.tt-main) { min-height: 72px; font-size: 16px; padding: 6px 4px; }
  .tt-menu .pp-btn:not(.tt-main) .pp-ico { width: 26px; height: 26px; }
  .tt-foot { bottom: calc(var(--sab) + 6px); }
  .tt-foot .tt-hint { display: none; }
  /* 矮螢幕：下排兩張貼紙（麵包、叉子）會壓到「總星數」跟登入提示，中間兩張（蛋、葉子）
     會躲在招牌字跟選單後面只露一角，都收起來，只留四個角 */
  .tt-dood:nth-child(5), .tt-dood:nth-child(6), .tt-dood:nth-child(7), .tt-dood:nth-child(8) { display: none; }
  .tt-paws { display: none; }
  .wm-hint { display: none; }
  .lv-wrap { gap: 10px; padding-bottom: calc(var(--sab) + 8px); }
  .lv-panel { width: 230px; padding: 20px 14px 12px; gap: 6px; }
  .lv-panel h3 { font-size: 22px; }
  .lv-panel .lp-tip { font-size: 12.5px; min-height: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lv-panel .lp-stars .pp-ico { width: 24px; height: 24px; }
  .lv-node { --ns: 50px; }
  .lv-node.is-special { --ns: 54px; }
  .lv-node.is-boss { --ns: 64px; }
  .lv-node.is-secret { --ns: 52px; }
  .lv-stars .pp-ico { width: 15px; height: 15px; }
  .lv-kind { font-size: 10.5px; }
  .lv-decor { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
  .cs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-top: 2px; padding-bottom: 4px; align-content: stretch; }
  .cs-card { flex-direction: column; flex-wrap: nowrap; text-align: center; align-items: center; gap: 4px; padding: 8px 8px 8px; }
  .cs-card::before { height: 34px; }
  .cs-head { height: 22px; }
  .cs-p { font-size: 18px; }
  .cs-dev { font-size: 11px; }
  .cs-card .cs-stage { width: 100%; }
  .cs-card .cs-por { width: 74px; }
  .cs-arrow.pp-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .cs-card .cs-info { align-items: center; min-width: 0; gap: 3px; width: 100%; }
  .cs-name { font-size: 19px; }
  .cs-name small { display: none; }
  .cs-perk { padding: 3px 6px; align-items: center !important; }
  .cs-perk b { font-size: 14px; }
  .cs-perk span { font-size: 11px; }
  .cs-bio, .cs-dots, .cs-keys { display: none; }
  .cs-cond { font-size: 11.5px; padding: 2px 6px; }
  .cs-ready.pp-btn { min-height: 44px; font-size: 16px; padding: 4px 8px; }
  .cs-card.is-empty { min-height: 0; gap: 8px; }
  .cs-card.is-empty .cs-p { font-size: 26px; }
  .cs-join { font-size: 16px; }
  .cs-devrow .pp-ico { width: 24px; height: 24px; }
  .cs-tap { display: none; }
  .cs-card.is-ready::after { top: 28px; right: -4px; font-size: 14px; padding: 1px 8px; }
  .cs-foot { padding-bottom: calc(var(--sab) + 8px); flex-direction: row; }
  .cs-foot .pp-btn { width: auto; }
  .cs-foot .pp-btn-big { min-height: 50px; font-size: 21px; }
  .pp-s-pre { padding-top: calc(var(--sat) + 14px); padding-bottom: calc(var(--sab) + 4px); }
  .pl-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 8px 18px; padding: 20px 18px 12px; }
  .pl-head h2 { font-size: 24px; }
  .pl-dish .pl-di { width: 44px; height: 44px; }
  .pl-dish .pl-di img { width: 38px; height: 38px; }
  .pl-dish b { font-size: 16px; }
  .pl-goal b { font-size: 34px; }
  .pl-line b { font-size: 18px; }
  .pl-ctrl, .pl-tip { display: none; }
  .pl-rule { padding: 5px 12px; font-size: 13px; }
  .pl-actions { padding-top: 0; }
  .pl-actions .pp-btn-big { min-height: 52px; font-size: 22px; }
  .pp-hud { padding-top: calc(var(--sat) + 6px); }
  .tk { --tw: 84px; }
  .tk-paper { padding: 8px 5px 6px; gap: 3px; }
  .tk-dish { width: 40px; height: 40px; }
  .tk-name { font-size: 11px; }
  .tk-parts img { width: 16px; height: 16px; }
  .tk-bar { height: 9px; }
  .hud-timer { width: 76px; height: 70px; }
  .hud-timer::before { top: -11px; width: 36px; height: 16px; margin-left: -18px; }
  .ht-face { width: 58px; height: 36px; border-radius: 16px; }
  .ht-time { font-size: 22px; }
  .hud-clock { flex-direction: row; align-items: flex-start; }
  .hs-stars .hs-s { width: 20px; height: 20px; }
  .hs-track { width: 64px; }
  .hud-quota { min-width: 0; padding: 4px 12px 6px; }
  .hq-row b { font-size: 26px; }
  .hq-plates i { width: 9px; height: 9px; }
  .rs-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 26px 18px 12px; gap: 6px 18px; }
  .rs-star { width: 54px; height: 54px; }
  .rs-star:nth-child(2) { width: 66px; height: 66px; }
  .rs-star small { font-size: 11px; bottom: -16px; }
  .rs-time { margin-top: 8px; }
  .rs-time b { font-size: 40px; }
  .rs-level { margin-top: 2px; font-size: 14px; }
  .rs-best { min-height: 0; font-size: 13px; }
  .rs-row { padding: 3px 10px; font-size: 13px; }
  .rs-row b { font-size: 17px; }
  .rs-actions { margin-top: 2px; }
  .rs-actions .pp-btn { min-height: 46px; font-size: 18px; }
  .pa-card { padding: 22px 20px 16px; gap: 8px; }
  .pa-card h2 { font-size: 28px; }
  .pa-card .pp-btn { min-height: 46px; }
  .pa-row { grid-template-columns: 1fr 1fr 1fr; }
  .ul-card { flex-direction: row; flex-wrap: wrap; justify-content: center; width: min(560px, 100%); padding: 28px 20px 16px; text-align: left; }
  .ul-por { width: 120px; height: 120px; }
  .ul-rays { top: 50%; }
  .ul-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
  .ul-card h3 { font-size: 26px; }
  .lb-entry { grid-template-columns: 1fr 1fr; gap: 16px; }
  .lb-panel { padding: 22px 16px 14px; gap: 8px; }
  .lb-panel h3 { font-size: 22px; }
  .lb-seat .cs-por { width: 60px; }
  .lb-seat.is-empty { min-height: 120px; }
  .lb-seats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bk-body { grid-template-columns: minmax(0, 1fr) 250px; grid-template-rows: none; }
  .bk-detail { order: 0; flex-direction: column; text-align: center; padding: 18px 12px 12px; gap: 6px; }
  .bk-detail .cs-por { width: 80px; }
  .bk-detail h3 { font-size: 22px; }
  .bk-detail .bk-dt { align-items: center; min-width: 0; }
  .bk-detail p { font-size: 12.5px; }
  .st-card { padding: 22px 16px 14px; gap: 10px; }
  .pp-toasts { top: calc(var(--sat) + 54px); }
  /* 關前卡：規則跟按鈕併成同一排，一頁看完不用捲 */
  .pl-rule { grid-column: 1; margin-left: 22px; align-self: center; }
  .pl-actions { grid-column: 2; align-self: center; }
  .pl-actions .pp-btn-big { min-width: 0; flex: 1; }
  .pl-actions .pp-btn:not(.pp-btn-big) { min-height: 52px; }
  .pl-sec { padding-left: 22px; }
  .pl-head { padding-left: 22px; }
  .pl-card::after { left: 34px; }
  /* 解鎖：光芒不撐出捲軸 */
  .pp-s-unlock { overflow: hidden; }
  /* 房間：座位改橫躺，整頁一屏看完 */
  .lb-body { gap: 8px; padding-top: 4px; }
  .lb-room { gap: 10px; }
  .lb-codebar { font-size: 15px; gap: 10px; }
  .lb-tiles i { width: 38px; height: 42px; font-size: 24px; }
  .lb-seats { gap: 10px; }
  .lb-bottom { grid-template-columns: minmax(0, 1fr) auto; }
  .lb-level { padding: 6px 10px; }
  .lb-level b { font-size: 18px; }
  .lb-acts { gap: 8px; flex-wrap: nowrap; }
  .lb-acts .pp-btn { padding-left: 12px; padding-right: 12px; }
  .lb-acts .pp-btn-big { min-height: 48px; font-size: 20px; }
  /* 操作說明：縮排距 */
  .ch-card { padding: 20px 18px 14px; gap: 8px; }
  .ch-card h2 { font-size: 22px; }
  .ch-pane { gap: 8px 16px; }
  .ch-list { gap: 3px; }
  .ch-list li { font-size: 14px; }
  .ch-wasd { grid-template-columns: repeat(3, 38px); grid-template-rows: 38px 38px; gap: 4px; }
  .ch-wasd .kc { width: 38px; height: 38px; font-size: 16px; }
  .ch-menu { display: none; }
  .ch-emotes { gap: 5px; font-size: 13px; }
  .ch-emotes span { padding: 1px 8px 1px 3px; }
  .ch-okrow { position: absolute; top: 12px; right: 66px; }
  .ch-okrow .pp-btn { min-height: 44px; font-size: 17px; padding: 4px 14px; }
  .ul-card { padding-top: 40px; }
}

/* 手機（直向窄、橫向矮）：房間座位改橫躺 */
@media (max-width: 600px), (max-height: 520px) and (orientation: landscape) {
  .lb-seat { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 0; align-items: center; text-align: left; padding: 14px 8px 8px; }
  .lb-seat .cs-por { width: 46px; grid-row: 1 / 3; }
  .lb-seat b { font-size: 17px; }
  .lb-seat .lb-st { font-size: 12px; white-space: nowrap; gap: 3px; }
  .lb-seat .lb-st .pp-ico { width: 18px; height: 18px; }
  .lb-seat .lb-ping { display: none; }
  .lb-seat .lb-you { top: auto; bottom: -10px; }
  .lb-host { top: -16px; }
  .lb-host .pp-ico { width: 26px; height: 26px; }
  .lb-seat.is-empty { min-height: 0; display: flex; flex-direction: row; gap: 8px; padding: 14px 8px; }
}

/* ---------- 減少動態 ---------- */
@media (prefers-reduced-motion: reduce) {
  .pp-ui *, .pp-ui *::before, .pp-ui *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .tt-sun, .ul-rays { animation: none !important; }
}
.pp-ui.is-calm *, .pp-ui.is-calm *::before, .pp-ui.is-calm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
