/* ===== KillPhys Tutor — Design System ===== */
@font-face {
  font-family: "Pinfist";
  src: url("assets/Pinfist-Regular.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  /* Safe areas (env on real devices; overridable for previews via ?safe=1) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Brand colors */
  --c-red: #E63946;
  --c-pink: #E0739D;
  --c-blue: #2E5BAA;
  --c-red-soft: #F5859A;
  --c-blue-soft: #6B8FCF;

  /* Pastels */
  --bg-cream: #FFF8F2;
  --bg-blush: #FDEEF1;
  --bg-rose: #FCE4EC;
  --bg-sky: #E8EFFA;
  --bg-mint: #EEF5F0;
  --bg-paper: #FBF7F2;

  /* Ink */
  --ink: #1F1F35;
  --ink-2: #4A4A66;
  --ink-3: #8a8aa3;
  --line: #1F1F35;

  /* Type */
  --font-display: "Pinfist", "Mitr", "Bai Jamjuree", system-ui, sans-serif;
  --font-display-th: "Pinfist", "Mitr", system-ui, sans-serif;
  --font-body: "Pinfist", "IBM Plex Sans Thai", "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Radii */
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body, #root { height: 100%; width: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-cream);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== Stage / 2D snap grid ===== */
.stage {
  position: fixed; inset: 0;
  overflow: hidden;
  background: var(--bg-cream);
}
.rows-wrap {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; flex-direction: column;
  transition: transform 480ms cubic-bezier(.7,.02,.2,1);
  will-change: transform;
}
.row-track {
  width: 100vw; height: 100vh; height: 100dvh;
  display: flex; flex-direction: row;
  flex-shrink: 0;
  transition: transform 480ms cubic-bezier(.7,.02,.2,1);
  will-change: transform;
}
.page {
  width: 100vw; height: 100vh; height: 100dvh;
  flex-shrink: 0;
  position: relative;
  display: flex; flex-direction: column;
  padding: calc(84px + var(--safe-top)) calc(24px + var(--safe-right)) calc(64px + var(--safe-bottom)) calc(24px + var(--safe-left));
  overflow: hidden;
}
/* หน้ารองไม่มีปุ่มสามเหลี่ยม — คืนพื้นที่ล่างให้เนื้อหา (เหลือที่ให้แถบติดต่อ) */
.page-sub { padding-bottom: calc(44px + var(--safe-bottom)); }

/* กดข้ามหน้า: ไม่ไถลผ่านหน้ากลาง แล้วให้หน้าปลายทางสไลด์เข้ามาจากขวา */
@keyframes kp-slide-in-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.page.slide-in {
  animation: kp-slide-in-right 340ms cubic-bezier(.7,.02,.2,1);
  z-index: 3;
}
@media (prefers-reduced-motion: reduce) {
  .page.slide-in { animation: none; }
}
.page-inner {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  justify-content: safe center;
  width: 100%; max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
/* Home centers via its own margin:auto stack */
.home-inner { justify-content: stretch; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex; align-items: center;
  gap: 14px;
  padding: calc(14px + var(--safe-top)) calc(20px + var(--safe-right)) 14px calc(20px + var(--safe-left));
  background: rgba(255, 248, 242, 0.78);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid rgba(31,31,53,0.06);
}
.header .mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.header .mark img { width: 100%; height: 100%; object-fit: contain; }
.header .brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.header .brand-name .red { color: var(--c-red); }
.header .brand-name .blue { color: var(--c-blue); }
.header .brand-name small {
  display: block; font-family: var(--font-body);
  font-size: 11px; font-weight: 400;
  color: var(--ink-3); margin-top: 2px;
  letter-spacing: 0;
}
.header .index {
  margin-left: auto;
  display: flex; gap: 6px;
  align-items: center;
}
.header .index .pill {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  padding: 4px;
  border-radius: 11px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .22s cubic-bezier(.5,0,.2,1), color .22s, padding .22s cubic-bezier(.5,0,.2,1);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.header .index .pill .pill-txt { display: none; padding-right: 4px; letter-spacing: .01em; }
.header .index .pill .cat-ico { display: inline-grid; place-items: center; }
.header .index .pill .cat-ico svg { width: 21px; height: 21px; display: block; }
.header .index .pill:hover { color: var(--ink); }
/* Active category: expand slightly and swap the icon for the full word */
.header .index .pill.active {
  background: var(--c-blue);
  color: #fff;
  padding: 5px 8px;
}
.header .index .pill.active .cat-ico { display: none; }
.header .index .pill.active .pill-txt { display: inline-block; }
.header .index .pill.dot-only { display: none; }
.hdr-contact {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display-th);
  font-weight: 500; font-size: 13px;
  padding: 8px 15px;
  border-radius: 10px;
  border: 1.5px solid var(--c-red);
  background: var(--c-red);
  color: white;
  cursor: pointer;
  min-height: 38px;
  transition: transform .15s, box-shadow .15s;
}
.hdr-contact:hover { transform: translateY(-1px); box-shadow: 2px 2px 0 var(--ink); }
@media (max-width: 640px) {
  .hdr-contact { padding: 8px; min-width: 40px; justify-content: center; }
  .hdr-contact .hc-label { display: none; }
}

/* ===== Emo badge — hand-drawn outline mark with a letter inside ===== */
.emo {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border: 2px solid currentColor;
  /* uneven radii + tiny tilt read as a sketched, on-theme mark */
  border-radius: 10px 8px 11px 7px / 8px 11px 7px 10px;
  transform: rotate(-2deg);
  font-family: var(--font-display);
  font-weight: 700; font-size: 12px; line-height: 1;
  flex-shrink: 0;
  transition: border-color .2s, transform .2s;
}
.emo::first-letter { text-transform: uppercase; }

/* ===== Nav edge hints — faint flat elongated triangle with ghost text over it ===== */
.nav-btn {
  position: fixed;
  z-index: 28;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  cursor: pointer;
  --tri: rgba(31,31,53,0.09);
  --ghost: rgba(31,31,53,0.30);
  transition: none;
}
.nav-btn:hover { --tri: rgba(31,31,53,0.16); --ghost: rgba(31,31,53,0.52); }

/* Flat elongated wedge — a 0x0 box whose borders draw the triangle */
.nav-btn .tri { position: absolute; top: 0; left: 0; width: 0; height: 0; }
.nav-btn .tri-up    { border-left: 100px solid transparent; border-right: 100px solid transparent; border-bottom: 30px solid var(--tri); }
.nav-btn .tri-down  { border-left: 100px solid transparent; border-right: 100px solid transparent; border-top: 30px solid var(--tri); }

/* Ghost text of the destination page, faint, laid over the wedge */
.nav-btn .nav-ghost {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 600; font-size: 12px; letter-spacing: .06em;
  color: var(--ghost);
  white-space: nowrap; pointer-events: none;
  transition: color .15s;
}

.nav-top    { width: 200px; height: 30px; top: calc(80px + var(--safe-top)); left: 50%; margin-left: -100px; }
.nav-bottom { width: 200px; height: 30px; bottom: calc(46px + var(--safe-bottom)); left: 50%; margin-left: -100px; }
.nav-btn:active { filter: brightness(0.9); }

/* ===== Typography ===== */
.eyebrow {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--c-pink);
}
h1.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h2.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.01em;
}
h3.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.1;
}
.lead {
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--ink-2);
  max-width: 60ch;
  line-height: 1.6;
}

