/* ==========================================================
   出發英文 Go English — app.css
   概念：登機證 × 護照戳章
   段落：1 token／2 基礎／3 通用元件／4 版面／5 畫面／6 RWD／7 減少動態
   ========================================================== */

/* ---------- 1. design tokens ---------- */
:root {
  --bg: #FAF7F1;
  --bg-soft: #F2EDE3;
  --card: #FFFFFF;
  --card-2: #FBF8F2;
  --ink: #14213D;
  --ink-mut: #4F5B76;
  --ink-faint: #8D95A8;
  --border-soft: #E4DCCB;
  --border-strong: #CFC5AE;
  --acc: #D4431F;
  --acc-2: #B8361A;
  --acc-ink: #FFFFFF;
  --acc-soft: #FCE8E0;
  --ok: #1F7A45;
  --ok-soft: #DDF1E4;
  --warn: #9A5B00;
  --warn-soft: #FBEBC8;
  --bad: #C2312B;
  --bad-soft: #FADCD9;
  --star: #D58A00;
  --shadow-1: 0 1px 2px rgba(20, 33, 61, .06), 0 2px 8px rgba(20, 33, 61, .05);
  --shadow-2: 0 2px 4px rgba(20, 33, 61, .06), 0 14px 32px rgba(20, 33, 61, .12);
  --shadow-tk: drop-shadow(0 1px 1px rgba(20, 33, 61, .07)) drop-shadow(0 8px 16px rgba(20, 33, 61, .08));
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Segoe UI", system-ui, sans-serif;
  --font-en: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --hue-rgb: 212, 67, 31;
  --hue: rgb(var(--hue-rgb));
  --hue-soft: rgba(var(--hue-rgb), .12);
  --tab-h: 64px;
  --side-w: 248px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0E1424;
  --bg-soft: #121A2F;
  --card: #18203A;
  --card-2: #1E2846;
  --ink: #EEF1F8;
  --ink-mut: #A7B0C8;
  --ink-faint: #6D7897;
  --border-soft: #2A3556;
  --border-strong: #3A4770;
  --acc: #FF7A55;
  --acc-2: #FF9577;
  --acc-ink: #1B0E08;
  --acc-soft: rgba(255, 122, 85, .16);
  --ok: #5DD08B;
  --ok-soft: rgba(93, 208, 139, .16);
  --warn: #FFC15A;
  --warn-soft: rgba(255, 193, 90, .16);
  --bad: #FF8A84;
  --bad-soft: rgba(255, 138, 132, .16);
  --star: #FFC24D;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .4), 0 16px 36px rgba(0, 0, 0, .5);
  --shadow-tk: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)) drop-shadow(0 8px 16px rgba(0, 0, 0, .35));
  --hue-rgb: 255, 122, 85;
  color-scheme: dark;
}

/* 11 個分類色（淺色：深色調確保白底文字 AA；深色：亮色調確保深底文字 AA） */
[data-hue="sky"]       { --hue-rgb: 27, 115, 184; }
[data-hue="teal"]      { --hue-rgb: 15, 127, 120; }
[data-hue="indigo"]    { --hue-rgb: 74, 84, 196; }
[data-hue="coral"]     { --hue-rgb: 200, 69, 43; }
[data-hue="pink"]      { --hue-rgb: 192, 42, 114; }
[data-hue="green"]     { --hue-rgb: 46, 125, 50; }
[data-hue="amber"]     { --hue-rgb: 166, 98, 0; }
[data-hue="gold"]      { --hue-rgb: 140, 106, 0; }
[data-hue="violet"]    { --hue-rgb: 123, 63, 196; }
[data-hue="red"]       { --hue-rgb: 198, 40, 40; }
[data-hue="slate"]     { --hue-rgb: 75, 91, 115; }
[data-theme="dark"] [data-hue="sky"]    { --hue-rgb: 109, 184, 242; }
[data-theme="dark"] [data-hue="teal"]   { --hue-rgb: 77, 208, 196; }
[data-theme="dark"] [data-hue="indigo"] { --hue-rgb: 154, 163, 255; }
[data-theme="dark"] [data-hue="coral"]  { --hue-rgb: 255, 143, 115; }
[data-theme="dark"] [data-hue="pink"]   { --hue-rgb: 255, 141, 190; }
[data-theme="dark"] [data-hue="green"]  { --hue-rgb: 125, 219, 132; }
[data-theme="dark"] [data-hue="amber"]  { --hue-rgb: 255, 184, 77; }
[data-theme="dark"] [data-hue="gold"]   { --hue-rgb: 232, 199, 102; }
[data-theme="dark"] [data-hue="violet"] { --hue-rgb: 195, 155, 255; }
[data-theme="dark"] [data-hue="red"]    { --hue-rgb: 255, 122, 122; }
[data-theme="dark"] [data-hue="slate"]  { --hue-rgb: 169, 184, 208; }
[data-hue] { --hue: rgb(var(--hue-rgb)); --hue-soft: rgba(var(--hue-rgb), .12); }
[data-theme="dark"] [data-hue] { --hue-soft: rgba(var(--hue-rgb), .17); }

