/* Jeff the Healer · presentation layer only.
   Fixed light theme for consistent administrative status semantics.
   No external fonts, frameworks, or new API dependencies. */
:root {
  --primary: #245ad2; --primary-dark: #1c46a6; --primary-soft: #edf3ff;
  --primary-ring: rgba(36,90,210,.22); --accent: #245ad2; --accent-dark: #1c46a6; --accent-soft: #edf3ff;
  --background: #f6f8fb; --surface: #fff; --surface-2: #f4f6f9;
  --text: #182338; --muted: #5d697c; --border: #e2e7ef; --border-strong: #8796ae;
  --success: #167347; --success-soft: #eaf7ef; --warning: #8c5a0d; --warning-soft: #fff6e4;
  --danger: #b12c39; --danger-dark: #932331; --danger-soft: #fff0f1;
  --info: #245ad2; --info-soft: #edf3ff; --neutral: #596579; --neutral-soft: #f0f3f7;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(24,35,56,.025);
  --shadow-md: 0 3px 14px rgba(24,35,56,.06);
  --shadow-lg: 0 16px 56px rgba(24,35,56,.15);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-brand: var(--font); --fs-base: 1rem; --fs-sm: .875rem;
  --control-h: 46px; --sidebar-w: 244px; --header-h: 72px;
}
body { line-height: 1.5; }
h1,h2,h3,h4 { letter-spacing: -.025em; font-weight: 650; }
h1 { font-size: clamp(1.65rem, 2.5vw, 2rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.1rem; }
.small,.hint,.field-error { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.btn { min-height: 44px; border-width: 1px; border-radius: 7px; padding: .65rem 1rem; font-size: .875rem; font-weight: 600; letter-spacing: 0; }
.btn-sm { min-height: 44px; font-size: .875rem; padding: .5rem .8rem; }
.btn-lg { min-height: 48px; font-size: 1rem; padding: .8rem 1.2rem; }
.btn-secondary { --btn-fg: var(--text); --btn-bd: var(--border-strong); }
.btn-secondary:hover { --btn-fg: var(--primary-dark); --btn-bd: var(--primary); }
.btn[disabled] { opacity: .55; }
.btn[disabled]:hover { background: var(--btn-bg); }
.btn-group { gap: 8px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }
.icon-btn { border-radius: 8px; min-width: 44px; min-height: 44px; }
.card,.panel,.rec-card,.stat { box-shadow: var(--shadow-sm); }
.card { border-width: 1px; }
label,.label { font-size: .875rem; font-weight: 600; color: var(--text); }
input,textarea,select,.input { border-width: 1px; border-color: var(--border-strong); border-radius: 7px; font-size: 1rem; background: var(--surface); }
input:focus,textarea:focus,select:focus { border-color: var(--primary); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
.field { margin-bottom: 20px; }
.field-error:empty { display: none; }
.hint { margin-top: 8px; }
.badge { font-size: .875rem; font-weight: 600; letter-spacing: 0; padding: 4px 10px; border: 1px solid transparent; line-height: 1.4; }
.badge-lg { font-size: .95rem; padding: 6px 12px; }
.card-label { font-size: .875rem; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.alert { border-width: 1px; border-radius: 8px; padding: 14px 16px; font-size: .9375rem; }
.alert .icon { margin-top: 2px; }
.switch { min-height: 44px; padding: 0; }
.switch .state { font-size: .875rem; text-align: left; padding: 0; }
.state { padding: 40px 24px; }
.state .state-icon { width: 52px; height: 52px; border-radius: 12px; font-size: 1.5rem; }
.state h2,.state h3 { font-size: 1.1rem; }
.state p { font-size: .9375rem; }
.loading { min-height: 180px; color: var(--muted); font-size: .9375rem; }
.brand { gap: 12px; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 1rem; font-family: var(--font); font-weight: 700; box-shadow: none; }
.brand-name { font-family: var(--font); font-size: 1rem; font-weight: 650; letter-spacing: -.015em; }
.brand-sub { font-size: .875rem; color: var(--muted); letter-spacing: 0; }
/* Navigation: only the routes and role-specific entries already in admin.js. */
.admin-body { background: var(--background); }
.admin-shell { display: block; min-height: 100vh; }
.admin-workspace { min-width: 0; }
.admin-topbar { display: flex; height: 72px; padding: 0 24px; gap: 16px; top: 0; background: rgba(255,255,255,.98); z-index: 60; }
.topbar-location,.topbar-account { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: .875rem; }
.topbar-brand { color: var(--muted); }
.topbar-divider { color: #a9b2c2; }
#current-page { font-weight: 600; }
.timezone-label { color: var(--muted); padding-right: 16px; border-right: 1px solid var(--border); }
.account-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
#account-name { font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar { inset: 72px auto 0 0; width: min(86vw,300px); background: var(--surface); color: var(--text); border-right: 1px solid var(--border); padding-top: 20px; }
.sidebar-brand,.sidebar-brand:hover { display: flex; color: var(--text); padding: 0 20px 24px; }
.sidebar-brand .brand-name { color: var(--text); font-size: .9375rem; line-height: 1.4; }
.sidebar-brand .brand-mark { background: var(--primary); }
.sidebar-brand .brand-sub { display: block; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.workspace-label { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .09em; padding: 16px 24px 8px; border-top: 1px solid var(--border); }
.nav-group { margin-top: 4px; padding: 0 12px; }
.nav-group-label { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .08em; margin: 28px 0 8px; }
.nav-list { gap: 4px; }
.nav-link { color: var(--muted); font-size: .9375rem; font-weight: 500; border-radius: 7px; padding: 12px; min-height: 46px; gap: 12px; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link[aria-current="page"] { color: var(--primary); background: var(--primary-soft); box-shadow: none; font-weight: 600; }
.nav-link[aria-current="page"]::after { content: ''; width: 5px; height: 5px; background: var(--primary); border-radius: 50%; margin-left: auto; }
.sidebar-foot { padding: 16px 12px; border-top: 1px solid var(--border); }
.sidebar-user { margin: 0 0 12px; padding: 8px 12px 12px; border-radius: 0; background: none; }
.sidebar-user .name { color: var(--text); font-size: .9375rem; font-weight: 600; }
.sidebar-user .role { color: var(--muted); font-size: .875rem; text-transform: none; letter-spacing: 0; margin-top: 2px; }
#logout-btn { color: var(--muted); }
.sidebar-backdrop { inset: 72px 0 0; background: rgba(18,30,50,.35); }
.menu-open { overflow: hidden; }
.main { max-width: 1536px; padding: 28px 24px 48px; margin: 0 auto; min-width: 0; }
.main>* { min-width: 0; }
.page-header { margin-bottom: 28px; align-items: center; gap: 16px; }
.page-header h1 { font-size: 1.75rem; line-height: 1.3; letter-spacing: -.035em; }
.page-header .sub { font-size: .9375rem; margin-top: 6px; }
.page-header .btn-group { flex-wrap: wrap; }
/* Dashboard: server-backed values only. */
.stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.stat { padding: 20px; border-radius: 10px; }
.stat::before { display: none; }
.stat-head { font-size: .875rem; font-weight: 500; align-items: flex-start; }
.stat-head .icon { width: 30px; height: 30px; padding: 6px; border-radius: 7px; color: var(--primary); background: var(--primary-soft); }
.stat-success .stat-head .icon { color: var(--success); background: var(--success-soft); }
.stat-value { font-size: 2rem; font-weight: 650; margin: 12px 0 8px; letter-spacing: -.04em; }
.stat-value small { font-size: 1rem; font-weight: 500; letter-spacing: 0; }
.stat-sub { font-size: .875rem; font-weight: 400; }
.progress { height: 6px; margin-top: 12px; }
.grid-2 { gap: 24px; }
.main .grid-2 { grid-template-columns: 1fr; }
.main .grid-2.mt-5 { margin-top: 24px; }
.panel { overflow: hidden; }
.panel-head { padding: 20px 24px; }
.panel-head h2 { font-size: 1rem; font-weight: 600; gap: 10px; line-height: 1.5; }
.panel-head .icon { color: var(--muted); }
.panel-body { padding: 24px; }
.panel-foot { background: var(--surface); padding: 16px 24px; }
.sys-status { display: grid; grid-template-columns: 1fr; padding: 24px; gap: 24px; border-width: 1px; border-left: 3px solid var(--primary); background: #fff; margin-bottom: 24px; }
.sys-status.is-open { background: #fff; border-color: var(--border); border-left-color: var(--success); }
.sys-status.is-closed { border-color: var(--border); border-left-color: var(--neutral); }
.sys-status.is-full { border-color: var(--border); border-left-color: var(--warning); }
.sys-status.is-disabled { border-color: var(--border); border-left-color: var(--danger); background: #fff; }
.sys-status .card-label { margin-bottom: 10px; }
.sys-status .headline { margin-bottom: 10px; gap: 12px; }
.sys-status .headline .muted { font-size: .875rem; }
.sys-status .msg { font-size: .9375rem; font-weight: 500; }
.sys-status .meta { font-size: .875rem; }
.sys-status>.btn-group { align-self: center; flex-wrap: wrap; }
.mini-counts { text-align: left; gap: 0; }
.mini-counts div { border-radius: 0; background: none; padding: 8px 16px; border-left: 1px solid var(--border); }
.mini-counts div:first-child { border-left: 0; padding-left: 0; }
.mini-counts strong { font-size: 1.6rem; font-weight: 650; margin-bottom: 8px; }
.mini-counts span { font-size: .875rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.kv { grid-template-columns: minmax(100px,auto) minmax(0,1fr); gap: 14px 20px; font-size: .9375rem; }
.kv dt { font-weight: 400; }
.kv dd { font-weight: 500; }
.list-plain li { padding: 16px 0; }
.list-plain li strong { font-weight: 600; }
.list-plain li .small { margin-top: 6px; }
/* Existing tables, date controls, pagination and archive states. */
.toolbar { gap: 16px; }
.toolbar .field { flex: 1 1 180px; }
.toolbar .btn { flex: 0 0 auto; }
.toolbar .field-error:empty { display: none; }
.chip-row { gap: 8px; }
.download-box .selected { font-size: 1rem; }
.summary-line { margin: 24px 0 16px; }
.summary-line .count { font-size: 1rem; font-weight: 600; }
.table-wrap { width: 100%; overflow: auto; }
.table { font-size: .9375rem; }
.table th { padding: 14px 20px; background: #f8f9fc; text-transform: none; font-size: .875rem; font-weight: 600; letter-spacing: 0; }
.table td { padding: 18px 20px; }
.table tbody tr:hover td { background: #f8faff; }
.table .name { font-weight: 600; }
.table .small { font-size: .875rem; }
.table .actions .btn-group { gap: 8px; }
.link-btn { text-align: left; font-weight: 600; }
.table code { font-size: .875rem; display: inline-block; overflow-wrap: anywhere; }
.table .details-cell { min-width: 190px; max-width: 320px; }
.rec-card { padding: 20px 24px; }
.rec-card .rec-name { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.rec-card .rec-addr,.rec-card .rec-meta { font-size: .875rem; overflow-wrap: anywhere; }
.rec-card .row-between { gap: 24px; }
.rec-card .row-between>.btn-group .btn { flex: 0 0 auto; }
.archive-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.tabs { display: inline-flex; max-width: 100%; width: auto; gap: 4px; padding: 4px; background: #edf0f5; }
.tab { min-height: 44px; min-width: 100px; font-size: .875rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
.tab[aria-selected="true"] { font-weight: 600; }
/* Events preserve title, description, dates, visibility, image and actions. */
.events-grid { gap: 20px; grid-template-columns: 1fr; }
.event-card { padding: 24px; gap: 16px; }
.event-card:hover { box-shadow: var(--shadow-md); transform: none; border-color: #c5d0e1; }
.event-card.is-past { opacity: 1; }
.event-card h3 { font-size: 1.125rem; line-height: 1.5; overflow-wrap: anywhere; }
.event-card.has-image { padding-top: 0; }
.event-img { margin: 0 -24px; aspect-ratio: 16/9; }
.event-meta { font-size: .875rem; gap: 8px; }
.event-meta .icon { color: var(--muted); width: 16px; height: 16px; }
.event-desc { color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.date-chip { border-radius: 8px; background: var(--surface-2); min-width: 52px; padding: 8px 12px; }
.date-chip .m { color: var(--muted); font-size: .75rem; }
.date-chip .d { color: var(--text); font-size: 1.3rem; }
.event-actions { gap: 8px; padding-top: 16px; }
.event-actions .btn { font-size: .875rem; }
/* Registration control and existing dialogs. */
.settings-wrap { max-width: 800px; }
.settings-wrap>.card { padding: 28px; }
.settings-availability { margin-bottom: 20px; }
.settings-availability>.hint { margin-top: 12px; }
#rc-title { color: var(--text); font-size: 1.125rem; margin-bottom: 24px; }
.form-actions { padding-top: 8px; }
dialog.modal { border: 1px solid var(--border); border-radius: 12px; width: min(600px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
dialog.modal::backdrop { background: rgba(18,30,50,.42); backdrop-filter: blur(2px); }
.modal-head { padding: 24px; align-items: center; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 1.2rem; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; background: var(--surface-2); gap: 8px; }
.modal-foot .btn { flex: 0 0 auto; }
.modal-icon { border-radius: 12px; width: 44px; height: 44px; }
.img-preview .img-empty { background: var(--surface-2); border-radius: 8px; border-style: dashed; }
.img-preview img { max-height: 200px; object-fit: contain; }
.toast-region { max-width: min(440px,calc(100vw - 32px)); }
.toast { font-size: .9375rem; border-radius: 10px; box-shadow: var(--shadow-md); }
.t-close { min-width: 44px; min-height: 44px; }
/* Public pages and login use the same controls without altering registration rules. */
.site-header { box-shadow: none; background: var(--surface); border-color: var(--border); }
.site-nav a { font-size: .9375rem; }
.hero-photo { background: #f4f7fc; }
.hero-photo::before { background: #f4f7fc; }
.hero-copy h1,.hero-copy .lead,.hero-copy .eyebrow { color: var(--text); text-shadow: none; }
.hero-copy h1 { font-size: clamp(2rem,3.3vw,3.5rem); font-weight: 650; }
.hero-copy .lead { color: var(--muted); font-size: 1.0625rem; }
.hero-ornament { background: var(--primary); width: 48px; height: 3px; }
.hero-side { border: 1px solid var(--border); border-radius: 12px; box-shadow: none; }
.hero-copy .status-card { border-width: 1px; box-shadow: var(--shadow-sm); text-align: left; max-width: 560px; }
.section { padding: 64px 0; }
.section-soft { background: #f0f4f9; }
.section-head h2 { font-size: 1.75rem; }
.steps li { border: 1px solid var(--border); border-radius: 10px; box-shadow: none; background: #fff; }
.steps li strong { font-size: 1rem; }
.site-footer { background: var(--surface); border-top: 1px solid var(--border); }
.page-narrow { padding-top: 40px; padding-bottom: 48px; }
.page-lead { font-size: 1rem; }
.notice { border-width: 1px; border-radius: 10px; background: var(--primary-soft); }
.notice h2 { font-size: 1rem; }
.notice li { font-size: .9375rem; }
.reg-form { padding: 28px; }
.result-icon { box-shadow: none; }
.schedule-box { border-radius: 8px; background: var(--surface-2); }
.center-page { min-height: 100dvh; padding: 40px 20px; }
.auth-card { width: min(100%,460px); padding: 36px; border-radius: 12px; box-shadow: var(--shadow-md); }
.auth-card .brand { margin-bottom: 36px; }
.auth-card .eyebrow { margin-bottom: 8px; font-size: .75rem; letter-spacing: .09em; color: var(--primary); }
.auth-card h1 { font-size: 1.75rem; margin-bottom: 8px; }
.auth-intro { color: var(--muted); font-size: .9375rem; margin-bottom: 28px; }
.auth-foot { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 24px; font-size: .875rem; }
.pw-toggle { right: 4px; }
/* Responsive behavior: wide tables scroll within their region; no page overflow. */
@media (min-width: 640px) {
  .events-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-grid.cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .admin-shell { display: block; }
  .sidebar { position: fixed; inset: 72px auto 0 0; height: auto; width: 300px; transform: translateX(-102%); transition: transform .2s var(--ease); }
  .sidebar.is-open { transform: none; }
  .sidebar-backdrop:not([hidden]) { display: block !important; }
}
@media (min-width: 1024px) {
  .admin-shell { display: grid; grid-template-columns: 244px minmax(0,1fr); }
  .sidebar { position: sticky; inset: auto; top: 0; width: 244px; height: 100dvh; transform: none; transition: none; box-shadow: none; padding-top: 28px; }
  .sidebar-backdrop { display: none !important; }
  .admin-topbar { display: flex; padding: 0 32px; }
  #menu-btn { display: none; }
  .main { padding: 32px 32px 48px; }
  .stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .main .grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .main .grid-2.wide-left { grid-template-columns: 1.35fr 1fr; }
  .sys-status { grid-template-columns: minmax(0,1fr) auto; }
  .events-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width: 1440px) { .events-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 767px) {
  .only-desktop { display: none; } .only-mobile { display: block; }
  .row-between { flex-wrap: wrap; }
}
@media (max-width: 639px) {
  .admin-topbar { padding: 0 16px; }
  .topbar-brand,.topbar-divider,.timezone-label,#account-name { display: none; }
  .topbar-location { gap: 8px; }
  .main { padding: 24px 16px 40px; }
  .page-header { margin-bottom: 24px; }
  .page-header h1 { font-size: 1.6rem; }
  .page-header .btn-group { width: 100%; }
  .page-header .btn-group .btn { flex: 1 1 auto; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .stat { padding: 20px; }
  .sys-status { padding: 20px; gap: 20px; }
  .sys-status>.btn-group .btn { flex: 1 1 auto; }
  .sys-status .headline { align-items: flex-start; }
  .panel-head,.panel-body { padding: 20px; }
  .panel-foot { padding: 16px 20px; }
  .panel-foot .btn-group .btn { flex: 1 1 auto; }
  .mini-counts div { padding: 8px 10px; }
  .mini-counts strong { font-size: 1.4rem; }
  .mini-counts span { font-size: .875rem; }
  .toolbar .field { flex: 1 1 100%; }
  .toolbar .btn { flex: 1 1 auto; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .kv dd { margin-bottom: 12px; }
  .rec-card { padding: 20px; }
  .rec-card .rec-top { flex-wrap: wrap; }
  .rec-card .row-between>.btn-group { width: 100%; }
  .rec-card .row-between>.btn-group .btn { flex: 1 1 auto; }
  .rec-card .rec-top code { overflow-wrap: anywhere; }
  .settings-wrap>.card { padding: 20px; }
  .form-grid.cols-2 { grid-template-columns: 1fr; }
  .modal-head,.modal-body { padding: 20px; }
  .modal-foot { padding: 16px 20px; }
  .modal-foot .btn { flex: 1 1 auto; }
  .auth-card { padding: 28px 24px; }
  .auth-card .brand-sub { font-size: .75rem; }
  .reg-form { padding: 20px; }
  .hero-photo { padding: 40px 0; }
  .hero-copy h1 { font-size: 2rem; }
  .section { padding: 40px 0; }
  .list-plain li { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .admin-topbar,.sidebar { display: none !important; }
  .admin-shell { display: block; }
  .main { max-width: none; padding: 0; }
}
/* Specificity matches the legacy controls so the shared layer remains authoritative. */
.input,.field input:not([type="checkbox"]):not([type="radio"]),.field select,.field textarea,select.input { border-width: 1px; border-radius: 7px; font-size: 1rem; }
.input:hover,.field input:hover,.field select:hover,.field textarea:hover { border-color: #8796ae; }
.badge { text-transform: none; }
.link-btn { min-height: 44px; }
.hero-photo .hero-ornament { background: var(--primary); }
.hero-side,.hero-side:hover { transform: none; }
/* Keep uploaded image ratios independent of their natural source dimensions. */
.event-img { position: relative; overflow: hidden; flex: none; }
.event-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.date-chip { border-color: var(--border); }
.badge-gold { background: var(--neutral-soft); color: var(--neutral); border-color: var(--border); }
.drawer-close { position: absolute; top: 12px; right: 8px; font-size: 1.4rem; background: var(--surface); }
@media (max-width: 1023px) { .sidebar-brand { padding-right: 56px; } .sidebar-brand .brand-name { font-size: .875rem; } }
@media (min-width: 1024px) { .drawer-close { display: none; } }
.table code { white-space: nowrap; overflow-wrap: normal; }
.field label.btn { display: inline-flex; align-items: center; font-size: .875rem; }
.img-preview { border-width: 1px; border-color: var(--border-strong); }
.img-preview .img-empty { border: 0; }
@media (max-width: 767px) { .card-list.only-mobile { display: grid; gap: 12px; } }
@media (max-width: 639px) { .chip-row .btn { flex: 1 1 calc(50% - 4px); } }
.events-grid { align-items: start; }
/* Visually hidden file input must not inherit full-width text-input dimensions. */
.field input.file-input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; }
.notice { border-color: #c6d8ea; }
@media (max-width: 639px) { .container.narrow { width: calc(100% - 32px); } }
.auth-card h1 { text-transform: none; letter-spacing: -.03em; color: var(--text); text-align: left; }
.auth-card .brand { justify-content: flex-start; }
.result h1 { text-transform: none; letter-spacing: -.025em; }
.progress.is-full > span { background: var(--warning); }
/* V2: requested announcement ranges, gallery, fixed public footer and motion. */
.brand-logo { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 9px; object-fit: cover; }
.site-nav a { letter-spacing: 0; text-transform: none; }
.site-nav { gap: 8px; }
.site-header .brand-sub { font-size: .8125rem; }
.has-fixed-footer { padding-bottom: var(--footer-clearance, 112px); }
.site-footer { position: fixed; inset: auto 0 0; z-index: 55; padding: 16px 0; background: rgba(255,255,255,.97); border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(24,35,56,.03); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.site-footer .brand-name { font-size: .875rem; }
.footer-time,.footer-links { font-size: .875rem; color: var(--muted); }
.footer-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.staff-link,.staff-link:hover { text-decoration: none; font-weight: 600; color: var(--primary-dark); }
.staff-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.hero-photo { background-image: linear-gradient(100deg,rgba(16,30,58,.94),rgba(25,47,82,.82)), url('../img/hero-bg.jpg'); background-position: center; background-size: cover; }
.hero-photo .hero-copy h1 { color: #fff; }
.hero-photo .hero-copy .lead { color: #e1e8f2; }
.hero-photo .hero-copy .eyebrow { color: #d3def2; }
.hero-photo .hero-ornament { background: #8cafff; }
.hero-photo .status-card { text-align: left; }
.hero-side { border-color: rgba(255,255,255,.2); background: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; align-items: start; }
.gallery-card { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.gallery-card-foot { padding: 16px; }
.gallery-card-foot p { margin: 0 0 12px; }
.gallery-card-foot .btn { flex: 1 1 auto; }
.picture-open { position: relative; width: 100%; aspect-ratio: 4/3; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; display: block; }
.picture-open img { width: 100%; height: 100%; object-fit: cover; transition: transform .18s ease; }
.picture-open:hover img { transform: scale(1.025); }
.picture-open:focus-visible { outline-offset: 4px; }
.gallery-card>.picture-open { border-radius: 0; }
.picture-hint { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; color: #fff; background: rgba(16,30,58,.85); font: 600 .875rem/1.4 var(--font); opacity: 0; transform: translateY(4px); transition: opacity .15s,transform .15s; }
.picture-open:hover .picture-hint,.picture-open:focus-visible .picture-hint { opacity: 1; transform: none; }
.picture-missing { cursor: default; color: var(--muted); font: inherit; }
.event-img>.picture-open { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; border-radius: 0; }
.gallery-preview>.picture-open { border-radius: 0; aspect-ratio: 16/9; }
.gallery-preview>.picture-open img { max-height: none; object-fit: contain; }
dialog.picture-dialog { width: min(1040px,calc(100vw - 32px)); }
.picture-dialog .modal-body { padding: 16px; }
.picture-stage { display: grid; place-items: center; min-height: 120px; background: #f1f3f7; border-radius: 8px; overflow: hidden; }
.viewer-image { max-width: 100%; width: auto; max-height: calc(100dvh - 180px); object-fit: contain; }
#gallery { scroll-margin-top: 90px; }
.main>.page-header,.main>.panel,.main>.card,.main>.stats,.main>.grid-2,.main>.gallery-grid { animation: surface-in .18s ease both; }
.stat,.gallery-card { transition: border-color .16s ease,box-shadow .16s ease; }
.stat:hover,.gallery-card:hover { border-color: #c1cde0; box-shadow: var(--shadow-md); }
@keyframes surface-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) { .footer-time { display: none; } }
@media (max-width: 1023px) { .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 767px) { .site-nav { display: none; } }
@media (max-width: 639px) {
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .footer-inner { justify-content: center; gap: 4px; text-align: center; }
  .footer-inner>.brand-name { width: 100%; }
  .footer-links { justify-content: center; gap: 6px; font-size: .8125rem; }
  .site-footer { padding: 10px 0; }
  .site-header .brand-name { font-size: .875rem; }
  .site-header .brand-sub { font-size: .75rem; }
  .picture-hint { opacity: 1; transform: none; }
  .picture-dialog .modal-head { padding: 16px; }
  .picture-dialog .modal-body { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .main>*,.picture-open img,.picture-hint { animation: none !important; transition: none !important; }
}
@media print { .site-footer { position: static; box-shadow: none; } .has-fixed-footer { padding-bottom: 0; } }
/* Thumbnails never take their intrinsic source height; the viewer shows the full image. */
.picture-open img { position: absolute; inset: 0; width: 100%; height: 100%; }
.footer-links { font-size: .875rem; }
@media (max-width: 639px) { .footer-links { font-size: .875rem; } }
/* Stable registration number cards and exact-name recovery. */
.number-ticket { text-align: center; background: #fff; border: 1px solid #cbd9f0; border-top: 5px solid var(--primary); border-radius: 12px; padding: 24px; margin: 20px 0; overflow-wrap: anywhere; }
.ticket-brand { font-weight: 700; font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 20px; }
.ticket-number { color: var(--primary); font-size: clamp(80px,14vw,128px); font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.05em; margin: 8px 0 24px; }
.ticket-details { text-align: left; padding-top: 20px; border-top: 1px solid var(--border); margin: 0; }
.ticket-details dt { color: var(--muted); font-size: .875rem; margin-top: 16px; }
.ticket-details dt:first-child { margin-top: 0; }
.ticket-details dd { margin: 4px 0 0; font-weight: 600; }
.ticket-name { font-size: 1.25rem; }
.ticket-date { color: var(--primary-dark); font-size: 1.25rem; }
.ticket-weekday { color: var(--primary-dark); }
.ticket-note { text-align: left; font-size: .8125rem; color: var(--muted); margin: 20px 0 0; }
.number-save-note { color: var(--muted); font-size: .9375rem; text-align: center; line-height: 1.6; }
#ok-download .btn { width: 100%; }
.lookup-container { max-width: 720px; }
.lookup-panel { padding: 24px; }
.lookup-privacy { margin: 16px 0 0; }
.lookup-results { margin-top: 24px; display: grid; gap: 16px; }
.lookup-result-count { margin: 0; font-weight: 600; }
.lookup-match { padding: 24px; overflow-wrap: anywhere; }
.lookup-match h3 { margin: 0 0 8px; }
.lookup-match-address { white-space: normal; }
#find-number { scroll-margin-top: 85px; }
.hero-lookup-link { display: inline-block; color: #e3ebff; margin-top: 16px; font-size: .9375rem; font-weight: 600; text-decoration: none; min-height: 44px; padding: 8px 0; }
.hero-lookup-link:hover { color: #fff; }
.bulk-gallery-preview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; max-height: 360px; overflow-y: auto; margin: 12px 0; }
.bulk-gallery-item { min-width: 0; overflow-wrap: anywhere; }
.bulk-gallery-item .picture-open { aspect-ratio: 1; }
.bulk-gallery-item .picture-hint { display: none; }
.bulk-gallery-name { font-size: .75rem; color: var(--muted); margin: 6px 0; }
.bulk-gallery-item .btn { width: 100%; padding: 6px; min-height: 36px; font-size: .8125rem; }
.bulk-gallery-summary { font-size: .875rem; font-weight: 600; margin: 12px 0; }
@media(max-width: 639px) { .number-ticket,.lookup-panel,.lookup-match { padding: 20px; } .bulk-gallery-preview { grid-template-columns: repeat(2,minmax(0,1fr)); } .number-download { width: 100%; } }
/* Keep the standard card and its download action compact without shrinking the number. */
#view-success { padding: 24px; }
.number-ticket { padding: 20px; margin: 16px 0; }
.ticket-brand { margin-bottom: 12px; }
.ticket-number { font-size: clamp(80px,14vw,112px); margin-bottom: 16px; }
.ticket-details { padding-top: 16px; }
.ticket-details dt { margin-top: 12px; }
.ticket-details dt:first-child { margin-top: 0; }
.ticket-note { margin-top: 16px; }
.bulk-gallery-preview { padding-bottom: 4px; }
.bulk-gallery-item .picture-open { height: auto; min-height: 0; }

#view-success .number-save-note { margin: 12px 0; }

/* Icon-only password visibility control; accessible label remains in the DOM. */
.pw-wrap .pw-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; }
.pw-wrap .pw-toggle .icon { width: 20px; height: 20px; }