/* ===== Generic cards ===== */
.card {
  background: white;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  padding: 20px 22px;
  box-shadow: 5px 5px 0 var(--ink);
}
.card.tinted-blue { background: var(--bg-sky); }
.card.tinted-pink { background: var(--bg-rose); }
.card.tinted-blush { background: var(--bg-blush); }
.card.tinted-cream { background: var(--bg-cream); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: white;
  border: 1.5px solid var(--ink);
  font-family: var(--font-display);
  font-size: 12px; font-weight: 500;
}
.chip.red { background: var(--c-red); color: white; border-color: var(--c-red); }
.chip.pink { background: var(--c-pink); color: white; border-color: var(--c-pink); }
.chip.blue { background: var(--c-blue); color: white; border-color: var(--c-blue); }
.chip.outline-red { color: var(--c-red); border-color: var(--c-red); }
.chip.outline-blue { color: var(--c-blue); border-color: var(--c-blue); }

/* Bullets */
ul.bullets { list-style: none; padding: 0; display: grid; gap: 10px; }
ul.bullets li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 15px;
  line-height: 1.5;
}
ul.bullets li::before {
  content: ""; flex-shrink: 0;
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--c-pink);
  margin-top: 8px;
  transform: rotate(45deg);
}
ul.bullets.red li::before { background: var(--c-red); }
ul.bullets.blue li::before { background: var(--c-blue); }

/* Price card */
.price-table {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  overflow: hidden;
  background: white;
}
.price-table .ph {
  background: var(--ink); color: white;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  padding: 10px 16px;
  letter-spacing: 0.04em;
}
.price-table .pr {
  padding: 12px 16px;
  border-top: 1.5px solid var(--ink);
  display: flex; align-items: center;
  font-family: var(--font-display);
  font-size: 16px;
}
.price-table .pr.amt { justify-content: flex-end; font-weight: 600; color: var(--c-red); }
.price-table .pr:nth-of-type(2) { border-top: none; }

