:root {
  --primary: #6c4cf1;
  --accent: #ff7a59;
  --ink: #26233a;
  --muted: #706d80;
  --paper: #fffdfa;
  --line: #e9e5ef;
  --shadow: 0 24px 70px rgba(58, 43, 102, 0.12);
  --radius: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 30%),
    radial-gradient(circle at 90% 22%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 26%),
    #f9f7fb;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.page-glow {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .14;
  pointer-events: none;
}

.page-glow-one { top: -140px; left: -120px; background: var(--primary); }
.page-glow-two { top: 360px; right: -160px; background: var(--accent); }

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-size: 1.03rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-copy { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-name { white-space: nowrap; }
.brand-version {
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, white);
  border-radius: 999px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, white);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 92%, white), color-mix(in srgb, var(--accent) 86%, var(--primary)));
  box-shadow: 0 8px 25px color-mix(in srgb, var(--primary) 18%, transparent);
  font-size: 1.12rem;
  transform: rotate(-3deg);
  transition: transform .2s ease;
}
.brand:hover .brand-mark { transform: rotate(2deg) translateY(-1px); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 34px 32px 32px;
  border-radius: 28px;
  text-align: center;
  color: white;
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--primary) 94%, #24195a), var(--primary) 52%, color-mix(in srgb, var(--accent) 85%, var(--primary)));
  box-shadow: 0 30px 80px color-mix(in srgb, var(--primary) 23%, transparent);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .25;
  background-image: radial-gradient(circle, white 1.2px, transparent 1.2px);
  background-size: 27px 27px;
  mask-image: linear-gradient(to bottom, black, transparent 65%);
}

.event-emoji {
  width: 58px;
  height: 58px;
  margin: 0 auto 11px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 18px;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 1px rgba(255,255,255,.45), 0 20px 40px rgba(45, 25, 95, .2);
  font-size: 1.85rem;
  transform: rotate(-3deg);
  backdrop-filter: blur(12px);
}

.eyebrow, .section-kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.hero .eyebrow { color: rgba(255,255,255,.74); }

.hero .eyebrow {
  margin-bottom: 6px;
  font-size: .66rem;
}

.hero h1 {
  max-width: 720px;
  margin: 0 auto;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 4.5vw, 3.45rem);
  line-height: 1.03;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.hero-tagline {
  margin: 10px auto 0;
  color: rgba(255,255,255,.86);
  font-size: clamp(.9rem, 1.5vw, 1.05rem);
}

.event-facts {
  max-width: 720px;
  margin: 21px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.event-facts-single { max-width: 360px; grid-template-columns: minmax(0, 1fr); }

.fact {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  text-align: left;
  background: rgba(255,255,255,.13);
  backdrop-filter: blur(10px);
}

.fact-link { text-decoration: none; transition: .2s ease; }
.fact-link:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); }
.fact-icon { flex: 0 0 auto; font-size: 1.14rem; }
.fact > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.fact strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.fact small { margin-top: 1px; color: rgba(255,255,255,.7); font-size: .72rem; }

