/* ===== 匹克球學堂 共用樣式 ===== */
:root {
  --bg: #f6f8f4;
  --surface: #ffffff;
  --surface-2: #eef3ec;
  --text: #1c2a22;
  --muted: #5b6b61;
  --border: #d9e2d8;
  --brand: #1f8a5b;
  --brand-ink: #ffffff;
  --brand-soft: #dff2e7;
  --accent: #f2b705;

  --lv1: #1f8a5b;  --lv1-soft: #e2f4ea;
  --lv2: #2266c4;  --lv2-soft: #e3ecfa;
  --lv3: #c2410c;  --lv3-soft: #fbe9df;

  --tip: #1f8a5b;  --tip-bg: #e9f6ee;
  --warn: #b45309; --warn-bg: #fdf3e2;
  --key: #2266c4;  --key-bg: #e8f0fb;

  /* 圖解配色 */
  --d-surround: #4f9a6b;
  --d-court: #2b6ca3;
  --d-kitchen: #3f86c2;
  --d-line: #ffffff;
  --d-net: #1b1b1b;
  --d-ball: #f5d90a;
  --d-team-a: #ff7a1a;
  --d-team-b: #e8318a;
  --d-text: #ffffff;
  --d-sky: #eaf4fb;
  --d-ground: #8a6d4b;
  --d-side-text: #1c2a22;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 30, .06), 0 6px 20px rgba(20, 40, 30, .06);
  --maxw: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1613; --surface: #17211c; --surface-2: #1d2a23; --text: #e4ece6; --muted: #9db0a4;
    --border: #2b3a32; --brand: #3cc486; --brand-ink: #062015; --brand-soft: #173326;
    --lv1: #3cc486; --lv1-soft: #173326; --lv2: #6aa5ff; --lv2-soft: #17263d; --lv3: #ff8a50; --lv3-soft: #3a2116;
    --tip: #3cc486; --tip-bg: #14281e; --warn: #f0b45a; --warn-bg: #2e2312; --key: #6aa5ff; --key-bg: #142238;
    --d-surround: #3a7653; --d-court: #24598a; --d-kitchen: #316fa3; --d-sky: #1a2630; --d-ground: #6e5639; --d-side-text: #e4ece6;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1613; --surface: #17211c; --surface-2: #1d2a23; --text: #e4ece6; --muted: #9db0a4;
  --border: #2b3a32; --brand: #3cc486; --brand-ink: #062015; --brand-soft: #173326;
  --lv1: #3cc486; --lv1-soft: #173326; --lv2: #6aa5ff; --lv2-soft: #17263d; --lv3: #ff8a50; --lv3-soft: #3a2116;
  --tip: #3cc486; --tip-bg: #14281e; --warn: #f0b45a; --warn-bg: #2e2312; --key: #6aa5ff; --key-bg: #142238;
  --d-surround: #3a7653; --d-court: #24598a; --d-kitchen: #316fa3; --d-sky: #1a2630; --d-ground: #6e5639; --d-side-text: #e4ece6;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.75; font-size: 16.5px;
  -webkit-text-size-adjust: 100%;
}
img, svg, iframe { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; }
h2 { font-size: 1.6rem; margin-top: 2.6rem; padding-top: .4rem; }
h3 { font-size: 1.22rem; margin-top: 1.8rem; }
h4 { font-size: 1.05rem; margin-top: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin: .25em 0; }
kbd, code { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; font-size: .9em; }
.en { color: var(--muted); font-size: .88em; font-weight: 400; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.logo svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--brand); color: var(--brand-ink); }
.icon-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }

@media (max-width: 860px) {
  .menu-btn { display: grid; margin-left: auto; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px 14px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 14px; border-radius: 10px; }
}