/* Subject swatch (decorative placeholder for imagery) */
.swatch {
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  background:
    repeating-linear-gradient(135deg, rgba(31,31,53,0.06) 0 8px, transparent 8px 16px),
    var(--bg-blush);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  text-align: center;
  padding: 12px;
  min-height: 120px;
}
.swatch.sky { background: repeating-linear-gradient(135deg, rgba(46,91,170,0.08) 0 8px, transparent 8px 16px), var(--bg-sky); }
.swatch.rose { background: repeating-linear-gradient(135deg, rgba(230,57,70,0.08) 0 8px, transparent 8px 16px), var(--bg-rose); }
.swatch.cream { background: repeating-linear-gradient(135deg, rgba(31,31,53,0.05) 0 8px, transparent 8px 16px), var(--bg-cream); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: white;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn.primary { background: var(--c-red); color: white; }
.btn.blue { background: var(--c-blue); color: white; }
.btn.pink { background: var(--c-pink); color: white; }

/* Grid helpers */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Page tint variations */
.page.tint-cream { background: var(--bg-cream); }
.page.tint-blush { background: var(--bg-blush); }
.page.tint-sky { background: var(--bg-sky); }
.page.tint-rose { background: var(--bg-rose); }
.page.tint-paper { background: var(--bg-paper); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .header .index .pill { padding: 6px 10px; font-size: 12px; }
  .header .brand-name small { display: none; }
}
@media (max-width: 640px) {
  .page { padding: calc(76px + var(--safe-top)) calc(16px + var(--safe-right)) calc(60px + var(--safe-bottom)) calc(16px + var(--safe-left)); }
  .page-sub { padding-bottom: calc(42px + var(--safe-bottom)); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .header { padding-top: calc(10px + var(--safe-top)); padding-bottom: 10px; padding-left: calc(14px + var(--safe-left)); padding-right: calc(14px + var(--safe-right)); gap: 10px; }
  .header .mark { width: 32px; height: 32px; }
  .header .brand-name { font-size: 15px; }
  .header .index { gap: 3px; }
  .header .index .pill { padding: 5px; }
  .header .index .pill.active { padding: 5px 7px; font-size: 12.5px; }
  .header .index .pill .cat-ico svg { width: 20px; height: 20px; }
  .nav-top { top: calc(78px + var(--safe-top)); }
  .nav-bottom { bottom: calc(44px + var(--safe-bottom)); }
  h1.display { font-size: clamp(36px, 11vw, 64px); }
  h2.display { font-size: clamp(24px, 8vw, 40px); }
}

/* Very small phones (iPhone SE, older/compact Android) */
@media (max-width: 380px) {
  .header { gap: 8px; }
  .header .brand-name { font-size: 13px; }
  .header .mark { width: 28px; height: 28px; }
  h1.display { font-size: clamp(30px, 11vw, 52px); }
  .lead { font-size: 14px; }
}

/* Home full-bleed logo */
.hero-logo {
  width: 100%;
  max-width: min(620px, 70vw);
  max-height: 20vh;
  object-fit: contain;
  filter: drop-shadow(0 4px 0 rgba(31,31,53,0.06));
}

/* Tutor avatar */
.avatar {
  width: 140px; height: 140px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background:
    radial-gradient(circle at 40% 35%, rgba(255,255,255,0.6), transparent 60%),
    var(--c-pink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 48px;
  color: white;
  box-shadow: 5px 5px 0 var(--ink);
  flex-shrink: 0;
}
.avatar.blue { background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.5), transparent 60%), var(--c-blue); }
.avatar.red { background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.5), transparent 60%), var(--c-red); }
.avatar.pink { background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.5), transparent 60%), var(--c-pink); }
.avatar.cream { background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.6), transparent 60%), #C8A878; }
.avatar.mini {
  width: 34px; height: 34px; font-size: 16px;
  border-width: 2px; box-shadow: 2px 2px 0 var(--ink);
}