/* ---------- 2. 基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}
/* 極淡的紙張點陣，增加質感但不搶戲 */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(20, 33, 61, .055) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
[data-theme="dark"] body::before { background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1.2px); }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: .01em; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--acc-soft); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mut { color: var(--ink-mut); }
.boot-note { padding: 40px 16px; color: var(--ink-mut); text-align: center; }

/* ---------- 3. 通用元件 ---------- */
.mono { font-family: var(--font-mono); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.en { font-family: var(--font-en); font-size: 1.35rem; line-height: 1.35; color: var(--ink); letter-spacing: 0; }
.zh { color: var(--ink-mut); font-size: .95rem; line-height: 1.5; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mut); }

/* 按鈕 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1;
  color: var(--ink);
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--border-strong);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s;
  user-select: none; -webkit-user-select: none;
  white-space: nowrap;
}
.btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--acc); color: var(--acc-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 14px -4px rgba(212, 67, 31, .55); }
[data-theme="dark"] .btn-primary { box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 6px 16px -4px rgba(255, 122, 85, .45); }
.btn-primary:hover { background: var(--acc-2); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 18px -4px rgba(212, 67, 31, .6); }
[data-theme="dark"] .btn-primary:hover { background: var(--acc-2); }
.btn-ghost { background: transparent; box-shadow: none; color: var(--ink-mut); }
.btn-ghost:hover { background: var(--bg-soft); box-shadow: none; color: var(--ink); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; }
.btn-icon { width: 48px; padding: 0; flex: none; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.iconbtn {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: var(--ink-mut);
  transition: background .2s, color .2s, transform .15s;
}
.iconbtn:hover { background: var(--bg-soft); color: var(--ink); }
.iconbtn:active { transform: scale(.92); }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn.on { color: var(--star); }
.iconbtn.on svg { fill: currentColor; }
.iconbtn.playing { color: var(--acc); background: var(--acc-soft); animation: pulse 1.1s ease-in-out infinite; }

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--border-soft);
  padding: 18px;
}
.card-link { display: block; transition: transform .2s ease, box-shadow .2s ease; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--border-soft); }
.card-link:active { transform: translateY(0) scale(.99); }

/* 登機證票卡：右側票根，撕線處上下打孔 */
.tk-wrap { display: block; position: relative; filter: var(--shadow-tk); transition: transform .22s cubic-bezier(.2, .8, .2, 1), filter .22s; }
a.tk-wrap:hover, button.tk-wrap:hover { transform: translateY(-3px); }
a.tk-wrap:active, button.tk-wrap:active { transform: translateY(0) scale(.99); }
.ticket {
  --stub: 92px;
  --notch: 9px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stub);
  background: var(--card);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border-soft);
  -webkit-mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 calc(var(--notch) - .6px), #000 var(--notch)) top / 100% 52% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 calc(var(--notch) - .6px), #000 var(--notch)) bottom / 100% 52% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 calc(var(--notch) - .6px), #000 var(--notch)) top / 100% 52% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 calc(var(--notch) - .6px), #000 var(--notch)) bottom / 100% 52% no-repeat;
}
.ticket::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--hue); z-index: 2; }
.ticket-main { position: relative; padding: 16px 16px 16px 20px; min-width: 0; z-index: 1; }
.ticket-stub {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 12px 8px;
  text-align: center;
  background: linear-gradient(180deg, var(--hue-soft), transparent 140%), var(--card-2);
}
.ticket-stub::before {
  content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--border-strong) 0 5px, transparent 5px 10px);
}
.ticket.no-stub { grid-template-columns: 1fr; -webkit-mask: none; mask: none; }
.ticket.no-stub .ticket-stub { display: none; }
.code { font-family: var(--font-mono); font-weight: 700; letter-spacing: .14em; color: var(--hue); font-size: 1.3rem; }