/* ===== Hero ===== */
.hero { background: linear-gradient(135deg, #14633f 0%, #1f8a5b 45%, #2b6ca3 100%); color: #fff; }
.hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 56px 16px 60px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .35em; }
.hero p.lead { font-size: 1.15rem; opacity: .95; max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.btn-light { background: #fff; color: #14633f; }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.hero-figure { background: rgba(255,255,255,.08); border-radius: var(--radius); padding: 14px; border: 1px solid rgba(255,255,255,.2); }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; padding: 40px 16px; } }

.page-hero { border-bottom: 1px solid var(--border); background: var(--surface); }
.page-hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 36px 16px 30px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: .3em; }
.page-hero p { color: var(--muted); max-width: 46em; margin: 0; font-size: 1.07rem; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; margin-bottom: 10px; }
.lv1 .badge, .badge.lv1 { background: var(--lv1-soft); color: var(--lv1); }
.lv2 .badge, .badge.lv2 { background: var(--lv2-soft); color: var(--lv2); }
.lv3 .badge, .badge.lv3 { background: var(--lv3-soft); color: var(--lv3); }
.page-hero.lv1 { border-top: 5px solid var(--lv1); }
.page-hero.lv2 { border-top: 5px solid var(--lv2); }
.page-hero.lv3 { border-top: 5px solid var(--lv3); }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--muted); font-size: .92rem; }

/* ===== Layout ===== */
.layout { max-width: var(--maxw); margin: 0 auto; padding: 8px 16px 60px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; }
.toc { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; padding: 22px 0; font-size: .92rem; }
.toc-title { font-weight: 800; margin-bottom: 8px; color: var(--muted); font-size: .8rem; letter-spacing: .08em; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--brand); border-left-color: var(--brand); font-weight: 700; }
.toc details summary { display: none; }
main.content { min-width: 0; }
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; max-height: none; padding: 16px 0 0; }
  .toc details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
  .toc details summary { display: block; cursor: pointer; font-weight: 700; }
  .toc .toc-title { display: none; }
  .toc ol { margin-top: 8px; }
}

