/* 各界面版面（座標以 1440×810 設計解析度為準） */

/* §AR 產品桌面：只移動錨點，不縮放字體、卡片或 NP。 */
html[data-product="staging"] .menu__scene { inset: 0; }
html[data-product="staging"] body[data-layout="desktop"] .screen--lobby,
html[data-product="staging"] body[data-layout="desktop"] .screen--room { overflow-y: auto; }
html[data-product="staging"] body[data-layout="desktop"] .lobby {
  grid-template-columns: minmax(320px, 400px) minmax(380px, 420px) minmax(0, 1fr);
}
html[data-product="staging"] body[data-layout="desktop"] .room-board { width: calc(100% - 740px); }
html[data-product="staging"] body[data-layout="desktop"] .screen--table { --playfield-r: 100vw; }
html[data-product="staging"] body[data-layout="desktop"] .command { left: var(--table-axis); }
html[data-product="staging"] body[data-layout="desktop"] .tabletop {
  top: calc(96px + (100vh - 810px) / 2);
}
html[data-product="staging"] body[data-layout="desktop"] .hand {
  --hand-reach: calc(100vw - 24px - 220px - var(--table-axis) - var(--hand-gutter));
}
html[data-product="staging"] .join-row { grid-template-columns: minmax(0, 1fr) auto; }
html[data-product="staging"] .join-row .field { min-width: 0; }
html[data-product="staging"] .modal-scrim {
  overflow-y: auto;
  grid-template-columns: minmax(0, 1fr);
  padding: 12px;
}
html[data-product="staging"] .modal { margin-block: auto; }
/* §AW：1600×900 背景 cover 後，窗台接觸點取 source (1040, 528)；同步 62% 40% 裁切。 */
html[data-product="staging"] body[data-layout="desktop"] .screen--menu {
  --menu-scene-w: max(100vw, 177.777778vh);
  --menu-scene-h: max(56.25vw, 100vh);
}
html[data-product="staging"] body[data-layout="desktop"] .menu__cat--siamese {
  left: calc(62% + var(--menu-scene-w) * 0.03);
  right: auto;
  top: calc(40% + var(--menu-scene-h) * 0.186666667);
  width: clamp(190px, 14vw, 240px);
  /* 420×420 圖的腳底約 y=408；透明底邊不參與窗台對齊。 */
  transform: translate(-50%, -97.14%);
}
html[data-product="staging"] body[data-layout="desktop"] .menu__cat--sleeper {
  right: 36%;
  bottom: 6%;
  width: clamp(220px, 18vw, 290px);
  /* 420×280 圖的腹底約 y=246，補回透明底邊。 */
  transform: translateY(12.14%);
}
html[data-product="staging"] .menu__cat--siamese::after {
  left: 22%; right: 18%; bottom: -0.14%; height: 6%;
}
html[data-product="staging"] .menu__cat--sleeper::after {
  left: 6%; right: 4%; bottom: 2.14%; height: 20%;
}

/* ─────────── 共用角件 ─────────── */
.room-corner {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
  height: 38px;
  padding: 0 14px 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
  font-size: var(--fs-sm);
  letter-spacing: 0.12em;
  color: var(--ink-3);
  filter: var(--lift-1);
}
.room-corner b { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.14em; color: var(--ink-1); }
.corner-chrome { position: absolute; top: 20px; right: 24px; z-index: 10; display: flex; gap: 12px; }

.screen-head { position: absolute; top: 24px; left: 32px; right: 32px; display: flex; align-items: center; gap: var(--sp-5); }
.screen-head__title { margin: 0; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: 0.12em; }
.screen-head__gear { margin-left: auto; }

.panel-title { margin: 2px 0 var(--sp-4); font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: 700; letter-spacing: 0.06em; }
.panel-title--sm { font-size: var(--fs-lg); margin-bottom: var(--sp-3); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; }

.rule-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--sp-5); padding: 0; list-style: none; }
.rule-chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 15px;
  background: rgba(110, 92, 74, 0.07);
  box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.14);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.rule-chips .ico { width: 15px; height: 15px; color: var(--ink-3); }
.rule-chips .pip-fish { color: var(--honey); }
.rule-chips .pip-spark { color: var(--rose); }

/* ─────────── 1. MainMenu（VR-07 家族） ─────────── */
.screen--menu { background: var(--paper-2); overflow: hidden; }
.menu__scene {
  position: absolute;
  inset: -10px;
  background: var(--art-menu-interior) 62% 40% / cover no-repeat;
  filter: saturate(0.9) contrast(0.96);
}
.menu__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(247, 241, 230, 0.9) 0, rgba(247, 241, 230, 0.62) 30%, rgba(247, 241, 230, 0) 52%),
    linear-gradient(0deg, rgba(247, 241, 230, 0.35), rgba(247, 241, 230, 0) 30%);
}
.menu__cat { position: absolute; z-index: 1; pointer-events: none; isolation: isolate; }   /* 疊在 wash 之上：霧只洗左側 UI 區，不洗貓 */
.menu__cat img { width: 100%; filter: var(--art-tame) var(--contact-1) var(--contact-2); }
/* 接觸影：扁橢圓壓在想像桌面（窗光左上 → 影略偏右） */
.menu__cat::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 42, 28, 0.3), rgba(60, 42, 28, 0.12) 58%, rgba(60, 42, 28, 0)); filter: blur(2px); }
.menu__cat--siamese::after { left: 22%; right: 2%; bottom: -3%; height: 11%; }
.menu__cat--sleeper::after { left: 6%; right: 0; bottom: 4%; height: 22%; }
.menu__cat--siamese { right: 210px; top: 300px; width: 210px; }
.menu__cat--sleeper { right: 560px; bottom: 70px; width: 250px; }
.menu__brand { position: absolute; left: 84px; top: 64px; width: 420px; padding: 26px 34px 22px; text-align: center; }
.menu__logo { margin: 0; font-size: 78px; line-height: 1; color: var(--ink-1); letter-spacing: 0.02em; }
.menu__logo span {
  display: inline-grid;
  place-items: center;
  width: 1.02em;
  height: 1.02em;
  margin-left: 0.1em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8598ab, var(--slate) 60%, #4e5e70);
  color: var(--paper-1);
  font-size: 0.74em;
  vertical-align: 0.1em;
  box-shadow: inset 0 -4px 10px rgba(30, 37, 48, 0.25), 0 4px 10px rgba(60, 42, 28, 0.16);
}
/* §AJ 「9」底形＝貓爪（取代圓底；主選單與說明書封面共用）：爪形 SVG 墊底、可見「9」疊在掌墊上 */
.menu__logo .logo-paw, .hb-cover__logo .logo-paw { display: inline-grid; width: 1.24em; height: 1.24em; margin-left: 0.06em; border-radius: 0; background: none; box-shadow: none; vertical-align: -0.1em; }
.logo-paw > * { grid-area: 1 / 1; }
.logo-paw svg { display: block; width: 100%; height: 100%; color: var(--slate); filter: drop-shadow(0 0.05em 0.1em rgba(60, 42, 28, 0.2)); }
.logo-paw b { position: relative; place-self: start center; margin-top: 0.6em; font-size: 0.66em; font-weight: inherit; line-height: 1; color: var(--paper-1); }
.menu__subtitle { margin: 10px 0 0; font-size: var(--fs-lg); font-weight: 600; letter-spacing: 0.18em; color: var(--ink-2); }
.menu__nav { position: absolute; left: 104px; top: 300px; display: grid; gap: 16px; width: 380px; }
.menu-plaque {
  --btn-h: 64px;
  justify-content: flex-start;
  width: 100%;
  padding: 0 18px 0 12px;
  gap: 14px;
  font-size: 21px;
  letter-spacing: 0.14em;
  border-radius: 16px;
}
/* 主 CTA 與其他三張同用 secondary 奶油紙（Jacky：橘主鈕配色崩）；只靠高度、字重與圖示圓的淡赭點綴區分 */
.menu-plaque--lead { --btn-h: 72px; font-size: 23px; font-weight: 700; color: var(--ink-1); filter: var(--lift-2) brightness(1.02); }
.menu-plaque__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(110, 92, 74, 0.09); color: var(--ink-2); flex: none; }
.menu-plaque--lead .menu-plaque__icon { background: var(--clay-soft); color: var(--clay-deep); box-shadow: inset 0 0 0 1px rgba(182, 124, 96, 0.35); }
.menu-plaque__icon svg { width: 20px; height: 20px; }
.menu-plaque__label { flex: 1; }
.menu-plaque__chev { width: 18px; height: 18px; color: var(--ink-3); transition: transform var(--t-fast) var(--ease); }
.menu-plaque:hover .menu-plaque__chev { transform: translateX(4px); color: var(--ink-1); }
.menu-plaque:hover:not(:disabled) { transform: translateX(4px); }
/* §O 離開遊戲：只把圖示圓＋箭頭染暖紅（奶油紙 NP 與文字不變） */
.menu-plaque[data-semantic-id="menu-quit"] .menu-plaque__icon { color: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 1px rgba(185, 83, 63, 0.24); }
.menu-plaque[data-semantic-id="menu-quit"] .menu-plaque__chev { color: rgba(185, 83, 63, 0.72); }
.menu-plaque[data-semantic-id="menu-quit"]:hover .menu-plaque__icon, .menu-plaque[data-semantic-id="menu-quit"]:hover .menu-plaque__chev { color: var(--danger-deep); }
.menu__tagline { position: absolute; left: 104px; top: 642px; width: 380px; margin: 0; padding: 12px 18px; font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-2); filter: var(--lift-1); }
.menu__help { position: absolute; top: 24px; right: 28px; }
.menu__foot { position: absolute; right: 28px; bottom: 20px; font-size: var(--fs-xs); letter-spacing: 0.06em; color: var(--ink-2); padding: 3px 10px; border-radius: 8px; background: rgba(247, 241, 230, 0.7); }
.menu__profile { position: absolute; left: 104px; bottom: 26px; display: flex; align-items: center; gap: 12px; padding: 6px 18px 6px 8px; filter: var(--lift-1); line-height: 1.3; }
.quit { width: 460px; }

/* ─────────── 2. Lobby ─────────── */
.screen--lobby { background: var(--paper-2); }
.screen--lobby::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(243, 235, 221, 0.32), rgba(243, 235, 221, 0.46)), var(--art-lobby-wall) 50% 30% / cover; filter: saturate(0.85) contrast(0.95); }
.lobby { position: absolute; top: 104px; left: 48px; right: 48px; bottom: 44px; display: grid; grid-template-columns: 400px 420px 1fr; gap: 24px; }
.lobby .panel { padding: 22px 26px 24px; }
.cat-preview { display: flex; align-items: center; gap: 20px; margin-bottom: var(--sp-5); }
.cat-preview__meta { flex: 1; min-width: 0; }
.cat-preview__breed { margin: 8px 0 0; font-size: var(--fs-sm); }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; justify-items: center; }
.cat-opt {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 6px 4px 2px;
  border: 0;
  background: none;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  border-radius: 12px;
  transition: background var(--t-fast);
}
.cat-opt:hover { background: rgba(110, 92, 74, 0.07); }
.cat-opt .bust { --size: 56px !important; transition: transform var(--t-fast) var(--ease); }
.cat-opt:hover .bust { transform: translateY(-2px); }
.cat-opt[aria-checked="true"] { color: var(--ink-1); font-weight: 600; }
.cat-opt[aria-checked="true"] .bust::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2.5px solid var(--clay); box-shadow: 0 0 0 4px var(--clay-soft); }
.cat-opt:focus-visible { outline: 2px dashed var(--clay); outline-offset: 2px; }
.cat-opt[data-taken] { opacity: 0.45; }

.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--sp-4); }
.form-row .field-label { margin: 0; white-space: nowrap; }
.segmented[data-segment="max"] button { min-width: 0; width: 40px; padding: 0; }
.join-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.join-hint { margin: 10px 0 0; font-size: var(--fs-sm); }
.join-hint[data-tone="error"] { color: var(--rose); }
.lobby [data-bind="create-hint"][data-tone="error"] { color: var(--rose); }

