/* Mallow Mai Badminton — design system */
:root {
  --ink: #3b2b22;
  --ink-2: #5f4b3f;
  --ink-3: #7a6555;
  --bg: #f7f1e7;
  --bg-2: #eee5d6;
  --card: #fffcf6;
  --line: #e3d7c4;
  --court: #4f7a5a;
  --court-deep: #3c5f45;
  --court-soft: #e2ebdd;
  --court-surface: #7c9a76;
  --court-line: #fbf8f1;
  --mallow: #a9682b;
  --mallow-soft: #f4e2d1;
  --sun: #d9a55a;
  --sun-soft: #f5e7cc;
  --blush: #ec9ab1;
  --sky: #3e6f99;
  --focus: #3e6f99;
  --shot-clear: #3f6e98;
  --shot-smash: #b4513a;
  --shot-drop: #7d5fa6;
  --shot-drive: #b87a26;
  --shot-net: #3f7e62;
  --shot-lift: #a84e72;
  --shot-serve: #66757c;
  --rule: #3f6e98;
  --common: #3f7e62;
  --style: #9a6418;
  --uncertain: #a8455f;
  --on-primary: #ffffff;
  --on-accent: #ffffff;
  --lv2: #7a5512;
  --lv3: #8a4a1e;
  --lv4-bg: #e7e1ef;
  --lv4: #5b4a7a;
  --shadow: 0 1px 2px rgba(59, 43, 34, 0.06), 0 8px 24px rgba(59, 43, 34, 0.07);
  --radius: 18px;
  --radius-sm: 10px;
  --font-body: "Noto Sans Thai", "Leelawadee UI", "Thonburi", Tahoma, system-ui, sans-serif;
  --font-head: "Kanit", "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2e9dd;
    --ink-2: #d3c5b4;
    --ink-3: #a8998a;
    --bg: #1c1613;
    --bg-2: #251d19;
    --card: #2b221d;
    --line: #3d322b;
    --court: #9fc5a3;
    --court-deep: #86b08b;
    --court-soft: #2a3a2d;
    --court-surface: #3f5e44;
    --court-line: #f3eee4;
    --mallow: #e3a866;
    --mallow-soft: #3d2a1c;
    --sun: #e8c27e;
    --sun-soft: #3a2d18;
    --blush: #e590a8;
    --sky: #9dbee0;
    --focus: #9dbee0;
    --shot-clear: #8fb6e0;
    --shot-smash: #ee8a72;
    --shot-drop: #c2a6ec;
    --shot-drive: #ebb360;
    --shot-net: #8acca9;
    --shot-lift: #ee98bd;
    --shot-serve: #b7c3c8;
    --rule: #8fb6e0;
    --common: #8acca9;
    --style: #ebb360;
    --uncertain: #ee98bd;
    --on-primary: #17241a;
    --on-accent: #2a1a0c;
    --lv2: #e8c27e;
    --lv3: #e3a866;
    --lv4-bg: #2f2838;
    --lv4: #cdbee6;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f2e9dd;
  --ink-2: #d3c5b4;
  --ink-3: #a8998a;
  --bg: #1c1613;
  --bg-2: #251d19;
  --card: #2b221d;
  --line: #3d322b;
  --court: #9fc5a3;
  --court-deep: #86b08b;
  --court-soft: #2a3a2d;
  --court-surface: #3f5e44;
  --court-line: #f3eee4;
  --mallow: #e3a866;
  --mallow-soft: #3d2a1c;
  --sun: #e8c27e;
  --sun-soft: #3a2d18;
  --blush: #e590a8;
  --sky: #9dbee0;
  --focus: #9dbee0;
  --shot-clear: #8fb6e0;
  --shot-smash: #ee8a72;
  --shot-drop: #c2a6ec;
  --shot-drive: #ebb360;
  --shot-net: #8acca9;
  --shot-lift: #ee98bd;
  --shot-serve: #b7c3c8;
  --rule: #8fb6e0;
  --common: #8acca9;
  --style: #ebb360;
  --uncertain: #ee98bd;
  --on-primary: #17241a;
  --on-accent: #2a1a0c;
  --lv2: #e8c27e;
  --lv3: #e3a866;
  --lv4-bg: #2f2838;
  --lv4: #cdbee6;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--court-deep); text-underline-offset: 3px; }
:where(:root[data-theme="dark"]) a { color: var(--court); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) a { color: var(--court); } }
a:hover { color: var(--mallow); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.3; font-weight: 600; margin: 1.6em 0 0.5em; letter-spacing: 0.005em; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin-top: 0.2em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li { margin: 0.25em 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; color: var(--bg); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 12px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.22rem; line-height: 1.05; display: flex; flex-direction: column; }
.brand-name small { font-family: var(--font-body); font-weight: 600; font-size: 0.66rem; letter-spacing: 0.22em; color: var(--court-deep); text-transform: uppercase; }
:root[data-theme="dark"] .brand-name small { color: var(--court); }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 0.97rem; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--court-soft); color: var(--court-deep); }
:root[data-theme="dark"] .nav a[aria-current="page"] { color: var(--court); }
.nav a.cta { background: var(--mallow); color: var(--on-accent); }
.nav a.cta:hover { background: var(--ink); color: var(--bg); }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .nav { position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 600; line-height: 1.2; }
.btn-primary { background: var(--court); color: var(--on-primary); }
.btn-primary:hover { background: var(--court-deep); color: var(--on-primary); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-accent { background: var(--mallow); color: var(--on-accent); }
.btn-accent:hover { background: var(--ink); color: var(--bg); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); line-height: 1.6; white-space: nowrap; }
.chip.level-1 { background: var(--court-soft); color: var(--court-deep); }
.chip.level-2 { background: var(--sun-soft); color: var(--lv2); }
.chip.level-3 { background: var(--mallow-soft); color: var(--lv3); }
.chip.level-4 { background: var(--lv4-bg); color: var(--lv4); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.lesson-card .chip { white-space: normal; max-width: 100%; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 700; color: var(--mallow); letter-spacing: 0.04em; margin-bottom: 8px; }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.8rem); margin: 0 0 14px; }
.hero h1 .hl { color: var(--court); position: relative; white-space: nowrap; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) {
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- sections / cards ---------- */
.section { padding: 44px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 380px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
a.card { text-decoration: none; color: var(--ink); display: block; transition: transform 0.15s ease, border-color 0.15s ease; }
a.card:hover { transform: translateY(-2px); border-color: var(--court); color: var(--ink); }
.lesson-card { display: flex; flex-direction: column; gap: 8px; }
.lesson-card h3 { font-size: 1.1rem; margin: 0; }
.lesson-card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.lesson-card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.lesson-card .done-mark { display: none; color: var(--court); font-weight: 700; font-size: 0.85rem; }
.lesson-card.is-done .done-mark { display: inline; }
.path-card { position: relative; overflow: hidden; }
.path-card h3 { padding-right: 44px; }
.path-card .num { font-family: var(--font-head); font-size: 3rem; line-height: 1; color: var(--court-soft); position: absolute; right: 14px; top: 8px; }
.steps-list { counter-reset: s; list-style: none; padding: 0; }
.steps-list > li { counter-increment: s; position: relative; padding-left: 44px; margin: 12px 0; }
.steps-list > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--court); color: var(--on-primary); font-weight: 700; display: grid; place-items: center; font-size: 0.95rem; line-height: 1; }
.note { border-left: 4px solid var(--sun); background: var(--sun-soft); padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 16px 0; }
.note.warn { border-color: var(--mallow); background: var(--mallow-soft); }
.note.info { border-color: var(--court); background: var(--court-soft); }
.note > :last-child { margin-bottom: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 0.9rem; }

