/* RCDS2027 — ตามคู่มืออัตลักษณ์ราชวิทยาลัยทันตแพทย์แห่งประเทศไทย
   Primary: RCDS Lotus #af7dbe · Secondary: College Indigo #464196 · Supporting: Royal Beacon Yellow #ffa046
   Typeface: Prompt (หัวข้อ/เนื้อความ), Noto Sans Thai Looped Light (เนื้อความ), Inter (อังกฤษ) */
:root {
  --lotus: #af7dbe; --lotus-80: #c39dce; --lotus-60: #d7bedf; --lotus-30: #ebdfef; --lotus-10: #f7f2f8;
  --indigo: #464196; --indigo-80: #736eb4; --indigo-60: #a2a0cb; --indigo-30: #d1cfe5; --indigo-10: #ececf4;
  --indigo-deep: #2c2970;
  --beacon: #ffa046; --beacon-80: #ffb874; --beacon-60: #ffcfa2; --beacon-30: #ffe7d1; --beacon-10: #fff5ec;
  --black: #000; --white: #fff; --pale: #f2f2f2;
  --ink: #1b1a3a; --muted: #5d5b7a; --line: #e4e2ee;
  --ok: #1f8a5b; --ok-bg: #e7f6ee; --err: #c0392b; --err-bg: #fdeceb;
  --radius: 14px; --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(27,26,58,.06), 0 8px 24px rgba(70,65,150,.08);
  --font-th: "Prompt", "Inter", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans Thai Looped", "Prompt", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--font-body); font-weight: 400; line-height: 1.7; font-size: 16px; }
img, svg { max-width: 100%; }
a { color: var(--indigo); }
a:hover { color: var(--lotus); }
h1, h2, h3, h4 { font-family: var(--font-th); font-weight: 600; line-height: 1.3; margin: 0 0 .5em; color: var(--indigo); }
h1 { font-size: clamp(1.8rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.en { font-family: "Inter", sans-serif; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--indigo); }
.brand img { height: 42px; width: auto; }
.brand b { font-family: "Inter", sans-serif; font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; display: block; line-height: 1.1; }
.brand small { display: block; font-size: .72rem; color: var(--muted); font-family: var(--font-th); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { font-family: var(--font-th); text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 10px; font-size: .95rem; }
.nav a:hover, .nav a.active { color: var(--indigo); background: var(--indigo-10); }
.nav .btn { margin-left: 8px; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--indigo); cursor: pointer; }
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-th); font-weight: 500; font-size: 1rem; line-height: 1; padding: 13px 22px; border-radius: 999px; border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--beacon); color: var(--ink); box-shadow: 0 6px 18px rgba(255,160,70,.35); }
.btn-primary:hover { background: #ff9530; color: var(--ink); }
.btn-indigo { background: var(--indigo); color: var(--white); }
.btn-indigo:hover { background: var(--indigo-deep); color: var(--white); }
.btn-outline { background: transparent; color: var(--indigo); border-color: var(--indigo-30); }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-ghost-light { background: rgba(255,255,255,.1); color: var(--white); border-color: rgba(255,255,255,.35); }
.btn-ghost-light:hover { background: rgba(255,255,255,.2); color: var(--white); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 85% 10%, #5a54b4 0%, var(--indigo) 45%, var(--indigo-deep) 100%); color: var(--white); padding: 72px 0 88px; }
.hero h1, .hero h2 { color: var(--white); }
.hero .burst { position: absolute; pointer-events: none; }
.hero .burst-a { width: 520px; right: -120px; top: -90px; opacity: .9; }
.hero .burst-b { width: 380px; right: 170px; bottom: -170px; opacity: .55; }
@media (max-width: 640px) { .hero .burst-a { width: 340px; right: -170px; top: -60px; opacity: .45; } .hero .burst-b { display: none; } }
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-th); font-size: .85rem; font-weight: 500; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--beacon); box-shadow: 0 0 0 4px rgba(255,160,70,.25); }
.hero .kicker { font-family: "Inter", sans-serif; font-weight: 500; color: var(--lotus-60); margin: 18px 0 8px; font-size: .95rem; }
.hero .theme { font-family: "Inter", sans-serif; font-weight: 700; font-style: italic; font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--beacon-60); line-height: 1.35; margin: 16px 0 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0 0 32px; font-family: var(--font-th); }
.hero-meta div { display: flex; align-items: center; gap: 10px; }
.hero-meta svg { flex: none; color: var(--beacon); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* sections */
.section { padding: 80px 0; }
.section.alt { background: var(--lotus-10); }
.section.indigo { background: var(--indigo-10); }
.section-head { margin-bottom: 36px; }
.eyebrow { display: inline-block; font-family: "Inter", sans-serif; font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lotus); margin-bottom: 8px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding: 56px 0; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.card.flat { box-shadow: none; }

/* stat cards */
.facts { margin-top: -48px; position: relative; z-index: 2; }
.fact { display: flex; gap: 14px; align-items: flex-start; }
.fact .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--lotus-30); color: var(--indigo); }
.fact b { display: block; font-family: var(--font-th); font-weight: 600; color: var(--indigo); }
.fact span { font-size: .9rem; color: var(--muted); }