.room-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.room-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  height: 68px;
  padding: 0 12px 0 10px;
  filter: var(--lift-1);
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast);
}
.room-row:hover { transform: translateX(3px); filter: var(--lift-2); }
.room-row__name { font-family: var(--font-serif); font-weight: 600; line-height: 1.3; }
.room-row__name small { display: block; font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: 0.08em; }
.room-row__count { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.room-row__count .ico { width: 15px; height: 15px; color: var(--ink-3); }
.room-row[data-status="playing"] { --np-src: var(--np-src-chip-out); }
.room-row[data-status="playing"] .room-row__name { color: var(--ink-3); }
.room-row .bust { --size: 44px; }

/* ─────────── 側列（TableStage／Room 共用） ─────────── */
.side-rail {
  position: absolute;
  left: 20px;
  top: 74px;
  z-index: 6;
  width: 240px;
  max-height: 556px;
  display: flex;
  flex-direction: column;
  padding: 10px 8px 10px 10px;
}
.side-rail__head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 8px 8px 6px; font-family: var(--font-serif); font-size: var(--fs-xs); letter-spacing: 0.2em; color: var(--ink-3); }
.side-rail__head b { font-family: var(--font-sans); letter-spacing: 0.04em; color: var(--ink-2); font-weight: 600; }
.side-rail__list {
  margin: 0;
  padding: 2px 6px 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 92, 74, 0.35) transparent;
}
.side-rail__list::-webkit-scrollbar { width: 6px; }
.side-rail__list::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(110, 92, 74, 0.3); }
.side-rail__fade { position: absolute; left: 12px; right: 14px; bottom: 10px; height: 26px; border-radius: 0 0 12px 12px; background: linear-gradient(transparent, rgba(243, 235, 221, 0.95)); pointer-events: none; opacity: 0; transition: opacity var(--t-med); }
.side-rail[data-scrollable="true"] .side-rail__fade { opacity: 1; }
.side-rail[data-scrolled-end="true"] .side-rail__fade { opacity: 0; }
/* 浮卡在捲動容器內會被裁切 → 由 JS 移到 rail 外定位；此處保留容器 overflow */
.seat-peek--floating { position: absolute; left: 272px; z-index: 30; transform: translate(-6px, -50%); }
.seat-peek--floating[data-open="true"] { opacity: 1; transform: translate(0, -50%); }

.side-rail--room { top: 74px; width: 260px; max-height: 712px; }

/* ─────────── 3. Room ─────────── */
.screen--room { background: none; }
.screen--room .room-exit { position: absolute; top: 20px; left: 20px; z-index: 10; width: 144px; white-space: nowrap; }
.screen--room .room-corner { left: 176px; }
.room-board { position: absolute; left: 330px; top: 74px; width: 700px; padding: 46px 56px 40px; filter: var(--lift-3); }
.room-board__title { margin: 6px 0 var(--sp-6); font-size: var(--fs-3xl); font-weight: 700; letter-spacing: 0.08em; }
.room-code-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(110, 92, 74, 0.06);
  box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.14), inset 0 2px 4px rgba(60, 42, 28, 0.06);
}
.room-code-card .t-faint { font-size: var(--fs-sm); letter-spacing: 0.2em; }
.room-code-card__code { font-size: 54px; line-height: 1.05; letter-spacing: 0.32em; color: var(--ink-1); }
.room-board__hint { margin: var(--sp-5) 0 var(--sp-5); line-height: 1.7; }
.room-board__foot { display: flex; justify-content: space-between; align-items: center; padding-top: var(--sp-4); border-top: 1px dashed var(--line); }
.room-ready-count { font-family: var(--font-serif); font-weight: 600; color: var(--ink-2); }
.room-copy-status { min-height: 1.3em; margin: 8px 0 0; font-size: var(--fs-sm); color: var(--ink-2); }
.room-closed-state { margin: var(--sp-5) 0; padding: var(--sp-5); border: 1px solid rgba(176, 96, 74, .42); border-radius: 14px; background: rgba(176, 96, 74, .08); }
.room-closed-state__title { margin: 4px 0 8px; font-size: var(--fs-2xl); }
.room-closed-state__reason { margin: 0 0 var(--sp-5); color: var(--ink-2); line-height: 1.6; }
.room-closed-state .btn { min-width: 160px; }
.room-leave__error { margin: 12px 0 0; color: var(--danger-deep); font-size: var(--fs-sm); }
/* §BK：原右欄「你的狀態」併入中卡（foot 上方橫排）；右欄改好友列表，見 room-friends-rail.css */
.room-me { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 16px; row-gap: 6px; margin: 0 0 var(--sp-4); padding: var(--sp-4) 0 0; border-top: 1px dashed var(--line); }
.room-me__who { display: grid; gap: 2px; min-width: 0; }
.room-me__name { font-size: var(--fs-xl); overflow-wrap: anywhere; }
.room-me__role { font-size: var(--fs-sm); letter-spacing: 0.1em; }
.room-me__actions { display: flex; gap: 10px; }
.room-me__actions .btn { min-width: 128px; }
.room-me__hint { grid-column: 2 / -1; margin: 0; font-size: var(--fs-sm); text-align: right; }
.btn[aria-pressed="true"][data-action="toggle-ready"] { color: #4f6a4b; }

/* ─────────── 4. TableStage ─────────── */
.command {
  position: absolute;
  top: 22px;
  left: 848px;
  z-index: 8;
  width: 456px;
  min-height: 60px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 6px 16px;
  filter: var(--lift-2);
  transition: opacity var(--t-med), transform var(--t-med) var(--ease);
}
.command[data-hidden="true"] { opacity: 0; transform: translate(-50%, -12px); pointer-events: none; }
.command__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--clay-soft); color: var(--clay); flex: none; }
.command__icon svg { width: 18px; height: 18px; }
.command__text { flex: 1; margin: 0; font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: 600; letter-spacing: 0.04em; }
.command__text small { display: block; font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); letter-spacing: 0.04em; }
.command__timer { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; }
.command__timer svg { position: absolute; inset: 0; transform: rotate(-90deg); fill: none; stroke-width: 3; }
.command__timer circle { stroke: rgba(110, 92, 74, 0.15); }
.command__timer .command__timer-arc { stroke: var(--clay); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: var(--timer-off, 0); transition: stroke-dashoffset 1s linear; }
.command__timer b { font-family: var(--font-display); font-size: 16px; }
.command__timer[data-urgent="true"] b { color: var(--clay-deep); }

/* 抽牌／反應窗倒數：外置小籤（環＋秒數＋誰），掛在牌庫／棄牌下方 */
.ptimer { position: absolute; left: 50%; top: calc(100% + 14px); z-index: 2; transform: translateX(-50%); height: 40px; padding: 0 12px 0 5px; gap: 8px; font-family: var(--font-serif); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.04em; color: var(--ink-2); filter: var(--lift-1); }
.ptimer__ring { position: relative; display: grid; place-items: center; width: 30px; height: 30px; flex: none; }
.ptimer__ring svg { position: absolute; inset: 0; transform: rotate(-90deg); fill: none; stroke-width: 3; }
.ptimer__ring circle { stroke: rgba(110, 92, 74, 0.15); }
.ptimer__ring .ptimer__arc { stroke: var(--sage); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: var(--timer-off, 0); transition: stroke-dashoffset 1s linear, stroke var(--t-med); }
.ptimer__ring b { font-family: var(--font-display); font-size: 14px; color: var(--ink-1); font-variant-numeric: tabular-nums; }
.ptimer--react .ptimer__ring .ptimer__arc, .ptimer[data-urgent="true"] .ptimer__ring .ptimer__arc { stroke: var(--clay); }
.ptimer[data-urgent="true"] { color: var(--clay-deep); }
.ptimer[data-urgent="true"] .ptimer__ring b { color: var(--clay-deep); animation: bump 1s var(--ease) infinite; }

/* L2 桌面舞台：場景物件（非 NP）。§H：餐布放大撐住中央對局區；牌庫／棄牌相對圓盤放大（卡更醒目、錶盤略縮） */
/* §X2 playfield 中軸：playfield＝左側對手席列右緣（.side-rail left 20＋width 240）→ 舞台右緣 1440，席列不參與置中；
   橢圓墊／炸彈計（tabletop 內 left:50%）與手牌共用 --table-axis，tabletop 由中軸＋寬反推 */
.screen--table {
  --playfield-l: calc(20px + 240px);
  --playfield-r: 1440px;
  --table-axis: calc((var(--playfield-l) + var(--playfield-r)) / 2);
  --table-w: 1120px;
  --table-x: calc(var(--table-axis) - var(--table-w) / 2);
}
.tabletop { position: absolute; left: var(--table-x); top: 96px; width: var(--table-w); height: 470px; }
.tabletop__mat {
  position: absolute;
  inset: -16px -8px -20px;
  background: var(--art-table-cloth) center / 100% 100% no-repeat;   /* 桌布 oval v03（1600px 版）；已是俯視橢圓比例 */
  filter: saturate(0.92) var(--contact-1);
}
/* 桌布貼桌：布下扁橢圓環境影 */
.tabletop::before {
  content: "";
  position: absolute;
  inset: -8px 0 -44px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60, 42, 28, 0.2), rgba(60, 42, 28, 0.08) 74%, rgba(60, 42, 28, 0));
  filter: blur(8px);
  transform: translate(6px, 14px);
}
.pile { position: absolute; top: 50%; display: flex; flex-direction: column; align-items: center; gap: 12px; transform: translateY(-52%); }
.pile--deck { left: 196px; }
.pile--discard { right: 186px; }
.pile__stack { position: relative; width: 172px; aspect-ratio: 5 / 7; }
.pile__stack .card { position: absolute; inset: 0; --card-w: 172px; }
.pile__stack .card:nth-child(1) { transform: translate(-6px, 7px) rotate(-3deg); filter: var(--contact-1); }
.pile__stack .card:nth-child(2) { transform: translate(-3px, 4px) rotate(-1deg); filter: none; }
.pile__stack .card:nth-child(3) { filter: var(--contact-1) drop-shadow(0 6px 10px rgba(60, 42, 28, 0.14)); }
.pile__stack .card[data-dragging] { opacity: 0; }
/* 牌堆／棄牌落在布上的扁橢圓接觸影（§G） */
.pile__stack::after, .pile__fan::after { content: ""; position: absolute; left: -10%; right: -16%; bottom: -14px; height: 26px; border-radius: 50%; background: var(--ground-oval); z-index: -1; }
.pile__fan::after { left: -12%; right: -18%; }
.pile--deck[data-drawable="true"] .pile__stack:hover .card:nth-child(3) { transform: translateY(-8px) rotate(1deg); filter: var(--contact-1) drop-shadow(0 12px 16px rgba(60, 42, 28, 0.18)); }
.pile--deck .pile__stack .card:nth-child(3) { transition: transform var(--t-med) var(--ease), filter var(--t-med) var(--ease); }
/* 可抽時牌庫頂輕呼吸（§I：無抽牌鍵，靠牌庫本身提示可拖） */
.pile--deck[data-drawable="true"] .pile__stack .card:nth-child(3)::after { opacity: 0.6; animation: deck-ready 2.4s var(--ease) infinite; }
@keyframes deck-ready { 50% { opacity: 0.15; } }
.pile__fan { position: relative; width: 180px; aspect-ratio: 5 / 7; }
.pile__fan .card { position: absolute; inset: 0; --card-w: 180px; }
.pile__fan .card:nth-child(1) { transform: rotate(7deg) translate(12px, 2px); filter: var(--contact-1); }
.pile__fan .card:nth-child(2) { transform: rotate(-5deg) translate(-8px, 2px); filter: none; }
.pile__fan .card:last-child { transform: rotate(-1.5deg); filter: var(--contact-1) drop-shadow(0 6px 10px rgba(60, 42, 28, 0.14)); }
.pile__fan .card[data-fresh] { animation: land 420ms var(--ease); }
@keyframes land { from { transform: translate(-260px, -20px) rotate(-14deg) scale(0.92); } }
.screen--table[data-phase="reaction"] .pile__fan .card:last-child::after { opacity: 1; }
.pile__tag { height: 32px; padding: 0 12px; font-family: var(--font-serif); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.06em; color: var(--ink-2); }
.pile__tag b { font-family: var(--font-sans); color: var(--ink-1); font-variant-numeric: tabular-nums; }

