/* ═══════════════════════════════════════════════════════════════
   THE ACADEMIC BOARD — style.css  FINAL
   Clean single file. Desktop sidebar layout + mobile drawer.
═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --gold:        #c8a24a;
  --gold-light:  #e2c06a;
  --gold-dim:    rgba(200,162,74,.12);
  --gold-line:   rgba(200,162,74,.25);
  --radius:      4px;
  --radius-lg:   8px;
  --sidebar-w:   220px;
  --tr:          0.3s ease;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-italic: 'Cormorant Garamond', 'Palatino Linotype', Georgia, serif;
  --font-sans:   'Montserrat', 'Segoe UI', Arial, sans-serif;
}

/* ── DARK THEME ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #0d1a12;
  --bg-2:        #101e15;
  --bg-panel:    rgba(16,30,21,.9);
  --bg-panel-h:  rgba(22,40,30,.95);
  --sidebar-bg:  #091310;
  --sb-hover:    rgba(200,162,74,.07);
  --sb-active:   rgba(200,162,74,.10);
  --border:      rgba(200,162,74,.15);
  --border-h:    rgba(200,162,74,.32);
  --text-1:      #e8e2d4;
  --text-2:      #b0a890;
  --text-3:      #5c564e;
  --text-sb:     #7a7060;
  --badge-bg:    rgba(80,140,60,.2);
  --badge-fg:    #8dcc70;
  --topbar-bg:   #091310;
}

/* ── LIGHT THEME ─────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:          #ede8da;
  --bg-2:        #e6e0d0;
  --bg-panel:    rgba(255,253,246,.95);
  --bg-panel-h:  rgba(255,255,255,1);
  --sidebar-bg:  #1a3020;
  --sb-hover:    rgba(200,162,74,.10);
  --sb-active:   rgba(200,162,74,.15);
  --border:      rgba(140,110,50,.18);
  --border-h:    rgba(140,110,50,.38);
  --text-1:      #1e2c20;
  --text-2:      #3a4c38;
  --text-3:      #7a8870;
  --text-sb:     #c8bca0;
  --badge-bg:    rgba(60,130,40,.15);
  --badge-fg:    #2a7a18;
  --topbar-bg:   #f0ebe0;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--tr), color var(--tr);
}
img { display: block; max-width: 100%; }

/* ── GRAIN (dark only) ──────────────────────────────────────── */
[data-theme="dark"] body::after {
  content: '';
  position: fixed; inset: 0; z-index: 900;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 180px;
  pointer-events: none;
  opacity: .5;
}

/* ════════════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR — fixed panel (desktop)
════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--tr), background var(--tr);
  flex-shrink: 0;
}

/* Logo block */
.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-crest {
  width: 44px; height: 44px;
  border-radius: 4px; overflow: hidden;
  flex-shrink: 0;
  background: transparent; border: none; padding: 0;
}
.sidebar-logo-img {
  width: 44px; height: 44px;
  object-fit: contain;
}
[data-theme="light"] .sidebar-logo-img { mix-blend-mode: multiply; }
.sidebar-brand { display: flex; flex-direction: column; gap: 2px; }
.sidebar-brand-main {
  font-size: 12px; font-weight: 700;
  color: var(--text-sb); letter-spacing: .03em;
}
.sidebar-brand-sub {
  font-size: 8px; font-weight: 600;
  letter-spacing: .20em; text-transform: uppercase;
  color: var(--gold); opacity: .75;
}

