/* Checkrace Run Standby — ธีม clone จาก run.checkrace.com (Minimals/MUI look, Checkrace red) */
:root {
  --primary: #E93735; --primary-dark: #C42A28; --primary-light: #FDECEC; --primary-lighter: #FFF5F5;
  --grey-100: #F9FAFB; --grey-200: #F4F6F8; --grey-300: #DFE3E8; --grey-400: #C4CDD5; --grey-500: #919EAB; --grey-600: #637381; --grey-700: #454F5B; --grey-800: #212B36; --grey-900: #161C24;
  --success: #22C55E; --success-light: #D3FCD2; --success-dark: #118D57; --warning: #FFAB00; --warning-light: #FFF5CC; --warning-dark: #B76E00; --error: #FF5630; --error-light: #FFE9D5; --error-dark: #B71D18; --info: #00B8D9; --info-light: #CAFDF5; --info-dark: #006C9C;
  --text: #212B36; --text-2: #637381; --text-3: #919EAB; --line: rgba(145,158,171,.2); --bg: #FFFFFF; --bg-neutral: #F4F6F8;
  --radius: 16px; --radius-sm: 8px; --shadow: 0 0 2px 0 rgba(145,158,171,.2), 0 12px 24px -4px rgba(145,158,171,.12); --shadow-card: 0 0 2px 0 rgba(145,158,171,.2), 0 12px 24px -4px rgba(145,158,171,.12);
  --font: 'LINE Seed Sans TH', 'Noto Sans Thai', 'Sarabun', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; }
