/* Potters Schools, Sango Ota — Institutional Editorial Stylesheet (Standalone PHP + MySQL) */
:root {
  --burgundy: #7A2025;
  --burgundy-dark: #5C161A;
  --cream: #E8D8C1;
  --ivory: #F7F3ED;
  --brown: #3D2824;
  --brown-deep: #2B1B18;
  --muted: #644C46;
  --body: #4E3B36;
  --border: #DDD2C2;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--ivory);
  color: var(--brown);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .font-serif {
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
  line-height: 1.2;
}
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.section { padding: 78px 0; border-bottom: 1px solid var(--border); }
.section-cream { background: rgba(232, 216, 193, 0.42); }
.section-dark { background: var(--brown); color: var(--ivory); border-bottom-color: rgba(232, 216, 193, 0.16); }
.section-white { background: var(--white); }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin: 0 0 10px;
}
.section-dark .eyebrow { color: var(--cream); }
.section-title { font-size: clamp(1.85rem, 3.2vw, 2.55rem); font-weight: 700; color: var(--brown); }
.section-dark .section-title { color: var(--ivory); }
.section-lead { color: var(--body); max-width: 66ch; margin-top: 14px; font-size: 1rem; line-height: 1.8; }
.section-dark .section-lead { color: rgba(247, 243, 237, 0.85); }
.accent-rule { width: 72px; height: 1px; background: var(--burgundy); margin: 20px 0; }

/* Rich-Text Editorial Prose */
.rich-prose p { margin: 0 0 14px; line-height: 1.82; color: var(--body); }
.rich-prose p:last-child { margin-bottom: 0; }
.rich-prose h3, .rich-prose h4 { margin: 22px 0 10px; color: var(--brown); }
.rich-prose ul, .rich-prose ol { margin: 0 0 16px 20px; padding: 0; color: var(--body); }
.rich-prose li { margin-bottom: 6px; }
.rich-prose blockquote { margin: 18px 0; padding: 14px 18px; background: rgba(232, 216, 193, 0.45); border: 1px solid var(--border); font-family: 'Playfair Display', Georgia, serif; font-style: italic; }
.rich-prose a { color: var(--burgundy); text-decoration: underline; }

/* Subtle Scroll Reveal (respects reduced motion) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track, .marquee-track-ltr { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  font-family: inherit;
}
.btn-nav { padding: 9px 16px; font-size: 13px; white-space: nowrap; }
.btn-primary { background: var(--burgundy); color: var(--ivory); }
.btn-primary:hover { background: var(--burgundy-dark); }
.btn-dark { background: var(--brown); color: var(--ivory); }
.btn-dark:hover { background: var(--burgundy); }
.btn-outline { background: transparent; border-color: var(--brown); color: var(--brown); }
.btn-outline:hover { background: rgba(232, 216, 193, 0.55); }
.btn-outline-light { background: rgba(61, 40, 36, 0.45); border-color: rgba(232, 216, 193, 0.8); color: var(--ivory); }
.btn-outline-light:hover { background: var(--cream); color: var(--brown); }
.btn-cream { background: var(--cream); color: var(--brown); }
.btn-full { width: 100%; }

/* Topbar & Sticky Navbar with CMS Dropdowns */
.site-sticky { position: sticky; top: 0; z-index: 40; }
.topbar { background: var(--brown); color: var(--ivory); font-size: 12px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 20px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar a { color: var(--cream); }
.topbar a:hover { color: var(--white); }
.topbar .sep { opacity: 0.4; }
.topbar-admin { border-left: 1px solid rgba(232, 216, 193, 0.25); padding-left: 14px; font-weight: 600; }

.navbar { background: rgba(247, 243, 237, 0.97); border-bottom: 1px solid var(--border); backdrop-filter: blur(8px); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 20px; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; background: var(--white); object-fit: contain; padding: 2px; border: 1px solid var(--border); }
.brand-name { font-family: 'Playfair Display', Georgia, serif; font-size: 1.08rem; font-weight: 700; color: var(--brown); white-space: nowrap; }

.nav-links { display: flex; align-items: center; gap: 15px; font-size: 13px; font-weight: 500; }
.nav-links > a, .nav-trigger {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links > a:hover, .nav-links > a.active, .nav-trigger:hover, .nav-trigger.active {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}
.nav-caret { font-size: 10px; opacity: 0.7; }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 240px;
  background: var(--ivory);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(34, 21, 18, 0.16);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--brown);
  border-bottom: 1px solid rgba(221, 210, 194, 0.45);
}
.nav-dropdown-menu a:last-child { border-bottom: 0; }
.nav-dropdown-menu a:hover { background: rgba(232, 216, 193, 0.55); color: var(--burgundy); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--border); background: transparent; color: var(--brown); font-size: 20px; cursor: pointer; border-radius: 2px; }