/* Nav */
.sidebar-nav {
  display: flex; flex-direction: column;
  padding: 12px 0;
  flex-shrink: 0;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px;
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 500; letter-spacing: .04em;
  color: var(--text-sb);
  text-decoration: none;
  background: none; border: none; cursor: pointer;
  width: 100%; text-align: left;
  border-left: 2px solid transparent;
  transition: all .2s;
}
.nav-item:hover  { background: var(--sb-hover); color: var(--gold); border-left-color: rgba(200,162,74,.4); }
.nav-item.active { background: var(--sb-active); color: var(--gold); border-left-color: var(--gold); }
.nav-svg { width: 14px; height: 14px; stroke: var(--gold); opacity: .5; flex-shrink: 0; transition: opacity .2s; }
.nav-item:hover .nav-svg,
.nav-item.active .nav-svg { opacity: 1; }
.nav-svg-ext { width: 10px; height: 10px; stroke: var(--text-3); margin-left: auto; flex-shrink: 0; opacity: .5; }
.nav-external { text-decoration: none; font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.sidebar-sep { height: 1px; background: var(--border); margin: 4px 20px; flex-shrink: 0; }

/* Quote */
.sidebar-quote {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-quote-mark { font-size: 26px; font-family: Georgia, serif; color: var(--gold); opacity: .3; display: block; margin-bottom: 4px; line-height: 1; }
.sidebar-quote-text { font-family: var(--font-italic); font-style: italic; font-size: 11px; color: var(--text-sb); line-height: 1.55; }
.sidebar-quote-author { font-size: 10px; font-weight: 500; letter-spacing: .08em; color: var(--gold); opacity: .55; margin-top: 6px; }

/* Building */
.sidebar-building {
  flex: 1; min-height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 90'%3E%3Cg fill='%23c8a24a' opacity='0.09'%3E%3Crect x='5' y='45' width='18' height='45'/%3E%3Crect x='27' y='33' width='18' height='57'/%3E%3Crect x='49' y='19' width='12' height='71'/%3E%3Crect x='65' y='28' width='18' height='62'/%3E%3Crect x='87' y='38' width='14' height='52'/%3E%3Crect x='105' y='42' width='16' height='48'/%3E%3C/g%3E%3C/svg%3E") bottom center / contain no-repeat;
}

/* Theme toggle */
.sidebar-theme { padding: 12px 20px 18px; flex-shrink: 0; }
.theme-toggle {
  display: flex; align-items: center; gap: 8px;
  background: var(--gold-dim); border: 1px solid var(--gold-line);
  border-radius: var(--radius); padding: 9px 14px;
  color: var(--gold); font-family: var(--font-sans);
  font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; width: 100%; transition: background .2s;
}
.theme-toggle:hover { background: rgba(200,162,74,.2); }
.theme-svg { width: 14px; height: 14px; stroke: var(--gold); flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════
   MAIN CONTENT
════════════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  width: calc(100% - var(--sidebar-w));
  background: var(--bg);
  transition: background var(--tr);
}

/* ════════════════════════════════════════════════════════════
   TOPBAR (desktop)
════════════════════════════════════════════════════════════ */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 28px 40px 24px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  transition: background var(--tr);
}
.topbar-center { text-align: center; }
.topbar-logo { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 6px; border-radius: 4px; }
[data-theme="light"] .topbar-logo { mix-blend-mode: multiply; }
.topbar-academy { font-size: 9px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; opacity: .85; }
.topbar-title { font-family: var(--font-serif); font-size: clamp(28px,3.5vw,48px); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-1); line-height: 1; }
.topbar-rule { display: flex; align-items: center; gap: 12px; margin: 10px auto 8px; max-width: 300px; }
.topbar-rule-line { flex: 1; height: 1px; background: var(--gold-line); }
.topbar-motto { font-size: 10px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--text-3); }
.topbar-clock-box { text-align: center; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 20px; min-width: 120px; background: var(--bg-panel); }
.topbar-date-row { font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); line-height: 1.7; }
.topbar-time { font-family: var(--font-serif); font-size: 32px; font-weight: 600; color: var(--text-1); letter-spacing: .04em; line-height: 1.1; }
.topbar-time-label { font-size: 8px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); opacity: .7; margin-top: 2px; }

/* ════════════════════════════════════════════════════════════
   MOBILE TOPBAR (hidden on desktop)
════════════════════════════════════════════════════════════ */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  transition: background var(--tr);
}
.mobile-logo-wrap { display: flex; align-items: center; gap: 10px; }
.mobile-logo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
[data-theme="light"] .mobile-logo-img { mix-blend-mode: multiply; }
.mobile-brand { display: flex; flex-direction: column; gap: 1px; }
.mobile-brand-main { font-size: 13px; font-weight: 700; color: var(--text-1); letter-spacing: .01em; }
.mobile-brand-sub  { font-size: 8px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); opacity: .8; }
.mobile-topbar-right { display: flex; align-items: center; gap: 10px; }
.mobile-time { font-family: var(--font-serif); font-size: 18px; font-weight: 600; color: var(--text-1); }

/* Hamburger button */
.hamburger {
  width: 40px; height: 40px;
  background: var(--gold-dim); border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer; padding: 0; transition: background .2s;
}
.hamburger:hover { background: rgba(200,162,74,.2); }
.hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--gold); border-radius: 2px;
  transition: all .3s ease;
}
body.sidebar-open .hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.sidebar-open .hamburger span:nth-child(2) { opacity: 0; }
body.sidebar-open .hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════
   HERO AREA