/* 小元件 */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 16px;
  border-radius: 999px;
  font-size: .92rem; font-weight: 500;
  color: var(--ink-mut);
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--border-soft);
  white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s, transform .15s;
}
.chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip.on[data-hue] { background: var(--hue); color: var(--bg); }
[data-theme="dark"] .chip.on[data-hue] { color: #0E1424; }
.chip-static { min-height: 30px; padding: 0 12px; font-size: .8rem; background: var(--bg-soft); box-shadow: none; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  color: var(--hue, var(--acc-2));
  background: var(--hue-soft, var(--acc-soft));
  white-space: nowrap;
}
.badge-ok { color: var(--ok); background: var(--ok-soft); }
.badge-warn { color: var(--warn); background: var(--warn-soft); }
.badge-mut { color: var(--ink-mut); background: var(--bg-soft); }

.progress { height: 6px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; box-shadow: inset 0 0 0 1px var(--border-soft); }
.progress > i, .progress > .bar { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--hue, var(--acc)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* 環：<svg class="ring" style="--p:40"> */
.ring-wrap { position: relative; width: var(--size, 76px); height: var(--size, 76px); flex: none; display: grid; place-items: center; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .ring-bg { fill: none; stroke: var(--border-soft); stroke-width: 3.4; }
.ring .ring-fg { fill: none; stroke: var(--hue, var(--acc)); stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: var(--p, 0) 100; transition: stroke-dasharray .8s cubic-bezier(.2, .8, .2, 1); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring-label b { font-family: var(--font-mono); font-size: calc(var(--size, 76px) * .27); font-weight: 700; }
.ring-label small { font-size: 10px; color: var(--ink-mut); letter-spacing: .06em; }

.wave { position: relative; display: block; width: 100%; height: 56px; border-radius: var(--r-sm); background: var(--bg-soft); overflow: hidden; }
.wave canvas { display: block; width: 100%; height: 100%; }

.stars { display: inline-flex; gap: 2px; font-size: 14px; line-height: 1; letter-spacing: 0; }
.stars .s { color: var(--border-strong); }
.stars .s.on { color: var(--star); }
.stars-lg { font-size: 22px; gap: 4px; }

/* 戳章 */
.stamp { display: inline-block; color: var(--hue, var(--acc)); transform: rotate(-9deg); line-height: 0; opacity: .92; mix-blend-mode: multiply; }
[data-theme="dark"] .stamp { mix-blend-mode: screen; opacity: .85; }
.stamp svg { width: 100%; height: 100%; }
.stamp-sm { width: 52px; height: 52px; }
.stamp-md { width: 92px; height: 92px; }
.stamp-lg { width: 148px; height: 148px; }
.stamp.pop { animation: stampIn .55s cubic-bezier(.2, 1.4, .4, 1) both; }

/* 句子逐字結果 */
.w { display: inline-block; margin-right: .28em; padding: 0 .1em; border-radius: 4px; }
.w.ok { color: var(--ok); background: var(--ok-soft); }
.w.miss { color: var(--bad); background: var(--bad-soft); text-decoration: underline wavy; text-underline-offset: 4px; }

/* 底部面板 */
.sheet-back { position: fixed; inset: 0; z-index: 90; background: rgba(10, 16, 32, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .2s ease both; }
.sheet {
  position: fixed; z-index: 91; left: 0; right: 0; bottom: 0;
  max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 10px 20px calc(24px + var(--safe-b));
  box-shadow: 0 -10px 40px rgba(10, 16, 32, .25);
  animation: sheetUp .32s cubic-bezier(.2, .9, .2, 1) both;
}
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--border-strong); margin: 0 auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.sheet-head h2 { font-size: 1.15rem; }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.sheet textarea, .field {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border-radius: var(--r-sm); border: 0;
  background: var(--bg-soft); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--border-soft);
}
.sheet textarea { min-height: 120px; font-family: var(--font-mono); font-size: .8rem; resize: vertical; word-break: break-all; }
.field:focus, .sheet textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--acc); }

.toast {
  position: fixed; z-index: 120; left: 50%; bottom: calc(var(--tab-h) + 18px + var(--safe-b));
  transform: translateX(-50%);
  max-width: min(92vw, 420px);
  padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: .92rem; font-weight: 500; text-align: center;
  box-shadow: var(--shadow-2);
  animation: toastIn .3s cubic-bezier(.2, .9, .2, 1) both;
  pointer-events: none;
}
.toast.out { animation: toastOut .25s ease both; }
.xp-pop {
  position: fixed; z-index: 119; right: 16px; top: calc(16px + var(--safe-t));
  padding: 6px 14px; border-radius: 999px;
  background: var(--acc); color: var(--acc-ink);
  font-family: var(--font-mono); font-weight: 700; font-size: .9rem; letter-spacing: .04em;
  box-shadow: var(--shadow-2); pointer-events: none;
  animation: xpPop 1.4s ease both;
}

/* 插圖位 */
.art { position: relative; overflow: hidden; color: var(--hue, var(--acc)); }
.art svg { display: block; width: 100%; height: 100%; }
.art-tk { position: absolute; right: -6px; bottom: -4px; width: 170px; height: 112px; pointer-events: none; opacity: .9; }
.art-hero { position: absolute; right: 6px; top: 4px; width: min(62%, 340px); height: 62%; pointer-events: none; opacity: .8; }
.hero-stub .ring-fg { stroke: var(--acc); }
@media (max-width: 767px) { .art-tk { width: 128px; height: 85px; opacity: .6; } }
.art-empty { width: 150px; height: 100px; margin: 0 auto 8px; color: var(--ink-faint); }

/* 空狀態 */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-mut); }
.empty h2 { color: var(--ink); font-size: 1.15rem; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

/* ---------- 4. 版面 ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: block; }
.view {
  display: block; width: 100%; max-width: 1120px; margin: 0 auto;
  padding: calc(18px + var(--safe-t)) 16px calc(var(--tab-h) + 32px + var(--safe-b));
  outline: 0;
  animation: pageIn .38s cubic-bezier(.2, .8, .2, 1) both;
}
.view.view-narrow { max-width: 760px; }

.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 -1px 0 var(--border-soft), 0 -8px 24px rgba(20, 33, 61, .06);
}
@supports not (background: color-mix(in srgb, red, blue)) { .tabbar { background: var(--card); } }
.tab {
  position: relative; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink-mut);
  transition: color .2s;
}
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--acc-2); }
.tab.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--acc); }
.tab .dot, .navlink .dot {
  position: absolute; top: 7px; left: calc(50% + 8px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--acc); color: var(--acc-ink);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
}

.sidenav { display: none; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 40px; flex: none; border-radius: 12px; box-shadow: var(--shadow-1); }
.brand-t { line-height: 1.15; }
.brand-t b { display: block; font-size: 1.05rem; letter-spacing: .02em; }
.brand-t small { font-size: .72rem; color: var(--ink-mut); }

.pagebar { display: flex; align-items: center; gap: 4px; margin: 0 0 14px -10px; }
.pagebar .eyebrow { margin-left: 4px; }
.pagebar .spacer { flex: 1; }

.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.sec-title h2 { font-size: 1.2rem; }
.sec-title .eyebrow { white-space: nowrap; }

/* ---------- 5. 畫面 ---------- */
/* 首頁 */
.home-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.home-top h1 { font-size: 1.65rem; margin: 4px 0 2px; }
.xp-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; flex: none;
  border-radius: 999px; background: var(--card); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--border-soft);
  font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.xp-pill b { font-family: var(--font-mono); color: var(--acc-2); font-variant-numeric: tabular-nums; }