h1 { font-size: 2.6rem; letter-spacing: -.01em; } h2 { font-size: 1.6rem; } h3 { font-size: 1.2rem; } h4 { font-size: 1rem; }
p { margin: 0 0 .8em; }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.muted { color: var(--text-2); } .small { font-size: .875rem; } .tiny { font-size: .78rem; } .bold { font-weight: 700; } .red { color: var(--primary); } .center { text-align: center; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.svg { width: 1.15em; height: 1.15em; vertical-align: -.22em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ---------- header (clone: แถบขาว โลโก้กลาง + แถบหมวดสีเทา) ---------- */
.hdr { background: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 var(--line); }
.hdr .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 76px; }
.hdr .menu-btn { width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; color: var(--grey-600); justify-self: start; }
.hdr .menu-btn:hover { background: var(--grey-200); }
.hdr .logo { justify-self: center; display: inline-flex; align-items: center; height: 48px; }
.hdr .logo img { height: 34px; width: auto; }
.hdr .right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.hdr .login-link { font-weight: 600; font-size: .95rem; color: var(--text); padding: 8px 12px; border-radius: 8px; }
.hdr .login-link:hover { background: var(--grey-200); text-decoration: none; }
.hdr .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; }
.cats { background: var(--bg-neutral); }
.cats .wrap { display: flex; gap: 6px; height: 48px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.cats .wrap::-webkit-scrollbar { display: none; }
.cats a { color: var(--grey-700); font-weight: 600; font-size: .9rem; padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
.cats a:hover, .cats a.on { color: var(--primary); background: #fff; text-decoration: none; }
.drawer { position: fixed; inset: 0; z-index: 40; display: none; }
.drawer.open { display: block; }
.drawer .bg { position: absolute; inset: 0; background: rgba(22,28,36,.5); }
.drawer .panel { position: absolute; left: 0; top: 0; bottom: 0; width: 280px; background: #fff; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.drawer .panel a { padding: 10px 12px; border-radius: 8px; color: var(--text); font-weight: 600; }
.drawer .panel a:hover { background: var(--grey-200); text-decoration: none; }

/* ---------- footer ---------- */
.ftr { border-top: 1px solid var(--line); margin-top: 64px; padding: 40px 0 28px; color: var(--text-2); font-size: .9rem; }
.ftr .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.ftr h4 { color: var(--text); margin-bottom: 10px; }
.ftr a { color: var(--text-2); display: block; padding: 3px 0; }
.ftr .copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; font-size: .8rem; }

/* ---------- hero + event cards (clone หน้าแรก) ---------- */
.hero { padding: 40px 0 18px; }
.hero h1 { font-size: 2.8rem; margin-bottom: 8px; }
.hero p { color: var(--text-2); font-size: 1.05rem; max-width: 640px; }
.ev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 12px 0 40px; }
.ev-card { display: grid; grid-template-columns: 1fr; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.ev-card:hover { transform: translateY(-2px); box-shadow: 0 0 2px rgba(145,158,171,.25), 0 20px 40px -8px rgba(145,158,171,.25); }
.ev-card .poster { aspect-ratio: 4/3; background: var(--grey-200) center/cover no-repeat; position: relative; }
.ev-card .poster img { width: 100%; height: 100%; object-fit: cover; }
.ev-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.ev-card h3 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-card .meta { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); font-size: .86rem; line-height: 1.35; }
.ev-card .meta span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-card .actions .btn { padding: 8px 10px; font-size: .85rem; flex: 1; }
.ev-card .chip { white-space: nowrap; }
.ev-card .meta .svg { color: var(--grey-500); margin-top: .2em; }
.ev-card .meta.org .svg { color: var(--primary); }
.ev-card .actions { display: flex; gap: 10px; margin-top: auto; padding-top: 12px; }
.ev-card.wide { grid-template-columns: 5fr 4fr; }
.ev-card.wide .poster { aspect-ratio: auto; min-height: 260px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 6px; font-size: .78rem; font-weight: 700; line-height: 1.7; }
.chip.success { background: var(--success-light); color: var(--success-dark); } .chip.warning { background: var(--warning-light); color: var(--warning-dark); } .chip.error { background: var(--error-light); color: var(--error-dark); } .chip.info { background: var(--info-light); color: var(--info-dark); } .chip.grey { background: var(--grey-200); color: var(--grey-700); } .chip.primary { background: var(--primary-light); color: var(--primary-dark); }
.avatars { display: flex; align-items: center; }
.avatars span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px; display: inline-grid; place-items: center; font-size: .65rem; font-weight: 700; color: #fff; }
.avatars span:first-child { margin-left: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 20px; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; transition: background .15s, box-shadow .15s; line-height: 1.5; text-decoration: none !important; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 16px 0 rgba(233,55,53,.24); } .btn-primary:hover { background: var(--primary-dark); }
.btn-dark { background: var(--grey-800); color: #fff; } .btn-dark:hover { background: var(--grey-900); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--grey-400); } .btn-outline:hover { background: var(--grey-100); border-color: var(--text); }
.btn-soft { background: var(--primary-light); color: var(--primary-dark); } .btn-soft:hover { background: #fbdada; }
.btn-ghost { background: transparent; color: var(--text-2); } .btn-ghost:hover { background: var(--grey-200); }
.btn-lg { padding: 13px 24px; font-size: 1.05rem; } .btn-sm { padding: 6px 12px; font-size: .85rem; } .btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::before { content: ''; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- cards / layout ---------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 24px; }
.card + .card { margin-top: 24px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-h h3 { margin: 0; }
.two-col { display: grid; grid-template-columns: 7fr 5fr; gap: 24px; align-items: start; }
.sticky { position: sticky; top: 84px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--text-2); padding: 20px 0 10px; }
.breadcrumb a { color: var(--text); font-weight: 600; } .breadcrumb .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--grey-400); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .95rem; } .kv dt { color: var(--text-2); } .kv dd { margin: 0; font-weight: 600; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.notice { border-radius: 10px; padding: 12px 14px; font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; }
.notice.info { background: var(--info-light); color: var(--info-dark); } .notice.warn { background: var(--warning-light); color: var(--warning-dark); } .notice.error { background: var(--error-light); color: var(--error-dark); } .notice.success { background: var(--success-light); color: var(--success-dark); }
.notice .svg { margin-top: .15em; }
.empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty .svg { width: 64px; height: 64px; color: var(--grey-400); stroke-width: 1.2; }

/* ---------- forms (MUI outlined look) ---------- */
label.lbl, .lbl { display: block; font-size: .85rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.lbl .req { color: var(--primary); }
.inp, select.inp, textarea.inp { width: 100%; font: inherit; font-size: .95rem; padding: 11px 14px; border: 1px solid var(--grey-400); border-radius: var(--radius-sm); background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.inp:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.inp.err { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
textarea.inp { min-height: 90px; resize: vertical; }
select.inp { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23637381' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.f-err { color: var(--error-dark); font-size: .78rem; margin-top: 4px; min-height: 1em; }
.f-help { color: var(--text-3); font-size: .78rem; margin-top: 4px; }
.fgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px 16px; }
.f-full { grid-column: span 6; } .f-half { grid-column: span 3; } .f-third { grid-column: span 2; } .f-quarter { grid-column: span 3; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-row label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--grey-400); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: .9rem; background: #fff; }
.radio-row label:has(input:checked) { border-color: var(--primary); background: var(--primary-lighter); color: var(--primary-dark); box-shadow: 0 0 0 1px var(--primary); }
.radio-row label.off { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.radio-row input { accent-color: var(--primary); margin: 0; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.chk input { accent-color: var(--primary); width: 18px; height: 18px; margin-top: 3px; flex: none; }

/* ---------- stepper (clone MUI alternativeLabel) ---------- */
.stepper { display: flex; margin: 8px 0 32px; }
.step { flex: 1; text-align: center; position: relative; font-size: .85rem; font-weight: 600; color: var(--text-3); }
.step::before { content: ''; position: absolute; top: 10px; left: calc(-50% + 20px); right: calc(50% + 20px); border-top: 2px solid var(--line); }
.step:first-child::before { display: none; }
.step.done::before, .step.active::before { border-color: var(--primary); }
.step .dot { width: 24px; height: 24px; margin: 0 auto 8px; display: grid; place-items: center; position: relative; z-index: 1; background: #fff; }
.step .dot i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: block; }
.step.active { color: var(--text); } .step.active .dot { color: var(--primary); }
.step.done { color: var(--text); } .step.done .dot { color: var(--primary); }
.step.done .dot i { width: 18px; height: 18px; background: none; border: 0; }
.step.done .dot i::after { content: '✓'; color: var(--primary); font-weight: 900; font-size: 18px; line-height: 1; }

/* ---------- option tiles (ระยะ / ช่องทางชำระเงิน) ---------- */
.opt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.opt { border: 1px dashed var(--grey-300); border-radius: var(--radius-sm); padding: 18px; cursor: pointer; background: #fff; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; transition: box-shadow .15s; position: relative; }
.opt:hover { border-color: var(--grey-500); }
.opt.on { box-shadow: 0 0 0 2px var(--primary); border-color: transparent; }
.opt.on .svg { color: var(--primary); }
.opt .svg { width: 40px; height: 40px; stroke-width: 1.4; color: var(--grey-600); }
.opt .t { font-weight: 700; } .opt .d { font-size: .8rem; color: var(--text-2); }
.opt.disabled { opacity: .45; pointer-events: none; }
.tk-list { display: flex; flex-direction: column; gap: 12px; }
.tk { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; border: 1px solid var(--grey-300); border-radius: var(--radius-sm); padding: 14px 16px; }
.tk.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--primary-lighter); }
.tk.soldout { opacity: .55; }
.tk .n { font-weight: 700; font-size: 1.02rem; } .tk .s { color: var(--text-2); font-size: .85rem; }
.tk .p { font-weight: 800; font-size: 1.15rem; color: var(--primary); white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--grey-400); border-radius: 8px; overflow: hidden; }
.qty button { width: 34px; height: 34px; border: 0; background: #fff; font-size: 1.1rem; cursor: pointer; color: var(--text); } .qty button:hover { background: var(--grey-200); }
.qty span { min-width: 36px; text-align: center; font-weight: 700; }

/* ---------- runner accordion ---------- */
.runner { border: 1px solid var(--grey-300); border-radius: var(--radius-sm); margin-bottom: 14px; overflow: hidden; }
.runner .rh { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--grey-100); cursor: pointer; }
.runner .rh .num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.runner .rh .t { font-weight: 700; flex: 1; } .runner .rh .sub { color: var(--text-2); font-size: .85rem; }
.runner .rb { padding: 18px 16px; }
.runner.has-err .rh { background: var(--error-light); }

/* ---------- summary / totals ---------- */
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .95rem; } .sum-row .v { font-weight: 600; }
.sum-row.total { border-top: 1px dashed var(--grey-300); margin-top: 8px; padding-top: 14px; font-size: 1.1rem; } .sum-row.total .v { color: var(--primary); font-size: 1.35rem; font-weight: 800; }

/* ---------- QR pay ---------- */
.qr-box { border: 1px dashed var(--grey-300); border-radius: var(--radius-sm); padding: 20px; text-align: center; }
.qr-box .qr { display: inline-block; padding: 12px; background: #fff; border-radius: 12px; border: 1px solid var(--grey-300); }
.qr-box .qr canvas, .qr-box .qr img, .qr-box .qr svg { display: block; width: 260px; height: 260px; }
.thaiqr-head { background: #113566; color: #fff; font-weight: 800; letter-spacing: .04em; padding: 8px 20px; border-radius: 8px 8px 0 0; display: inline-block; }
.countdown { font-size: 1.5rem; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.status-big { font-size: 1.3rem; font-weight: 800; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; background: var(--grey-200); color: var(--text-2); font-weight: 600; padding: 12px 14px; white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.tbl tr:hover td { background: var(--grey-100); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal .bg { position: absolute; inset: 0; background: rgba(22,28,36,.6); }
.modal .box { position: relative; background: #fff; border-radius: var(--radius); width: 100%; max-width: 420px; padding: 28px; box-shadow: var(--shadow); max-height: 92vh; overflow: auto; }
.modal .box.wide { max-width: 640px; }
.modal .x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; font-size: 1.3rem; color: var(--text-2); } .modal .x:hover { background: var(--grey-200); }
.modal .logo { display: block; height: 22px; margin: 0 auto 22px; }
.tabs { display: flex; border: 1px solid var(--grey-300); border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.tabs button { flex: 1; border: 0; background: #fff; padding: 10px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text-2); } .tabs button.on { background: var(--grey-200); color: var(--text); }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast .t { background: var(--grey-800); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow); animation: up .2s; max-width: 90vw; }
#toast .t.ok { background: var(--success-dark); } #toast .t.err { background: var(--error-dark); }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.queue-screen { text-align: center; padding: 40px 20px; }
.queue-screen .spinner { width: 48px; height: 48px; border: 4px solid var(--grey-300); border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 16px; animation: spin .8s linear infinite; }
.skeleton { background: linear-gradient(90deg, var(--grey-200) 25%, var(--grey-100) 37%, var(--grey-200) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 45; background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 14px 18px; display: none; align-items: center; gap: 16px; font-size: .85rem; }
.cookie.show { display: flex; } .cookie p { margin: 0; flex: 1; } .cookie b { display: block; font-size: .95rem; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .ev-grid { grid-template-columns: repeat(2, 1fr); } .two-col { grid-template-columns: 1fr; } .sticky { position: static; }
  .ftr .wrap { grid-template-columns: 1fr; } .hero h1 { font-size: 2rem; } h1 { font-size: 1.8rem; }
  .ev-card.wide { grid-template-columns: 1fr; } .ev-card.wide .poster { aspect-ratio: 4/3; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; } .card { padding: 18px; border-radius: 12px; }
  .fgrid { grid-template-columns: 1fr 1fr; } .f-full, .f-half, .f-third, .f-quarter { grid-column: span 2; } .f-third.f-name { grid-column: span 1; }
  .opt-grid { grid-template-columns: 1fr; } .stepper .step { font-size: .72rem; }
  .hdr .login-link span { display: none; } .hdr .logo img { height: 26px; }
  .qr-box .qr canvas, .qr-box .qr img, .qr-box .qr svg { width: 220px; height: 220px; }
}
@media print { .hdr, .cats, .ftr, .btn, .cookie { display: none !important; } }
/* language toggle (TH/EN) */
.hdr #langBtn { border: 1px solid var(--grey-300); padding: 4px 10px; font-size: .8rem; letter-spacing: .04em; margin-right: 4px; }
.hdr #langBtn span { display: inline !important; }
@media (max-width: 600px) { .ev-grid { grid-template-columns: 1fr; } }

/* ================= ธีมของระบบสำรอง — ไล่เฉดแดงแนวโมเดิร์น (ต่างจาก run.checkrace เดิมเล็กน้อย) ================= */
:root {
  --g1: #FF6B4A;                     /* ส้มแดง */
  --g2: #E93735;                     /* แดง Checkrace (คงไว้เป็นแกน) */
  --g3: #C0246B;                     /* แดงอมชมพู */
  --grad: linear-gradient(120deg, var(--g1) 0%, var(--g2) 48%, var(--g3) 100%);
  --grad-soft: linear-gradient(120deg, rgba(255,107,74,.10) 0%, rgba(233,55,53,.10) 48%, rgba(192,36,107,.10) 100%);
  --glow: 0 10px 24px -6px rgba(233,55,53,.35);
}
/* แถบไล่สีบางๆ บนสุดของทุกหน้า */
body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); z-index: 60; }
.hdr { background: rgba(255,255,255,.86); backdrop-filter: saturate(160%) blur(12px); box-shadow: 0 1px 0 var(--line); }
.hdr .avatar { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.cats a:hover, .cats a.on { background: #fff; box-shadow: 0 1px 0 rgba(233,55,53,.25) inset, 0 -2px 0 var(--g2) inset; }

/* hero: แสงไล่สีนุ่ม ๆ ด้านหลัง + หัวข้อไล่เฉด */
.hero { position: relative; }
.hero::before { content: ''; position: absolute; inset: -30px -10% auto -10%; height: 260px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 80% at 18% 30%, rgba(255,107,74,.20), transparent 70%), radial-gradient(55% 75% at 80% 20%, rgba(192,36,107,.16), transparent 70%); filter: blur(6px); }
.hero h1 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }

/* ปุ่มหลัก: ไล่เฉด + เงาสี */
.btn-primary { background: var(--grad); background-size: 160% 100%; box-shadow: var(--glow); transition: background-position .25s, transform .12s, box-shadow .2s; }
.btn-primary:hover { background-position: 100% 0; background-color: transparent; box-shadow: 0 14px 28px -8px rgba(192,36,107,.45); transform: translateY(-1px); }
.btn-soft { background: var(--grad-soft); color: var(--g3); }
.chip.primary { background: var(--grad); color: #fff; }

/* การ์ดงาน: ขอบเรืองแสงตอน hover + ป้ายมุมภาพ */
.ev-card { border: 1px solid transparent; }
.ev-card:hover { box-shadow: 0 0 0 1px rgba(233,55,53,.14), 0 22px 40px -12px rgba(192,36,107,.28); }
.ev-card .poster::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--grad); opacity: 0; transition: opacity .2s; }
.ev-card:hover .poster::after { opacity: 1; }

/* หัวข้อกลุ่ม + แท็บ: ขีดไล่สี */
.grp-h h2 { position: relative; padding-left: 14px; }
.grp-h h2::before { content: ''; position: absolute; left: 0; top: .18em; bottom: .18em; width: 5px; border-radius: 3px; background: var(--grad); }
.sec-tabs a:hover, .sec-tabs a.on { border-image: var(--grad) 1; }
.tabs2 button.on { background: var(--grad); box-shadow: var(--glow); }

/* stepper ของหน้าสมัคร */
.stepper .step.active .dot, .stepper .step.done .dot { background: var(--grad); border-color: transparent; box-shadow: var(--glow); }

/* หน้าใบรับรอง/แผงข้าง: ปุ่มสมัครเด่นขึ้น */
.side .btn-primary, .sticky-cta .btn-primary { letter-spacing: .01em; }

/* ---------- งานไฮไลต์: สไลด์ใหญ่บนหน้าแรก ---------- */
.hl { position: relative; margin: 6px 0 26px; }
.hl-vp { overflow: hidden; border-radius: 20px; }
.hl-track { display: flex; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
.hl-slide { flex: 0 0 100%; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-card); }
.hl-ph { position: relative; background: var(--grey-200); min-height: 340px; }
.hl-ph img { width: 100%; height: 100%; object-fit: cover; }
.hl-ph .noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--grey-400); }
.hl-tag { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; font-size: .76rem; font-weight: 700; color: #fff; letter-spacing: .01em; background: var(--grad, var(--primary)); box-shadow: var(--glow, 0 6px 16px -6px rgba(0, 0, 0, .4)); }
.hl-tag .svg { width: 1em; height: 1em; }
.hl-info { padding: 30px 32px; display: flex; flex-direction: column; min-width: 0; }
.hl-info h2 { font-size: 1.85rem; line-height: 1.2; margin: 0 0 12px; }
.hl-info h2 a { color: inherit; } .hl-info h2 a:hover { text-decoration: none; color: var(--primary); }
.hl-info .meta { display: flex; align-items: flex-start; gap: 9px; color: var(--text-2); font-size: .92rem; margin-bottom: 7px; }
.hl-info .meta .svg { color: var(--grey-500); margin-top: .18em; }
.hl-info .meta.org { color: var(--primary); font-weight: 600; } .hl-info .meta.org .svg { color: var(--primary); }
.hl-dist { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 4px 0 10px; }
.hl-dist .svg { color: var(--grey-500); }
.hl-dist span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 26px; padding: 0 9px; border-radius: 8px; font-size: .8rem; font-weight: 700; }
.hl-dist .d0 { background: var(--primary-light); color: var(--primary-dark); }
.hl-dist .d1 { background: var(--warning-light); color: var(--warning-dark); }
.hl-dist .d2 { background: var(--success-light); color: var(--success-dark); }
.hl-dist .dn { background: var(--grey-200); color: var(--text-2); }
.hl-note { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: .82rem; margin-top: 2px; }
.hl-actions { margin-top: auto; padding-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }
.hl-actions .btn { min-width: 170px; justify-content: center; }
.hl-actions .btn-dark { background: var(--grey-900); color: #fff; border: none; } .hl-actions .btn-dark:hover { background: var(--grey-800); }
.hl-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow); z-index: 2; }
.hl-nav:hover { background: #fff; color: var(--primary); }
.hl-nav.prev { left: -14px; } .hl-nav.next { right: -14px; }
.hl-dots { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.hl-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--grey-400); cursor: pointer; transition: all .25s; }
.hl-dots i.on { width: 22px; border-radius: 999px; background: var(--grad, var(--primary)); }
@media (max-width: 900px) {
  .hl-slide { grid-template-columns: 1fr; }
  .hl-ph { min-height: 0; aspect-ratio: 16 / 10; }
  .hl-info { padding: 20px; } .hl-info h2 { font-size: 1.35rem; }
  .hl-nav.prev { left: 6px; } .hl-nav.next { right: 6px; }
  .hl-actions .btn { flex: 1; min-width: 0; }
}

/* ---------- ค้นหางานวิ่งประเทศไทย: แถบจังหวัดเลื่อนอัตโนมัติ ---------- */
.prov-strip { margin: 34px 0 0; }
.prov-strip h2 { font-size: 1.3rem; margin-bottom: 14px; }
.prov-vp { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.prov-row { display: flex; gap: 14px; width: max-content; animation: prov-marquee 46s linear infinite; }
.prov-vp:hover .prov-row { animation-play-state: paused; }
@keyframes prov-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.prov-card { position: relative; flex: 0 0 172px; height: 132px; border-radius: 14px; overflow: hidden; background: var(--grey-300); color: #fff; display: block; }
.prov-card:hover { text-decoration: none; } .prov-card:hover img { transform: scale(1.06); }
.prov-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.prov-card .fill { width: 100%; height: 100%; background: var(--grad, linear-gradient(120deg, #FF6B4A, #C0246B)); }
.prov-card .cap { position: absolute; inset: auto 0 0 0; padding: 28px 12px 11px; background: linear-gradient(180deg, transparent, rgba(22, 28, 36, .82)); }
.prov-card .cap b { display: block; font-size: .95rem; line-height: 1.25; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.prov-card .cap span { font-size: .76rem; opacity: .9; }
@media (max-width: 600px) { .prov-card { flex-basis: 140px; height: 110px; } }

/* white-label: โลโก้แบรนด์เล็ก ๆ ต่อท้ายโลโก้งาน (ธีมต่องาน) */
.hdr .logo .brand-sub { height: 18px; margin-left: 10px; opacity: .75; }
@media (max-width: 600px) { .hdr .logo .brand-sub { display: none; } }
