/* ===== โทนสี: น้ำเงินเข้ม + ทอง ===== */
:root {
  --navy: #13284a;
  --navy-2: #1d3d6e;
  --navy-3: #2a5293;
  --gold: #c9a24a;
  --gold-2: #e3c578;
  --gold-soft: #f7efdc;
  --ok: #2e7d32;
  --warn: #a86b00;
  --bad: #c62828;
  --bg: #f7f6f2;
  --card: #ffffff;
  --line: #e6e2d8;
  --text: #1c2433;
  --muted: #6b7280;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(19, 40, 74, .08);
  --head: "Noto Serif Thai", "Sarabun", serif;
}
* { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  margin: 0; font-family: "Sarabun", system-ui, sans-serif; color: var(--text);
  background: var(--bg); line-height: 1.65; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--navy-3); }
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 16px 40px; }
main.wide { max-width: none; padding: 0 0 40px; }
h1, h2, h3 { font-family: var(--head); color: var(--navy); line-height: 1.35; }
h1 { font-size: 1.7rem; margin: .4em 0; } h2 { font-size: 1.35rem; margin: .9em 0 .4em; } h3 { font-size: 1.1rem; margin: .4em 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .pad { padding: 32px 0; }
.pre { white-space: pre-line; }

/* ===== แถบบน ===== */
.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; flex-wrap: wrap;
  border-bottom: 3px solid var(--gold);
}
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; font-family: var(--head); }
.brand::before {
  content: "อ"; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); color: var(--navy); font-weight: 700; font-size: 1rem;
}
#nav { display: flex; gap: 6px; flex-wrap: wrap; }
#nav a, #nav button {
  color: #fff; text-decoration: none; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .9rem; cursor: pointer;
}
#nav a:hover, #nav button:hover { background: rgba(255,255,255,.16); }
#nav a.active { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; }

/* ===== ส่วนท้าย ===== */
.footer { background: var(--navy); color: #d7dceb; padding: 36px 20px 24px; font-size: .92rem; }
.footer a { color: var(--gold-2); }
.footer-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer h4 { color: #fff; font-family: var(--head); margin: 0 0 8px; font-size: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; } .footer li { margin: 4px 0; }
.footer-bottom { max-width: 1120px; margin: 24px auto 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); text-align: center; color: #9aa3ba; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== หน้าแรก ===== */
.home-hero { background: radial-gradient(circle at 80% 20%, var(--navy-3), var(--navy) 60%); color: #fff; position: relative; overflow: hidden; }
.home-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold)); }
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 48px 20px 56px; display: grid; grid-template-columns: 1.3fr .9fr; gap: 36px; align-items: center; }
.kicker { display: inline-block; color: var(--gold-2); letter-spacing: .04em; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.hero-text h1 { color: #fff; font-size: 2.2rem; margin: .2em 0 .3em; }
.hero-text h1 span { color: var(--gold-2); }
.hero-text p { color: #dfe5f2; font-size: 1.05rem; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.hero-photo { position: relative; justify-self: center; width: min(340px, 80vw); }
.hero-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 6px solid var(--gold); box-shadow: 0 20px 50px rgba(0,0,0,.35); display: block; }
.hero-photo .tag {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); white-space: nowrap;
  background: #fff; color: var(--navy); border-radius: 999px; padding: 8px 18px; font-weight: 700; box-shadow: var(--shadow); font-size: .92rem;
}
.hero-photo .tag small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; text-align: center; }
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 32px; }
  .hero-text p { margin-inline: auto; } .hero-cta { justify-content: center; }
  .hero-photo { order: -1; width: 220px; }
  .hero-text h1 { font-size: 1.75rem; }
}