.xp-pill .lv { color: var(--ink-mut); font-family: var(--font-mono); letter-spacing: .06em; }
.xp-pill .bump { animation: bump .5s ease; }

.hero-ticket .ticket { --stub: 118px; --notch: 11px; }
.hero-ticket .ticket-main { padding: 22px 20px 22px 24px; min-height: 196px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.hero-ticket .ticket::before { width: 5px; background: linear-gradient(180deg, var(--acc), #F0A13C); }
.hero-ticket h2 { font-size: 1.5rem; position: relative; }
.hero-ticket .ticket-main > *:not(.art) { position: relative; z-index: 1; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-stub { --size: 84px; }
.hero-stub .code { font-size: .8rem; color: var(--ink-mut); letter-spacing: .18em; }
.hero-stub .barcode { width: 64px; height: 22px; margin-top: 4px; opacity: .55; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 13px); }

.duo { display: grid; gap: 14px; margin-top: 16px; }
.mini-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-height: 84px; }
.mini-card .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc-2); flex: none; }
.mini-card .ico svg { width: 24px; height: 24px; }
.mini-card h3 { font-size: 1rem; }
.mini-card p { font-size: .85rem; color: var(--ink-mut); }
.mini-card .num { margin-left: auto; font-family: var(--font-mono); font-size: 1.7rem; font-weight: 700; color: var(--acc-2); }

.cat-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.cat-ticket .ticket-main { min-height: 128px; display: flex; flex-direction: column; gap: 3px; }
.cat-ticket .ticket-main > * { position: relative; z-index: 1; }
.cat-ticket h3 { font-size: 1.18rem; margin-top: 2px; }
.cat-ticket .sub { font-family: var(--font-en); font-size: .92rem; color: var(--ink-mut); font-style: italic; }
.cat-ticket .progress { margin-top: auto; width: 62%; max-width: 160px; }
.cat-ticket .foot { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--ink-mut); }
.cat-ticket .emo { font-size: 1.1rem; line-height: 1; filter: saturate(.85); }
.cat-ticket .ticket-stub .small { font-size: .7rem; color: var(--ink-mut); letter-spacing: .04em; }
.cat-ticket .ticket-stub .pct { font-family: var(--font-mono); font-size: .78rem; font-weight: 600; color: var(--ink-mut); }
.gate { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; color: var(--ink-faint); }