/* 炸彈計量器 v07（真實道具圖，非 NP）＋中心表情 faces-v04＋程式疊弧進度與刻度牌 */
.dial { position: absolute; left: 50%; top: 50%; width: 252px; height: 252px; transform: translate(-50%, -56%); }
.dial__body { position: absolute; inset: 0; width: 100%; height: 100%; filter: saturate(0.94) drop-shadow(0 2px 1px rgba(60, 42, 28, 0.3)) drop-shadow(0 6px 6px rgba(60, 42, 28, 0.16)) drop-shadow(0 16px 20px rgba(60, 42, 28, 0.14)); }
/* §L-2 體積：錶殼左上柔光（rim light）＋右下內陰影，像有厚度、壓在布上；不加黑邊 */
.dial::after {
  content: "";
  position: absolute;
  inset: 3%;
  z-index: 3;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 20%, rgba(255, 252, 244, 0.34), rgba(255, 252, 244, 0) 38%);
  box-shadow: inset 0 -14px 20px rgba(60, 42, 28, 0.2), inset 0 8px 12px rgba(255, 250, 240, 0.28), inset 0 0 0 1px rgba(255, 250, 240, 0.2);
}
/* 計量器底下扁橢圓接觸影，落在桌布上（§G 加強） */
.dial::before { content: ""; position: absolute; left: 2%; right: -4%; bottom: -5%; height: 22%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 42, 28, 0.42), rgba(60, 42, 28, 0.18) 46%, rgba(60, 42, 28, 0.05) 78%, rgba(60, 42, 28, 0)); filter: blur(3px); }
/* 表情：對齊奶油孔（母版圓心 510,536、半徑約 270 → 548px 直徑略蓋孔緣，不留白邊）；雙層 crossfade */
.dial__face { position: absolute; left: 23.05%; top: 25.59%; width: 53.5%; height: 53.5%; border-radius: 50%; overflow: hidden; }
.dial__face-img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 260ms var(--ease); }
.dial__face-img.is-on { opacity: 1; }
.dial__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
/* 刻度牌：奶油孔下方的淺色環帶，殼 chrome 顯示目前 B（不烘焙進表情） */
.dial__center { position: absolute; z-index: 4; left: 50%; top: 86.5%; min-width: 54px; height: 30px; padding: 0 10px 1px; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; background: rgba(250, 245, 234, 0.96); box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.35), 0 2px 4px rgba(30, 22, 16, 0.22); pointer-events: none; }
.dial__value { font-size: 22px; line-height: 1; color: var(--ink-1); transition: transform var(--t-med) var(--ease); }
.dial__value[data-bump] { animation: bump 520ms var(--ease); }
@keyframes bump { 40% { transform: scale(1.22); } }
/* §Z 逐格「咔」：每走一格錶殼微頓一下（俐落 ease-out，短於格距 230ms） */
.dial[data-tick] { animation: dial-tick 200ms cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes dial-tick { 35% { transform: translate(-50%, -56%) rotate(-1.2deg) scale(1.015); } }
.dial__label { font-family: var(--font-serif); font-size: 11px; line-height: 1; letter-spacing: 0.2em; color: var(--ink-3); }
.dial__dir { position: absolute; left: 50%; bottom: -36px; transform: translateX(-50%); height: 30px; padding: 0 11px; font-size: var(--fs-xs); }
.dial__dir svg { width: 14px; height: 14px; }
/* 色階弧：已走過＝原色微亮；未到＝柔和淡遮（非硬遮罩）；所在段＋標線高亮；最後一段（到 9）霧金細框 */
.dial-step { fill: transparent; stroke: none; transition: fill 500ms var(--ease); }
.dial-step[data-past] { fill: rgba(255, 248, 232, 0.12); }
.dial-step[data-future] { fill: rgba(60, 46, 36, 0.16); }
.dial-step[data-now] { fill: rgba(255, 248, 232, 0.42); stroke: #fffaf0; stroke-width: 9; filter: drop-shadow(0 0 8px rgba(255, 240, 214, 0.9)); }
.dial-step[data-goal] { stroke: rgba(222, 196, 136, 0.9); stroke-width: 4; }
.dial-marker-edge { stroke: rgba(74, 48, 36, 0.62); stroke-width: 36; stroke-linecap: round; }
.dial-marker { stroke: #fffaf0; stroke-width: 24; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(74, 48, 36, 0.55)) drop-shadow(0 0 10px rgba(255, 244, 220, 0.9)); }
/* §F 依嚴重度遞增的脈衝（低飽和：奶油→赭，不用霓虹） */
.dial[data-severity="mid"] .dial-marker, .dial[data-severity="mid"] .dial-step[data-now] { animation: sev-pulse 2.4s ease-in-out infinite; }
.dial[data-severity="high"] .dial-marker, .dial[data-severity="high"] .dial-step[data-now] { animation: sev-pulse 1.4s ease-in-out infinite; }
.dial[data-severity="max"] .dial-marker, .dial[data-severity="max"] .dial-step[data-now] { animation: sev-pulse-max 0.8s ease-in-out infinite; }
.dial[data-severity="max"] .dial-marker { stroke: #fbe6d6; }
@keyframes sev-pulse { 50% { opacity: 0.55; } }
@keyframes sev-pulse-max { 50% { opacity: 0.45; stroke: rgba(196, 120, 96, 0.95); } }
@media (prefers-reduced-motion: reduce) {
  .dial .dial-marker, .dial .dial-step[data-now] { animation: none !important; }
  .dial[data-severity="high"] .dial-marker, .dial[data-severity="max"] .dial-marker { stroke-width: 30; }
  .dial__face-img { transition-duration: 60ms; }
}
.stage[data-reduce-motion] .dial[data-severity="high"] .dial-marker, .stage[data-reduce-motion] .dial[data-severity="max"] .dial-marker { stroke-width: 30; }

/* 手牌（§I：三顆 CTA 已移除；出牌靠拖曳或點兩下） */
/* HAND-VFX §A：卡仍 5:7；手牌放大（≈15% 寬，對齊效果圖）並沉底出血 --hand-bleed（卡高比例），可見部分 ≈4:5。
   以 --table-axis 為中軸對稱向外展：半寬上限 --hand-reach＝中軸到 me-card 左緣再留 --hand-gutter，
   左右同額（含扇形旋轉外擴），張數多時自動加深重疊，不會一側貼 me-card、一側空 */
.hand {
  --hand-card-w: 216px;
  --hand-bleed: 0.12;
  --hand-gutter: 32px;
  --hand-reach: calc(1440px - 24px - 220px - var(--table-axis) - var(--hand-gutter)); /* me-card：right 24＋width 220 */
  --hand-sink: calc(var(--hand-card-w) * 1.4 * var(--hand-bleed));
  position: absolute; left: var(--table-axis); bottom: calc(-1 * var(--hand-sink)); z-index: 7; transform: translateX(-50%);
}
.screen--table[data-hand-size="m"] .hand { --hand-card-w: 196px; }
.screen--table[data-hand-size="l"] .hand { --hand-card-w: 176px; }
 .hand { --hand-card-w: 216px; --hand-bleed: 0.12; --hand-gutter: 32px; --hand-reach: calc(1440px - 24px - 220px - var(--table-axis) - var(--hand-gutter)); --hand-sink: calc(var(--hand-card-w) * 1.4 * var(--hand-bleed)); position: absolute; left: var(--table-axis); bottom: calc(-1 * var(--hand-sink)); z-index: 7; transform: translateX(-50%); }
 .screen--table[data-hand-size="m"] .hand { --hand-card-w: 196px; }
 .screen--table[data-hand-size="l"] .hand { --hand-card-w: 176px; }
.hand__tray {
  width: min(680px, calc(100vw - 360px));
  min-width: 360px;
  min-height: 170px;
  box-sizing: border-box;
  padding: 42px 38px 18px;
  background: url("../assets/real/ui/wood-hand-card-holder.png") center / 100% 100% no-repeat;
  filter: var(--lift-1);
}
.hand__fan { display: flex; width: 100%; min-width: 0; align-items: flex-end; justify-content: center; padding-top: 30px; }
 .hand__slot { --n: 3; --o: calc(var(--i) - (var(--n) - 1) / 2); --hand-tilt: calc(1.68 * var(--hand-card-w) * sin((var(--n) - 1) / 2 * 2.5deg)); margin: 0 min(-8px, (2 * (var(--hand-reach) - var(--hand-tilt)) - var(--n) * var(--hand-card-w)) / (var(--n) - 1) / 2); transform: rotate(calc(var(--o) * 2.5deg)) translateY(calc(var(--o) * var(--o) * 3px)); transform-origin: 50% 120%; }
 .hand__slot .card { --card-w: var(--hand-card-w); --card-shadow: var(--contact-1) drop-shadow(0 10px 16px rgba(60, 42, 28, 0.18)); }
 .hand .card__rules { bottom: calc(0.85em + 21em * var(--hand-bleed)); }
 .hand__slot:hover, .hand__slot:focus-within, .hand__slot:has([aria-pressed="true"]) { z-index: 3; }
 .hand__slot:hover .card[data-interactive], .hand .card[data-interactive]:focus-visible { transform: translateY(calc(-1 * var(--hand-sink) - 14px)) scale(1.04); filter: var(--lift-2); }
 .hand__slot:hover .card[data-state="dim"][data-interactive] { transform: translateY(calc(-1 * var(--hand-sink) - 6px)); }
 .hand .hand__slot .card[aria-pressed="true"] { transform: translateY(calc(-1 * var(--hand-sink) - 26px)) scale(1.06); filter: var(--lift-3); }
 .hand__empty { min-height: 84px; display: grid; place-items: center; margin: 0; padding: 20px; font-family: var(--font-serif); color: var(--ink-3); }
 .pile-preview { position: absolute; z-index: 8; left: 50%; top: calc(100% + 8px); display: grid; gap: 6px; min-width: 150px; padding: 8px; opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(-4px); transition: opacity var(--t-fast), transform var(--t-fast); }
 .pile-preview span { display: flex; justify-content: center; gap: 3px; }
 .pile-preview .card { --card-w: 62px; }
 .pile[data-preview-open="true"] .pile-preview, .pile:focus-within .pile-preview { opacity: 1; transform: translateX(-50%) translateY(0); }
 .hand__pill { position: absolute; left: 50%; top: 4px; transform: translate(-50%, -100%); height: 36px; padding: 0 16px 0 13px; gap: 9px; color: var(--clay-deep); font-family: var(--font-serif); font-size: var(--fs-md); font-weight: 700; letter-spacing: 0.12em; filter: var(--lift-2); }
 .hand__pill-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--clay); flex: none; }
 .hand__pill[hidden] { display: none !important; }

.me-card { position: absolute; right: 24px; bottom: 20px; width: 220px; padding: 10px 16px 12px; filter: var(--lift-2); }
 .me-card__reaction-btn { width: 100%; margin-top: 8px; }
 @media (max-width: 700px) {
   .hand__tray { min-width: min(88vw, 360px); min-height: 138px; padding: 30px 16px 12px; }
 }
.me-card__head { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.me-card__head b { color: var(--ink-1); font-size: var(--fs-md); }
.me-card__clock { margin-left: auto; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; color: var(--clay-deep); font-variant-numeric: tabular-nums; }
.me-card__clock:empty { display: none; }
.me-card__skip { font-size: var(--fs-sm); font-weight: 600; color: #5d7259; }
.me-card__skip[data-used] { color: var(--ink-3); font-weight: 400; text-decoration: line-through; }
/* Skip：整局一次的小鈕（取代中央「跳過」大鍵） */
.me-card__skip-btn { --btn-h: 36px; width: 100%; margin-top: 8px; font-size: var(--fs-sm); }

/* 抽牌飛行動畫用 */
.flyer { position: absolute; z-index: 40; pointer-events: none; transition: transform 520ms var(--ease); }

/* 拖曳打牌：自幹預覽（克隆 Card prefab），不用瀏覽器原生幽靈圖 */
.drag-ghost { position: absolute; left: 0; top: 0; z-index: 45; pointer-events: none; transform-origin: 0 0; will-change: transform; }
.drag-ghost .card { filter: var(--lift-3); }
.drag-ghost.is-flying { transition: transform 240ms var(--ease); }
.hand__slot[data-dragging] { opacity: 0.25; }
/* 出牌熱區：拖曳中棄牌區淡亮，指標進入 L2 桌面時柔光描邊 */
.pile--discard::before {
  content: "";
  position: absolute;
  inset: -30px -22px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 250, 240, 0.85), rgba(255, 250, 240, 0.35) 70%, rgba(255, 250, 240, 0));
  box-shadow: 0 0 0 2px rgba(182, 124, 96, 0.35), 0 0 24px rgba(182, 124, 96, 0.25);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}
body[data-dragging] .pile--discard::before { opacity: 0.4; }
.tabletop[data-drag-over="true"] .pile--discard::before { opacity: 1; }
/* 不可出：提起即輕抖回彈 */
.card[data-reject] { animation: reject-shake 380ms var(--ease); }
@keyframes reject-shake { 20% { translate: -5px 0; rotate: -2deg; } 45% { translate: 5px 0; rotate: 2deg; } 70% { translate: -2px 0; rotate: -1deg; } }

/* ─────────── 5. PrivateDecision ─────────── */
.peek { width: 860px; }
.peek__private { display: inline-flex; align-items: center; gap: 6px; color: var(--clay-deep); }
.peek__private .ico { width: 15px; height: 15px; }
.peek__row { display: flex; justify-content: center; gap: 36px; margin: 6px 0 0; padding: 18px 0 6px; list-style: none; border-radius: 18px; background: rgba(110, 92, 74, 0.05); box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.1); }
.peek-slot { display: grid; justify-items: center; gap: 12px; }
.peek-slot__label { font-family: var(--font-serif); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.14em; color: var(--ink-2); }
.peek-slot__label small { font-family: var(--font-sans); font-weight: 400; color: var(--ink-3); letter-spacing: 0.04em; }
.peek-slot .card { --card-w: 196px; }
.peek-slot[data-drag-over] .card { transform: translateY(-8px); }
.peek-slot[data-dragging] .card { opacity: 0.45; }
.peek-slot__moves { display: flex; gap: 8px; }
.peek-slot__moves .icon-btn:disabled { opacity: 0.35; }
.peek__note { font-size: var(--fs-sm); }

/* ─────────── 6. Victory ─────────── */
.modal-scrim--victory { background: radial-gradient(ellipse at 50% 40%, rgba(90, 72, 56, 0.25), rgba(46, 34, 26, 0.55)); }
.victory { width: 760px; padding: 30px 54px 26px; text-align: center; }
.victory__hero { display: grid; justify-items: center; }
.victory__crest { position: relative; display: flex; align-items: center; justify-content: center; gap: 2px; margin-bottom: 8px; }
.victory__halo { position: absolute; left: 50%; top: 50%; width: 230px; transform: translate(-50%, -50%); opacity: 0.55; filter: saturate(0.45); pointer-events: none; }
.victory__laurel { width: 66px; filter: saturate(0.45) brightness(1.06); }
.victory__laurel--l { margin-right: -8px; }
.victory__laurel--r { margin-left: -8px; }
.victory__bust { margin: 0; }
.victory__bust::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--honey); box-shadow: 0 0 0 6px rgba(201, 164, 106, 0.18), 0 0 30px rgba(201, 164, 106, 0.4); }
.victory__title { margin: 4px 0 0; font-size: 30px; font-weight: 700; letter-spacing: 0.06em; }
.victory__sub { margin: 8px 0 var(--sp-5); }
.standings { margin: 0; padding: 0; list-style: none; text-align: left; display: grid; gap: 4px; }
.standing {
  display: grid;
  grid-template-columns: 34px 40px 1fr 96px 96px 70px;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.standing:nth-child(odd) { background: rgba(110, 92, 74, 0.05); }
.standing[data-winner] { background: rgba(201, 164, 106, 0.16); box-shadow: inset 0 0 0 1px rgba(201, 164, 106, 0.35); }
.standing__rank { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--ink-3); text-align: center; }
.standing[data-winner] .standing__rank { color: #9c7a43; }
.standing__name { font-family: var(--font-serif); font-size: var(--fs-md); font-weight: 600; color: var(--ink-1); }
.standing__name small { margin-left: 6px; font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-xs); color: var(--ink-3); }
.standing .bust { --size: 36px; }
.standing__skip { font-size: var(--fs-xs); color: var(--ink-3); }
.victory__waiting { display: none; margin-top: var(--sp-5); padding: 16px 20px; border-radius: 14px; background: rgba(140, 158, 136, 0.12); box-shadow: inset 0 0 0 1px rgba(140, 158, 136, 0.3); text-align: left; }
.victory__waiting-head { display: flex; justify-content: space-between; margin-bottom: 12px; }
.rematch-busts { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; }
.rematch-busts li { position: relative; display: grid; justify-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--ink-3); }
.rematch-busts .bust { --size: 44px; }
.rematch-busts li[data-ok] .bust img { box-shadow: 0 0 0 2px var(--paper-0), 0 0 0 4px var(--sage); }
.rematch-busts li:not([data-ok]) .bust img { filter: saturate(0.4) opacity(0.7); }
.rematch-busts li[data-ok]::before { content: ""; position: absolute; top: 28px; right: -4px; z-index: 1; width: 20px; height: 20px; background: url("../assets/real/ui/ready.webp") center / contain no-repeat; filter: saturate(0.6); }
.modal-scrim--victory[data-state="waiting"] .victory__waiting { display: block; }
.modal-scrim--victory[data-state="waiting"] .standings .standing:nth-child(n+4) { display: none; }
.victory__foot { margin-top: var(--sp-5); }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti img { position: absolute; top: -140px; width: 150px; opacity: 0.55; filter: saturate(0.45); animation: fall linear infinite; }
@keyframes fall { to { transform: translate(var(--dx, 30px), 880px) rotate(var(--rot, 300deg)); } }