════════════════════════════════════════════════════════════ */
.hero-area {
  display: grid;
  grid-template-columns: minmax(200px,1fr) 1.6fr auto minmax(140px,1fr);
  border-bottom: 1px solid var(--border);
  min-height: 280px;
  flex-shrink: 0;
}

/* Image */
.hero-image-panel { position: relative; overflow: hidden; border-right: 1px solid var(--border); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s; }
.hero-img-dark  { opacity: 1; }
.hero-img-light { opacity: 0; }
[data-theme="light"] .hero-img-dark  { opacity: 0; }
[data-theme="light"] .hero-img-light { opacity: 1; }
.hero-img-overlay { position: absolute; inset: 0; pointer-events: none; }
[data-theme="dark"]  .hero-img-overlay { background: linear-gradient(90deg, transparent 50%, rgba(9,19,16,.7) 100%); }
[data-theme="light"] .hero-img-overlay { background: linear-gradient(90deg, transparent 50%, rgba(237,232,218,.6) 100%); }

/* Tonight */
.hero-tonight-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 36px 36px;
  border-right: 1px solid var(--border);
}
.tonight-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; opacity: .9; }
.tonight-title { font-family: var(--font-serif); font-size: clamp(20px,2.5vw,36px); font-weight: 600; color: var(--text-1); line-height: 1.15; margin-bottom: 8px; }
.tonight-sub { font-family: var(--font-italic); font-style: italic; font-size: 16px; color: var(--text-2); margin-bottom: 28px; }
.btn-enter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; font-size: 10px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; border-radius: var(--radius);
  align-self: flex-start; cursor: pointer; transition: all .25s;
  border: 1px solid transparent;
}
[data-theme="dark"]  .btn-enter { background: var(--text-1); color: #091310; }
[data-theme="light"] .btn-enter { background: #1a3020; color: #f0ebe0; }
.btn-enter:hover { background: var(--gold); color: #091310; box-shadow: 0 6px 24px rgba(200,162,74,.3); transform: translateY(-1px); }

/* Countdown */
.hero-countdown-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px 24px; border-right: 1px solid var(--border);
  background: var(--bg-panel); min-width: 170px; gap: 4px;
}
.countdown-label { font-size: 9px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.countdown-digits { display: flex; align-items: flex-start; gap: 2px; }
.countdown-unit { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 40px; }
.countdown-unit span { font-family: var(--font-serif); font-size: clamp(24px,2.5vw,38px); font-weight: 700; color: var(--text-1); line-height: 1; }
.countdown-unit small { font-size: 8px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.countdown-sep { font-family: var(--font-serif); font-size: 28px; font-weight: 600; color: var(--gold); line-height: 1.05; padding-bottom: 12px; }

/* Lamp */
.hero-lamp-panel { position: relative; overflow: hidden; }
.lamp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: opacity .5s; }
.lamp-img-dark  { opacity: 1; }
.lamp-img-light { opacity: 0; }
[data-theme="light"] .lamp-img-dark  { opacity: 0; }
[data-theme="light"] .lamp-img-light { opacity: 1; }

/* ════════════════════════════════════════════════════════════
   FOUR PANELS ROW
════════════════════════════════════════════════════════════ */
.panels-row {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.panel { display: flex; flex-direction: column; border-right: 1px solid var(--border); min-height: 320px; }
.panel:last-child { border-right: none; }

.panel-header { display: flex; align-items: center; gap: 9px; padding: 16px 20px 13px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.ph-icon { width: 14px; height: 14px; stroke: var(--gold); opacity: .6; flex-shrink: 0; }
.panel-title { font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); }

.panel-body { flex: 1; }
.panel-footer { padding: 12px 20px; border-top: 1px solid var(--border); flex-shrink: 0; }
.panel-link {
  background: none; border: none; padding: 0;
  font-family: var(--font-sans); font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); opacity: .75; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
  transition: opacity .2s, gap .2s;
}
.panel-link:hover { opacity: 1; gap: 9px; }

.panel-loading { display: flex; align-items: center; justify-content: center; padding: 40px; }
.spin { width: 20px; height: 20px; border: 1.5px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.panel-empty { padding: 28px 20px; font-size: 12px; font-style: italic; color: var(--text-3); font-family: var(--font-italic); }

/* ── SESSION ITEMS ─────────────────────────────────────────── */
.session-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background .2s; }
.session-item:last-child { border-bottom: none; }
.session-item:hover { background: var(--bg-panel-h); }
.session-icon-wrap { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; background: var(--bg-panel); }
.session-icon-wrap svg { width: 14px; height: 14px; stroke: var(--gold); opacity: .65; }
.session-info { flex: 1; min-width: 0; }
.session-title { font-family: var(--font-serif); font-size: 13px; font-weight: 600; color: var(--text-1); line-height: 1.25; margin-bottom: 2px; }
.session-time, .session-location { font-size: 10px; color: var(--text-3); line-height: 1.5; }
.session-badge { font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; flex-shrink: 0; align-self: flex-start; margin-top: 1px; background: var(--badge-bg); color: var(--badge-fg); }
.session-badge.upcoming { background: rgba(100,140,200,.12); color: #7aa0c8; }
.session-badge.closed   { background: rgba(90,90,80,.1); color: var(--text-3); }

/* ── WEEK ITEMS ────────────────────────────────────────────── */
.week-item { display: grid; grid-template-columns: 52px 1fr; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background .2s; }
.week-item:last-child { border-bottom: none; }
.week-item:hover { background: var(--bg-panel-h); }
.week-item.is-today { border-left: 2px solid var(--gold); padding-left: 18px; }
.week-day-col { padding-right: 6px; }
.week-day-name { font-size: 9px; font-weight: 700; letter-spacing: .10em; text-transform: uppercase; color: var(--gold); line-height: 1.4; }
.week-day-date { font-size: 9px; color: var(--text-3); }
.week-session-name { font-family: var(--font-serif); font-size: 13px; font-weight: 500; color: var(--text-1); line-height: 1.25; margin-bottom: 1px; }
.week-session-time  { font-size: 10px; color: var(--text-3); }

/* ── NOTICE ITEMS ──────────────────────────────────────────── */
.notice-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background .2s; }
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: var(--bg-panel-h); }
.notice-icon-wrap { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.notice-icon-wrap svg { width: 12px; height: 12px; stroke: var(--gold); opacity: .55; }
.notice-text { font-family: var(--font-italic); font-size: 12px; font-style: italic; color: var(--text-1); line-height: 1.55; margin-bottom: 3px; }
.notice-meta { font-size: 9px; color: var(--text-3); }

/* ── ARCHIVE ITEM (panel) ──────────────────────────────────── */
.archive-item { display: flex; flex-direction: column; }
.archive-img-placeholder { width: 100%; height: 110px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; }
.archive-img-placeholder svg { width: 32px; height: 32px; stroke: var(--gold); opacity: .2; }
.archive-content { padding: 14px 20px; }
.archive-badge { font-size: 8px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); opacity: .8; margin-bottom: 6px; display: block; }
.archive-title { font-family: var(--font-serif); font-size: 15px; font-weight: 600; color: var(--text-1); line-height: 1.3; margin-bottom: 4px; }
.archive-sub   { font-size: 11px; color: var(--text-2); line-height: 1.5; }

/* ════════════════════════════════════════════════════════════
   VIEWS
════════════════════════════════════════════════════════════ */
.view { display: none; flex-direction: column; flex: 1; }
.view.active { display: flex; }

.view-header { display: flex; align-items: center; gap: 18px; padding: 32px 40px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.view-hdr-icon { width: 32px; height: 32px; stroke: var(--gold); opacity: .5; flex-shrink: 0; }
.view-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); opacity: .8; margin-bottom: 4px; }
.view-title { font-family: var(--font-serif); font-size: 30px; font-weight: 600; color: var(--text-1); }
.view-body { flex: 1; overflow-y: auto; }

/* Session full cards */
.session-card-full { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 18px 40px; border-bottom: 1px solid var(--border); transition: background .2s; }
.session-card-full:hover { background: var(--bg-panel-h); }
.session-card-full.status-active { border-left: 2px solid var(--gold); padding-left: 38px; }
.scf-icon { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--bg-panel); flex-shrink: 0; }
.scf-icon svg { width: 16px; height: 16px; stroke: var(--gold); opacity: .65; }
.scf-title { font-family: var(--font-serif); font-size: 17px; font-weight: 600; color: var(--text-1); margin-bottom: 3px; }
.scf-meta  { font-size: 11px; color: var(--text-3); }
.scf-right { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.scf-badge { font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 3px 9px; border-radius: 2px; background: var(--badge-bg); color: var(--badge-fg); white-space: nowrap; }
.scf-badge.upcoming { background: rgba(100,140,200,.12); color: #7aa0c8; }
.scf-badge.closed   { background: rgba(90,90,80,.10); color: var(--text-3); }
.scf-link { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); opacity: .75; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; transition: opacity .2s, gap .2s; white-space: nowrap; }
.scf-link:hover { opacity: 1; gap: 9px; }

/* Archive grid */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 1px; background: var(--border); }
.archive-card-full { background: var(--bg); padding: 24px; display: flex; flex-direction: column; gap: 8px; transition: background .2s; }
.archive-card-full:hover { background: var(--bg-panel-h); }
.archive-card-full .archive-badge { font-size: 8px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); opacity: .8; }
.archive-card-full .archive-title { font-family: var(--font-serif); font-size: 17px; font-weight: 600; color: var(--text-1); line-height: 1.3; }
.archive-card-full .archive-desc  { font-size: 12px; color: var(--text-2); line-height: 1.6; flex: 1; }
.archive-card-full .archive-cta   { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); opacity: .75; text-decoration: none; margin-top: 4px; transition: opacity .2s, gap .2s; }
.archive-card-full .archive-cta:hover { opacity: 1; gap: 10px; }