section.block { padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
section.block:last-of-type { border-bottom: 0; }

/* ===== Components ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; margin: 0 0 1.2em; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card h3, .card h4 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.level-card { text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 6px; border-top: 5px solid var(--lv); transition: transform .15s ease; }
.level-card:hover { transform: translateY(-3px); }
.level-card.lv1 { --lv: var(--lv1); } .level-card.lv2 { --lv: var(--lv2); } .level-card.lv3 { --lv: var(--lv3); }
.level-card .go { margin-top: auto; color: var(--lv); font-weight: 700; }

.callout { border-radius: 12px; padding: 14px 18px; margin: 0 0 1.2em; border-left: 5px solid; }
.callout > :last-child { margin-bottom: 0; }
.callout .callout-title { font-weight: 800; margin-bottom: 4px; display: block; }
.callout.tip { background: var(--tip-bg); border-color: var(--tip); }
.callout.tip .callout-title { color: var(--tip); }
.callout.warn { background: var(--warn-bg); border-color: var(--warn); }
.callout.warn .callout-title { color: var(--warn); }
.callout.key { background: var(--key-bg); border-color: var(--key); }
.callout.key .callout-title { color: var(--key); }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; background: var(--surface); border-radius: 12px; overflow: hidden; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: 12px; }
.table-wrap table { margin: 0; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 12px 46px; margin: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: .95rem; }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.pill-list li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; margin: 0; font-size: .92rem; }

.drill { border-left: 5px solid var(--accent); }
.drill .drill-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .88rem; margin-bottom: 8px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 1.2em; }
.compare > div { padding: 14px 18px; background: var(--surface); }
.compare > div + div { border-left: 1px solid var(--border); }
.compare .good-h { color: var(--tip); font-weight: 800; }
.compare .bad-h { color: #d0342c; font-weight: 800; }
@media (max-width: 600px) { .compare { grid-template-columns: 1fr; } .compare > div + div { border-left: 0; border-top: 1px solid var(--border); } }

/* ===== Diagrams ===== */
figure.diagram { margin: 0 0 1.4em; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
figure.diagram svg { display: block; width: 100%; height: auto; }
figure.diagram figcaption { color: var(--muted); font-size: .92rem; margin-top: 10px; line-height: 1.6; }
figure.diagram figcaption b { color: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 22px; height: 0; border-top: 3px solid; }
.legend i.ball { border-top: 3px dashed var(--d-ball); }
.legend i.a { border-color: var(--d-team-a); }
.legend i.b { border-color: var(--d-team-b); }
.legend i.dot { width: 12px; height: 12px; border-radius: 50%; border: 0; }
.legend i.dot.a { background: var(--d-team-a); } .legend i.dot.b { background: var(--d-team-b); }

.d-surround { fill: var(--d-surround); }
.d-court { fill: var(--d-court); }
.d-kitchen { fill: var(--d-kitchen); }
.d-line { stroke: var(--d-line); stroke-width: .18; fill: none; }
.d-net { stroke: var(--d-net); stroke-width: .35; }
.d-post { fill: var(--d-net); }
.d-ball-path { stroke: var(--d-ball); stroke-width: .28; fill: none; stroke-dasharray: .7 .45; stroke-linecap: round; }
.d-move-a { stroke: var(--d-team-a); stroke-width: .32; fill: none; }
.d-move-b { stroke: var(--d-team-b); stroke-width: .32; fill: none; }
.d-move-w { stroke: #fff; stroke-width: .28; fill: none; }
.d-bounce { fill: var(--d-ball); stroke: #333; stroke-width: .08; }
.d-player-a { fill: var(--d-team-a); stroke: #fff; stroke-width: .18; }
.d-player-b { fill: var(--d-team-b); stroke: #fff; stroke-width: .18; }
.d-player-ghost { fill: none; stroke: #fff; stroke-width: .14; stroke-dasharray: .35 .25; opacity: .9; }
.d-ptext { fill: #fff; font-size: 1.05px; font-weight: 800; text-anchor: middle; dominant-baseline: central; font-family: system-ui, sans-serif; }
.d-label { fill: var(--d-text); font-size: 1.15px; font-weight: 700; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.45); stroke-width: .22; font-family: "Noto Sans TC", system-ui, sans-serif; }
.d-label.sm { font-size: .95px; }
.d-label.dark { fill: var(--d-side-text); stroke: none; }
.d-label.yel { fill: var(--d-ball); }
.d-dim { stroke: #fff; stroke-width: .1; }
.z-good { fill: #3ee08a; opacity: .38; }
.z-bad { fill: #ff4d4d; opacity: .4; }
.z-target { fill: var(--d-ball); opacity: .45; }
.z-warn { fill: #ffb020; opacity: .42; }
.z-hatch { fill: url(#hatch); }
.d-sky { fill: var(--d-sky); }
.d-ground { stroke: var(--d-ground); stroke-width: .35; }
.d-ground-k { stroke: #3f86c2; stroke-width: .6; }
.d-side-net { stroke: var(--d-side-text); stroke-width: .3; }
.d-fig { stroke: var(--d-side-text); stroke-width: .28; fill: none; stroke-linecap: round; }
.d-fig-a { stroke: var(--d-team-a); } .d-fig-b { stroke: var(--d-team-b); }
.d-traj-good { stroke: #16a34a; stroke-width: .3; fill: none; }
.d-traj-bad { stroke: #dc2626; stroke-width: .3; fill: none; stroke-dasharray: .6 .4; }
.d-traj-ball { stroke: #d4a600; stroke-width: .3; fill: none; }
.d-traj-blue { stroke: #2266c4; stroke-width: .3; fill: none; }
.d-side-label { fill: var(--d-side-text); font-size: 1px; font-weight: 700; text-anchor: middle; font-family: "Noto Sans TC", system-ui, sans-serif; }

/* 手繪插圖（握拍、姿勢） */
.ill { stroke: var(--text); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ill-fill { fill: var(--surface-2); stroke: var(--text); stroke-width: 2; }
.ill-hi { fill: var(--accent); stroke: var(--text); stroke-width: 2; }
.ill-text { fill: var(--text); font-size: 14px; font-family: "Noto Sans TC", system-ui, sans-serif; }
.ill-text.sm { font-size: 12px; fill: var(--muted); }
.ill-text.b { font-weight: 800; }
.ill-note { stroke: var(--brand); stroke-width: 1.6; fill: none; stroke-dasharray: 4 3; }
.ill-paddle { fill: var(--brand); stroke: var(--text); stroke-width: 2; }

/* ===== Videos ===== */
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0 0 1.4em; }
@media (max-width: 640px) { .video-grid { grid-template-columns: 1fr; } }
.video { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-thumb { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #111 center / cover no-repeat; }
.video-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.55)); }
.video-thumb .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 48px; border-radius: 14px; background: rgba(220, 30, 30, .92); display: grid; place-items: center; z-index: 1; transition: transform .15s; }
.video-thumb:hover .play { transform: translate(-50%, -50%) scale(1.08); }
.video-thumb .play::before { content: ""; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 4px; }
.video-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.video-title { font-weight: 700; line-height: 1.45; }
.video-meta { color: var(--muted); font-size: .86rem; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.video-note { font-size: .9rem; color: var(--muted); margin: 2px 0 0; }
.video-meta a { color: var(--muted); }
.tag { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }

.notice { max-width: var(--maxw); margin: 12px auto 0; padding: 0 16px; }
.notice div { background: var(--warn-bg); border: 1px solid var(--warn); color: var(--text); border-radius: 12px; padding: 10px 14px; font-size: .92rem; }

/* ===== Checklist ===== */
.checklist { list-style: none; padding: 0; }
.checklist li { margin: 0; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 8px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--brand); flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); margin: 6px 0 14px; }
.progress > div { height: 100%; width: 0; background: var(--brand); transition: width .3s; }

/* ===== Glossary ===== */
.search { width: 100%; padding: 12px 16px; font-size: 1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); margin-bottom: 18px; font-family: inherit; }
.gloss { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (max-width: 700px) { .gloss { grid-template-columns: 1fr; } }
.gloss .card { padding: 14px 18px; }
.gloss dt { font-weight: 800; }
.gloss dd { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .9rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 26px 16px; display: flex; flex-wrap: wrap; gap: 10px 30px; justify-content: space-between; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.pager a { flex: 1; min-width: 200px; text-decoration: none; }
.pager .card { padding: 14px 18px; }
.pager small { color: var(--muted); display: block; }
.pager .next { text-align: right; }

@media print { .site-header, .toc, .video-grid, .site-footer { display: none; } .layout { display: block; } }
.d-side-label.ok { fill: #16a34a; }
.d-side-label.ng { fill: #dc2626; }
:root[data-theme="dark"] .d-side-label.ok { fill: #4ade80; }
:root[data-theme="dark"] .d-side-label.ng { fill: #f87171; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .d-side-label.ok { fill: #4ade80; }
  :root:not([data-theme="light"]) .d-side-label.ng { fill: #f87171; }
}
.legend i.good { border-color: #16a34a; }
.legend i.bad { border-top: 3px dashed #dc2626; }
.legend i.blue { border-color: #2266c4; }
.legend i.gold { border-color: #d4a600; }

/* ===== 首頁容器 ===== */
.container { max-width: var(--maxw); margin: 0 auto; padding: 8px 16px 60px; }
.section-lead { color: var(--muted); max-width: 46em; margin-top: -.3em; }
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact b { font-size: 1.5rem; color: var(--brand); line-height: 1.3; }
.fact span { color: var(--muted); font-size: .92rem; }
.ill-wrap { display: grid; place-items: center; }
.ill-wrap svg { width: 100%; max-width: 520px; height: auto; }

/* ===== 常見錯誤表 ===== */
.mistakes th:nth-child(1) { color: #d0342c; }
.mistakes th:nth-child(3) { color: var(--tip); }
.mistakes td:nth-child(1) { font-weight: 700; }
.mistakes td:nth-child(2) { color: var(--muted); }
.mistakes-title { font-weight: 800; margin: 1.2em 0 .5em; display: flex; align-items: center; gap: 8px; }
.mistakes-title::before { content: "!"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #d0342c; color: #fff; font-size: .8rem; }
.ill-good { stroke: #16a34a; fill: none; stroke-width: 2.6; stroke-linecap: round; }
.ill-bad { stroke: #dc2626; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 6 4; }
.ill-good-fill { fill: #16a34a; opacity: .18; }
.ill-bad-fill { fill: #dc2626; opacity: .16; }
.ill-blue-fill { fill: #2266c4; opacity: .2; }
.ill-orange-fill { fill: #ff7a1a; opacity: .22; }
.ill-text.ok { fill: #16a34a; font-weight: 700; }
.ill-text.ng { fill: #dc2626; font-weight: 700; }
.ill-ball { fill: var(--d-ball); stroke: #333; stroke-width: 1.2; }
.ill-wrap.wide svg { max-width: 640px; }
:root[data-theme="dark"] .ill-text.ok { fill: #4ade80; }
:root[data-theme="dark"] .ill-text.ng { fill: #f87171; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ill-text.ok { fill: #4ade80; }
  :root:not([data-theme="light"]) .ill-text.ng { fill: #f87171; }
}