/* ─────────── 7. Settings ─────────── */
.settings { width: 780px; }
.settings__body { display: grid; grid-template-columns: 170px 1fr; gap: 28px; min-height: 300px; }
.tabs-v { display: flex; flex-direction: column; gap: 4px; padding-right: 20px; border-right: 1px dashed var(--line); }
.tabs-v button {
  position: relative;
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  color: var(--ink-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.tabs-v button:hover { background: rgba(110, 92, 74, 0.06); color: var(--ink-1); }
.tabs-v button[aria-selected="true"] { background: rgba(182, 124, 96, 0.12); color: var(--ink-1); font-weight: 700; }
.tabs-v button[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 2px; background: var(--clay); }
.tabs-v button:focus-visible { outline: 2px dashed var(--clay); outline-offset: -2px; }
.settings__pane { display: grid; align-content: start; gap: 6px; }
.set-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; min-height: 60px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: var(--fs-md); }
.set-row:last-child { border-bottom: 0; }
.set-row > span:first-child { display: grid; font-family: var(--font-serif); font-weight: 600; }
.set-row small { font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-xs); color: var(--ink-3); }
.set-row .slider { width: 260px; }
.set-row output { width: 32px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: var(--fs-sm); }
.set-row > :nth-child(2):last-child { grid-column: 2 / span 2; justify-self: end; }
.keys { font-size: var(--fs-sm); color: var(--ink-2); }
kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin: 0 4px 0 10px; padding: 0 6px; border-radius: 6px; background: var(--paper-0); box-shadow: inset 0 -2px 0 rgba(110, 92, 74, 0.2), 0 0 0 1px rgba(110, 92, 74, 0.25); font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 600; }
.settings__leave { color: var(--danger); }
.settings__leave .ico, .screen--room .room-exit .ico { color: var(--danger); }
.modal-scrim:not([data-from="table"]) [data-when="from-table"] { display: none; }
.account-pane { align-content: start; gap: 14px; min-width: 0; }
.account-pane .account__state { display: grid; align-content: start; gap: 8px; }
.account-pane .account__state[hidden] { display: none; }
.account-pane .panel-title { margin-bottom: 2px; }
.account-pane .modal__lede { margin: 0 0 8px; }
.account__form { display: grid; gap: 8px !important; }
.account__form .field { min-width: 0; }
.account__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.account__actions .btn { flex: 1 1 130px; }
.account__identity { display: flex; align-items: center; gap: 12px; min-height: 58px; margin: 4px 0 8px; }
.account__identity p { margin: 2px 0 0; font-size: var(--fs-sm); }
.account__status, .account__failure, .account__pending, .account__cooldown { margin: 4px 0 0; font-size: var(--fs-sm); }
.account__failure { color: var(--danger-deep); }
.account__pending { color: var(--ink-2); }
.account__cooldown { padding: 7px 10px; border-left: 3px solid var(--clay); background: rgba(182, 124, 96, 0.1); }
.account-avatar-picker { min-width: 0; margin: 4px 0 0; padding: 0; border: 0; }
.account-avatar-picker legend { margin-bottom: 6px; }
.account-avatar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.account-avatar-opt { position: relative; display: grid; justify-items: center; gap: 3px; min-height: 62px; padding: 4px 2px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; font: inherit; font-size: var(--fs-xs); }
.account-avatar-opt input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.account-avatar-opt:focus-within { outline: 2px dashed var(--clay); outline-offset: 2px; }
.account-avatar-opt:hover { background: rgba(110, 92, 74, 0.07); }
.account-avatar-opt input:checked + .account-avatar-content { color: var(--ink-1); font-weight: 600; }
.account-avatar-content { display: grid; justify-items: center; gap: 3px; }
.account-avatar-opt input:checked + .account-avatar-content .bust::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--clay); box-shadow: 0 0 0 3px var(--clay-soft); }
.account-avatar-opt .bust { --size: 40px !important; }
.account-avatar-opt:has(input:disabled) { opacity: 0.55; cursor: default; }
.menu__profile-copy { min-width: 0; }
.menu__account-btn { min-width: 0; padding: 0 12px; font-size: var(--fs-sm); }

/* ─────────── 8. Help：實體桌遊說明書（對開小冊） ───────────
   書＝兩張厚奶油紙頁＋中央裝訂溝陰影＋右緣頁厚；色籤從右緣伸出；頁碼在外角。非 NP（整本是一個場景物件）。 */
