/* Teacher project. Served at /teacher.css by src/teacher_routes.php; bump TEACHER_ASSET_VERSION there after a change.
   Layout follows a landing page for a teacher: dark header and footer, one light accent colour, slab headings.
   Text on --accent is always dark (#222), never white. Light theme only. */
:root {
  color-scheme: light;
  --dark: #222222;
  --text: #1f1f1f;
  --muted: #555b62;
  --teal: #2d4649;
  --soft: #edf2f5;
  --card: #ffffff;
  --line: #dde4ea;
  --accent: #f2b91e;
  --accent-dark: #d9a20f;
  --line-green: #037f36;
  --danger: #b42318;
  --radius: 10px;
  --head: 'Roboto Slab', 'Noto Serif Thai', Georgia, serif;
  --body: 'Noto Sans Thai', 'Open Sans', system-ui, sans-serif;
}
[data-theme="sky"] { --accent: #5cb8e6; --accent-dark: #3ea5d9; }
[data-theme="mint"] { --accent: #4fc79f; --accent-dark: #36b08a; }
[data-theme="pink"] { --accent: #f39bb6; --accent-dark: #ee7fa1; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: #fff; color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.75; }
img { max-width: 100%; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; color: var(--dark); }
h1 { font-size: 64px; line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: 44px; line-height: 1.25; margin: 0 0 24px; }
h3 { font-size: 24px; line-height: 1.35; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.t-wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.t-center { text-align: center; }
.t-muted { color: var(--muted); font-size: 14px; margin: 4px 0; }
.t-hl { color: var(--accent); }
.t-label { font-family: var(--head); font-weight: 800; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; color: var(--teal); margin: 0 0 8px; }
.t-skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--accent); color: var(--dark); padding: 8px 16px; border-radius: var(--radius); font-weight: 700; }
.t-skip:focus { left: 8px; }

/* Buttons */
.t-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 26px; border-radius: 5px;
  border: 2px solid transparent; font: inherit; font-weight: 700; font-size: 16px; line-height: 1.3; text-decoration: none; cursor: pointer; background: none; transition: background .15s, color .15s; }
.t-btn.primary { background: var(--accent); color: var(--dark); }
.t-btn.primary:hover { background: var(--accent-dark); }
.t-btn.outline { border-color: #fff; color: #fff; }
.t-btn.outline:hover { background: #fff; color: var(--dark); }
.t-btn.dark { background: var(--dark); color: #fff; }
.t-btn.dark:hover { background: var(--teal); }
.t-btn.line { background: var(--line-green); color: #fff; }
.t-btn.line:hover { background: #026a2d; }
.t-btn.ghost { border-color: var(--dark); color: var(--dark); min-height: 40px; padding: 6px 16px; }
.t-btn.light { color: #fff; border-color: rgba(255,255,255,.5); min-height: 38px; padding: 4px 14px; font-size: 14px; }
.t-btn.danger { color: var(--danger); border-color: #f2c4bf; background: #fdf0ee; min-height: 40px; padding: 6px 16px; }
.t-btn.icon { min-height: 36px; min-width: 36px; padding: 0; border: 1px solid var(--line); color: var(--text); }
.t-btn:disabled { opacity: .35; cursor: default; }
.t-btn.full { width: 100%; }
.t-play { font-size: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--dark); display: inline-flex; align-items: center; justify-content: center; }
.t-btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .t-track:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Header */
.t-top { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 30; }
.t-top-in, .t-top > .t-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.t-logo, .t-name { color: #fff; font-family: var(--head); font-weight: 700; font-size: 22px; text-decoration: none; overflow-wrap: anywhere; }
.t-nav { display: flex; align-items: center; gap: 28px; }
.t-nav a:not(.t-social) { color: #fff; text-decoration: none; font-weight: 600; }
.t-nav a:not(.t-social):hover { color: var(--accent); }
.t-socials { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.t-social { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: rgba(255,255,255,.1); }
.t-social:hover { background: var(--accent); color: var(--dark); }
.t-socials.dark .t-social { background: var(--dark); color: #fff; }
.t-menu { display: none; }
.t-menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 10px; }
.t-menu summary::-webkit-details-marker { display: none; }
.t-menu summary span { display: block; height: 3px; background: #fff; border-radius: 2px; }

/* Hero */
.t-hero { position: relative; background: var(--dark); color: #fff; padding: 120px 0 130px; overflow: hidden; }
.t-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-hero.has-image::after, .t-stats.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,20,20,.85), rgba(20,20,20,.45)); }
.t-hero-in { position: relative; z-index: 1; max-width: 1140px; }
.t-hero h1 { color: #fff; max-width: 820px; }
.t-hero .t-label { color: var(--accent); }
.t-hero-text { font-size: 20px; max-width: 640px; color: #eef1f3; }
.t-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Sections */
.t-section { padding: 90px 0; }
.t-soft { background: var(--soft); }
.t-about-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.t-about-text p { font-size: 17px; }
.t-portrait { display: block; width: 100%; max-width: 440px; aspect-ratio: 4 / 5; object-fit: cover; margin-left: auto; border-radius: 0 0 160px 160px; background: var(--accent); box-shadow: 18px 18px 0 var(--accent); }
.t-portrait-empty { display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 140px; color: var(--dark); }
ul.t-facts { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
ul.t-facts li { background: var(--soft); border-radius: 8px; padding: 7px 14px; font-size: 14px; line-height: 1.6; }
.t-facts strong { color: var(--teal); }

.t-cred-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.t-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.t-cred-group { margin: 0; border-top: 5px solid var(--accent); }
.t-cred-group h3 { font-size: 20px; }
.t-cred-list { list-style: none; margin: 0; padding: 0; }
.t-cred-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.t-cred-list li:first-child { border-top: 0; padding-top: 4px; }
.t-cred-title { font-weight: 600; }
.t-cred-detail { display: block; color: var(--muted); font-size: 14px; }
.t-year { margin-left: 8px; font-size: 13px; background: var(--soft); border-radius: 5px; padding: 1px 8px; }

.t-courses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.t-courses.is-single { max-width: 560px; margin: 0 auto; grid-template-columns: 1fr; }
.t-course { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: 0 10px 30px rgba(34,34,34,.1); }
.t-course-top { background: var(--dark); color: #fff; padding: 28px 28px 22px; border-bottom: 6px solid var(--accent); }
.t-course-top h3 { color: #fff; margin: 0; }
.t-course-meta { color: var(--accent); font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.t-course-body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.t-checks { list-style: none; margin: 0 0 16px; padding: 0; }
.t-checks li { position: relative; padding-left: 32px; margin-bottom: 10px; }
.t-checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--dark); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.t-price { margin-top: auto; padding-top: 8px; font-family: var(--head); font-weight: 700; font-size: 24px; color: var(--dark); }
.t-course .t-btn { margin-top: 8px; }

.t-cta { background: var(--accent); padding: 60px 0; }
.t-cta-in { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.t-cta h2 { margin: 0 0 6px; font-size: 38px; }
.t-cta .t-hl { color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.t-cta p { font-size: 18px; margin: 0; color: var(--dark); }

.t-highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.t-highlight { text-align: center; }
.t-hicon { display: inline-flex; width: 90px; height: 90px; align-items: center; justify-content: center; font-size: 42px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); margin-bottom: 16px; }
.t-highlight h3 { font-size: 21px; }
.t-highlight p { color: var(--muted); }

/* บรรยากาศการเรียน: a photo grid. The first photo is large when there are enough to fill around it,
   and a photo left over at the end stretches across the row so no gap is left. */
.t-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: min(270px, 21vw); gap: 14px; }
.t-gallery li { margin: 0; min-width: 0; }
.t-gallery:not(.is-few) li:first-child { grid-column: span 2; grid-row: span 2; }
@media (min-width: 768px) {
  .t-gallery:not(.is-few) li:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .t-gallery:not(.is-few) li:last-child:nth-child(3n+2) { grid-column: span 2; }
}
.t-gallery.is-few { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-auto-rows: min(340px, 50vw); }
.t-shot { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius); background: #d7dee4; }
.t-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.t-shot:hover img, .t-shot:focus-visible img { transform: scale(1.04); }
.t-shot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.t-shot-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 10px; color: #fff; font-size: 15px; line-height: 1.45;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.t-lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; overflow: visible; }
.t-lightbox::backdrop { background: rgba(10,12,14,.88); }
.t-lightbox img { display: block; max-width: min(1100px, 94vw); max-height: 80vh; width: auto; height: auto; margin: 0 auto; border-radius: 8px; }
.t-lightbox p { color: #fff; text-align: center; margin: 12px 48px 0; min-height: 1.5em; }
.t-lightbox button { position: absolute; border: 0; border-radius: 50%; width: 46px; height: 46px; background: rgba(255,255,255,.92); color: var(--dark); font-size: 24px; line-height: 1; cursor: pointer; }
.t-lightbox button:focus-visible { outline: 3px solid var(--accent); }
.t-lightbox .t-lb-close { top: -14px; right: -14px; }
.t-lightbox .t-lb-prev { left: -14px; top: 40%; }
.t-lightbox .t-lb-next { right: -14px; top: 40%; }
@media (prefers-reduced-motion: reduce) { .t-shot img { transition: none; } }

.t-stats { position: relative; background: var(--teal); color: #fff; padding: 80px 0; overflow: hidden; }
/* Fixed background parallax: the picture stays still while the page scrolls past. CSS only.
   The picture itself comes from /teacher-bg/<version>.css, because inline styles are blocked. */
.t-stats.has-image { padding: 12em 0; background-color: var(--dark); background-size: cover; background-position: center; background-repeat: no-repeat; background-attachment: fixed; }
/* Phones and tablets ignore or stutter on fixed backgrounds, and some people turn motion off. */
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .t-stats.has-image { background-attachment: scroll; }
}
.t-stats-in { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.t-stat-num { font-family: var(--head); font-weight: 800; font-size: 56px; line-height: 1.1; color: var(--accent); margin: 0 0 6px; }
.t-stat-label { font-size: 17px; margin: 0; }

.t-stars { color: var(--accent); letter-spacing: 3px; font-size: 22px; margin: -12px 0 24px; }
.t-carousel { position: relative; }
.t-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 3); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 50px 2px 10px; }
.t-track::-webkit-scrollbar { display: none; }
.t-review { scroll-snap-align: start; position: relative; margin: 0; background: var(--soft); border-radius: var(--radius); padding: 64px 26px 26px; text-align: center; }
.t-avatar { position: absolute; top: -50px; left: 50%; transform: translateX(-50%); width: 100px; height: 100px; border-radius: 50%; background: var(--accent); color: var(--dark);
  border: 5px solid #fff; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 40px; font-weight: 700; }
img.t-avatar { display: block; object-fit: cover; padding: 0; box-sizing: border-box; }
.t-review .t-stars { font-size: 16px; margin: 0 0 8px; }
.t-review blockquote { margin: 0 0 14px; font-size: 16px; }
.t-review figcaption strong { display: block; font-family: var(--head); }
.t-review figcaption span { color: var(--muted); font-size: 14px; }
.t-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.t-dot { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 0; background: #c9d2d9; cursor: pointer; }
.t-dot.on { background: var(--accent); width: 28px; border-radius: 6px; }

.t-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 30px; align-items: start; background: #fff; border-radius: var(--radius); padding: 30px; }
.t-contact-info p { font-size: 17px; }
.t-contact .t-actions { margin: 6px 0 16px; }
.t-contact .t-map { margin: 0; }
.t-map { display: block; width: 100%; height: 320px; border: 0; border-radius: var(--radius); margin-top: 16px; }

/* Footer */
.t-foot { background: var(--dark); color: #cfd4d8; padding: 70px 0 0; font-size: 15px; }
.t-foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.t-foot-head { font-family: var(--head); font-weight: 800; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.t-foot-name { color: #fff; font-family: var(--head); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.t-foot ul { list-style: none; margin: 0; padding: 0; }
.t-foot li { margin-bottom: 6px; }
.t-foot a:not(.t-social) { color: #cfd4d8; text-decoration: none; }
.t-foot a:not(.t-social):hover { color: var(--accent); }
.t-foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid #3a3a3a; margin-top: 50px; padding-top: 20px; padding-bottom: 24px; font-size: 14px; color: #9aa1a7; }
.t-foot-bottom p { margin: 0; }

.t-bar { display: none; }

@media (max-width: 1024px) {
  h1 { font-size: 52px; }
  h2 { font-size: 36px; }
  .t-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-track { grid-auto-columns: calc((100% - 20px) / 2); }
  .t-nav-wide { gap: 18px; }
  .t-stats.has-image { padding: 6em 0; }
}
@media (max-width: 767px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
  .t-section { padding: 60px 0; }
  .t-hero { padding: 80px 0 90px; }
  .t-hero-text { font-size: 17px; }
  .t-nav-wide { display: none; }
  .t-menu { display: block; }
  .t-menu[open] .t-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--dark); padding: 8px 20px 20px; border-top: 1px solid #3a3a3a; }
  .t-menu[open] .t-nav a:not(.t-social) { padding: 12px 0; border-bottom: 1px solid #333; }
  .t-menu[open] .t-socials { padding-top: 14px; }
  .t-about-in { grid-template-columns: 1fr; gap: 40px; }
  .t-about-photo { order: -1; }
  .t-portrait { margin: 0 auto; max-width: 300px; box-shadow: 12px 12px 0 var(--accent); }
  .t-courses { grid-template-columns: 1fr; }
  .t-cta { padding: 44px 0; }
  .t-cta h2 { font-size: 28px; }
  .t-highlights { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .t-hicon { width: 72px; height: 72px; font-size: 32px; }
  .t-highlight h3 { font-size: 18px; }
  .t-stat-num { font-size: 42px; }
  .t-stats.has-image { padding: 4em 0; }
  .t-track { grid-auto-columns: 88%; }
  .t-gallery, .t-gallery.is-few { grid-template-columns: 1fr 1fr; grid-auto-rows: 34vw; gap: 8px; }
  .t-gallery:not(.is-few) li:first-child { grid-row: span 2; }
  .t-gallery:not(.is-few) li:last-child:nth-child(even), .t-gallery li:only-child { grid-column: 1 / -1; }
  .t-shot-caption { font-size: 13px; padding: 22px 10px 8px; }
  .t-lightbox .t-lb-close { top: -56px; right: 0; }
  .t-lightbox .t-lb-prev { left: 4px; }
  .t-lightbox .t-lb-next { right: 4px; }
  .t-contact { grid-template-columns: 1fr; padding: 20px; }
  .t-store.has-bar { padding-bottom: 76px; }
  .t-bar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
  .t-bar .t-btn { flex: 1; }
}

/* Plain pages: login, closed, errors */
body.t-plain, body.t-admin { background: var(--soft); }
.t-plain-main { max-width: 440px; margin: 0 auto; padding: 48px 16px; }
.t-login h1 { margin: 0; font-size: 26px; }
.t-closed { text-align: center; padding-top: 40px; }
.t-closed h1 { font-size: 34px; }
.t-closed .closed-owner { margin-top: 32px; font-size: 14px; }
.t-paused-title { font-family: var(--head); font-size: 22px; font-weight: 700; margin: 0 0 12px; }
.t-paused-note { background: #fff; border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 16px; text-align: left; }
.t-paused-actions { justify-content: center; }
.t-preview-bar { margin: 0; padding: 10px 20px; background: var(--accent); color: var(--dark); font-weight: 600; text-align: center; }
.t-preview-bar a { color: var(--dark); }
.t-card-paused { border: 2px solid var(--danger); }

/* Forms */
.t-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.t-form input[type=text], .t-form input[type=search], .t-form input[type=email], .t-form input[type=password], .t-form input[type=tel], .t-form input[type=url],
.t-form input[type=number], .t-form input[type=file], .t-form select, .t-form textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-weight: 400; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.t-form textarea { resize: vertical; }
.t-form .t-check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-bottom: 6px; cursor: pointer; }
.t-form .t-check input { width: 18px; height: 18px; margin: 0; }
.t-fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.t-fieldset legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.t-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.t-hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.t-req { color: var(--danger); }
.t-msg { padding: 10px 14px; border-radius: 8px; background: #fff7dc; border-left: 4px solid var(--accent); margin: 0 0 16px; }
.t-msg.err { background: #fdecea; border-left-color: var(--danger); color: #8a1c12; }
.t-theme { display: inline-flex !important; margin-right: 16px; }
.t-swatch { width: 20px; height: 20px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.t-swatch-yellow { background: #f2b91e; }
.t-swatch-sky { background: #5cb8e6; }
.t-swatch-mint { background: #4fc79f; }
.t-swatch-pink { background: #f39bb6; }
.t-icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.t-icon-pick label { margin: 0; }
.t-icon-pick input { position: absolute; opacity: 0; }
.t-icon-pick span { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; font-size: 22px; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.t-icon-pick input:checked + span { border-color: var(--dark); background: var(--accent); }
.t-icon-pick input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.t-plans .plan-choice { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; cursor: pointer; background: #fff; }
.t-plans .plan-choice input { margin: 0; }
.t-plans .plan-choice strong { margin-left: auto; }

/* หลังร้าน */
.t-admin h2 { font-size: 22px; margin: 0 0 12px; }
.t-admin .t-card h3 { font-size: 18px; }
.t-admin .t-top .t-name { font-size: 18px; }
.t-admin-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; padding-top: 20px; padding-bottom: 40px; }
.t-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(100vh - 104px); overflow-y: auto; }
.t-side-group > summary { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; font-size: 17px; font-weight: 700; color: var(--dark); cursor: pointer; list-style: none; transition: background-color .18s, color .18s; }
.t-side-group > summary::-webkit-details-marker { display: none; }
.t-side-group > summary > .t-ic:first-child { color: var(--teal); }
.t-side-group > summary > .t-ic:last-child { margin-left: auto; color: var(--muted); transition: transform .2s; }
.t-side-group[open] > summary > .t-ic:last-child { transform: rotate(180deg); }
.t-side-group > summary:hover { background: var(--soft); color: var(--teal); }
.t-side-group > summary .t-tag { margin-left: 0; }
.t-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 16px; font-weight: 500;
  transition: background-color .18s, color .18s, box-shadow .18s, transform .18s; }
.t-side-group a { margin: 2px 0 2px 16px; }
.t-side a .t-ic { color: var(--muted); transition: color .18s; }
.t-side a:hover { background: var(--soft); color: var(--teal); transform: translateX(3px); box-shadow: inset 3px 0 0 var(--accent), 0 0 16px -6px var(--accent); }
.t-side a:hover .t-ic { color: var(--teal); }
.t-side a.on { background: var(--accent); color: var(--dark); font-weight: 700; box-shadow: 0 4px 16px -6px var(--accent-dark); }
.t-side a.on .t-ic { color: var(--dark); }
.t-side .t-side-store { margin-top: 8px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; color: var(--teal); }
.t-narrow { max-width: 480px; }
.t-photo-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.t-photo-row .t-form { flex: 1; min-width: 220px; }
.t-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: var(--soft); flex: none; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; text-align: center; }
.t-thumb.wide { width: 170px; }
.t-thumb.round { border-radius: 50%; }
.t-items { list-style: none; margin: 0; padding: 0; }
.t-item { border-top: 1px solid var(--line); padding: 12px 0; }
.t-item.is-off .t-item-title { color: var(--muted); }
.t-item-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.t-item-title { font-weight: 600; overflow-wrap: anywhere; }
.t-item-tools { display: flex; gap: 6px; }
.t-gallery-admin { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.t-gallery-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.t-gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 6px; background: var(--soft); }
.t-gallery-caption { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.t-gallery-item .t-item-tools { flex-wrap: wrap; align-items: center; margin-top: auto; }
.t-gallery-item .t-edit-btn { margin-left: auto; min-height: 36px; padding: 4px 12px; }
.t-item-tools form { margin: 0; }
.t-tag { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 5px; background: var(--soft); color: var(--teal); }
.t-tag.off { background: #eceef3; color: var(--muted); }
.t-item details { margin-top: 8px; }
.t-item summary { cursor: pointer; color: var(--teal); font-weight: 600; font-size: 14px; }
.t-item details .t-form { margin-top: 12px; }
.t-delete { margin-top: 8px; text-align: right; }
.t-empty { color: var(--muted); }
@media (max-width: 767px) {
  .t-admin-layout { grid-template-columns: 1fr; }
  .t-side { position: static; max-height: none; }
  .t-row2 { grid-template-columns: 1fr; }
}

/* ลูกศิษย์: students, programmes and assessment in หลังร้าน */
.t-page-title { margin: 4px 0 16px; overflow-wrap: anywhere; }
.t-row-link { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; color: inherit; text-decoration: none; padding: 4px 0; }
.t-row-link:hover .t-item-title { color: var(--teal); text-decoration: underline; }
.t-item-sub { color: var(--muted); font-size: 14px; }
.t-item-sub .t-tag { margin: 2px 0 2px 6px; }
.t-progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.t-progress progress { flex: 1; min-width: 160px; max-width: 360px; height: 12px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 6px; background: var(--soft); overflow: hidden; }
.t-progress progress::-webkit-progress-bar { background: var(--soft); border-radius: 6px; }
.t-progress progress::-webkit-progress-value { background: var(--teal); border-radius: 6px; }
.t-progress progress::-moz-progress-bar { background: var(--teal); border-radius: 6px; }
.t-progress > span { font-weight: 600; }
.t-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.t-inline label { flex: 1; min-width: 200px; margin: 0; }
.t-copy { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.t-copy input { flex: 1; min-width: 220px; padding: 10px 12px; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.t-copy .t-btn.light { color: var(--dark); border-color: var(--line); min-height: 48px; }
.t-card .t-actions { margin-top: 12px; }
.t-card .t-actions form { margin: 0; }
.t-ticks { padding-left: 0; list-style: none; }
.t-ticks li { padding-left: 26px; position: relative; margin-bottom: 6px; }
.t-ticks li::before { content: '✓'; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.t-unit-no { color: var(--teal); white-space: nowrap; }
.t-unit h3 { margin-top: 0; }
.t-unit h3 .t-muted { font-family: inherit; font-weight: 400; }
.t-scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 12px; }
.t-form input[type=date] { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-weight: 400; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.t-topic-list { margin: 6px 0 0; padding-left: 22px; color: var(--muted); font-size: 14px; }
.t-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The parent page */
.t-report-main { max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; }
.t-report-head { margin-bottom: 20px; }
.t-report-head h1 { font-size: 30px; margin: 0 0 6px; overflow-wrap: anywhere; }
.t-report-program h2 { font-size: 24px; margin: 0 0 6px; }
.t-report-unit { border-top: 1px solid var(--line); padding: 14px 0 4px; break-inside: avoid; }
.t-report-unit h3 { font-size: 18px; margin: 0 0 8px; }
.t-report-topics { list-style: none; margin: 0 0 10px; padding: 0; }
.t-report-topics li { margin-bottom: 4px; }
.t-report-topics .is-done span[aria-hidden] { color: var(--teal); font-weight: 700; }
.t-report-topics .is-todo { color: var(--muted); }
.t-report-scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; margin: 0 0 10px; }
.t-report-scores div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; background: var(--soft); border-radius: 8px; }
.t-report-scores dt { font-weight: 600; }
.t-report-scores dd { margin: 0; font-weight: 700; }
.t-level-1 { color: var(--danger); }
.t-level-4 { color: var(--teal); }
.t-report-note { background: #fff7dc; border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px; }
.t-report-foot { text-align: center; margin-top: 20px; }
@media print {
  body.t-report { background: #fff; }
  .t-no-print { display: none !important; }
  .t-report-main { padding: 0; max-width: none; }
  .t-report .t-card { border: 0; padding: 0 0 12px; }
  .t-report-note, .t-report-scores div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.t-btn[hidden] { display: none; }
.t-plan-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.t-plan-cards .t-card { margin-bottom: 0; }
.t-card-pro { border: 2px solid var(--accent); }
@media (max-width: 767px) { .t-plan-cards { grid-template-columns: 1fr; } }

/* Icons, hover glow, tables and pages (หลังร้าน) */
.t-ic { width: 20px; height: 20px; flex: none; }
.t-btn .t-ic { width: 18px; height: 18px; margin-left: -4px; }
.t-btn.icon .t-ic { margin: 0; }
.t-btn { transition: background-color .18s, color .18s, border-color .18s, box-shadow .2s, transform .18s; }
.t-btn:not(:disabled):hover { transform: translateY(-1px); }
.t-btn.primary:not(:disabled):hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), 0 8px 22px -6px var(--accent-dark); }
.t-btn.dark:not(:disabled):hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent), 0 8px 22px -8px var(--dark); }
.t-btn.ghost:not(:disabled):hover { background: var(--dark); color: #fff; box-shadow: 0 0 18px -4px var(--accent); }
.t-btn.light:not(:disabled):hover { background: var(--accent); color: var(--dark); border-color: var(--accent); box-shadow: 0 0 16px -2px var(--accent); }
.t-btn.danger:not(:disabled):hover { background: var(--danger); color: #fff; border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180,35,24,.18), 0 8px 20px -8px var(--danger); }
.t-btn.icon:not(:disabled):hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, #fff); box-shadow: 0 0 12px -3px var(--accent); }
.t-admin h2 .t-ic, .t-locked h2 .t-ic { vertical-align: -3px; color: var(--teal); }
.t-item summary { display: inline-flex; align-items: center; gap: 6px; }
.t-item summary .t-ic { width: 16px; height: 16px; }
.t-item summary:hover { color: var(--dark); }
.t-tag .t-ic { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
.t-back { display: inline-flex; align-items: center; gap: 4px; color: var(--teal); font-weight: 600; text-decoration: none; }
.t-back .t-ic { width: 18px; height: 18px; transition: transform .18s; }
.t-back:hover { text-decoration: underline; }
.t-back:hover .t-ic { transform: translateX(-3px); }
.t-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.t-page-head .t-page-title { margin: 0; }
.t-page-title .t-muted { font-family: 'Noto Sans Thai', sans-serif; font-size: 15px; font-weight: 400; }
.t-student-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.t-student-head .t-page-title { margin-bottom: 4px; }

.t-card-table { padding: 0; }
.t-card-table .t-empty { padding: 24px; margin: 0; }
.t-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.t-table th { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 12px 14px; background: #f7f9fb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t-table th:first-child { border-top-left-radius: var(--radius); }
.t-table th:last-child { border-top-right-radius: var(--radius); }
.t-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.t-table tbody tr { transition: background-color .15s; }
.t-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 12%, #fff); }
.t-table tr.is-off td { color: var(--muted); }
.t-table tr.is-off .t-face { filter: grayscale(1); opacity: .7; }
.t-table .t-num { text-align: right; width: 1%; white-space: nowrap; }
.t-table .t-tag { margin: 2px 6px 2px 0; }
.t-cell-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--dark); text-decoration: none; }
.t-cell-name .t-ic { color: var(--teal); }
.t-cell-name:hover { color: var(--teal); text-decoration: underline; }
.t-cell-muted { color: var(--muted); font-size: 14px; }
.t-cell-photo { width: 44px; padding-right: 0 !important; }
.t-cell-photo a { display: block; position: relative; width: 44px; height: 44px; text-decoration: none; }
.t-cell-photo .t-face { display: flex; }
.t-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.t-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #b7bec6; }
.t-status.on { color: #1b7a4b; }
.t-status.on::before { background: #22a565; box-shadow: 0 0 0 3px rgba(34,165,101,.2); }

.t-face { display: inline-flex; align-items: center; justify-content: center; flex: none; object-fit: cover; border-radius: 50%; background: var(--soft); color: var(--teal);
  font-weight: 700; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.t-face-sm { width: 44px; height: 44px; font-size: 18px; position: relative; transform-origin: left center; transition: transform .22s ease, box-shadow .22s, border-radius .22s; }
img.t-face-sm:hover, .t-cell-photo a:focus-visible img { transform: scale(2.8); z-index: 5; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.t-face-lg { width: 132px; height: 132px; border-radius: 18px; font-size: 52px; box-shadow: 0 6px 20px -6px rgba(0,0,0,.35); }
.t-report-photo { float: right; margin: 0 0 12px 16px; }

.t-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; }
.t-per { margin: 0; }
.t-per label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.t-per select { padding: 6px 10px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.t-pages { display: flex; gap: 4px; flex-wrap: wrap; }
.t-page { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text); font-weight: 600; text-decoration: none; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.t-page .t-ic { width: 16px; height: 16px; }
a.t-page:hover { border-color: var(--accent); box-shadow: 0 0 12px -3px var(--accent); }
.t-page.on { background: var(--dark); border-color: var(--dark); color: #fff; }
.t-page.is-off { opacity: .35; }
.t-page.is-gap { border: 0; background: none; min-width: 20px; }

@media (prefers-reduced-motion: reduce) {
  .t-btn, .t-side a, .t-face-sm, .t-back .t-ic { transition: none; }
  .t-btn:not(:disabled):hover, .t-side a:hover { transform: none; }
}
@media (max-width: 767px) {
  .t-col-wide { display: none; }
  .t-table th, .t-table td { padding: 10px 8px; }
  .t-face-lg { width: 88px; height: 88px; font-size: 36px; border-radius: 14px; }
  .t-pager { justify-content: center; }
}

/* View first, แก้ไข at the top right opens the form. */
.t-admin [hidden] { display: none !important; }
.t-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.t-card-head h2, .t-card-head h3 { margin: 0; }
.t-edit-btn { flex: none; min-height: 36px; padding: 6px 14px; font-size: 14px; }
/* dl.t-facts is the view box of หลังร้าน; ul.t-facts above is the row of small facts on หน้าร้าน. */
dl.t-facts { display: grid; grid-template-columns: minmax(130px, 220px) 1fr; gap: 0; margin: 12px 0 0; }
.t-facts dt, .t-facts dd { padding: 9px 0; border-top: 1px solid var(--line); margin: 0; }
.t-facts dt { color: var(--muted); font-size: 14px; padding-right: 16px; }
.t-facts dd { overflow-wrap: anywhere; }
.t-facts dd a { color: var(--teal); }
.t-facts dd .t-tag:first-child { margin-left: 0; }
.t-facts dd .t-tag { margin: 2px 6px 2px 0; }
.t-view h3 { margin: 22px 0 0; }
.t-photo-view { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 12px; }
.t-photo-view figure { margin: 0; }
.t-photo-view figcaption { margin-top: 6px; color: var(--muted); font-size: 14px; }
.t-stars { color: #e7a300; letter-spacing: 2px; }
.t-item > .t-view { margin-top: 2px; }
.t-item > .t-view .t-facts { margin-top: 6px; }
.t-item > .t-edit-area { margin-top: 12px; }
.t-item > .t-edit-area .t-delete { margin-top: 10px; }
.t-add { margin-top: 14px; }
.t-add-area { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 4px; }
.t-done-list { list-style: none; margin: 12px 0 0; padding: 0; }
.t-done-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.t-done-list li.is-done .t-ic { color: var(--teal); }
.t-done-list li.is-todo { color: var(--muted); }
.t-dot { width: 10px; height: 10px; margin: 0 4px; border: 2px solid var(--line); border-radius: 50%; flex: none; }
@media (max-width: 640px) {
  dl.t-facts { grid-template-columns: 1fr; }
  .t-facts dt { padding-bottom: 0; }
  .t-facts dd { border-top: 0; padding-top: 2px; }
}
.t-unit .t-edit-area > .t-form { margin-top: 14px; }

/* Lesson hours: tabs on the assessment page and the parent page, the hours summary, and the lesson list. */
.t-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.t-tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; margin-bottom: -2px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.t-tab:hover { color: var(--dark); }
.t-tab.on { color: var(--dark); border-bottom-color: var(--accent); }
.t-duration { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.t-duration legend { width: 100%; }
.t-form .t-duration label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.t-form .t-duration input[type=number] { width: 84px; margin: 0; }
.t-form .t-duration select { width: auto; min-width: 72px; margin: 0; }
.t-hours-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.t-hours-sum > div { background: var(--soft); border-radius: 8px; padding: 12px 14px; }
.t-hours-sum .t-label { display: block; font-size: 13px; margin: 0 0 2px; }
.t-hours-sum strong { display: block; font-family: var(--head); font-size: 22px; line-height: 1.3; color: var(--dark); }
.t-hours-sum .t-muted { display: block; margin: 0; }
.t-hours-sum .t-tag { margin: 4px 0 0; }
.t-hours-over, .t-hours-sum strong.t-hours-over { color: var(--danger); font-weight: 700; }
.t-hours-sum.is-over > div:last-child { background: #fdf0ee; }
.t-progress.is-over progress::-webkit-progress-value { background: var(--danger); }
.t-progress.is-over progress::-moz-progress-bar { background: var(--danger); }
.t-tag.warn { background: #fff1d6; color: #8a5300; font-weight: 600; }
.t-hours-line { margin: 4px 0 8px; font-size: 15px; }
.t-packs { list-style: none; margin: 8px 0; padding: 0; }
.t-packs li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.t-plan { border-left: 5px solid var(--accent); background: #fffbef; }
.t-plan h2 { margin-top: 0; }
.t-btn.t-big { min-height: 56px; padding: 12px 28px; font-size: 18px; }
.t-lesson-new .t-view { margin-top: 8px; }
.t-lesson-note { margin: 6px 0; }
.t-lesson-note .t-label { display: block; font-size: 13px; margin: 0; }
.t-lesson-plan { background: #f5f6f8; border-radius: 8px; padding: 8px 12px; }
.t-report-lessons { margin: 12px 0 0; padding-left: 28px; }
.t-report-lessons li { padding: 8px 0; border-top: 1px solid var(--line); }
.t-report-lessons p { margin: 0 0 4px; }
@media (max-width: 640px) {
  .t-hours-sum { gap: 6px; }
  .t-hours-sum > div { padding: 10px; }
  .t-hours-sum strong { font-size: 16px; }
}
@media print {
  .t-hours-sum > div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Students table: hours left per programme, and the count on each filter tab. */
.t-count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--soft); color: var(--teal); font-size: 12px; text-align: center; }
.t-count.warn { background: #fff1d6; color: #8a5300; }
.t-cell-hours { white-space: nowrap; }
.t-left { display: block; font-weight: 600; }
.t-left .t-muted { font-weight: 400; font-size: 13px; }
.t-left.is-low { color: #8a5300; }
.t-left.is-over { color: var(--danger); }
@media (max-width: 767px) {
  .t-cell-hours { white-space: normal; }
}

/* สถาบัน: the teachers table at /academy. On a phone each teacher becomes a card. */
.t-academy-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.t-academy-actions form { margin: 0; }
.t-academy-actions .t-btn { white-space: nowrap; }
.t-academy-actions details > summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; list-style: none; color: var(--danger); font-size: 14px; padding: 6px 2px; }
.t-academy-actions details > summary::-webkit-details-marker { display: none; }
.t-academy-actions details[open] { flex-basis: 100%; }
.t-academy-table .t-muted { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .t-academy-table thead { display: none; }
  .t-academy-table, .t-academy-table tbody, .t-academy-table tr, .t-academy-table td { display: block; width: auto; }
  .t-academy-table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .t-academy-table td { border: 0; padding: 3px 0; }
  .t-academy-table td br { display: none; }
  .t-academy-table td .t-tag, .t-academy-table td > .t-muted { margin-left: 6px; }
  .t-academy-actions { margin-top: 6px; }
}
/* สถาบัน: student filters, results tables, activity list */
.t-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.t-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; flex: 1 1 180px; margin: 0; }
.t-filter-go { display: flex; gap: 8px; align-items: center; }
.t-academy-results td { vertical-align: top; }
.t-academy-results .t-tag { margin: 2px 6px 2px 0; }
.t-activity { list-style: none; margin: 0; padding: 0; }
.t-activity li { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.t-activity li:last-child { border-bottom: 0; }
.t-activity-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); color: var(--teal); display: flex; align-items: center; justify-content: center; }
.t-activity-note { margin: 6px 0 0; padding: 8px 10px; background: #f7f8fa; border-radius: 8px; font-size: 14px; }
.t-inline-form input[type=number] { width: 90px; display: inline-block; margin: 0 6px; }
.t-filter .t-filter-go { margin: 0; }
.t-academy-results + h3, .t-table-wrap + h3, .t-table-wrap + p + h3 { margin-top: 22px; }
/* หน้าร้านของสถาบัน. Classes that start with ta- are used only on this page. */
.t-logo { display: inline-flex; align-items: center; gap: 10px; }
.t-logo-img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: #fff; }
.t-academy .t-label { color: var(--teal); }
.ta-sub { text-align: center; color: var(--muted); max-width: 620px; margin: -12px auto 36px; font-size: 17px; }
.ta-hero { position: relative; overflow: hidden; padding: 72px 0 84px;
  background: radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--accent) 30%, transparent) 0, transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, #fff) 0%, #fff 100%); }
.ta-hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.ta-hero:not(.has-image) .ta-hero-in { grid-template-columns: minmax(0, 1fr); max-width: 860px; text-align: center; }
.ta-hero:not(.has-image) .t-actions { justify-content: center; }
.ta-hero h1 { font-size: 54px; line-height: 1.22; margin: 0 0 18px; }
.ta-hero .t-hl { color: inherit; padding: 0 .08em; background: linear-gradient(transparent 64%, color-mix(in srgb, var(--accent) 45%, #fff) 64%, color-mix(in srgb, var(--accent) 45%, #fff) 94%, transparent 94%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ta-pill { display: inline-block; margin: 0 0 18px; padding: 6px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-weight: 600; font-size: 15px; color: var(--teal); box-shadow: 0 4px 14px rgba(20, 30, 50, .06); }
.ta-lead { font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 0 28px; }
.ta-hero:not(.has-image) .ta-lead { margin-left: auto; margin-right: auto; }
.t-btn.ta-ghost { background: #fff; border-color: var(--line); color: var(--dark); }
.t-btn.ta-ghost:hover { border-color: var(--dark); }
.ta-hero-media { position: relative; }
.ta-hero-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 28px; box-shadow: 0 24px 60px -18px rgba(20, 30, 50, .35); }
.ta-hero-media::before { content: ""; position: absolute; z-index: -1; inset: 26px -18px -18px 26px; border-radius: 28px; background: var(--accent); opacity: .55; }
.ta-hero-media { z-index: 0; }
.ta-float { position: absolute; margin: 0; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 10px 16px;
  box-shadow: 0 12px 30px -8px rgba(20, 30, 50, .28); font-size: 15px; line-height: 1.4; }
.ta-float-team { left: -28px; bottom: 28px; }
.ta-float-mode { right: 18px; top: 18px; font-weight: 700; padding: 8px 16px; border-radius: 999px; }
.ta-float-mode::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #22a35a; box-shadow: 0 0 0 4px rgba(34, 163, 90, .18); }
.ta-faces { display: flex; }
.ta-faces img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; margin-left: -10px; background: var(--soft); }
.ta-faces img:first-child { margin-left: 0; }
.ta-stats-wrap { position: relative; z-index: 1; margin-top: -36px; }
.ta-stats { list-style: none; margin: 0 auto; padding: 22px 12px; display: flex; justify-content: center; background: #fff; border-radius: 20px;
  border: 1px solid var(--line); box-shadow: 0 16px 40px -18px rgba(20, 30, 50, .25); max-width: 900px; }
.ta-stats li { flex: 1; text-align: center; padding: 4px 12px; }
.ta-stats li + li { border-left: 1px solid var(--line); }
.ta-stats strong { font-family: var(--head); font-size: 40px; line-height: 1.1; color: var(--dark); }
.ta-unit { font-weight: 700; color: var(--teal); }
.ta-stat-label { display: block; color: var(--muted); font-size: 14px; }
.ta-about-in { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.ta-about-in.no-info { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.ta-about-text p { font-size: 17px; }
.ta-info { background: var(--soft); border-radius: 22px; padding: 26px; }
.ta-info-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ta-info-logo { flex: none; width: 72px; height: 72px; border-radius: 18px; object-fit: cover; background: #fff; box-shadow: 0 6px 16px rgba(20, 30, 50, .1); }
.ta-info-logo.is-empty { display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 34px; font-weight: 700; color: var(--teal); }
.ta-info-name { margin: 0; font-family: var(--head); font-weight: 700; font-size: 20px; line-height: 1.35; }
.ta-info dl { margin: 0 0 18px; }
.ta-info dl > div { padding: 12px 0; border-top: 1px solid var(--line); }
.ta-info dt { font-size: 13px; color: var(--muted); }
.ta-info dd { margin: 0; font-weight: 600; }
.ta-programs { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 24px; }
.ta-programs.is-single { max-width: 560px; margin: 0 auto; }
.ta-program { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 22px; padding: 28px 26px 24px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 10px 30px -14px rgba(20, 30, 50, .22); transition: transform .18s, box-shadow .18s; }
.ta-program::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--accent); }
.ta-program:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -14px rgba(20, 30, 50, .3); }
.ta-program-no { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent) 22%, #fff); color: var(--dark); font-family: var(--head); font-weight: 800; font-size: 20px; }
.ta-program h3 { margin: 0 0 8px; font-size: 26px; }
.ta-program-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.ta-program-meta span { padding: 2px 12px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 600; color: var(--teal); }
.ta-program-text { color: var(--muted); margin: 0 0 18px; }
.ta-program-link { margin-top: auto; font-weight: 700; color: var(--dark); text-decoration: none; padding-top: 14px; border-top: 1px solid var(--line); }
.ta-program-link span { display: inline-block; transition: transform .18s; color: var(--teal); }
.ta-program-link:hover span { transform: translateX(4px); }
.t-teachers { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.t-teacher-card { flex: 0 1 calc((100% - 66px) / 4); display: flex; flex-direction: column; border-radius: 20px; background: #fff; border: 1px solid var(--line); overflow: hidden;
  color: inherit; text-decoration: none; box-shadow: 0 8px 24px -12px rgba(20, 30, 50, .2); transition: transform .18s, box-shadow .18s; }
.t-teacher-card:hover, .t-teacher-card:focus-visible { transform: translateY(-4px); box-shadow: 0 20px 36px -14px rgba(20, 30, 50, .32); }
.t-teachers.cols-3 { max-width: 900px; margin: 0 auto; }
.t-teachers.cols-3 .t-teacher-card { flex-basis: calc((100% - 44px) / 3); }
.ta-teacher-frame { display: block; overflow: hidden; background: var(--soft); }
.t-teacher-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .35s; }
.t-teacher-card:hover .t-teacher-photo { transform: scale(1.04); }
.t-teacher-photo.is-empty { display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 64px; font-weight: 700; color: var(--teal);
  background: color-mix(in srgb, var(--accent) 22%, #fff); }
.ta-teacher-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 16px 16px 18px; }
.t-teacher-name { font-family: var(--head); font-size: 20px; font-weight: 700; line-height: 1.3; }
.t-teacher-line { color: var(--muted); font-size: 14px; line-height: 1.5; }
.t-teacher-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.t-teacher-tags .t-tag { margin: 0; }
.t-teacher-more { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--teal); font-size: 14px; }
.ta-contact-sec { padding-top: 30px; }
.ta-contact { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 48px 52px; border-radius: 28px;
  background: radial-gradient(circle at 100% 0, rgba(255, 255, 255, .35) 0, transparent 45%), var(--accent); color: #222; }
.ta-contact h2 { margin: 0 0 10px; font-size: 38px; }
.ta-contact .t-label { color: #222; opacity: .75; }
.ta-contact-text p:last-child { margin: 0; font-size: 17px; }
.ta-contact-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.ta-contact-actions .t-btn { min-height: 54px; font-size: 17px; border-radius: 14px; }
.ta-contact-actions .t-socials { justify-content: center; }
.ta-contact-sec .t-map { height: 340px; margin-top: 24px; border-radius: 22px; }
.t-academy .t-foot .t-socials { margin-top: 14px; }
@media (max-width: 1023px) {
  .ta-hero h1 { font-size: 44px; }
  .t-teacher-card { flex-basis: calc((100% - 44px) / 3); }
}
@media (max-width: 767px) {
  .ta-hero { padding: 40px 0 64px; }
  .ta-hero-in { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .ta-hero h1 { font-size: 34px; }
  .ta-lead { font-size: 17px; }
  .ta-hero .t-actions .t-btn { flex: 1 1 auto; }
  .ta-hero-media { margin: 0 8px 0 0; }
  .ta-hero-img { border-radius: 22px; }
  .ta-hero-media::before { inset: 16px -8px -12px 16px; border-radius: 22px; }
  .ta-float-team { left: 10px; bottom: -22px; font-size: 14px; padding: 8px 12px; }
  .ta-float-mode { right: 10px; top: 10px; font-size: 14px; }
  .ta-faces img { width: 30px; height: 30px; }
  .ta-stats-wrap { margin-top: 0; padding-top: 44px; }
  .ta-stats { padding: 16px 4px; }
  .ta-stats li { padding: 2px 6px; }
  .ta-stats strong { font-size: 30px; }
  .ta-stat-label { font-size: 12px; line-height: 1.4; }
  .ta-sub { font-size: 16px; margin-bottom: 26px; }
  .ta-about-in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ta-info { padding: 20px; }
  .ta-program { padding: 24px 20px 20px; }
  .ta-program h3 { font-size: 23px; }
  .t-teachers { gap: 12px; }
  .t-teacher-card { flex-basis: calc((100% - 12px) / 2); border-radius: 16px; }
  .ta-teacher-body { padding: 12px 12px 14px; gap: 4px; }
  .t-teacher-name { font-size: 17px; }
  .t-teacher-line { font-size: 13px; }
  .t-teacher-tags .t-tag { font-size: 12px; }
  .ta-contact { grid-template-columns: minmax(0, 1fr); padding: 30px 22px; border-radius: 22px; gap: 22px; text-align: center; }
  .ta-contact h2 { font-size: 28px; }
}

/* Teacher site of an academy: a line under the headline that links to the academy. */
.t-hero-academy { margin: -4px 0 18px; font-weight: 600; color: #eef1f3; }
.t-hero-academy a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Cards and parts of a card that fold, such as on the academy student page. */
.t-fold > summary, .t-subfold > summary { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.t-fold > summary::-webkit-details-marker, .t-subfold > summary::-webkit-details-marker { display: none; }
.t-fold > summary h2, .t-subfold > summary h3 { margin: 0; }
.t-fold > summary > .t-ic:last-child, .t-subfold > summary > .t-ic:last-child { margin-left: auto; color: var(--muted); transition: transform .2s; }
.t-fold[open] > summary > .t-ic:last-child, .t-subfold[open] > summary > .t-ic:last-child { transform: rotate(180deg); }
.t-fold > summary:hover h2, .t-subfold > summary:hover h3 { color: var(--teal); }
.t-fold[open] > summary { margin-bottom: 12px; }
.t-subfold { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.t-subfold[open] > summary { margin-bottom: 10px; }
.t-fold-end { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.t-fold-end > .t-ic:last-child { color: var(--muted); transition: transform .2s; }
.t-fold[open] > summary > .t-fold-end > .t-ic:last-child { transform: rotate(180deg); }
.t-fold-end .t-btn[hidden] { display: none; }

/* สถาบันเข้าดูหลังร้านครู: a bar that stays on top, and nothing that saves is shown. The server refuses every save anyway. */
.t-view-bar { background: #fff1d6; color: #5c3800; border-bottom: 2px solid #e0a63a; position: sticky; top: 0; z-index: 31; }
.t-view-bar > .t-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding-top: 8px; padding-bottom: 8px; }
.t-view-bar p { margin: 0; font-size: 15px; }
.t-view-bar .t-ic { vertical-align: -3px; }
.t-view-bar form { margin: 0; }
.t-viewonly .t-top { position: static; }
.t-viewonly form[method="post"]:not(.t-view-exit), .t-viewonly .t-edit-btn, .t-viewonly [data-edit], .t-viewonly a[href$="/new"] { display: none !important; }

/* ค่าสอน: /academy/pay and รายได้ in หลังร้านครู. */
.t-pay-month { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.t-pay-month strong { font-size: 18px; min-width: 150px; text-align: center; }
.t-pay-month .t-btn { padding: 8px 12px; }
.t-pay-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.t-pay-sum div { display: flex; flex-direction: column; gap: 2px; }
.t-pay-sum strong { font-size: 22px; }
.t-pay-sum .t-pay-due { color: #8a5300; }
.t-pay-head { padding: 16px 18px 8px; align-items: center; }
.t-pay-head-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.t-pay-head-side .t-btn { padding: 6px 12px; }
.t-pay-none { padding: 4px 18px 16px; margin: 0; }
.t-pay-lines { font-size: 13px; }
.t-pay-table tr.is-paid td { background: #f6fbf8; }
.t-pay-mark > summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; list-style: none; color: #1b7a4b; font-weight: 600; font-size: 14px; padding: 6px 2px; }
.t-pay-mark > summary::-webkit-details-marker { display: none; }
.t-pay-mark[open] { min-width: 240px; }
.t-pay-rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.t-pay-rate { display: flex; align-items: center; gap: 8px; font-weight: 400; white-space: nowrap; }
.t-pay-rate input { max-width: 130px; }
.t-pay-period { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
@media (max-width: 640px) {
  .t-pay-sum { grid-template-columns: 1fr; }
  .t-pay-sum strong { font-size: 19px; }
  .t-pay-table thead { display: none; }
  .t-pay-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .t-pay-table td { border: 0; padding: 0; }
  .t-pay-table tr.is-paid { background: #f6fbf8; }
  .t-pay-table tr.is-paid td { background: transparent; }
  .t-pay-table td:nth-child(1) { order: 1; }
  .t-pay-table td:nth-child(3) { order: 2; width: auto; }
  .t-pay-table td:nth-child(2) { order: 3; grid-column: 1 / -1; }
  .t-pay-table td:nth-child(4) { order: 4; }
  .t-pay-table td:nth-child(5) { order: 5; }
  .t-pay-mark[open] { min-width: 0; grid-column: 1 / -1; }
  .t-pay-table tr:has(.t-pay-mark[open]) td:nth-child(5) { grid-column: 1 / -1; }
}

/* Buttons that show only their icon. The words appear above on hover or keyboard focus, and screen readers read them. */
.t-icon-btn { position: relative; }
.t-btn.t-icon-btn { padding: 8px 10px; }
.t-icon-btn .t-btn-label { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #222; color: #fff;
  font-size: 12px; font-weight: 600; line-height: 1.3; padding: 5px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 40; }
.t-icon-btn:hover .t-btn-label, .t-icon-btn:focus-visible .t-btn-label { opacity: 1; visibility: visible; }
.t-cell-person { display: flex; align-items: center; gap: 12px; }
.t-academy-student-photo { margin: 4px 0 12px; }
@media (hover: none) {
  /* No hover on a phone, so the words stay beside the icon. */
  .t-icon-btn .t-btn-label { position: static; transform: none; background: none; color: inherit; padding: 0; opacity: 1; visibility: visible; font-size: inherit; }
}

/* Icon buttons, "colour spot" look: a dark line icon with a soft colour dot behind it. On hover the button lifts and
   tilts like a sticker, the dot grows, and the border takes the button's colour. Each icon has its own colour. */
.t-icon-btn { --chip: #6c7a99; }
.t-icon-btn:has(.t-ic-eye), .t-academy-admin .t-side a:has(.t-ic-user) { --chip: #3aa0ff; }
.t-icon-btn:has(.t-ic-external), .t-academy-admin .t-side a:has(.t-ic-layers), .t-academy-admin .t-side a:has(.t-ic-external) { --chip: #9b6bff; }
.t-icon-btn:has(.t-ic-link), .t-academy-admin .t-side a:has(.t-ic-users) { --chip: #12b5a6; }
.t-icon-btn:has(.t-ic-refresh), .t-academy-admin .t-side a:has(.t-ic-clock) { --chip: #ffad1f; }
.t-icon-btn:has(.t-ic-lock), .t-academy-admin .t-side a:has(.t-ic-layout) { --chip: #ff5f7e; }
.t-icon-btn:has(.t-ic-pencil), .t-academy-admin .t-side a:has(.t-ic-wallet) { --chip: #ff8a3d; }
.t-icon-btn:has(.t-ic-check), .t-academy-admin .t-side a:has(.t-ic-card) { --chip: #2fbf71; }
.t-academy-admin .t-side a:has(.t-ic-key) { --chip: #6c7a99; }
.t-icon-btn:has(.t-ic-history) { --chip: #ff6bb5; }
.t-btn.t-icon-btn, details > summary.t-icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; min-height: 42px; padding: 0;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--dark); cursor: pointer; font-size: 14px;
  transition: transform .14s, box-shadow .14s, border-color .14s; }
.t-icon-btn::before { content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%; background: var(--chip); opacity: .55;
  right: 8px; bottom: 8px; transition: transform .18s, opacity .18s; }
.t-icon-btn .t-ic { position: relative; }
.t-btn.ghost.t-icon-btn:not(:disabled):hover, details > summary.t-icon-btn:hover { background: #fff; color: var(--dark); border-color: var(--chip);
  transform: translateY(-2px) rotate(-5deg); box-shadow: 0 6px 12px -6px var(--chip); }
.t-icon-btn:hover::before { transform: scale(1.6); opacity: .4; }
.t-icon-btn:hover .t-btn-label { transform: translateX(-50%) rotate(5deg); }
.t-btn.ghost.t-icon-btn:not(:disabled):active, details > summary.t-icon-btn:active { transform: translateY(1px); box-shadow: none; }
.t-icon-btn:focus-visible { outline: 3px solid var(--chip); outline-offset: 2px; }
/* The same dots in the /academy menu, and the icon tilts on hover. */
.t-academy-admin .t-side a { position: relative; }
.t-academy-admin .t-side a .t-ic { position: relative; color: var(--dark); transition: transform .14s; }
.t-academy-admin .t-side a::before { content: ""; position: absolute; left: 24px; top: 50%; margin-top: -1px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--chip, transparent); opacity: .55; }
.t-academy-admin .t-side a:hover .t-ic { color: var(--dark); transform: rotate(-8deg) scale(1.1); }
@media (hover: none) {
  .t-btn.t-icon-btn, details > summary.t-icon-btn { display: inline-flex; gap: 6px; width: auto; padding: 0 12px 0 10px; }
  .t-icon-btn::before { right: auto; left: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .t-icon-btn, .t-icon-btn::before, .t-academy-admin .t-side a .t-ic { transition: none; }
  .t-btn.ghost.t-icon-btn:not(:disabled):hover, details > summary.t-icon-btn:hover, .t-academy-admin .t-side a:hover .t-ic { transform: none; }
}

/* Small faces beside a teacher's name, and faces in headings and the activity list of /academy. */
.t-face-xs { width: 26px; height: 26px; font-size: 12px; vertical-align: middle; }
h2.t-cell-person, h3.t-cell-person { display: flex; align-items: center; gap: 12px; }
.t-cell-small { display: inline-flex; gap: 8px; }
.t-tag-face { display: inline-flex; align-items: center; gap: 6px; padding-left: 3px; }
.t-tag-face .t-face-xs { width: 22px; height: 22px; }
.t-activity .t-cell-photo { flex: none; display: flex; }
.t-activity-kind { display: inline-flex; vertical-align: -3px; margin: 0 4px 0 6px; color: var(--teal); }
.t-activity-kind .t-ic { width: 16px; height: 16px; }

/* Programmes to tick on the student form of /academy. */
.t-program-picks { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.t-program-picks legend { font-weight: 600; margin-bottom: 6px; padding: 0; width: 100%; }

/* The teacher page of /academy. */
.t-teacher-head { display: flex; gap: 22px; align-items: flex-start; }
.t-teacher-head-text { flex: 1; min-width: 0; }
.t-teacher-head-text .t-page-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 4px; }
.t-teacher-real { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.t-teacher-head-text .t-academy-actions { margin-top: 10px; }
.t-pay-sum-4 { grid-template-columns: repeat(4, 1fr); }
.t-pay-sum .t-pay-due { font-size: 14px; font-weight: 600; }
.t-teacher-edit { margin-top: 12px; }
.t-teacher-edit > summary { list-style: none; cursor: pointer; display: inline-flex; }
.t-teacher-edit > summary::-webkit-details-marker { display: none; }
.t-teacher-edit[open] > summary { margin-bottom: 12px; }
@media (max-width: 700px) {
  .t-teacher-head { flex-direction: column; align-items: center; text-align: center; }
  .t-teacher-head-text .t-page-title, .t-teacher-head-text .t-academy-actions { justify-content: center; }
  .t-pay-sum-4 { grid-template-columns: 1fr 1fr; }
}
/* Long words in a grid cell must not push the page wider than a phone. */
.t-admin-content { min-width: 0; }
.t-pay-sum > div, .t-teacher-head-text { min-width: 0; overflow-wrap: anywhere; }

/* The back link sits first on every page, in the same place. */
.t-back-row { margin: 0 0 10px; }

/* ภาพรวม of /academy: range picker, number tiles, and charts drawn as SVG with fill colours. */
.t-academy-admin .t-side a:has(.t-ic-chart) { --chip: #ff6bb5; }
.t-icon-btn:has(.t-ic-trash) { --chip: #ff5f7e; }
.t-range { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; position: relative; }
.t-range-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; }
.t-chip { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none; font-weight: 600; transition: transform .15s, box-shadow .15s; }
.t-chip:hover { transform: translateY(-1px) rotate(-2deg); box-shadow: 0 4px 10px -6px #3aa0ff; border-color: #3aa0ff; }
.t-chip.on { background: #3aa0ff; border-color: #3aa0ff; color: #fff; }
.t-range-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.t-range-form label { display: flex; align-items: center; gap: 6px; margin: 0; }
.t-range-form input[type=date] { width: auto; }
.t-range-open { display: inline-flex; align-items: center; gap: 8px; }
.t-cal { position: absolute; right: 12px; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 22px 48px -20px rgba(0,0,0,.4); padding: 0; max-width: calc(100vw - 32px); }
.t-cal[hidden] { display: none; }
.t-cal-body { display: flex; }
.t-cal-presets { list-style: none; margin: 0; padding: 14px 10px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 132px; }
.t-cal-presets button { width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 8px 12px; font: inherit; color: var(--text); cursor: pointer; white-space: nowrap; }
.t-cal-presets button:hover { background: #eef6ff; }
.t-cal-presets button.on { background: #3aa0ff; color: #fff; font-weight: 600; }
.t-cal-side { padding: 16px 18px 8px; }
.t-cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.t-cal-year { font-size: 20px; }
.t-cal-year-one { display: none; font-size: 20px; }
.t-cal-nav { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-size: 20px; line-height: 1; color: var(--text); }
.t-cal-nav:hover { border-color: #8b5cf6; color: #6d28d9; }
.t-cal-months { display: flex; gap: 24px; }
.t-cal-month { width: 266px; }
.t-cal-title { text-align: center; font-size: 17px; height: 36px; line-height: 36px; }
.t-cal-title-year { display: none; }
.t-cal-grid { display: grid; grid-template-columns: repeat(7, 38px); row-gap: 4px; }
.t-cal-wd { font-weight: 700; color: var(--text); text-align: center; padding: 6px 0; }
.t-cal-grid button { border: 0; background: none; height: 36px; padding: 0; cursor: pointer; font: inherit; color: var(--text); border-radius: 6px; }
.t-cal-grid button:hover { background: #ede9fe; }
.t-cal-grid button.in, .t-cal-grid button.start, .t-cal-grid button.end { background: #8b5cf6; color: #fff; border-radius: 0; }
.t-cal-grid button.start, .t-cal-grid button.end { background: #6d28d9; font-weight: 700; }
.t-cal-grid button.l { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.t-cal-grid button.r { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.t-cal-grid button.today { box-shadow: inset 0 0 0 2px #ffad1f; }
.t-cal-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 10px 18px; }
.t-cal-foot strong span { font-weight: 400; color: var(--muted); }
.t-cal-hint { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) {
  .t-cal-second, .t-cal-year { display: none; }
  .t-cal-year-one { display: inline; }
}
@media (max-width: 640px) {
  .t-cal { left: 0; right: 0; }
  .t-cal-body { flex-direction: column; }
  .t-cal-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); min-width: 0; }
  .t-cal-presets li { flex: none; }
  .t-cal-presets button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }
  .t-cal-side { padding: 12px 10px 6px; }
  .t-cal-months { justify-content: center; }
  .t-cal-month { width: 100%; }
  .t-cal-grid { grid-template-columns: repeat(7, minmax(36px, 1fr)); }
}
.t-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.t-kpi { --kpi: #3aa0ff; position: relative; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px 18px; overflow: hidden; transition: transform .15s; }
.t-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--kpi); }
.t-kpi:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 10px 20px -14px var(--kpi); }
.t-kpi strong { font-size: 24px; line-height: 1.3; }
.t-kpi-label { font-weight: 600; }
.t-kpi-ic { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--kpi); color: #fff; transform: rotate(-8deg); }
.t-kpi-ic .t-ic { width: 20px; height: 20px; }
.t-kpi-blue { --kpi: #3aa0ff; } .t-kpi-pink { --kpi: #ff6bb5; } .t-kpi-green { --kpi: #2fbf71; } .t-kpi-red { --kpi: #ff5f7e; }
.t-kpi-orange { --kpi: #ff8a3d; } .t-kpi-purple { --kpi: #9b6bff; } .t-kpi-teal { --kpi: #12b5a6; }
.t-todo { border-left: 5px solid #ffad1f; }
.t-todo h3 { margin-top: 0; }
.t-todo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.t-todo a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.t-chart { display: block; width: 100%; height: auto; }
.t-chart-grid { stroke: #e9eef3; stroke-width: 1; }
.t-chart-axis { font-size: 11px; fill: var(--muted); font-family: var(--body); }
.t-chart-bar { transition: opacity .15s; }
.t-chart-bar:hover { opacity: .75; }
.t-chart-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.t-chart-grid2 > .t-card { margin-bottom: 0; min-width: 0; }
.t-chart-grid2 h3 { margin-top: 0; }
.t-chart-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.t-chart-rows li { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: 10px; }
.t-chart-row-name { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-chart-row-bar { width: 100%; height: 12px; display: block; }
.t-chart-track { fill: #eef2f6; }
.t-donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.t-donut { width: 140px; height: 140px; flex: none; margin: 0 auto; }
.t-chart-track-ring { fill: none; stroke: #eef2f6; stroke-width: 22; }
.t-donut-part { transition: transform .15s; transform-origin: 60px 60px; }
.t-donut-part:hover { transform: scale(1.05); }
.t-donut-num { font-size: 18px; font-weight: 700; fill: var(--text); font-family: var(--body); }
.t-donut-sub { font-size: 10px; fill: var(--muted); font-family: var(--body); }
.t-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1 1 220px; min-width: 0; }
.t-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 38px; align-items: center; gap: 8px; }
.t-legend li > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-legend li .t-muted { text-align: right; }
.t-legend-dot { width: 12px; height: 12px; }
.t-legend-inline { display: flex; gap: 14px; flex: none; min-width: 0; }
.t-legend-inline li { display: flex; gap: 6px; }
.t-income-form { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.t-income-form h3 { margin: 0 0 8px; }
@media (max-width: 900px) {
  .t-kpis { grid-template-columns: 1fr 1fr; }
  .t-chart-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .t-kpis { grid-template-columns: 1fr; }
  .t-kpi strong { font-size: 20px; }
}

/* With JS the range is one box that opens the one calendar. The two date boxes stay for pages without JS. */
.t-range-form.is-js label, .t-range-form.is-js > .t-btn { display: none; }
.t-range-open { display: inline-flex; align-items: center; gap: 10px; min-width: 260px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; font-weight: 600; color: var(--text); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.t-range-open:hover, .t-range-open[aria-expanded="true"] { border-color: #8b5cf6; box-shadow: 0 0 0 3px #ede9fe; }
.t-range-ic { width: 20px; height: 20px; fill: none; stroke: #8b5cf6; stroke-width: 2; stroke-linecap: round; flex: none; }
.t-range-caret { margin-left: auto; color: var(--muted); }
.t-range { flex-direction: row-reverse; }
@media (max-width: 640px) {
  .t-range { flex-direction: column; align-items: stretch; }
  .t-range-open { width: 100%; min-width: 0; }
}
.t-range .t-cal { left: 18px; right: auto; }
@media (max-width: 640px) { .t-range .t-cal { left: 0; right: 0; } }

/* หลังร้านครู, for teachers of an academy and teachers on their own: the same colour dots as /academy in the menu,
   the tabs, and the small icon buttons, and the icon tilts like a sticker on hover. Each icon has its own colour. */
.t-admin .t-side a, .t-admin .t-side-group > summary, .t-admin .t-tab, .t-admin .t-btn.icon { position: relative; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab):has(.t-ic-user, .t-ic-message) { --chip: #3aa0ff; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab, .t-btn.icon):has(.t-ic-image, .t-ic-chart, .t-ic-up) { --chip: #ff6bb5; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab, .t-btn.icon):has(.t-ic-phone, .t-ic-users, .t-ic-down) { --chip: #12b5a6; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab, .t-btn.icon):has(.t-ic-layout, .t-ic-lock, .t-ic-trash) { --chip: #ff5f7e; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab):has(.t-ic-book, .t-ic-cap, .t-ic-layers, .t-ic-external) { --chip: #9b6bff; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab):has(.t-ic-star, .t-ic-clock) { --chip: #ffad1f; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab):has(.t-ic-award, .t-ic-card) { --chip: #2fbf71; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab):has(.t-ic-camera, .t-ic-wallet) { --chip: #ff8a3d; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab):has(.t-ic-key) { --chip: #6c7a99; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab, .t-btn.icon) .t-ic:first-child { position: relative; z-index: 1; transition: transform .14s; }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab, .t-btn.icon)::before { content: ""; position: absolute; top: 50%; margin-top: -1px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--chip, transparent); opacity: .55; pointer-events: none; transition: transform .18s, opacity .18s; }
.t-admin :is(.t-side a, .t-side-group > summary)::before { left: 24px; }
.t-admin .t-tab::before { left: 28px; }
.t-admin .t-btn.icon::before { left: 50%; margin-left: -1px; }
.t-admin .t-side-group > summary > .t-ic:first-child { color: var(--dark); }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab):hover .t-ic:first-child { transform: rotate(-8deg) scale(1.1); }
.t-admin :is(.t-side a, .t-side-group > summary, .t-tab):hover::before { transform: scale(1.3); opacity: .45; }
.t-admin .t-btn.icon:not(:disabled):hover { border-color: var(--chip, var(--accent)); background: #fff; transform: translateY(-2px) rotate(-6deg); box-shadow: 0 6px 12px -6px var(--chip, var(--accent)); }
.t-admin .t-btn.icon:not(:disabled):hover::before { transform: scale(1.6); opacity: .4; }
.t-admin .t-btn.icon:disabled::before { opacity: .2; }
@media (prefers-reduced-motion: reduce) {
  .t-admin :is(.t-side a, .t-side-group > summary, .t-tab):hover .t-ic:first-child, .t-admin .t-btn.icon:not(:disabled):hover { transform: none; }
}

/* หลังร้าน: the link to หน้าร้าน, with copy and QR Code. */
.t-share .t-copy .t-btn { min-height: 48px; }
.t-qr { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
.t-qr[hidden] { display: none; }
.t-qr img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.t-qr .t-actions { margin-top: 8px; }
.t-share .t-btn .t-ic { transition: transform .14s; }
.t-share .t-btn:hover .t-ic { transform: rotate(-8deg) scale(1.1); }
@media (max-width: 640px) { .t-qr { grid-template-columns: minmax(0, 1fr); } .t-qr img { max-width: 300px; margin: 0 auto; } }
@media print {
  html.t-qr-printing body > *:not(main), html.t-qr-printing .t-side, html.t-qr-printing .t-admin-content > *:not(.t-share),
  html.t-qr-printing .t-share > *:not(.t-qr), html.t-qr-printing .t-qr-side { display: none !important; }
  html.t-qr-printing .t-admin-layout { display: block; padding: 0; }
  html.t-qr-printing body, html.t-qr-printing .t-admin-layout { background: #fff; }
  html.t-qr-printing .t-share { border: 0; padding: 0; box-shadow: none; background: #fff; }
  html.t-qr-printing .t-qr { display: block; }
  html.t-qr-printing .t-qr img { width: 120mm; max-width: none; margin: 20mm auto 0; border: 1px solid #c8ccd2; }
}
@media (prefers-reduced-motion: reduce) { .t-share .t-btn:hover .t-ic { transform: none; } }

/* หน้าร้าน: scroll reveal (fade in up). JS adds .t-rv only when the teacher turned it on, then .t-rv-in when it comes into view. */
.t-rv { opacity: 0; transform: translateY(36px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.t-rv.t-rv-in { opacity: 1; transform: none; }
@media print { .t-rv { opacity: 1; transform: none; } }

/* หน้าร้านธุรกิจ (templates/business/storefront.php): the parts a teacher page does not have. */
.t-about-in.is-text { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.t-about-video { margin-top: 24px; }
.t-faq-wrap { max-width: 860px; }
.t-faqs { display: grid; gap: 12px; margin-top: 36px; }
.t-faq { background: #fff; border: 1px solid var(--soft); border-radius: 12px; box-shadow: 0 4px 18px -10px rgba(0, 0, 0, .25); }
.t-faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; font-weight: 700; font-size: 17px; position: relative; }
.t-faq summary::-webkit-details-marker { display: none; }
.t-faq summary::after { content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px;
  border-radius: 50%; background: var(--accent); color: var(--dark); display: grid; place-items: center; font-size: 20px; line-height: 1; }
.t-faq[open] summary::after { content: '−'; }
.t-faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.t-faq-answer { padding: 0 22px 18px; }
.t-faq-answer p { margin: 0 0 10px; }
.t-faq-answer p:last-child { margin-bottom: 0; }
@media (max-width: 767px) {
  .t-faq summary { font-size: 16px; padding: 16px 52px 16px 18px; }
  .t-faq-answer { padding: 0 18px 16px; }
}
@media print { .t-faq-answer { display: block; } }

/* More colours (src/teacher.php TEACHER_THEMES). Dark colours take white text on them (--on-accent), and a lighter
   shade where the colour is text on a dark background (--accent-text). Light colours keep dark text. */
:root { --on-accent: #222222; --accent-text: var(--accent); }
[data-theme="navy"] { --accent: #1f4e8c; --accent-dark: #173d6e; --on-accent: #ffffff; --accent-text: #8db8ee; }
[data-theme="red"] { --accent: #c8342b; --accent-dark: #a82a22; --on-accent: #ffffff; --accent-text: #f2948c; }
[data-theme="forest"] { --accent: #1e7a4f; --accent-dark: #17613f; --on-accent: #ffffff; --accent-text: #7fd1a7; }
[data-theme="gold"] { --accent: #c29a5b; --accent-dark: #a9824a; --on-accent: #222222; --accent-text: #dcb97f; }
[data-theme="black"] { --accent: #1f1f1f; --accent-dark: #000000; --on-accent: #ffffff; --accent-text: #e0e0e0; }
[data-theme="charcoal"] { --accent: #4a4f57; --accent-dark: #383c42; --on-accent: #ffffff; --accent-text: #c3c8d0; }
[data-theme="copper"] { --accent: #b8693d; --accent-dark: #9a5531; --on-accent: #ffffff; --accent-text: #e6a37c; }
/* Black on a dark page would vanish, so there it turns into white on black. */
[data-theme="black"] .t-look-bold, [data-theme="black"] .t-look-luxe { --accent: #ededed; --accent-dark: #ffffff; --on-accent: #111111; --accent-text: #ffffff; }
.t-swatch-navy { background: #1f4e8c; }
.t-swatch-red { background: #c8342b; }
.t-swatch-forest { background: #1e7a4f; }
.t-swatch-gold { background: #c29a5b; }
.t-swatch-black { background: #1f1f1f; }
.t-swatch-charcoal { background: #4a4f57; }
.t-swatch-copper { background: #b8693d; }
.t-btn.primary, .t-btn.primary:hover, .t-play, .t-skip, .t-social:hover, .t-checks li::before, span.t-avatar, .t-faq summary::after, .t-preview-bar, .t-preview-bar a,
.t-cta h2, .t-cta p, .t-portrait-empty { color: var(--on-accent); }
.t-hero .t-label, .t-hero .t-hl, .t-course-meta, .t-stat-num, .t-stats .t-hl, .t-foot-head, .t-foot a:not(.t-social):hover, .t-nav a:not(.t-social):hover { color: var(--accent-text); }
[data-theme="navy"] .t-cta .t-hl, [data-theme="red"] .t-cta .t-hl, [data-theme="forest"] .t-cta .t-hl,
[data-theme="black"] .t-cta .t-hl, [data-theme="charcoal"] .t-cta .t-hl, [data-theme="copper"] .t-cta .t-hl { color: #ffe08a; }
[data-theme="black"] .t-look-bold .t-cta .t-hl, [data-theme="black"] .t-look-luxe .t-cta .t-hl { color: #9a5531; }

/* ธีมและจัดหน้าร้าน in หลังร้าน */
.t-start-group { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.t-start-group summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 17px; }
.t-start-group[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.t-start-card { cursor: default; }
.t-start-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.t-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.t-look-card { display: flex !important; flex-direction: column; gap: 6px; border: 2px solid var(--line); border-radius: 12px; padding: 10px; margin: 0 !important; cursor: pointer; background: #fff; }
.t-look-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.t-look-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 8px; background: var(--soft); }
.t-look-name { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.t-look-name input { width: 18px; height: 18px; margin: 0; }
.t-look-try { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin-top: auto; }
.t-look-try .t-ic { width: 16px; height: 16px; }
.t-arrange { list-style: none; margin: 0 0 16px; padding: 0; }
.t-arrange li { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
.t-arrange li.is-fixed { background: var(--soft); grid-template-columns: 190px 1fr; }
.t-arrange li.is-off > strong, .t-arrange li.is-off > input { opacity: .55; }
.t-arrange input[type=text] { margin: 0 !important; }
.t-arrange .t-muted { margin: 0; }
.t-arrange-tools { display: flex; align-items: center; gap: 8px; }
.t-arrange-tools .t-check { margin: 0 0 0 6px; }
@media (max-width: 767px) {
  .t-arrange li, .t-arrange li.is-fixed { grid-template-columns: 1fr; gap: 8px; }
}

/* Looks of หน้าร้าน (src/teacher_design.php). A look is a skin (.t-look-<skin>, plus .t-dark for a dark page) and a
   layout for each part (.v-<layout> on the hero, the services, the gallery and the reviews). เป็นกันเอง is everything above.
   Each skin sets --page (page colour), --ink (heading colour) and --hl-on-page (highlight on the page colour). */
:root { --page: #ffffff; --ink: #222222; --hl-on-page: var(--accent-dark); }

/* ---------- Hero layouts ---------- */
/* split, circle and center sit on the page colour instead of a dark picture. */
.t-hero.v-split, .t-hero.v-circle, .t-hero.v-center { background: var(--page); color: var(--text); }
.t-hero.v-split h1, .t-hero.v-circle h1, .t-hero.v-center h1, .t-hero.v-card h1 { color: var(--ink); }
.t-hero.v-split .t-hl, .t-hero.v-circle .t-hl, .t-hero.v-center .t-hl, .t-hero.v-card .t-hl,
.t-hero.v-split .t-label, .t-hero.v-circle .t-label, .t-hero.v-center .t-label, .t-hero.v-card .t-label { color: var(--hl-on-page); }
.t-hero.v-split .t-hero-text, .t-hero.v-circle .t-hero-text, .t-hero.v-center .t-hero-text, .t-hero.v-card .t-hero-text,
.t-hero.v-split .t-hero-academy, .t-hero.v-circle .t-hero-academy, .t-hero.v-center .t-hero-academy, .t-hero.v-card .t-hero-academy { color: var(--muted); }
.t-hero.v-split .t-btn.outline, .t-hero.v-circle .t-btn.outline, .t-hero.v-center .t-btn.outline, .t-hero.v-card .t-btn.outline { border-color: var(--ink); color: var(--ink); }
.t-hero.v-split .t-btn.outline:hover, .t-hero.v-circle .t-btn.outline:hover, .t-hero.v-center .t-btn.outline:hover, .t-hero.v-card .t-btn.outline:hover { background: var(--ink); color: var(--page); }
.t-hero.v-split.has-image::after, .t-hero.v-circle.has-image::after, .t-hero.v-center.has-image::after { display: none; }

.t-hero.v-split { padding: 110px 0; }
.t-hero.v-split.has-image .t-hero-bg { left: 50%; width: 50%; }
.t-hero.v-split.has-image .t-hero-in > * { max-width: 47%; }

.t-hero.v-circle { background: radial-gradient(circle at 80% 45%, var(--soft) 0 28%, transparent 28.5%), var(--page); padding: 90px 0 110px; }
.t-hero.v-circle.has-image .t-hero-bg { inset: auto; right: max(4vw, calc(50% - 560px)); top: 50%; transform: translateY(-50%); width: 430px; height: 430px;
  border-radius: 50%; border: 12px solid var(--page); box-shadow: 0 24px 50px -20px rgba(0,0,0,.35); }
.t-hero.v-circle.has-image .t-hero-in > * { max-width: 52%; }

.t-hero.v-center { display: flex; flex-direction: column; text-align: center; padding: 100px 0 80px; }
.t-hero.v-center .t-hero-in { order: 1; width: 100%; }
.t-hero.v-center h1, .t-hero.v-center .t-hero-text { margin-left: auto; margin-right: auto; }
.t-hero.v-center .t-actions { justify-content: center; }
.t-hero.v-center.has-image .t-hero-bg { order: 2; position: relative; inset: auto; display: block; width: min(1100px, calc(100% - 40px)); height: min(480px, 46vw);
  margin: 56px auto 0; border-radius: var(--radius); }

.t-hero.v-card.has-image::after { background: rgba(0,0,0,.18); }
.t-hero.v-card .t-hero-in { max-width: 620px; margin-left: max(20px, calc(50% - 550px)); background: var(--page); color: var(--text); padding: 46px 46px 42px;
  border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.t-hero.v-card h1 { font-size: 46px; }

/* Portrait: the teacher's own photo, tall and large, beside the words. No background photo. */
.t-hero.v-portrait, .t-hero.v-cover { background: var(--page); color: var(--text); }
.t-hero.v-portrait h1, .t-hero.v-cover h1 { color: var(--ink); }
.t-hero.v-portrait .t-hl, .t-hero.v-cover .t-hl, .t-hero.v-portrait .t-label, .t-hero.v-cover .t-label { color: var(--hl-on-page); }
.t-hero.v-portrait .t-hero-text, .t-hero.v-cover .t-hero-text, .t-hero.v-portrait .t-hero-academy, .t-hero.v-cover .t-hero-academy { color: var(--muted); }
.t-hero.v-portrait .t-btn.outline, .t-hero.v-cover .t-btn.outline { border-color: var(--ink); color: var(--ink); }
.t-hero.v-portrait .t-btn.outline:hover, .t-hero.v-cover .t-btn.outline:hover { background: var(--ink); color: var(--page); }
.t-hero.v-portrait { display: flex; align-items: center; min-height: 680px; padding: 80px 0;
  background: radial-gradient(circle at 92% 30%, var(--soft) 0 12%, transparent 12.5%), var(--page); }
.t-hero.v-portrait .t-hero-in { width: 100%; }
.t-hero.v-portrait.has-face .t-hero-in > :not(.t-hero-face) { max-width: calc(100% - 500px); }
.t-hero-face { display: block; object-fit: cover; }
.t-hero.v-portrait .t-hero-face { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 420px; height: 520px;
  border-radius: 210px 210px var(--radius) var(--radius); box-shadow: 24px 24px 0 var(--soft), 0 34px 60px -30px rgba(0,0,0,.45); }

/* Cover: the hero photo as a wide band, with the teacher's photo as a big circle over its lower edge. */
.t-hero.v-cover { padding: 0 0 72px; }
.t-hero.v-cover.has-image::after { display: none; }
.t-hero.v-cover.has-image .t-hero-bg { position: relative; inset: auto; display: block; width: 100%; height: 360px; }
.t-hero.v-cover:not(.has-image)::before { content: ""; display: block; height: 260px; background: linear-gradient(120deg, var(--accent), var(--soft)); }
.t-hero.v-cover.has-face .t-hero-in { padding-top: 34px; padding-left: 340px; min-height: 190px; }
.t-hero.v-cover .t-hero-face { position: absolute; left: 20px; top: -150px; width: 280px; height: 280px; border-radius: 50%;
  border: 10px solid var(--page); box-shadow: 0 24px 50px -22px rgba(0,0,0,.45); }

@media (max-width: 1024px) {
  .t-hero.v-portrait { min-height: 560px; }
  .t-hero.v-portrait.has-face .t-hero-in > :not(.t-hero-face) { max-width: calc(100% - 380px); }
  .t-hero.v-portrait .t-hero-face { width: 330px; height: 410px; border-radius: 165px 165px var(--radius) var(--radius); }
  .t-hero.v-cover.has-face .t-hero-in { padding-left: 280px; }
  .t-hero.v-cover .t-hero-face { width: 230px; height: 230px; top: -120px; }
}

@media (max-width: 767px) {
  .t-hero.v-portrait { display: block; min-height: 0; padding: 36px 0 56px; text-align: center; background: var(--page); }
  .t-hero.v-portrait.has-face .t-hero-in > :not(.t-hero-face) { max-width: none; }
  .t-hero.v-portrait .t-hero-face { position: relative; right: auto; top: auto; transform: none; width: min(280px, 78%); height: auto; aspect-ratio: 4 / 5;
    margin: 0 auto 34px; border-radius: 140px 140px var(--radius) var(--radius); box-shadow: 14px 14px 0 var(--soft); }
  .t-hero.v-portrait .t-actions, .t-hero.v-cover .t-actions { justify-content: center; }
  .t-hero.v-portrait h1, .t-hero.v-portrait .t-hero-text { margin-left: auto; margin-right: auto; }
  .t-hero.v-cover { padding-bottom: 50px; text-align: center; }
  .t-hero.v-cover.has-image .t-hero-bg { height: 210px; }
  .t-hero.v-cover:not(.has-image)::before { height: 160px; }
  .t-hero.v-cover.has-face .t-hero-in { padding: 0 20px; min-height: 0; }
  .t-hero.v-cover .t-hero-face { position: relative; left: auto; top: auto; width: 190px; height: 190px; margin: -100px auto 22px; border-width: 8px; }
}

@media (max-width: 767px) {
  .t-hero.v-split, .t-hero.v-circle { padding: 0 0 56px; }
  .t-hero.v-split:not(.has-image), .t-hero.v-circle:not(.has-image) { padding-top: 56px; }
  .t-hero.v-split.has-image .t-hero-bg { position: relative; left: 0; width: 100%; height: 240px; display: block; margin-bottom: 36px; }
  .t-hero.v-circle { background: var(--page); padding-top: 36px; }
  .t-hero.v-circle.has-image .t-hero-bg { position: relative; inset: auto; transform: none; display: block; width: 250px; height: 250px; margin: 0 auto 30px; }
  .t-hero.v-split.has-image .t-hero-in > *, .t-hero.v-circle.has-image .t-hero-in > * { max-width: none; }
  .t-hero.v-center { padding: 60px 0 50px; }
  .t-hero.v-center.has-image .t-hero-bg { height: 230px; margin-top: 36px; }
  .t-hero.v-card { padding: 200px 0 24px; }
  .t-hero.v-card .t-hero-in { margin: 0 16px; width: auto; padding: 28px 22px; }
  .t-hero.v-card h1 { font-size: 32px; }
}

/* ---------- Services layouts ---------- */
.t-courses.v-cards3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.t-courses.v-cards3 .t-course-top { padding: 22px 22px 18px; }
.t-courses.v-cards3 .t-course-top h3 { font-size: 20px; }
.t-courses.v-cards3 .t-course-body { padding: 20px 22px 24px; }

/* menu: name and price on one line with a dotted rule, details small below, like a menu card. */
.t-courses.v-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.t-courses.v-menu .t-course { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; background: none; box-shadow: none; border: 0;
  border-bottom: 1px dashed var(--line); border-radius: 0; padding: 22px 0; overflow: visible; }
.t-courses.v-menu .t-course-top, .t-courses.v-menu .t-course-body { display: contents; }
.t-courses.v-menu .t-course-top::after { display: none; }
.t-courses.v-menu .t-course-top h3 { grid-column: 1; grid-row: 1; margin: 0; font-size: 21px; color: var(--ink); }
.t-courses.v-menu .t-course-meta { grid-column: 1; grid-row: 2; margin: 2px 0 0; color: var(--hl-on-page); }
.t-courses.v-menu .t-price { grid-column: 2; grid-row: 1; margin: 0; padding: 0; font-size: 21px; color: var(--hl-on-page); white-space: nowrap; align-self: start; }
.t-courses.v-menu .t-checks, .t-courses.v-menu .t-course-body > p:not(.t-price) { grid-column: 1 / -1; grid-row: 3; margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.t-courses.v-menu .t-checks li { display: inline; padding: 0; margin: 0; }
.t-courses.v-menu .t-checks li::before { display: none; }
.t-courses.v-menu .t-checks li + li::before { content: " · "; display: inline; position: static; width: auto; height: auto; background: none; color: var(--muted); font-weight: 400; }
.t-courses.v-menu .t-course .t-btn { display: none; }

/* rows: one service per row, name, details, then price and button. */
.t-courses.v-rows { grid-template-columns: minmax(0, 1fr); gap: 16px; counter-reset: t-row; }
.t-courses.v-rows .t-course { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 230px; align-items: center; column-gap: 34px; padding: 28px 32px; counter-increment: t-row; }
.t-courses.v-rows .t-course-top { grid-column: 1; grid-row: 1 / span 2; background: none; border: 0; padding: 0; }
.t-courses.v-rows .t-course-top::before { content: counter(t-row, decimal-leading-zero); display: block; font-family: var(--head); font-weight: 700; font-size: 15px; color: var(--hl-on-page); margin-bottom: 4px; }
.t-courses.v-rows .t-course-top::after { display: none; }
.t-courses.v-rows .t-course-top h3 { color: var(--ink); }
.t-courses.v-rows .t-course-meta { color: var(--hl-on-page); }
.t-courses.v-rows .t-course-body { display: contents; }
.t-courses.v-rows .t-checks, .t-courses.v-rows .t-course-body > p:not(.t-price) { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.t-courses.v-rows .t-price { grid-column: 3; grid-row: 1; margin: 0; padding: 0; }
.t-courses.v-rows .t-course .t-btn { grid-column: 3; grid-row: 2; margin-top: 10px; }

@media (max-width: 1024px) { .t-courses.v-cards3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .t-courses.v-cards3, .t-courses.v-menu { grid-template-columns: minmax(0, 1fr); }
  .t-courses.v-rows .t-course { grid-template-columns: minmax(0, 1fr); padding: 22px; row-gap: 12px; }
  .t-courses.v-rows .t-course > *, .t-courses.v-rows .t-course-top, .t-courses.v-rows .t-checks, .t-courses.v-rows .t-course-body > p:not(.t-price),
  .t-courses.v-rows .t-price, .t-courses.v-rows .t-course .t-btn { grid-column: 1; grid-row: auto; }
}

/* ---------- Gallery layouts ---------- */
.t-gallery.v-grid, .t-gallery.v-grid.is-few { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: min(260px, 24vw); }
.t-gallery.v-grid li { grid-column: auto !important; grid-row: auto !important; }
.t-gallery.v-strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.t-gallery.v-strip li { flex: 0 0 min(440px, 80%); height: 330px; scroll-snap-align: start; }
.t-gallery.v-masonry { display: block; columns: 3 240px; column-gap: 14px; }
.t-gallery.v-masonry li { break-inside: avoid; margin: 0 0 14px; }
.t-gallery.v-masonry .t-shot, .t-gallery.v-masonry .t-shot img { height: auto; }
@media (max-width: 767px) {
  .t-gallery.v-grid, .t-gallery.v-grid.is-few { grid-template-columns: 1fr 1fr; grid-auto-rows: 40vw; }
  .t-gallery.v-strip li { height: 240px; }
  .t-gallery.v-masonry { columns: 2; column-gap: 8px; }
  .t-gallery.v-masonry li { margin-bottom: 8px; }
}

/* ---------- Review layouts ---------- */
.t-carousel.v-grid .t-track { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; row-gap: 70px; }
.t-carousel.v-grid .t-dots { display: none; }
.t-carousel.v-quote .t-track { grid-auto-columns: 100%; }
.t-carousel.v-quote .t-review { max-width: 860px; margin: 0 auto; width: 100%; text-align: center; background: none; border: 0; box-shadow: none; padding: 64px 6% 10px; }
.t-carousel.v-quote .t-avatar { margin-left: auto; margin-right: auto; }
.t-carousel.v-quote blockquote { font-family: var(--head); font-size: 25px; line-height: 1.6; color: var(--ink); }
.t-carousel.v-quote blockquote::before { content: "“"; display: block; font-size: 70px; line-height: .6; color: var(--accent); margin-bottom: 6px; }
@media (max-width: 1024px) { .t-carousel.v-grid .t-track { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .t-carousel.v-grid .t-track { grid-template-columns: minmax(0, 1fr); }
  .t-carousel.v-quote blockquote { font-size: 19px; }
}

/* ---------- Dark pages (.t-dark): shared by เข้ม and หรูหรา ---------- */
.t-dark { background: var(--page); color: var(--text); }
.t-dark h1, .t-dark h2, .t-dark h3 { color: var(--ink); }
.t-dark a { color: var(--accent-text); }
.t-dark .t-btn.dark { background: var(--ink); color: var(--page); }
.t-dark .t-btn.dark:hover { background: var(--accent); color: var(--on-accent); }
.t-dark .t-btn.ghost { border-color: var(--ink); color: var(--ink); }
.t-dark .t-label { color: var(--accent-text); }
.t-dark ul.t-facts li { background: var(--soft); }
.t-dark .t-facts strong { color: var(--accent-text); }
.t-dark .t-course { background: var(--card); box-shadow: none; border: 1px solid var(--line); }
.t-dark .t-course-top { background: var(--card); }
.t-dark .t-price { color: var(--ink); }
.t-dark .t-hicon { background: transparent; }
.t-dark .t-stats { background: var(--page); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.t-dark .t-stat-num { color: var(--ink); }
.t-dark .t-stat-label { color: var(--accent-text); }
.t-dark .t-shot { background: var(--soft); }
.t-dark .t-review { background: transparent; border: 1px solid var(--line); }
.t-dark .t-review blockquote, .t-dark .t-review figcaption strong { color: var(--ink); }
.t-dark .t-dot { background: #333; }
.t-dark .t-card, .t-dark .t-contact { background: var(--card); border-color: var(--line); }
.t-dark .t-year { background: var(--soft); }
.t-dark .t-faq { background: var(--card); border-color: var(--line); box-shadow: none; }
.t-dark .t-faq summary { color: var(--ink); }
.t-dark .t-socials.dark .t-social { background: var(--ink); color: var(--page); }
.t-dark .t-foot { background: var(--dark); }
.t-dark .t-bar { background: var(--card); border-top-color: var(--line); }
@media print { .t-dark { background: #fff; } }

/* ---------- สุภาพ น่าเชื่อถือ ---------- */
.t-look-formal { --head: 'Trirong', 'Noto Serif Thai', Georgia, serif; --body: 'Sarabun', 'Noto Sans Thai', sans-serif; --radius: 2px; --soft: #f4f1ea; --line: #e4dfd3;
  --teal: #1d2b3a; --page: #fbfaf7; --ink: #1d2b3a; background: var(--page); }
.t-look-formal h1, .t-look-formal h2, .t-look-formal h3 { font-weight: 600; color: #1d2b3a; }
.t-look-formal .t-btn { border-radius: 2px; }
.t-look-formal .t-label { font-family: var(--body); font-weight: 600; font-size: 14px; letter-spacing: .04em; color: var(--accent-dark); }
.t-look-formal .t-section h2::after { content: ""; display: block; width: 56px; height: 2px; background: var(--accent); margin-top: 18px; }
.t-look-formal .t-section h2.t-center::after { margin-left: auto; margin-right: auto; }
.t-look-formal .t-top { background: #fff; color: #1d2b3a; border-bottom: 1px solid var(--line); }
.t-look-formal .t-logo, .t-look-formal .t-nav a:not(.t-social) { color: #1d2b3a; }
.t-look-formal .t-nav a:not(.t-social):hover { color: var(--accent-dark); }
.t-look-formal .t-social { background: var(--soft); color: #1d2b3a; }
.t-look-formal .t-menu summary span { background: #1d2b3a; }
.t-look-formal .t-hero.v-split, .t-look-formal .t-hero.v-center { background: #fff; }
.t-look-formal .t-hero h1 { font-size: 54px; }
.t-look-formal .t-hero.v-split .t-label { border-left: 3px solid var(--accent); padding-left: 12px; }
.t-look-formal .t-portrait { border-radius: 0; background: var(--soft); box-shadow: 22px 22px 0 var(--line); }
.t-look-formal ul.t-facts li { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.t-look-formal .t-course { border-radius: 0; box-shadow: none; border: 1px solid var(--line); }
.t-look-formal .t-course-top { background: #fff; border-top: 3px solid var(--accent); border-bottom: 1px solid var(--line); }
.t-look-formal .t-course-top h3 { color: #1d2b3a; }
.t-look-formal .t-course-meta, .t-look-formal .t-price { color: var(--accent-dark); }
.t-look-formal .t-price { font-weight: 600; }
.t-look-formal .t-hicon { background: transparent; border: 1px solid var(--accent); }
.t-look-formal .t-stats { background: #1d2b3a; }
.t-look-formal .t-stat-num { font-weight: 600; }
.t-look-formal .t-shot, .t-look-formal .t-contact, .t-look-formal .t-map, .t-look-formal .t-card { border-radius: 0; }
.t-look-formal .t-track { padding-top: 10px; }
.t-look-formal .t-carousel.v-grid .t-track { row-gap: 24px; }
.t-look-formal .t-review { background: #fff; border-top: 3px solid var(--accent); padding: 30px; text-align: left; border-radius: 0; }
.t-look-formal .t-avatar { position: static; transform: none; width: 64px; height: 64px; border: 0; font-size: 26px; margin: 0 0 14px; }
.t-look-formal .t-review blockquote { font-family: var(--head); font-style: italic; font-size: 18px; }
.t-look-formal .t-cta { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.t-look-formal .t-cta h2, .t-look-formal .t-cta p { color: #1d2b3a; }
.t-look-formal .t-cta .t-hl { color: var(--accent-dark); text-shadow: none; }
.t-look-formal .t-faq { border-radius: 0; box-shadow: none; border: 1px solid var(--line); }
.t-look-formal .t-foot { background: #16212d; }
@media (max-width: 767px) {
  .t-look-formal .t-hero h1 { font-size: 36px; }
  .t-look-formal .t-menu[open] .t-nav { background: #fff; border-top-color: var(--line); }
  .t-look-formal .t-menu[open] .t-nav a:not(.t-social) { border-bottom-color: var(--line); }
}

/* ---------- เข้ม โมเดิร์น ---------- */
.t-look-bold { --head: 'Kanit', 'Noto Sans Thai', sans-serif; --soft: #1c1c1c; --card: #141414; --line: #2a2a2a; --text: #d8d8d8; --muted: #a3a3a3; --teal: #e9e9e9;
  --radius: 0px; --dark: #000000; --page: #0e0e0e; --ink: #ffffff; --hl-on-page: var(--accent-text); }
.t-look-bold h1, .t-look-bold h2, .t-look-bold h3 { font-weight: 800; }
.t-look-bold .t-btn { border-radius: 0; }
.t-look-bold .t-label { font-family: var(--head); font-weight: 600; font-size: 14px; letter-spacing: .06em; }
.t-look-bold .t-section .t-center { text-align: left; }
.t-look-bold .t-section h2 { font-size: 54px; line-height: 1.08; }
.t-look-bold .t-top { background: rgba(14,14,14,.94); border-bottom: 1px solid #222; }
.t-look-bold .t-hero.v-full { min-height: 640px; display: flex; align-items: flex-end; padding: 140px 0 90px; }
.t-look-bold .t-hero.v-full .t-hero-in { width: 100%; }
.t-look-bold .t-hero.v-full.has-image::after { background: linear-gradient(0deg, #0e0e0e 3%, rgba(0,0,0,.3) 55%, rgba(0,0,0,.55)); }
.t-look-bold .t-hero h1 { font-size: 82px; line-height: 1.04; }
.t-look-bold .t-hero.v-split h1, .t-look-bold .t-hero.v-card h1 { font-size: 60px; }
.t-look-bold .t-portrait { border-radius: 0; box-shadow: 16px 16px 0 var(--accent); }
.t-look-bold ul.t-facts li { border-radius: 0; }
.t-look-bold .t-courses { counter-reset: bold-course; }
.t-look-bold .t-courses.v-cards2 { gap: 16px; }
.t-look-bold .t-course { border-radius: 0; counter-increment: bold-course; }
.t-look-bold .t-course-top { border-bottom: 2px solid var(--accent); padding-right: 96px; position: relative; }
.t-look-bold .t-course-top::after { content: counter(bold-course, decimal-leading-zero); position: absolute; right: 24px; top: 16px; font-family: var(--head); font-weight: 800; font-size: 52px; line-height: 1; color: #2a2a2a; }
.t-look-bold .t-hicon { border: 2px solid var(--accent); border-radius: 0; }
.t-look-bold .t-highlight { text-align: left; }
.t-look-bold .t-stat-num { font-size: 72px; }
.t-look-bold .t-gallery { gap: 4px; }
.t-look-bold .t-shot { border-radius: 0; }
.t-look-bold .t-track { padding-top: 10px; }
.t-look-bold .t-carousel.v-grid .t-track { row-gap: 24px; }
.t-look-bold .t-review { text-align: left; padding: 32px; border-radius: 0; }
.t-look-bold .t-avatar { position: static; transform: none; width: 60px; height: 60px; border: 0; border-radius: 0; font-size: 26px; margin: 0 0 16px; }
.t-look-bold img.t-avatar { filter: grayscale(1); }
.t-look-bold .t-review blockquote { font-size: 18px; }
.t-look-bold .t-card, .t-look-bold .t-contact, .t-look-bold .t-faq, .t-look-bold .t-map { border-radius: 0; }
@media (max-width: 1024px) { .t-look-bold .t-hero h1 { font-size: 60px; } }
@media (max-width: 767px) {
  .t-look-bold .t-hero.v-full { min-height: 520px; padding: 100px 0 56px; }
  .t-look-bold .t-hero h1, .t-look-bold .t-hero.v-split h1 { font-size: 42px; }
  .t-look-bold .t-section h2 { font-size: 34px; }
  .t-look-bold .t-stat-num { font-size: 48px; }
  .t-look-bold .t-portrait { box-shadow: 10px 10px 0 var(--accent); }
}

/* ---------- สนุก น่ารัก ---------- */
.t-look-fun { --head: 'Mitr', 'Noto Sans Thai', sans-serif; --radius: 26px; --soft: #fdeef2; --soft: color-mix(in srgb, var(--accent) 14%, #fff);
  --page: #fffafb; --page: color-mix(in srgb, var(--accent) 4%, #fff); --teal: #5b3442; --ink: #4a2a37; background: var(--page); }
.t-look-fun h1, .t-look-fun h2, .t-look-fun h3 { font-weight: 500; color: #4a2a37; }
.t-look-fun .t-btn { border-radius: 99px; }
.t-look-fun .t-btn.primary { box-shadow: 0 5px 0 var(--accent-dark); }
.t-look-fun .t-btn.primary:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--accent-dark); }
.t-look-fun .t-label, .t-look-fun .t-hero .t-label { display: table; font-family: var(--head); font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 15px;
  background: var(--accent); color: var(--on-accent); border-radius: 99px; padding: 3px 16px; margin-bottom: 12px; }
.t-look-fun .t-label.t-center, .t-look-fun .t-hero.v-center .t-label { margin-left: auto; margin-right: auto; }
.t-look-fun .t-top { background: #fff; box-shadow: 0 4px 20px -12px rgba(0,0,0,.25); }
.t-look-fun .t-logo, .t-look-fun .t-nav a:not(.t-social) { color: #4a2a37; }
.t-look-fun .t-nav a:not(.t-social):hover { color: var(--accent-dark); }
.t-look-fun .t-social { background: var(--soft); color: #4a2a37; }
.t-look-fun .t-menu summary span { background: #4a2a37; }
.t-look-fun .t-hero.v-split, .t-look-fun .t-hero.v-center { background: radial-gradient(circle at 8% 92%, #fff1c9 0 11%, transparent 11.5%), var(--page); }
.t-look-fun .t-hero .t-btn.outline { border-color: transparent; background: #fff; color: #4a2a37; box-shadow: 0 5px 0 var(--soft); }
.t-look-fun .t-hero.v-center.has-image .t-hero-bg { border-radius: 36px; border: 10px solid #fff; }
.t-look-fun .t-section.t-soft { position: relative; }
.t-look-fun .t-section.t-soft::before { content: ""; position: absolute; left: 0; right: 0; top: -28px; height: 28px; background: radial-gradient(circle at 30px 30px, var(--soft) 29px, transparent 30px) 0 0 / 60px 60px repeat-x; }
.t-look-fun .t-portrait { border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%; border: 10px solid #fff; box-shadow: 0 24px 50px -24px rgba(0,0,0,.35); background: var(--soft); }
.t-look-fun ul.t-facts li { border-radius: 99px; background: #fff; box-shadow: 0 4px 14px -8px rgba(0,0,0,.25); }
.t-look-fun .t-course { border-radius: 28px; box-shadow: 0 14px 34px -18px rgba(0,0,0,.3); }
.t-look-fun .t-course-top { background: var(--accent); border-bottom: 0; }
.t-look-fun .t-course-top h3, .t-look-fun .t-course-top .t-course-meta { color: var(--on-accent); }
.t-look-fun .t-price { display: inline-block; align-self: flex-start; background: #fff1c9; color: #4a2a37; border-radius: 99px; padding: 4px 18px; font-family: var(--head); font-weight: 500; font-size: 20px; }
.t-look-fun .t-courses.v-menu .t-price, .t-look-fun .t-courses.v-rows .t-price { padding: 2px 14px; justify-self: start; }
.t-look-fun .t-hicon { border: 0; background: #fff; box-shadow: 0 10px 24px -12px rgba(0,0,0,.3); }
.t-look-fun .t-stats.v-boxes .t-stats-in { grid-template-columns: repeat(auto-fit, minmax(170px, 210px)); justify-content: center; }
.t-look-fun .t-stats.v-boxes .t-stat { background: #fff; border-radius: 50%; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; box-shadow: 0 14px 30px -16px rgba(0,0,0,.3); }
.t-look-fun .t-stats:not(.v-band) .t-stat-num { color: var(--accent-dark); font-family: var(--head); font-weight: 500; font-size: 40px; }
.t-look-fun .t-stats:not(.v-band) .t-stat-label { color: #6d5560; font-size: 15px; }
.t-look-fun .t-shot { border-radius: 26px; }
.t-look-fun .t-gallery.v-grid li:nth-child(odd) .t-shot, .t-look-fun .t-gallery.v-mosaic li:nth-child(odd) .t-shot { transform: rotate(-1.5deg); }
.t-look-fun .t-gallery.v-grid li:nth-child(even) .t-shot, .t-look-fun .t-gallery.v-mosaic li:nth-child(even) .t-shot { transform: rotate(1.5deg); }
.t-look-fun .t-review { background: #fff; border-radius: 30px; box-shadow: 0 14px 30px -20px rgba(0,0,0,.3); }
.t-look-fun .t-carousel.v-quote .t-review { background: #fff; }
.t-look-fun .t-avatar { border-color: #fff1c9; }
.t-look-fun .t-cta.v-box .t-cta-in { border-radius: 36px; }
.t-look-fun .t-cta.v-box .t-hl, .t-look-fun .t-cta.v-band .t-hl { color: #fff1c9; }
.t-look-fun .t-contact, .t-look-fun .t-map { border-radius: 30px; }
.t-look-fun .t-faq { border-radius: 22px; }
.t-look-fun .t-foot { background: #4a2a37; border-radius: 40px 40px 0 0; }
@media (max-width: 767px) {
  .t-look-fun .t-stats.v-boxes .t-stats-in { grid-template-columns: repeat(2, minmax(0, 160px)); gap: 16px; }
  .t-look-fun .t-stat-num { font-size: 30px; }
  .t-look-fun .t-menu[open] .t-nav { background: #fff; border-top-color: var(--soft); }
  .t-look-fun .t-menu[open] .t-nav a:not(.t-social) { border-bottom-color: var(--soft); }
}

/* ---------- มินิมอล: white, thin type, thin lines, no shadows ---------- */
.t-look-minimal { --head: 'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif; --body: 'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif; --radius: 4px; --soft: #f5f5f3;
  --line: #e6e6e3; --teal: #111111; --muted: #6b6b6b; --page: #ffffff; --ink: #111111; background: #fff; }
.t-look-minimal h1, .t-look-minimal h2, .t-look-minimal h3 { font-weight: 500; color: #111; letter-spacing: -.005em; }
.t-look-minimal h1 { font-weight: 400; }
.t-look-minimal .t-section { padding: 110px 0; }
.t-look-minimal .t-label { font-family: var(--body); font-weight: 500; font-size: 13px; letter-spacing: .06em; color: var(--muted); }
.t-look-minimal .t-hero.v-split .t-label, .t-look-minimal .t-hero.v-center .t-label { color: var(--muted); }
.t-look-minimal .t-btn { border-radius: 4px; font-weight: 500; }
.t-look-minimal .t-top { background: #fff; border-bottom: 1px solid var(--line); }
.t-look-minimal .t-logo, .t-look-minimal .t-nav a:not(.t-social) { color: #111; font-weight: 500; }
.t-look-minimal .t-nav a:not(.t-social):hover { color: var(--accent-dark); }
.t-look-minimal .t-social { background: var(--soft); color: #111; }
.t-look-minimal .t-menu summary span { background: #111; }
.t-look-minimal .t-portrait { border-radius: 4px; background: var(--soft); box-shadow: none; }
.t-look-minimal ul.t-facts li { background: #fff; border: 1px solid var(--line); border-radius: 99px; }
.t-look-minimal .t-course { box-shadow: none; border: 1px solid var(--line); border-radius: 4px; }
.t-look-minimal .t-course-top { background: #fff; border-bottom: 1px solid var(--line); }
.t-look-minimal .t-course-top h3 { color: #111; }
.t-look-minimal .t-course-meta { color: var(--accent-dark); }
.t-look-minimal .t-price { font-weight: 500; }
.t-look-minimal .t-checks li::before { background: transparent; border: 1px solid var(--accent); color: var(--accent-dark); }
.t-look-minimal .t-hicon { background: transparent; border: 1px solid var(--line); }
.t-look-minimal .t-stats, .t-look-minimal .t-stats.has-image { background: var(--soft) !important; color: #111; padding: 80px 0; }
.t-look-minimal .t-stats.has-image::after { display: none; }
.t-look-minimal .t-stat-num { color: #111; font-weight: 400; }
.t-look-minimal .t-stat-label { color: var(--muted); }
.t-look-minimal .t-shot { border-radius: 4px; }
.t-look-minimal .t-review { background: #fff; border: 1px solid var(--line); }
.t-look-minimal .t-avatar { border-color: #fff; }
.t-look-minimal .t-cta { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.t-look-minimal .t-cta h2 { color: #111; font-weight: 400; }
.t-look-minimal .t-cta p { color: var(--muted); }
.t-look-minimal .t-cta .t-hl { color: var(--accent-dark); text-shadow: none; }
.t-look-minimal .t-contact { border: 1px solid var(--line); }
.t-look-minimal .t-faq { box-shadow: none; border: 1px solid var(--line); border-radius: 4px; }
.t-look-minimal .t-foot { background: #111; }
@media (max-width: 767px) {
  .t-look-minimal .t-section { padding: 70px 0; }
  .t-look-minimal .t-menu[open] .t-nav { background: #fff; border-top-color: var(--line); }
  .t-look-minimal .t-menu[open] .t-nav a:not(.t-social) { border-bottom-color: var(--line); }
}

/* ---------- หรูหรา: a warm black page, a fine serif, thin lines in the accent colour ---------- */
.t-look-luxe { --head: 'Taviraj', 'Noto Serif Thai', Georgia, serif; --body: 'Sarabun', 'Noto Sans Thai', sans-serif; --radius: 0px; --page: #100e0c; --ink: #f4ead8;
  --text: #cfc6b8; --muted: #a59c8f; --soft: #18150f; --card: #15120e; --line: #2e2820; --teal: #f4ead8; --dark: #0b0a08; --hl-on-page: var(--accent-text); }
.t-look-luxe h1, .t-look-luxe h2, .t-look-luxe h3 { font-weight: 500; }
.t-look-luxe .t-hl { color: var(--accent-text); }
.t-look-luxe .t-label { font-family: var(--body); font-weight: 400; font-size: 14px; letter-spacing: .08em; }
.t-look-luxe .t-section h2::after { content: ""; display: block; width: 70px; height: 1px; background: var(--accent); margin-top: 18px; }
.t-look-luxe .t-section h2.t-center::after { margin-left: auto; margin-right: auto; }
.t-look-luxe .t-btn { border-radius: 0; font-weight: 600; letter-spacing: .02em; }
.t-look-luxe .t-btn.outline { border-color: var(--accent-text); color: var(--ink); }
.t-look-luxe .t-top { background: rgba(16,14,12,.95); border-bottom: 1px solid var(--line); }
.t-look-luxe .t-logo { letter-spacing: .04em; font-weight: 500; }
.t-look-luxe .t-hero.v-card .t-hero-in { border: 1px solid var(--line); }
.t-look-luxe .t-portrait { border-radius: 0; background: var(--soft); box-shadow: 18px 18px 0 -1px var(--page), 18px 18px 0 0 var(--accent); }
.t-look-luxe ul.t-facts li { border-radius: 0; border: 1px solid var(--line); background: transparent; }
.t-look-luxe .t-course { border-radius: 0; }
.t-look-luxe .t-course-top { border-bottom: 1px solid var(--line); }
.t-look-luxe .t-course-meta { color: var(--accent-text); }
.t-look-luxe .t-price { font-family: var(--head); font-weight: 500; }
.t-look-luxe .t-hicon { border: 1px solid var(--accent); }
.t-look-luxe .t-stat-num { font-weight: 500; }
.t-look-luxe .t-shot { border-radius: 0; }
.t-look-luxe .t-review { border-radius: 0; }
.t-look-luxe .t-avatar { border-color: var(--page); }
.t-look-luxe .t-cta { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.t-look-luxe .t-cta h2 { color: var(--ink); }
.t-look-luxe .t-cta p { color: var(--text); }
.t-look-luxe .t-cta .t-hl { color: var(--accent-text); text-shadow: none; }
.t-look-luxe .t-card, .t-look-luxe .t-contact, .t-look-luxe .t-faq, .t-look-luxe .t-map { border-radius: 0; }
.t-look-fun .t-hero.v-circle { background: radial-gradient(circle at 80% 45%, var(--soft) 0 28%, transparent 28.5%), radial-gradient(circle at 8% 92%, #fff1c9 0 11%, transparent 11.5%), var(--page); }
.t-look-fun .t-hero.v-circle.has-image .t-hero-bg { border-color: #fff; }
@media (max-width: 767px) { .t-look-fun .t-hero.v-circle { background: var(--page); } }

/* แบบจัดวาง in หลังร้าน */
.t-variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; margin: 0 0 24px; }
.t-variants label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; margin: 0; }
.t-variants select { margin: 0 !important; font-weight: 400; }

/* A full picture hero keeps light text whatever the skin's heading colour is. */
.t-store .t-hero.v-full h1 { color: #fff; }
.t-store:not(.t-look-fun) .t-hero.v-full .t-label { color: var(--accent-text); }
.t-store .t-hero.v-full .t-hero-text, .t-store .t-hero.v-full .t-hero-academy { color: #eef1f3; }

/* ---------- About layouts ---------- */
.t-about-in.v-flip:not(.is-text) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.t-about-in.v-flip .t-about-photo { order: -1; }
.t-about-in.v-flip .t-portrait { margin-left: 0; margin-right: auto; }
.t-about-in.v-banner:not(.is-text) { grid-template-columns: minmax(0, 1fr); max-width: 960px; gap: 44px; }
.t-about-in.v-banner .t-about-photo { order: -1; }
.t-about-in.v-banner .t-portrait { max-width: none; aspect-ratio: 21 / 9; border-radius: var(--radius); box-shadow: none; border: 0; }
.t-look-luxe .t-about-in.v-banner .t-portrait, .t-look-formal .t-about-in.v-banner .t-portrait { box-shadow: none; }
@media (max-width: 767px) {
  .t-about-in.v-flip:not(.is-text) { grid-template-columns: 1fr; }
  .t-about-in.v-flip .t-portrait { margin: 0 auto; }
  .t-about-in.v-banner .t-portrait { aspect-ratio: 4 / 3; max-width: none; }
}

/* ---------- Highlight layouts ---------- */
.t-highlights.v-cards .t-highlight { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 22px; }
.t-highlights.v-cards .t-hicon { width: 62px; height: 62px; font-size: 28px; border-width: 2px; margin-bottom: 14px; }
.t-highlights.v-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 56px; max-width: 980px; margin: 0 auto; }
.t-highlights.v-list .t-highlight { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 20px; align-items: start; text-align: left; }
.t-highlights.v-list .t-hicon { grid-row: 1 / span 2; width: 64px; height: 64px; font-size: 28px; border-width: 2px; margin: 0; }
.t-highlights.v-list .t-highlight h3 { margin: 4px 0 4px; }
.t-highlights.v-list .t-highlight p { margin: 0; }
@media (max-width: 767px) {
  .t-highlights.v-cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .t-highlights.v-list { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

/* ---------- Number layouts ---------- */
.t-stats.v-plain, .t-stats.v-boxes { background: var(--page); color: var(--text); }
.t-stats.v-plain { padding: 64px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.t-stats.v-plain .t-stat + .t-stat { border-left: 1px solid var(--line); }
.t-stats.v-boxes { padding: 70px 0; }
.t-stats.v-boxes .t-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 20px; }
.t-stats.v-plain .t-stat-num, .t-stats.v-boxes .t-stat-num { color: var(--ink); }
.t-stats.v-plain .t-stat-label, .t-stats.v-boxes .t-stat-label { color: var(--muted); }
.t-look-fun .t-stats.v-boxes .t-stat { border: 0; }
@media (max-width: 767px) {
  .t-stats.v-plain .t-stat + .t-stat { border-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
}

/* ---------- Question layouts (business) ---------- */
.t-faq-wrap.v-two, .t-faq-wrap.v-side { max-width: 1140px; }
.t-faq-wrap.v-two .t-faqs { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.t-faq-wrap.v-side { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); grid-template-rows: auto auto 1fr; column-gap: 64px; align-items: start; }
.t-faq-wrap.v-side > .t-label, .t-faq-wrap.v-side > h2 { grid-column: 1; text-align: left; }
.t-faq-wrap.v-side > h2::after { margin-left: 0 !important; }
.t-faq-wrap.v-side .t-faqs { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
.t-look-fun .t-faq-wrap.v-side > .t-label { margin-left: 0; }
@media (max-width: 767px) {
  .t-faq-wrap.v-two .t-faqs { grid-template-columns: minmax(0, 1fr); }
  .t-faq-wrap.v-side { display: block; }
  .t-faq-wrap.v-side .t-faqs { margin-top: 30px; }
}

/* ---------- Call to action layouts ---------- */
.t-store .t-cta.v-box { background: transparent; border: 0; padding: 10px 0 70px; }
.t-store .t-cta.v-box .t-cta-in { background: var(--accent); border-radius: calc(var(--radius) + 12px); padding: 46px 50px; }
.t-store .t-cta.v-box h2, .t-store .t-cta.v-box p { color: var(--on-accent); }
.t-store .t-cta.v-center { background: var(--page); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 80px 0; }
.t-store .t-cta.v-center .t-cta-in { flex-direction: column; justify-content: center; text-align: center; gap: 22px; }
.t-store .t-cta.v-center h2 { color: var(--ink); font-size: 42px; }
.t-store .t-cta.v-center p { color: var(--muted); }
.t-store .t-cta.v-center .t-hl { color: var(--hl-on-page); text-shadow: none; }
.t-store .t-cta.v-center .t-btn.dark { background: var(--accent); color: var(--on-accent); }
@media (max-width: 767px) {
  .t-store .t-cta.v-box .t-cta-in { padding: 32px 24px; }
  .t-store .t-cta.v-center h2 { font-size: 30px; }
}

/* ---------- Contact layouts ---------- */
.t-contact:not(:has(.t-map)) { grid-template-columns: minmax(0, 1fr); }
.t-contact:not(:has(.t-map)) .t-contact-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 30px; }
.t-contact:not(:has(.t-map)) .t-contact-info > .t-actions, .t-contact:not(:has(.t-map)) .t-contact-info > .t-socials { grid-column: 1 / -1; }
.t-contact.v-split { background: var(--accent); color: var(--on-accent); padding: 0; gap: 0; overflow: hidden; border: 0; }
.t-contact.v-split .t-contact-info { padding: 40px; }
.t-contact.v-split .t-contact-info strong, .t-contact.v-split .t-contact-info a:not(.t-btn) { color: var(--on-accent); }
.t-contact.v-split .t-map { height: 100%; min-height: 380px; border-radius: 0; }
.t-contact.v-center { text-align: center; max-width: 860px; margin: 0 auto; padding: 40px; }
.t-contact.v-center:has(.t-map) { grid-template-columns: minmax(0, 1fr); max-width: none; }
.t-contact.v-center .t-actions, .t-contact.v-center .t-socials { justify-content: center; }
@media (max-width: 767px) {
  .t-contact.v-split .t-contact-info { padding: 26px 22px; }
  .t-contact.v-split .t-map { min-height: 260px; }
  .t-contact.v-center { padding: 26px 20px; }
}

/* ---------- เทคโนโลยี: square type, grid lines, crisp borders ---------- */
.t-look-tech { --head: 'Chakra Petch', 'Noto Sans Thai', sans-serif; --body: 'Sarabun', 'Noto Sans Thai', sans-serif; --radius: 6px; --page: #f5f8fc; --ink: #0d1b2e;
  --soft: #e9eff7; --line: #d3dce8; --teal: #0d1b2e; --muted: #5b6b80; --dark: #0d1b2e; background: var(--page); }
.t-look-tech h1, .t-look-tech h2, .t-look-tech h3 { font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.t-look-tech .t-label { font-family: var(--head); font-weight: 600; font-size: 14px; letter-spacing: .04em; color: var(--accent-dark); }
.t-look-tech .t-label::before { content: "// "; opacity: .6; }
.t-look-tech .t-btn { border-radius: 6px; }
.t-look-tech .t-top { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.t-look-tech .t-logo, .t-look-tech .t-nav a:not(.t-social) { color: var(--ink); }
.t-look-tech .t-nav a:not(.t-social):hover { color: var(--accent-dark); }
.t-look-tech .t-social { background: var(--soft); color: var(--ink); }
.t-look-tech .t-menu summary span { background: var(--ink); }
.t-look-tech .t-hero.v-split, .t-look-tech .t-hero.v-center, .t-look-tech .t-hero.v-circle {
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 44px 44px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 44px 44px, var(--page); }
.t-look-tech .t-hero.v-split .t-label, .t-look-tech .t-hero.v-center .t-label { color: var(--accent-dark); }
.t-look-tech .t-portrait { border-radius: 6px; background: var(--soft); box-shadow: 14px 14px 0 -1px var(--page), 14px 14px 0 0 var(--ink); }
.t-look-tech ul.t-facts li { border-radius: 4px; background: #fff; border: 1px solid var(--line); font-family: var(--head); }
.t-look-tech .t-course { border-radius: 6px; box-shadow: none; border: 1px solid var(--line); position: relative; }
.t-look-tech .t-course::before { content: ""; position: absolute; left: -1px; top: -1px; width: 44px; height: 4px; background: var(--accent); border-radius: 6px 0 0 0; z-index: 1; }
.t-look-tech .t-courses.v-menu .t-course::before { display: none; }
.t-look-tech .t-course-top { background: #fff; border-bottom: 1px solid var(--line); }
.t-look-tech .t-course-top h3 { color: var(--ink); }
.t-look-tech .t-course-meta { color: var(--accent-dark); font-family: var(--head); }
.t-look-tech .t-price { color: var(--ink); }
.t-look-tech .t-checks li::before { border-radius: 3px; }
.t-look-tech .t-hicon { border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.t-look-tech .t-stats.v-band { background: var(--ink); }
.t-look-tech .t-stat-num { font-family: var(--head); font-weight: 700; }
.t-look-tech .t-shot { border-radius: 6px; }
.t-look-tech .t-review { background: #fff; border: 1px solid var(--line); }
.t-look-tech .t-avatar { border-color: var(--page); border-radius: 10px; }
.t-look-tech .t-carousel.v-quote .t-review { background: transparent; border: 0; }
.t-look-tech .t-cta.v-band { background: var(--ink); }
.t-look-tech .t-cta.v-band h2, .t-look-tech .t-cta.v-band p { color: #fff; }
.t-look-tech .t-cta.v-band .t-hl { color: var(--accent-text); text-shadow: none; }
.t-look-tech .t-cta.v-band .t-btn.dark { background: var(--accent); color: var(--on-accent); }
.t-look-tech .t-faq { border-radius: 6px; box-shadow: none; border: 1px solid var(--line); }
.t-look-tech .t-faq summary::after { border-radius: 4px; }
.t-look-tech .t-contact { border: 1px solid var(--line); }
.t-look-tech .t-foot { background: var(--ink); }
@media (max-width: 767px) {
  .t-look-tech .t-menu[open] .t-nav { background: #fff; border-top-color: var(--line); }
  .t-look-tech .t-menu[open] .t-nav a:not(.t-social) { border-bottom-color: var(--line); }
}

/* ---------- ธรรมชาติ: earthy cream page, serif headings, arches and soft corners ---------- */
.t-look-natural { --head: 'Noto Serif Thai', Georgia, serif; --body: 'Sarabun', 'Noto Sans Thai', sans-serif; --radius: 16px; --page: #f5efe4; --ink: #3a3124;
  --text: #4a4034; --muted: #7b6e5d; --soft: #ebe1cf; --line: #dccfb8; --card: #fffaf1; --teal: #3a3124; --dark: #2f281e; --hl-on-page: var(--accent-dark); background: var(--page); }
.t-look-natural h1, .t-look-natural h2, .t-look-natural h3 { font-weight: 600; color: var(--ink); }
.t-look-natural .t-label { font-family: var(--head); font-weight: 500; font-size: 15px; letter-spacing: .02em; color: var(--accent-dark); }
.t-look-natural .t-label::before { content: "— "; }
.t-look-natural .t-btn { border-radius: 99px; }
.t-look-natural .t-top { background: rgba(245,239,228,.96); border-bottom: 1px solid var(--line); }
.t-look-natural .t-logo, .t-look-natural .t-nav a:not(.t-social) { color: var(--ink); }
.t-look-natural .t-nav a:not(.t-social):hover { color: var(--accent-dark); }
.t-look-natural .t-social { background: var(--soft); color: var(--ink); }
.t-look-natural .t-menu summary span { background: var(--ink); }
.t-look-natural .t-section.t-soft { background: var(--soft); }
.t-look-natural .t-hero.v-center.has-image .t-hero-bg { border-radius: 260px 260px 16px 16px; width: min(900px, calc(100% - 40px)); }
.t-look-natural .t-portrait { border-radius: 240px 240px 16px 16px; background: var(--soft); box-shadow: none; border: 8px solid var(--card); }
.t-look-natural .t-about-in.v-banner .t-portrait { border-radius: 16px; border: 0; }
.t-look-natural ul.t-facts li { border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.t-look-natural .t-course { border-radius: 16px; box-shadow: none; border: 1px solid var(--line); }
.t-look-natural .t-course-top { background: var(--card); border-bottom: 1px solid var(--line); }
.t-look-natural .t-course-top h3 { color: var(--ink); }
.t-look-natural .t-course-meta { color: var(--accent-dark); }
.t-look-natural .t-price { color: var(--ink); font-family: var(--head); font-weight: 600; }
.t-look-natural .t-hicon { background: var(--card); border: 1px solid var(--line); }
.t-look-natural .t-stats.v-band { background: var(--dark); }
.t-look-natural .t-stat-num { font-weight: 600; }
.t-look-natural .t-shot { border-radius: 16px; }
.t-look-natural .t-review { background: var(--card); border: 1px solid var(--line); }
.t-look-natural .t-carousel.v-quote .t-review { background: transparent; border: 0; }
.t-look-natural .t-review blockquote { font-family: var(--head); }
.t-look-natural .t-avatar { border-color: var(--page); }
.t-look-natural .t-cta.v-band { background: var(--dark); }
.t-look-natural .t-cta.v-band h2, .t-look-natural .t-cta.v-band p { color: #f5efe4; }
.t-look-natural .t-cta.v-band .t-hl { color: var(--accent-text); text-shadow: none; }
.t-look-natural .t-cta.v-band .t-btn.dark { background: var(--accent); color: var(--on-accent); }
.t-look-natural .t-faq { background: var(--card); border-color: var(--line); box-shadow: none; }
.t-look-natural .t-contact { background: var(--card); border: 1px solid var(--line); }
.t-look-natural .t-foot { background: var(--dark); }
@media (max-width: 767px) {
  .t-look-natural .t-hero.v-center.has-image .t-hero-bg { border-radius: 160px 160px 16px 16px; }
  .t-look-natural .t-portrait { border-radius: 160px 160px 16px 16px; }
  .t-look-natural .t-menu[open] .t-nav { background: var(--page); border-top-color: var(--line); }
  .t-look-natural .t-menu[open] .t-nav a:not(.t-social) { border-bottom-color: var(--line); }
}
/* Social icon looks a shop picks in หลังร้าน (src/social.php). Classes repeat so they outrank each theme's own rule. */
.t-social.s-line { --soc: #06c755; --soc-ink: #04a847; }
.t-social.s-facebook { --soc: #1877f2; --soc-ink: #1877f2; }
.t-social.s-youtube { --soc: #ff0000; --soc-ink: #e00000; }
.t-social.s-instagram { --soc: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); --soc-ink: #d6246e; }
.t-social.s-tiktok { --soc: #111111; --soc-ink: #ee1d52; }
.t-social.soc-brand.soc-brand.soc-brand.soc-brand, .t-social.soc-square.soc-square.soc-square.soc-square { background: var(--soc); color: #fff; box-shadow: none; }
.t-social.s-tiktok.soc-brand.soc-brand.soc-brand.soc-brand, .t-social.s-tiktok.soc-square.soc-square.soc-square.soc-square { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.t-social.soc-square.soc-square.soc-square.soc-square { border-radius: 10px; }
.t-social.soc-brand.soc-brand.soc-brand.soc-brand:hover, .t-social.soc-square.soc-square.soc-square.soc-square:hover { background: var(--soc); color: #fff; filter: brightness(1.12); }
.t-social.soc-outline.soc-outline.soc-outline.soc-outline { background: transparent; color: var(--soc-ink); box-shadow: inset 0 0 0 2px currentColor; }
.t-social.soc-outline.soc-outline.soc-outline.soc-outline:hover { background: var(--soc-ink); color: #fff; box-shadow: none; }
.t-social.soc-plain.soc-plain.soc-plain.soc-plain { width: 32px; background: transparent; color: var(--soc-ink); border-radius: 6px; box-shadow: none; }
.t-social.soc-plain.soc-plain.soc-plain.soc-plain svg { width: 24px; height: 24px; }
.t-social.soc-plain.soc-plain.soc-plain.soc-plain:hover { background: transparent; color: var(--soc-ink); opacity: .75; }
.soc-picker { display: grid; gap: 8px; }
.soc-picker .soc-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 10px 12px; border: 1px solid #d9dee5; border-radius: 12px; background: #fff; font-weight: 500; cursor: pointer; }
.soc-picker .soc-choice:has(input:checked) { border-color: #1f2937; box-shadow: 0 0 0 1px #1f2937; }
.soc-choice-name { flex: 1 1 150px; }
.soc-picker .soc-sample { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 6px 8px; border-radius: 10px; background: #f3f5f8; }
.vids { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.vids.is-one { grid-template-columns: minmax(0, 760px); justify-content: center; }
.vid { margin: 0; min-width: 0; }
.vid-play, .vid-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); overflow: hidden; background: #111; }
.vid-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.vid-play:hover img { transform: scale(1.03); }
.vid-play:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.vid-btn { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px; background: rgba(0, 0, 0, .72); transition: background .2s; }
.vid-btn::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.vid-play:hover .vid-btn, .vid-play:focus-visible .vid-btn { background: #e00; }
.vid-title { margin: 8px 2px 0; font-weight: 600; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .vid-play img, .vid-btn { transition: none; } .vid-play:hover img { transform: none; } }
.t-video-row { margin: 0 0 12px; padding: 10px 14px 4px; border: 1px solid var(--line); border-radius: var(--radius); }
.t-video-row legend { padding: 0 6px; font-weight: 600; }

/* The bold look has very large headings, too large beside a big portrait. */
.t-look-bold .t-hero.v-portrait h1, .t-look-bold .t-hero.v-cover h1 { font-size: 56px; }
@media (max-width: 767px) { .t-look-bold .t-hero.v-portrait h1, .t-look-bold .t-hero.v-cover h1 { font-size: 40px; } }

/* ---------- หลังร้าน: each item of a list page (courses, credentials, reviews ...) is a card with its own soft colour.
   Short items sit two to a row, long ones (reviews, questions) take the whole row. ---------- */
ul.t-items-cards { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
ul.t-items-courses, ul.t-items-credentials, ul.t-items-highlights, ul.t-items-stats, ul.t-items-programs, ul.t-items-units, ul.t-items-students, ul.t-items-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.t-items-cards > .t-item { --cc: #fff6dc; --cc-line: #f6d77a; border: 2px solid var(--cc-line); border-radius: 20px; padding: 0; background: #fff;
  box-shadow: 0 6px 0 var(--cc); position: relative; }
.t-items-cards > .t-item:nth-child(6n+2) { --cc: #e2f3ff; --cc-line: #9fd2f2; }
.t-items-cards > .t-item:nth-child(6n+3) { --cc: #ffe6ee; --cc-line: #f5a9c0; }
.t-items-cards > .t-item:nth-child(6n+4) { --cc: #e4f6ea; --cc-line: #9fd8b3; }
.t-items-cards > .t-item:nth-child(6n+5) { --cc: #efe9ff; --cc-line: #c4b2f2; }
.t-items-cards > .t-item:nth-child(6n) { --cc: #ffeedd; --cc-line: #f4bf8c; }
.t-items-cards > .t-item.is-off { opacity: .6; }
.t-items-cards > .t-item:has(> .t-edit-area:not([hidden])) { grid-column: 1 / -1; opacity: 1; }
.t-items-cards .t-item-head { background: var(--cc); padding: 14px 16px 12px; border-radius: 18px 18px 0 0; }
.t-items-cards > .t-item > :last-child { border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; }
/* A photo zoomed on hover sits over the card's edge and the next card. */
.t-items-cards > .t-item:hover, .t-items-cards > .t-item:focus-within { z-index: 3; }
.t-cc-person:focus-visible img { transform: scale(2.8); z-index: 5; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.t-items-cards > .t-item > .t-view:not(:empty), .t-items-cards > .t-item > .t-edit-area { border-top: 2px dashed var(--cc-line); padding: 0 18px 18px; }
.t-items-cards > .t-item > .t-view:empty { display: none; }
.t-items-cards .t-item-title { flex: 1 1 100%; font-size: 18px; line-height: 1.45; color: var(--dark); }
.t-items-courses .t-item-title::before { content: "📘"; margin-right: 8px; }
.t-items-programs .t-item-title::before { content: "🗂️"; margin-right: 8px; }
.t-items-programs a.t-item-title { text-decoration: none; }
.t-items-units .t-unit-no { display: inline-block; background: #fff; border: 2px solid var(--cc-line); border-radius: 999px; padding: 0 10px; margin-right: 6px; font-size: 15px; }
.t-items-units .t-item-title .t-muted { font-size: 14px; font-weight: 400; margin-left: 4px; }
.t-items-programs a.t-item-title:hover { text-decoration: underline; }
.t-items-reviews .t-item-title::before { content: "💬"; margin-right: 8px; }
.t-items-faqs .t-item-title::before { content: "❓"; margin-right: 8px; }
.t-items-stats .t-item-title::before { content: "📊"; margin-right: 8px; }
.t-items-credentials [data-kind="education"] .t-item-title::before { content: "🎓"; margin-right: 8px; }
.t-items-credentials [data-kind="certificate"] .t-item-title::before { content: "📜"; margin-right: 8px; }
.t-items-credentials [data-kind="achievement"] .t-item-title::before { content: "🏆"; margin-right: 8px; }
.t-items-cards .t-item-title .t-tag { background: #fff; }
.t-items-cards .t-item-tools { margin-left: auto; }
.t-items-cards .t-item-tools .t-btn { background: #fff; }
.t-items-cards .t-item-tools .t-btn.primary { background: var(--accent); }
.t-cc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.t-cc-chip { background: var(--cc, var(--soft)); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; color: var(--teal); }
.t-cc-text { margin: 14px 0 0; line-height: 1.7; }
.t-cc-list { list-style: none; margin: 14px 0 0; padding: 0; }
.t-cc-list li { position: relative; padding-left: 28px; margin: 6px 0; line-height: 1.6; }
.t-cc-list li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--cc-line, var(--accent));
  color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.t-cc-price { margin: 14px 0 0; display: inline-block; font-size: 20px; font-weight: 700; color: var(--dark); background: var(--cc, var(--soft)); border-radius: 12px; padding: 6px 14px; }
.t-cc-price.t-muted { font-size: 15px; font-weight: 400; color: var(--muted); }
.t-cc-review { display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; }
.t-cc-face { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--cc-line); }
.t-cc-stars { margin: 0; color: #f2b91e; letter-spacing: 2px; }
.t-cc-quote { margin: 6px 0 0; padding: 12px 16px; background: var(--cc); border-radius: 4px 16px 16px 16px; line-height: 1.75; }
.t-items-reviews .t-item-title, .t-items-faqs .t-item-title, .t-items-programs .t-item-title { flex: 1 1 160px; }
ul.t-items-programs { margin-top: 0; }
@media (max-width: 1100px) { ul.t-items-courses, ul.t-items-credentials, ul.t-items-highlights, ul.t-items-stats, ul.t-items-programs, ul.t-items-units, ul.t-items-students, ul.t-items-videos { grid-template-columns: minmax(0, 1fr); } }
/* หลังร้าน programme page: the programme's own facts as one soft card. */
.t-prog-card { --cc: #e2f3ff; --cc-line: #9fd2f2; margin-top: 14px; border: 2px solid var(--cc-line); border-radius: 20px; background: #fff; box-shadow: 0 6px 0 var(--cc); padding: 4px 20px 18px; }
.t-prog-card .t-cc-text { margin-top: 12px; }
.t-prog-criteria { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; padding-top: 14px; border-top: 2px dashed var(--cc-line); }
.t-prog-label { font-weight: 600; color: var(--muted); font-size: 14px; margin-right: 4px; }
.t-cc-chip.is-line { background: #fff; border: 2px solid var(--cc-line); }
.t-prog-card + .t-muted { margin-top: 18px; }
/* หลังร้าน students and videos as cards. */
.t-items-students .t-item-head { flex-wrap: nowrap; }
.t-items-students .t-item-title { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.t-items-students .t-item-title .t-cell-name { color: var(--dark); text-decoration: none; }
.t-items-students .t-item-title .t-cell-name:hover { text-decoration: underline; }
.t-items-students .t-face { border: 3px solid #fff; box-shadow: 0 0 0 2px var(--cc-line); }
.t-items-students .t-item-tools { flex: none; }
.t-cc-grade { color: var(--muted); }
.t-cc-hours { list-style: none; margin: 12px 0 0; padding: 10px 14px; background: var(--cc); border-radius: 14px; }
.t-cc-hours li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 3px 0; }
.t-cc-hours li .t-muted { font-size: 14px; min-width: 96px; }
.t-cc-hours li.is-low strong { color: #b26a00; }
.t-cc-hours li.is-over strong { color: #c0392b; }
.t-items-videos { margin-top: 18px; }
.t-cc-video { position: relative; display: block; margin-top: 14px; border-radius: 14px; overflow: hidden; }
.t-cc-video img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.t-cc-video span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: #e0245e; display: grid; place-items: center; font-size: 22px; box-shadow: 0 8px 20px -6px rgba(0,0,0,.4); }
@media (max-width: 600px) { .t-items-students .t-item-head { flex-wrap: wrap; } }
.t-count.over { background: #fde2e1; color: #a12a1e; }
.t-tag.over { background: #fde2e1; color: #a12a1e; font-weight: 600; }
.t-cc-hours li.is-out strong { color: #c0392b; }
/* สถาบัน teachers and students lists as cards. */
.t-cc-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.t-cc-chip.t-cell-person { display: inline-flex; align-items: center; gap: 6px; }

/* หลังร้าน on phones: a short top bar, a bar of the four pages used most at the bottom, and a menu button there that
   slides the whole menu in from the left. It opens through #t-menu (:target) without JS, and teacher.js opens it
   without touching the address. The bar, the drawer head and the shade are hidden on bigger screens. */
.t-tabbar, .t-side-head, .t-menu-shade { display: none; }
@media (max-width: 767px) {
  .t-admin .t-top > .t-wrap { min-height: 54px; gap: 10px; padding-left: 16px; padding-right: 12px; }
  .t-admin .t-top .t-name { font-size: 16px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .t-admin .t-top .t-name .t-tag { font-size: 11px; }
  .t-admin .t-top form { flex: none; }
  .t-admin .t-top .t-btn { min-height: 38px; padding: 0 10px; gap: 0; }
  .t-admin .t-top .t-out-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .t-admin-layout { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .t-admin .t-side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(86vw, 330px); max-height: none; margin: 0; padding: 0 12px 24px;
    border: 0; border-radius: 0 18px 18px 0; overflow-y: auto; overscroll-behavior: contain; visibility: hidden; transform: translateX(-104%);
    transition: transform .25s ease, visibility 0s linear .25s; box-shadow: 8px 0 30px -10px rgba(0, 0, 0, .45); }
  .t-admin .t-side:target, .t-menu-open .t-admin .t-side { visibility: visible; transform: none; transition: transform .25s ease; }
  .t-admin .t-side-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; margin: 0 -12px 6px;
    padding: 12px 12px 12px 22px; background: var(--card); border-bottom: 1px solid var(--line); font-family: var(--head); font-size: 20px; }
  .t-side-close { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: var(--dark); background: var(--soft); }
  .t-admin .t-side a:hover { transform: none; }
  .t-menu-shade { position: fixed; inset: 0; z-index: 55; background: rgba(15, 20, 30, .45); }
  .t-admin .t-side:target ~ .t-menu-shade, .t-menu-open .t-admin .t-menu-shade { display: block; }
  .t-menu-open { overflow: hidden; }
  .t-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px -12px rgba(0, 0, 0, .4); }
  .t-tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 6px 2px; border-radius: 12px;
    color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center; }
  .t-tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .t-tabbar a .t-ic { width: 24px; height: 24px; }
  .t-tabbar a.on { color: var(--dark); }
  .t-tabbar a .t-ic { position: relative; z-index: 1; }
  .t-tabbar a.on::before { content: ""; position: absolute; top: 3px; left: 50%; width: 54px; height: 30px; margin-left: -27px; border-radius: 999px; background: var(--accent); }
  .t-viewonly .t-tabbar { bottom: 0; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) { .t-admin .t-side, .t-admin .t-side:target, .t-menu-open .t-admin .t-side { transition: none; } }

/* ใบประกาศ (certificates). Every size is in cqw of .c-sheet, so one certificate looks the same in a small preview and on A4.
   A4 landscape is 297 x 210 mm, so the height is 70.707% of the width. The 50 designs follow below. */
.c-sheet { container-type: inline-size; width: 100%; }
.c-cert { position: relative; width: 100cqw; height: 70.707cqw; overflow: hidden; background: #fff; color: #1f1f1f; font-family: var(--body); line-height: 1.5;
  --c: var(--accent-dark); --c-ink: color-mix(in srgb, var(--accent-dark) 62%, #000); --c-soft: color-mix(in srgb, var(--accent) 13%, #fff);
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.c-cert p { margin: 0; }
.c-bg { position: absolute; pointer-events: none; }
.c-bg { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.c-inner { position: absolute; top: 6.2cqw; bottom: 5.2cqw; left: 9cqw; right: 9cqw; display: flex; flex-direction: column; align-items: center; text-align: center; }
.c-head { height: 7cqw; display: flex; align-items: center; justify-content: center; gap: 1.5cqw; max-width: 100%; }
.c-logo { max-height: 6.5cqw; max-width: 16cqw; object-fit: contain; mix-blend-mode: multiply; }
.c-org { font-size: 1.75cqw; font-weight: 600; color: #333; }
.c-cert .c-title { margin-top: .5cqw; font-family: 'Noto Serif Thai', 'Roboto Slab', Georgia, serif; font-weight: 800; font-size: 5.2cqw; line-height: 1.3; color: var(--c-ink); }
.c-lang-en .c-title { font-size: 4.3cqw; }
.c-cert .c-lead, .c-cert .c-body { margin-top: .7cqw; font-size: 1.75cqw; color: #444; }
.c-name, .c-course { display: flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 700; line-height: 1.25; }
.c-name { height: 10.5cqw; width: 72cqw; max-width: 100%; border-bottom: .14cqw solid color-mix(in srgb, var(--c) 55%, #fff); font-family: 'Noto Serif Thai', 'Roboto Slab', Georgia, serif; color: #1a1a1a; }
.c-course { height: 6.6cqw; width: 76cqw; max-width: 100%; color: var(--c-ink); }
.c-fit-text { display: block; max-width: 100%; }
.c-w { white-space: nowrap; }
.c-w-long { white-space: normal; overflow-wrap: anywhere; }
.c-name.c-fit-1 { font-size: 5cqw; } .c-name.c-fit-2 { font-size: 4.2cqw; } .c-name.c-fit-3 { font-size: 3.6cqw; } .c-name.c-fit-4 { font-size: 3.1cqw; }
.c-name.c-fit-5 { font-size: 2.7cqw; } .c-name.c-fit-6 { font-size: 2.3cqw; } .c-name.c-fit-7 { font-size: 2cqw; } .c-name.c-fit-8 { font-size: 1.7cqw; }
.c-course.c-fit-1 { font-size: 2.9cqw; } .c-course.c-fit-2 { font-size: 2.5cqw; } .c-course.c-fit-3 { font-size: 2.1cqw; } .c-course.c-fit-4 { font-size: 1.85cqw; }
.c-course.c-fit-5 { font-size: 1.6cqw; } .c-course.c-fit-6 { font-size: 1.4cqw; } .c-course.c-fit-7 { font-size: 1.25cqw; } .c-course.c-fit-8 { font-size: 1.1cqw; }
.c-detail { min-height: 2.4cqw; font-size: 1.5cqw; color: #444; }
.c-date { font-size: 1.5cqw; color: #444; }
.c-signs { margin-top: auto; display: flex; justify-content: center; gap: 10cqw; width: 100%; }
.c-sign { width: 24cqw; display: flex; flex-direction: column; align-items: center; font-size: 1.35cqw; line-height: 1.45; color: #333; }
.c-sign-pic { height: 5cqw; display: flex; align-items: flex-end; justify-content: center; }
.c-sign-pic img { max-height: 5cqw; max-width: 20cqw; object-fit: contain; mix-blend-mode: multiply; }
.c-sign-line { width: 100%; border-top: .1cqw solid #666; margin: .3cqw 0 .4cqw; }
.c-sign strong { font-weight: 600; color: #1f1f1f; }
.c-cert .c-no { position: absolute; right: 0; bottom: 0; font-size: 1.1cqw; color: #777; }
.c-cert:has(.c-m-br) .c-no, .c-cert:has(.c-m-s6) .c-no { right: 5cqw; }

/* The 50 designs (src/teacher_cert_designs.php) are built from a frame (.c-f-*), a font (.c-font-*), a size of
   drawing (.c-size-*) and drawings placed at spots (.c-m-*). .c-frame and .c-frame2 are two empty layers each frame may use. */
.c-frame, .c-frame2 { position: absolute; pointer-events: none; }

/* Fonts of the title and the name. */
.c-font-serif .c-title, .c-font-serif .c-name, .c-font-display .c-name { font-family: 'Noto Serif Thai', Georgia, serif; }
.c-font-slab .c-title, .c-font-slab .c-name { font-family: 'Roboto Slab', 'Noto Serif Thai', Georgia, serif; }
.c-font-sans .c-title, .c-font-sans .c-name { font-family: 'Noto Sans Thai', system-ui, sans-serif; }
.c-font-round .c-title, .c-font-round .c-name, .c-font-round .c-course { font-family: 'Mali', 'Noto Sans Thai', system-ui, sans-serif; }
.c-font-display .c-title { font-family: 'Chonburi', 'Noto Serif Thai', Georgia, serif; font-weight: 400; }
.c-font-sans .c-title { letter-spacing: .02em; }

/* Drawings. */
.c-m { position: absolute; width: var(--ms); height: var(--ms); color: var(--c); pointer-events: none; }
.c-size-s { --ms: 4cqw; } .c-size-m { --ms: 6.5cqw; } .c-size-l { --ms: 8.5cqw; } .c-size-xl { --ms: 11cqw; }
.c-size-xl .c-m-l { left: 1.5cqw; } .c-size-xl .c-m-r { right: 1.5cqw; }
.c-ic { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.c-ic .f { fill: currentColor; stroke: none; }
.c-ic .soft { fill: color-mix(in srgb, currentColor 20%, #fff); }
.c-ic .hole { fill: #fff; stroke: none; }
.c-ic .holeline, .c-ic .hole-line { stroke: #fff; }
.c-ic .shine { stroke: #fff; opacity: .85; }
.c-ic text { fill: currentColor; stroke: none; font-family: 'Roboto Slab', Georgia, serif; font-weight: 800; }
.c-ic text.th { font-family: 'Noto Serif Thai', Georgia, serif; font-weight: 800; }
.c-ic path.c1 { stroke: #e85d75; } .c-ic path.c2 { stroke: #f2a33a; } .c-ic path.c3 { stroke: #4fc79f; } .c-ic path.c4 { stroke: #5cb8e6; }
.c-ic path.c1, .c-ic path.c2, .c-ic path.c3, .c-ic path.c4 { stroke-width: 2.2; }
.c-ic circle.c1 { fill: #e85d75; } .c-ic circle.c2 { fill: #f2a33a; } .c-ic circle.c3 { fill: #4fc79f; } .c-ic circle.c4 { fill: #5cb8e6; }
.c-multi .c-m:nth-of-type(5n+1) { color: #e85d75; } .c-multi .c-m:nth-of-type(5n+2) { color: #f2a33a; } .c-multi .c-m:nth-of-type(5n+3) { color: #4fc79f; }
.c-multi .c-m:nth-of-type(5n+4) { color: #5cb8e6; } .c-multi .c-m:nth-of-type(5n) { color: #9b7be0; }
.c-m-tl { top: 4.2cqw; left: 4.2cqw; }
.c-m-tr { top: 4.2cqw; right: 4.2cqw; transform: scaleX(-1); }
.c-m-bl { bottom: 4.2cqw; left: 4.2cqw; transform: scaleY(-1); }
.c-m-br { bottom: 4.2cqw; right: 4.2cqw; transform: scale(-1, -1); }
.c-noflip .c-m-tr, .c-noflip .c-m-bl, .c-noflip .c-m-br { transform: none; }
.c-m-l, .c-m-r { top: 50%; margin-top: calc(var(--ms) / -2); }
.c-m-l { left: 3cqw; }
.c-m-r { right: 3cqw; transform: scaleX(-1); }
.c-noflip .c-m-r { transform: none; }
.c-m-t, .c-m-b { left: 50%; margin-left: calc(var(--ms) / -2); }
.c-m-t { top: .9cqw; }
.c-m-b { bottom: .9cqw; }
.c-m-seal { left: 5cqw; bottom: 4.5cqw; width: 12cqw; height: 12cqw; }
.c-m-blob { right: -9cqw; bottom: -13cqw; width: 34cqw; height: 34cqw; color: var(--c-soft); }
.c-m-s1 { top: 5cqw; left: 6cqw; transform: rotate(-12deg); }
.c-m-s2 { top: 8cqw; right: 7cqw; transform: rotate(15deg); }
.c-m-s3 { top: 27cqw; left: 3.5cqw; transform: rotate(8deg) scale(1.15); }
.c-m-s4 { top: 30cqw; right: 3.5cqw; transform: rotate(-8deg); }
.c-m-s5 { bottom: 13cqw; left: 6cqw; transform: rotate(10deg); }
.c-m-s6 { bottom: 14cqw; right: 6cqw; transform: rotate(-14deg) scale(1.1); }
.c-m-s7 { top: 3.5cqw; left: 26cqw; transform: rotate(6deg) scale(.7); }
.c-m-s8 { top: 3.5cqw; right: 26cqw; transform: rotate(-6deg) scale(.7); }
.c-noflip .c-m-s1, .c-noflip .c-m-s2, .c-noflip .c-m-s4, .c-noflip .c-m-s5, .c-noflip .c-m-s6 { opacity: .9; }

/* Frames. */
.c-f-double { background: radial-gradient(ellipse at 50% 45%, #fff 55%, var(--c-soft) 100%); }
.c-f-double .c-frame { inset: 2cqw; border: .55cqw solid var(--c); box-shadow: inset 0 0 0 .8cqw #fff, inset 0 0 0 .95cqw var(--c); }
.c-f-double .c-m-t, .c-f-double .c-m-b { filter: drop-shadow(0 0 .5cqw #fff); }
.c-f-thin .c-frame { inset: 3cqw; border: .16cqw solid color-mix(in srgb, var(--c) 70%, #fff); }
.c-f-minimal .c-frame { inset: 3cqw; border: .12cqw solid #bdbdbd; }
.c-f-minimal .c-frame2 { top: 3cqw; left: 50%; width: 14cqw; height: .55cqw; margin-left: -7cqw; background: var(--c); }
.c-f-minimal .c-title { color: #222; letter-spacing: .04em; }
.c-f-thick .c-frame { inset: 2cqw; border: 1.2cqw solid var(--c); }
.c-f-thick .c-frame2 { inset: 4cqw; border: .15cqw solid color-mix(in srgb, var(--c) 60%, #fff); }
.c-f-plain .c-frame { inset: 2.2cqw; border: .15cqw solid color-mix(in srgb, var(--c) 35%, #fff); border-radius: 1.5cqw; }
.c-f-ribbon .c-frame { inset: 3cqw; border: .16cqw solid color-mix(in srgb, var(--c) 60%, #fff); }
.c-f-ribbon .c-frame2 { inset: 0; background:
  linear-gradient(135deg, var(--c) 0 8cqw, transparent 8cqw 9cqw, var(--c-soft) 9cqw 11.5cqw, transparent 11.5cqw),
  linear-gradient(-45deg, var(--c) 0 8cqw, transparent 8cqw 9cqw, var(--c-soft) 9cqw 11.5cqw, transparent 11.5cqw); }
.c-f-brackets .c-frame { inset: 3.6cqw; border: .12cqw solid color-mix(in srgb, var(--c) 40%, #fff); }
.c-f-brackets .c-frame2 { inset: 2.4cqw; --b: linear-gradient(var(--c), var(--c)); background:
  var(--b) top left / 10cqw .6cqw no-repeat, var(--b) top left / .6cqw 10cqw no-repeat,
  var(--b) top right / 10cqw .6cqw no-repeat, var(--b) top right / .6cqw 10cqw no-repeat,
  var(--b) bottom left / 10cqw .6cqw no-repeat, var(--b) bottom left / .6cqw 10cqw no-repeat,
  var(--b) bottom right / 10cqw .6cqw no-repeat, var(--b) bottom right / .6cqw 10cqw no-repeat; }
.c-f-brackets .c-m-tl, .c-f-brackets .c-m-tr { top: 4.8cqw; } .c-f-brackets .c-m-bl, .c-f-brackets .c-m-br { bottom: 4.8cqw; }
.c-f-brackets .c-m-tl, .c-f-brackets .c-m-bl { left: 4.8cqw; } .c-f-brackets .c-m-tr, .c-f-brackets .c-m-br { right: 4.8cqw; }
.c-f-band .c-frame { top: 0; bottom: 0; left: 0; width: 6.5cqw; background: var(--c); }
.c-f-band .c-frame2 { top: 0; bottom: 0; left: 7.4cqw; width: .9cqw; background: var(--c-soft); }
.c-f-band .c-inner { left: 14cqw; right: 6cqw; }
.c-f-band .c-m-tl, .c-f-band .c-m-bl, .c-f-band .c-m-s1, .c-f-band .c-m-s3, .c-f-band .c-m-s5 { left: 10cqw; }
.c-f-band .c-m-s7 { left: 30cqw; }
.c-f-band .c-title { letter-spacing: .03em; }
.c-f-bands .c-frame, .c-f-bands .c-frame2 { left: 0; right: 0; height: 3cqw; background: var(--c); box-shadow: 0 0 0 .5cqw #fff, 0 0 0 .7cqw var(--c-soft); }
.c-f-bands .c-frame { top: 0; } .c-f-bands .c-frame2 { bottom: 0; }
.c-f-card { background: var(--c-soft); }
.c-f-card .c-frame { inset: 3cqw; background: #fff; border-radius: 2cqw; box-shadow: 0 .6cqw 2cqw -.6cqw color-mix(in srgb, var(--c) 45%, transparent); }
.c-f-card .c-m-tl { top: 1cqw; left: 1cqw; } .c-f-card .c-m-br { bottom: 1cqw; right: 1cqw; }
.c-f-dashed { background: var(--c-soft); }
.c-f-dashed .c-frame { inset: 2.2cqw; border: .7cqw dashed var(--c); border-radius: 4cqw; background: #fff; }
.c-f-dashed .c-m { color: var(--accent); }
.c-f-dashed .c-name { border-bottom-style: dashed; }
.c-f-rounded { background: var(--c-soft); }
.c-f-rounded .c-frame { inset: 2.2cqw; border: .5cqw solid var(--c); border-radius: 3cqw; background: #fff; }
.c-f-rounded .c-frame2 { inset: 3.5cqw; border: .15cqw dashed color-mix(in srgb, var(--c) 60%, #fff); border-radius: 2cqw; }
.c-f-dotted .c-frame { inset: 2.2cqw; border: .9cqw dotted var(--c); border-radius: 2cqw; }
.c-f-candy .c-frame { inset: 1.8cqw; border-radius: 2.5cqw; background: repeating-linear-gradient(45deg, var(--c) 0 1.1cqw, #fff 1.1cqw 2.2cqw); }
.c-f-candy .c-frame2 { inset: 3.6cqw; border-radius: 1.6cqw; background: #fff; }
.c-f-crayon .c-frame { inset: 1.8cqw; background: repeating-linear-gradient(90deg, #e85d75 0 4cqw, #f2a33a 4cqw 8cqw, #f2d33a 8cqw 12cqw, #4fc79f 12cqw 16cqw, #5cb8e6 16cqw 20cqw, #9b7be0 20cqw 24cqw); border-radius: 1cqw; }
.c-f-crayon .c-frame2 { inset: 3.4cqw; background: #fff; border-radius: .6cqw; }
.c-f-grid { background-color: #fff; background-image: linear-gradient(color-mix(in srgb, var(--c) 13%, transparent) .1cqw, transparent .1cqw), linear-gradient(90deg, color-mix(in srgb, var(--c) 13%, transparent) .1cqw, transparent .1cqw); background-size: 2.5cqw 2.5cqw; }
.c-f-grid .c-frame { inset: 2.4cqw; border: .3cqw solid var(--c); }
.c-f-grid .c-name, .c-f-grid .c-course, .c-f-grid .c-title, .c-f-grid .c-lead, .c-f-grid .c-body, .c-f-grid .c-date, .c-f-grid .c-detail { background: #fff; }
.c-f-grid .c-name, .c-f-grid .c-course { width: auto; padding: 0 2cqw; }
.c-f-piano .c-frame { top: 0; left: 0; right: 0; height: 1.6cqw; background: var(--c); }
.c-f-piano .c-frame2 { bottom: 0; left: 0; right: 0; height: 7cqw; border-top: .5cqw solid var(--c); background:
  repeating-linear-gradient(90deg, transparent 0 2.52cqw, #222 2.52cqw 4.68cqw, transparent 4.68cqw 6.12cqw, #222 6.12cqw 8.28cqw, transparent 8.28cqw 13.32cqw,
    #222 13.32cqw 15.48cqw, transparent 15.48cqw 16.92cqw, #222 16.92cqw 19.08cqw, transparent 19.08cqw 20.52cqw, #222 20.52cqw 22.68cqw, transparent 22.68cqw 25.2cqw) top / 100% 60% repeat-x,
  repeating-linear-gradient(90deg, #fff 0 3.45cqw, #555 3.45cqw 3.6cqw); }
.c-f-piano .c-inner { top: 4.5cqw; bottom: 9cqw; }
.c-f-piano .c-no { bottom: -1.5cqw; }
.c-f-staff .c-frame, .c-f-staff .c-frame2 { left: 3cqw; right: 3cqw; height: 4.2cqw; background: repeating-linear-gradient(180deg, var(--c) 0 .14cqw, transparent .14cqw 1cqw); }
.c-f-staff .c-frame { top: 1.6cqw; } .c-f-staff .c-frame2 { bottom: 1.6cqw; }
.c-f-staff .c-m-tl { top: .2cqw; left: 3.5cqw; } .c-f-staff .c-m-br { bottom: .2cqw; right: 3.5cqw; }
.c-f-staff .c-m { --ms: 7cqw; }
.c-f-waves .c-frame { top: 0; left: 0; right: 0; height: 1.6cqw; background: var(--c); }
.c-f-waves .c-frame2 { bottom: 0; left: 0; right: 0; height: 8cqw; background:
  radial-gradient(circle at 50% 0, transparent 2.6cqw, var(--c) 2.7cqw) 3cqw 3.6cqw / 6cqw 4.4cqw repeat-x,
  radial-gradient(circle at 50% 0, transparent 2.6cqw, color-mix(in srgb, var(--c) 35%, #fff) 2.7cqw) 0 1cqw / 6cqw 7cqw repeat-x; }
.c-f-waves .c-inner { bottom: 8.5cqw; }
.c-f-waves .c-m-tr { top: 3cqw; } .c-f-waves .c-m-bl { bottom: 9cqw; }
.c-f-checker .c-frame, .c-f-checker .c-frame2 { left: 0; right: 0; height: 2.4cqw; background: conic-gradient(#222 25%, #fff 0 50%, #222 0 75%, #fff 0) 0 0 / 2.4cqw 2.4cqw; }
.c-f-checker .c-frame { top: 0; } .c-f-checker .c-frame2 { bottom: 0; }
.c-f-checker .c-m { color: var(--c); }
.c-f-curtain::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3.4cqw; z-index: 1; background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--c) 75%, #000) 2.4cqw, transparent 2.5cqw) 0 0 / 5cqw 3.4cqw repeat-x, linear-gradient(color-mix(in srgb, var(--c) 75%, #000) 0 1cqw, transparent 1cqw); }
.c-f-curtain .c-frame, .c-f-curtain .c-frame2 { top: 0; bottom: 0; width: 10cqw; background: repeating-linear-gradient(90deg, var(--c) 0 1.4cqw, color-mix(in srgb, var(--c) 72%, #000) 1.4cqw 2.5cqw); }
.c-f-curtain .c-frame { left: 0; border-radius: 0 0 100% 0 / 0 0 45% 0; }
.c-f-curtain .c-frame2 { right: 0; border-radius: 0 0 0 100% / 0 0 0 45%; }
.c-f-curtain .c-inner { left: 12cqw; right: 12cqw; }
.c-f-gallery { background: #fbf8f1; }
.c-f-gallery .c-frame { inset: 0; border: 2.6cqw solid color-mix(in srgb, var(--c) 65%, #3a2a1a); box-shadow: inset 0 0 0 .3cqw rgba(255,255,255,.35); }
.c-f-gallery .c-frame2 { inset: 2.6cqw; border: 1.1cqw solid #efe7d6; box-shadow: inset .2cqw .2cqw .6cqw rgba(0,0,0,.18); }
.c-f-spotlight { background: radial-gradient(ellipse 60% 75% at 50% -8%, color-mix(in srgb, var(--accent) 38%, #fff) 0, #fff 100%); }
.c-f-spotlight .c-frame { inset: 2.6cqw; border: .16cqw solid color-mix(in srgb, var(--c) 60%, #fff); }
.c-f-sash .c-frame { inset: 3cqw; border: .16cqw solid color-mix(in srgb, var(--c) 60%, #fff); }
.c-f-sash .c-frame2, .c-f-sash::before { position: absolute; top: 0; width: 4.6cqw; height: 20cqw; background: linear-gradient(90deg, var(--c) 0 38%, var(--c-soft) 38% 62%, var(--c) 62%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%); }
.c-f-sash .c-frame2 { left: 8cqw; }
.c-f-sash::before { content: ""; right: 8cqw; }
.c-f-night, .c-f-luxe { color: #f1f1f1; }
.c-f-night { background: radial-gradient(ellipse at 50% 30%, #2a3766 0, #141b33 75%); }
.c-f-night .c-frame { inset: 2.4cqw; border: .2cqw solid rgba(255,255,255,.4); border-radius: 2cqw; }
.c-f-luxe { background: radial-gradient(ellipse at 50% 40%, #2a2a2a 0, #111 80%); }
.c-f-luxe .c-frame { inset: 2cqw; border: .5cqw solid #c9a24d; }
.c-f-luxe .c-frame2 { inset: 3.2cqw; border: .12cqw solid #c9a24d; }
.c-f-night .c-m, .c-f-luxe .c-m { color: #e7c25a; }
.c-f-night .c-title, .c-f-luxe .c-title, .c-f-night .c-course, .c-f-luxe .c-course { color: #f0cf6b; }
.c-f-night .c-name, .c-f-luxe .c-name, .c-f-night .c-sign strong, .c-f-luxe .c-sign strong { color: #fff; }
.c-f-night .c-name, .c-f-luxe .c-name { border-bottom-color: rgba(240,207,107,.6); }
.c-f-night .c-org, .c-f-luxe .c-org, .c-f-night .c-lead, .c-f-luxe .c-lead, .c-f-night .c-body, .c-f-luxe .c-body, .c-f-night .c-detail, .c-f-luxe .c-detail,
.c-f-night .c-date, .c-f-luxe .c-date, .c-f-night .c-sign, .c-f-luxe .c-sign, .c-f-night .c-no, .c-f-luxe .c-no { color: #dcdcdc; }
.c-f-night .c-sign-line, .c-f-luxe .c-sign-line { border-top-color: #bbb; }
.c-f-night .c-logo, .c-f-luxe .c-logo { mix-blend-mode: normal; border-radius: .6cqw; }
.c-f-night .c-sign-pic img, .c-f-luxe .c-sign-pic img { mix-blend-mode: screen; filter: invert(1); }
.c-f-night .c-ic .hole, .c-f-luxe .c-ic .hole { fill: #141b33; }

/* Picking a design: groups that fold, each with small pictures. */
.t-cert-picker { display: grid; gap: 8px; }
.t-cert-pick-default { margin-bottom: 4px; }
.t-cert-group { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.t-cert-group > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-weight: 600; list-style: none; }
.t-cert-group > summary::-webkit-details-marker { display: none; }
.t-cert-group > summary .t-ic { margin-left: auto; transition: transform .15s; }
.t-cert-group[open] > summary .t-ic { transform: rotate(180deg); }
.t-cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; padding: 4px 14px 14px; }
.t-cert-option { position: relative; display: flex; flex-direction: column; gap: 6px; font-size: 13px; text-align: center; cursor: pointer; }
.t-cert-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.t-cert-option .c-sheet { border-radius: 3px; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s; }
.t-cert-option:hover .c-sheet { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, #fff); }
.t-cert-option input:checked + .c-sheet { box-shadow: 0 0 0 3px var(--accent-dark); }
.t-cert-option input:focus-visible + .c-sheet { outline: 2px solid var(--dark); outline-offset: 4px; }
.t-cert-option input:checked ~ span { font-weight: 700; }

/* The page that prints one certificate, and the previews in หลังร้าน. */
body.t-cert-page { background: #e9edf0; }
.t-cert-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; max-width: 1132px; margin: 0 auto; padding: 16px 16px 8px; }
.t-cert-bar-langs { display: inline-flex; gap: 6px; }
.t-cert-tip { max-width: 1132px; margin: 0 auto 12px; padding: 0 16px; font-size: 14px; color: var(--muted); }
.t-cert-main { max-width: 1132px; margin: 0 auto 40px; padding: 0 16px; page: cert; }
.t-cert-main .c-cert { box-shadow: 0 10px 30px -12px rgba(0,0,0,.35); }
@page cert { size: A4 landscape; margin: 0; }
@media print {
  body.t-cert-page { background: #fff; margin: 0; }
  .t-cert-main { max-width: none; margin: 0; padding: 0; }
  .t-cert-main .c-sheet { width: 296mm; }
  .t-cert-main .c-cert { box-shadow: none; }
}
.t-cert-previews { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.t-cert-previews figure { margin: 0; }
.t-cert-previews .c-cert { box-shadow: 0 0 0 1px var(--line), 0 6px 18px -10px rgba(0,0,0,.3); border-radius: 2px; }
.t-cert-previews figcaption { margin-top: 6px; font-size: 14px; color: var(--muted); text-align: center; }
.t-cert-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.t-cert-students { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.t-cert-students .t-check { align-items: flex-start; }
.t-cert-batch { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0 0; }
.t-cert-batch-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.t-cert-batch-head strong { font-size: 17px; }
.t-cert-batch-go { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.t-cert-batch-go label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; margin: 0; }
.t-cert-done-title { margin-top: 24px; }
.t-cert-images { list-style: none; margin: 0; padding: 0; }
.t-cert-images li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.t-cert-images li > strong, .t-cert-images .t-hint { flex-basis: 100%; }
.t-cert-images form { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.t-cert-images input[type=file] { width: auto; max-width: 100%; }
.t-cert-thumb { max-height: 72px; max-width: 200px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.t-cert-thumb.is-wide { max-height: 120px; }
.t-tag.on { background: #dcf3e6; color: #11633a; font-weight: 600; }
@media (max-width: 767px) {
  .t-cert-previews, .t-cert-students { grid-template-columns: 1fr; }
}

/* Lesson files (2026-11-23): the space bar, the two lists under a unit, the zip links, and the file list page. */
.t-space { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0 14px; font-size: 14px; }
.t-space progress { flex: 1 1 200px; max-width: 360px; height: 10px; border: 0; border-radius: 5px; background: var(--soft); overflow: hidden; -webkit-appearance: none; appearance: none; }
.t-space progress::-webkit-progress-bar { background: var(--soft); }
.t-space progress::-webkit-progress-value { background: var(--teal); border-radius: 5px; }
.t-space progress::-moz-progress-bar { background: var(--teal); border-radius: 5px; }
.t-space.is-warn progress::-webkit-progress-value { background: #e08a00; }
.t-space.is-warn progress::-moz-progress-bar { background: #e08a00; }
.t-tag.ok { background: #dcf5e6; color: #156b3a; font-weight: 600; }
.t-tag.t-tag-teacher { background: #f1e8ff; color: #5a2d91; }
.t-files { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.t-files > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; list-style: none; min-height: 40px; }
.t-files > summary::-webkit-details-marker { display: none; }
.t-files > summary::after { content: '▾'; color: var(--muted); margin-left: auto; transition: transform .2s; }
.t-files[open] > summary::after { transform: rotate(180deg); }
.t-files > summary .t-ic { width: 18px; height: 18px; }
.t-file-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 10px; }
.t-file-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fff; }
.t-file-group.t-file-teacher { border-left: 4px solid #8a5cc8; }
.t-file-group.t-file-student { border-left: 4px solid #2f9e5b; }
.t-file-group h4 { margin: 0 0 2px; font-size: 15px; }
.t-file-group > .t-hint { margin: 0 0 8px; }
.t-files-list { list-style: none; margin: 0 0 10px; padding: 0; }
.t-file { border-top: 1px solid var(--line); padding: 8px 0; }
.t-file:first-child { border-top: 0; }
.t-file-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.t-file-name { display: inline-flex; align-items: flex-start; gap: 6px; font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; min-width: 0; flex: 1 1 160px; }
.t-file-name:hover span { text-decoration: underline; }
.t-file-name .t-ic { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--teal); }
.t-file-size { font-size: 13px; white-space: nowrap; }
.t-file-main .t-tag { margin-left: 0; }
.t-file-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin-top: 6px; }
.t-file-tools form { margin: 0; }
.t-file-tools .t-btn, .t-file-zip .t-btn, .t-file-add .t-btn { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.t-file-more > summary { list-style: none; cursor: pointer; }
.t-file-more > summary::-webkit-details-marker { display: none; }
.t-file-panel { margin-top: 8px; padding: 10px; border-radius: var(--radius); background: var(--soft); }
.t-file-panel .t-actions { margin-top: 8px; }
.t-file-more[open] { flex: 1 1 100%; }
.t-file-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.t-file-pick { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; margin: 0; font-size: 14px; font-weight: 600; }
.t-file-pick > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.t-file-pick .t-ic { width: 16px; height: 16px; }
.t-file-pick input[type=file] { font-size: 13px; max-width: 100%; }
.t-file-zip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.t-file-zip .t-label { margin-right: 4px; }
.t-files-table td:first-child input { width: 20px; height: 20px; }
.t-files-table .t-file-name { font-weight: 500; }
.t-bulk { align-items: center; margin-top: 12px; }
.t-sr-label { margin: 0; }
.t-report-files .t-files-list { margin-bottom: 4px; }
.t-report-files h3 { margin: 16px 0 4px; font-size: 16px; }
.t-report-files .t-file-zip { margin: 4px 0 8px; }

/* Lesson files, round pastel buttons (owner chose 2026-11-23). An icon button says what it does in a bubble when the
   mouse is on it, when it has keyboard focus, or while a finger presses it on a phone. */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translate(-50%, 4px);
  background: #1f2a2c; color: #fff; font: 600 13px/1.4 var(--body); white-space: nowrap; padding: 5px 10px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 30;
}
[data-tip]::before {
  content: ''; position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #1f2a2c; border-bottom: 0; opacity: 0; transition: opacity .15s; z-index: 30;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after, [data-tip]:active::after { opacity: 1; transform: translate(-50%, 0); }
[data-tip]:hover::before, [data-tip]:focus-visible::before, [data-tip]:active::before { opacity: 1; }
/* Buttons at the right edge open their bubble leftwards, and the zip buttons rightwards, so it never leaves the screen. */
.t-file-tools [data-tip]::after, .t-item-tools [data-tip]::after { left: auto; right: -4px; transform: translateY(4px); }
.t-file-tools [data-tip]:hover::after, .t-file-tools [data-tip]:focus-visible::after, .t-file-tools [data-tip]:active::after,
.t-item-tools [data-tip]:hover::after, .t-item-tools [data-tip]:focus-visible::after, .t-item-tools [data-tip]:active::after { transform: none; }
.t-file-zip [data-tip]::after, .t-state [data-tip]::after { left: -4px; transform: translateY(4px); }
.t-file-zip [data-tip]:hover::after, .t-file-zip [data-tip]:focus-visible::after, .t-file-zip [data-tip]:active::after,
.t-state [data-tip]:hover::after, .t-state [data-tip]:focus-visible::after, .t-state [data-tip]:active::after { transform: none; }
.t-file-more[open] > summary[data-tip]::after, .t-file-more[open] > summary[data-tip]::before { display: none; }

.t-file { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.t-file-main { flex: 1 1 220px; min-width: 0; }
.t-file-tools { margin: 0 0 0 auto; align-items: center; gap: 8px; }
.t-file-tools:has(.t-file-more[open]) { flex: 1 1 100%; }
.t-file-more[open] { display: flex; flex-direction: column; align-items: flex-end; }
.t-file-more[open] .t-file-panel { align-self: stretch; }
.t-ib { width: 42px; height: 42px; border-radius: 50%; border: 0; display: inline-grid; place-items: center; padding: 0; cursor: pointer;
  font: inherit; transition: transform .15s, box-shadow .15s; }
.t-ib:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.t-ib:active { transform: scale(.94); }
.t-ib:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.t-ib .t-ic { width: 20px; height: 20px; }
.t-ib[hidden] { display: none; }
a.t-ib { text-decoration: none; }
.t-item-tools { align-items: center; }
.t-item-tools .t-ib { flex: none; }
.t-state { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.t-state-text { font-weight: 600; }
.t-ib.is-shown { background: #dcf3e4; color: #13693a; }
.t-ib.is-hidden { background: #eef0f3; color: #6b7280; }
.t-ib.is-edit { background: #e3eefc; color: #2a5db0; list-style: none; }
.t-file-more[open] > .t-ib.is-edit { background: #2a5db0; color: #fff; }

.t-file-add { flex-direction: column; align-items: stretch; }
.t-file-pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; cursor: pointer;
  border: 2px dashed #b9d4f5; background: #f3f8ff; border-radius: 18px; padding: 16px 14px; transition: background .15s, border-color .15s; }
.t-file-pick:hover, .t-file-pick:focus-within { background: #e8f2ff; border-color: #7fb0ec; }
.t-file-pick-teacher { border-color: #d7c5f2; background: #f8f3ff; }
.t-file-pick-teacher:hover, .t-file-pick-teacher:focus-within { background: #f1e8ff; border-color: #a985e0; }
.t-file-pick strong { color: #2a5db0; font-size: 15px; }
.t-file-pick-teacher strong { color: #6a3fb0; }
.t-file-pick .t-hint { font-weight: 400; margin: 0; }
.t-file-pick-bub { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #2a5db0;
  box-shadow: 0 4px 12px rgba(42,93,176,.15); margin-bottom: 4px; }
.t-file-pick-teacher .t-file-pick-bub { color: #6a3fb0; box-shadow: 0 4px 12px rgba(106,63,176,.15); }
.t-file-pick-bub .t-ic { width: 28px; height: 28px; }
.t-file-pick:hover .t-file-pick-bub { animation: t-hop .5s; }
/* The real file input covers the whole box, so a click or a dropped file lands on it. */
.t-file-pick input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.t-file-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.t-file-chips:empty { display: none; }
.t-file-chip { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); max-width: 100%; overflow-wrap: anywhere; }
.t-file-add .t-btn { align-self: flex-end; border-radius: 999px; padding: 6px 18px; }
@keyframes t-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-7px); } }

.t-file-zip { gap: 12px; }
.t-zb { position: relative; width: 46px; height: 46px; border-radius: 50%; display: inline-grid; place-items: center; text-decoration: none; transition: transform .15s; }
.t-zb:hover { transform: translateY(-2px) rotate(-6deg); }
.t-zb .t-ic { width: 22px; height: 22px; }
.t-zb-all { background: #fff1c9; color: #8a6200; }
.t-zb-teacher { background: #efe5fb; color: #6a3fb0; }
.t-zb-student { background: #dcf3e4; color: #13693a; }
.t-zb-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #1f2a2c;
  color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .t-ib, .t-zb, .t-file-pick-bub { transition: none; animation: none !important; } }