.stats { max-width: 1000px; margin: -34px auto 0; position: relative; z-index: 2; padding: 0 16px; }
.stats-inner { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.stat { padding: 18px 12px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--head); font-size: 1.6rem; color: var(--navy); line-height: 1.2; }
.stat span { color: var(--muted); font-size: .85rem; }
@media (max-width: 700px) { .stats-inner { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

.section { max-width: 1120px; margin: 0 auto; padding: 48px 16px 8px; }
.section-head { text-align: center; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: 1.6rem; }
.section-head h2::after { content: ""; display: block; width: 56px; height: 3px; background: var(--gold); margin: 10px auto 0; border-radius: 3px; }
.section-head p { color: var(--muted); margin: 10px 0 0; }

.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.benefit { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; text-align: center; }
.benefit .ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; background: var(--gold-soft); font-size: 1.5rem; }
.benefit h3 { font-size: 1.02rem; margin: 0 0 4px; }
.benefit p { margin: 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 860px) { .benefits { grid-template-columns: repeat(2, 1fr); } }

.about { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.about img { width: 100%; border-radius: var(--radius); display: block; }
.about ul { margin: 8px 0 0; padding-left: 1.1em; } .about li { margin: 3px 0; }
@media (max-width: 700px) { .about { grid-template-columns: 1fr; text-align: center; } .about img { max-width: 180px; margin: 0 auto; } .about ul { text-align: left; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 46px; counter-reset: s; position: relative; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 20px; position: relative; text-align: center; }
.step b { display: block; color: var(--navy); font-size: 1.05rem; margin-top: 4px; }
.step b::before { counter-increment: s; content: counter(s); width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), #24467c); color: var(--gold-2); display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; box-shadow: 0 0 0 5px rgba(201,162,74,.22); }
.step span { color: var(--muted); font-size: .9rem; display: block; margin-top: 4px; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 45px; right: -38px; width: 30px; height: 30px; z-index: 2; pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a24a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E");
  animation: stepnudge 1.6s ease-in-out infinite; }
@keyframes stepnudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 40px; max-width: 420px; margin: 0 auto; }
  .step:not(:last-child)::after { top: auto; bottom: -36px; right: 50%; margin-right: -15px; transform: rotate(90deg); animation: stepnudge-v 1.6s ease-in-out infinite; }
  @keyframes stepnudge-v { 0%,100% { transform: rotate(90deg) translateX(0); } 50% { transform: rotate(90deg) translateX(5px); } }
}
@media (prefers-reduced-motion: reduce) { .step::after { animation: none !important; } }

.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: #3b4352; }

.cta-band { max-width: 1120px; margin: 48px auto 0; padding: 0 16px; }
.cta-band > div { background: linear-gradient(120deg, var(--navy), var(--navy-3)); color: #fff; border-radius: var(--radius); padding: 30px 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-band h3 { color: #fff; margin: 0; font-size: 1.3rem; } .cta-band p { margin: 4px 0 0; color: #d7dceb; }

/* ===== การ์ด ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card .body { padding: 16px 18px 18px; }
.card.link { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card.link .body { flex: 1; display: flex; flex-direction: column; }
.card.link:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 4px; }
.card .meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; margin: 6px 0 12px; }
.card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px dashed var(--line); }
.card .go { color: var(--navy-3); font-weight: 600; font-size: .9rem; }
.cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: linear-gradient(135deg, var(--navy), var(--navy-3)); display: block; }
.cover-ph { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.2rem; padding: 18px; text-align: center; font-family: var(--head); position: relative; }
.cover-ph::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--gold); }
.price { font-size: 1.35rem; font-weight: 700; color: var(--navy); font-family: var(--head); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; background: #eef1f6; color: var(--muted); }
.badge.ok { background: #e6f4ea; color: var(--ok); } .badge.warn { background: #fff4e0; color: var(--warn); } .badge.bad { background: #fdecec; color: var(--bad); }
.badge.free { background: var(--gold-soft); color: #8a6a1f; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 12px 0; }
.hero { background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; border-radius: var(--radius); padding: 28px 22px; margin-bottom: 18px; }
.hero h1 { margin-top: 0; color: #fff; }

/* ===== ปุ่มและฟอร์ม ===== */
.btn {
  display: inline-block; border: 0; border-radius: 10px; padding: 12px 22px; font: inherit; font-weight: 600;
  background: var(--navy-2); color: #fff; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { filter: brightness(1.08); } .btn:disabled { opacity: .55; cursor: default; }
.btn.big { font-size: 1.1rem; padding: 14px 28px; width: 100%; }
.btn.accent, .btn.gold { background: var(--gold); color: var(--navy); }
.btn.ok { background: var(--ok); } .btn.bad { background: var(--bad); }
.btn.ghost { background: #fff; color: var(--navy-2); border: 1px solid var(--navy-2); }
.btn.line { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
.btn.sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
form.stack { display: grid; gap: 12px; max-width: 460px; }
label { font-weight: 600; display: grid; gap: 4px; font-size: .95rem; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
label .badge, label img { justify-self: start; }
input, select, textarea {
  font: inherit; padding: 10px 12px; border: 1px solid #cfd4dc; border-radius: 10px; width: 100%; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-2); border-color: var(--gold); }
textarea { min-height: 110px; }
input[type=checkbox] { width: 20px; height: 20px; flex: none; margin-top: 4px; accent-color: var(--navy-2); }
.auth-box { max-width: 460px; margin: 20px auto; }

/* ===== บทเรียน ===== */
.lessons { list-style: none; padding: 0; margin: 0; }
.lessons .sec { font-weight: 700; color: var(--navy); padding: 12px 4px 4px; font-family: var(--head); }
.lessons li a, .lessons li .li {
  display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: inherit;
}
.lessons li a:hover { background: #f3f1ea; }
.lessons li a.current { background: var(--gold-soft); font-weight: 700; }
.lessons .num { width: 28px; height: 28px; border-radius: 50%; background: #eef1f6; display: grid; place-items: center; font-size: .8rem; flex: none; }
.lessons .done .num { background: var(--ok); color: #fff; }
.lessons .grow { flex: 1; }
.learn { display: grid; grid-template-columns: 1fr 340px; gap: 18px; }
@media (max-width: 860px) { .learn { grid-template-columns: 1fr; } }
.player { position: relative; padding-top: 56.25%; background: #000; border-radius: var(--radius); overflow: hidden; }
.player iframe, .player .msg { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .msg { color: #fff; display: grid; place-items: center; padding: 20px; text-align: center; }
.progress { height: 10px; background: #e6e9ee; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }

/* ===== หลังบ้าน ===== */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .92rem; }
th { background: #f4f2ec; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.lesson-edit { display: grid; grid-template-columns: 60px 1fr 1fr; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.lesson-edit .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .lesson-edit { grid-template-columns: 1fr; } }
.bar { height: 8px; background: #e6e9ee; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar > div { height: 100%; width: 0; background: var(--navy-3); transition: width .2s; }
.slip { max-width: 100%; max-height: 420px; border: 1px solid var(--line); border-radius: 8px; }
.qr { max-width: 240px; border: 1px solid var(--line); border-radius: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff;
  padding: 12px 20px; border-radius: 12px; z-index: 50; max-width: 90vw; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  border-left: 4px solid var(--gold);
}
.toast.bad { background: var(--bad); border-left-color: #fff; }

/* =====================================================================
   เวอร์ชันเว็บไซต์เต็มรูปแบบ — ความพรีเมียมและภาพเคลื่อนไหว
   ===================================================================== */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--gold), #f3dc9a, var(--gold)); z-index: 200; box-shadow: 0 0 12px var(--gold); }
.topbar { transition: background .4s, box-shadow .4s; z-index: 100; padding: 12px 24px; }
.topbar.glass { background: rgba(14, 30, 58, .82); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); }
#nav { align-items: center; }
#nav a, #nav button { background: transparent; border-color: transparent; }
#nav a:hover, #nav button:hover { background: rgba(255,255,255,.1); }
#nav .pill { border: 1px solid rgba(255,255,255,.3); }
#nav a.active { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.burger { display: none; background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 10px; width: 44px; height: 40px; cursor: pointer; }
.burger svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; fill: none; }
@media (max-width: 1240px) {
  .burger { display: inline-grid; place-items: center; }
  #nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 8px 0 4px; }
  body.nav-open #nav { display: flex; }
  #nav a, #nav button { padding: 10px 14px; font-size: 1rem; text-align: left; }
}
@media (max-width: 760px) { .topbar { position: relative; } }

/* พื้นหลังสีเข้มแบบมีมิติ */
.fx-dark { position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background: radial-gradient(1200px 600px at 85% -10%, #24477f 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #1b3a6b 0%, transparent 55%), linear-gradient(160deg, #0d1d38, #13284a 55%, #0f2140) !important; }
.fx-dark > * { position: relative; z-index: 2; }
.fx-dark > canvas.net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; }
.fx-dark > .orb { position: absolute; border-radius: 50%; filter: blur(60px); z-index: 1; pointer-events: none; mix-blend-mode: screen; }
.fx-dark > .o1 { width: 420px; height: 420px; background: var(--gold); opacity: .2; top: -120px; right: 8%; animation: float1 14s ease-in-out infinite; }
.fx-dark > .o2 { width: 360px; height: 360px; background: #3d6bc4; opacity: .28; bottom: -140px; left: -60px; animation: float2 18s ease-in-out infinite; }
.fx-dark > .gridbg { position: absolute; inset: 0; z-index: 1; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%); }
@keyframes float1 { 50% { transform: translate(-60px, 50px) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(70px, -40px) scale(1.15); } }
.home-hero::after { z-index: 3; }
.hero-inner { padding: 72px 24px 96px; max-width: 1200px; }
.hero-text h1 { font-size: 2.9rem; letter-spacing: -.01em; }
.shine { background: linear-gradient(100deg, var(--gold) 0%, #f6e2a6 25%, var(--gold) 50%, #f6e2a6 75%, var(--gold) 100%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
@media (max-width: 820px) { .hero-text h1 { font-size: 2rem; } .hero-inner { padding: 40px 20px 72px; } }

.banner .wrap { max-width: 1200px; margin: 0 auto; padding: 64px 24px 72px; }
.banner h1 { color: #fff; font-size: 2.4rem; margin: .2em 0 .3em; }
.banner p { color: #dfe5f2; font-size: 1.08rem; max-width: 720px; margin: 0; }
@media (max-width: 760px) { .banner h1 { font-size: 1.8rem; } .banner .wrap { padding: 44px 20px 52px; } }
.kicker.dark { color: #8a6a1f; }

/* รูปโปรไฟล์ */
.hero-photo { width: min(380px, 80vw); }
.hero-photo .tag { z-index: 4; }
.pwrap { position: relative; }
.pwrap img { position: relative; z-index: 2; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6) !important; }
.pwrap .ring { position: absolute; inset: -18px; border-radius: 50%; z-index: 1; background: conic-gradient(from 0deg, transparent 0 20%, var(--gold) 30%, #f6e2a6 38%, transparent 48% 70%, var(--gold) 82%, transparent 92%); animation: spin 9s linear infinite; -webkit-mask: radial-gradient(circle, transparent 63%, #000 64%, #000 66%, transparent 67%); mask: radial-gradient(circle, transparent 63%, #000 64%, #000 66%, transparent 67%); }
.pwrap .halo { position: absolute; inset: -40px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,74,.35), transparent 65%); animation: pulse 4s ease-in-out infinite; z-index: 0; }
.pwrap .chip { position: absolute; z-index: 3; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 14px; padding: 10px 14px; font-size: .78rem; line-height: 1.3; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); animation: bob 5s ease-in-out infinite; white-space: nowrap; }
.pwrap .chip b { display: block; color: #f3dc9a; font-family: var(--head); font-size: 1.1rem; }
.pwrap .c1 { top: 6%; left: -16%; } .pwrap .c2 { bottom: 22%; right: -18%; animation-delay: -2.5s; }
.pwrap.sm img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 5px solid var(--gold); display: block; }
.pwrap.sm .ring { inset: -12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .7; } }
@keyframes bob { 50% { transform: translateY(-12px); } }
@media (max-width: 820px) { .pwrap .c1 { left: -8%; } .pwrap .c2 { right: -8%; } }

/* ตัวเลขสถิติ */
.stats { max-width: 1100px; margin-top: -48px; }
.stats-inner { box-shadow: 0 30px 60px -30px rgba(19,40,74,.45); }
.stats.flat { margin-top: 32px; }
.stat b { font-size: 1.9rem; font-variant-numeric: tabular-nums; }

/* แถบเลื่อนกลุ่มลูกค้า */
.marq { overflow: hidden; padding: 22px 0; border-block: 1px solid var(--line); background: #fff; margin-top: 56px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marq .track { display: flex; gap: 56px; width: max-content; animation: marq 38s linear infinite; }
.marq span { font-family: var(--head); font-size: 1.1rem; color: var(--navy); opacity: .75; white-space: nowrap; display: flex; align-items: center; gap: 56px; }
.marq span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
@keyframes marq { to { transform: translateX(-50%); } }

/* กริดและการ์ด */
.section { max-width: 1200px; padding: 64px 20px 8px; }
.section-head.left { text-align: left; margin: 0; }
.section-head.left h2::after { margin-left: 0; }
.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.go { color: var(--navy-3); font-weight: 600; text-decoration: none; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr; } }
.tile { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: inherit; }
.tile h3 { margin: 6px 0 0; } .tile p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.small-tile { align-items: flex-start; } .small-tile h3 { font-size: 1rem; }
.ic { width: 50px; height: 50px; border-radius: 14px; background: var(--gold-soft); display: grid; place-items: center; }
.ic svg { width: 24px; height: 24px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-card .ic { background: var(--navy); } .app-card .ic svg { stroke: var(--gold); }
.app-card .body { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.app-card .badge { align-self: flex-start; } .app-card p { margin: 0; }
.app-card .foot { margin-top: auto; flex-wrap: wrap; gap: 8px; justify-content: flex-start; border-top: 0; }
.grid.apps { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ticks { list-style: none; padding: 0; margin: 8px 0; }
.ticks li { position: relative; padding-left: 22px; margin: 6px 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.note { background: #fffaf0; border: 1px solid var(--gold-2); border-radius: 14px; padding: 14px 18px; margin-bottom: 22px; }

/* หนังสือ */
.grid.books { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.book-card .bk-wrap { padding: 20px 20px 0; }
.bk { aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; position: relative; transition: transform .5s cubic-bezier(.2,.7,.2,1);
  box-shadow: 6px 10px 24px -8px rgba(0,0,0,.45), inset 8px 0 0 rgba(0,0,0,.18); background: linear-gradient(150deg, var(--navy), var(--navy-3)); }
.bk img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk.ph { color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 18px 18px 18px 24px; border-bottom: 6px solid var(--gold); }
.bk.ph small { color: var(--gold-2); font-weight: 600; } .bk.ph b { font-family: var(--head); font-size: 1.15rem; line-height: 1.35; } .bk.ph span { color: #c9d1e3; font-size: .75rem; }
.bk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.28) 48%, transparent 60%); transform: translateX(-120%); transition: transform 1s; }
.bk:hover::after, .card:hover .bk::after { transform: translateX(120%); }
.feature { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: center; background: #fff; border: 2px solid var(--gold); border-radius: 20px; padding: 32px; }
.feature h2 { margin: .2em 0; font-size: 1.7rem; }
.price.big { font-size: 1.8rem; }
@media (max-width: 700px) { .feature { grid-template-columns: 1fr; } .feature .bk-wrap { max-width: 220px; } }
.book-detail { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; }
.book-detail .bk-wrap { position: sticky; top: 90px; }
@media (max-width: 760px) { .book-detail { grid-template-columns: 1fr; } .book-detail .bk-wrap { position: static; max-width: 240px; } }

/* เอฟเฟกต์การ์ด */
.lift { transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s, border-color .45s; position: relative; overflow: hidden; box-shadow: 0 2px 0 rgba(19,40,74,.03), 0 12px 30px -22px rgba(19,40,74,.35); }
.lift::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(201,162,74,.16), transparent 45%); opacity: 0; transition: opacity .4s; pointer-events: none; z-index: 0; }
.lift:hover::before { opacity: 1; }
.lift > * { position: relative; z-index: 1; }
.lift:hover { transform: translateY(-8px); box-shadow: 0 28px 60px -24px rgba(19,40,74,.45); border-color: var(--gold-2); }
.card.link:hover { transform: translateY(-8px); }
.gbtn { position: relative; overflow: hidden; box-shadow: 0 10px 30px -10px rgba(201,162,74,.7); transition: transform .3s, box-shadow .3s; }
.gbtn::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.65), transparent); transform: skewX(-20deg); animation: sweep 3.6s ease-in-out infinite; }
.gbtn:hover { transform: translateY(-2px); filter: none; }
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }

/* หัวข้อ เปิดตัวเมื่อเลื่อนถึง */
.rv { opacity: 0; transform: translateY(34px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }
.no-fx .rv { opacity: 1; transform: none; }
.section-head h2::after { width: 0; transition: width 1.1s cubic-bezier(.2,.7,.2,1) .2s; }
.section-head.in h2::after, .in .section-head h2::after, .no-fx .section-head h2::after { width: 64px; }

/* แถบเชิญชวน */
.cta-band { max-width: 1200px; padding: 0 20px; margin-top: 64px; }
.cta-band > div { background: none; border-radius: 22px; padding: 40px 36px; }
.cta-band h3 { font-size: 1.5rem; }

/* ติดต่อ */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
form.wide-form { max-width: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }
.about { grid-template-columns: 240px 1fr; padding: 32px; }
.about .lead { font-size: 1.05rem; }
.about .pwrap.sm { max-width: 240px; margin: 12px; }
@media (max-width: 700px) { .about .pwrap.sm { max-width: 180px; margin: 12px auto; } }
.step.lift { overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}
@media (max-width: 700px) { .stat b { font-size: 1.45rem; } .stat span { font-size: .78rem; } }
#pv-bar { position: sticky; top: 0; z-index: 150; background: #c9a24a; color: #13284a; text-align: center; padding: 8px 12px; font-weight: 600; font-size: .9rem; }
#pv-bar button { margin-left: 8px; background: #13284a; color: #fff; border: 0; border-radius: 999px; padding: 4px 14px; font: inherit; cursor: pointer; }
#nav .gold-pill { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #fffaf0; border: 1px dashed var(--gold); border-radius: 12px; padding: 10px 14px; margin: 0 0 16px; font-size: .92rem; }

/* ===== บทความ ===== */
.grid.articles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.art-card h3 { font-size: 1.08rem; }
.art-ph { background: radial-gradient(circle at 80% 20%, var(--navy-3), var(--navy) 70%); }
.art-ph span { color: var(--gold-2); font-family: var(--head); font-size: 1.3rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chips a { padding: 6px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--navy); font-weight: 600; font-size: .9rem; }
.chips a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.article { max-width: 760px; margin: 0 auto; padding: 32px 20px 0; }
.article h1 { font-size: 2.1rem; margin: .3em 0 .2em; }
.art-meta { margin-bottom: 18px; }
.art-cover { width: 100%; border-radius: 16px; margin: 6px 0 20px; display: block; }
.article .lead { font-size: 1.12rem; color: #3b4352; border-left: 4px solid var(--gold); padding-left: 14px; }
.art-body { font-size: 1.06rem; line-height: 1.9; color: #232b3a; }
.art-body h2 { font-size: 1.45rem; margin: 1.4em 0 .4em; }
.art-body h3 { font-size: 1.15rem; margin: 1.2em 0 .3em; }
.art-body p { margin: 0 0 1em; }
.art-body ul, .art-body ol { margin: 0 0 1em; padding-left: 1.4em; }
.art-body li { margin: .3em 0; }
.art-body blockquote { margin: 1.2em 0; padding: 14px 18px; background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; font-weight: 600; color: var(--navy); }
.share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 28px 0; padding: 14px 0; border-block: 1px solid var(--line); }
.author-box { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); flex: none; }
.author-box p { margin: 4px 0; }
.art-edit { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: start; }
.art-preview { position: sticky; top: 90px; max-height: 80vh; overflow: auto; }
@media (max-width: 1000px) { .art-edit { grid-template-columns: 1fr; } .art-preview { position: static; } }
@media (max-width: 600px) { .article h1 { font-size: 1.6rem; } }
label input, label textarea, label select { font-weight: 400; }
@media (min-width: 1241px) { #nav { gap: 2px; flex-wrap: nowrap; } #nav a, #nav button { padding: 6px 10px; font-size: .86rem; white-space: nowrap; } }
@media (max-width: 1320px) and (min-width: 1241px) { .brand { font-size: .95rem; } }

/* สัญญาณเตือนอนุมัติ */
.ndot[hidden] { display:none !important; }
.ndot { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; margin-left:6px; border-radius:999px; background:#e5484d; color:#fff; font-size:.72rem; font-weight:700; line-height:1; box-shadow:0 0 0 0 rgba(229,72,77,.6); animation:ndot 1.8s infinite; vertical-align:middle; }
@keyframes ndot { 0%{box-shadow:0 0 0 0 rgba(229,72,77,.55)} 70%{box-shadow:0 0 0 9px rgba(229,72,77,0)} 100%{box-shadow:0 0 0 0 rgba(229,72,77,0)} }
#ok-bar { position:relative; z-index:5; display:flex; gap:12px; align-items:center; justify-content:center; flex-wrap:wrap; padding:10px 44px 10px 16px; background:linear-gradient(90deg,#1f7a4d,#2e9d63); color:#fff; font-weight:600; font-size:.95rem; text-align:center; animation:okin .5s ease; }
#ok-bar.warn { background:linear-gradient(90deg,#a4471f,#c9622e); }
#ok-bar a { background:#fff; color:#13284a; border-radius:999px; padding:5px 14px; text-decoration:none; font-weight:700; white-space:nowrap; }
#ok-bar button { position:absolute; right:10px; top:50%; transform:translateY(-50%); background:none; border:0; color:#fff; font-size:1.4rem; cursor:pointer; line-height:1; }
@keyframes okin { from{transform:translateY(-100%);opacity:0} to{transform:none;opacity:1} }
.ok-panel { background:#e9f7ef; border:1px solid #9fd8b6; color:#14532d; border-radius:14px; padding:14px 18px; margin:10px 0 6px; line-height:1.7; animation:okin .5s ease; }
.new-tag { display:inline-block; background:#2e9d63; color:#fff; font-size:.75rem; font-weight:700; border-radius:999px; padding:2px 10px; margin-bottom:6px; }
.card.is-new { outline:2px solid #2e9d63; outline-offset:2px; box-shadow:0 0 0 6px rgba(46,157,99,.15); }
@media (prefers-reduced-motion: reduce) { .ndot, #ok-bar, .ok-panel { animation:none; } }

/* ชุดโพสต์ Facebook */
#fbk { position: fixed; inset: 0; z-index: 300; background: rgba(11,26,51,.6); display: grid; place-items: center; padding: 16px; overflow: auto; }
.fbk-in { background: #fff; border-radius: 18px; padding: 22px; width: min(980px, 100%); position: relative; max-height: calc(100vh - 32px); overflow: auto; }
.fbk-in h3 { margin: 0 0 14px; }
.fbk-x { position: absolute; right: 14px; top: 10px; background: none; border: 0; font-size: 1.8rem; cursor: pointer; color: var(--navy); }
.fbk-grid { display: grid; grid-template-columns: 360px 1fr; gap: 22px; }
.fbk-img { aspect-ratio: 4 / 5; background: #f1f3f8; border-radius: 12px; display: grid; place-items: center; overflow: hidden; margin-bottom: 10px; }
.fbk-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fbk-opt { flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.fbk-opt select { display: block; margin-top: 4px; }
#fbk textarea { width: 100%; font: inherit; font-weight: 400; margin-top: 4px; line-height: 1.6; }
.fbk-how { margin-top: 12px; padding-left: 18px; }
@media (max-width: 760px) { .fbk-grid { grid-template-columns: 1fr; } }
.ph-pick { margin: 6px 0 12px; }
.ph-pick .row input { flex: 1; min-width: 200px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.ph-grid button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; aspect-ratio: 16/10; }
.ph-grid button:hover { border-color: var(--gold); }
.ph-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-out { width: 100%; border-radius: 10px; margin: 6px 0 8px; display: block; }

/* แพ็กเกจ */
.bundle { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: radial-gradient(circle at 85% 20%, var(--navy-3), var(--navy) 65%); color: #fff; text-decoration: none;
  border-radius: 18px; padding: 26px 28px; margin: 0 0 24px; border-bottom: 5px solid var(--gold); }
.bundle h2 { color: #fff; margin: 4px 0 6px; }
.bundle p { margin: 4px 0; color: #dfe5f2; }
.bundle-text { flex: 1 1 320px; }
.bundle-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.bundle-price s { color: #b9c3da; }
.bundle-price b { font-size: 2rem; color: var(--gold-2); line-height: 1.2; }
.bundle-price .save { background: var(--gold); color: var(--navy); font-weight: 700; border-radius: 999px; padding: 2px 12px; font-size: .9rem; }
.bundle-price .btn { margin-top: 8px; }
@media (max-width: 640px) { .bundle-price { align-items: flex-start; text-align: left; } }
.bundle-mini { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; background: var(--gold-soft); border: 1px solid var(--gold); }
.bundle-mini b { color: var(--navy); }
.seats { display: inline-block; background: rgba(201,162,74,.18); color: var(--gold-2) !important; border: 1px solid var(--gold); border-radius: 999px; padding: 4px 14px; margin-top: 8px !important; font-size: .95rem; }
.seats.dark { color: var(--navy) !important; background: var(--gold-soft); }
/* ป้ายโปรโมชั่นกระพริบ */
.promo-tag { display: inline-block; position: relative; overflow: hidden; background: linear-gradient(90deg, #d62828, #f77f00); color: #fff;
  font-weight: 800; font-size: 1.05rem; padding: 6px 18px; border-radius: 999px; letter-spacing: .02em;
  box-shadow: 0 0 0 0 rgba(214,40,40,.6); animation: promoPulse 1.4s ease-in-out infinite; margin-bottom: 8px; }
.promo-tag::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.7), transparent); animation: promoShine 2.2s linear infinite; }
@keyframes promoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(214,40,40,.55); }
  50% { transform: scale(1.07); box-shadow: 0 0 0 12px rgba(214,40,40,0); } }
@keyframes promoShine { 0% { left: -60%; } 60%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .promo-tag, .promo-tag::after { animation: none; } }
.app-card .promo-tag { font-size: .92rem; margin: 10px 0 4px; }

/* ใบเสร็จรับเงิน */
.receipt { background: #fff; color: #111; max-width: 820px; margin: 0 auto; padding: 48px 56px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; line-height: 1.6; }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #13284a; padding-bottom: 14px; }
.rc-head h1 { margin: 0; font-size: 30px; color: #13284a; }
.rc-no { text-align: right; }
.rc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 22px 0; }
.rc-lab { font-size: 13px; color: #555; font-weight: 700; letter-spacing: .03em; }
.rc-edit { outline: none; border-radius: 4px; background: #fff8d6; padding: 0 4px; min-height: 1.6em; }
.rc-edit:empty::before { content: attr(data-ph); color: #999; }
.rc-table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; }
.rc-table th, .rc-table td { border: 1px solid #999; padding: 8px 10px; vertical-align: top; }
.rc-table th { background: #f1f3f7; }
.rc-table .c { text-align: center; } .rc-table .r { text-align: right; }
.rc-sign { display: flex; justify-content: flex-end; margin-top: 56px; text-align: center; }
.rc-name { font-weight: 700; font-size: 18px; min-width: 240px; }
@media print {
  .topbar, .footer, .no-print, .admin-bar { display: none !important; }
  body { background: #fff !important; }
  #app { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .receipt { border: none; padding: 0; max-width: none; }
  .rc-edit { background: none; }
  .rc-edit:empty { display: none; }
}
.note-mail { background: #fff8e1; border: 1px solid #e3c578; border-radius: 12px; padding: 12px 16px; margin: 14px 0; font-size: .95rem; line-height: 1.6; }

/* ---------- ใบประกาศนียบัตร ---------- */
.cert-wrap { container-type: inline-size; max-width: 1100px; margin: 0 auto 18px; }
.cert { position: relative; aspect-ratio: 297 / 210; background: radial-gradient(ellipse at 50% 40%, #fffdf7 0%, #fbf5e6 70%, #f4ead2 100%);
  box-shadow: 0 10px 30px rgba(19,40,74,.18); color: #13284a; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cert-orn { position: absolute; inset: 0; width: 100%; height: 100%; }
.cert-in { position: absolute; inset: 7% 9% 6%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.cert-top { display: flex; align-items: center; gap: 1.2cqw; font-family: "Sarabun", sans-serif; font-weight: 600; letter-spacing: .18em; font-size: 1.15cqw; color: #8a6d2a; }
.cert-logo { width: 3.2cqw; height: 3.2cqw; border-radius: 50%; background: #c9a24a; color: #13284a; display: inline-flex; align-items: center; justify-content: center; font-family: "Noto Serif Thai", serif; font-weight: 700; font-size: 1.8cqw; letter-spacing: 0; }
.cert-t { font-family: "Noto Serif Thai", serif; font-weight: 700; font-size: 5cqw; line-height: 1.25; margin-top: 3.6cqw; color: #13284a; }
.cert-en { font-family: "Sarabun", sans-serif; letter-spacing: .5em; font-size: 1.25cqw; color: #a9862f; margin-top: .3cqw; }
.cert-s { font-family: "Sarabun", sans-serif; font-size: 1.7cqw; margin-top: 3cqw; color: #3b4252; }
.cert-name { font-family: "Charm", "Noto Serif Thai", serif; font-weight: 700; font-size: 5.2cqw; line-height: 1.3; margin-top: 1cqw; padding: 0 3cqw .2cqw; border-bottom: .15cqw solid #c9a24a; min-width: 45%; color: #13284a; }
.cert-course { font-family: "Noto Serif Thai", serif; font-weight: 700; font-size: 3cqw; line-height: 1.35; margin-top: 1cqw; color: #1d3d6e; max-width: 90%; }
.cert-meta { font-family: "Sarabun", sans-serif; font-size: 1.4cqw; margin-top: 1.8cqw; color: #555; }
.cert-foot { margin-top: auto; width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 2cqw; }
.cert-sign { text-align: center; font-family: "Sarabun", sans-serif; font-size: 1.15cqw; line-height: 1.45; color: #3b4252; }
.cert-sign b { color: #13284a; font-size: 1.35cqw; }
.cert-sig { display: block; height: 8.5cqw; width: auto; margin: 0 auto -1.4cqw; }
.cert-line { width: 70%; margin: .4cqw auto .5cqw; border-top: .1cqw solid #13284a; }
.cert-seal svg { width: 10.5cqw; height: 10.5cqw; display: block; font-family: "Sarabun", sans-serif; }
.cert-no { text-align: center; font-family: "Sarabun", sans-serif; font-size: 1.05cqw; line-height: 1.5; color: #555; }
.cert-no b { color: #13284a; font-size: 1.25cqw; }
.cert-url { word-break: break-all; color: #1d3d6e; }
.cert-go { display: block; margin-top: 6px; color: var(--gold); font-weight: 700; }
@media print {
  .cert-wrap { max-width: none; width: 297mm; margin: 0; }
  .cert, .cd { width: 297mm; height: 210mm; aspect-ratio: auto; box-shadow: none; }
  .cert-form { display: none !important; }
}

/* ---- D Contemporary ---- */
.cd { position: relative; aspect-ratio: 297/210; background: #fff; box-shadow: 0 10px 30px rgba(19,40,74,.18); overflow: hidden; color: #13284a; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cd-geo { position: absolute; inset: 0; width: 100%; height: 100%; }
.cd-in { position: absolute; inset: 12% 9% 7% 11%; display: flex; flex-direction: column; }
.cd-head { display: flex; justify-content: space-between; align-items: flex-start; }
.cd-kick { font-family: "Sarabun", sans-serif; letter-spacing: .35em; font-size: 1.75cqw; font-weight: 700; color: #a9862f; }
.cd-t { font-family: "Noto Serif Thai", serif; font-weight: 700; font-size: 4.8cqw; line-height: 1.2; margin-top: .4cqw; }
.cd-en { font-family: "Sarabun", sans-serif; letter-spacing: .3em; font-size: 1.75cqw; color: #6b7690; margin-top: .3cqw; }
.cd-seal svg { width: 15cqw; height: 15cqw; display: block; font-family: "Sarabun", sans-serif; }
.cd-s { font-family: "Sarabun", sans-serif; font-size: 1.7cqw; color: #4a5160; margin-top: 2.6cqw; }
.cd-name { font-family: "Charm", "Noto Serif Thai", serif; font-weight: 700; font-size: 5.2cqw; line-height: 1.25; margin-top: .2cqw; color: #13284a; border-left: .7cqw solid #c9a24a; padding-left: 1.6cqw; }
.cd-course { font-family: "Noto Serif Thai", serif; font-weight: 700; font-size: 2.8cqw; line-height: 1.35; color: #1d3d6e; margin-top: .3cqw; }
.cd-meta { font-family: "Sarabun", sans-serif; font-size: 1.35cqw; color: #666; margin-top: 1cqw; }
.cd-foot { margin-top: auto; display: flex; justify-content: flex-start; align-items: flex-end; gap: 5cqw; }
.cd-inst { display: flex; align-items: flex-end; gap: 1.6cqw; }
.cd-ph { width: 8cqw; height: 8cqw; border-radius: 50%; object-fit: cover; border: .35cqw solid #fff; box-shadow: 0 0 0 .25cqw #c9a24a; }
.cd-sign { font-family: "Sarabun", sans-serif; font-size: 1.15cqw; line-height: 1.45; color: #4a5160; } .cd-sign b { color: #13284a; font-size: 1.35cqw; }
.cd-sign img { display: block; height: 6.8cqw; margin: 0 0 -1.1cqw .5cqw; }
.cd-line { width: 22cqw; border-top: .1cqw solid #13284a; margin: .4cqw 0 .5cqw; }
.cd-no { text-align: left; font-family: "Sarabun", sans-serif; font-size: 1.35cqw; color: #555; line-height: 1.5; padding-bottom: .4cqw; max-width: 30cqw; word-break: break-all; } .cd-no b { font-size: 1.6cqw; color: #13284a; } .cd-no span { color: #1d3d6e; }
.cd-right { position: absolute; right: 0; top: -2cqw; display: flex; flex-direction: column; align-items: flex-end; }

.cert-edit { outline: none; background: #fff6cf; border-radius: .6cqw; cursor: text; }
.cert-edit:focus { box-shadow: 0 0 0 .25cqw #c9a24a; }
@media print { .cert-edit { background: none !important; box-shadow: none !important; } }
.promo-tag { max-width: 100%; box-sizing: border-box; line-height: 1.4; }