/* ---------- breadcrumbs / page head ---------- */
.crumbs { font-size: 0.9rem; color: var(--ink-3); margin: 20px 0 6px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--ink-2); }
.page-head { padding: 8px 0 18px; }
.page-head .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 46em; }

/* ---------- lesson layout ---------- */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 40px; align-items: start; }
.lesson-main { min-width: 0; }
.lesson-aside { position: sticky; top: 84px; font-size: 0.95rem; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.toc h2 { font-size: 1rem; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--mallow); text-decoration: underline; }
.toc-mobile { display: none; margin: 12px 0; }
@media (max-width: 980px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-aside { display: none; }
  .toc-mobile { display: block; }
}
.toc-mobile summary { cursor: pointer; font-weight: 700; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.toc-mobile ol { background: var(--card); border: 1px solid var(--line); border-top: 0; margin: -6px 0 0; padding: 12px 16px 12px 36px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 0.92rem; color: var(--ink-2); background: var(--bg-2); border-radius: var(--radius-sm); padding: 10px 14px; margin: 12px 0 8px; }
.conf { font-weight: 700; }
.conf-high { color: var(--common); }
.conf-medium { color: var(--style); }
.conf-low { color: var(--uncertain); }
.goal-box { background: var(--court-soft); border-radius: var(--radius); padding: 16px 20px; margin: 18px 0; }
.goal-box h2 { margin: 0 0 6px; font-size: 1.15rem; }
.goal-box ul { margin: 0; }
.lesson-main h2 { scroll-margin-top: 84px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 2em; }
.lesson-main h2:first-of-type { border-top: 0; }
.keypoints { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.keypoint { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.keypoint h3 { margin: 0 0 4px; font-size: 1rem; color: var(--court-deep); display: flex; align-items: center; gap: 8px; }
:root[data-theme="dark"] .keypoint h3 { color: var(--court); }
.keypoint p { margin: 0; font-size: 0.97rem; }
.mistakes { display: grid; gap: 10px; }
.mistake { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.mistake > div { padding: 12px 14px; }
.mistake .wrong { background: var(--mallow-soft); }
.mistake .wrong strong { color: var(--uncertain); }
.mistake .fix strong { color: var(--common); }
.mistake p { margin: 0; }
@media (max-width: 620px) { .mistake { grid-template-columns: 1fr; } }
.progressions { counter-reset: p; list-style: none; padding: 0; }
.progressions li { counter-increment: p; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 12px 56px; position: relative; margin: 10px 0; }
.progressions li::before { content: "ระดับ " counter(p); position: absolute; left: 10px; top: 13px; font-size: 0.72rem; font-weight: 700; color: var(--court-deep); background: var(--court-soft); border-radius: 6px; padding: 0 5px; line-height: 1.6; max-width: 40px; text-align: center; }
.ingame { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .ingame { grid-template-columns: 1fr; } }
.evidence { display: grid; gap: 12px; }
.ev-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; background: var(--card); }
.ev-group h3 { margin: 0 0 4px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.ev-group ul { margin: 0; }
.ev-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.ev-rule .ev-dot { background: var(--rule); }
.ev-common .ev-dot { background: var(--common); }
.ev-style .ev-dot { background: var(--style); }
.ev-uncertain .ev-dot { background: var(--uncertain); }
.cite { font-size: 0.75em; vertical-align: super; line-height: 0; text-decoration: none; font-weight: 700; padding: 0 1px; }
.refs { font-size: 0.93rem; }
.refs li { margin: 8px 0; word-break: break-word; }
.refs .src-meta { color: var(--ink-3); display: block; }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 36px 0 12px; }
.lesson-nav a { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; text-decoration: none; color: var(--ink); }
.lesson-nav a:hover { border-color: var(--court); }
.lesson-nav .next { text-align: right; grid-column: 2; }
.lesson-nav small { display: block; color: var(--ink-3); }
.done-toggle { display: inline-flex; align-items: center; gap: 8px; border-radius: 18px; }
.done-toggle[aria-pressed="true"] { background: var(--court); color: var(--on-primary); border-color: var(--court); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); margin: 12px 0 18px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* ---------- figures & animation ---------- */
figure { margin: 22px 0; }
.anim, .figure { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.anim-stage { border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.anim-svg { display: block; width: 100%; height: auto; font-family: var(--font-body); }
.anim figcaption, .figure figcaption { font-size: 0.95rem; color: var(--ink-2); margin-top: 10px; }
.anim figcaption strong, .figure figcaption strong { color: var(--ink); }
.anim-noscript { font-size: 0.9rem; color: var(--ink-3); }
.anim.ready .anim-noscript { display: none; }
.anim-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.btn-icon { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.btn-icon:hover { border-color: var(--court); }
.btn-icon svg { width: 20px; height: 20px; fill: currentColor; }
.btn-icon .i-pause { display: none; }
.anim.playing .btn-icon .i-play { display: none; }
.anim.playing .btn-icon .i-pause { display: inline; }
.speed { display: inline-flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.chip-btn { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 0.85rem; font-weight: 700; padding: 6px 9px; border-radius: 9px; cursor: pointer; min-width: 44px; }
.chip-btn[aria-checked="true"] { background: var(--court); color: var(--on-primary); }
.scrub { flex: 1 1 140px; min-width: 120px; accent-color: var(--court); height: 32px; }
.anim-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.legend-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.88rem; font-weight: 600; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 4px 12px 4px 8px; cursor: pointer; }
.legend-btn[aria-pressed="false"] { opacity: 0.45; text-decoration: line-through; }
.legend-btn .sw { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.anim-step { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--court-soft); font-weight: 600; font-size: 0.97rem; min-height: 2.4em; }

/* SVG parts */
.anim-svg .floor { fill: var(--court-surface); opacity: 0.18; }
.anim-svg .court-floor { stroke: var(--court-surface); stroke-width: 4; }
.anim-svg .tick { stroke: var(--ink-3); stroke-width: 2; }
.anim-svg .tick-label, .anim-svg .scale-label, .anim-svg .zone-label { fill: var(--ink-3); font-size: calc(14px * var(--fs, 1)); }
.anim-svg .zone-label { fill: var(--ink-2); font-weight: 700; }
.anim-svg .scale { stroke: var(--ink-3); stroke-width: 1.5; }
.anim-svg .net-mesh { fill: var(--ink-3); opacity: 0.35; }
.anim-svg .net-post { stroke: var(--ink-2); stroke-width: 3; }
.anim-svg .net-tape { stroke: var(--ink); stroke-width: 3; }
.anim-svg .net-label { fill: var(--ink-2); font-size: calc(13px * var(--fs, 1)); font-weight: 600; }
.anim-svg .person { fill: var(--ink-3); opacity: 0.22; }
.anim-svg .trail { fill: none; stroke-width: calc(4px * var(--fs, 1)); stroke-linecap: round; stroke-linejoin: round; }
.anim-svg .trail-ghost { fill: none; stroke-width: 2; stroke-dasharray: 3 7; opacity: 0.35; stroke-linecap: round; }
.anim-svg .shot.done .trail { opacity: 0.85; }
.anim-svg .contact { stroke: var(--card); stroke-width: 2; }
.anim-svg .land-x { stroke-width: 4; stroke-linecap: round; fill: none; }
.anim-svg .intercept { fill: none; stroke-width: 3; }
.anim-svg .shot-label { font-size: calc(15px * var(--fs, 1)); font-weight: 700; paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }
.anim-svg .landing { transition: opacity 0.25s ease; }
.anim-shuttle .cork { fill: var(--mallow); }
.anim-shuttle .skirt { fill: #fff; stroke: var(--ink-2); stroke-width: 1.2; stroke-linejoin: round; }
.anim-shuttle .skirt-edge { stroke: var(--ink-2); stroke-width: 1.2; }
.anim-svg.top .court-surface { fill: var(--court-surface); }
.anim-svg.top .court-line { stroke: var(--court-line); stroke-width: 3; }
.anim-svg.top .net-top { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.anim-svg.top .post { fill: var(--ink); }
.anim-svg.top .side-label { fill: var(--ink-2); font-size: calc(14px * var(--fs, 1)); font-weight: 700; }
.anim-svg.top .zone { opacity: 0.38; }
.anim-svg.top .zone-label-top { fill: #fff; font-size: calc(15px * var(--fs, 1)); font-weight: 700; paint-order: stroke; stroke: rgba(0, 0, 0, 0.45); stroke-width: 3px; }
.anim-svg.top .shot-label { stroke: var(--court-surface); }
.anim-svg.top .arrow { stroke-width: 3; fill: none; }
.anim-svg.top .arrow.dashed { stroke-dasharray: 8 6; }
.anim-svg.top .arrowhead { fill: context-stroke; }
.anim-svg.top .arrow-label { fill: #fff; font-size: calc(14px * var(--fs, 1)); font-weight: 700; paint-order: stroke; stroke: rgba(0, 0, 0, 0.5); stroke-width: 3px; }
.anim-svg .player-body { stroke: #fff; stroke-width: 3; opacity: 0.55; }
.anim-svg.top.area-near, .anim-svg.top.area-far { max-width: min(500px, 100%); max-height: 62vh; margin: 0 auto; }
.anim-svg .player-label { fill: #fff; font-size: 17px; font-weight: 700; }
.anim-svg .player-trail { fill: none; stroke-width: 3; stroke-dasharray: 2 6; stroke-linecap: round; opacity: 0.9; }
.anim-svg .foot { opacity: 0; transition: opacity 0.2s ease; }
.anim-svg .foot.shown { opacity: 0.55; }
.anim-svg .foot.current { opacity: 1; }
.anim-svg .foot-shape { stroke: var(--ink); stroke-width: 1.5; }
.anim-svg .foot.left .foot-shape { fill: var(--sun); }
.anim-svg .foot.right .foot-shape { fill: #fff; }
.anim-svg .foot-n { font-size: 11px; font-weight: 800; fill: var(--ink); }
.anim-svg .foot.current .foot-shape { stroke-width: 3; }

/* static figure SVGs */
.figure svg { display: block; width: 100%; height: auto; }
.fig-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.fig-panel { background: var(--bg-2); border-radius: 12px; padding: 10px; }
.fig-panel h3 { margin: 0 0 4px; font-size: 0.98rem; text-align: center; }
.fig-panel p { font-size: 0.9rem; margin: 6px 0 0; color: var(--ink-2); }
.svg-ink { fill: var(--ink); }
.svg-ink2 { fill: var(--ink-2); }
.svg-stroke { stroke: var(--ink); fill: none; }
.svg-card { fill: var(--card); }
.svg-court { fill: var(--court); }
.svg-mallow { fill: var(--mallow); }
.svg-sun { fill: var(--sun); }
.svg-label { fill: var(--ink-2); font-size: 13px; font-family: var(--font-body); }
.svg-label-b { fill: var(--ink); font-size: 14px; font-weight: 700; font-family: var(--font-body); }

/* ---------- filters / search ---------- */
.searchbar { display: flex; gap: 8px; margin: 10px 0 14px; }
.searchbar input { flex: 1; font: inherit; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); min-width: 0; }
.searchbar input:focus { border-color: var(--court); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--court) 30%, transparent); }
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-row > span { font-weight: 700; font-size: 0.9rem; margin-right: 4px; min-width: 64px; }
.fchip { font: inherit; font-size: 0.9rem; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.fchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.result-count { color: var(--ink-3); font-size: 0.95rem; margin-bottom: 10px; }
mark { background: var(--sun-soft); color: inherit; padding: 0 2px; border-radius: 4px; }

/* ---------- curriculum ---------- */
.module { margin: 0 0 26px; }
.module-head { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.module-head h2 { margin: 0.6em 0 0.2em; }
.topic-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.topic-list li { margin: 0; }
.topic { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: var(--ink); height: 100%; }
a.topic:hover { border-color: var(--court); color: var(--ink); }
.topic .t { font-weight: 600; display: block; }
.topic .s { font-size: 0.85rem; color: var(--ink-3); }
.topic.planned { background: transparent; border-style: dashed; color: var(--ink-3); }
.topic .ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; background: var(--court-soft); color: var(--court-deep); margin-top: 2px; }
.topic.planned .ic { background: var(--bg-2); color: var(--ink-3); }
.topic.is-done .ic { background: var(--court); color: var(--on-primary); }
.progress-bar { height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--court), var(--mallow)); width: 0; transition: width 0.4s ease; }

/* ---------- practice ---------- */
.practice-form { display: grid; gap: 16px; }
.practice-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--card); margin: 0; }
.practice-form legend { font-weight: 700; padding: 0 6px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; background: var(--bg); color: var(--ink-2); }
.opt input:checked + span { background: var(--court); color: var(--on-primary); border-color: var(--court); }
.opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.plan { margin-top: 24px; }
.plan-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.plan-blocks { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.plan-block { display: grid; grid-template-columns: 74px 1fr; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.plan-block .min { font-family: var(--font-head); font-size: 1.6rem; line-height: 1; color: var(--court); text-align: center; }
.plan-block .min small { display: block; font-size: 0.8rem; font-family: var(--font-body); color: var(--ink-3); margin-top: 4px; }
.plan-block h3 { margin: 0 0 4px; font-size: 1.05rem; }
.plan-block p { margin: 0 0 4px; font-size: 0.95rem; }
.plan-block .phase { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; color: var(--mallow); }
.plan-block label { display: inline-flex; gap: 6px; align-items: center; font-size: 0.9rem; cursor: pointer; }

/* ---------- glossary / sources ---------- */
.src-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 10px 0; scroll-margin-top: 90px; }
.src-item h3 { margin: 0 0 4px; font-size: 1.02rem; }
.src-item dl { display: grid; grid-template-columns: 130px 1fr; gap: 2px 12px; margin: 8px 0 0; font-size: 0.92rem; }
.src-item dt { color: var(--ink-3); }
.src-item dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) { .src-item dl { grid-template-columns: 1fr; } .src-item dd { margin-bottom: 6px; } }
.src-item:target { border-color: var(--mallow); box-shadow: 0 0 0 3px var(--mallow-soft); }

/* ---------- footer ---------- */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 34px 0 40px; font-size: 0.93rem; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.site-footer h2 { font-size: 1rem; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--ink-2); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- mascot ---------- */
.mascot { display: block; height: auto; }
.mascot-404 { width: min(260px, 70vw); margin: 0 auto 8px; }
.page-head-mascot { display: grid; grid-template-columns: minmax(0, 1fr) 170px; column-gap: 24px; align-items: center; }
.page-head-mascot > * { grid-column: 1; }
.page-head-mascot .mascot-side { grid-column: 2; grid-row: 1 / span 3; width: 170px; }
@media (max-width: 700px) {
  .page-head-mascot { grid-template-columns: 1fr; }
  .page-head-mascot .mascot-side { grid-column: 1; grid-row: auto; width: 120px; order: -1; }
}
.mm-bob { animation: mm-bob 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.mm-racket { animation: mm-swing 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 0% 100%; }
@keyframes mm-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes mm-swing { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-9deg); } }
@media (prefers-reduced-motion: reduce) { .mm-bob, .mm-racket { animation: none; } }

/* ---------- cute icons ---------- */
.ico { width: 1.35em; height: 1.35em; flex: none; display: inline-block; vertical-align: -0.32em; overflow: visible; }
.ico-btn { width: 30px; height: 30px; margin: -6px 0; }
.ico-lg { width: 26px; height: 26px; }
.ico-xl { width: 46px; height: 46px; }
.ico-card { width: 40px; height: 40px; }
.ico-h { width: 1.2em; height: 1.2em; margin-right: 8px; vertical-align: -0.22em; }
.ico-opt { width: 22px; height: 22px; margin-right: 6px; vertical-align: -6px; }
.ico-flip { transform: scaleX(-1); }
.ico-search { width: 30px; height: 30px; align-self: center; }
.btn { gap: 10px; }
.btn-big { padding: 13px 22px 13px 16px; font-size: 1.04rem; border-radius: 18px; }
.btn-big:hover .ico-btn, .done-toggle:hover .ico { transform: rotate(-8deg) scale(1.08); }
.ico-btn, .done-toggle .ico { transition: transform 0.2s ease; }
.nav a { display: inline-flex; align-items: center; gap: 6px; }
.nav .ico { width: 22px; height: 22px; }
@media (min-width: 901px) and (max-width: 1120px) { .nav a:not(.cta) .ico { display: none; } }
.card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
a.card .ico-card { transition: transform 0.2s ease; }
a.card:hover .ico-card { transform: rotate(-6deg) scale(1.08); }
.path-card .ico-card, a.card > .ico-card { display: block; margin-bottom: 6px; }
.lesson-nav a { display: flex; align-items: center; gap: 12px; }
.lesson-nav .next { justify-content: flex-end; }
.lesson-nav .ico { width: 26px; height: 26px; color: var(--court); }
.aside-cta { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--mallow-soft); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.aside-cta:hover { border-color: var(--mallow); color: var(--ink); }
.searchbar { align-items: center; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding-left: 12px; }
.searchbar:focus-within { border-color: var(--court); }
.searchbar input { border: 0; background: transparent; }
.searchbar input:focus { box-shadow: none; }
.fchip { display: inline-flex; align-items: center; }
.opt span { display: inline-flex; align-items: center; }
.plan-block .min .ico-card { display: block; margin: 0 auto 6px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- cute summary card ---------- */
.cute-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 14px; margin: 6px 0 18px; box-shadow: var(--shadow); }
.cute-fig { margin: 0; }
.scene { display: block; width: 100%; height: auto; }
.scene-bg { fill: var(--court-soft); }
.scene-floor { fill: var(--court-surface); opacity: 0.9; }
.scene-court { fill: var(--court-surface); }
.scene-label { font: 700 15px var(--font-body); fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 4px; }
.scene-zone { font: 700 18px var(--font-head); fill: #3b2b22; }
.cute-bubble { position: relative; background: var(--sun-soft); border-radius: 22px; padding: 16px 18px; }
.cute-bubble::before { content: ""; position: absolute; left: -12px; top: 42%; border: 12px solid transparent; border-right-color: var(--sun-soft); border-left: 0; }
.cute-name { margin: 0 0 4px; font-family: var(--font-head); font-weight: 600; color: var(--mallow); display: flex; align-items: center; gap: 8px; }
.cute-text { margin: 0 0 8px; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.cute-note { margin: 0; font-size: 0.82rem; color: var(--ink-3); }
@media (max-width: 720px) {
  .cute-card { grid-template-columns: 1fr; }
  .cute-bubble::before { left: 40px; top: -12px; border: 12px solid transparent; border-bottom-color: var(--sun-soft); border-top: 0; }
}
@media print { .cute-card { box-shadow: none; break-inside: avoid; } }

/* ---------- hot topics ---------- */
.hot-kicker { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.9rem; color: var(--lv3); background: var(--mallow-soft); border-radius: 999px; padding: 4px 12px 4px 8px; }
.hot-kicker .ico { width: 20px; height: 20px; }
.hot-zone { position: relative; overflow: hidden; padding: 56px 0 60px; background:
  radial-gradient(circle at 8% 0%, var(--sun-soft), transparent 45%),
  radial-gradient(circle at 95% 100%, var(--court-soft), transparent 50%),
  var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hot-zone::before { content: ""; position: absolute; width: 900px; height: 900px; right: -380px; top: -620px; border: 6px dashed var(--mallow); border-radius: 50%; opacity: 0.16; pointer-events: none; }
.hot-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; position: relative; }
.hot-head h2 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin: 10px 0 4px; line-height: 1.1; border: 0; }
.hot-head p { margin: 0; color: var(--ink-2); font-size: 1.1rem; }
.hot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; position: relative; }
.hot-grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hot-feature { grid-column: span 2; grid-row: span 2; }
@media (max-width: 980px) { .hot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hot-feature { grid-row: auto; } }
@media (max-width: 620px) { .hot-grid { grid-template-columns: 1fr; } .hot-feature { grid-column: auto; } }
.hot-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.hot-card:hover { transform: translateY(-4px) rotate(-0.3deg); border-color: var(--mallow); color: var(--ink); box-shadow: 0 2px 4px rgba(59, 43, 34, 0.08), 0 18px 40px rgba(59, 43, 34, 0.14); }
.hot-art { display: block; background: var(--court-soft); }
.hot-art .scene { display: block; }
.hot-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 18px; flex: 1; }
.hot-q { font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; line-height: 1.3; }
.hot-feature .hot-q { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.hot-feature .hot-hook { font-size: 1.1rem; }
.hot-feature .hot-body { padding: 20px 26px 24px; gap: 10px; }
.hot-hook { color: var(--ink-2); font-size: 0.97rem; }
.hot-quick { display: grid; gap: 10px; margin: 10px 0 4px; }
.hot-quick-i { display: flex; align-items: center; gap: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; font-weight: 600; font-size: 1.05rem; }
.hot-quick-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--mallow); color: var(--on-accent); font-family: var(--font-head); font-size: 1.1rem; }
.hot-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: auto; padding-top: 6px; }
.hot-go { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--lv3); }
.hot-go .ico { width: 20px; height: 20px; transition: transform 0.2s ease; }
.hot-card:hover .hot-go .ico { transform: translateX(4px); }
.hot-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; position: relative; }
.hot-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px 8px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.hot-chips a:hover { border-color: var(--mallow); color: var(--ink); }
.hot-chips .ico { width: 20px; height: 20px; }
.lesson-card.is-hot { border-color: var(--mallow); }
.hot-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 30px; align-items: center; padding: 8px 0 18px; }
.hot-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 12px 0 8px; }
.hot-hero-art { margin: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); background: var(--court-soft); }
@media (max-width: 820px) { .hot-hero { grid-template-columns: 1fr; } .hot-hero-art { order: -1; } }
.answer { background: var(--sun-soft); border-radius: 26px; padding: 20px 26px; font-size: 1.12rem; margin: 10px 0 8px; }
.answer h2 { margin: 0 0 8px; border: 0; display: flex; align-items: center; gap: 10px; font-size: 1.4rem; }
.answer p { margin: 0; }
.tips { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.tip { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px 16px 70px; margin: 0; box-shadow: var(--shadow); }
.tip-n { position: absolute; left: 16px; top: 10px; font-family: var(--font-head); font-size: 2.6rem; line-height: 1; color: var(--mallow); }
.tip h3 { margin: 0 0 4px; font-size: 1.08rem; }
.tip p { margin: 0; font-size: 0.97rem; }
.mission { display: flex; gap: 18px; align-items: flex-start; background: var(--court-soft); border: 2px dashed var(--court); border-radius: 26px; padding: 22px 24px; margin: 26px 0; }
.mission h3 { margin: 2px 0 6px; font-size: 1.3rem; }
.mission-k { margin: 0; font-weight: 800; color: var(--court-deep); letter-spacing: 0.04em; }
@media (max-width: 560px) { .mission { flex-direction: column; } }

/* ---------- utilities ---------- */
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }
.tag-rule { color: var(--rule); }
.ed-tag { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0 8px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); border: 1px dashed currentColor; white-space: normal; }
.kbd { font-family: ui-monospace, monospace; font-size: 0.85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .lesson-aside, .toc-mobile, .anim-controls, .anim-legend, .no-print, .lesson-nav { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .card, .anim, .figure, .plan-block, .keypoint, .mistake { box-shadow: none; break-inside: avoid; }
  a { color: #000; }
}

/* ---------- วิดีโอประกอบ (ลิงก์ออกไป YouTube) ---------- */
.vcite { display: inline-flex; align-items: center; gap: 3px; font-size: 0.78rem; font-weight: 600; padding: 0 7px; margin: 0 2px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); text-decoration: none; vertical-align: 0.1em; white-space: nowrap; }
.vcite .ico { width: 0.9em; height: 0.9em; }
.vcite:hover { text-decoration: underline; }
.vcards { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.vcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; }
.vcard-main { display: flex; gap: 10px; align-items: flex-start; color: inherit; text-decoration: none; }
.vcard-main:hover .vcard-title { text-decoration: underline; }
.vcard-play { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--shot-smash); color: #fff; }
.vcard-play .ico { width: 16px; height: 16px; }
.vcard-title { display: block; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.vcard-meta { display: block; font-size: 0.8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.vcard-what { margin: 8px 0 4px; font-size: 0.92rem; }
.vcard-stamps { margin: 0; padding-left: 0; list-style: none; font-size: 0.85rem; }
.vcard-stamps li { margin: 2px 0; }
.vcard-stamps a { font-variant-numeric: tabular-nums; font-weight: 700; }
.vcard-tags { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.vcard-tags:empty { display: none; }
.vcard-warn { margin: 6px 0 0; font-size: 0.85rem; color: var(--shot-smash); }
.vmore { margin: 10px 0; }
.vmore > summary { cursor: pointer; font-weight: 600; }

/* ---------- ร้าน Mallow Mai (กล่องติดป้าย “ร้านของคนทำเว็บ”) ---------- */
.shop-card { position: relative; margin: 40px 0 8px; padding: 22px 20px 18px; border: 1.5px dashed var(--mallow); border-radius: var(--radius); background: var(--mallow-soft); }
.shop-tag { position: absolute; top: -12px; left: 18px; padding: 2px 10px; border-radius: 999px; background: var(--mallow); color: var(--on-primary); font-size: 0.8rem; font-weight: 600; }
.shop-body { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: start; }
.shop-logo { width: 112px; height: 112px; border-radius: 50%; box-shadow: var(--shadow); }
.shop-card h2 { margin: 0 0 6px; font-size: 1.25rem; }
.shop-card p { margin: 0 0 10px; }
.shop-courts { font-size: 0.92rem; }
.shop-court { display: inline-flex; align-items: center; gap: 4px; margin: 2px 6px 2px 0; padding: 2px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.shop-court .ico { width: 14px; height: 14px; }
.shop-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.shop-foot a { color: inherit; }
.plan-done { margin: 24px 0; text-align: center; }
.plan-done .shop-card { text-align: left; }
.mascot-done { width: min(180px, 50vw); margin: 0 auto; }
.plan-done-msg { font-size: 1.1rem; }
@media (max-width: 560px) {
  .shop-body { grid-template-columns: minmax(0, 1fr); }
  .shop-logo { width: 88px; height: 88px; }
  .shop-court { white-space: normal; }
}
@media print { .shop-card, .plan-done { display: none !important; } }
a.shop-court { color: inherit; text-decoration: none; }
a.shop-court:hover { border-color: var(--mallow); text-decoration: underline; }
.shop-photos { list-style: none; margin: 6px -4px 12px; padding: 10px 4px 12px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.polaroid { flex: 0 0 128px; scroll-snap-align: start; margin: 0; padding: 7px 7px 9px; background: #fffdf8; border-radius: 6px; box-shadow: 0 2px 4px rgba(59, 43, 34, .12), 0 8px 18px rgba(59, 43, 34, .12); transform: rotate(-2deg); transition: transform .2s ease; }
.polaroid:nth-child(even) { transform: rotate(1.6deg) translateY(4px); }
.polaroid:nth-child(3n) { transform: rotate(-.6deg); }
.polaroid:hover { transform: rotate(0) translateY(-3px); }
.polaroid img { display: block; width: 114px; height: 114px; object-fit: cover; border-radius: 3px; background: #f1e7d8; }
.polaroid span { display: block; margin-top: 6px; font-family: var(--font-head); font-size: 0.86rem; line-height: 1.25; text-align: center; color: #3b2b22; }
.polaroid small { display: block; font-size: 0.68rem; font-weight: 400; color: #8a6a52; }
.shop-body > div { min-width: 0; }

/* ---------- ร้านบนหน้าแรก (เบนโต) ---------- */
.shop-zone { padding-top: 8px; }
.shop-show { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: center; padding: 34px 32px 30px; border-radius: 28px; background:
  radial-gradient(circle at 12% 18%, rgba(255,255,255,.55) 0 2px, transparent 3px) 0 0 / 26px 26px,
  linear-gradient(140deg, #f3e6d3 0%, #ead7bd 55%, #e2cba9 100%); color: #3b2b22; overflow: clip; overflow-clip-margin: 0; }
.shop-show::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(169, 104, 43, .12); pointer-events: none; }
.shop-show a:not(.btn) { color: inherit; }
.shop-tag-inline { position: static; display: inline-block; margin-bottom: 12px; }
.shop-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
.shop-brand small { display: block; font-size: .78rem; font-weight: 500; opacity: .75; }
.shop-brand .shop-logo { width: 72px; height: 72px; }
.shop-show h2 { margin: 6px 0 10px; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.2; }
.shop-show h2 .hl { color: #8a4f1c; }
.shop-show p { margin: 0 0 14px; }
.shop-cats { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.shop-cats li { margin: 0; padding: 5px 12px; border-radius: 999px; background: rgba(255, 253, 248, .75); font-size: .9rem; }
.shop-show .btn-ghost { background: rgba(255, 253, 248, .7); color: #3b2b22; border-color: rgba(59, 43, 34, .2); }
.shop-show .shop-court { background: rgba(255, 253, 248, .75); border-color: rgba(59, 43, 34, .15); color: #3b2b22; }
.shop-bento { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bento-tile { position: relative; margin: 0; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #f1e7d8; box-shadow: 0 6px 18px rgba(59, 43, 34, .16); transition: transform .25s ease, box-shadow .25s ease; }
.bento-tile:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 12px 26px rgba(59, 43, 34, .22); }
.bento-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.bento-tile:hover img { transform: scale(1.05); }
.bento-tile figcaption { position: absolute; left: 8px; bottom: 8px; right: 8px; width: fit-content; max-width: calc(100% - 16px); padding: 3px 10px; border-radius: 999px; background: rgba(255, 253, 248, .92); color: #3b2b22; font-family: var(--font-head); font-size: .78rem; line-height: 1.3; }
.cap-short { display: none; }
.bento-big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.bento-big img { position: absolute; inset: 0; }
.bento-big figcaption { font-size: .95rem; padding: 5px 14px; left: 12px; bottom: 12px; }
.bento-sticker { position: absolute; top: 14px; left: 14px; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: var(--blush); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: .95rem; line-height: 1.05; text-align: center; transform: rotate(-12deg); box-shadow: 0 4px 10px rgba(0, 0, 0, .15); border: 3px dashed rgba(255, 255, 255, .8); }
.bento-mascot { position: absolute; z-index: 2; top: -58px; right: -6px; width: 104px; pointer-events: none; }
.bento-mascot .mascot { width: 100%; }
.shop-marquee { margin-top: 18px; overflow: hidden; border-radius: 999px; background: #3b2b22; color: #f7f1e7; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.shop-marquee-track { display: flex; width: max-content; gap: 18px; padding: 10px 0; font-family: var(--font-head); font-size: .95rem; white-space: nowrap; animation: shop-marquee 60s linear infinite; }
.shop-marquee-track i { font-style: normal; color: var(--sun); }
@keyframes shop-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .shop-marquee-track { animation: none; } .bento-tile, .bento-tile img, .polaroid { transition: none; } }
@media (max-width: 900px) {
  .shop-show { grid-template-columns: minmax(0, 1fr); padding: 26px 18px 22px; gap: 26px; }
  .shop-bento { margin-top: 40px; }
}
@media (max-width: 480px) {
  .shop-bento { gap: 8px; }
  .bento-tile { border-radius: 14px; }
  .bento-tile figcaption { font-size: .68rem; padding: 2px 7px; left: 5px; bottom: 5px; }
  .bento-sticker { width: 58px; height: 58px; font-size: .8rem; }
  .bento-mascot { width: 84px; top: -48px; }
  .bento-tile:not(.bento-big) .cap-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bento-tile:not(.bento-big) .cap-short { display: inline; }
}