/* Resource cards */
.resource-links { display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; }
.resource-card { display: flex; align-items: center; gap: 18px; padding: 22px 40px; text-decoration: none; border-bottom: 1px solid var(--border); transition: background .2s; }
.resource-card:hover { background: var(--bg-panel-h); }
.resource-icon { width: 28px; height: 28px; stroke: var(--gold); opacity: .6; flex-shrink: 0; }
.resource-title { font-family: var(--font-serif); font-size: 16px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.resource-sub   { font-size: 11px; color: var(--text-2); }
.resource-arrow { width: 18px; height: 18px; stroke: var(--gold); opacity: .35; margin-left: auto; flex-shrink: 0; transition: opacity .2s, transform .2s; }
.resource-card:hover .resource-arrow { opacity: .8; transform: translateX(4px); }

/* ════════════════════════════════════════════════════════════
   BOTTOM NAV (mobile only — hidden on desktop)
════════════════════════════════════════════════════════════ */
.mobile-bottom-nav { display: none; }

/* ════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════ */
.board-footer { padding: 32px 40px; text-align: center; border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: auto; }
.footer-motto { font-family: var(--font-italic); font-size: 17px; font-style: italic; color: var(--text-2); }
.footer-rule { display: flex; align-items: center; gap: 12px; width: 200px; }
.footer-rule span:not(.footer-rule-dot) { flex: 1; height: 1px; background: var(--gold-line); }
.footer-copy { font-size: 10px; color: var(--text-3); letter-spacing: .08em; }

/* ════════════════════════════════════════════════════════════
   CALENDAR OVERLAY
════════════════════════════════════════════════════════════ */
.cal-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.75); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.cal-overlay.open { opacity: 1; pointer-events: all; }
.cal-modal { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); width: min(720px,94vw); max-height: 90vh; overflow-y: auto; padding: 36px; box-shadow: 0 40px 100px rgba(0,0,0,.5); transform: translateY(20px) scale(.98); transition: transform .3s; }
.cal-overlay.open .cal-modal { transform: translateY(0) scale(1); }
.cal-modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.cal-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.cal-title { font-family: var(--font-serif); font-size: 30px; font-weight: 600; color: var(--text-1); }
.cal-header-controls { display: flex; gap: 7px; align-items: center; }
.cal-nav { width: 36px; height: 36px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); color: var(--gold); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.cal-nav:hover { background: var(--gold-dim); border-color: var(--gold-line); }
.cal-close { width: 36px; height: 36px; background: transparent; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-3); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.cal-close:hover { border-color: var(--border-h); color: var(--text-1); }
.cal-grid-head { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; margin-bottom: 5px; }
.cal-grid-head span { text-align: center; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 5px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--bg-panel); border: 1px solid transparent; cursor: default; gap: 3px; transition: all .15s; }
.cal-day.other-month { opacity: .2; }
.cal-day.today { border-color: var(--gold-line); color: var(--gold); font-weight: 700; }
.cal-day.has-event { cursor: pointer; }
.cal-day.has-event:hover { background: var(--bg-panel-h); border-color: var(--border-h); }
.cal-day-dots { display: flex; gap: 3px; }
.cal-dot { width: 4px; height: 4px; border-radius: 50%; }
.cal-dot.active   { background: var(--gold); }
.cal-dot.upcoming { background: #7aa0c8; }
.cal-dot.closed   { background: var(--text-3); opacity: .4; }
.cal-legend { display: flex; gap: 18px; margin-top: 18px; justify-content: flex-end; }
.cal-legend-item { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; letter-spacing: .10em; text-transform: uppercase; color: var(--text-3); }
.cal-legend-item::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.cal-legend-item.active::before   { background: var(--gold); }
.cal-legend-item.upcoming::before { background: #7aa0c8; }
.cal-legend-item.closed::before   { background: var(--text-3); opacity: .4; }

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-line); }
::selection { background: rgba(200,162,74,.2); color: var(--text-1); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — tablet
════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .panels-row { grid-template-columns: repeat(2,1fr); }
  .panel:nth-child(2) { border-right: none; }
  .panel:nth-child(3) { border-top: 1px solid var(--border); }
  .panel:nth-child(4) { border-right: none; border-top: 1px solid var(--border); }
  .hero-area { grid-template-columns: 220px 1fr auto; }
  .hero-lamp-panel { display: none; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE — ≤ 768px
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Sidebar: hidden off-screen, slides in as drawer */
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
    width: min(280px, 85vw);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-overlay { display: block; opacity: 1; pointer-events: all; }

  /* Main content: full width */
  .main-content {
    margin-left: 0;
    width: 100%;
    padding-bottom: 68px; /* space for bottom nav */
  }

  /* Hide desktop topbar, show mobile topbar */
  .topbar { display: none; }
  .mobile-topbar { display: flex; }

  /* Show bottom nav */
  .mobile-bottom-nav {
    display: block;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--sidebar-bg);
    border-top: 1px solid var(--border);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  .mobile-nav-btn {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; cursor: pointer;
    padding: 4px 10px; color: var(--text-3);
    font-family: var(--font-sans); font-size: 9px; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase;
    text-decoration: none; transition: color .2s;
  }
  .mobile-nav-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; }
  .mobile-nav-btn.active { color: var(--gold); }

  /* Hero: vertical stack */
  .hero-area {
    display: flex;
    flex-direction: column;
  }
  .hero-image-panel {
    width: 100%; height: 180px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
  }
  .hero-img-overlay {
    background: linear-gradient(180deg, transparent 40%, var(--bg) 100%) !important;
  }
  .hero-tonight-panel {
    padding: 20px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .tonight-title { font-size: 22px; }
  .tonight-sub   { font-size: 14px; margin-bottom: 18px; }

  .hero-countdown-panel {
    flex-direction: row; flex-wrap: wrap;
    justify-content: flex-start; align-items: center;
    gap: 10px; padding: 14px 16px;
    min-width: 0; border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .countdown-label { margin-bottom: 0; }
  .countdown-unit span { font-size: 22px; }
  .countdown-sep { font-size: 18px; padding-bottom: 6px; }
  .hero-lamp-panel { display: none; }

  /* Panels: one column */
  .panels-row {
    display: flex;
    flex-direction: column;
  }
  .panel {
    border-right: none;
    border-top: 1px solid var(--border);
    min-height: auto;
  }
  .panel:first-child { border-top: none; }

  /* View pages */
  .view-header { padding: 20px 16px 16px; gap: 12px; }
  .view-title  { font-size: 24px; }
  .view-hdr-icon { width: 26px; height: 26px; }

  /* Sessions full */
  .session-card-full { grid-template-columns: auto 1fr; padding: 14px 16px; gap: 12px; }
  .session-card-full.status-active { padding-left: 14px; }
  .scf-right { display: none; }

  /* Archive */
  .archive-grid { grid-template-columns: 1fr; }
  .archive-card-full { padding: 20px 16px; }

  /* Resources */
  .resource-card  { padding: 16px; gap: 12px; }
  .resource-links { max-width: 100%; padding: 0; }

  /* Panel padding */
  .session-item, .notice-item, .week-item { padding-left: 16px; padding-right: 16px; }
  .panel-header, .panel-footer { padding-left: 16px; padding-right: 16px; }

  /* Calendar */
  .cal-overlay { align-items: flex-end; }
  .cal-modal {
    width: 100%; max-width: 100vw; border-radius: 12px 12px 0 0;
    padding: 24px 16px; max-height: 90dvh; margin: 0;
    border-left: none; border-right: none; border-bottom: none;
  }
  .cal-title { font-size: 24px; }
  .cal-day   { font-size: 11px; }

  /* Footer */
  .board-footer { padding: 24px 16px; }
}

@media (max-width: 380px) {
  .mobile-brand-main { font-size: 11px; }
  .mobile-nav-btn { padding: 4px 6px; font-size: 8px; }
  .tonight-title  { font-size: 18px; }
}