/* schedule */
.tabs { display: inline-flex; gap: 6px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 24px; flex-wrap: wrap; }
.tab { font-family: var(--font-th); border: 0; background: transparent; padding: 10px 20px; border-radius: 999px; cursor: pointer; font-size: .95rem; color: var(--muted); }
.tab small { display: block; font-size: .75rem; }
.tab[aria-selected="true"] { background: var(--indigo); color: var(--white); }
.day-head { font-family: var(--font-th); color: var(--muted); margin-bottom: 16px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.slot { display: grid; grid-template-columns: 132px 1fr; gap: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.slot .time { font-family: "Inter", sans-serif; font-weight: 700; color: var(--indigo); font-variant-numeric: tabular-nums; }
.slot .title { font-family: var(--font-th); font-weight: 500; font-size: 1.05rem; color: var(--ink); line-height: 1.45; }
.slot .sub { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.speakers { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; padding: 4px 12px; border-radius: 999px; background: var(--lotus-10); color: var(--indigo); border: 1px solid var(--lotus-30); }
.slot.break { background: var(--beacon-10); border-color: var(--beacon-30); }
.slot.break .time { color: #c56a12; }
.slot.ceremony { background: var(--indigo-10); border-color: var(--indigo-30); }
@media (max-width: 640px) { .slot { grid-template-columns: 1fr; gap: 6px; padding: 16px; } }

/* fees */
.fee-card { position: relative; display: flex; flex-direction: column; }
.fee-card .price { font-family: "Inter", sans-serif; font-weight: 700; font-size: 2.3rem; color: var(--indigo); line-height: 1.1; margin: 12px 0 4px; }
.fee-card .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.fee-card.featured { border: 2px solid var(--lotus); }
.fee-card .tag { position: absolute; top: -12px; left: 24px; background: var(--lotus); color: var(--white); font-family: var(--font-th); font-size: .78rem; padding: 3px 12px; border-radius: 999px; }
.note-box { border-radius: var(--radius); padding: 18px 22px; background: var(--beacon-10); border: 1px solid var(--beacon-30); }
.note-box.indigo { background: var(--indigo-10); border-color: var(--indigo-30); }
.list-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list-check li { position: relative; padding-left: 28px; }
.list-check li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%; background: var(--lotus-30) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23464196' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9'/%3E%3C/svg%3E") center/16px no-repeat; }
.cols-2 { columns: 2; column-gap: 32px; }
.cols-2 li { break-inside: avoid; }
@media (max-width: 640px) { .cols-2 { columns: 1; } }

/* documents */
.doc { display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--ink); padding: 20px 22px; transition: transform .15s ease, border-color .15s ease; }
a.doc:hover { transform: translateY(-2px); border-color: var(--lotus); color: var(--ink); }
.doc-ico { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--lotus-30); color: var(--indigo); }
.doc-body { flex: 1; min-width: 0; }
.doc-body b { display: block; font-family: var(--font-th); font-weight: 500; color: var(--indigo); }
.doc-act { flex: none; font-family: var(--font-th); font-size: .85rem; padding: 6px 14px; border-radius: 999px; background: var(--beacon); color: var(--ink); }
.doc.is-soon .doc-act { background: var(--pale); color: var(--muted); }
.doc.is-soon { box-shadow: none; }

/* sponsor packages */
.pkg { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.pkg .pkg-img { aspect-ratio: 16/9; background: var(--indigo-10); display: block; width: 100%; object-fit: cover; }
.pkg .pkg-art { aspect-ratio: 16/9; display: grid; place-items: center; background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-deep) 100%); color: var(--white); position: relative; overflow: hidden; }
.pkg .pkg-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.pkg .price { font-family: "Inter", sans-serif; font-weight: 700; font-size: 1.8rem; color: var(--indigo); }
.pkg .price small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.pkg .avail { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-family: var(--font-th); padding: 4px 12px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.pkg .avail.full { background: #f6e3e1; color: var(--err); }
.pkg .pkg-foot { margin-top: auto; padding-top: 20px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* forms */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
@media (max-width: 640px) { .panel { padding: 20px; } }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.3rem; }
.field { margin-bottom: 18px; }
.field label, .label { display: block; font-family: var(--font-th); font-weight: 500; font-size: .95rem; margin-bottom: 6px; color: var(--ink); }
.req { color: var(--err); }
.input, select.input, textarea.input { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--white); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--indigo-80); box-shadow: 0 0 0 4px var(--indigo-10); }
.input.is-invalid { border-color: var(--err); }
.error { color: var(--err); font-size: .875rem; margin-top: 6px; }
.help { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.row { display: grid; gap: 0 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-3 { grid-template-columns: 140px repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .row, .row-3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--indigo); flex: none; }
.choice { display: flex; gap: 14px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 10px; }
.choice:hover { border-color: var(--indigo-60); }
.choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--indigo); flex: none; }
.choice:has(input:checked) { border-color: var(--indigo); background: var(--indigo-10); }
.choice.disabled { opacity: .6; cursor: not-allowed; }
.choice .c-body { flex: 1; }
.choice .c-title { font-family: var(--font-th); font-weight: 500; }
.choice .c-price { font-family: "Inter", sans-serif; font-weight: 700; color: var(--indigo); white-space: nowrap; }
.alert { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; font-size: .95rem; }
.alert-ok { background: var(--ok-bg); color: #145c3c; border: 1px solid #bfe6d1; }
.alert-err { background: #fdeceb; color: #8e2a20; border: 1px solid #f3c6c1; }
.alert-info { background: var(--indigo-10); color: var(--indigo); border: 1px solid var(--indigo-30); }
.alert a { color: inherit; font-weight: 600; }
.steps { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.steps span { font-family: var(--font-th); font-size: .85rem; padding: 6px 14px; border-radius: 999px; background: var(--pale); color: var(--muted); }
.steps span.on { background: var(--indigo); color: var(--white); }
.steps span.done { background: var(--lotus-30); color: var(--indigo); }

/* summary */
.summary { width: 100%; border-collapse: collapse; }
.summary th, .summary td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.summary th { font-family: var(--font-th); font-weight: 400; color: var(--muted); width: 38%; padding-right: 16px; font-size: .95rem; }
.summary tr:last-child th, .summary tr:last-child td { border-bottom: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-th); font-size: .85rem; padding: 5px 14px; border-radius: 999px; }
.status-pill.wait { background: var(--beacon-30); color: #8a4a0c; }
.status-pill.ok { background: var(--ok-bg); color: var(--ok); }
.pay { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
.pay .qr { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; aspect-ratio: 1; align-self: start; }
.pay .qr svg { width: 100%; height: 100%; display: block; }
.pay .amount { font-family: "Inter", sans-serif; font-weight: 700; font-size: 2rem; color: var(--indigo); }
@media (max-width: 640px) { .pay { grid-template-columns: 1fr; } .pay .qr { max-width: 260px; width: 100%; margin: 0 auto; } }
.slips { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.slips li { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: .92rem; }
.slips li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-danger-link { background: none; border: 0; color: var(--err); font: inherit; font-size: .9rem; cursor: pointer; padding: 0; text-decoration: underline; }
details.cancel-box summary { cursor: pointer; color: var(--muted); font-size: .92rem; }
details.cancel-box[open] summary { margin-bottom: 14px; }

/* booth preview */
.booth-hall { display: grid; gap: 16px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.booth-slot { aspect-ratio: 16/10; border-radius: var(--radius); border: 1.5px dashed var(--indigo-30); display: grid; place-items: center; text-align: center; padding: 10px; font-family: var(--font-th); font-size: .85rem; color: var(--muted); background: var(--white); }
.booth-slot.taken { border-style: solid; border-color: var(--lotus); background: var(--lotus-10); color: var(--indigo); font-weight: 500; }
@media (max-width: 760px) { .booth-hall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* video */
.vdo-list { display: grid; gap: 10px; }
.vdo-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--white); }
.vdo-item:hover, .vdo-item.on { border-color: var(--indigo); background: var(--indigo-10); color: var(--ink); }
.vdo-item .play { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--indigo); color: var(--white); }
.player { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* footer */
.site-footer { background: var(--indigo-deep); color: rgba(255,255,255,.8); padding: 48px 0 28px; font-size: .92rem; }
.site-footer h4 { color: var(--white); font-size: 1rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: var(--beacon); }
.site-footer .grid { grid-template-columns: 2fr 1fr 1fr; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer .copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 20px; font-size: .82rem; color: rgba(255,255,255,.6); }
@media (max-width: 760px) { .site-footer .grid { grid-template-columns: 1fr; } }

.page-head { background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-deep) 100%); color: var(--white); padding: 44px 0 40px; position: relative; overflow: hidden; }
.page-head h1 { color: var(--white); font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: .25em; }
.page-head p { color: var(--lotus-60); margin: 0; }
.page-head .burst { position: absolute; right: -60px; top: -80px; width: 300px; opacity: .55; pointer-events: none; }
.page-body { padding: 36px 0 72px; background: var(--pale); min-height: 50vh; }

/* dialog แจ้งเตือน (แทน alert/confirm) */
.site-dialog { border: 0; padding: 32px 28px 24px; border-radius: var(--radius-lg); width: min(420px, calc(100vw - 32px)); text-align: center; color: var(--ink); box-shadow: 0 24px 60px rgba(27,26,58,.28); }
.site-dialog::backdrop { background: rgba(27,26,58,.55); backdrop-filter: blur(3px); }
.site-dialog[open] { animation: sd-in .18s ease-out; }
@keyframes sd-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.site-dialog .sd-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--beacon-30); color: #b35a00; }
.site-dialog.is-danger .sd-icon { background: #fdeceb; color: var(--err); }
.site-dialog h3 { font-size: 1.25rem; margin-bottom: .4em; }
.site-dialog .sd-message { color: var(--muted); margin-bottom: 22px; }
.site-dialog .sd-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.site-dialog .sd-actions .btn { min-width: 110px; }
.site-dialog .sd-actions [hidden] { display: none; }
.btn-danger { background: var(--err); color: var(--white); }
.btn-danger:hover { background: #a93226; color: var(--white); }
