/* VG 新手教學：手機直式為主（對手在上、你在下、說明框固定在畫面底部），寬螢幕改成場地＋說明兩欄 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #1a1612; --muted: #78695d; --line: #e8e0d6; --paper: #fff; --bg: #faf8f5;
  --accent: #943f50; --focus: #e33372; --me: #b8452d; --opp: #2f5d9e; --ok: #16804a; --warn: #8a4b00; --err: #a3222f;
  --mat: #e9f2ef; --mat-line: #b9d2ca; --card-ratio: 59 / 86;
}
html { -webkit-text-size-adjust: 100%; }
body { zoom: var(--tu-zoom, 1); font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; background: var(--bg); color: var(--ink); min-height: 100dvh; line-height: 1.6; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* 頁首與章節列 */
.tu-header { display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line); background: #fdf9f5; }
.tu-home img { height: 1.9rem; }
.tu-header h1 { font-size: 1.05rem; font-weight: 900; }
.tu-badge { padding: .05rem .5rem; border-radius: 99px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; }
.tu-chapters { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .35rem; overflow-x: auto; padding: .5rem 1rem; border-bottom: 1px solid var(--line); background: rgba(250, 248, 245, .96); backdrop-filter: blur(8px); scrollbar-width: none; }
.tu-chapters::-webkit-scrollbar { display: none; }
.tu-chapter-group { flex: 0 0 auto; margin-left: .3rem; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .05em; }
.tu-chapter-group:first-child { margin-left: 0; }
.tu-chapter { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.tu-chapter b { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #efe8de; font-size: .7rem; }
.tu-chapter.is-current { border-color: var(--accent); background: var(--accent); color: #fff; }
.tu-chapter.is-current b { background: rgba(255, 255, 255, .25); }

.tu-main { padding: .75rem 12px 1.5rem; max-width: 1100px; margin: 0 auto; }
.tu-loading { padding: 3rem 0; text-align: center; color: var(--muted); }
.tu-muted { color: var(--muted); font-size: .82rem; }
.tu-empty { color: #b3a698; font-size: .72rem; }
.tu-link { color: var(--accent); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }

/* 按鈕 */
.tu-btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-height: 44px; padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-weight: 800; text-decoration: none; }
.tu-btn--primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.tu-btn--ghost { background: transparent; }
.tu-btn:disabled { opacity: .35; cursor: default; }

/* 發光提示 */
.is-focus { outline: 3px solid var(--focus) !important; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(227, 51, 114, .18), 0 0 18px rgba(227, 51, 114, .55); animation: tu-pulse 1.4s ease-in-out infinite; position: relative; z-index: 2; }
@keyframes tu-pulse { 50% { box-shadow: 0 0 0 9px rgba(227, 51, 114, .08), 0 0 26px rgba(227, 51, 114, .75); } }
@media (prefers-reduced-motion: reduce) { .is-focus { animation: none; } }

/* 卡片 */
.tu-face, .tu-back { position: relative; display: block; width: 100%; aspect-ratio: var(--card-ratio); border-radius: 6%/4.2%; overflow: hidden; background: #ece6dc; }
.tu-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.tu-textcard { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: .15rem; padding: .25rem; border: 1px solid #d6cbbd; border-radius: inherit; background: linear-gradient(160deg, #fffdf8, #efe6d8); font-size: .62rem; line-height: 1.25; text-align: center; overflow: hidden; }
.tu-textcard b { font-weight: 800; overflow-wrap: anywhere; }
.tu-textcard small { color: var(--muted); }
.tu-back { background: #0d1a33; }
.tu-back img { width: 100%; height: 100%; object-fit: cover; }
.tu-face--crest { aspect-ratio: 300 / 206; }

/* ── 對戰畫面 ── */
.tu-game { display: grid; gap: .75rem; }
.tu-board { width: 100%; max-width: 560px; margin: 0 auto; display: grid; gap: .45rem; }
.tu-side { display: grid; gap: .35rem; padding: .45rem; border-radius: 14px; background: var(--mat); border: 1px solid var(--mat-line); }
.tu-side--opp { background: #e8eef7; border-color: #c4d2e8; }
.tu-side.is-turn { box-shadow: inset 0 0 0 2px rgba(148, 63, 80, .35); }
.tu-side-title { display: flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 800; color: var(--me); }
.tu-side--opp .tu-side-title { color: var(--opp); }
.tu-side-title em { font-style: normal; padding: 0 .4rem; border-radius: 99px; background: var(--accent); color: #fff; font-size: .7rem; }
.tu-row { display: grid; grid-template-columns: minmax(44px, .72fr) repeat(3, minmax(0, 1fr)) minmax(44px, .72fr); gap: 6px; align-items: center; }

.tu-circle { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: var(--card-ratio); border: 1.5px dashed rgba(47, 93, 158, .35); border-radius: 8px; background: rgba(255, 255, 255, .45); }
.tu-circle--v { border-color: rgba(184, 69, 45, .55); background: rgba(255, 244, 235, .7); }
.tu-circle-mark { font-weight: 900; font-size: 1.1rem; color: rgba(47, 93, 158, .35); }
.tu-circle--v .tu-circle-mark { color: rgba(184, 69, 45, .45); }
.tu-unit { position: absolute; inset: 0; display: block; transition: transform .25s ease; }
.tu-circle.is-rest .tu-unit { transform: rotate(90deg) scale(.68); }
.tu-circle.is-attacking { border-style: solid; border-color: var(--me); }
.tu-circle.is-target { border-style: solid; border-color: #d4a017; }
.tu-power { position: absolute; left: 50%; bottom: -6px; z-index: 3; transform: translateX(-50%); padding: 0 .35rem; border-radius: 99px; background: rgba(26, 22, 18, .85); color: #fff; font-size: .68rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tu-power.is-up { background: #c0392b; }
.tu-crit { position: absolute; top: -6px; right: -4px; z-index: 3; padding: 0 .3rem; border-radius: 99px; background: #d4a017; color: #1a1612; font-size: .68rem; font-weight: 900; }
.tu-soul { position: absolute; top: -7px; left: -4px; z-index: 3; padding: 0 .3rem; border-radius: 99px; background: #6b4ea3; color: #fff; font-size: .64rem; font-weight: 800; white-space: nowrap; }

.tu-zone { position: relative; display: grid; align-content: center; justify-items: center; gap: .1rem; width: 100%; min-height: 64px; aspect-ratio: var(--card-ratio); padding: .2rem; border: 1px solid rgba(0, 0, 0, .08); border-radius: 8px; background: rgba(255, 255, 255, .6); text-align: center; overflow: hidden; }
.tu-zone-label { position: relative; z-index: 2; font-size: .64rem; font-weight: 800; color: #4c4038; line-height: 1.2; }
.tu-zone-count { position: relative; z-index: 2; font-size: 1.05rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.tu-zone-count small { font-size: .66rem; color: var(--muted); }
.tu-zone .tu-back--zone, .tu-zone .tu-face--zone { position: absolute; inset: 8% 14%; width: auto; opacity: .35; }
.tu-zone--deck .tu-zone-label, .tu-zone--deck .tu-zone-count { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.tu-zone--deck .tu-back--zone { opacity: 1; inset: 6%; }
.tu-zone--damage.is-danger { background: #fde8e8; }
.tu-pips { display: grid; grid-template-columns: repeat(3, 7px); gap: 2px; }
.tu-pips i { width: 7px; height: 7px; border-radius: 2px; background: #ddd2c4; }
.tu-pips i.is-on { background: var(--err); }
.tu-crest-mini { display: block; width: 88%; }
.tu-energy { position: relative; z-index: 2; font-size: .78rem; font-weight: 900; color: #1f7a4d; }
.tu-energy small { font-size: .62rem; color: var(--muted); }

.tu-strip { display: flex; gap: .4rem; flex-wrap: wrap; }
.tu-strip-box { display: flex; align-items: center; gap: .35rem; padding: .25rem .45rem; border-radius: 8px; background: rgba(255, 255, 255, .55); }
.tu-strip-box--ride { flex: 1 1 auto; }
.tu-strip-box--small { flex: 0 0 auto; }
.tu-strip-label { flex: 0 0 auto; font-size: .68rem; font-weight: 800; color: #4c4038; }
.tu-ride-list { display: flex; align-items: center; gap: 4px; }
.tu-ride-card { width: 38px; flex: 0 0 auto; border-radius: 5px; }
.tu-back--mini { width: 22px; border-width: 1px; }
.tu-strip-count { font-size: .72rem; font-weight: 800; }

.tu-phasebar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; padding: .35rem .5rem; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.tu-phase-who { font-size: .75rem; font-weight: 900; }
.tu-phases { display: flex; flex-wrap: wrap; gap: 3px; }
.tu-phase { padding: 0 .35rem; border-radius: 99px; background: #f1ebe2; color: #8b7d70; font-size: .72rem; font-weight: 700; }
.tu-phase.is-on { background: var(--accent); color: #fff; }

/* 中間列：欄寬、間距、內距都和場地的 .tu-side／.tu-row 相同，守護圈才會對齊雙方的先導者圈 */
.tu-middle { display: grid; grid-template-columns: minmax(44px, .72fr) repeat(3, minmax(0, 1fr)) minmax(44px, .72fr); gap: 6px; align-items: stretch; padding: .45rem; border-radius: 12px; background: #fffaf2; border: 1px solid var(--line); }
.tu-battle-info { grid-column: 1 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-height: 4.5rem; padding: .25rem; border-radius: 8px; text-align: center; }
.tu-battle-idle { color: #b3a698; font-size: .75rem; }
.tu-vs { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.tu-vs-side { display: grid; text-align: center; }
.tu-vs-side small { font-size: .68rem; color: var(--muted); }
.tu-vs-side b { font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.tu-vs-mid { font-weight: 900; color: var(--accent); }
.tu-result { padding: .05rem .55rem; border-radius: 99px; font-size: .8rem; }
.tu-result.is-hit { background: #c0392b; color: #fff; }
.tu-result.is-miss { background: #e5f3ea; color: var(--ok); }
.tu-guardian { grid-column: 3; position: relative; display: grid; align-content: center; justify-items: center; gap: .15rem; min-height: 4.5rem; padding: .3rem .2rem; border-radius: 8px; background: rgba(255, 255, 255, .6); border: 1.5px dashed rgba(212, 160, 23, .7); text-align: center; }
.tu-guardian .tu-circle-mark { color: rgba(212, 160, 23, .6); }
.tu-guardian.has-cards { border-style: solid; background: rgba(255, 246, 220, .9); }
/* 守護圈有好幾張卡時疊在一起，最多看得到幾張的邊 */
.tu-guard-stack { display: flex; justify-content: center; }
.tu-guard-stack .tu-mini { width: 40px; }
.tu-guard-stack .tu-mini + .tu-mini { margin-left: -24px; }
.tu-trigger { grid-column: 4 / 6; display: grid; gap: .2rem; align-content: start; justify-items: start; min-height: 4.5rem; padding: .3rem .4rem; border-radius: 8px; background: rgba(255, 255, 255, .8); border: 1px dashed #d8c9b6; text-align: left; }
.tu-reveal-row { display: grid; gap: 4px; }
.tu-mini { display: block; width: 34px; }
.tu-reveal { display: flex; align-items: center; gap: .3rem; }
.tu-reveal-text { display: grid; line-height: 1.25; }
.tu-reveal-text small { font-size: .64rem; color: var(--muted); }
.tu-reveal-text b { font-size: .72rem; }
.tu-trig { padding: 0 .3rem; border-radius: 4px; color: #fff; }
.tu-trig--crit { background: #c79a00; }
.tu-trig--draw { background: #c0392b; }
.tu-trig--front { background: #b2368a; }
.tu-trig--heal { background: #1f8a4c; }
.tu-trig--over { background: #6b4ea3; }
.tu-tag { padding: 0 .4rem; border-radius: 99px; font-size: .68rem; font-weight: 800; }
.tu-tag--perfect { background: #1f6fb2; color: #fff; }

.tu-hand { padding: .4rem; border-radius: 12px; background: #fff4ec; border: 1px solid #f0d8c6; }
.tu-hand-row { display: flex; gap: 6px; overflow-x: auto; padding: .35rem .1rem .2rem; }
.tu-hand-card { width: 62px; flex: 0 0 auto; border-radius: 6px; transition: transform .15s ease; }
.tu-hand-card.is-selected { transform: translateY(-6px); outline: 3px solid #d4a017; outline-offset: 1px; }

/* 說明框：手機固定在畫面底部 */
.tu-narration { position: sticky; bottom: 0; z-index: 10; display: grid; gap: .4rem; max-height: 46dvh; overflow-y: auto; padding: .7rem .85rem calc(.7rem + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: 16px 16px 0 0; background: rgba(255, 255, 255, .98); box-shadow: 0 -8px 24px rgba(40, 30, 20, .12); margin: 0 -12px; }
.tu-narration.is-action { border-top: 3px solid var(--focus); }
.tu-narr-head { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .72rem; font-weight: 700; }
.tu-narr-head .tu-link { font-size: .72rem; }
.tu-narration h2 { font-size: 1.02rem; font-weight: 900; line-height: 1.4; }
.tu-you { display: inline-block; margin-right: .35rem; padding: 0 .4rem; border-radius: 6px; background: var(--focus); color: #fff; font-size: .7rem; vertical-align: .12em; }
.tu-narr-text { display: grid; gap: .45rem; font-size: .88rem; color: #3b322b; }
.tu-narr-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; position: sticky; bottom: 0; background: inherit; }
.tu-narr-actions .tu-btn--primary { flex: 1 1 auto; }
.tu-wait { flex: 1 1 auto; text-align: center; color: var(--focus); font-weight: 800; font-size: .85rem; }
.tu-toast { padding: .45rem .65rem; border-radius: 10px; font-size: .82rem; line-height: 1.55; }
.tu-toast--error { background: #fde8e8; color: var(--err); }
.tu-toast--hint { background: #fbe6c8; color: var(--warn); }
.tu-toast--info { background: #eef3fb; color: #23497e; }
.tu-toast--ok { background: #e5f3ea; color: var(--ok); }

/* ── 入門課程 ── */
.tu-lesson { display: grid; gap: .8rem; max-width: 640px; margin: 0 auto; }
.tu-lesson--wide { max-width: 1100px; }
.tu-lesson-kicker { color: var(--accent); font-size: .78rem; font-weight: 900; letter-spacing: .04em; }
.tu-slide { display: grid; gap: .6rem; padding: 1.1rem 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.tu-slide-icon { font-size: 2rem; line-height: 1; }
.tu-slide h2 { font-size: 1.2rem; font-weight: 900; }
.tu-slide p { font-size: .92rem; color: #3b322b; }
.tu-slide-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tu-dots { display: flex; gap: .4rem; }
.tu-dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd2c4; }
.tu-dot.is-on { background: var(--accent); }
.tu-lesson-nav { display: flex; justify-content: space-between; gap: .5rem; padding-top: .4rem; border-top: 1px solid var(--line); }
.tu-decks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.tu-deck { display: grid; gap: .3rem; padding: .4rem; border: 1px solid var(--line); border-radius: 12px; background: #fdfaf6; text-align: center; }
.tu-deck b { display: block; font-size: .82rem; }
.tu-deck small { color: var(--muted); font-size: .68rem; }

.tu-tabs { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; }
.tu-tab { flex: 0 0 auto; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); font-size: .82rem; font-weight: 800; }
.tu-tab.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.tu-anatomy { display: grid; gap: .8rem; }
.tu-anatomy-text { display: grid; gap: .55rem; align-content: start; padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.tu-anatomy-text h2 { display: flex; align-items: center; gap: .45rem; font-size: 1.08rem; font-weight: 900; }
.tu-anatomy-text p { font-size: .9rem; color: #3b322b; }
.tu-spot-num { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--focus); color: #fff; font-size: .82rem; }
.tu-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.tu-chip { padding: .2rem .55rem; border: 1px solid var(--line); border-radius: 99px; background: #fdfaf6; font-size: .74rem; font-weight: 700; }
.tu-chip.is-on { border-color: var(--focus); color: var(--focus); }

/* 卡片解剖圖：標籤在卡片外側，用線指到卡上的位置 */
.tu-ana-wrap { max-width: 100%; overflow-x: auto; }
@media (min-width: 900px) { .tu-ana-wrap { overflow-x: hidden; } }
.tu-ana { position: relative; margin: 0 auto; }
.tu-ana-card { position: absolute; top: 0; border-radius: 12px; background: #ece6dc; box-shadow: 0 6px 18px rgba(40, 30, 20, .18); }
.tu-ana-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.tu-anatomy-fallback { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-weight: 800; }
.tu-ana-lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.tu-ana-lines line { stroke: rgba(26, 22, 18, .45); stroke-width: 1.4; }
.tu-ana-lines circle { fill: #fff; stroke: rgba(26, 22, 18, .7); stroke-width: 1.6; }
.tu-ana-lines line.is-on { stroke: var(--focus); stroke-width: 2.6; stroke-dasharray: 600; stroke-dashoffset: 600; animation: tu-draw .55s ease-out forwards; }
.tu-ana-lines circle.is-on { fill: none; stroke: var(--focus); stroke-width: 2.5; animation: tu-dot-ping 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)); }
@keyframes tu-draw { to { stroke-dashoffset: 0; } }
@keyframes tu-dot-ping { 0% { transform: scale(1); } 40% { transform: scale(1.6); } 100% { transform: scale(1); } }
.tu-ana-label { position: absolute; transform: translateY(-50%); display: flex; align-items: center; gap: .35rem; min-height: 28px; padding: .15rem .55rem; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); font-size: .78rem; font-weight: 800; line-height: 1.2; text-align: left; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); transition: background .2s, color .2s, transform .2s; }
.tu-ana-label--l { justify-content: flex-end; text-align: right; }
.tu-ana-label b { display: inline-grid; place-items: center; flex: 0 0 auto; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #efe8de; font-size: .68rem; }
.tu-ana-label--l b { order: 2; }
.tu-ana-label.is-num { justify-content: center; padding: 0; width: 26px; min-height: 26px; border-radius: 50%; font-size: .74rem; }
.tu-ana-label.is-on { border-color: var(--focus); background: var(--focus); color: #fff; transform: translateY(-50%) scale(1.06); }
.tu-ana-label.is-on b { background: rgba(255, 255, 255, .28); }
.tu-spot-num.is-plain { background: #ddd2c4; }

/* ── 手機版圖文教學 ── */
body.is-mobile-guide .tu-chapters { display: none; }
.tu-mobile { display: grid; gap: 1rem; max-width: 560px; margin: 0 auto; }
.tu-m-hero { padding: 1rem; border-radius: 16px; background: linear-gradient(135deg, #943f50, #c2556b); color: #fff; }
.tu-m-hero h2 { font-size: 1.35rem; font-weight: 900; }
.tu-m-hero p { margin-top: .35rem; font-size: .86rem; opacity: .95; }
.tu-m-hero .tu-m-pc { margin-top: .6rem; padding: .45rem .6rem; border-radius: 10px; background: rgba(255, 255, 255, .16); font-size: .8rem; }
.tu-m-nav { position: sticky; top: 0; z-index: 20; display: flex; gap: .35rem; overflow-x: auto; margin: 0 -12px; padding: .5rem 12px; background: rgba(250, 248, 245, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tu-m-nav::-webkit-scrollbar { display: none; }
.tu-m-section { display: grid; gap: .65rem; scroll-margin-top: 56px; }
.tu-m-section > h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; font-weight: 900; }
.tu-m-num { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 10px; background: var(--accent); color: #fff; font-size: .95rem; }
.tu-m-intro { color: #4c4038; font-size: .9rem; }
.tu-m-item { display: grid; gap: .5rem; padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.tu-m-item h3 { font-size: 1rem; font-weight: 900; }
.tu-m-item p { font-size: .9rem; color: #3b322b; }
.tu-m-end { display: grid; padding: .5rem 0 1rem; }
.tu-spot-list { display: grid; gap: .45rem; list-style: none; }
.tu-spot-list li { display: flex; gap: .55rem; align-items: flex-start; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); transition: border-color .2s, background .2s; }
.tu-spot-list li.is-on { border-color: var(--focus); background: #fff3f8; }
.tu-spot-list li .tu-spot-num { flex: 0 0 auto; width: 1.5rem; height: 1.5rem; font-size: .75rem; }
.tu-spot-list b { font-size: .92rem; }
.tu-spot-list p { font-size: .86rem; color: #3b322b; }

/* 圖解：卡片、符號、數字排成一列 */
.tu-scene { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem .45rem; padding: .6rem .4rem; border-radius: 12px; background: var(--mat); border: 1px solid var(--mat-line); }
.tu-sc-card { display: grid; justify-items: center; gap: .2rem; width: 58px; cursor: pointer; }
.tu-sc-card.is-wide { width: 92px; }
.tu-sc-face { display: block; width: 100%; transition: transform .35s ease; }
.tu-sc-card.is-rest .tu-sc-face { transform: rotate(90deg) scale(.72); }
.tu-sc-card figcaption, .tu-sc-pips figcaption { font-size: .68rem; font-weight: 700; color: #4c4038; text-align: center; line-height: 1.25; }
.tu-sc-zone { display: grid; place-items: center; width: 100%; aspect-ratio: var(--card-ratio); border: 1.5px dashed rgba(47, 93, 158, .45); border-radius: 7px; background: rgba(255, 255, 255, .6); font-weight: 900; color: rgba(47, 93, 158, .55); }
.tu-sc-zone.is-v { border-color: rgba(184, 69, 45, .6); color: rgba(184, 69, 45, .6); }
.tu-sc-op { font-size: 1.25rem; font-weight: 900; color: var(--accent); }
.tu-sc-big { display: grid; justify-items: center; padding: .2rem .5rem; border-radius: 10px; background: var(--paper); }
.tu-sc-big b { font-size: 1.15rem; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
.tu-sc-big small { font-size: .66rem; color: var(--muted); }
.tu-sc-pips { display: grid; justify-items: center; gap: .25rem; }
.tu-sc-pips span { display: grid; grid-template-columns: repeat(3, 12px); gap: 3px; }
.tu-sc-pips i { width: 12px; height: 12px; border-radius: 3px; background: #ddd2c4; }
.tu-sc-pips i.is-on { background: var(--err); }
.tu-scene + .tu-scene { margin-top: -.15rem; }

/* 卡套示意：外框＝卡套，透明卡套看得到裡面的卡背 */
.tu-sc-sleeve { position: relative; display: grid; justify-items: center; gap: .2rem; width: 64px; }
.tu-sc-sleeve figcaption { font-size: .68rem; font-weight: 700; color: #4c4038; text-align: center; line-height: 1.25; }
.tu-sleeve { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 62 / 89; padding: 4px; border-radius: 7px; background: #b8452d; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), 0 2px 5px rgba(0, 0, 0, .15); }
.tu-sleeve--blue { background: #2f5d9e; }
.tu-sleeve--official { background: linear-gradient(150deg, #1b2a55, #943f50); }
.tu-sleeve-logo { color: #f1d27b; font-size: .52rem; font-weight: 900; letter-spacing: .08em; transform: rotate(-20deg); }
.tu-sleeve--double { background: #b8452d; box-shadow: 0 0 0 3px #f5ede2, 0 0 0 5px #6b4ea3, 0 2px 6px rgba(0, 0, 0, .2); }
.tu-sleeve--clear { background: rgba(255, 255, 255, .35); border: 1.5px solid rgba(120, 140, 170, .6); }
.tu-sleeve--clear .tu-back { width: 100%; }
.tu-sc-mark { position: absolute; top: -6px; right: -6px; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: .8rem; font-weight: 900; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.tu-sc-mark.is-ok { background: var(--ok); }
.tu-sc-mark.is-ng { background: var(--err); }
/* 遊戲墊示意：5×2 的格子，中間是先導者圈 */
.tu-sc-mat { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; width: 92px; padding: 4px; border-radius: 6px; background: #2f8f6b; }
.tu-sc-mat i { aspect-ratio: 59 / 86; border-radius: 2px; border: 1px dashed rgba(255, 255, 255, .7); }
.tu-sc-mat i.is-v { background: rgba(255, 220, 160, .55); }
.tu-sc-sleeve:has(.tu-sc-mat) { width: 96px; }

/* 電腦版的準備頁：換頁時圖解依序彈出 */
.tu-slide .tu-scene > * { animation: tu-pop-in .45s cubic-bezier(.2, .9, .3, 1.3) backwards; animation-delay: calc(var(--i, 0) * 110ms + 120ms); }
@keyframes tu-pop-in { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.tu-slide .tu-sc-card.is-rest .tu-sc-face { transform: rotate(90deg) scale(.72); }
.tu-sc-card[data-act] { cursor: zoom-in; }

/* 手機版場地圖 */
.tu-map { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-areas: "crest . g . trig ." "order r1 v r2 deck ride" "dmg r3 r4 r5 drop ." "dmg . . . bind ."; gap: 5px; padding: .5rem; border-radius: 14px; background: var(--mat); border: 1px solid var(--mat-line); }
.tu-map-cell { display: grid; place-content: center; justify-items: center; gap: .1rem; min-height: 54px; padding: .25rem; border-radius: 8px; background: rgba(255, 255, 255, .7); border: 1px dashed rgba(47, 93, 158, .4); font-size: .68rem; font-weight: 800; text-align: center; line-height: 1.2; }
.tu-map-cell b { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--focus); color: #fff; font-size: .72rem; }
.tu-map-cell.is-v { border-color: rgba(184, 69, 45, .6); background: rgba(255, 244, 235, .9); }
.tu-map-cell--g { grid-area: g; } .tu-map-cell--trig { grid-area: trig; } .tu-map-cell--crest { grid-area: crest; } .tu-map-cell--order { grid-area: order; }
.tu-map-cell--r1 { grid-area: r1; } .tu-map-cell--v { grid-area: v; } .tu-map-cell--r2 { grid-area: r2; } .tu-map-cell--deck { grid-area: deck; }
.tu-map-cell--dmg { grid-area: dmg; } .tu-map-cell--r3 { grid-area: r3; } .tu-map-cell--r4 { grid-area: r4; } .tu-map-cell--r5 { grid-area: r5; }
.tu-map-cell--drop { grid-area: drop; } .tu-map-cell--ride { grid-area: ride; } .tu-map-cell--bind { grid-area: bind; }

/* ── 動態效果 ── */
/* 手機版：捲到哪裡，內容就依序滑入；圖解裡的卡片一張張出現 */
.tu-reveal-on .tu-m-item, .tu-reveal-on .tu-m-section > h2, .tu-reveal-on .tu-m-intro { opacity: 0; transform: translateY(14px); transition: opacity .3s ease, transform .3s ease; }
.tu-reveal-on .is-shown { opacity: 1 !important; transform: none !important; }
.tu-reveal-on .tu-m-item .tu-scene > * { opacity: 0; transform: translateY(10px) scale(.92); }
.tu-reveal-on .tu-m-item.is-shown .tu-scene > * { animation: tu-pop .4s cubic-bezier(.2, .9, .3, 1.3) forwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
.tu-reveal-on .tu-m-item.is-shown .tu-sc-card.is-rest .tu-sc-face { animation: tu-rest .6s ease forwards; animation-delay: calc(var(--i, 0) * 140ms + 450ms); transform: none; }
@keyframes tu-pop { to { opacity: 1; transform: none; } }
@keyframes tu-rest { from { transform: none; } to { transform: rotate(90deg) scale(.72); } }
.tu-reveal-on .tu-m-item.is-shown .tu-sc-pips i.is-on { animation: tu-pip .35s ease backwards; animation-delay: calc(var(--p, 0) * 120ms + 500ms); }
@keyframes tu-pip { from { transform: scale(0); } }
.tu-m-hero { animation: tu-fade-up .6s ease both; }
/* 已經看過的段落（換分頁等重畫時）直接顯示，不重播 */
.tu-reveal-on .tu-m-item.is-static .tu-scene > * { animation: none; opacity: 1; transform: none; }
.tu-reveal-on .tu-m-item.is-static .tu-sc-card.is-rest .tu-sc-face { animation: none; transform: rotate(90deg) scale(.72); }
.tu-reveal-on .tu-m-item.is-static .tu-sc-pips i.is-on { animation: none; }

/* 電腦版：卡片換位置時滑入、力量變化時跳一下、翻開的卡翻面、打中／沒打中蓋章 */
/* 出現：從正確位置下方一點淡入，往上移到定位 */
.tu-anim-in { animation: tu-card-in .5s cubic-bezier(.2, .8, .3, 1) .12s backwards; }
@keyframes tu-card-in { from { opacity: 0; transform: translateY(18px); } }
.tu-hand-card.tu-anim-in { animation-name: tu-hand-in; }
@keyframes tu-hand-in { from { opacity: 0; transform: translateY(22px); } }
.tu-anim-flip { animation: tu-flip .6s ease; }
@keyframes tu-flip { 0% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
.tu-power.tu-anim-bump, .tu-crit.tu-anim-bump, .tu-energy.tu-anim-bump, .tu-zone-count.tu-anim-bump { animation: tu-bump .55s ease; }
@keyframes tu-bump { 30% { transform: translateX(-50%) scale(1.45); } }
.tu-crit.tu-anim-bump, .tu-energy.tu-anim-bump, .tu-zone-count.tu-anim-bump { animation-name: tu-bump2; }
@keyframes tu-bump2 { 30% { transform: scale(1.5); } }
.tu-result { animation: tu-stamp .45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes tu-stamp { from { opacity: 0; transform: scale(2.2) rotate(-8deg); } }
.tu-circle.is-attacking::after { content: ""; position: absolute; inset: -4px; border-radius: 10px; border: 2px solid var(--me); animation: tu-ring 1.2s ease-out infinite; pointer-events: none; }
@keyframes tu-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.15); } }
.tu-narration.is-new h2, .tu-narration.is-new .tu-narr-text { animation: tu-fade-up .25s ease both; }
@keyframes tu-fade-up { from { opacity: 0; transform: translateY(8px); } }
.tu-toast--ok { animation: tu-fade-up .3s ease; }
.tu-toast--error, .tu-toast--hint { animation: tu-shake .4s ease; }
@keyframes tu-shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.tu-slide, .tu-anatomy-text { animation: tu-fade-up .35s ease both; }
.tu-phase.is-on { animation: tu-bump2 .5s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .tu-reveal-on .tu-m-item, .tu-reveal-on .tu-m-section > h2, .tu-reveal-on .tu-m-intro, .tu-reveal-on .tu-m-item .tu-scene > * { opacity: 1; transform: none; }
}


/* 彈窗 */
.tu-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.tu-modal[hidden] { display: none; }
.tu-modal-backdrop { position: absolute; inset: 0; background: rgba(20, 16, 12, .55); }
.tu-modal-card { position: relative; width: min(100%, 560px); max-height: 88dvh; overflow-y: auto; padding: 1.1rem 1rem 1rem; border-radius: 16px; background: var(--paper); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.tu-modal-close { position: absolute; top: .4rem; right: .5rem; width: 40px; height: 40px; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--muted); }
.tu-modal-card h3 { padding-right: 2.2rem; font-size: 1.1rem; font-weight: 900; }
.tu-carddetail { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: .9rem; align-items: start; }
.tu-carddetail.is-landscape { grid-template-columns: 1fr; }
.tu-carddetail-img { width: 100%; border-radius: 8px; }
.tu-meta { margin: .3rem 0 .5rem; font-size: .82rem; font-weight: 700; }
.tu-effect { font-size: .86rem; line-height: 1.75; }
.tu-zone-text { margin: .4rem 0 .7rem; font-size: .9rem; }
.tu-zone-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.tu-zone-card { display: grid; gap: .2rem; text-align: center; }
.tu-zone-card small { font-size: .68rem; line-height: 1.3; color: var(--muted); }
@media (max-width: 420px) { .tu-carddetail { grid-template-columns: 1fr; } .tu-carddetail-img { width: 62%; margin: 0 auto; } }

/* 寬螢幕：場地＋說明兩欄 */
@media (min-width: 900px) {
  .tu-main { padding: 1rem 1.5rem 2rem; max-width: 1240px; }
  /* 場地寬度由 tutorial.js 的 fitBoard() 依視窗高度設定 max-width，整個場地一屏放得下 */
  .tu-game { grid-template-columns: auto minmax(300px, 420px); grid-template-areas: "board info" "board hand"; grid-template-rows: auto 1fr; justify-content: center; align-items: start; gap: .9rem 1.25rem; }
  .tu-game > .tu-board { grid-area: board; }
  .tu-game > .tu-sidecol--info { grid-area: info; }
  .tu-game > .tu-sidecol--hand { grid-area: hand; }
  .tu-board { width: min(560px, 58vw); max-width: 560px; margin: 0; }
  .tu-sidecol { display: grid; gap: .6rem; align-content: start; }
  /* 頁首那一排併進章節列 */
  .tu-header { display: none; }
  .tu-chapter-home img { height: 1.6rem; }
  .tu-chapter-home { flex: 0 0 auto; display: inline-flex; align-items: center; }
  .tu-chapter-title { flex: 0 0 auto; margin: 0 .4rem 0 .1rem; font-size: .9rem; font-weight: 900; }
  .tu-narration { position: static; margin: 0; max-height: none; overflow: visible; border-radius: 16px; box-shadow: 0 6px 20px rgba(40, 30, 20, .08); }
  .tu-anatomy { grid-template-columns: auto minmax(260px, 1fr); align-items: start; }
  .tu-hand-card { width: 70px; }
  .tu-hand-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; overflow: visible; }
  .tu-hand-row .tu-hand-card { width: auto; }
  /* 場地壓扁：標題、騎乘牌組、指令區、封鎖區排成一行，中間列變矮 */
  .tu-strip { flex-wrap: nowrap; align-items: center; gap: .2rem; }
  .tu-strip .tu-side-title { flex: 0 0 auto; margin-right: auto; }
  .tu-strip-box { padding: .15rem .35rem; gap: .25rem; }
  .tu-strip-label { font-size: .62rem; }
  .tu-ride-card { width: 26px; }
  .tu-back--mini { width: 16px; }
  .tu-middle { padding: .3rem .45rem; }
  .tu-battle-info, .tu-guardian, .tu-trigger { min-height: 3.4rem; }
  .tu-guard-stack .tu-mini { width: 30px; }
  .tu-guard-stack .tu-mini + .tu-mini { margin-left: -18px; }
  .tu-reveal .tu-mini { width: 24px; }
  .tu-header { padding: .35rem 1rem; }
}

/* 手機版第 1 輪新手測試回饋（2026-11-17） */
.tu-m-nav .tu-chapter.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.tu-mobile .tu-tabs { flex-wrap: wrap; }
.tu-map-opp { margin: 0 0 -.4rem; text-align: center; font-size: .78rem; font-weight: 800; color: var(--muted); }
.tu-map-cell small { font-size: .6rem; font-weight: 800; color: var(--muted); }
.tu-map-cell.is-row-front { border-style: solid; border-color: rgba(184, 69, 45, .55); }
.tu-map-cell.is-row-back { border-style: solid; border-color: rgba(47, 93, 158, .5); }
.tu-map-cell.is-adv { opacity: .5; }
.tu-map-legend { font-size: .8rem; color: #3b322b; line-height: 1.6; }
.tu-map-legend span { display: inline-block; margin: 0 .3rem 0 .1rem; padding: 0 .4rem; border-radius: 6px; font-weight: 900; color: #fff; }
.tu-map-legend .is-front { background: rgba(184, 69, 45, .85); }
.tu-map-legend .is-back { background: rgba(47, 93, 158, .85); }
.tu-m-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.tu-m-grid .tu-m-item { padding: .7rem; }
.tu-m-grid .tu-m-item h3 { font-size: .92rem; }
.tu-m-grid .tu-m-item p { font-size: .82rem; }
.tu-m-grid .tu-m-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tu-modal-back { justify-self: start; margin-bottom: .5rem; }

/* 電腦版第 1 輪新手測試回饋（2026-11-17）：傷害區背面張數 */
.tu-pips i.is-down { background: #5b4b40; }
.tu-zone-note { position: relative; z-index: 2; padding: 0 .3rem; border-radius: 99px; background: #5b4b40; color: #fff; font-size: .66rem; font-weight: 900; }
.tu-pips { grid-template-columns: repeat(3, 9px); }
.tu-pips i { width: 9px; height: 9px; }
.tu-scene figcaption, .tu-sc-big small { text-wrap: balance; }
.tu-toast-slot { min-height: 2.6rem; }
.tu-toast-slot:empty { min-height: 2.6rem; }

/* 2026-11-17：場地照官方配置、紋章區移到靠中間的那一條、整場流程總覽、官方配置圖 */
.tu-strip-box--crest { gap: .3rem; }
.tu-crest-strip { display: block; width: 34px; }
.tu-strip-box--crest .tu-energy { font-size: .74rem; }
.tu-ride-card--crest { width: 30px; }
.tu-official { display: grid; gap: .4rem; padding: .6rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.tu-official img { width: 100%; height: auto; border-radius: 8px; }
.tu-official figcaption { font-size: .78rem; color: #3b322b; line-height: 1.5; }
.tu-official ol { display: flex; flex-wrap: wrap; gap: .1rem .7rem; margin: .3rem 0 0; padding: 0; list-style: none; }
.tu-official li span { margin-right: .15rem; font-weight: 900; color: #3b322b; }
.tu-flow-intro { font-size: .95rem; line-height: 1.7; }
.tu-flow { display: grid; gap: .35rem; }
.tu-flow-block { padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.tu-flow-block.is-loop { border-color: rgba(148, 63, 80, .45); background: #fffaf7; }
.tu-flow-block h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: 1rem; font-weight: 900; margin-bottom: .5rem; }
.tu-flow-block h3 small { font-size: .74rem; font-weight: 700; color: var(--muted); }
.tu-flow-num { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: .8rem; }
.tu-flow-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .45rem; padding: 0; list-style: none; }
.tu-flow-steps li { display: grid; gap: .15rem; padding: .5rem .6rem; border-radius: 10px; background: #f7f1ea; }
.tu-flow-steps b { font-size: .88rem; font-weight: 900; }
.tu-flow-steps span { font-size: .8rem; color: #3b322b; line-height: 1.5; }
.tu-flow-loop { margin-top: .5rem; font-size: .82rem; font-weight: 800; color: var(--accent); }
.tu-flow-arrow { text-align: center; color: #c9b8a7; font-size: .8rem; line-height: 1; }
.tu-mobile .tu-flow-steps { grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .tu-strip-box { padding: .12rem .28rem; } .tu-strip .tu-side-title { font-size: .68rem; } }
.tu-flow-steps li { align-content: start; }
.tu-mobile .tu-map-cell { font-size: .62rem; padding: .2rem .1rem; }
.tu-ride-card { position: relative; }
.tu-ride-card.is-facedown::after { content: "背面"; position: absolute; left: 50%; bottom: -2px; z-index: 2; transform: translateX(-50%); padding: 0 .2rem; border-radius: 4px; background: rgba(13, 26, 51, .88); color: #fff; font-size: .5rem; font-weight: 800; line-height: 1.4; white-space: nowrap; }
.tu-ride-card.is-facedown .tu-face { outline: 1.5px dashed rgba(13, 26, 51, .55); outline-offset: -1px; }
@media (min-width: 900px) { .tu-strip--opp { gap: .15rem; } .tu-strip--opp .tu-strip-label { font-size: .58rem; } .tu-strip--opp .tu-back--mini { width: 13px; } }
.tu-m-nav .tu-chapter.is-on b { background: #fff; color: var(--accent); }
/* 整場流程分頁（電腦版） */
.tu-lesson--flow { display: grid; gap: .9rem; }
.tu-flow-map { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.tu-flow-map-item { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); font-size: .85rem; font-weight: 800; color: var(--muted); }
.tu-flow-map-item b { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #efe8de; font-size: .72rem; color: var(--ink); }
.tu-flow-map-item.is-done { color: var(--ink); }
.tu-flow-map-item.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.tu-flow-map-item.is-on b { background: #fff; color: var(--accent); }
.tu-flow-map-arrow { color: #c9b8a7; font-weight: 900; }
.tu-flow-block--page { padding: 1.1rem 1.2rem; }
.tu-flow-block--page h3 { font-size: 1.15rem; }
.tu-flow-block--page .tu-flow-steps { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: .6rem; }
.tu-flow-block--page .tu-flow-steps li { padding: .75rem .85rem; }
.tu-flow-block--page .tu-flow-steps b { font-size: 1rem; }
.tu-flow-block--page .tu-flow-steps span { font-size: .9rem; }
/* 發亮的動態箭頭：指著模擬對戰每一步的重點（tutorial.js drawArrows） */
.tu-game { position: relative; }
.tu-arrows { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.tu-arrow { position: absolute; width: 28px; height: 28px; display: grid; place-items: center; animation: tu-arrow-down .9s ease-in-out infinite; }
.tu-arrow::before { content: ""; width: 28px; height: 28px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M8 3h12v9h6L14 26 2 12h6z' fill='%23e33372' stroke='%23fff' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 0 3px rgba(227, 51, 114, .95)) drop-shadow(0 0 9px rgba(255, 140, 185, .85)) drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.tu-arrow.is-up::before { transform: rotate(180deg); }
.tu-arrow.is-right::before { transform: rotate(-90deg); }
.tu-arrow.is-up { animation-name: tu-arrow-up; }
.tu-arrow.is-right { animation-name: tu-arrow-right; }
.tu-arrow.is-left::before { transform: rotate(90deg); }
.tu-arrow.is-left { animation-name: tu-arrow-left; }
@keyframes tu-arrow-left { 0%, 100% { transform: translateX(5px); opacity: .75; } 50% { transform: translateX(-2px); opacity: 1; } }
@keyframes tu-arrow-down { 0%, 100% { transform: translateY(-5px); opacity: .75; } 50% { transform: translateY(2px); opacity: 1; } }
@keyframes tu-arrow-up { 0%, 100% { transform: translateY(5px); opacity: .75; } 50% { transform: translateY(-2px); opacity: 1; } }
@keyframes tu-arrow-right { 0%, 100% { transform: translateX(-5px); opacity: .75; } 50% { transform: translateX(2px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tu-arrow { animation: none; } }
/* 離開：在原位置的殘影往上飄並淡出（tutorial.js playGhosts） */
.tu-ghosts { position: absolute; inset: 0; z-index: 35; pointer-events: none; }
.tu-ghost { position: absolute; animation: tu-ghost-out .55s ease-out forwards; }
.tu-ghost > .tu-face, .tu-ghost > .tu-back { width: 100%; height: 100%; aspect-ratio: auto; }
.tu-ghost.is-rest > * { transform: rotate(90deg) scale(.68); }
@keyframes tu-ghost-out { from { opacity: .95; transform: translateY(0); } to { opacity: 0; transform: translateY(-30px); } }
.tu-anim-pop { animation: tu-bump2 .55s ease; }
@media (prefers-reduced-motion: reduce) { .tu-ghost { display: none; } }
/* 判定動畫：牌堆 → 觸發區（標出判定種類與結果）→ 手牌或傷害區（tutorial.js flyCheck） */
.tu-flights { position: absolute; inset: 0; z-index: 45; pointer-events: none; }
.tu-flight { position: absolute; left: 0; top: 0; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 0 0 3px #fff; transform-origin: center; }
.tu-flight.is-damage { box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 0 0 3px #fff, 0 0 0 6px rgba(192, 57, 43, .85); }
.tu-flight.is-drive { box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 0 0 3px #fff, 0 0 0 6px rgba(47, 93, 158, .85); }
.tu-flight > span { position: absolute; inset: 0; }
.tu-flight > span > .tu-face, .tu-flight > span > .tu-back { width: 100%; height: 100%; aspect-ratio: auto; }
.tu-flight .tu-flight-back { display: none; }
.tu-flight.is-down .tu-flight-back { display: block; }
.tu-flight.is-down .tu-flight-face { display: none; }
.tu-flight-label { position: absolute; left: 0; top: 0; display: grid; justify-items: center; gap: .05rem; padding: .3rem .7rem; border-radius: 10px; background: rgba(26, 22, 18, .9); color: #fff; white-space: nowrap; text-align: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.tu-flight-label.is-moving { transition: transform .75s ease-in-out; }
.tu-flight-label b { font-size: .8rem; font-weight: 900; }
.tu-flight-label span { font-size: .74rem; font-weight: 700; color: #ffe2ec; }
.tu-flight-label.is-drive { border: 2px solid #6f9be0; }
.tu-flight-label.is-damage { border: 2px solid #e0705f; }
.tu-flight-label.is-trigger span { color: #ffd34d; }
.tu-anim-flash { animation: tu-flash .7s ease; }
@keyframes tu-flash { 0% { box-shadow: 0 0 0 0 rgba(227, 51, 114, .0); } 30% { box-shadow: 0 0 0 4px rgba(227, 51, 114, .65); } 100% { box-shadow: 0 0 0 0 rgba(227, 51, 114, 0); } }
@media (prefers-reduced-motion: reduce) { .tu-flights { display: none; } }
/* 寬螢幕：說明｜場地｜手牌 三欄，把左右空白用上（使用者 2026-11-17 要求；1200px 以上就用，兩欄時左右會空很多） */
@media (min-width: 1200px) {
  .tu-main { max-width: none; }
  .tu-game { grid-template-columns: minmax(260px, 440px) auto minmax(260px, 440px); grid-template-areas: "info board hand"; grid-template-rows: auto; gap: .9rem 1rem; }
  .tu-game { align-items: stretch; }
  .tu-sidecol--hand { align-content: stretch; }
  .tu-sidecol--hand .tu-hand { height: 100%; }
  .tu-sidecol--hand .tu-hand-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; overflow: visible; }
  .tu-sidecol--hand .tu-hand-card { width: auto; }
  .tu-sidecol--hand .tu-hand-row:has(> :nth-child(7)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tu-sidecol--info .tu-narration h2 { font-size: 1.3rem; }
  .tu-sidecol--info .tu-narr-text p { font-size: 1.02rem; line-height: 1.75; }
}
/* 整場流程的動態：依序出場、輪流亮起、小導覽目前那頁跳一下 */
.tu-flow-block--page { animation: tu-fade-up .35s ease both; }
.tu-flow-block--page .tu-flow-steps li { position: relative; animation: tu-step-in .5s cubic-bezier(.2, .8, .3, 1) backwards; animation-delay: calc(var(--i, 0) * 150ms + 150ms); transition: background .35s ease, box-shadow .35s ease, transform .35s ease; }
@keyframes tu-step-in { from { opacity: 0; transform: translateY(16px); } }
.tu-flow-block--page .tu-flow-steps li.is-now { background: #fff; box-shadow: 0 0 0 2px var(--accent), 0 6px 18px rgba(148, 63, 80, .22); transform: translateY(-3px); }
.tu-flow-block--page .tu-flow-steps li.is-now b { color: var(--accent); }
.tu-flow-map-item.is-on { animation: tu-map-pop .5s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes tu-map-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.tu-flow-loop { animation: tu-fade-up .4s ease both; animation-delay: 1.1s; }
@media (prefers-reduced-motion: reduce) {
  .tu-flow-block--page, .tu-flow-block--page .tu-flow-steps li, .tu-flow-map-item.is-on, .tu-flow-loop { animation: none; }
}
/* 章節列：Logo 與標題固定在左邊；較窄時收起分組標籤 */
@media (min-width: 900px) {
  .tu-chapter-brand { position: sticky; left: -1rem; z-index: 2; flex: 0 0 auto; display: inline-flex; align-items: center; margin-left: -1rem; padding: 0 .3rem 0 1rem; background: rgba(250, 248, 245, .98); box-shadow: 8px 0 8px -6px rgba(0, 0, 0, .12); }
}
@media (max-width: 1799px) {
  .tu-chapter-group { display: none; }
}
/* 整場流程：示意區（每一步的小動畫）與下方按鈕 */
.tu-flow-stage { min-height: 170px; display: grid; align-content: center; gap: .4rem; margin-bottom: .8rem; padding: .7rem; border-radius: 14px; background: var(--mat); border: 1px solid var(--mat-line); }
.tu-flow-stage .tu-scene { background: none; border: 0; padding: .2rem; }
.tu-flow-stage .tu-scene > * { animation: tu-pop-in .5s cubic-bezier(.2, .9, .3, 1.3) backwards; animation-delay: calc(var(--i, 0) * 180ms + 80ms); }
.tu-flow-stage .tu-sc-card.is-rest .tu-sc-face { animation: tu-rest .6s ease backwards; }
.tu-flow-stage-title { display: flex; align-items: center; justify-content: center; gap: .4rem; font-size: 1rem; font-weight: 900; color: var(--accent); animation: tu-fade-up .3s ease both; }
.tu-flow-stage-title span { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: .75rem; }
.tu-flow-step { display: grid; gap: .15rem; width: 100%; height: 100%; text-align: left; align-content: start; }
.tu-flow-block--page .tu-flow-steps li { cursor: pointer; }
.tu-flow-nav { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.tu-flow-progress { font-size: .8rem; font-weight: 800; color: var(--muted); }
.tu-btn--go { animation: tu-map-pop .6s cubic-bezier(.2, .9, .3, 1.4); }
.tu-flow-map-item.is-done b { background: #e5f3ea; color: var(--ok); }
@media (prefers-reduced-motion: reduce) { .tu-flow-stage .tu-scene > *, .tu-flow-stage-title, .tu-btn--go { animation: none; } }
@media (min-width: 900px) {
  .tu-flow-stage .tu-scene { gap: .6rem .9rem; }
  .tu-flow-stage .tu-sc-card { width: 96px; }
  .tu-flow-stage .tu-sc-card.is-wide { width: 140px; }
  .tu-flow-stage .tu-sc-big b { font-size: 1.6rem; }
  .tu-flow-stage .tu-sc-op { font-size: 1.6rem; }
  .tu-flow-stage figcaption, .tu-flow-stage .tu-sc-big small { font-size: .82rem; }
  .tu-flow-stage .tu-sc-zone { width: 96px; }
}
/* ── 自動播放（影片式）控制列與示範手指（2026-11-17） ── */
.tu-autobar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding-top: .45rem; border-top: 1px dashed var(--line); }
.tu-btn--auto { min-height: 36px; padding: .3rem .8rem; border-color: var(--focus); color: var(--focus); font-size: .85rem; }
.tu-btn--auto.is-on { background: var(--focus); color: #fff; }
.tu-chipbtn { min-height: 32px; padding: .2rem .65rem; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); font-size: .8rem; font-weight: 800; }
.tu-chipbtn.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.tu-finger { position: fixed; left: 0; top: 0; z-index: 90; width: 38px; height: 38px; margin: -19px 0 0 -19px; pointer-events: none; opacity: 0; transition: left .6s ease, top .6s ease, opacity .25s ease; }
.tu-finger::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(227, 51, 114, .35); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--focus), 0 6px 14px rgba(0, 0, 0, .35); }
.tu-finger.is-on { opacity: 1; }
.tu-finger.is-tap::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--focus); animation: tu-finger-ring .45s ease-out; }
@keyframes tu-finger-ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.tu-more summary { cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--accent); }
.tu-more[open] summary { margin-bottom: .3rem; }
@media (prefers-reduced-motion: reduce) { .tu-finger { transition: none; } .tu-finger.is-tap::after { animation: none; } }

/* ── 手機：影片教學／圖文版切換 ── */
.tu-mtabs { flex: 0 0 auto; display: inline-flex; gap: 2px; padding: 2px; border-radius: 99px; background: #efe8de; }
.tu-mtab { padding: .3rem .75rem; border-radius: 99px; font-size: .8rem; font-weight: 900; color: var(--muted); white-space: nowrap; }
.tu-mtab.is-on { background: var(--accent); color: #fff; }
.tu-mobile > .tu-mtabs { justify-self: center; }

/* ── 手機影片教學：場地在上、手牌在下，說明框＋播放控制固定在畫面底部 ── */
html body.is-mobile-video { padding-bottom: calc(var(--tu-sheet, 260px) + 8px) !important; }
/* 影片教學：說明框占住底部，網站的手機快捷列先收起來（和視訊對戰間一樣） */
body.is-mobile-video .vg-bottom-nav { display: none !important; }
.tu-header .tu-mtabs { margin-left: auto; }
@media (max-width: 899px) { .tu-header .tu-badge { display: none; } .tu-header h1 { font-size: .95rem; } }
body.is-mobile-video .tu-main { padding: .5rem 8px 1rem; }
body.is-mobile-video .tu-chapters { padding: .4rem 8px; gap: .3rem; }
body.is-mobile-video .tu-chapter { padding: .25rem .55rem; font-size: .74rem; }
body.is-mobile-video .tu-game { display: grid; gap: .5rem; }
body.is-mobile-video .tu-board { width: 100%; max-width: 100%; margin-inline: auto; }
body.is-mobile-video .tu-sidecol--hand { order: 2; }
body.is-mobile-video .tu-sidecol--info { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; gap: .35rem; max-height: 48dvh; overflow-y: auto; padding: .5rem max(10px, env(safe-area-inset-left, 0px)) calc(.5rem + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-right, 0px)); border-radius: 16px 16px 0 0; background: rgba(255, 255, 255, .98); box-shadow: 0 -8px 24px rgba(40, 30, 20, .16); }
body.is-mobile-video .tu-narration { position: static; margin: 0; max-height: none; overflow: visible; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
body.is-mobile-video .tu-narration.is-action { border-top: 0; }
body.is-mobile-video .tu-narr-text { font-size: .86rem; }
body.is-mobile-video .tu-narr-actions .tu-btn { min-height: 40px; }
body.is-mobile-video .tu-toast-slot { min-height: 0; }
body.is-mobile-video .tu-phasebar { padding: .2rem .4rem; }
body.is-mobile-video .tu-phase { font-size: .66rem; }
body.is-mobile-video .tu-hand-row { flex-wrap: nowrap; overflow-x: auto; }
body.is-mobile-video .tu-hand-card { width: 66px; }
body.is-mobile-video .tu-strip { flex-wrap: wrap; }
/* 手機影片教學：說明框壓扁一點，少擋住場地與手牌 */
body.is-mobile-video .tu-sidecol--info { max-height: 44dvh; gap: .25rem; padding-top: .4rem; }
body.is-mobile-video .tu-phasebar { display: flex; flex-wrap: nowrap; align-items: center; gap: .3rem; overflow-x: auto; }
body.is-mobile-video .tu-phase-who { flex: 0 0 auto; font-size: .7rem; }
body.is-mobile-video .tu-phases { flex-wrap: nowrap; }
body.is-mobile-video .tu-narration h2 { font-size: 1rem; margin: .1rem 0; }
body.is-mobile-video .tu-narr-text p { margin: .2rem 0; }
body.is-mobile-video .tu-narr-actions .tu-btn { min-height: 38px; }
body.is-mobile-video .tu-autobar { padding-top: .3rem; }
body.is-mobile-video .tu-toast-slot:empty { display: none; }
@media (max-width: 899px) { .tu-header h1 { white-space: nowrap; font-size: .9rem; } .tu-header .tu-mtab { padding: .3rem .6rem; } }
/* 手機影片教學：說明框固定高度（內容多就在框內捲動），畫面不再忽大忽小；階段字不拆行 */
body.is-mobile-video .tu-sidecol--info { height: min(290px, 38dvh); max-height: none; align-content: start; }
body.is-mobile-video .tu-phase { white-space: nowrap; }
html:has(body.is-mobile-video), body.is-mobile-video { overflow-x: clip; }
/* 自動播放暫停提示、手指旁的說明 */
.tu-btn--auto.is-paused { animation: tu-auto-pulse 1.6s ease-in-out 3; }
@keyframes tu-auto-pulse { 50% { box-shadow: 0 0 0 5px rgba(227, 51, 114, .3); } }
.tu-autonote { font-size: .75rem; font-weight: 800; color: var(--muted); }
.tu-finger-label { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -4px); padding: .2rem .5rem; border-radius: 8px; background: var(--focus); color: #fff; font-size: .75rem; font-weight: 800; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .tu-btn--auto.is-paused { animation: none; } }
/* 手機影片教學的整場流程：步驟改成直排兩欄、底部按鈕固定在畫面下方 */
@media (max-width: 899px) {
  body.is-mobile-video .tu-flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.is-mobile-video .tu-flow-step { padding: .5rem .6rem; }
  body.is-mobile-video .tu-flow-step b { font-size: .9rem; }
  body.is-mobile-video .tu-flow-step span { font-size: .78rem; }
  body.is-mobile-video .tu-flow-intro { font-size: .86rem; }
  body.is-mobile-video .tu-flow-map { gap: .25rem; }
  body.is-mobile-video .tu-flow-map-arrow { display: none; }
  body.is-mobile-video .tu-flow-nav { position: sticky; bottom: 0; z-index: 20; display: grid; grid-template-columns: 1fr; gap: .35rem; margin: .6rem -8px 0; padding: .5rem 10px calc(.5rem + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, .97); box-shadow: 0 -6px 18px rgba(40, 30, 20, .14); }
  body.is-mobile-video .tu-flow-nav > span:empty { display: none; }
  body.is-mobile-video .tu-flow-progress { text-align: center; font-size: .78rem; }
}
/* 高螢幕手機：說明框再矮一點，留更多空間給場地 */
body.is-mobile-video .tu-sidecol--info { height: min(280px, 36dvh); }
/* 手機影片教學：場地縮放後的格線與字級（--tu-cw 卡片格子原寬、--tu-fz 字放大倍率，由 fitBoard() 設定） */
body.is-mobile-video .tu-board[style*="--tu-cw"] .tu-row,
body.is-mobile-video .tu-board[style*="--tu-cw"] .tu-middle { grid-template-columns: minmax(44px, 1fr) repeat(3, var(--tu-cw)) minmax(44px, 1fr); }
body.is-mobile-video .tu-board .tu-zone-label { font-size: calc(.64rem * var(--tu-fz, 1)); }
body.is-mobile-video .tu-board .tu-zone-count { font-size: calc(1.05rem * var(--tu-fz, 1)); }
body.is-mobile-video .tu-board .tu-zone-count small,
body.is-mobile-video .tu-board .tu-zone-note,
body.is-mobile-video .tu-board .tu-reveal-text small { font-size: calc(.66rem * var(--tu-fz, 1)); }
body.is-mobile-video .tu-board .tu-strip-label,
body.is-mobile-video .tu-board .tu-strip-count,
body.is-mobile-video .tu-board .tu-side-title,
body.is-mobile-video .tu-board .tu-power,
body.is-mobile-video .tu-board .tu-reveal-text b,
body.is-mobile-video .tu-board .tu-battle-idle,
body.is-mobile-video .tu-board .tu-strip-box--crest .tu-energy { font-size: calc(.72rem * var(--tu-fz, 1)); }
/* 說明框高度固定時，階段列（可橫向捲動）不能被壓扁 */
body.is-mobile-video .tu-sidecol--info > * { min-height: max-content; }
/* 整場流程：沒看完就點模擬對戰的提示；底部按鈕一律貼在畫面底部 */
.tu-flow-hint { margin: 0 0 .5rem; padding: .45rem .7rem; border-radius: 10px; background: #fde7ef; color: #8a1f47; font-weight: 800; font-size: .88rem; }
body.is-mobile-video .tu-flow-nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 60; }
body.is-mobile-video .tu-flow-page, body.is-mobile-video .tu-main:has(.tu-flow-nav) { padding-bottom: 130px; }
body.is-mobile-video .tu-board[style*="--tu-zw"] .tu-row > .tu-zone { width: var(--tu-zw); justify-self: center; }
/* 手機影片教學：說明框內容約 290px，框高給 300px；場上小標籤也跟著放大 */
body.is-mobile-video .tu-sidecol--info { height: min(300px, 37dvh); }
body.is-mobile-video .tu-board .tu-soul,
body.is-mobile-video .tu-board .tu-side-title em,
body.is-mobile-video .tu-board .tu-energy small { font-size: calc(.68rem * var(--tu-fz, 1)); }
.tu-flow-skip { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .5rem; font-size: .85rem; color: var(--muted); }
/* 手機影片教學：卡片課的分頁可橫向捲動，不撐出畫面 */
body.is-mobile-video .tu-tabs { flex-wrap: nowrap; overflow-x: auto; }
/* 手機影片教學：章節列顯示「入門課程」「模擬對戰」分組標籤，兩組的 1、2、3 才分得開 */
body.is-mobile-video .tu-chapter-group { display: inline-flex; align-items: center; padding: .2rem .5rem; border-radius: 99px; background: #efe8de; color: #5b4b40; }
/* 手機影片教學・認識場地：官方場地圖排在手牌後面 */
body.is-mobile-video .tu-game > .tu-official { order: 3; }