/* 分類頁 */
.cat-banner .ticket { --stub: 120px; --notch: 12px; }
.cat-banner .ticket-main { padding: 22px 20px 22px 26px; min-height: 160px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.cat-banner .ticket-main > *:not(.art) { position: relative; z-index: 1; }
.cat-banner h1 { font-size: 1.7rem; }
.cat-banner .code { font-size: 2rem; }
.scene-list { display: grid; gap: 12px; margin-top: 18px; }
.scene-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px; min-height: 84px; position: relative; overflow: hidden; }
.scene-row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--hue); }
.scene-no { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700; color: var(--hue); text-align: center; letter-spacing: .04em; }
.scene-row h3 { font-size: 1.05rem; }
.scene-row .en-sub { font-family: var(--font-en); font-style: italic; color: var(--ink-mut); font-size: .88rem; }
.scene-row .goal { font-size: .84rem; color: var(--ink-mut); margin-top: 3px; }
.scene-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lv-dots { display: inline-flex; gap: 3px; }
.lv-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.lv-dots i.on { background: var(--hue); }
.scene-side .stamp { margin: -4px -2px -6px 0; }

/* 場景頁 */
.scene-hero .ticket { --stub: 108px; --notch: 11px; }
.scene-hero .ticket-main { padding: 22px 20px 22px 26px; display: flex; flex-direction: column; gap: 8px; min-height: 176px; }
.scene-hero .ticket-main > *:not(.art) { position: relative; z-index: 1; }
.scene-hero h1 { font-size: 1.7rem; }
.scene-hero .en-sub { font-family: var(--font-en); font-style: italic; color: var(--ink-mut); font-size: 1.05rem; }
.scene-hero .goal { margin-top: 4px; font-size: .98rem; }
.role-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.mission { margin-top: 16px; padding: 18px 20px; }
.mission h3 { font-size: .8rem; letter-spacing: .14em; font-family: var(--font-mono); color: var(--ink-mut); text-transform: uppercase; margin-bottom: 10px; font-weight: 600; }
.mission ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: m; }
.mission li { counter-increment: m; display: flex; gap: 12px; align-items: baseline; font-size: .96rem; }
.mission li::before { content: counter(m, decimal-leading-zero); font-family: var(--font-mono); font-size: .78rem; font-weight: 700; color: var(--hue); letter-spacing: .06em; }
.mode-grid { display: grid; gap: 12px; margin-top: 16px; grid-template-columns: 1fr; }
.modecard { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-height: 84px; text-align: left; width: 100%; }
.modecard .ico { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--hue-soft); color: var(--hue); }
.modecard .ico svg { width: 26px; height: 26px; }
.modecard h3 { font-size: 1.02rem; }
.modecard p { font-size: .84rem; color: var(--ink-mut); margin-top: 2px; }
.modecard .go { margin-left: auto; color: var(--ink-faint); flex: none; }
.modecard .go svg { width: 20px; height: 20px; }
.modecard .badge { margin-left: auto; }
.modecard .badge + .go { margin-left: 8px; }

.phrase-list { display: grid; gap: 10px; }
.phrase { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; padding: 10px 8px 10px 6px; border-radius: var(--r-md); background: var(--card); box-shadow: inset 0 0 0 1px var(--border-soft); }
.phrase.them { background: var(--card-2); }
.phrase .en { font-size: 1.12rem; }
.phrase .zh { margin-top: 2px; font-size: .88rem; }
.phrase .note { margin-top: 4px; font-size: .78rem; color: var(--warn); }
.phrase .who { margin-bottom: 4px; }
.phrase-side { display: flex; align-items: center; }
.phrase .pbtn { width: 44px; height: 44px; border-radius: 50%; background: var(--hue-soft); color: var(--hue); display: grid; place-items: center; transition: transform .15s; }
.phrase .pbtn:active { transform: scale(.9); }
.phrase .pbtn svg { width: 20px; height: 20px; }
.phrase .pbtn.playing { background: var(--hue); color: var(--bg); animation: pulse 1.1s ease-in-out infinite; }
.vocab-grid { display: grid; gap: 8px; }
.vocab { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px 4px 10px 14px; border-radius: var(--r-sm); background: var(--bg-soft); }
.vocab .en { font-size: 1.05rem; }
.tip-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tip-list li { padding: 12px 14px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--ink); font-size: .92rem; }
.tip-list li::before { content: "TIP"; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .14em; margin-right: 8px; color: var(--warn); }