.modal-scrim--book { background: radial-gradient(ellipse at 50% 45%, rgba(74, 58, 44, 0.3), rgba(46, 34, 26, 0.58)); }
.book {
  --page: #f8f2e6;
  --page-edge: #e9dfcc;
  position: relative;
  width: 1100px;
  height: 660px;
  padding: 0;
  display: grid;
  grid-template-rows: 1fr auto auto;
  filter: none;
  animation: book-open 420ms var(--ease);
}
@keyframes book-open { from { opacity: 0; transform: translateY(18px) rotateX(8deg) scale(0.97); } }
.book__spread {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  border-radius: 10px 14px 14px 10px;
  background:
    linear-gradient(90deg, rgba(60, 42, 28, 0) 46%, rgba(60, 42, 28, 0.1) 49.4%, rgba(60, 42, 28, 0.2) 50%, rgba(60, 42, 28, 0.08) 50.7%, rgba(60, 42, 28, 0) 54%),
    linear-gradient(var(--page), var(--page));
  /* 右下頁厚：幾層錯開的紙緣 */
  box-shadow:
    1px 1px 0 var(--page-edge), 2px 2px 0 #f3ecdf, 3px 3px 0 var(--page-edge), 4px 4px 0 #f1e8d9, 5px 5px 0 #ded2bc,
    -1px 1px 0 var(--page-edge), -2px 2px 0 #f3ecdf, -3px 3px 0 #ded2bc,
    0 26px 50px rgba(46, 34, 26, 0.35), 0 6px 12px rgba(46, 34, 26, 0.18);
}
/* 紙纖維 */
.book__spread::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .37 0 0 0 0 .27 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
.book__page { position: relative; min-height: 0; padding: 46px 52px 54px; }
.book__page--fig { display: grid; align-content: center; justify-items: center; padding-right: 60px; }
.book__page--text { overflow-y: auto; padding-left: 60px; scrollbar-width: thin; scrollbar-color: rgba(110, 92, 74, 0.3) transparent; }
.book__fig { display: grid; justify-items: center; gap: 14px; width: 100%; }
.book__folio { position: absolute; bottom: 20px; font-family: var(--font-display); font-size: var(--fs-sm); color: var(--ink-3); letter-spacing: 0.1em; }
.book__page--fig .book__folio { left: 40px; }
.book__page--text .book__folio { position: sticky; display: block; bottom: auto; margin-top: 22px; text-align: right; }
.book__chapter { margin: 0; font-family: var(--font-serif); font-size: var(--fs-xs); letter-spacing: 0.32em; color: var(--clay-deep); }
.book__title { margin: 4px 0 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(110, 92, 74, 0.25); font-family: var(--font-serif); font-size: 30px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-1); }
.book__page--text h3 { margin: 16px 0 6px; font-family: var(--font-serif); font-size: var(--fs-lg); letter-spacing: 0.06em; color: var(--ink-1); }
.book__page--text p, .book__page--text li, .book__page--text dd { color: var(--ink-2); line-height: 1.8; font-size: var(--fs-md); }
.book__page--text p { margin: 0 0 8px; }
.book__page--text ol, .book__page--text ul { margin: 0 0 10px; padding-left: 1.3em; }
.book__page--text b { color: var(--ink-1); }
.hb-kicker { margin: 0 !important; font-size: var(--fs-xs) !important; letter-spacing: 0.24em; color: var(--ink-3) !important; }
.book__page--text .hb-kicker + h3 { margin-top: 2px; font-size: var(--fs-xl); }
.hb-aside { margin-top: 12px !important; padding: 8px 12px; border-left: 3px solid rgba(182, 124, 96, 0.45); background: rgba(182, 124, 96, 0.06); font-size: var(--fs-sm) !important; }
.hb-note { margin-top: 14px; padding: 12px 16px 4px; border-radius: 12px; background: rgba(140, 158, 136, 0.13); box-shadow: inset 0 0 0 1px rgba(140, 158, 136, 0.3); }
.hb-note > b { font-family: var(--font-serif); }
.hb-caption { margin: 4px 0 0; max-width: 360px; text-align: center; font-family: var(--font-serif); font-size: var(--fs-sm); font-style: italic; color: var(--ink-3); }
.hb-steps { counter-reset: s; list-style: none; padding: 0 !important; }
.hb-steps li { counter-increment: s; position: relative; padding-left: 34px; margin-bottom: 6px; }
.hb-steps li::before { content: counter(s); position: absolute; left: 0; top: 4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--clay-soft); box-shadow: inset 0 0 0 1px rgba(182, 124, 96, 0.5); font-family: var(--font-display); font-size: 13px; color: var(--clay-deep); line-height: 1; }
.hb-mantra { list-style: none; padding: 0 !important; }
.hb-mantra li { padding: 5px 0 5px 22px; border-bottom: 1px dashed var(--line); font-family: var(--font-serif); font-weight: 600; color: var(--ink-1) !important; position: relative; }
.hb-mantra li::before { content: "❋"; position: absolute; left: 0; color: var(--honey); font-size: 13px; }
.hb-table { width: 100%; border-collapse: collapse; margin: 4px 0 10px; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.hb-table th, .hb-table td { padding: 4px 0; text-align: center; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.hb-table th { text-align: left; font-family: var(--font-serif); color: var(--ink-3); font-weight: 600; width: 46px; }
.hb-table tr:first-child td { font-family: var(--font-display); font-size: var(--fs-md); color: var(--ink-1); }
.hb-defs { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 0; }
.hb-defs dt { font-family: var(--font-serif); font-weight: 700; color: var(--ink-1); line-height: 1.8; }
.hb-defs dd { margin: 0; }
/* 圖頁元件 */
.hb-cover { display: grid; justify-items: center; gap: 10px; }
.hb-cover__logo { margin: 0; font-size: 64px; line-height: 1; color: var(--ink-1); }
.hb-cover__logo span { display: inline-grid; place-items: center; width: 1.02em; height: 1.02em; margin-left: 0.08em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8598ab, var(--slate) 60%, #4e5e70); color: var(--paper-1); font-size: 0.74em; vertical-align: 0.1em; }
.hb-cover__sub { margin: 0 0 12px; font-family: var(--font-serif); letter-spacing: 0.16em; color: var(--ink-2); }
.hb-fan { display: flex; align-items: flex-end; justify-content: center; }
.hb-fan .card { margin: 0 -8px; }
.hb-fan .card:nth-child(1) { transform: rotate(-8deg) translateY(6px); }
.hb-fan .card:nth-child(3) { transform: rotate(8deg) translateY(6px); }
.hb-fan .card:nth-child(2) { z-index: 1; }
.hb-fan--sm { align-items: center; gap: 12px; }
.hb-fan--sm .card { margin: 0; transform: none !important; }
.hb-plus { font-family: var(--font-display); font-size: 30px; color: var(--clay); }
.hb-stamps { display: flex; gap: 10px; margin-top: 18px; }
.hb-stamp { padding: 6px 14px; border: 1.5px solid rgba(143, 93, 70, 0.5); border-radius: 999px; font-family: var(--font-serif); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.12em; color: var(--clay-deep); transform: rotate(-3deg); background: rgba(182, 124, 96, 0.06); }
.hb-stamp:nth-child(2) { transform: rotate(2deg); }
.hb-cases { display: grid; gap: 12px; width: 100%; max-width: 380px; }
.hb-cases .help-case { transform: rotate(-0.6deg); }
.hb-cases .help-case:nth-child(2) { transform: rotate(0.5deg); }
.hb-flow { display: grid; gap: 14px; width: 100%; max-width: 360px; margin: 0; padding: 0; list-style: none; }
.hb-flow li { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255, 252, 245, 0.7); box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.15), 0 2px 4px rgba(60, 42, 28, 0.06); }
.hb-flow b { font-family: var(--font-serif); font-size: var(--fs-lg); }
.hb-flow small { grid-column: 2; color: var(--ink-3); font-size: var(--fs-sm); }
.hb-seal { grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c99a80, var(--clay) 65%, var(--clay-deep)); color: var(--paper-0); font-family: var(--font-display); font-size: 20px; font-weight: 700; box-shadow: inset 0 0 0 3px rgba(255, 245, 230, 0.35), 0 2px 4px rgba(60, 42, 28, 0.2); }
/* §N Ch.3 桌面縮影：真資產＋容器單位（cqw＝縮影寬度百分比），桌面／手機以 body[data-layout] 換 grid 排列（reflow，不是 scale） */
.hb-map {
  container-type: inline-size;
  position: relative;
  width: min(100%, 460px);
  display: grid;
  grid-template-columns: 22% minmax(0, 1fr) 24%;
  grid-template-areas: "seats table table" "seats hand me";
  gap: 2.4cqw 2.4cqw;
  padding: 3cqw;
  border-radius: 14px;
  background: linear-gradient(rgba(236, 226, 208, 0.25), rgba(236, 226, 208, 0.25)), var(--art-scene-table) center / cover;
  box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.22), 0 4px 10px rgba(60, 42, 28, 0.12);
}
.hb-pin { position: absolute; z-index: 3; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--clay); color: var(--paper-0); font-size: 12px; font-weight: 700; line-height: 1; box-shadow: 0 1px 3px rgba(60, 42, 28, 0.3); }
.hb-pin--inline { position: static; width: 18px; height: 18px; font-size: 11px; flex: none; }
/* ① 對手席位：直列；當前席帶燃燒環（沿用 Table 的 .bust[data-timer] 樣式） */
.hb-map__seats { grid-area: seats; align-self: start; position: relative; display: flex; flex-direction: column; gap: 1.6cqw; padding: 1.6cqw; border-radius: 10px; background: rgba(243, 235, 221, 0.78); box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.2); }
.hb-seat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1.4cqw; align-items: center; padding: 1.1cqw 1.4cqw; border-radius: 8px; background: var(--paper-0); box-shadow: 0 0 0 1px rgba(110, 92, 74, 0.2), 0 1px 2px rgba(60, 42, 28, 0.1); }
.hb-seat .bust { --size: 5.6cqw !important; grid-row: 1 / span 2; }
.hb-seat b { font-family: var(--font-serif); font-size: max(10px, 2.5cqw); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-seat i { font-style: normal; font-size: max(9px, 2.1cqw); line-height: 1.1; color: var(--ink-3); }
.hb-seat.is-current .bust { --t: 0.62; --burn: #c08a5e; }
.hb-seat.is-current .bust::before { inset: -4px; transition: none; }
.hb-pin--seats { right: -9px; top: -9px; }
/* ② 中央桌布：真桌布圖＋牌庫｜v07 計量器＋表情｜棄牌；上方拖曳弧線 */
.hb-map__table { grid-area: table; position: relative; display: flex; align-items: center; justify-content: space-evenly; aspect-ratio: 1760 / 760; background: var(--art-table-cloth) center / 100% 100% no-repeat; filter: saturate(0.92); }
.hb-map__deck, .hb-map__discard { display: block; filter: drop-shadow(0 2px 2px rgba(60, 42, 28, 0.22)); }
.hb-map__deck .card, .hb-map__discard .card { --card-w: 10.5cqw !important; }
.hb-map__discard .card { transform: rotate(-3deg); }
.hb-map__meter { position: relative; width: 17cqw; aspect-ratio: 1; filter: drop-shadow(0 3px 3px rgba(60, 42, 28, 0.25)); }
.hb-map__meter img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hb-map__meter .hb-map__face { left: 23.05%; top: 25.59%; width: 53.5%; height: 53.5%; border-radius: 50%; }
.hb-map__meter b { position: absolute; left: 50%; top: 86.5%; transform: translate(-50%, -50%); padding: 0 0.6em; border-radius: 6px; background: rgba(250, 245, 234, 0.95); font-size: max(9px, 2.2cqw); line-height: 1.4; }
.hb-map__arrow { position: absolute; left: 22%; right: 22%; top: 6%; height: 16%; overflow: visible; pointer-events: none; }
.hb-map__arrow path { fill: none; stroke: var(--clay-deep); stroke-width: 1.6; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.hb-map__arrow .hb-map__head { stroke-dasharray: none; stroke-linejoin: round; }
.hb-map__note { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: rgba(250, 245, 234, 0.95); box-shadow: inset 0 0 0 1px rgba(143, 93, 70, 0.35); font-family: var(--font-serif); font-size: max(10px, 2.3cqw); font-weight: 700; color: var(--clay-deep); white-space: nowrap; }
.hb-map__note--draw { position: absolute; left: 50%; top: -3%; transform: translate(-50%, -50%); }
.hb-pin--table { right: 2%; top: 4%; }
/* ③ 手牌：真卡面（比舊示意寬）；上方「拖到桌布＝出牌」 */
.hb-map__hand { grid-area: hand; position: relative; display: grid; justify-items: center; gap: 1.2cqw; }
.hb-map__cards { display: flex; justify-content: center; }
.hb-map__cards .card { --card-w: 12.5cqw !important; margin: 0 -0.4cqw; filter: drop-shadow(0 2px 3px rgba(60, 42, 28, 0.2)); }
.hb-map__cards .card:nth-child(1) { transform: rotate(-5deg) translateY(1cqw); }
.hb-map__cards .card:nth-child(3) { transform: rotate(5deg) translateY(1cqw); }
.hb-pin--hand { right: -2px; bottom: 6px; }
/* ④ 你的狀態紙：鮮魚／火花＋Skip（取代舊 CTA 藥丸列） */
.hb-map__me { grid-area: me; position: relative; align-self: end; display: flex; flex-wrap: wrap; align-items: center; gap: 1cqw 1.4cqw; padding: 1.8cqw; border-radius: 8px; background: var(--paper-0); box-shadow: 0 0 0 1px rgba(110, 92, 74, 0.2), 0 2px 4px rgba(60, 42, 28, 0.12); }
.hb-map__me .bust { --size: 5cqw !important; }
.hb-map__me .pips img { width: max(9px, 2.4cqw); height: max(9px, 2.4cqw); }
.hb-map__skip { padding: 1px 6px; border-radius: 6px; font-size: max(9px, 2.1cqw); font-weight: 600; color: #5d7259; background: var(--sage-soft); box-shadow: inset 0 0 0 1px rgba(140, 158, 136, 0.45); }
.hb-pin--me { right: -9px; top: -9px; }
.hb-caption--mobile { display: none; }

.hb-dial { position: relative; width: 240px; aspect-ratio: 1; }
.hb-dial img, .hb-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hb-dial .hb-dial__face { left: 23.05%; top: 25.59%; width: 53.5%; height: 53.5%; border-radius: 50%; }
.hb-dial img { filter: saturate(0.86) contrast(0.95) var(--contact-1); }
.hb-dial > b { position: absolute; left: 50%; top: 86.5%; transform: translate(-50%, -50%); padding: 2px 12px; border-radius: 10px; background: rgba(248, 242, 230, 0.94); font-size: 26px; line-height: 1.2; color: var(--ink-1); }
.hb-example { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 10px; font-family: var(--font-serif); color: var(--ink-2); }
.hb-example b { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--ink-1); }
.hb-example__res { flex-basis: 100%; text-align: center; color: var(--rose); font-weight: 700; }
.hb-window { display: flex; align-items: center; gap: 10px; width: 300px; }
.hb-window__bar { flex: 1; height: 10px; border-radius: 5px; background: rgba(110, 92, 74, 0.14); overflow: hidden; }
.hb-window__bar i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--clay); }
.hb-window span { font-family: var(--font-display); color: var(--clay-deep); }
.hb-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; width: 100%; max-width: 400px; margin: 0; padding: 0; list-style: none; }
.hb-legend li { display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; align-items: center; }
.hb-legend li > :first-child { grid-row: 1 / span 2; justify-self: center; }
.hb-legend img { width: 34px; height: 34px; object-fit: contain; filter: var(--art-tame); }
.hb-legend b { font-family: var(--font-serif); color: var(--ink-1); }
.hb-legend span:last-child { font-size: var(--fs-xs); color: var(--ink-3); }
.hb-legend__badge { display: grid; place-items: center; height: 24px; padding: 0 6px; border-radius: 6px; background: var(--paper-2); box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.35); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.hb-legend__dir svg { width: 26px; height: 26px; color: var(--ink-2); }
.help-case { padding: 14px 16px; border-radius: 14px; background: rgba(110, 92, 74, 0.05); box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.12); }
.help-case b { display: block; font-family: var(--font-serif); font-size: var(--fs-lg); color: var(--ink-1); }
.help-case span { font-size: var(--fs-sm); color: var(--ink-2); }
.help-case[data-tone="safe"] { background: var(--sage-soft); }
.help-case[data-tone="goal"] { background: rgba(201, 164, 106, 0.16); }
.help-case[data-tone="fail"] { background: rgba(196, 140, 132, 0.15); }
/* 色籤：從書右緣伸出；選中的籤伸得更長、與頁同色 */
.book__tabs { position: absolute; top: 34px; right: -40px; z-index: -1; display: grid; gap: 6px; }
.book__tab {
  --tab: #efe3cd;
  display: flex; align-items: center; justify-content: flex-end;
  width: 58px; height: 52px; padding: 0 9px 0 0;
  border: 0; border-radius: 0 10px 10px 0;
  background: var(--tab);
  box-shadow: inset 6px 0 8px -6px rgba(60, 42, 28, 0.35), 0 2px 4px rgba(60, 42, 28, 0.16);
  font-family: var(--font-serif); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: rgba(74, 63, 55, 0.78);
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), width var(--t-fast);
}
.book__tab[data-tone="honey"] { --tab: #ead6ad; }
.book__tab[data-tone="sage"] { --tab: #d4dccd; }
.book__tab[data-tone="clay"] { --tab: #e8cdbd; }
.book__tab[data-tone="slate"] { --tab: #cfd6de; }
.book__tab[data-tone="rose"] { --tab: #e9cfca; }
@media (hover: hover) { .book__tab:hover { transform: translateX(4px); } }
.book__tab[aria-selected="true"] { transform: translateX(6px); color: var(--ink-1); box-shadow: inset 6px 0 8px -6px rgba(60, 42, 28, 0.2), 0 3px 6px rgba(60, 42, 28, 0.22); }
.book__tab:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.book__foot { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 22px; }
.book__pager { min-width: 64px; text-align: center; font-family: var(--font-display); font-size: var(--fs-lg); color: var(--paper-1); letter-spacing: 0.12em; text-shadow: 0 1px 2px rgba(30, 22, 16, 0.5); }
.book__colophon { margin: 8px 0 0; text-align: center; font-size: var(--fs-xs); letter-spacing: 0.06em; color: rgba(247, 241, 230, 0.6); }
.book__close { position: absolute; top: -14px; right: -14px; z-index: 2; }
/* §P 揭頁：一次性紙頁（help-demo.js 建立／拆除）。桌面＝半頁沿裝訂線 rotateY 翻過（正面舊頁、背面新頁）；
   .book__under 在紙頁落下前蓋住另一側、保留舊頁；紙面隨揭起角度帶折光與陰影。手機＝整頁沿外緣揭起。 */
.book__spread { perspective: 2600px; }
.book__under, .book__leaf { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 2; pointer-events: none; }
.book__under { background: var(--page); }
.book__under[data-side="left"] { left: 0; border-radius: 10px 0 0 10px; }
.book__under[data-side="right"] { right: 0; border-radius: 0 14px 14px 0; }
.book__under > .book__page, .book__leaf-face > .book__page { height: 100%; }
/* 被紙頁蓋過去時，下層頁逐漸落入陰影 */
.book__under::after { content: ""; position: absolute; inset: 0; border-radius: inherit; animation: leaf-cast 440ms cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
.book__under[data-side="left"]::after { background: linear-gradient(270deg, rgba(60, 42, 28, 0.24), rgba(60, 42, 28, 0) 70%); }
.book__under[data-side="right"]::after { background: linear-gradient(90deg, rgba(60, 42, 28, 0.24), rgba(60, 42, 28, 0) 70%); }
.book__leaf { transform-style: preserve-3d; animation: leaf-next 440ms cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
.book__leaf[data-dir="next"] { left: 50%; transform-origin: 0 50%; }
.book__leaf[data-dir="prev"] { left: 0; transform-origin: 100% 50%; animation-name: leaf-prev; }
.book__leaf-face { position: absolute; inset: 0; overflow: hidden; display: grid; background: var(--page); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.book__leaf-face--back { transform: rotateY(180deg); }
/* 紙面光影：揭起時正面靠裝訂線一側暗下、紙緣亮起；背面落下時陰影退去 */
.book__leaf-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.book__leaf[data-dir="next"] .book__leaf-face--front { border-radius: 0 14px 14px 0; }
.book__leaf[data-dir="next"] .book__leaf-face--front::after { background: linear-gradient(90deg, rgba(60, 42, 28, 0.3), rgba(60, 42, 28, 0.06) 30%, rgba(255, 250, 240, 0.35) 92%, rgba(60, 42, 28, 0.1)); animation: leaf-shade-in 440ms cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
.book__leaf[data-dir="next"] .book__leaf-face--back { border-radius: 10px 0 0 10px; }
.book__leaf[data-dir="next"] .book__leaf-face--back::after { background: linear-gradient(270deg, rgba(60, 42, 28, 0.3), rgba(60, 42, 28, 0.04) 35%, rgba(60, 42, 28, 0)); animation: leaf-shade-out 440ms cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
.book__leaf[data-dir="prev"] .book__leaf-face--front { border-radius: 10px 0 0 10px; }
.book__leaf[data-dir="prev"] .book__leaf-face--front::after { background: linear-gradient(270deg, rgba(60, 42, 28, 0.3), rgba(60, 42, 28, 0.06) 30%, rgba(255, 250, 240, 0.35) 92%, rgba(60, 42, 28, 0.1)); animation: leaf-shade-in 440ms cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
.book__leaf[data-dir="prev"] .book__leaf-face--back { border-radius: 0 14px 14px 0; }
.book__leaf[data-dir="prev"] .book__leaf-face--back::after { background: linear-gradient(90deg, rgba(60, 42, 28, 0.3), rgba(60, 42, 28, 0.04) 35%, rgba(60, 42, 28, 0)); animation: leaf-shade-out 440ms cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
/* 翻過頂點時紙略微拱起（scale 微縮＋輕 skew），避免像硬板 */
@keyframes leaf-next {
  0% { transform: rotateY(0deg); }
  45% { transform: rotateY(-80deg) skewY(-1.2deg) scaleX(0.98); }
  100% { transform: rotateY(-180deg); }
}
@keyframes leaf-prev {
  0% { transform: rotateY(0deg); }
  45% { transform: rotateY(80deg) skewY(1.2deg) scaleX(0.98); }
  100% { transform: rotateY(180deg); }
}
@keyframes leaf-shade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes leaf-shade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes leaf-cast { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0.2; } }
/* 手機單欄：整頁沿外緣揭起離開（next 往左、prev 往右），下方即新頁 */
.book__leaf[data-mode="single"] { left: 0; width: 100%; height: auto; bottom: auto; min-height: 100%; }
.book__leaf[data-mode="single"] .book__leaf-face--front { grid-auto-rows: max-content; align-content: start; border-radius: 12px; }
.book__leaf[data-mode="single"] .book__leaf-face--front > .book__page { height: auto; }
.book__leaf[data-mode="single"][data-dir="next"] { transform-origin: 0 50%; animation-name: leaf-lift-next; }
.book__leaf[data-mode="single"][data-dir="prev"] { transform-origin: 100% 50%; animation-name: leaf-lift-prev; }
@keyframes leaf-lift-next { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(-92deg) skewY(-1deg); } }
@keyframes leaf-lift-prev { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(92deg) skewY(1deg); } }
@media (prefers-reduced-motion: reduce) { .book__leaf, .book__under { display: none; } }
.stage[data-reduce-motion] .book__leaf, .stage[data-reduce-motion] .book__under { display: none; }

/* ─────────── §S／§Q／§R 左頁漸進 motion（help-demo.js 驅動 data-step／data-on／data-lit）───────────
   全部真資產（UI.card／UI.bust／v07 計量器／tokens）；標註只有 caption、分鏡點、箭頭。 */
.hb-demo { position: relative; display: grid; justify-items: center; gap: 14px; width: 100%; }
.hb-demo [data-show] { transition: opacity 360ms var(--ease), transform 360ms var(--ease), visibility 0s 360ms; }
.hb-demo [data-show]:not([data-on]) { opacity: 0; visibility: hidden; }
.hb-demo [data-show][data-on] { transition-delay: 0s; }
.hb-demo [data-hot] { transition: opacity 320ms var(--ease), filter 320ms var(--ease), transform 320ms var(--ease), box-shadow 320ms var(--ease); }
.hb-demo[data-step] [data-hot]:not([data-lit]) { opacity: 0.5; filter: saturate(0.55); }
.hb-demo__cap { min-height: 1.7em; margin: 0; font-family: var(--font-serif); font-size: var(--fs-md); color: var(--ink-2); text-align: center; }
.hb-demo__cap b { font-family: var(--font-display); font-size: 1.15em; color: var(--clay-deep); }
.hb-demo__dots { display: flex; align-items: center; gap: 8px; margin-top: -6px; }
.hb-demo__dot { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; }
.hb-demo__dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(110, 92, 74, 0.25); transition: background var(--t-fast), transform var(--t-fast); }
.hb-demo__dot[aria-current="true"]::before { background: var(--clay); transform: scale(1.3); }
.hb-demo__replay { display: grid; place-items: center; width: 26px; height: 26px; margin-left: 4px; padding: 0; border: 0; border-radius: 50%; background: rgba(110, 92, 74, 0.08); color: var(--ink-3); }
.hb-demo__replay .ico { width: 14px; height: 14px; }
.hb-demo__dot:focus-visible, .hb-demo__replay:focus-visible { outline: var(--focus-ring); outline-offset: 1px; border-radius: 50%; }
@media (hover: hover) { .hb-demo__replay:hover { color: var(--clay-deep); background: rgba(182, 124, 96, 0.14); } }
/* 說明書內燃燒環由 rAF 逐幀驅動，取消 Table 的 1s 平滑過渡（否則環會落後、重置時倒燒） */
.book .bust[data-timer]::before { transition: opacity 600ms var(--ease); }

/* §S Ch.4：你（燃燒環）→ 主動牌／Skip → 抽一張（卡背翻出 4）→ 箭頭 → 下一位 */
.hb-turn__stage { display: grid; grid-template-columns: auto auto auto auto auto; align-items: end; gap: 10px; }
.hb-turn__stage small { display: block; margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); text-align: center; white-space: nowrap; }
.hb-turn__seat { display: grid; justify-items: center; padding: 8px 4px 0; }
.hb-turn__pre { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 4px; }
.hb-turn__pre small { grid-column: 1 / -1; }
.hb-turn__pre .card { --card-w: 62px; transform: rotate(-4deg); filter: drop-shadow(0 2px 3px rgba(60, 42, 28, 0.2)); }
.hb-turn__pre img { width: 34px; height: 34px; object-fit: contain; filter: var(--art-tame); }
.hb-turn__draw { display: grid; justify-items: center; }
.hb-turn__deck, .hb-turn__flip { grid-area: 1 / 1; }
.hb-turn__draw small { grid-area: 2 / 1; }
.hb-turn__draw .card { --card-w: 62px; filter: drop-shadow(0 2px 3px rgba(60, 42, 28, 0.2)); }
.hb-turn__flip[data-on] .card { animation: hb-draw-flip 620ms var(--ease) both; }
@keyframes hb-draw-flip { 0% { transform: translateY(0) rotateY(-90deg); } 60% { transform: translateY(-10px) rotateY(0deg); } 100% { transform: translateY(-4px) rotate(3deg); } }
.hb-turn__arrow { width: 40px; height: 16px; align-self: center; margin-bottom: 18px; }
.hb-turn__arrow path { fill: none; stroke: var(--clay-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hb-turn__arrow[data-lit] { animation: hb-nudge 900ms var(--ease) infinite; }
@keyframes hb-nudge { 50% { transform: translateX(4px); } }
.hb-demo[data-step] .hb-flow li[data-lit] { background: rgba(255, 252, 245, 0.96); box-shadow: inset 0 0 0 1.5px rgba(182, 124, 96, 0.55), 0 3px 8px rgba(60, 42, 28, 0.12); transform: translateX(4px); }
.hb-turn .hb-flow { gap: 8px; }
.hb-turn .hb-flow li { padding: 8px 12px; }

/* §Q Ch.6：v07 計量器＋表情（setDial 換針與表情）、真數字牌 5 滑入、真火花 token 彈出 */
.hb-bomb__stage { position: relative; display: flex; align-items: center; gap: 18px; }
.hb-bomb__card .card { --card-w: 96px; filter: drop-shadow(0 3px 4px rgba(60, 42, 28, 0.22)); }
.hb-bomb__card[data-on] { animation: hb-card-deal 520ms var(--ease) both; }
@keyframes hb-card-deal { from { transform: translate(40px, -18px) rotate(14deg); } to { transform: rotate(4deg); } }
.hb-bomb__card[data-on] { transform: rotate(4deg); }
.hb-dial svg { transition: opacity 240ms; }
.hb-dial > b[data-over] { color: var(--rose); box-shadow: inset 0 0 0 1.5px rgba(196, 140, 132, 0.6); }
.hb-demo[data-step="2"] .hb-dial { animation: hb-dial-strain 700ms var(--ease) both; }
@keyframes hb-dial-strain { 30% { transform: rotate(-2deg) scale(1.03); } 60% { transform: rotate(2deg) scale(1.03); } }
.hb-bomb__spark { position: absolute; right: -16px; top: -2%; display: flex; align-items: center; gap: 2px; padding: 3px 10px 3px 4px; border-radius: 999px; background: rgba(250, 245, 234, 0.96); box-shadow: inset 0 0 0 1.5px rgba(196, 140, 132, 0.55), 0 3px 8px rgba(60, 42, 28, 0.18); font-family: var(--font-display); font-size: var(--fs-lg); color: var(--rose); }
.hb-dial .hb-bomb__spark img { position: static; width: 34px; height: 34px; object-fit: contain; filter: none; } /* 壓過 .hb-dial img 的滿版定位 */
.hb-bomb__spark[data-on] { animation: hb-pop 520ms var(--ease) both; }
@keyframes hb-pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.hb-example span[data-show] { display: inline-block; }
.hb-example span[data-show]:not([data-on]) { transform: translateY(4px); }

/* §R Ch.7：小橘翻出 6 → 反應窗 bar 倒數 → 你搶出貓掌 +2 → 有效 8、窗關閉 */
.hb-react__stage { display: flex; align-items: center; gap: 12px; }
.hb-react__col { display: grid; justify-items: center; gap: 8px; }
.hb-react__col .card { --card-w: 92px; filter: drop-shadow(0 3px 4px rgba(60, 42, 28, 0.22)); }
.hb-react__who { display: flex; align-items: center; gap: 6px; font-family: var(--font-serif); font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.hb-react__col--me[data-on] .card { animation: hb-snatch 460ms var(--ease) both; }
@keyframes hb-snatch { 0% { transform: translateY(46px) rotate(-12deg); opacity: 0; } 70% { transform: translateY(-6px) rotate(2deg); opacity: 1; } 100% { transform: rotate(-3deg); } }
.hb-react__col--me[data-on] .card { transform: rotate(-3deg); }
.hb-react__result { margin: 0; font-family: var(--font-serif); font-size: var(--fs-lg); color: var(--ink-2); }
.hb-react__result b { font-family: var(--font-display); font-size: 1.5em; color: var(--clay-deep); }
.hb-react__result[data-on] b { display: inline-block; animation: hb-pop 520ms var(--ease) both; }
.hb-window[data-on] .hb-window__bar i { animation: hb-drain 5s linear forwards; }
.hb-react[data-step="3"] .hb-window__bar i, .hb-react[data-step="4"] .hb-window__bar i, .hb-react[data-paused] .hb-window__bar i { animation-play-state: paused; }
.hb-react[data-step="3"] .hb-window__bar i { background: rgba(110, 92, 74, 0.35); }
@keyframes hb-drain { from { width: 100%; } to { width: 0; } }
.hb-window > span[data-show]:not([data-on]) { display: none; }

/* §T Ch.5 卡牌圖鑑：左頁內捲；點卡在左頁內展開詳情（非 motion） */
.hb-codex { position: relative; width: 100%; }
.hb-codex__scroll { max-height: 476px; overflow-y: auto; padding: 2px 6px 8px 2px; scrollbar-width: thin; scrollbar-color: rgba(110, 92, 74, 0.3) transparent; }
.hb-codex section + section { margin-top: 14px; }
.hb-codex h4 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px dashed rgba(110, 92, 74, 0.28); font-family: var(--font-serif); font-size: var(--fs-md); color: var(--ink-1); }
.hb-codex h4 small { font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); }
.hb-codex__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px 8px; justify-items: center; }
.hb-codex__item { padding: 0; border: 0; border-radius: 8px; background: none; transition: transform var(--t-fast) var(--ease), filter var(--t-fast); filter: drop-shadow(0 2px 2px rgba(60, 42, 28, 0.16)); }
.hb-codex__item .card { --card-w: 76px; pointer-events: none; }
@media (hover: hover) { .hb-codex__item:hover { transform: translateY(-4px) rotate(-1.5deg); filter: drop-shadow(0 5px 6px rgba(60, 42, 28, 0.22)); } }
.hb-codex__item:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }
.hb-codex__item[aria-pressed="true"] { outline: 2.5px solid var(--clay); outline-offset: 3px; }
.hb-codex__detail { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 22px; padding: 18px; border-radius: 14px; background: rgba(248, 242, 230, 0.97); box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.2), 0 6px 18px rgba(60, 42, 28, 0.14); animation: paper-in 220ms var(--ease); }
.hb-codex__detail[hidden] { display: none; }
.hb-codex__big .card { --card-w: 168px; filter: drop-shadow(0 4px 6px rgba(60, 42, 28, 0.24)); }
.hb-codex__info h4 { display: block; margin: 2px 0 8px; padding: 0; border: 0; font-size: var(--fs-xl); }
.hb-codex__info h4 span { font-family: var(--font-display); color: var(--clay-deep); }
.hb-codex__info p { margin: 0 0 8px; font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-2); }
.hb-codex__kind { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: var(--fs-xs) !important; font-weight: 700; letter-spacing: 0.12em; background: rgba(110, 92, 74, 0.1); }
.hb-codex__kind[data-kind="action"] { background: rgba(122, 136, 152, 0.18); color: var(--slate); }
.hb-codex__kind[data-kind="reaction"] { background: var(--clay-soft); color: var(--clay-deep); }
.hb-codex__when { color: var(--ink-3) !important; }
.hb-codex__copies b { font-family: var(--font-display); font-size: 1.2em; color: var(--ink-1); }

/* ─────────── 9. ConnectionOverlay ─────────── */
.modal-scrim--conn { background: radial-gradient(ellipse at 50% 45%, rgba(60, 48, 38, 0.35), rgba(30, 24, 20, 0.62)); backdrop-filter: blur(4px) saturate(0.6); }
.conn { width: 520px; text-align: center; padding: 40px 48px 32px; }
.conn__state { display: grid; justify-items: center; }
.modal-scrim--conn[data-state="reconnecting"] .conn__state[data-when="error"],
.modal-scrim--conn[data-state="error"] .conn__state[data-when="reconnecting"] { display: none; }
.conn__title { font-size: var(--fs-xl); }
.conn__note { margin: 14px 0 0; font-size: var(--fs-sm); }
.conn__foot { justify-content: center; margin-top: var(--sp-6); }
.conn__paws { display: flex; gap: 10px; margin-bottom: 18px; color: var(--clay); }
.conn__paws svg { width: 26px; height: 26px; animation: paw-step 1.2s var(--ease) infinite; opacity: 0.25; }
.conn__paws svg:nth-child(2) { animation-delay: 0.2s; transform: translateY(-6px); }
.conn__paws svg:nth-child(3) { animation-delay: 0.4s; }
@keyframes paw-step { 30% { opacity: 1; } 60% { opacity: 0.25; } }
/* ─────────── NetworkPending：建立／加入房間共用等待紙盒 ─────────── */
.modal-scrim--pending {
  background: #2e221a;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  cursor: wait;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .modal-scrim--pending {
    background: rgba(30, 24, 20, 0.62);
    backdrop-filter: blur(6px) saturate(0.72);
    -webkit-backdrop-filter: blur(6px) saturate(0.72);
  }
}
.pending { width: min(460px, calc(100vw - 32px)); padding: 38px 42px 34px; text-align: center; cursor: default; }
.pending__paws { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; color: var(--clay); }
.pending__paws svg { width: 27px; height: 27px; animation: paw-step 1.2s var(--ease) infinite; opacity: 0.25; }
.pending__paws svg:nth-child(2) { animation-delay: 0.2s; transform: translateY(-6px); }
.pending__paws svg:nth-child(3) { animation-delay: 0.4s; }
.pending__title { font-size: var(--fs-xl); }
.pending__lede { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) {
  .modal-scrim--pending, .pending, .pending__paws svg { animation: none; }
  .pending__paws svg { opacity: 1; }
}
.conn__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 14px; border-radius: 50%; background: rgba(196, 140, 132, 0.16); color: var(--rose); }
.conn__icon svg { width: 30px; height: 30px; }
.conn__code { margin-top: 16px; height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.08em; color: var(--ink-2); }
.conn__code svg { width: 16px; height: 16px; color: var(--rose); }

/* ─────────── 輕提示 ─────────── */
.toast { position: absolute; left: 848px; top: 96px; z-index: 60; transform: translateX(-50%); padding: 8px 18px; font-family: var(--font-serif); font-weight: 600; filter: var(--lift-2); animation: paper-in 260ms var(--ease); }

/* ─────────── 減少動態 ─────────── */
.stage[data-reduce-motion] *, .stage[data-reduce-motion] *::before, .stage[data-reduce-motion] *::after { animation: none !important; transition: none !important; }

/* ─────────── 審視導覽列（開發工具；不屬產品 UI） ─────────── */
:root { --devbar-h: 44px; }
body[data-devbar="hidden"] { --devbar-h: 0px; }
body[data-devbar="hidden"] .devbar { display: none; }
.devbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--devbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  background: #24201d;
  border-top: 1px solid #3a3430;
  color: #cfc5b8;
  font: 12px/1 ui-monospace, "Noto Sans Mono", monospace;
  overflow-x: auto;
  white-space: nowrap;
}
.devbar__brand { color: #8d8276; letter-spacing: 0.14em; }
.devbar__screens, .devbar__ctx { display: flex; gap: 4px; align-items: center; }
.devbar__ctx { margin-left: auto; }
.devbar__ctx label { color: #8d8276; margin: 0 2px 0 8px; }
.devbar button { height: 28px; padding: 0 10px; border: 1px solid #3f3833; border-radius: 6px; background: #2e2925; color: #d7cdc0; font: inherit; }
.devbar button:hover { background: #3a332e; }
.devbar button[aria-pressed="true"] { background: #e8dcc8; border-color: #e8dcc8; color: #2a241f; }
.devbar button kbd { margin: 0 4px 0 0; min-width: 0; height: auto; padding: 0; background: none; box-shadow: none; color: inherit; opacity: 0.55; font-family: inherit; }
.devbar__hide { margin-left: 6px; }
.devbar-show { position: fixed; left: 10px; bottom: 10px; z-index: 100; height: 28px; padding: 0 10px; border: 1px solid #3f3833; border-radius: 6px; background: rgba(36, 32, 29, 0.85); color: #d7cdc0; font: 12px ui-monospace, monospace; }

/* ─────────── §L-6 結果反饋（抽牌失敗／得鮮魚／BOOM）─────────── */
.toast[data-tone] { display: flex; align-items: center; gap: 10px; padding: 10px 22px 10px 16px; font-size: var(--fs-lg); letter-spacing: 0.04em; }
.toast__ico { width: 24px; height: 24px; flex: none; }
.toast[data-tone="good"] { color: #4f6a4b; }
.toast[data-tone="good"] .toast__ico { color: var(--honey); }
.toast[data-tone="bad"] { color: var(--clay-deep); animation: paper-in 260ms var(--ease), toast-nudge 420ms var(--ease) 120ms; }
.toast[data-tone="bad"] .toast__ico { color: var(--rose); }
@keyframes toast-nudge { 25% { translate: -5px 0; } 60% { translate: 4px 0; } }
.dial[data-hit="fail"], .dial[data-hit="boom"] { animation: dial-shake 560ms var(--ease); }
.dial[data-hit="boom"] { animation-duration: 760ms; }
@keyframes dial-shake { 15% { translate: -7px 0; rotate: -2.5deg; } 35% { translate: 7px 0; rotate: 2.5deg; } 55% { translate: -4px 0; rotate: -1deg; } 75% { translate: 3px 0; } }
.dial[data-hit="fail"] .dial__face, .dial[data-hit="boom"] .dial__face { animation: face-hurt 900ms var(--ease); }
@keyframes face-hurt { 20% { box-shadow: inset 0 0 0 999px rgba(176, 96, 74, 0.3); } }
.dial[data-hit="fish"] .dial__face { animation: face-joy 1.3s var(--ease); }
@keyframes face-joy { 30% { box-shadow: inset 0 0 0 999px rgba(255, 244, 214, 0.35), 0 0 0 6px rgba(201, 164, 106, 0.55), 0 0 26px rgba(201, 164, 106, 0.6); } }
/* 魚槽／火花槽：新點亮的那格彈入＋柔光 */
.pips img[data-pop] { animation: pip-pop 900ms cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes pip-pop { 0% { transform: scale(0.2); opacity: 0; } 45% { transform: scale(1.7); filter: drop-shadow(0 0 6px rgba(201, 164, 106, 0.95)); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .dial[data-hit], .dial[data-hit] .dial__face, .pips img[data-pop], .toast[data-tone="bad"] { animation: none; }
}

/* ─────────── HAND-VFX §B 奶油木 VFX（取代 Table toast）───────────
   紙籤 chit｜墨章 stamp｜紙屑 burst｜圖示飛入 fly｜落定 thud｜魚槽失去 lose；色只用既有 token，低飽和 */
.fx { position: absolute; z-index: 55; pointer-events: none; }
.fx-chit {
  transform: translate(-50%, -100%) rotate(-3deg);
  padding: 3px 12px 4px; border-radius: 6px;
  background: var(--paper-1); box-shadow: inset 0 0 0 1px rgba(110, 92, 74, 0.28), 0 4px 10px rgba(60, 42, 28, 0.2);
  font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--ink-1); white-space: nowrap;
  animation: chit-rise 1100ms var(--ease) both;
}
.fx-chit--good { color: #4f6a4b; box-shadow: inset 0 0 0 2px rgba(201, 164, 106, 0.7), 0 4px 10px rgba(60, 42, 28, 0.2); }
.fx-chit--bad { color: var(--clay-deep); box-shadow: inset 0 0 0 2px rgba(196, 140, 132, 0.7), 0 4px 10px rgba(60, 42, 28, 0.2); }
@keyframes chit-rise { 0% { opacity: 0; translate: 0 10px; scale: 0.6; } 18% { opacity: 1; translate: 0 0; scale: 1.08; } 30% { scale: 1; } 75% { opacity: 1; translate: 0 -18px; } 100% { opacity: 0; translate: 0 -28px; } }
.fx-stamp {
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 2px 14px 3px; border: 3px solid currentColor; border-radius: 8px;
  background: rgba(250, 245, 234, 0.88);
  font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: 0.08em; line-height: 1.1; color: var(--clay-deep); white-space: nowrap;
  animation: stamp-in 1500ms var(--ease) both;
}
.fx-stamp--ink { font-size: 20px; border-width: 2px; color: var(--ink-2); }
@keyframes stamp-in { 0% { opacity: 0; scale: 1.6; } 14% { opacity: 1; scale: 0.94; } 22% { scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.fx-burst i { position: absolute; left: -4px; top: -3px; width: 9px; height: 6px; border-radius: 1px; background: var(--bit-a); animation: fx-bit 900ms cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.fx-burst i:nth-child(even) { background: var(--bit-b); width: 6px; height: 8px; }
.fx-burst--honey { --bit-a: var(--honey); --bit-b: #ead7ae; }
.fx-burst--rose { --bit-a: var(--rose); --bit-b: #ecd2c8; }
@keyframes fx-bit { 0% { transform: rotate(var(--a)) translateX(12px) rotate(var(--r)); opacity: 1; } 100% { transform: rotate(var(--a)) translateX(var(--d)) translateY(26px) rotate(calc(var(--r) + 220deg)); opacity: 0; } }
/* §AG BOOM 爆炸粒子：奶油閃環兩道｜煙塵團｜紙屑碎片（甩出後受重力下墜）｜火星；低飽和赭／墨／蜂蜜，不用霓虹 */
.fx-boom { width: 0; height: 0; }
.fx-boom > * { position: absolute; left: 0; top: 0; will-change: transform, opacity; }
.fx-boom__ring { width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 10px solid rgba(250, 236, 206, 0.9); box-shadow: 0 0 24px rgba(214, 170, 104, 0.7), inset 0 0 18px rgba(214, 170, 104, 0.55); animation: fx-boom-ring 520ms cubic-bezier(0.1, 0.8, 0.3, 1) both; }
.fx-boom__ring--late { border-width: 4px; border-color: rgba(176, 106, 80, 0.55); box-shadow: none; animation-delay: 90ms; animation-duration: 680ms; }
@keyframes fx-boom-ring { 0% { transform: scale(0.25); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }
.fx-boom__smoke { width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; background: radial-gradient(closest-side, rgba(96, 80, 68, 0.42), rgba(96, 80, 68, 0.16) 60%, rgba(96, 80, 68, 0)); animation: fx-boom-smoke 1200ms cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes fx-boom-smoke { 0% { transform: translate(0, 0) scale(0.4); opacity: 0; } 18% { opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) - 46px)) scale(var(--s)); opacity: 0; } }
.fx-boom__bit { width: 11px; height: 7px; margin: -3px 0 0 -5px; border-radius: 1px; background: #6f5d50; animation: fx-boom-bit 1050ms cubic-bezier(0.15, 0.75, 0.35, 1) both; }
.fx-boom__bit:nth-child(3n) { background: var(--clay); width: 8px; height: 10px; }
.fx-boom__bit:nth-child(3n + 1) { background: #ead7ae; }
@keyframes fx-boom-bit { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 55% { transform: translate(var(--x), var(--y)) rotate(calc(var(--r) * 0.6)); opacity: 1; } 100% { transform: translate(calc(var(--x) * 1.12), calc(var(--y) + var(--g))) rotate(var(--r)); opacity: 0; } }
.fx-boom__ember { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #f6dca6; box-shadow: 0 0 6px 2px rgba(222, 160, 92, 0.75); animation: fx-boom-ember 640ms cubic-bezier(0.05, 0.7, 0.3, 1) both; }
@keyframes fx-boom-ember { 0% { transform: translate(0, 0) scale(1.4); opacity: 1; } 100% { transform: translate(var(--x), var(--y)) scale(0.3); opacity: 0; } }
.fx-fly img { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; max-width: none; /* 容器 0 寬，避開全域 img max-width:100% 被壓成 0 */ filter: drop-shadow(0 3px 4px rgba(60, 42, 28, 0.3)); animation: fx-fly 620ms ease-in-out both; }
@keyframes fx-fly { 0% { translate: 0 0; scale: 0.5; opacity: 0; } 15% { opacity: 1; scale: 1.25; } 50% { translate: calc(var(--dx) * 0.5) calc(var(--dy) * 0.5 - 70px); scale: 1.15; } 100% { translate: var(--dx) var(--dy); scale: 0.7; opacity: 0.85; } }
.pips img[data-await] { opacity: 0; }
/* §AA 升起字前的圖標：與字同升，出發飛入時藏起（由 .fx-fly 接手） */
.fx-tok { display: inline-block; width: 26px; height: 26px; margin: 0 6px 0 -2px; vertical-align: -5px; filter: drop-shadow(0 2px 2px rgba(60, 42, 28, 0.25)); }
.fx-stamp .fx-tok { width: 32px; height: 32px; vertical-align: -4px; }
.fx-tok[data-gone] { visibility: hidden; }
.pile[data-thud] { animation: fx-thud 360ms var(--ease); }
@keyframes fx-thud { 35% { translate: 0 4px; } }
.dial__dir[data-thud] { animation: fx-dir-flip 560ms var(--ease); }
@keyframes fx-dir-flip { 100% { rotate: y 360deg; } }
.pips[data-lose] { animation: fx-lose 720ms var(--ease); }
@keyframes fx-lose { 20% { translate: -4px 0; filter: drop-shadow(0 0 6px rgba(196, 140, 132, 0.9)); } 45% { translate: 4px 0; } 70% { translate: -2px 0; } }
@media (prefers-reduced-motion: reduce) {
  .fx-burst, .fx-fly, .fx-boom { display: none; }
  .fx-chit, .fx-stamp, .pile[data-thud], .dial__dir[data-thud], .pips[data-lose] { animation: none; }
}
.stage[data-reduce-motion] .fx-burst, .stage[data-reduce-motion] .fx-fly, .stage[data-reduce-motion] .fx-boom { display: none; }

/* Explicit local QA state banner. Product/network routes never enable this surface. */
.qa-state {
  position: fixed; z-index: 90; top: 12px; left: 50%; transform: translateX(-50%);
  max-width: min(760px, calc(100vw - 28px)); padding: 8px 14px; border: 1px solid rgba(110,92,74,.32);
  border-radius: 8px; background: rgba(250,245,234,.96); color: var(--ink-1); box-shadow: 0 5px 16px rgba(60,42,28,.18);
  font-size: var(--fs-sm); line-height: 1.35; text-align: center; pointer-events: none;
}
.qa-state[data-tone="bad"] { border-color: rgba(176,96,74,.55); color: var(--clay-deep); }
.qa-state[data-tone="wait"] { border-color: rgba(201,164,106,.7); color: #765c2f; }
.qa-state__case { display: block; margin-bottom: 2px; font: 600 10px/1.1 var(--font-mono, ui-monospace); letter-spacing: .04em; opacity: .68; }
[data-screen="menu"][data-art-state="unavailable"] .menu__scene,
[data-screen="menu"][data-art-state="unavailable"] .menu__cat { opacity: .12; }
[data-overlay="help"][data-art-state="unavailable"] .book__fig { opacity: .18; }
[data-screen="room"][data-qa-state="br-core-room-closed"] .room-me,
[data-screen="room"][data-qa-state="br-core-room-closed"] .room-friends,
[data-screen="room"][data-qa-state="br-core-room-closed"] [data-action="toggle-ready"],
[data-screen="room"][data-qa-state="br-core-room-closed"] [data-action="start"] { pointer-events: none; opacity: .55; }
[data-screen="room"][data-room-state="closed"] .room-exit,
[data-screen="room"][data-room-state="closed"] .room-board__hint,
[data-screen="room"][data-room-state="closed"] .rule-chips,
[data-screen="room"][data-room-state="closed"] .room-me,
[data-screen="room"][data-room-state="closed"] .room-friends { display: none; }
[data-screen="table"][data-qa-state="br-core-table-loading"] .tabletop,
[data-screen="table"][data-qa-state="br-core-table-failed"] .tabletop { opacity: .62; }
@media (max-width: 700px) {
  .qa-state { top: 6px; font-size: var(--fs-xs); }
}