/* Tutor detail: LINE profile photo replaces the letter avatar */
.tutor-portrait {
  width: clamp(96px, 15vw, 168px);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  background: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.tutor-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Tutor detail — everything on one screen, no accordions */
.tutor-page .section-head { padding-bottom: 10px; margin-bottom: 12px; }
.tutor-page .td-body { gap: clamp(10px, 1.6vh, 16px); }
.tutor-page .line-frame { gap: clamp(8px, 1.2vw, 12px); padding: clamp(7px, 1vh, 10px) clamp(9px, 1.2vw, 12px); }
.tutor-page .td-facts { gap: 4px; }
.tutor-page .td-facts-line { line-height: 1.4; }
.tutor-detail { display: block; }
.td-body { display: flex; flex-direction: column; gap: clamp(12px, 2.4vh, 20px); min-width: 0; width: 100%; }
.td-sec { display: flex; flex-direction: column; gap: 8px; }
.td-h {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(13px, 1.6vw, 15px); color: var(--ink-3);
  letter-spacing: .04em; margin: 0;
}
.td-courses { display: flex; flex-wrap: wrap; gap: 8px; }
.course-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display-th); font-weight: 500;
  font-size: clamp(13px, 1.6vw, 15px);
  padding: 8px 14px; border-radius: 12px;
  border: 2px solid var(--ink); background: #fff; color: var(--ink);
}
.course-chip.link { cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.course-chip.link:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); background: var(--bg-blush); }
.course-chip.link:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.course-chip .cc-arr { color: var(--c-red); font-weight: 700; }
/* คอร์สที่สอน — แถวละระดับชั้น: ป้ายสีซ้าย + ปุ่มคอร์ส (สไตล์เดียวกับหน้าเลือกคอร์ส ไม่มีเงา) */
.td-course-rows {
  display: flex; flex-direction: column;
  border: 2px solid var(--ink); border-radius: 14px;
  background: #fff; box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
}
.td-crow { display: flex; align-items: stretch; }
.td-crow + .td-crow { border-top: 2px solid var(--ink); }
.td-crow-lab {
  flex: 0 0 clamp(62px, 12vw, 88px);
  display: flex; align-items: center; justify-content: center;
  padding: 4px 6px; border-right: 2px solid var(--ink);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(12px, 1.4vw, 14.5px); line-height: 1.2;
  color: #fff; text-align: center;
}
.td-crow-list {
  flex: 1; min-width: 0;
  display: flex; flex-wrap: wrap; align-content: center; gap: 6px;
  padding: clamp(6px, 1vh, 9px) clamp(7px, 1vw, 10px);
}
.td-course-rows .course-chip2 { font-size: clamp(12px, 1.4vw, 14px); padding: clamp(5px, .9vh, 8px) 10px; }
.td-course-rows .course-chip2.is-static { cursor: default; }
.td-course-rows .course-chip2.is-static:hover { transform: none; box-shadow: none; }

.td-contact { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.td-tel {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(16px, 2vw, 20px); color: var(--ink); text-decoration: none;
}
.td-tel svg { color: var(--c-red); flex-shrink: 0; }

/* ช่องทางติดต่อ (Line) — ป้ายตัวอักษรแนวตั้งซ้าย, รูปติวเตอร์ + QR ขวา, กรอบกว้างเท่าเนื้อหา */
.line-frame {
  display: flex; flex-direction: row; align-items: stretch;
  gap: clamp(8px, 1.4vw, 14px);
  align-self: center; width: fit-content; max-width: 100%;
  border: 2px solid var(--ink); border-radius: 16px;
  background: #fff; box-shadow: 5px 5px 0 var(--ink);
  padding: clamp(8px, 1.3vh, 12px) clamp(10px, 1.4vw, 14px);
}
/* หมุนกรอบข้อความ 90° ทวนเข็ม — อ่านจากล่างขึ้นบน */
.line-frame-head {
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-display-th); font-weight: 600;
  font-size: clamp(13px, 1.5vw, 15px); color: #fff;
  background: #06C755; border: 1.5px solid var(--ink); border-radius: 8px;
  padding: 12px 4px; line-height: 1.3; letter-spacing: .01em;
}
.line-frame-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(6px, 1vh, 10px); min-width: 0;
}
.line-frame-inner {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(10px, 2vw, 22px);
}
.line-photo {
  width: clamp(88px, 12vh, 124px); aspect-ratio: 1;
  overflow: hidden; flex-shrink: 0;
}
.line-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.line-qr {
  width: clamp(88px, 12vh, 124px); aspect-ratio: 1;
  object-fit: contain; display: block;
  border: 2px solid var(--ink); border-radius: 0; background: #fff;
  flex-shrink: 0;
}
.line-id-val {
  width: 100%; text-align: center;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(14px, 1.9vw, 19px);
  color: var(--ink-2); letter-spacing: .01em;
}
.line-id-val b { color: #06B04C; font-weight: 700; }

/* เบอร์ติดต่อ — กรอบยาวเต็มกว้าง */
.big-tel {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  text-decoration: none;
  border: 2px solid var(--ink); border-radius: 14px;
  background: var(--bg-blush); box-shadow: 5px 5px 0 var(--ink);
  padding: clamp(12px, 2vh, 18px) clamp(16px, 2.4vw, 26px);
  transition: transform .12s, box-shadow .12s;
}
.big-tel:active { transform: translate(2px,2px); box-shadow: none; }
.big-tel-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(13px, 1.6vw, 15px); color: var(--ink-3); letter-spacing: .04em;
}
.big-tel-label svg { color: var(--c-red); }
.big-tel-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 4.8vw, 42px); line-height: 1;
  letter-spacing: -0.01em; color: var(--ink);
}

