/* AI-bOXoffice design system — palette from the VENUOS concept (navy / violet / aqua). */
:root {
  --navy: #11182a;
  --navy-2: #1b2440;
  --ink: #1b2440;
  --ink-2: #56627a;
  --ink-3: #8b95a8;
  --line: #e6eaf2;
  --line-2: #d6dce8;
  --canvas: #f6f8fc;
  --surface: #ffffff;
  --violet: #6656ed;
  --violet-600: #5545d6;
  --violet-50: #efedff;
  --aqua: #26b6bd;
  --aqua-50: #e6f7f8;
  --green: #168b64;
  --green-50: #e8f7f0;
  --red: #d14a54;
  --red-50: #fdeeef;
  --amber: #c9761f;
  --amber-50: #fff4e5;
  --brand: var(--violet);
  --ox-red: #e3262d;      /* AI-OX brand red: the "AI-" and "OX" in the wordmark */
  --ox-red-bright: #ff5a5f;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 24, 42, .05), 0 8px 28px rgba(17, 24, 42, .06);
  --shadow-lg: 0 18px 48px rgba(17, 24, 42, .14);
  --font: "IBM Plex Sans Thai", "Leelawadee UI", "Segoe UI", Tahoma, sans-serif;
  --mono: ui-monospace, Consolas, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--canvas); color: var(--ink); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.2px; }
p { margin: 0 0 12px; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--violet) 45%, transparent); outline-offset: 2px; }