.mobile-drawer { background: var(--ivory); border-top: 1px solid var(--border); padding: 14px 0 24px; max-height: 78vh; overflow-y: auto; }
.mobile-drawer-inner { display: flex; flex-direction: column; }
.mobile-drawer-inner > a { padding: 12px 0; border-bottom: 1px solid rgba(221, 210, 194, 0.65); font-weight: 600; font-size: 14.5px; }
.mobile-dropdown { border-bottom: 1px solid rgba(221, 210, 194, 0.65); }
.mobile-dropdown summary { list-style: none; padding: 12px 0; font-weight: 600; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.mobile-dropdown summary::-webkit-details-marker { display: none; }
.mobile-dropdown-links { display: flex; flex-direction: column; padding: 0 0 12px 14px; gap: 8px; }
.mobile-dropdown-links a { font-size: 13.5px; color: var(--muted); padding: 4px 0; }
.mobile-dropdown-links a:hover { color: var(--burgundy); }
.mobile-drawer-btns { display: grid; gap: 10px; margin-top: 16px; }

/* Page Header Banner (Inner Pages) */
.page-banner {
  background: var(--brown);
  color: var(--ivory);
  padding: 64px 0 56px;
  border-bottom: 3px solid var(--burgundy);
}
.page-banner-breadcrumb { font-size: 12px; color: var(--cream); margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.page-banner-breadcrumb a:hover { text-decoration: underline; }
.page-banner h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: var(--ivory); }
.page-banner p { margin-top: 12px; max-width: 700px; color: rgba(247, 243, 237, 0.86); font-size: 1rem; }

/* Hero Slider */
.hero { position: relative; height: 78vh; min-height: 540px; max-height: 800px; background: var(--brown); overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.9s ease; }
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); transition: transform 6.5s ease; }
.hero-slide.active img { transform: scale(1); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(38, 23, 20, 0.92) 0%, rgba(61, 40, 36, 0.64) 55%, rgba(61, 40, 36, 0.28) 100%); }
.hero-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; max-width: 740px; color: var(--ivory); }
.hero-content h1 { font-size: clamp(2.2rem, 4.8vw, 3.85rem); color: var(--ivory); margin-top: 10px; }
.hero-content p.hero-sub { font-size: 1.08rem; color: rgba(247, 243, 237, 0.92); margin: 18px 0 28px; max-width: 590px; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-controls { position: absolute; left: 0; right: 0; bottom: 24px; z-index: 5; display: flex; justify-content: space-between; align-items: center; }
.hero-dots { display: flex; gap: 8px; }
.hero-dot { width: 18px; height: 5px; border: 0; background: rgba(247, 243, 237, 0.4); cursor: pointer; transition: width 0.25s, background 0.25s; }
.hero-dot.active { width: 42px; background: var(--cream); }
.hero-arrows { display: flex; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border: 1px solid rgba(247, 243, 237, 0.35); background: rgba(61, 40, 36, 0.65); color: var(--ivory); cursor: pointer; font-size: 20px; border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--burgundy); border-color: var(--burgundy); }