/* 練習全螢幕 */
body.is-play .sidenav, body.is-play .tabbar { display: none !important; }
body.is-play .shell { display: block; }
.play {
  position: fixed; inset: 0; z-index: 60;
  width: 100%; height: 100vh; height: 100dvh; height: var(--vvh, 100dvh); /* 祖先有 transform 時 inset 會失效，明確給高 */
  display: flex; flex-direction: column;
  background: var(--bg);
  padding-top: var(--safe-t);
  animation: fade .25s ease both;
}
.mode-host { flex: 1; min-height: 0; width: 100%; max-width: 760px; margin: 0 auto; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.mode-host-flow { min-height: 60vh; }
.play-missing { margin: auto; }
/* 全螢幕練習時，外層不可有 transform／動畫，否則 fixed 會以它為定位基準 */
.view.view-play { animation: none !important; transform: none !important; filter: none; padding: 0; max-width: none; }

/* 口袋快查 */
.search { position: relative; }
.search input { padding-left: 46px; min-height: 52px; border-radius: 999px; font-size: 1rem; }
.search svg { position: absolute; left: 16px; top: 15px; width: 22px; height: 22px; color: var(--ink-faint); pointer-events: none; }
.search .clear { position: absolute; right: 4px; top: 4px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; margin: 0 -16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.pocket-list { display: grid; gap: 10px; margin-top: 4px; }
.pocket-item { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center; padding: 14px 8px 14px 0; border-radius: var(--r-md); background: var(--card); box-shadow: inset 0 0 0 1px var(--border-soft); overflow: hidden; }
.pocket-item > i { align-self: stretch; background: var(--hue); border-radius: 0 3px 3px 0; margin: 6px 0; }
.pocket-item .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; color: var(--hue); font-weight: 700; margin-bottom: 2px; }
.pocket-item .en { font-size: 1.28rem; }
.pocket-actions { display: flex; align-items: center; }
.pocket-tap { text-align: left; width: 100%; padding: 2px 0; min-height: 44px; }
.zoom {
  position: fixed; inset: 0; z-index: 110;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4vh;
  padding: calc(56px + var(--safe-t)) 6vw calc(40px + var(--safe-b));
  background: #FFFFFF; color: #0B0B0F;
  text-align: center;
  animation: fade .2s ease both;
}
.zoom .z-en { font-family: var(--font-en); font-weight: 700; line-height: 1.12; font-size: clamp(2.2rem, 11vw, 6.5rem); word-break: break-word; max-width: 18ch; }
.zoom .z-zh { font-size: clamp(1rem, 3.4vw, 1.6rem); color: #4A4F5E; max-width: 30ch; }
.zoom .z-bar { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; display: flex; justify-content: space-between; }
.zoom .iconbtn { color: #14213D; width: 52px; height: 52px; }
.zoom .iconbtn:hover { background: #F0EEE8; color: #000; }
.zoom .iconbtn svg { width: 28px; height: 28px; }
.zoom .z-hint { position: absolute; bottom: calc(14px + var(--safe-b)); font-size: .75rem; color: #8A8F9E; }

/* 我的 */
.me-hero { display: flex; align-items: center; gap: 18px; padding: 20px; }
.me-hero .lvl { width: 76px; height: 76px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--ink); color: var(--bg); flex: none; line-height: 1.05; box-shadow: 0 0 0 4px var(--bg), 0 0 0 5.5px var(--border-strong); }
.me-hero .lvl small { font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; opacity: .75; }
.me-hero .lvl b { font-family: var(--font-mono); font-size: 1.7rem; }
.me-hero .grow { flex: 1; min-width: 0; }
.me-hero h1 { font-size: 1.35rem; }
.me-hero .progress { margin-top: 10px; --hue: var(--acc); }
.me-hero .xpline { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-mut); margin-top: 6px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
.stat { padding: 16px; }
.stat b { display: block; font-family: var(--font-mono); font-size: 1.7rem; line-height: 1.1; letter-spacing: 0; }
.stat span { font-size: .8rem; color: var(--ink-mut); }
.act { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 120px; margin-top: 12px; }
.act-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.act-bar { width: 100%; max-width: 22px; min-height: 5px; height: var(--h, 5%); border-radius: 6px 6px 3px 3px; background: var(--border-soft); transition: height .7s cubic-bezier(.2, .8, .2, 1); }
.act-col.has .act-bar { background: linear-gradient(180deg, var(--acc), #F0A13C); }
.act-col.goal .act-bar { background: linear-gradient(180deg, var(--ok), color-mix(in srgb, var(--ok) 55%, var(--bg))); }
.act-col.today .act-d { color: var(--acc-2); font-weight: 700; }
.act-d { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--ink-mut); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--acc); }
.cat-prog { display: grid; gap: 14px; }
.cat-prog-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; min-height: 44px; }
.cat-prog-row .code { font-size: .95rem; }
.cat-prog-row .nm { font-size: .88rem; margin-bottom: 5px; }
.cat-prog-row .pc { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-mut); }
.set-group { margin-top: 12px; }
.set-row { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.set-row:last-child { border-bottom: 0; }
.set-row > label, .set-row > .lbl { font-size: .92rem; font-weight: 600; }
.set-row .hint { font-size: .78rem; color: var(--ink-mut); font-weight: 400; display: block; margin-top: 2px; }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--border-soft); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 999px; font-size: .88rem; font-weight: 500; color: var(--ink-mut); white-space: nowrap; transition: background .2s, color .2s; }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: var(--shadow-1); }
.switch { position: relative; width: 56px; height: 32px; border-radius: 99px; background: var(--border-strong); transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .22s cubic-bezier(.2, .9, .3, 1.2); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(24px); }
.switch-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
.switch-row button { min-width: 56px; min-height: 44px; display: grid; place-items: center; }
select.field { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-mut) 50%), linear-gradient(135deg, var(--ink-mut) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.data-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.foot-note { margin-top: 36px; text-align: center; font-size: .78rem; color: var(--ink-faint); letter-spacing: .04em; }
.foot-note b { font-family: var(--font-mono); letter-spacing: .12em; color: var(--ink-mut); }
.danger { color: var(--bad); }

/* 歡迎 */
.welcome { text-align: center; padding-top: 6px; }
.welcome .stamp { margin: 6px auto 8px; }
.welcome h2 { font-size: 1.4rem; }
.welcome p { color: var(--ink-mut); margin-top: 8px; }
.welcome .field { margin-top: 18px; text-align: center; font-size: 1.05rem; }
.welcome .priv { font-size: .8rem; margin-top: 14px; display: flex; gap: 8px; align-items: flex-start; text-align: left; background: var(--bg-soft); padding: 10px 14px; border-radius: var(--r-sm); }

/* ---------- 6. RWD ---------- */
@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .mode-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .view { padding: calc(28px + var(--safe-t)) 32px calc(var(--tab-h) + 40px + var(--safe-b)); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .duo { grid-template-columns: 1fr 1fr; }
  .scene-list { grid-template-columns: 1fr 1fr; }
  .home-top h1 { font-size: 2rem; }
  .chips { margin: 0; padding: 12px 0; flex-wrap: wrap; overflow: visible; }
  .sheet { left: 50%; right: auto; width: min(560px, 100%); transform: translateX(-50%); border-radius: var(--r-lg); bottom: 24px; animation: sheetUpC .32s cubic-bezier(.2, .9, .2, 1) both; }
  .hero-ticket .ticket-main { min-height: 216px; padding: 28px 28px 28px 32px; }
  .hero-ticket h2 { font-size: 1.85rem; }
  .phrase-list { grid-template-columns: 1fr 1fr; }
  .pocket-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  body.is-play .shell { display: block; }
  .tabbar { display: none; }
  .sidenav {
    display: flex; flex-direction: column; gap: 6px;
    position: sticky; top: 0; height: 100vh; height: 100dvh;
    padding: 28px 18px 24px;
    background: var(--card-2);
    box-shadow: 1px 0 0 var(--border-soft);
  }
  .sidenav .brand { padding: 0 8px 22px; }
  .navlink { position: relative; display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; border-radius: 14px; color: var(--ink-mut); font-weight: 600; transition: background .2s, color .2s; }
  .navlink svg { width: 22px; height: 22px; }
  .navlink:hover { background: var(--bg-soft); color: var(--ink); }
  .navlink.on { background: var(--acc-soft); color: var(--acc-2); }
  .navlink .dot { top: 15px; left: auto; right: 14px; }
  .side-foot { margin-top: auto; padding: 0 10px; font-size: .74rem; color: var(--ink-faint); line-height: 1.7; }
  .side-foot b { font-family: var(--font-mono); letter-spacing: .12em; color: var(--ink-mut); }
  .view { padding: calc(36px + var(--safe-t)) 40px 56px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .toast { bottom: 28px; }
  .hero-wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
  .hero-wrap .duo { grid-template-columns: 1fr; margin-top: 0; align-content: stretch; }
  .hero-wrap .mini-card { height: 100%; }
  .hero-wrap .hero-ticket, .hero-wrap .hero-ticket .ticket { height: 100%; }
  .hero-wrap .mini-card { flex-direction: column; align-items: flex-start; justify-content: space-between; position: relative; padding: 20px 22px; gap: 18px; }
  .hero-wrap .mini-card h3 { font-size: 1.12rem; margin-bottom: 2px; }
  .hero-wrap .mini-card .num { position: absolute; right: 22px; top: 16px; margin: 0; font-size: 2.6rem; line-height: 1; }
  .mode-grid { grid-template-columns: repeat(4, 1fr); }
  .mode-grid .modecard { flex-direction: column; align-items: flex-start; min-height: 150px; }
  .mode-grid .modecard .badge { margin-left: 0; position: absolute; top: 14px; right: 14px; }
  .mode-grid .modecard .go { display: none; }
  .scene-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1440px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .view { padding-top: 44px; }
  .phrase-list { grid-template-columns: 1fr 1fr; }
  .pocket-list { grid-template-columns: repeat(3, 1fr); }
  .scene-list { grid-template-columns: repeat(3, 1fr); }
}
/* 手機橫向（矮螢幕）：放大給對方看要好讀 */
@media (max-height: 480px) and (orientation: landscape) {
  .zoom { flex-direction: row; gap: 5vw; padding: 16px 8vw; text-align: left; }
  .zoom .z-en { font-size: clamp(1.8rem, 8vw, 4.4rem); max-width: 14ch; }
  .zoom .z-zh { font-size: clamp(.95rem, 2.6vw, 1.3rem); max-width: 18ch; }
  .tabbar { --tab-h: 52px; }
}
@media (max-width: 380px) {
  .ticket { --stub: 78px; }
  .hero-ticket .ticket { --stub: 100px; }
  .home-top h1 { font-size: 1.45rem; }
  .act { gap: 4px; }
}

/* ---------- 動效 ---------- */
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetUpC { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes stampIn { 0% { transform: rotate(-24deg) scale(2); opacity: 0; } 70% { transform: rotate(-7deg) scale(.94); opacity: 1; } 100% { transform: rotate(-9deg) scale(1); } }
@keyframes xpPop { 0% { opacity: 0; transform: translateY(8px) scale(.8); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }

/* ---------- 7. 減少動態 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  a.tk-wrap:hover, .card-link:hover { transform: none; }
}

/* ---------- 8. 插圖與吉祥物（img 疊在 SVG 預設圖樣上，載入成功才淡入） ---------- */
@keyframes artIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.art-img { display: block; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.art > .art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: right bottom; opacity: 0; transition: opacity .4s ease; }
.art.has-img > .art-img { opacity: 1; }
.art.has-img > svg { visibility: hidden; }
.art-img.mascot { height: auto; animation: artIn .45s ease both; }

/* 深色：墨藍線條在夜航藍上會消失，疊一圈米白細描邊（hero 底圖已有深色版，不加） */
[data-theme="dark"] .art-img:not(.hero-l):not(.hero-d) {
  filter: drop-shadow(0 0 .8px #F5ECDA) drop-shadow(0 0 .8px #F5ECDA) drop-shadow(0 0 2.5px rgba(245, 236, 218, .28));
}

/* 票卡插圖（首頁分類／分類頁橫幅／場景頁主視覺） */
.art-tk { right: 6px; bottom: 6px; width: 148px; height: 112px; opacity: 1; }
.cat-ticket .progress { width: 50%; max-width: 130px; }
.cat-banner .art-tk { top: 6px; right: 4px; bottom: auto; width: 170px; height: 140px; opacity: .22; }
.scene-hero .art-tk { top: 8px; right: 6px; bottom: auto; width: 150px; height: 130px; opacity: .2; }
@media (min-width: 768px) {
  .art-tk { width: 176px; height: 128px; right: 10px; bottom: 8px; }
  .cat-ticket .progress { width: 62%; max-width: 150px; }
  .cat-banner .art-tk { top: auto; bottom: 8px; right: 14px; width: 250px; height: 150px; opacity: 1; }
  .scene-hero .art-tk { top: auto; bottom: 8px; right: 14px; width: 230px; height: 160px; opacity: 1; }
  .cat-banner .ticket-main, .scene-hero .ticket-main { padding-right: 270px; }
}

/* 首頁主視覺：淺／深各一張，依 data-theme 切換 */
.art-hero { position: absolute; inset: 0; width: auto; height: auto; opacity: 1; overflow: hidden; }
.art-hero > .art-img { left: auto; right: 0; width: auto; height: 100%; max-width: none; object-fit: cover; object-position: right center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40%); mask-image: linear-gradient(90deg, transparent 0, #000 40%); }
.art-hero .hero-d { display: none; }
[data-theme="dark"] .art-hero .hero-l { display: none; }
[data-theme="dark"] .art-hero .hero-d { display: block; }
.art-hero > .art-img { right: -28px; }
/* 文字區留在左側留白處，不壓到機窗 */
.hero-ticket .ticket-main > h2 { max-width: 56%; }
@media (max-width: 767px) {
  .art-hero.has-img > .art-img { opacity: .2; right: -90px; }
  .art-hero > .art-img { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 50%); mask-image: linear-gradient(90deg, transparent 0, #000 50%); }
  .hero-ticket .ticket-main > h2 { max-width: none; }
}
@media (min-width: 768px) { .hero-ticket .ticket-main { min-height: 240px; } }
@media (max-width: 480px) {
  .home-top { gap: 10px; }
  .home-top .home-mascot { width: 44px; }
  .home-top h1 { font-size: 1.4rem; }
  .home-top .eyebrow { white-space: nowrap; letter-spacing: .1em; font-size: 9.5px; }
}

/* 首頁問候旁的小行李箱 */
.home-top { align-items: center; }
.home-hi { flex: 1; min-width: 0; }
.home-mascot { width: 58px; flex: none; }
@media (min-width: 768px) { .home-mascot { width: 76px; } }

/* 歡迎面板 */
.wel-top { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 2px 0 4px; }
.wel-top .stamp { margin: 0; }
.wel-mascot { width: 104px; }

/* 空狀態 */
.art-empty-lg { width: 168px; height: 150px; }
.art-empty.has-img > .art-img { object-position: center; }