.td-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2.4vw, 24px); }
.td-list { gap: 6px; }
.td-list li { font-size: clamp(12.5px, 1.5vw, 14px); }
/* การศึกษา & ผลงาน — ข้อมูลรอง อ่านต่อเนื่องเป็นบรรทัดเดียว คั่นด้วยจุด */
.td-facts { gap: 4px; opacity: .78; }
.td-facts-line {
  margin: 0;
  font-size: clamp(11.5px, 1.35vw, 13px);
  line-height: 1.55; color: var(--ink-3);
}
.td-facts-line .td-dot { margin: 0 6px; color: var(--c-pink); font-weight: 700; }

@media (max-width: 640px) {
  .tutor-detail { grid-template-columns: 1fr; gap: 14px; justify-items: center; }
  .td-body { width: 100%; }
  .tutor-portrait { width: clamp(84px, 26vw, 120px); border-width: 2px; box-shadow: 3px 3px 0 var(--ink); }
  .td-grid { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-height: 700px) {
  .tutor-portrait { width: clamp(80px, 12vh, 120px); }
}

/* Tutor hub: cards = circle profile photo (left) + name/QR/phone (right) */
.tutors-blocks { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.tutor-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform .15s, box-shadow .15s;
}
.tutor-card:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.tutor-card:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.avatar.tutor-face {
  width: 58px; height: 58px; font-size: 22px;
  border-width: 2px; box-shadow: 2px 2px 0 var(--ink);
  overflow: hidden; flex-shrink: 0;
}
.avatar.tutor-face img { width: 100%; height: 100%; object-fit: cover; }
.tutor-card .tc-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
}
.tutor-card .tc-tname {
  font-family: var(--font-display-th); font-weight: 600; font-size: 16px; line-height: 1.15;
}
.tutor-card .tc-edu {
  font-family: var(--font-display); font-size: 11.5px; color: var(--ink-3); line-height: 1.25;
}
.lp-bio { font-size: 14px; line-height: 1.6; margin: 0; color: var(--ink-2); }