/* Grids & Cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.split-12 { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: start; }
.split-even { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }

.card { border: 1px solid var(--border); background: var(--white); display: flex; flex-direction: column; overflow: hidden; transition: border-color 0.25s, transform 0.25s; }
.card-hover:hover { border-color: var(--burgundy); transform: translateY(-2px); }
.card-ivory { background: var(--ivory); }
.card-cream { background: rgba(232, 216, 193, 0.45); }
.card-dark { background: var(--brown); color: var(--ivory); border-color: rgba(232, 216, 193, 0.2); }
.card-pad { padding: 26px; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--cream); position: relative; }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-portrait { aspect-ratio: 4 / 5; overflow: hidden; background: var(--cream); }
.card-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s ease; }
.card:hover .card-portrait img { transform: scale(1.03); }

/* Signature visual */
.signature-line {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.55rem;
  color: var(--burgundy);
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Stats Strip */
.stats-strip { background: var(--brown); color: var(--ivory); padding: 56px 0; }
.stat-box { text-align: center; padding: 12px 16px; border-right: 1px solid rgba(232, 216, 193, 0.16); }
.stat-box:last-child { border-right: 0; }
.stat-num { font-size: 2.35rem; font-weight: 700; color: var(--cream); }
.stat-label { font-family: 'Playfair Display', Georgia, serif; font-size: 1rem; font-weight: 600; margin-top: 6px; }
.stat-note { font-size: 12px; color: rgba(232, 216, 193, 0.72); margin-top: 4px; }

/* Timeline */
.timeline { border-top: 1px solid rgba(61, 40, 36, 0.2); }
.timeline-row { display: grid; grid-template-columns: 190px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid rgba(61, 40, 36, 0.14); }
.timeline-year { font-family: 'Playfair Display', Georgia, serif; font-size: 1.25rem; font-weight: 700; color: var(--brown); margin-top: 4px; }

/* Marquee (Right-to-Left Staff & Left-to-Right Videos) */
.marquee-wrap { overflow-x: auto; overflow-y: hidden; width: 100%; padding: 8px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.marquee-wrap::-webkit-scrollbar { display: none; }
.marquee-track { display: flex; gap: 20px; width: max-content; animation: marqueeRtl 48s linear infinite; will-change: transform; }
.marquee-track-ltr { animation: marqueeLtr 50s linear infinite; }
.marquee-wrap:hover .marquee-track,
.marquee-wrap:focus-within .marquee-track,
.marquee-wrap.paused .marquee-track { animation-play-state: paused; }
@keyframes marqueeRtl { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes marqueeLtr { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

/* Play Button Overlay on Video Cards */
.video-play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(122, 32, 37, 0.9);
  border: 2px solid var(--cream);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.2s, background 0.2s;
}
.card:hover .video-play-badge { transform: translate(-50%, -50%) scale(1.08); background: var(--burgundy-dark); }

/* Filter tabs */
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; background: rgba(232, 216, 193, 0.55); padding: 4px; }
.filter-btn { border: 0; background: transparent; padding: 8px 14px; font-size: 12px; font-weight: 600; color: var(--brown); cursor: pointer; font-family: inherit; }
.filter-btn.active { background: var(--burgundy); color: var(--ivory); }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { background: rgba(232, 216, 193, 0.5); text-align: left; padding: 12px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-field label { font-size: 12px; font-weight: 600; color: var(--brown); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--border);
  background: rgba(247, 243, 237, 0.65);
  color: var(--brown);
  border-radius: 2px;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--burgundy);
}
.alert { padding: 13px 16px; font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: #ecfdf5; border-color: #047857; color: #065f46; }
.alert-error { background: rgba(122, 32, 37, 0.08); border-color: var(--burgundy); color: var(--burgundy); }

/* Calendar & Category Colour Chips (institutional muted earthy tones) */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--border); border-top: 1px solid var(--border); background: var(--white); }
.cal-head { background: rgba(232, 216, 193, 0.5); padding: 10px; text-align: center; font-size: 12px; font-weight: 700; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-cell { min-height: 102px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-cell.empty { background: rgba(247, 243, 237, 0.6); }
.cal-event-chip { display: block; width: 100%; margin-top: 4px; padding: 3px 6px; border: 0; background: var(--burgundy); color: var(--ivory); font-size: 11px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-admissions { background: #7A2025 !important; color: #F7F3ED !important; }
.cat-examinations { background: #3D2824 !important; color: #E8D8C1 !important; }
.cat-pta { background: #8A5A2B !important; color: #FFFFFF !important; }
.cat-holiday { background: #644C46 !important; color: #F7F3ED !important; }
.cat-graduation { background: #5C161A !important; color: #E8D8C1 !important; }
.cat-term { background: #4E3B36 !important; color: #F7F3ED !important; }
.cat-event { background: #964B32 !important; color: #FFFFFF !important; }
.cat-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; font-size: 12px; }
.cat-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.cat-swatch { width: 12px; height: 12px; display: inline-block; }

/* Modals */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(24, 14, 12, 0.88); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal-box { background: var(--ivory); border: 1px solid var(--border); max-width: 820px; width: 100%; max-height: 92vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border: 0; background: rgba(61, 40, 36, 0.9); color: var(--white); font-size: 22px; cursor: pointer; z-index: 3; }

/* Footer */
.site-footer { background: var(--brown-deep); color: var(--ivory); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; padding: 60px 20px; }
.footer-logo-row { display: flex; align-items: center; gap: 12px; }
.footer-school-name { font-family: 'Playfair Display', Georgia, serif; font-size: 1.2rem; font-weight: 700; }
.footer-desc { color: rgba(232, 216, 193, 0.82); font-size: 13.5px; margin-top: 14px; line-height: 1.7; }
.footer-socials { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; font-size: 12.5px; color: var(--cream); }
.footer-socials a:hover { color: var(--white); text-decoration: underline; }
.footer-col h4 { font-size: 1rem; color: var(--cream); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: rgba(247, 243, 237, 0.82); }
.footer-col a:hover { color: var(--cream); }
.footer-admin-link { color: var(--cream); font-weight: 600; }
.footer-bottom { background: #221512; border-top: 1px solid rgba(232, 216, 193, 0.15); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 18px 20px; font-size: 12px; color: rgba(232, 216, 193, 0.78); }
.footer-credit { color: var(--cream); font-weight: 600; }

/* Floating Chat Widget (Untouched Core Layout) */
.chat-launcher-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 50; }
.chat-launcher {
  display: flex; align-items: center; gap: 10px;
  background: var(--burgundy); color: var(--ivory);
  border: 1px solid rgba(232, 216, 193, 0.35);
  padding: 12px 18px; border-radius: 3px; cursor: pointer;
  box-shadow: 0 12px 30px rgba(34, 21, 18, 0.28);
  text-align: left; font-family: inherit;
}
.chat-launcher strong { display: block; font-size: 14px; }
.chat-launcher small { display: block; font-size: 11px; color: var(--cream); }
.chat-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.chat-status-dot.online { background: #10b981; }
.chat-status-dot.offline { background: #a8a29e; }

.chat-panel {
  width: 360px; max-width: calc(100vw - 32px);
  background: var(--ivory); border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(34, 21, 18, 0.35);
  margin-bottom: 10px; display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-panel-header { background: var(--brown); color: var(--ivory); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.chat-panel-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 15px; }
.chat-panel-presence { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--cream); margin-top: 2px; }
.chat-close-btn { background: transparent; border: 0; color: var(--ivory); font-size: 22px; cursor: pointer; line-height: 1; }
.chat-intake { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-intake-note { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.chat-intake label span { display: block; font-size: 11.5px; font-weight: 600; margin-bottom: 4px; }
.chat-intake input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); background: var(--white); font-size: 13px; }
.chat-error { background: rgba(122, 32, 37, 0.1); border: 1px solid var(--burgundy); color: var(--burgundy); padding: 8px 10px; font-size: 12px; }
.chat-resumed-bar { background: #ecfdf5; color: #065f46; border-bottom: 1px solid #a7f3d0; padding: 7px 12px; font-size: 11.5px; font-weight: 600; }
.chat-messages { height: 290px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--ivory); }
.chat-bubble { max-width: 85%; padding: 9px 12px; font-size: 13px; border-radius: 3px; }
.chat-bubble.visitor { align-self: flex-end; background: var(--burgundy); color: var(--ivory); }
.chat-bubble.admin { align-self: flex-start; background: var(--white); border: 1px solid var(--border); color: var(--brown); }
.chat-bubble.system { align-self: center; background: rgba(232, 216, 193, 0.65); color: var(--brown); font-size: 12px; text-align: center; }
.chat-meta { font-size: 10px; opacity: 0.75; margin-bottom: 3px; font-weight: 600; }
.chat-compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--white); }
.chat-compose input { flex: 1; padding: 9px 11px; border: 1px solid var(--border); font-size: 13px; }

/* Responsive */
@media (max-width: 1200px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .hide-lg { display: none; }
}
@media (max-width: 820px) {
  .topbar { display: none; }
  .split-12, .split-even, .grid-2, .grid-3, .grid-4, .form-grid, .timeline-row { grid-template-columns: 1fr; }
  .stat-box { border-right: 0; border-bottom: 1px solid rgba(232, 216, 193, 0.16); }
  .footer-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .cal-cell { min-height: 76px; padding: 4px; }
}
@media (max-width: 1024px) { .hide-md { display: none; } }