/* ---------- Layout & utilities ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 760px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.spacer { flex: 1; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); letter-spacing: .3px; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } .hide-sm { display: none !important; } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card.flat { box-shadow: none; }
.card h2 { font-size: 18px; }
.card h3 { font-size: 15px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { flex: 1; }
.section-title { font-size: 20px; font-weight: 700; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--violet); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: #f4f6fb; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: 0 6px 18px rgba(102, 86, 237, .25); }
.btn.primary:hover { background: var(--violet-600); }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--red); border-color: #f2c4c8; background: #fff; }
.btn.danger:hover { background: var(--red-50); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(17, 24, 42, .05); }
.btn.quiet { background: var(--violet-50); border-color: transparent; color: var(--violet-600); }
.btn.light { background: #fff; border-color: #fff; color: var(--navy); }
.btn.outline-light { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn.outline-light:hover { background: rgba(255,255,255,.12); }
.btn.sm { min-height: 32px; padding: 4px 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { min-height: 52px; padding: 12px 26px; font-size: 16px; }
.btn.block { width: 100%; }
.icon-btn { width: 36px; height: 36px; padding: 0; }

/* ---------- Forms ---------- */
.field { min-width: 0; }
.field > label, .label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--red); margin-left: 2px; }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.5; }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: #fff; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 90px; resize: vertical; line-height: 1.6; }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-50); }
.input.lg { min-height: 50px; font-size: 17px; }
.input[readonly] { background: var(--canvas); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--violet); flex: none; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: flex; gap: 8px; align-items: center; margin: 0; cursor: pointer; font-weight: 400; font-size: 14.5px; border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 12px; background: #fff; }
.choices label:has(input:checked) { border-color: var(--violet); background: var(--violet-50); }
.choices input { accent-color: var(--violet); width: 17px; height: 17px; margin: 0; }
.form-section { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Status & alerts ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #eef1f6; color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--green-50); color: var(--green); }
.pill.warn { background: var(--amber-50); color: var(--amber); }
.pill.err { background: var(--red-50); color: var(--red); }
.pill.info { background: var(--violet-50); color: var(--violet-600); }
.pill.aqua { background: var(--aqua-50); color: #13858a; }
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14.5px; border: 1px solid; }
.alert.ok { background: var(--green-50); border-color: #b8e4cf; color: #0f5f45; }
.alert.warn { background: var(--amber-50); border-color: #f3d3a6; color: #7a4810; }
.alert.err { background: var(--red-50); border-color: #f2c4c8; color: #8b2a33; }
.alert.info { background: var(--violet-50); border-color: #d9d4ff; color: #3d2fa8; }
.empty { text-align: center; color: var(--ink-3); padding: 40px 16px; }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: #f8f9fd; font-size: 12px; font-weight: 700; color: var(--ink-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
table.data tbody tr:hover td { background: #fafbff; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.mono, table.data td > .mono, table.data td > b.mono { white-space: nowrap; }
table.data td.c, table.data th.c { text-align: center; }
table.data tr:last-child td { border-bottom: 0; }
.link-btn { font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--violet); text-decoration: underline; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin: 0; }
.kpi .value { font-size: 28px; font-weight: 700; letter-spacing: -.8px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--ink-3); }
.kpi::after { content: ""; position: absolute; right: -24px; top: -36px; width: 90px; height: 90px; border-radius: 50%; background: var(--violet-50); }
.kpi > * { position: relative; z-index: 1; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { font: inherit; font-weight: 600; font-size: 14px; background: none; border: 0; padding: 10px 14px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs .active { color: var(--violet); border-bottom-color: var(--violet); }

/* ---------- Bars (simple charts) ---------- */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 8px; }
.bars .bar { flex: 1; min-width: 6px; background: linear-gradient(180deg, var(--violet), #8f84f3); border-radius: 4px 4px 0 0; position: relative; }
.bars .bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; margin-bottom: 4px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; padding: 5px 0; }
.hbar .track { height: 10px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; background: linear-gradient(90deg, var(--aqua), var(--violet)); border-radius: 99px; }
.progress { height: 8px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--aqua), var(--violet)); }

/* ---------- Modal & toast ---------- */
dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.modal.wide { width: min(920px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(16, 21, 41, .5); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { flex: 1; font-size: 18px; }
.modal-body { padding: 20px 22px; overflow: auto; max-height: calc(100vh - 190px); }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
#toasts .t { background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-lg); max-width: 380px; animation: toast-in .18s ease-out; }
#toasts .t.err { background: #a8323b; }
#toasts .t.ok { background: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f6f8fc 50%, #eef1f6 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Public site ---------- */
.topnav { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topnav .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.5px; color: var(--navy); text-decoration: none !important; }
.brand-mark { width: 40px; height: 40px; flex: none; display: block; margin: -4px -2px -4px -4px; filter: drop-shadow(0 4px 8px rgba(216, 31, 42, .22)); transition: transform .25s ease; }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.wordmark { white-space: nowrap; letter-spacing: -.3px; }
.wordmark .r { color: var(--ox-red); }
/* Dark headers (organizer/admin side nav, on-site bar, pay page) need the brighter red. */
.side-nav .wordmark .r, .st-top .wordmark .r, .pay .wordmark .r, .on-dark .wordmark .r { color: var(--ox-red-bright); }
.brand small { display: block; font-size: 9.5px; letter-spacing: 1.6px; color: var(--ink-3); font-weight: 700; margin-top: -3px; }
.nav-search { flex: 1; max-width: 420px; position: relative; }
.nav-search input { width: 100%; min-height: 40px; border-radius: 999px; border: 1px solid var(--line-2); padding: 8px 16px 8px 38px; background: var(--canvas); }
.nav-search::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-52%); color: var(--ink-3); font-size: 18px; }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-links a { color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.nav-links a:hover { background: var(--canvas); color: var(--ink); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--violet-50); color: var(--violet-600); display: grid; place-items: center; font-weight: 700; }
@media (max-width: 760px) { .nav-search { display: none; } .nav-links .hide-sm { display: none; } }

.hero { position: relative; border-radius: 22px; overflow: hidden; min-height: 320px; display: flex; align-items: flex-end; color: #fff;
  background: linear-gradient(110deg, #19163b 10%, #30216a 52%, #7567c8 100%); margin: 20px 0 8px; }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 10, 30, .82) 0%, rgba(10, 10, 30, .35) 55%, rgba(10, 10, 30, .1) 100%); }
.hero .copy { position: relative; padding: 32px; max-width: 640px; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -1px; margin: 8px 0; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; opacity: .92; font-size: 14.5px; }
.hero .cta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none !important; }
.chip.active, .chip:hover { background: var(--violet-50); border-color: #cfc8ff; color: var(--violet-600); }
.chip .n { color: var(--ink-3); font-weight: 500; margin-left: 4px; }

.posters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1000px) { .posters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .posters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.event-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); color: inherit; text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.poster { aspect-ratio: 800 / 1132; background-size: cover; background-position: center; position: relative; }
/* Designed stand-in poster: event colour, soft light, fine grid, date block, category icon. */
.poster.fallback, .fc-art.fallback, .event-banner {
  --c: #6656ed;
  color: #fff; overflow: hidden;
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(255,255,255,.28), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 1px, transparent 1px 14px),
    linear-gradient(165deg, var(--c) 0%, color-mix(in srgb, var(--c) 55%, #120e2e) 60%, #120e2e 100%);
}
.poster.fallback { display: flex; flex-direction: column; justify-content: space-between; padding: 14px; }
.poster.fallback::after { content: ""; position: absolute; right: -50px; bottom: 28%; width: 200px; height: 200px; border: 24px solid rgba(255,255,255,.12); border-radius: 50%; }
.pf-date { position: relative; z-index: 1; width: 52px; text-align: center; background: rgba(255,255,255,.95); color: var(--navy); border-radius: 10px; padding: 5px 0 4px; line-height: 1.05; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.pf-date b { display: block; font-size: 22px; letter-spacing: -.5px; }
.pf-date span { font-size: 11px; font-weight: 700; color: var(--violet-600); }
.pf-icon { position: absolute; right: 16px; top: 14px; font-size: 30px; opacity: .9; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.pf-foot { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.pf-foot span { font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; opacity: .85; font-weight: 600; }
.pf-foot b { font-size: clamp(16px, 1.6vw, 21px); line-height: 1.2; letter-spacing: -.3px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Featured: wide cards */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .features { grid-template-columns: minmax(0, 1fr); } }
/* A lone featured event spans the row, artwork beside the details. */
@media (min-width: 761px) {
  .features:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
  .features > .feature-card:only-child { flex-direction: row; }
  .features > .feature-card:only-child .fc-art { width: 58%; flex: none; }
  .features > .feature-card:only-child .fc-body { padding: 24px 26px; gap: 6px; }
  .features > .feature-card:only-child .fc-body .title { font-size: 22px; }
}
.feature-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); color: inherit; text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.fc-art { aspect-ratio: 1702 / 800; background-size: cover; background-position: center; position: relative; }
.fc-art.fallback { display: flex; align-items: flex-end; padding: 18px 20px; }
.fc-art.fallback b { position: relative; font-size: 24px; letter-spacing: -.5px; line-height: 1.15; max-width: 80%; }
.fc-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.fc-body .date { font-size: 12.5px; font-weight: 700; color: #c25b5f; }
.fc-body .title { font-weight: 700; font-size: 17px; line-height: 1.35; }
.fc-body .sub { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-body .place { font-size: 12.5px; color: var(--ink-3); }
.fc-body .price { font-weight: 700; color: var(--violet-600); }

/* Home hero with artwork */
.home-hero { position: relative; overflow: hidden; border-radius: 24px; margin: 20px 0 8px; color: #fff; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 24px; padding: 40px 44px; min-height: 360px;
  background: radial-gradient(800px 380px at 90% -10%, rgba(164, 155, 255, .45), transparent 60%), linear-gradient(115deg, #120e2e 0%, #251c5c 55%, #4d3fb8 100%); }
.home-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .22; filter: blur(2px) saturate(1.2); }
.home-hero > * { position: relative; }
.home-hero h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -1.2px; line-height: 1.12; margin: 10px 0 12px; }
.home-hero .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; opacity: .92; font-size: 14.5px; }
.home-hero .cta { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.home-hero .art { justify-self: center; width: min(250px, 100%); transform: rotate(6deg); border-radius: 16px; overflow: hidden; border: 3px solid rgba(255,255,255,.35); box-shadow: 0 24px 60px rgba(5, 3, 25, .5); }
.home-hero .art .poster { border-radius: 0; }
@media (max-width: 760px) { .home-hero { grid-template-columns: minmax(0, 1fr); padding: 28px 22px; } .home-hero .art { display: none; } }

.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.how > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.how .n { width: 30px; height: 30px; border-radius: 9px; background: var(--violet-50); color: var(--violet-600); display: grid; place-items: center; font-weight: 800; margin-bottom: 8px; }
.how b { display: block; }
.how p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
@media (max-width: 760px) { .how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.section-head .eyebrow { margin-bottom: 2px; }

/* Event page banner when there is no cover image */
.event-banner { border-radius: 0 0 22px 22px; height: 170px; position: relative; overflow: hidden; }
@media (min-width: 1000px) { .event-banner { border-radius: 22px; margin-top: 16px; } }
.event-banner .pf-icon { font-size: 54px; right: 32px; top: 50%; transform: translateY(-50%); opacity: .55; }
.event-card .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.event-card .date { font-size: 12px; font-weight: 700; color: #c25b5f; }
.event-card .title { font-weight: 700; font-size: 14.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-card .place { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-card .price { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--violet-600); font-size: 14px; }

.event-cover { aspect-ratio: 1702 / 800; border-radius: 0 0 22px 22px; background-size: cover; background-position: center; background-color: var(--navy); }
@media (min-width: 1000px) { .event-cover { border-radius: 22px; margin-top: 16px; max-height: 520px; width: 100%; } }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; margin: 24px 0 48px; }
.event-layout .side { position: sticky; top: 84px; }
@media (max-width: 960px) { .event-layout { grid-template-columns: minmax(0, 1fr); } .event-layout .side { position: static; } }
.prose { white-space: pre-line; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gallery img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; width: 100%; }
.agenda-day { font-weight: 700; color: var(--violet-600); margin: 16px 0 4px; }
.agenda-item { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agenda-item:last-child { border-bottom: 0; }
.agenda-item .time { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .agenda-item { grid-template-columns: 1fr; gap: 2px; } }

.ticket-opt { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.ticket-opt + .ticket-opt { margin-top: 10px; }
.ticket-opt .name { font-weight: 700; }
.ticket-opt .price { font-weight: 700; color: var(--violet-600); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.qty button { width: 36px; height: 36px; border: 0; background: #fff; font-size: 18px; cursor: pointer; }
.qty button:hover { background: var(--canvas); }
.qty span { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Place availability (organizer limits). */
.avail { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 2px 9px; white-space: nowrap; line-height: 1.6; }
.avail::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.avail.full { background: var(--red-50); color: var(--red); }
.avail.held, .avail.few { background: var(--amber-50); color: var(--amber); }
.avail.closed { background: #eef1f6; color: var(--ink-2); }
.event-card .price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.event-card .price-row .price { margin: 0; padding: 0; }
.avail.ext::before { display: none; }
.event-card.is-full .poster { filter: grayscale(.6) brightness(.95); }
.avail-note { border-radius: 12px; padding: 12px 14px; margin-top: 12px; font-size: 13.5px; }
.avail-note b { display: block; font-size: 15px; }
.avail-note p { margin: 4px 0 0; white-space: pre-line; }
.avail-note.full { background: var(--red-50); color: #8f2a32; border: 1px solid #f4cdd1; }
.avail-note.held { background: var(--amber-50); color: #7a4a12; border: 1px solid #f3dcb8; }
.avail-note.closed { background: #eef1f6; color: var(--ink-2); border: 1px solid var(--line-2); }

/* Membership tiers */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; }
.plan-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.plan-card.featured { border-color: var(--violet); box-shadow: 0 12px 32px rgba(102, 86, 237, .16); }
.plan-card.current { outline: 2px solid var(--green); outline-offset: -2px; }
.plan-card .plan-flag { position: absolute; top: -11px; left: 18px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.plan-name { font-weight: 800; font-size: 16px; color: var(--navy); }
.plan-price { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.plan-price span { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.plan-card ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); flex: 1; }
.plan-card ul li { margin: 3px 0; }
/* TH | EN switch */
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 99px; padding: 2px; background: #fff; flex: none; }
.lang-switch button { border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; color: var(--ink-3); padding: 3px 9px; border-radius: 99px; cursor: pointer; }
.lang-switch button.on { background: var(--navy); color: #fff; }
.side-nav .lang-switch, .st-top .lang-switch { background: rgba(255,255,255,.06); border-color: #2c3858; }
.side-nav .lang-switch button, .st-top .lang-switch button { color: #9aa6c4; width: auto; }
.side-nav .lang-switch button.on, .st-top .lang-switch button.on { background: #fff; color: var(--navy); }
html.i18n-wait body { visibility: hidden; }

/* Short pages keep the footer at the bottom of the window. */
body.with-footer { min-height: 100vh; display: flex; flex-direction: column; }
body.with-footer > main, body.with-footer > #app { flex: 1 0 auto; }
.legal-strip { background: #fff7e6; border-bottom: 1px solid #f3d9a4; font-size: 13.5px; }
.legal-strip .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; flex-wrap: wrap; }
.cookie-notice { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 760px; margin: 0 auto; display: flex; gap: 12px;
  align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, .12); font-size: 13px; }
@media print { .cookie-notice, .legal-strip { display: none; } }
.legal-doc h2 { font-size: 20px; margin: 26px 0 8px; }
.legal-doc h3 { font-size: 16px; margin: 18px 0 6px; }
.legal-doc p, .legal-doc li { line-height: 1.8; }
.legal-doc ul, .legal-doc ol { padding-left: 22px; }
mark.legal-todo { background: #fff1c2; color: #7a4b00; padding: 0 3px; border-radius: 4px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 36px 0 24px; color: var(--ink-2); font-size: 13.5px; background: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 24px; }
.footer-grid > div:not(:first-child) { display: flex; flex-direction: column; gap: 6px; }
.footer-grid b { color: var(--ink); font-size: 13.5px; margin-bottom: 2px; }
.footer-grid a { color: var(--ink-2); }
.footer-base { background: linear-gradient(var(--line), var(--line)) 16px 0 / calc(100% - 32px) 1px no-repeat; margin-top: 24px; padding-top: 14px; font-size: 12px; color: var(--ink-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; }
.footer-base .wordmark { font-weight: 700; color: var(--ink-2); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Console shell (organizer / control center) ---------- */
.shell { display: flex; min-height: 100vh; }
.side-nav { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--navy); color: #cfd6e8; display: flex; flex-direction: column; padding: 20px 12px; z-index: 40; overflow-y: auto; }
.side-nav .brand { color: #fff; padding: 0 10px 18px; }
.side-nav .brand small { color: #7f8bab; }
.side-nav .nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1.8px; color: #6c789a; padding: 16px 12px 6px; text-transform: uppercase; }
.side-nav a, .side-nav button.nav { display: flex; align-items: center; gap: 10px; width: 100%; color: #b4bdd4; background: none; border: 0; border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; text-decoration: none; }
.side-nav a:hover, .side-nav button.nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: rgba(115, 99, 240, .22); color: #fff; box-shadow: inset 3px 0 0 #a49bff; }
.side-nav .ico { width: 20px; text-align: center; opacity: .9; }
.side-nav .ev-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav .side-links { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 8px; }
.side-nav .side-links a, .side-nav .side-links button.nav { width: auto; padding: 4px 0; color: #9aa6c4; font-size: 12.5px; }
.side-nav .side-links a:hover, .side-nav .side-links button.nav:hover { background: none; color: #fff; }
.side-nav .bottom { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid #263150; font-size: 12.5px; }
.side-nav select { width: 100%; background: #1b2440; color: #fff; border: 1px solid #2c3858; border-radius: 9px; padding: 8px; }
.main { margin-left: 248px; flex: 1; min-width: 0; }
.main-top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 8px 28px; }
.crumbs { font-size: 13.5px; color: var(--ink-3); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs b { color: var(--ink); }
.page { padding: 26px 28px 60px; max-width: 1400px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1; min-width: 240px; }
.page-head h1 { font-size: 26px; letter-spacing: -.6px; }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .side-nav { transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .side-nav.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .main-top { padding: 8px 14px; }
  .page { padding: 18px 14px 50px; }
}

/* ---------- Guided editor ---------- */
.guide { background: linear-gradient(180deg, #fbfaff, #f5f3ff); border: 1px solid #e3deff; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: #3d3473; }
.guide b { color: var(--violet-600); }
.guide ul { margin: 6px 0 0; padding-left: 18px; }
.score { display: flex; align-items: center; gap: 12px; }
.score .ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), #e8ebf3 0); position: relative; }
.score .ring::before { content: ""; position: absolute; inset: 6px; background: #fff; border-radius: 50%; }
.score .ring span { position: relative; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 8px; padding: 5px 0; font-size: 13.5px; }
.checklist li::before { content: "○"; color: var(--ink-3); flex: none; }
.checklist li.ok::before { content: "✓"; color: var(--green); font-weight: 700; }
.checklist li.need::before { content: "!"; color: var(--red); font-weight: 700; }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: 12px; background: #fbfcfe; display: grid; place-items: center; text-align: center; color: var(--ink-3); cursor: pointer; position: relative; overflow: hidden; background-size: cover; background-position: center; }
.dropzone:hover { border-color: var(--violet); }
.dropzone.has { border-style: solid; color: transparent; }
.dropzone .dz-label { padding: 12px; font-size: 13px; }
.dropzone.has .dz-label { display: none; }

/* ---------- Print ---------- */
#print-root { display: none; }
@media print {
  body { background: #fff; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