/* LINE profile photo + QR slots in the tutor expand panel (scaffold) */
.tutor-line { display: flex; gap: 12px; flex-wrap: wrap; }
.tutor-line .line-col { display: flex; flex-direction: column; gap: 4px; }
.tutor-line .line-cap {
  font-family: var(--font-display); font-weight: 500;
  font-size: 11px; color: var(--ink-3);
}
.tutor-line .line-slot {
  width: 82px; height: 82px; flex-shrink: 0;
  border: 2px dashed var(--ink-3);
  border-radius: 12px;
  background: var(--bg-cream);
  display: grid; place-items: center;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 10px; color: var(--ink-3); text-align: center;
}
.tutor-line .line-slot img { width: 100%; height: 100%; object-fit: cover; }
.tutor-line .line-slot.qr { background: #fff; }
.tutor-line .line-slot.qr img { object-fit: contain; padding: 3px; }
@media (max-height: 640px) {
  .tutor-line .line-slot { width: 64px; height: 64px; }
}
/* LINE id lines */
.tutor-lineid { font-family: var(--font-display); font-size: 14px; color: var(--ink-2); }
.tutor-lineid b { color: var(--c-blue); }
.tc-line-id {
  font-family: var(--font-display); font-weight: 600;
  font-size: 12px; color: var(--c-blue);
}
@media (max-width: 640px) {
  .tutors-blocks { grid-template-columns: repeat(2, 1fr); }
  .tutor-card { gap: 8px; padding: 9px; }
  .avatar.tutor-face { width: 46px; height: 46px; font-size: 17px; }
  .tutor-card .tc-tname { font-size: 14px; }
  .tutor-card .tc-edu { font-size: 10.5px; }
}

/* Stickers / decorative shapes */
.sticker {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 500;
  border: 2px solid var(--ink);
  background: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 3px 3px 0 var(--ink);
  z-index: 2;
}

/* QR placeholder */
.qr-box {
  width: 160px; height: 160px;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  background:
    linear-gradient(0deg, transparent 49.5%, var(--ink) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(90deg, transparent 49.5%, var(--ink) 49.5% 50.5%, transparent 50.5%),
    repeating-conic-gradient(var(--ink) 0% 25%, white 0% 50%) 50% / 24px 24px;
  display: grid; place-items: end center;
  padding-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-2);
}

/* Home layout: centered when it fits, scrolls when it doesn't */
.home-inner {
  justify-content: flex-start;
  align-items: stretch;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-bg {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.home-scroll {
  position: relative; z-index: 1;
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}
.home-stack {
  display: flex; flex-direction: column;
  gap: 14px;
  align-items: center;
  position: relative; z-index: 1;
  margin: auto;
  padding-bottom: 36px; /* clearance for the transparent bottom page-nav */
}
@media (max-height: 720px) {
  .hero-logo { max-height: 14vh; }
  .home-stack { gap: 8px; padding-bottom: 30px; }
  .home-stack .lead { font-size: 13.5px; }
  .home-blocks { grid-template-columns: repeat(2, minmax(120px, 150px)); gap: 10px; }
  .home-block { aspect-ratio: 2; font-size: 16px; }
  .home-block small { font-size: 10px; }
}
@media (max-height: 580px) {
  .hero-logo { max-height: 11vh; }
  .home-stack { gap: 6px; padding-bottom: 26px; }
  .home-block { aspect-ratio: 2.4; min-height: 52px; }
  .btn { padding: 9px 16px; font-size: 13px; }
}

/* Home 2x2 link blocks */
.home-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(125px, 165px));
  gap: 12px;
  justify-content: center;
  margin-top: 2px;
}
.home-block {
  aspect-ratio: 1.6;
  border: 2px solid var(--ink);
  border-radius: 14px;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
  background: white;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.home-block:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.home-block:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.home-block small {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.home-block.b-red { background: var(--c-red); color: #fff; }
.home-block.b-blue { background: var(--c-blue); color: #fff; }
.home-block.b-pink { background: var(--c-pink); color: #fff; }
.home-block.b-softblue { background: var(--c-blue-soft); color: #fff; }
.home-block.b-red small, .home-block.b-blue small,
.home-block.b-pink small, .home-block.b-softblue small { color: rgba(255,255,255,0.82); }
@media (max-width: 380px) {
  .home-blocks { grid-template-columns: repeat(2, 1fr); width: 100%; max-width: 320px; }
}
/* 4×1 in a single row when landscape (phone rotated) or wide screens (tablet/desktop) */
@media (orientation: landscape), (min-width: 700px) {
  .home-blocks { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; max-width: 780px; }
}
/* Short landscape phones: flatten blocks so the row still fits in one screen (no scroll) */
@media (orientation: landscape) and (max-height: 560px) {
  .home-block { aspect-ratio: auto; min-height: 0; height: clamp(56px, 24vh, 100px); }
  .home-block small { font-size: 10px; }
}

/* Courses hub: level blocks + expanding panel */
.level-blocks {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}
.level-blocks .home-block { aspect-ratio: auto; min-height: 76px; width: 100%; }
.level-blocks .home-block.active { outline: 3px solid var(--ink); outline-offset: 2px; }
/* Course hub — every sub-course shown at once; tap = jump straight to that course */
.course-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.4vw, 16px);
}
.course-group {
  display: flex; flex-direction: column;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
}
.cg-head {
  font-family: var(--font-display);
  font-weight: 600; font-size: clamp(15px, 1.8vw, 18px);
  color: #fff; text-align: center;
  padding: clamp(8px, 1.4vh, 12px) 8px;
  border-bottom: 2px solid var(--ink);
}
.cg-list { display: flex; flex-direction: column; gap: 8px; padding: 10px; flex: 1; }
.course-chip2 {
  font-family: var(--font-display-th);
  font-weight: 500; font-size: clamp(13px, 1.5vw, 15px);
  color: var(--ink); text-align: left; line-height: 1.2;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: clamp(8px, 1.3vh, 12px) 12px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.course-chip2:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.course-chip2:active { transform: translate(1px,1px); box-shadow: none; }

/* tones — header solid (like a button), chips a lighter shade of the same colour
   ใช้ร่วมกับป้ายซ้ายของ "คอร์สที่สอน" ในหน้าติวเตอร์ (.td-crow-lab) ให้สีตรงกันทุกหน้า */
.tone-pink     .cg-head, .tone-pink     .td-crow-lab { background: var(--c-pink); }
.tone-pink     .course-chip2 { background: var(--bg-rose); }
.tone-red      .cg-head, .tone-red      .td-crow-lab { background: var(--c-red); }
.tone-red      .course-chip2 { background: var(--bg-blush); }
.tone-blue     .cg-head, .tone-blue     .td-crow-lab { background: var(--c-blue); }
.tone-blue     .course-chip2 { background: var(--bg-sky); }
.tone-softblue .cg-head, .tone-softblue .td-crow-lab { background: var(--c-blue-soft); }
.tone-softblue .course-chip2 { background: #EAF0FA; }
.tone-plain    .cg-head, .tone-plain    .td-crow-lab { background: var(--ink-3); }
.tone-plain    .course-chip2 { background: #F2EFEA; }

@media (max-width: 900px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .level-blocks { grid-template-columns: repeat(2, 1fr); }
  .course-grid { gap: 9px; }
  .cg-list { padding: 8px; gap: 6px; }
}
@media (max-height: 700px) {
  .cg-head { padding: 7px; }
  .course-chip2 { padding: 7px 10px; }
}

/* Collapse / accordion section */
.collapse {
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: white;
  overflow: hidden;
}
.collapse + .collapse { margin-top: 10px; }
.collapse-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: transparent; border: none; cursor: pointer;
  padding: 14px 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  color: var(--ink); text-align: left;
}
.collapse.open .collapse-head { border-bottom: 2px solid rgba(31,31,53,0.12); }
.collapse-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.collapse-sub {
  font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.collapse-caret {
  flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--acc); color: #fff;
  font-size: 18px; font-weight: 700; line-height: 1;
}
.collapse-body {
  padding: 14px 16px;
  animation: panel-in .22s ease;
}
@media (max-height: 640px) {
  .collapse-head { padding: 10px 14px; font-size: 15px; }
  .collapse-body { padding: 12px 14px; }
}

/* Star deco */
.spark {
  position: absolute;
  width: 24px; height: 24px;
  pointer-events: none;
}
.spark.red { color: var(--c-red); }
.spark.blue { color: var(--c-blue); }
.spark.pink { color: var(--c-pink); }

/* Generic Section header pattern */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.section-head .title-block { display: flex; flex-direction: column; gap: 8px; }
.section-head .meta {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-3);
}

/* Scrollable inner for very tall content */
.scroll-y { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.scroll-y::-webkit-scrollbar { width: 6px; }
.scroll-y::-webkit-scrollbar-thumb { background: rgba(31,31,53,0.2); border-radius: 999px; }

/* Hide scroll on transitioning */
.is-transitioning .nav-btn { pointer-events: none; opacity: 0.7; }

/* Big number */
.big-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

/* Decorative blob */
.blob {
  position: absolute;
  border-radius: 50% 60% 55% 45% / 60% 50% 60% 50%;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

/* Inline highlight */
mark.hl {
  background: linear-gradient(transparent 55%, var(--bg-blush) 55%);
  color: inherit; padding: 0 2px;
}
mark.hl.blue { background: linear-gradient(transparent 55%, var(--bg-sky) 55%); }

/* Articles list item */
.article-row {
  display: flex; gap: 18px; align-items: center;
  padding: 14px 18px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.article-row:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.article-row .num {
  font-family: var(--font-display);
  font-weight: 600; font-size: 28px;
  color: var(--c-pink);
  width: 50px; flex-shrink: 0;
}
.article-row .meta-line {
  font-family: var(--font-display);
  font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.1em;
}

.article-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 58ch;
}
@media (max-height: 660px) {
  .article-body { font-size: 13.5px; line-height: 1.55; }
}

/* QnA accordion */
.qna-row {
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  background: white;
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--ink);
}
.qna-list { display: grid; gap: 10px; align-items: start; }
@media (min-width: 900px) {
  .qna-list { grid-template-columns: 1fr 1fr; gap: 12px; }
}
.qna-row summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
}
.qna-row summary::-webkit-details-marker { display: none; }
.qna-row summary::after {
  content: "+"; margin-left: auto;
  font-size: 28px; font-weight: 300; color: var(--c-red);
  line-height: 1;
}
.qna-row[open] summary::after { content: "−"; color: var(--c-blue); }
.qna-row .q-num {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--bg-rose);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--c-red);
  flex-shrink: 0;
}
.qna-row .ans {
  padding: 0 20px 18px 66px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

/* Hint bar - subtle swipe hint at first load */
.swipe-hint {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  background: var(--ink); color: white;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  display: flex; align-items: center; gap: 10px;
  animation: hint-pop .4s ease;
  pointer-events: none;
}
.swipe-hint.hide { opacity: 0; transition: opacity .4s; }
@keyframes hint-pop {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ===== No-scroll rule: compact everything on short viewports ===== */
@media (max-height: 660px) {
  .section-head { padding-bottom: 10px; margin-bottom: 12px; }
  h2.display { font-size: clamp(22px, 3.5vw, 34px); }
  h3.display { font-size: clamp(17px, 2.2vw, 22px); }
  .lead { font-size: 14px; line-height: 1.5; }
  .swatch { display: none; }
  .card { padding: 13px 15px; }
  .grid { gap: 12px; }
  ul.bullets { gap: 6px; }
  ul.bullets li { font-size: 13.5px; }
  .price-table .ph { padding: 7px 12px; font-size: 12px; }
  .price-table .pr { padding: 8px 12px; font-size: 14px; }
  .avatar { width: 96px; height: 96px; font-size: 34px; }
  .hub-avatar { width: 60px !important; height: 60px !important; font-size: 24px !important; }
  .qna-row summary { padding: 10px 14px; font-size: 14px; gap: 10px; }
  .qna-row .q-num { width: 26px; height: 26px; font-size: 12px; }
  .qna-row .ans { padding: 0 14px 12px 50px; font-size: 13px; }
  .article-row { padding: 7px 12px; gap: 10px; }
  .article-row .num { font-size: 18px; width: 32px; }
  .article-row .meta-line { font-size: 10px; }
  .article-row > div > div:last-child { font-size: 15px !important; }
  .eyebrow { font-size: 11px; }
}
.swipe-hint { bottom: 120px; }

/* ===== Contact bottom sheet ===== */
.contact-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: white;
  border-top: 2px solid var(--ink);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 30px -12px rgba(31,31,53,0.28);
  transform: translateY(calc(100% - var(--bar-h)));
  transition: transform .42s cubic-bezier(.7,.02,.2,1);
  will-change: transform;
  --bar-h: calc(42px + var(--safe-bottom));
  display: flex; flex-direction: column;
  max-height: 88vh;
}
.contact-sheet.open { transform: translateY(0); }

.sheet-handle {
  height: var(--bar-h);
  flex-shrink: 0;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  gap: 10px;
  padding: 2px 20px calc(2px + var(--safe-bottom));
  position: relative;
  font-family: var(--font-display);
  touch-action: none;
}
.sheet-handle .grip {
  position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 4px; border-radius: 999px;
  background: rgba(31,31,53,0.22);
  flex-shrink: 0;
}
.sheet-handle .handle-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display-th);
  font-weight: 500; font-size: 14px;
  color: var(--ink);
}
.sheet-handle .handle-label svg { color: var(--c-red); }
.sheet-handle .handle-caret {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); font-size: 12px;
}

.sheet-body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 4px 20px calc(24px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 18px;
}
.sheet-body .sheet-title {
  font-family: var(--font-display-th);
  font-weight: 600; font-size: 22px;
  text-align: center;
  margin-top: 2px;
}

.contact-tutors {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tutor-contact {
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--bg-blush);
}
.tutor-contact:nth-child(2) { background: var(--bg-sky); }
.tutor-contact .tc-name {
  font-family: var(--font-display-th);
  font-weight: 600; font-size: 17px;
}
.tutor-contact .tc-qr {
  width: 100%; aspect-ratio: 1;
  max-width: 130px;
  border: 2px dashed var(--ink-3);
  border-radius: 12px;
  background: white;
  display: grid; place-items: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  padding: 8px;
  overflow: hidden;
}
.tutor-contact .tc-qr img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.tutor-contact .tc-tel {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 500; font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: white;
  width: 100%;
  justify-content: center;
}
.tutor-contact .tc-tel svg { color: var(--c-red); flex-shrink: 0; }
.tutor-contact .tc-role {
  font-size: 11px; color: var(--ink-3);
  font-family: var(--font-display-th);
}

.contact-map {
  flex-shrink: 0;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-sky);
}
.contact-map iframe {
  width: 100%; height: 240px; min-height: 180px; border: none; display: block;
}
.contact-map .map-cap {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-top: 2px solid var(--ink);
  font-family: var(--font-display-th);
  font-size: 13px;
  background: white;
}
.contact-map .map-cap svg { color: var(--c-pink); flex-shrink: 0; }

.sheet-scrim {
  position: fixed; inset: 0;
  z-index: 39;
  background: rgba(31,31,53,0.32);
  animation: scrim-in .3s ease;
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }

/* Desktop: sheet stays a bottom bar; expand shows a centered-ish panel */
@media (min-width: 900px) {
  .contact-sheet { --bar-h: calc(44px + var(--safe-bottom)); max-width: 560px; left: auto; right: 24px; border-radius: 22px 22px 0 0; }
  .contact-sheet.open { max-height: 86vh; }
}
@media (max-width: 400px) {
  .contact-tutors { gap: 10px; }
  .tutor-contact { padding: 10px; }
  .tutor-contact .tc-tel { font-size: 13px; padding: 7px 8px; }
}