.hero-confetti { position: absolute; width: 12px; height: 32px; border-radius: 4px; background: #ffd76a; opacity: .8; }
.confetti-a { top: 55px; left: 9%; transform: rotate(25deg); box-shadow: 55px 85px 0 #69e0d2, 88vw 35px 0 #ffa7c2; }
.confetti-b { right: 12%; bottom: 42px; width: 25px; height: 9px; transform: rotate(-30deg); background: #78e2d2; }

.intro-card {
  position: relative;
  z-index: 2;
  width: calc(100% - 96px);
  margin: -20px auto 78px;
  padding: 34px 38px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 50px;
  border: 1px solid rgba(229,224,236,.9);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}

.intro-card h2, .section-heading h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.event-description {
  max-width: 760px;
  margin: 13px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.attendance-summary {
  min-width: 160px;
  padding-left: 34px;
  border-left: 1px solid var(--line);
  text-align: center;
}
.attendance-summary strong { display: block; color: var(--primary); font-family: "Fraunces", Georgia, serif; font-size: 2.7rem; line-height: 1; }
.attendance-summary span { display: block; margin-top: 5px; font-weight: 700; }
.attendance-summary small { display: block; margin-top: 4px; color: var(--muted); }

.contributions-section { padding-bottom: 84px; scroll-margin-top: 24px; }

.comments-section {
  margin: -38px 0 72px;
  padding: 32px 36px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 14px 42px rgba(55,45,80,.06);
}

.comments-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: color-mix(in srgb, var(--primary) 10%, white);
  font-size: 1.55rem;
}

.comments-section h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  letter-spacing: -.03em;
}

.comments-content {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.comments-content p { margin: 0 0 .85em; }
.comments-content p:last-child { margin-bottom: 0; }
.comments-content ul, .comments-content ol { margin: .5em 0 .85em; padding-left: 1.5em; }
.comments-content strong { color: var(--ink); }
.comments-content a { color: var(--primary); font-weight: 700; text-underline-offset: 3px; }
.comments-content big { font-size: 1.25em; }
.comments-content small { font-size: .85em; }

.comments-layout { margin-top: 12px; }
.comments-layout.has-image-column {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
  gap: 30px;
  align-items: start;
}
.comments-layout .comments-content { margin-top: 0; }
.comments-poster-link,
.comments-poster-placeholder {
  width: 100%;
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f6f3f8;
}
.comments-poster-link { cursor: zoom-in; }
.comments-poster-link img { width: 100%; height: auto; display: block; }
.comments-poster-placeholder { aspect-ratio: 1 / 1.414; padding: 20px; color: #9b97a4; text-align: center; font-size: .82rem; }

.comments-empty { color: #9b97a4; font-style: italic; }

.section-heading {
  margin-bottom: 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}
.section-heading > p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.65; }

.closed-banner {
  margin: 0 0 22px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  color: #6c5220;
  background: #fff3cd;
}

.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.category-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--category-color) 22%, #e8e4ed);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  box-shadow: 0 16px 45px rgba(55,45,80,.07);
  animation: card-in .48s ease both;
  animation-delay: var(--delay);
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-card:hover { transform: translateY(-3px); box-shadow: 0 22px 55px rgba(55,45,80,.11); }

@keyframes card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.category-top {
  padding: 24px 24px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--category-color) 12%, white), white 75%);
}

.category-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: color-mix(in srgb, var(--category-color) 15%, white);
  font-size: 1.75rem;
}
.category-top h3 { margin: 0; font-size: 1.2rem; }
.category-top p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }

.add-category {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: white;
  background: var(--category-color);
  box-shadow: 0 9px 22px color-mix(in srgb, var(--category-color) 28%, transparent);
  cursor: pointer;
  transition: .2s ease;
}
.add-category:hover { transform: scale(1.07) rotate(3deg); }
.add-category svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.entry-list { padding: 4px 24px 8px; }
.entry { min-width: 0; padding: 15px 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid #f0edf2; }
.entry:last-child { border-bottom: 0; }
.guest-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--category-color); background: color-mix(in srgb, var(--category-color) 12%, white); font-size: .83rem; font-weight: 800; }
.entry-copy { min-width: 0; display: flex; flex-direction: column; }
.entry-copy strong, .entry-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-copy strong { font-size: .88rem; }
.entry-copy span { margin-top: 2px; color: var(--muted); font-size: .86rem; }
.entry time { color: #a19da9; font-size: .72rem; }
.empty-category { min-height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #9b97a4; }
.empty-category span { font-size: 1.4rem; }
.empty-category p { margin: 7px 0 0; font-size: .86rem; }

.category-cta {
  width: calc(100% - 48px);
  margin: 6px 24px 24px;
  padding: 12px 16px;
  border: 1px dashed color-mix(in srgb, var(--category-color) 42%, white);
  border-radius: 13px;
  color: color-mix(in srgb, var(--category-color) 82%, #242030);
  background: color-mix(in srgb, var(--category-color) 7%, white);
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}
.category-cta:hover { border-style: solid; background: color-mix(in srgb, var(--category-color) 13%, white); }

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 38px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .84rem;
}
footer p { margin: 0; }
footer a { text-underline-offset: 3px; }

.contribution-modal {
  width: min(520px, calc(100% - 30px));
  padding: 32px;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  box-shadow: 0 35px 100px rgba(30,20,55,.28);
}
.contribution-modal::backdrop { background: rgba(30,24,46,.64); backdrop-filter: blur(5px); }
.contribution-modal[open] { animation: modal-in .22s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 15px; right: 16px; width: 37px; height: 37px; border: 0; border-radius: 50%; color: var(--muted); background: #f4f1f6; font-size: 1.5rem; cursor: pointer; }
.modal-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.modal-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--primary) 10%, white); font-size: 1.9rem; }
.modal-heading p { margin: 0 0 2px; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.modal-heading h2 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 1.65rem; }
.contribution-form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: .87rem; font-weight: 700; }
.field em { color: var(--accent); font-style: normal; }
.field input, .field textarea, .admin-input, .admin-textarea, .admin-select {
  width: 100%;
  border: 1px solid #ddd8e4;
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: white;
  transition: border .2s ease, box-shadow .2s ease;
}
.field input, .admin-input, .admin-select { min-height: 48px; padding: 0 14px; }
.admin-input[type="file"] { padding: 6px 8px; line-height: 34px; }
.admin-input[type="file"]::file-selector-button {
  height: 34px;
  margin: 0 11px 0 0;
  padding: 0 13px;
  vertical-align: middle;
  border: 1px solid #d8d2df;
  border-radius: 9px;
  color: #464155;
  background: #f7f5f9;
  cursor: pointer;
}
.field textarea, .admin-textarea { padding: 13px 14px; resize: vertical; }
.field input:focus, .field textarea:focus, .admin-input:focus, .admin-textarea:focus, .admin-select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 11%, transparent); }
.field small { color: var(--muted); }
.primary-button {
  min-height: 51px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--primary) 65%, var(--accent)));
  box-shadow: 0 13px 28px color-mix(in srgb, var(--primary) 25%, transparent);
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease;
}
.primary-button:hover { transform: translateY(-2px); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  color: white;
  box-shadow: 0 16px 44px rgba(25,20,40,.2);
  animation: toast-in .3s ease both;
}
.toast span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.22); font-weight: 800; }
.toast-success { background: #247c52; }
.toast-error { background: #b34747; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* Administration */
.admin-body { background: #f6f4f8; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 20px; display: flex; flex-direction: column; color: white; background: #25213b; }
.admin-sidebar .brand { color: white; padding: 0 8px 26px; }
.admin-sidebar .brand-mark { color: var(--ink); }
.admin-sidebar .brand-copy { align-items: flex-start; flex-direction: column; gap: 4px; }
.admin-sidebar .brand-version { border-color: rgba(255,255,255,.16); color: #d7d1e4; background: rgba(255,255,255,.08); }
.admin-nav { display: grid; gap: 7px; }
.admin-nav-heading { margin: 15px 14px 1px; color: #8f899f; font-size: .65rem; font-weight: 800; letter-spacing: .15em; line-height: 1; text-transform: uppercase; }
.admin-nav-heading:first-child { margin-top: 2px; }
.admin-nav button { width: 100%; padding: 12px 14px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 12px; color: #c7c2d4; background: transparent; text-align: left; cursor: pointer; }
.admin-nav button:hover, .admin-nav button.is-active { color: white; background: rgba(255,255,255,.1); }
.admin-nav button span { width: 24px; text-align: center; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 8px; }
.sidebar-link { padding: 11px 13px; display: flex; align-items: center; gap: 9px; border-radius: 10px; color: #c7c2d4; text-decoration: none; font-size: .88rem; }
.sidebar-link:hover { color: white; background: rgba(255,255,255,.08); }
.admin-main { min-width: 0; padding: 42px clamp(24px, 5vw, 70px) 70px; }
.admin-topbar { max-width: 1020px; margin: 0 auto 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-topbar p { margin: 0 0 5px; color: var(--muted); font-size: .84rem; }
.admin-topbar h1 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.03em; }
.open-site-button { padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; text-decoration: none; font-weight: 700; white-space: nowrap; }
.admin-panel { display: none; max-width: 1020px; margin: 0 auto; }
.admin-panel.is-active { display: block; animation: panel-in .25s ease; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
.admin-card { margin-bottom: 20px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 10px 35px rgba(49,40,70,.05); }
.admin-card-header { margin-bottom: 23px; }
.admin-card-header h2 { margin: 0; font-size: 1.12rem; }
.admin-card-header p { margin: 6px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin-grid .span-two { grid-column: 1 / -1; }
.admin-label { display: grid; gap: 7px; color: #464155; font-size: .84rem; font-weight: 700; }
.admin-label small { color: var(--muted); font-weight: 400; }
.rich-editor { overflow: hidden; border: 1px solid #ddd8e4; border-radius: 13px; background: white; transition: border .2s ease, box-shadow .2s ease; }
.rich-editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 11%, transparent); }
.rich-editor-toolbar { padding: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; border-bottom: 1px solid #e8e4ec; background: #f8f7fa; }
.rich-editor-toolbar button { min-height: 34px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; color: #464155; background: transparent; font: inherit; font-size: .78rem; cursor: pointer; }
.rich-editor-toolbar button:hover, .rich-editor-toolbar button:focus-visible { border-color: #d9d3e0; color: var(--primary); background: white; outline: none; }
.rich-editor-separator { width: 1px; height: 24px; margin: 0 3px; background: #ddd8e4; }
.rich-editor-surface { min-height: 260px; max-height: 560px; padding: 16px; overflow-y: auto; outline: none; color: var(--ink); background: white; font-size: .93rem; font-weight: 400; line-height: 1.65; }
.rich-editor-surface:empty::before { content: attr(data-placeholder); color: #9b97a4; pointer-events: none; }
.rich-editor-surface p { margin: 0 0 1em; }
.rich-editor-surface p:last-child { margin-bottom: 0; }
.rich-editor-surface ul, .rich-editor-surface ol { margin: .5em 0 1em; padding-left: 1.6em; }
.rich-editor-surface a { color: var(--primary); font-weight: 700; }
.rich-editor-surface big { font-size: 1.25em; }
.rich-editor-surface small { font-size: .85em; }
.admin-actions { margin-top: 23px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.secondary-button, .danger-button, .icon-button { border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; }
.secondary-button, .danger-button { min-height: 45px; padding: 0 17px; font-weight: 700; }
.danger-button { color: #b33b3b; border-color: #f0caca; background: #fff9f9; }
.secondary-button:disabled, .danger-button:disabled { opacity: .45; cursor: not-allowed; }
.switch-row { min-height: 48px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 13px; }
.switch { position: relative; width: 48px; height: 27px; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbc6d2; cursor: pointer; transition: .2s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: .2s ease; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(21px); }
.switch input:disabled + span { cursor: not-allowed; opacity: .55; }
.submissions-control-card { padding-top: 22px; padding-bottom: 18px; }
.autosave-status { margin: 9px 0 0; color: var(--muted); font-size: .76rem; }
.comments-image-settings { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); transition: opacity .2s ease; }
.comments-image-settings.is-disabled { opacity: .58; }
.comments-image-heading { margin-bottom: 16px; }
.comments-image-tools { margin-top: 18px; display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 22px; align-items: start; }
.comments-image-preview,
.comments-image-placeholder { width: 100%; min-height: 210px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #f7f5f9; }
.comments-image-preview { cursor: zoom-in; }
.comments-image-preview img { width: 100%; height: auto; display: block; }
.comments-image-placeholder { aspect-ratio: 1 / 1.414; padding: 18px; color: var(--muted); text-align: center; font-size: .8rem; }
.comments-image-actions { min-width: 0; }
.comments-upload-actions { justify-content: flex-start; flex-wrap: wrap; }
.color-field { display: grid; grid-template-columns: 52px 1fr; gap: 9px; }
.color-field input[type="color"] { width: 52px; height: 48px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; }
.category-editor { display: grid; gap: 11px; }
.category-row { padding: 13px; display: grid; grid-template-columns: 68px minmax(150px,1fr) 68px 44px; gap: 10px; align-items: end; border: 1px solid var(--line); border-radius: 14px; background: #fbfafc; }
.category-row .admin-label { font-size: .72rem; }
.category-row input[name="category_icon[]"] { text-align: center; font-size: 1.35rem; }
.category-row input[type="color"] { width: 100%; height: 48px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; color: #b33b3b; font-size: 1.25rem; }
.add-row-button { width: 100%; min-height: 48px; margin-top: 12px; border: 1px dashed color-mix(in srgb, var(--primary) 40%, white); border-radius: 13px; color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, white); font-weight: 800; cursor: pointer; }
.entries-table-wrap { overflow-x: auto; }
.entries-table { width: 100%; border-collapse: collapse; }
.entries-table th, .entries-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: .84rem; }
.entries-table th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.category-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #f0edf6; font-size: .76rem; font-weight: 700; }
.inline-form { display: inline; }
.delete-entry { border: 0; color: #b33b3b; background: none; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.empty-admin { padding: 35px; text-align: center; color: var(--muted); }
.danger-zone { border-color: #f0d0d0; }
.danger-zone h2 { color: #a63838; }
.reset-list { margin: 0; padding-left: 1.25rem; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.reset-list code { padding: 2px 5px; border-radius: 5px; color: #7e3030; background: #fff1f1; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-card { width: min(460px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 25px; background: white; box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 30px; }
.login-icon { width: 68px; height: 68px; margin-bottom: 18px; display: grid; place-items: center; border-radius: 21px; color: white; background: linear-gradient(135deg, var(--primary), var(--accent)); font-size: 1.8rem; }
.login-card h1 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 2rem; }
.login-card > p { margin: 10px 0 25px; color: var(--muted); line-height: 1.6; }
.login-form { display: grid; gap: 16px; }
.login-form .primary-button { width: 100%; }
.login-back { margin-top: 20px; display: block; color: var(--muted); text-align: center; font-size: .84rem; }
.form-alert { padding: 12px 14px; border-radius: 12px; color: #9e3434; background: #fff0f0; font-size: .86rem; }

@media (max-width: 820px) {
  .intro-card { width: calc(100% - 30px); grid-template-columns: 1fr; gap: 24px; }
  .attendance-summary { padding: 20px 0 0; display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 10px; align-items: baseline; border-left: 0; border-top: 1px solid var(--line); text-align: left; }
  .attendance-summary strong { grid-row: span 2; }
  .section-heading { align-items: start; flex-direction: column; gap: 13px; }
  .category-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; width: 100%; height: auto; padding: 16px 18px; }
  .admin-sidebar .brand { padding: 0 4px 14px; }
  .admin-sidebar .brand-copy { align-items: center; flex-direction: row; gap: 8px; }
  .admin-nav { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .admin-nav-heading { display: none; }
  .admin-nav button { width: auto; flex: 0 0 auto; }
  .sidebar-bottom { display: none; }
  .admin-main { padding: 28px 20px 55px; }
}

@media (max-width: 620px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { height: 72px; }
  .hero { padding: 28px 16px 27px; border-radius: 22px; }
  .event-emoji { width: 52px; height: 52px; font-size: 1.7rem; }
  .event-facts { grid-template-columns: 1fr; margin-top: 18px; gap: 8px; }
  .intro-card { width: calc(100% - 12px); margin-bottom: 58px; padding: 26px 22px; }
  .category-top { padding: 20px 18px 16px; }
  .entry-list { padding: 4px 18px 8px; }
  .category-cta { width: calc(100% - 36px); margin: 6px 18px 20px; }
  .comments-section { margin-top: -32px; padding: 24px 20px; grid-template-columns: 1fr; gap: 13px; }
  .comments-icon { width: 48px; height: 48px; }
  .comments-layout.has-image-column { grid-template-columns: 1fr; gap: 22px; }
  .comments-poster-column { max-width: 360px; }
  .entry { grid-template-columns: auto minmax(0,1fr); }
  .entry time { display: none; }
  footer { flex-direction: column; gap: 10px; }
  .contribution-modal { padding: 26px 20px 22px; }
  .toast { right: 12px; bottom: 12px; left: 12px; }
  .admin-topbar { align-items: start; }
  .open-site-button { padding: 9px 11px; font-size: .8rem; }
  .admin-card { padding: 21px 17px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-grid .span-two { grid-column: auto; }
  .comments-image-tools { grid-template-columns: 1fr; }
  .comments-image-preview, .comments-image-placeholder { max-width: 260px; }
  .category-row { grid-template-columns: 58px 1fr 50px; }
  .category-row .category-name-field { grid-column: 2 / -1; grid-row: 1; }
  .category-row .category-icon-field { grid-column: 1; grid-row: 1; }
  .category-row .category-color-field { grid-column: 1 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
