@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Nunito:wght@400;600;700;800&display=swap');

/* ========================================
   Win98 Dreamcore — Design Tokens
   ======================================== */
:root {
  /* lavender palette */
  --lav-0:   #f7f3ff;   /* near-white */
  --lav-1:   #ede5ff;   /* page bg */
  --lav-2:   #ddd0f8;   /* card bg */
  --lav-3:   #c4aff0;   /* mid */
  --lav-4:   #a888e0;   /* border dark */
  --lav-5:   #7c5aad;   /* deep purple */
  --lav-6:   #3d2466;   /* text primary */
  /* win98 inset/outset */
  --w-light: #f4f0ff;
  --w-dark:  #4a2878;
  --w-black: #000;
  /* accents */
  --pink:    #f0a0c8;
  --pink-d:  #d46a9a;
  --blue:    #90b8f0;
  --yellow:  #f0d870;
  --red:     #f87171;
  --orange:  #fb923c;
  /* titlebar gradient */
  --tb-from: #9b7fd4;
  --tb-to:   #c4a8e8;
  /* text */
  --text:    #3d2466;
  --text-2:  #7c5aad;
  /* font */
  --pixel:   'Press Start 2P', monospace;
  --body:    'Nunito', Arial, sans-serif;
}

/* ========================================
   Reset / Base
   ======================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background-color: var(--lav-1);
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(240,160,200,0.22) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 15%, rgba(144,184,240,0.18) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 85%, rgba(168,136,224,0.15) 0%, transparent 50%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* subtle pixel grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(168,136,224,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,136,224,0.06) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
  z-index: 0;
}

/* sparkle dots */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at  7%  5%, rgba(168,136,224,0.6) 0%, transparent 100%),
    radial-gradient(2px 2px at 22% 12%, rgba(240,160,200,0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 38%  3%, rgba(144,184,240,0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 55%  9%, rgba(168,136,224,0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 70%  4%, rgba(240,160,200,0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 85%  8%, rgba(144,184,240,0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 93% 15%, rgba(168,136,224,0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 12% 30%, rgba(240,160,200,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 80% 28%, rgba(144,184,240,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 45% 55%, rgba(240,216,112,0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 28% 70%, rgba(168,136,224,0.25) 0%, transparent 100%),
    radial-gradient(2px 2px at 65% 75%, rgba(240,160,200,0.25) 0%, transparent 100%),
    radial-gradient(2px 2px at 88% 65%, rgba(144,184,240,0.2) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ========================================
   Win98 Window Mixin (reusable classes)
   ======================================== */

/* outer raised border */
.win98 {
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  box-shadow: 1px 1px 0 var(--w-black);
  background: var(--lav-2);
  position: relative;
  z-index: 1;
}

/* inset sunken (for inputs, content wells) */
.win98-inset {
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
}

/* title bar */
.win98-titlebar {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  padding: 5px 6px 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.win98-titlebar-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.win98-titlebar-text {
  font-family: var(--pixel);
  font-size: 13px;
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win98-titlebar-btns {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.win98-titlebar-btn {
  width: 16px; height: 14px;
  background: var(--lav-3);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.win98-titlebar-btn:active {
  border-top:    1px solid var(--w-dark);
  border-left:   1px solid var(--w-dark);
  border-right:  1px solid var(--w-light);
  border-bottom: 1px solid var(--w-light);
}

/* menu bar */
.win98-menubar {
  background: var(--lav-2);
  border-bottom: 1px solid var(--lav-4);
  padding: 2px 4px;
  display: flex;
  gap: 2px;
}

.win98-menubar-item {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--text);
  padding: 3px 8px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0;
}

.win98-menubar-item:hover {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff;
  border-color: transparent;
}

/* content area inside a window */
.win98-body {
  padding: 12px;
  background: var(--lav-2);
}

/* Win98 button */
.win98-btn {
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--text);
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  padding: 6px 16px;
  cursor: pointer;
  min-width: 75px;
  text-align: center;
  transition: filter 0.1s;
  white-space: nowrap;
}

.win98-btn:active,
.win98-btn.pressed {
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
  padding: 7px 15px 5px 17px;
}

.win98-btn:hover { filter: brightness(1.06); }

/* primary / accent button */
.win98-btn-primary {
  background: linear-gradient(135deg, var(--tb-from), var(--tb-to));
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

/* ========================================
   Navigation (Win98 menubar style)
   ======================================== */
nav {
  background: var(--lav-2);
  border-bottom: 2px solid var(--w-dark);
  border-top:    2px solid var(--w-light);
  box-shadow: 0 3px 0 #000;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 13px;
  line-height: 1;
  padding: 10px 16px;
  border: 1px solid transparent;
  transition: background 0.1s, color 0.1s;
  white-space: nowrap;
}

nav a:hover,
nav a.nav-active {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  border-color: var(--w-dark);
}

nav #loginNavBtn {
  margin-left: auto;
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
}

nav #loginNavBtn:hover {
  filter: brightness(1.08);
  transform: none;
}

/* ========================================
   Hero
   ======================================== */
.hero {
  height: 100vh;
  min-height: 100vh;
  background: linear-gradient(160deg, #f0e8ff 0%, #e8d8ff 40%, #dde8ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  position: relative;
  overflow: hidden;
}

/* pixel grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168,136,224,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,136,224,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero::after {
  content: '★  ✦  ♡  ✦  ★';
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  letter-spacing: 10px;
  color: var(--lav-4);
  opacity: 0.7;
}

.hero > * { position: relative; z-index: 2; }

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* wrap hero content in a win98 window */
.hero-window {
  background: var(--lav-2);
  border-top:    3px solid var(--w-light);
  border-left:   3px solid var(--w-light);
  border-right:  3px solid var(--w-dark);
  border-bottom: 3px solid var(--w-dark);
  box-shadow: 3px 3px 0 #000;
  max-width: 760px;
  width: 92vw;
  overflow: hidden;
}

.hero-window-body {
  padding: 40px 48px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-kicker {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(12px, 1vw, 14px);
  color: var(--text-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-logo {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(32px, 5vw, 56px);
  color: var(--lav-5);
  text-shadow: 2px 2px 0 var(--lav-4), 4px 4px 0 rgba(168,136,224,0.2);
  line-height: 1.4;
}

.hero-tagline {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(12px, 1vw, 15px);
  color: var(--text-2);
  line-height: 2;
}

/* ── About Section ── */
.about-wrap {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.about-badge {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff;
  font-family: var(--pixel);
  font-size: 16px;
  padding: 10px 24px;
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: none;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.about-card {
  width: 100%;
  background: var(--lav-2);
  border-top:    0;
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  box-shadow: 2px 2px 0 rgba(61,36,102,0.15);
  padding: 36px 40px 28px;
  box-sizing: border-box;
}

.about-divider {
  text-align: center;
  color: var(--lav-4);
  font-size: 18px;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
}

.about-divider:last-child { margin: 16px 0 0; }

.about-text {
  text-align: center;
  font-size: 20px;
  line-height: 2;
  color: var(--text-2);
  margin: 0;
}

/* ========================================
   Content Sections
   ======================================== */
.section {
  padding: 0;
  max-width: 980px;
  margin: 24px auto;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  box-shadow: 3px 3px 0 #000;
}

.section > h2:first-child {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  font-family: var(--pixel);
  font-size: 15px;
  color: #fff;
  margin: 0;
  padding: 8px 12px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.section > *:not(h2:first-child) {
  padding: 16px 20px;
}

/* ========================================
   Members Grid (index)
   ======================================== */
.members-section {
  max-width: 1000px;
  margin: 32px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 1;
}

.members-badge {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff;
  font-family: var(--pixel);
  font-size: 15px;
  padding: 8px 22px;
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: none;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  align-self: flex-start;
}

.members {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  width: 100%;
  background: var(--lav-2);
  border-top:    0;
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  box-shadow: 3px 3px 0 #000;
  padding: 20px;
}

.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--lav-1);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  padding: 16px 12px 12px;
  width: 130px;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.1s;
}

.member:hover { filter: brightness(1.04); }
.member:active {
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
}

.member img {
  width: 80px; height: 80px;
  object-fit: contain;
  image-rendering: pixelated;
}

.member h3 {
  margin: 0;
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.04em;
  text-align: center;
}

/* ========================================
   Upcoming Event Section (index)
   ======================================== */
.upcoming-event-section {
  max-width: 1000px;
  margin: 32px auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.upcoming-event-label {
  font-family: var(--pixel);
  font-size: 15px;
  color: #fff;
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  display: inline-block;
  padding: 7px 16px;
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: none;
  margin-bottom: 0;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

#nextPerformance {
  background: var(--lav-2);
  border-top:    0;
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  box-shadow: 3px 3px 0 #000;
  padding: 20px 24px 24px;
}

.ue-badge {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 12px;
  padding: 3px 9px;
  background: var(--lav-3);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  color: var(--text);
  margin-bottom: 10px;
}

.ue-title {
  font-family: var(--pixel);
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.7;
}

.ue-title-link { color: inherit; text-decoration: none; }
.ue-title-link:hover { color: var(--lav-5); text-decoration: underline; }

.ue-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 18px; color: var(--text-2); margin-bottom: 10px; }
.ue-desc { font-size: 18px; color: var(--text-2); line-height: 1.8; margin: 0 0 14px; }

.ue-poster {
  max-width: 280px; width: 100%;
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  display: block; margin-bottom: 16px;
}

.ue-countdown { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.ue-cd-box {
  background: var(--lav-1);
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
  padding: 8px 12px; text-align: center; min-width: 58px;
}

.ue-cd-box span {
  display: block;
  font-family: var(--pixel);
  font-size: 26px;
  color: var(--lav-5);
  line-height: 1; margin-bottom: 4px;
}

.ue-cd-box label {
  font-family: var(--pixel);
  font-size: 11px;
  color: var(--text-2);
  text-transform: uppercase;
}

.ue-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.ue-btn-primary {
  font-family: var(--pixel); font-size: 13px; padding: 8px 16px;
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff; text-decoration: none; text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  border-top: 2px solid var(--w-light); border-left: 2px solid var(--w-light);
  border-right: 2px solid var(--w-dark); border-bottom: 2px solid var(--w-dark);
  display: inline-block; transition: filter 0.1s;
}
.ue-btn-primary:hover { filter: brightness(1.07); }

.ue-btn-secondary {
  font-family: var(--pixel); font-size: 13px; padding: 8px 16px;
  background: var(--lav-2); color: var(--text); text-decoration: none;
  border-top: 2px solid var(--w-light); border-left: 2px solid var(--w-light);
  border-right: 2px solid var(--w-dark); border-bottom: 2px solid var(--w-dark);
  display: inline-block; transition: filter 0.1s;
}
.ue-btn-secondary:hover { filter: brightness(1.05); }

/* ========================================
   Footer
   ======================================== */
footer {
  text-align: center;
  padding: 14px 20px;
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--text-2);
  line-height: 2.2;
  letter-spacing: 0.04em;
  background: var(--lav-2);
  border-top: 2px solid var(--w-dark);
  box-shadow: 0 -3px 0 #000;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

footer a { color: var(--lav-5); text-decoration: none; }
footer a:hover { color: var(--pink-d); text-decoration: underline; }
footer span { color: var(--lav-3); margin: 0 6px; }

/* ========================================
   Events / Calendar
   ======================================== */
.calendar-container,
.events-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.calendar-container h1,
.events-container h1,
.page-title {
  font-family: var(--pixel);
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text);
  margin: 0 0 20px;
  letter-spacing: 0.04em;
}

.view-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.view-toggle button {
  font-family: var(--pixel);
  font-size: 13px;
  padding: 6px 12px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  color: var(--text);
  cursor: pointer;
}

.view-toggle button.active,
.view-toggle button:hover {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff;
}

.event-list { display: flex; flex-direction: column; gap: 10px; }

.event-card {
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  padding: 14px 18px;
  cursor: pointer;
  transition: filter 0.1s;
}

.event-card:hover { filter: brightness(1.04); }

.event-card-title {
  font-family: var(--pixel);
  font-size: 15px;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.6;
}

.event-card-date,
.event-card-meta {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.6;
}

.event-card-badge {
  font-family: var(--pixel);
  font-size: 12px;
  padding: 3px 8px;
  background: var(--lav-3);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  color: var(--text);
  white-space: nowrap;
  display: inline-block;
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-header {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  padding: 6px 2px;
}

.cal-day {
  background: var(--lav-2);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  min-height: 64px;
  padding: 4px;
  cursor: pointer;
  transition: filter 0.1s;
}

.cal-day:hover { filter: brightness(1.05); }
.cal-day.has-event { background: var(--lav-1); }
.cal-day.today { background: #fff0f8; }
.cal-day.other-month { opacity: 0.45; }

.cal-day-num {
  font-family: var(--pixel);
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 3px;
}

.cal-event-dot {
  width: 6px; height: 6px;
  background: var(--pink-d);
  margin: 2px 0;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.calendar-nav button {
  font-family: var(--pixel);
  font-size: 14px;
  padding: 6px 12px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  color: var(--text);
  cursor: pointer;
}

.calendar-nav button:active {
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
}

.calendar-nav h2 {
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--text);
  margin: 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61,36,102,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--lav-2);
  border-top:    3px solid var(--w-light);
  border-left:   3px solid var(--w-light);
  border-right:  3px solid var(--w-dark);
  border-bottom: 3px solid var(--w-dark);
  box-shadow: 4px 4px 0 #000;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-box h2 {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  font-family: var(--pixel);
  font-size: 15px;
  color: #fff;
  margin: 0;
  padding: 7px 10px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.modal-box-body { padding: 20px; }

.modal-close {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--lav-3);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  color: var(--text);
  font-family: var(--pixel);
  font-size: 13px;
  width: 18px; height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ========================================
   Gallery
   ======================================== */
.gallery-container {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  position: relative;
  z-index: 1;
}

.gallery-container h1 {
  font-family: var(--pixel);
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text);
  margin: 0 0 20px;
}

.gallery-grid { columns: 3 260px; column-gap: 10px; }

.gallery-item {
  break-inside: avoid;
  margin-bottom: 10px;
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.1s;
  position: relative;
}

.gallery-item:hover { filter: brightness(1.05); }
.gallery-item img { width: 100%; display: block; }

.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(61,36,102,0.88);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gallery-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-top:    3px solid var(--w-light);
  border-left:   3px solid var(--w-light);
  border-right:  3px solid var(--w-dark);
  border-bottom: 3px solid var(--w-dark);
}

/* ========================================
   Members Page
   ======================================== */
.members-page-container,
.members-container {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.members-page-container h1,
.members-list h2 {
  font-family: var(--pixel);
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text);
  margin: 0 0 24px;
}

.member-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 28px;
}

/* detail panel */
.member-detail {
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  padding: 20px;
}

.detail-content > p {
  font-size: 18px;
  color: var(--text-2);
}

#memberGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 28px;
}

.member-card {
  background: var(--lav-1);
  border-top:    3px solid var(--w-light);
  border-left:   3px solid var(--w-light);
  border-right:  3px solid var(--w-dark);
  border-bottom: 3px solid var(--w-dark);
  box-shadow: 3px 3px 0 #000;
  padding: 16px 12px 14px;
  width: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: filter 0.1s;
  position: relative;
}

.member-card:hover { filter: brightness(1.04); }

.member-card:active {
  border-top:    3px solid var(--w-dark);
  border-left:   3px solid var(--w-dark);
  border-right:  3px solid var(--w-light);
  border-bottom: 3px solid var(--w-light);
}

.member-card img {
  width: 96px; height: 96px;
  object-fit: contain;
  image-rendering: pixelated;
}

.member-card h3 {
  margin: 0;
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.04em;
  text-align: center;
}

.member-card-level {
  position: absolute;
  top: 6px; right: 7px;
  font-family: var(--pixel);
  font-size: 11px;
  color: var(--text-2);
}

.member-card-trainee-badge {
  font-family: var(--pixel);
  font-size: 11px;
  color: #fff;
  background: var(--lav-4);
  padding: 2px 6px;
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
}

/* detail view */
.back-btn {
  font-family: var(--pixel);
  font-size: 13px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  color: var(--text);
  padding: 7px 14px;
  cursor: pointer;
  margin-bottom: 16px;
}

.back-btn:active {
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
}

.detail-header {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.detail-image {
  width: 130px; height: 130px;
  object-fit: contain;
  image-rendering: pixelated;
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  background: var(--lav-1);
  flex-shrink: 0;
}

.detail-info { flex: 1; min-width: 180px; }

.detail-info h2 {
  font-family: var(--pixel);
  font-size: 20px;
  margin: 0 0 10px;
  color: var(--lav-5);
  text-shadow: 1px 1px 0 var(--lav-3);
}

.member-color-swatch { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.swatch-dot { width: 12px; height: 12px; border: 2px solid var(--w-dark); flex-shrink: 0; }
.swatch-label { font-family: var(--pixel); font-size: 12px; color: var(--text-2); }

.detail-stat p { font-size: 18px; color: var(--text-2); margin: 0 0 5px; line-height: 1.6; }
.detail-stat strong { color: var(--text); }

.detail-level {
  font-family: var(--pixel);
  font-size: 13px;
  color: var(--text-2);
  align-self: flex-start;
  padding: 5px 9px;
  background: var(--lav-2);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
}

.detail-action-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--pixel);
  font-size: 12px;
  padding: 6px 10px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  color: var(--text);
  text-decoration: none;
  transition: filter 0.1s;
}

.social-link:hover { filter: brightness(1.06); }

.birthday-countdown {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--pink-d);
  background: var(--lav-1);
  padding: 2px 6px;
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  margin-left: 5px;
}

/* ── Fan Message Board ── */
.msg-board {
  margin-top: 20px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
  padding: 14px;
}

.msg-board-title {
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--lav-5);
  margin-bottom: 12px;
}

.msg-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

.msg-form textarea {
  background: var(--lav-0);
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  padding: 8px 10px;
  resize: vertical;
  min-height: 68px;
}

.msg-form textarea:focus { outline: none; border-color: var(--lav-5); }

.msg-submit {
  font-family: var(--pixel);
  font-size: 13px;
  padding: 8px 16px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  color: var(--text);
  cursor: pointer;
  align-self: flex-end;
}

.msg-submit:hover { background: var(--lav-3); }

.msg-item {
  background: var(--lav-1);
  border-top:    1px solid var(--w-dark);
  border-left:   1px solid var(--w-dark);
  border-right:  1px solid var(--w-light);
  border-bottom: 1px solid var(--w-light);
  padding: 10px 12px;
  margin-bottom: 6px;
  position: relative;
}

.msg-author { font-family: var(--pixel); font-size: 12px; color: var(--pink-d); margin-bottom: 5px; }
.msg-content { font-size: 18px; color: var(--text-2); line-height: 1.6; }
.msg-time { font-size: 15px; color: var(--lav-3); margin-top: 3px; }

.msg-delete {
  position: absolute;
  top: 6px; right: 6px;
  background: var(--lav-2);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  color: var(--red);
  font-size: 15px;
  padding: 1px 5px;
  cursor: pointer;
}

.msg-loading { color: var(--text-2); font-size: 17px; padding: 10px 0; }
.msg-empty   { color: var(--text-2); font-size: 17px; opacity: 0.6; }
.msg-login-hint { font-size: 18px; color: var(--text-2); }
.msg-login-hint a { color: var(--lav-5); text-decoration: none; }

/* ── Member gallery ── */
.member-gallery-section { margin-top: 20px; }
.member-gallery-title { font-family: var(--pixel); font-size: 14px; color: var(--lav-5); margin-bottom: 10px; }

.member-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }

.member-gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  cursor: pointer;
}

/* ── Group board ── */
.group-board-section {
  margin-top: 24px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  padding: 14px;
}

.group-board-title { font-family: var(--pixel); font-size: 14px; color: var(--lav-5); margin-bottom: 12px; }

.group-board-wrap {
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  padding: 16px;
  margin-top: 28px;
}

.group-board-header { font-family: var(--pixel); font-size: 14px; color: var(--lav-5); margin-bottom: 12px; }

/* ========================================
   Videos Page
   ======================================== */
.videos-container {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  position: relative;
  z-index: 1;
}

.videos-container h1 {
  font-family: var(--pixel);
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text);
  margin: 0 0 20px;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 16px;
  justify-content: center;
}

.vw-card {
  background: var(--lav-2);
  border-top:    3px solid var(--w-light);
  border-left:   3px solid var(--w-light);
  border-right:  3px solid var(--w-dark);
  border-bottom: 3px solid var(--w-dark);
  box-shadow: 3px 3px 0 #000;
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.1s;
}

.vw-card:hover { filter: brightness(1.04); }

.vw-titlebar {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vw-titlebar-dots { display: flex; gap: 3px; }
.vw-titlebar-dots span { width: 10px; height: 10px; display: inline-block; border: 1px solid rgba(0,0,0,0.2); }
.vw-dot-red    { background: #f87171; }
.vw-dot-yellow { background: #fde68a; }
.vw-dot-green  { background: #86efac; }

.vw-titlebar-name {
  font-family: var(--pixel);
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.vw-preview { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--lav-1); }
.vw-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.vw-card:hover .vw-thumb-img { transform: scale(1.03); }

.vw-play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(61,36,102,0.3);
  transition: background 0.2s;
}

.vw-card:hover .vw-play-overlay { background: rgba(61,36,102,0.15); }

.vw-play-btn {
  width: 44px; height: 44px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

.vw-info { padding: 8px 10px 10px; }
.vw-title { font-family: var(--pixel); font-size: 12px; color: var(--text); line-height: 1.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* floating video modal */
.vw-window {
  position: fixed; inset: 0;
  background: rgba(61,36,102,0.7);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.vw-window.open { display: flex; }

.vw-modal-inner {
  background: var(--lav-2);
  border-top:    3px solid var(--w-light);
  border-left:   3px solid var(--w-light);
  border-right:  3px solid var(--w-dark);
  border-bottom: 3px solid var(--w-dark);
  box-shadow: 4px 4px 0 var(--w-black);
  width: min(720px, 95vw);
  overflow: hidden;
}

.vw-modal-titlebar {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vw-modal-title { font-family: var(--pixel); font-size: 13px; color: #fff; flex: 1; text-shadow: 1px 1px 0 rgba(0,0,0,0.2); }

.vw-modal-close {
  background: var(--lav-3);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  color: var(--text);
  font-family: var(--pixel);
  font-size: 13px;
  width: 18px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.vw-modal-embed { position: relative; width: 100%; aspect-ratio: 16/9; }
.vw-modal-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ========================================
   Contact Page
   ======================================== */
.contact-container {
  flex: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

.contact-container h1 {
  font-family: var(--pixel);
  font-size: 20px;
  color: var(--text);
  margin: 0 0 20px;
}

.contact-intro {
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  padding: 16px 20px;
  margin-bottom: 12px;
  text-align: center;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.8;
}

.contact-cards { display: flex; flex-direction: column; gap: 8px; }

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
  transition: filter 0.1s;
}

.contact-card:hover { filter: brightness(1.05); }

.contact-card-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.contact-card-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.contact-card-label { font-family: var(--pixel); font-size: 12px; color: var(--text-2); text-transform: uppercase; }
.contact-card-value { font-size: 20px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-card-arrow { color: var(--lav-4); font-size: 1rem; flex-shrink: 0; }

/* ========================================
   Portal / Auth
   ======================================== */
.portal-container {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  position: relative;
  z-index: 1;
}

.portal-title {
  font-family: var(--pixel);
  font-size: clamp(15px, 2vw, 18px);
  text-align: center;
  margin-bottom: 24px;
  color: var(--lav-5);
  letter-spacing: 0.04em;
}

/* auth window */
.auth-card {
  background: var(--lav-2);
  border-top:    3px solid var(--w-light);
  border-left:   3px solid var(--w-light);
  border-right:  3px solid var(--w-dark);
  border-bottom: 3px solid var(--w-dark);
  box-shadow: 4px 4px 0 #000;
  overflow: hidden;
}

.auth-card h2 {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  font-family: var(--pixel);
  font-size: 15px;
  color: #fff;
  margin: 0;
  padding: 8px 12px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.auth-card > *:not(h2) {
  padding: 20px 20px;
}

.auth-card > h2 + * {
  padding-top: 20px;
}

.portal-form { display: flex; flex-direction: column; gap: 12px; }

.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-group label {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--lav-0);
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
  color: var(--text);
  font-family: var(--body);
  font-size: 20px;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 1px dotted var(--lav-5);
  outline-offset: 1px;
}

.submit-btn {
  font-family: var(--pixel);
  font-size: 14px;
  padding: 12px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  color: var(--text);
  cursor: pointer;
  width: 100%;
  transition: filter 0.1s;
}

.submit-btn:hover { filter: brightness(1.05); background: var(--lav-3); }

.submit-btn:active {
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
  padding: 13px 11px 11px 13px;
}

.portal-link {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  margin-top: 12px;
  line-height: 2;
}

.portal-link a { color: var(--lav-5); text-decoration: none; }
.portal-link a:hover { text-decoration: underline; }

/* pw wrapper */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px; }
.pw-toggle {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  font-size: 18px;
  padding: 2px;
}

/* Google button */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: var(--lav-1);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  color: var(--text);
  font-family: var(--pixel);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: filter 0.1s;
}

.google-btn:hover { filter: brightness(1.05); }

/* or divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-family: var(--pixel);
  font-size: 12px;
  margin: 2px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--lav-3);
}

/* message boxes */
.msg-box,
.portal-msg {
  font-size: 17px;
  padding: 8px 12px;
  margin-top: 8px;
  display: none;
  line-height: 1.6;
  border-top:    1px solid var(--w-dark);
  border-left:   1px solid var(--w-dark);
  border-right:  1px solid var(--w-light);
  border-bottom: 1px solid var(--w-light);
}

.msg-box.error,   .portal-msg.error   { background: #fff0f0; color: #c0392b; display: block; }
.msg-box.success, .portal-msg.success { background: #f0fff4; color: #1a7a3c; display: block; }
.msg-box.info,    .portal-msg.info    { background: #f0f4ff; color: var(--lav-5); display: block; }

/* ── Portal Dashboard ── */
.portal-dashboard { display: none; }

.portal-dashboard-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  position: relative;
  z-index: 1;
}

.portal-profile-card {
  background: var(--lav-2);
  border-top:    3px solid var(--w-light);
  border-left:   3px solid var(--w-light);
  border-right:  3px solid var(--w-dark);
  border-bottom: 3px solid var(--w-dark);
  box-shadow: 3px 3px 0 #000;
  padding: 0 0 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* profile card titlebar */
.portal-profile-card::before {
  content: '🎀 My Profile';
  display: block;
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  font-family: var(--pixel);
  font-size: 13px;
  color: #fff;
  padding: 7px 12px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.portal-profile-body {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 0;
  flex-wrap: wrap;
}

.portal-avatar {
  width: 56px; height: 56px;
  background: var(--lav-3);
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pixel);
  font-size: 28px;
  color: var(--lav-5);
  flex-shrink: 0;
}

.portal-profile-info { flex: 1; min-width: 140px; }

.portal-profile-name {
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--text);
  margin: 0 0 4px;
}

.portal-profile-email { font-size: 17px; color: var(--text-2); margin: 0 0 2px; }
.portal-profile-since { font-size: 16px; color: var(--lav-3); margin: 0; }

.portal-btn {
  font-family: var(--pixel);
  font-size: 12px;
  padding: 6px 12px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  color: var(--text);
  cursor: pointer;
  transition: filter 0.1s;
}

.portal-btn:hover { filter: brightness(1.05); }

.portal-btn-sm {
  font-family: var(--pixel);
  font-size: 12px;
  padding: 5px 10px;
  background: var(--lav-2);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  color: var(--text);
  cursor: pointer;
  transition: filter 0.1s;
}

.portal-btn-sm:hover { filter: brightness(1.05); }
.portal-btn-red { color: var(--red); }
.portal-btn-gray { color: var(--text-2); }

.portal-section {
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  margin-bottom: 12px;
  overflow: hidden;
}

.portal-section-title {
  background: var(--lav-3);
  font-family: var(--pixel);
  font-size: 13px;
  color: var(--text);
  margin: 0;
  padding: 6px 12px;
  border-bottom: 1px solid var(--lav-4);
}

.portal-section > *:not(.portal-section-title) { padding: 12px 16px; }

.edit-name-form,
.change-pass-form { overflow: hidden; max-height: 0; transition: max-height 0.3s ease; }
.edit-name-form.open, .change-pass-form.open { max-height: 300px; }

.my-msg-item {
  background: var(--lav-1);
  border-top:    1px solid var(--w-dark);
  border-left:   1px solid var(--w-dark);
  border-right:  1px solid var(--w-light);
  border-bottom: 1px solid var(--w-light);
  padding: 10px 12px;
  margin-bottom: 6px;
  position: relative;
}

.my-msg-idol { font-family: var(--pixel); font-size: 12px; color: var(--pink-d); margin-bottom: 5px; }
.my-msg-text { font-size: 18px; color: var(--text-2); line-height: 1.6; }
.my-msg-time { font-size: 15px; color: var(--lav-3); margin-top: 3px; }
.my-msg-actions { display: flex; gap: 5px; margin-top: 6px; }
.my-msg-edit-form { margin-top: 7px; }
.my-msg-edit-form textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--lav-0);
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  padding: 6px 8px;
  resize: vertical;
}

/* ========================================
   Admin
   ======================================== */
.admin-container {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  position: relative;
  z-index: 1;
}

.admin-container h1 {
  font-family: var(--pixel);
  font-size: 18px;
  color: var(--text);
  margin: 0 0 20px;
}

.admin-section {
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  margin-bottom: 16px;
  overflow: hidden;
}

.admin-section h2 {
  background: var(--lav-3);
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--text);
  margin: 0;
  padding: 6px 12px;
  border-bottom: 1px solid var(--lav-4);
}

.admin-section > *:not(h2:first-child) { padding: 14px 16px; }

.admin-btn {
  font-family: var(--pixel);
  font-size: 13px;
  padding: 7px 14px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  color: var(--text);
  cursor: pointer;
}

.admin-btn:hover { background: var(--lav-3); }
.admin-btn-danger { color: var(--red); }
.admin-btn-danger:hover { background: #ffe0e0; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 18px; }
.admin-table th { font-family: var(--pixel); font-size: 12px; color: var(--text-2); text-align: left; padding: 7px 10px; border-bottom: 2px solid var(--lav-3); background: var(--lav-1); }
.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--lav-1); color: var(--text-2); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: none; }

/* ── Nav login dropdown ── */
.nav-login-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  box-shadow: 2px 2px 0 rgba(61,36,102,0.15);
  min-width: 150px;
  z-index: 200;
  overflow: hidden;
}

.nav-login-dropdown a,
.nav-login-dropdown button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
}

.nav-login-dropdown a:hover,
.nav-login-dropdown button:hover {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff;
}

/* ── Event modal member actions ── */
.event-modal-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.event-modal-btn {
  font-family: var(--pixel);
  font-size: 12px;
  padding: 6px 10px;
  background: var(--lav-2);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  color: var(--text);
  cursor: pointer;
}

.event-modal-btn:hover { background: var(--lav-3); }
.event-modal-btn.active { background: linear-gradient(90deg, var(--tb-from), var(--tb-to)); color: #fff; }

/* ── Message Wall ── */
.msg-wall { display: flex; flex-wrap: wrap; gap: 8px; min-height: 50px; }

.msg-wall-item {
  background: var(--lav-1);
  border-top:    1px solid var(--w-dark);
  border-left:   1px solid var(--w-dark);
  border-right:  1px solid var(--w-light);
  border-bottom: 1px solid var(--w-light);
  padding: 8px 12px;
  font-size: 18px;
  color: var(--text-2);
  max-width: 240px;
  flex: 1 1 180px;
  line-height: 1.6;
}

.msg-wall-author { font-family: var(--pixel); font-size: 11px; color: var(--pink-d); margin-bottom: 5px; }
.msg-ticker-cta { font-size: 17px; color: var(--text-2); margin-top: 10px; }
.msg-ticker-cta a { color: var(--lav-5); text-decoration: none; }

/* ── Video embed ── */
.video-card-embed { position: relative; width: 100%; }
.video-embed-wrap { position: relative; width: 100%; aspect-ratio: 16/9; }
.video-embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ── Gallery photo save btn ── */
.photo-save-btn {
  font-family: var(--pixel);
  font-size: 12px;
  padding: 4px 8px;
  background: var(--lav-2);
  border-top:    1px solid var(--w-light);
  border-left:   1px solid var(--w-light);
  border-right:  1px solid var(--w-dark);
  border-bottom: 1px solid var(--w-dark);
  color: var(--text);
  cursor: pointer;
}

.photo-save-btn:hover, .photo-save-btn.saved { background: var(--lav-3); color: var(--pink-d); }

/* ── Event page ── */
.event-page-container { max-width: 760px; margin: 0 auto; padding: 24px 20px 64px; position: relative; z-index: 1; }
.event-page-container h1 { font-family: var(--pixel); font-size: clamp(15px, 2vw, 20px); color: var(--text); margin: 0 0 20px; line-height: 1.6; }

/* ── Checkins ── */
.checkin-list { display: flex; flex-direction: column; gap: 6px; }
.checkin-item { display: flex; align-items: center; justify-content: space-between; background: var(--lav-1); border: 1px solid var(--lav-3); padding: 8px 12px; font-size: 18px; color: var(--text-2); gap: 8px; flex-wrap: wrap; }
.checkin-event-name { font-family: var(--pixel); font-size: 12px; color: var(--text); flex: 1; }
.checkin-date { font-size: 16px; color: var(--lav-3); }

/* ── Saved photos ── */
.saved-photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
.saved-photo-item { position: relative; cursor: pointer; }
.saved-photo-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-top: 1px solid var(--w-light); border-left: 1px solid var(--w-light); border-right: 1px solid var(--w-dark); border-bottom: 1px solid var(--w-dark); }

/* ========================================
   Unified page layout — single source of truth
   All page containers: identical width + padding
   ======================================== */

.gallery-container,
.members-page-container,
.members-container,
.videos-container,
.admin-container,
.calendar-container,
.events-container,
.contact-container,
.portal-container,
.members-section,
.about-wrap,
.upcoming-event-section {
  max-width: 1000px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box;
}

/* Unified page title — same position on every page */
.gallery-container h1,
.videos-container h1,
.calendar-container h1,
.contact-container h1,
.admin-container h1,
.portal-container h1,
.members-list h2 {
  font-family: var(--pixel) !important;
  font-size: 15px !important;
  color: var(--text) !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 600px) {
  nav a { font-size: 12px; padding: 5px 8px; }
  .hero-logo { font-size: clamp(26px, 8vw, 44px); }
  .member-card { width: 120px; }
  .member-card img { width: 80px; height: 80px; }
  .detail-header { flex-direction: column; }
  .detail-image { width: 100px; height: 100px; }
  .about-card { padding: 28px 16px 20px; }
}

/* ========================================
   Calendar / Events Page
   ======================================== */

/* View toggle */
.ev-view-toggle { display: flex; gap: 4px; margin-bottom: 20px; }

.ev-view-btn {
  font-family: var(--pixel); font-size: 11px;
  padding: 9px 16px; cursor: pointer;
  background: var(--lav-2); color: var(--text);
  border-top: 2px solid var(--w-light); border-left: 2px solid var(--w-light);
  border-right: 2px solid var(--w-dark); border-bottom: 2px solid var(--w-dark);
}
.ev-view-btn.active,
.ev-view-btn:hover {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

/* Calendar layout: table left, sidebar right */
.cal-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

.cal-main {
  background: var(--lav-2);
  border-top: 3px solid var(--w-light); border-left: 3px solid var(--w-light);
  border-right: 3px solid var(--w-dark); border-bottom: 3px solid var(--w-dark);
  box-shadow: 3px 3px 0 #000;
  overflow: hidden;
}

/* cal-main titlebar */
.cal-main::before {
  content: '📅 Calendar';
  display: block;
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  font-family: var(--pixel); font-size: 11px; color: #fff;
  padding: 8px 12px; text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.cal-logo { padding: 8px 12px 0; }
.cal-logo img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }

/* Calendar controls: prev/month/next */
.calendar-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: var(--lav-1);
  border-top: 2px solid var(--w-dark); border-bottom: 2px solid var(--w-light);
}

.calendar-controls button,
#prevBtn, #nextBtn {
  font-family: var(--pixel); font-size: 12px;
  padding: 7px 14px; cursor: pointer;
  background: var(--lav-2); color: var(--text);
  border-top: 2px solid var(--w-light); border-left: 2px solid var(--w-light);
  border-right: 2px solid var(--w-dark); border-bottom: 2px solid var(--w-dark);
}
.calendar-controls button:active,
#prevBtn:active, #nextBtn:active {
  border-top: 2px solid var(--w-dark); border-left: 2px solid var(--w-dark);
  border-right: 2px solid var(--w-light); border-bottom: 2px solid var(--w-light);
}

.calendar-month {
  font-family: var(--pixel); font-size: 13px; color: var(--text);
}

/* Calendar table */
.calendar-table {
  width: 100%; border-collapse: collapse;
  table-layout: fixed;
}

.calendar-table thead th {
  font-family: var(--pixel); font-size: 10px; color: var(--text-2);
  padding: 8px 4px; text-align: center;
  background: var(--lav-1);
  border-bottom: 2px solid var(--lav-3);
}

.calendar-table td {
  vertical-align: top;
  height: 72px;
  padding: 0;
  border: 1px solid var(--lav-3);
  cursor: pointer;
  background: var(--lav-2);
  transition: filter 0.1s;
}
.calendar-table td:hover { filter: brightness(1.05); }
.calendar-table td.other-month { opacity: 0.4; }
.calendar-table td.today { background: var(--lav-0); }
.calendar-table td.has-event { background: #f5efff; }
.calendar-table td.past-event { opacity: 0.7; }

.day-bubble {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: flex-start; padding: 6px;
  font-family: var(--pixel); font-size: 10px; color: var(--text-2);
  box-sizing: border-box;
}

.event-dot {
  width: 7px; height: 7px;
  background: var(--pink-d); margin-top: 4px;
  border: 1px solid var(--w-dark);
}

/* Sidebar */
.cal-sidebar { display: flex; flex-direction: column; gap: 12px; }

.next-event-section,
.events-section {
  background: var(--lav-2);
  border-top: 3px solid var(--w-light); border-left: 3px solid var(--w-light);
  border-right: 3px solid var(--w-dark); border-bottom: 3px solid var(--w-dark);
  overflow: hidden;
}

.next-event-section h3,
.events-section h3 {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  font-family: var(--pixel); font-size: 10px; color: #fff;
  margin: 0; padding: 8px 12px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.next-event-section > *:not(h3),
.events-section > *:not(h3) { padding: 12px; }

/* event items inside sidebar */
.event-item {
  background: var(--lav-1);
  border-top: 1px solid var(--w-dark); border-left: 1px solid var(--w-dark);
  border-right: 1px solid var(--w-light); border-bottom: 1px solid var(--w-light);
  padding: 10px 12px; margin-bottom: 8px; font-size: 14px; color: var(--text-2);
}
.event-item-clickable { cursor: pointer; transition: filter 0.1s; }
.event-item-clickable:hover { filter: brightness(1.05); }
.event-item strong { font-family: var(--pixel); font-size: 9px; color: var(--text); display: block; margin-bottom: 4px; line-height: 1.6; }
.event-type { font-family: var(--pixel); font-size: 8px; color: var(--lav-5); }

/* jump button inside sidebar */
.jump-btn {
  font-family: var(--pixel); font-size: 9px;
  padding: 6px 12px; cursor: pointer;
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  border-top: 2px solid var(--w-light); border-left: 2px solid var(--w-light);
  border-right: 2px solid var(--w-dark); border-bottom: 2px solid var(--w-dark);
  text-decoration: none; display: inline-block; margin-top: 8px;
}
.jump-btn:hover { filter: brightness(1.07); }

.no-events {
  font-size: 13px; color: var(--text-2);
  padding: 12px; text-align: center;
}

/* ── List view ── */
.ev-list-section-label {
  font-family: var(--pixel); font-size: 10px; color: var(--text-2);
  background: var(--lav-3); padding: 6px 12px; margin-bottom: 8px;
  border-top: 1px solid var(--w-light); border-left: 1px solid var(--w-light);
  border-right: 1px solid var(--w-dark); border-bottom: 1px solid var(--w-dark);
}
.ev-list-section-label.past { opacity: 0.7; }

.ev-list-card {
  background: var(--lav-2); margin-bottom: 8px; cursor: pointer;
  border-top: 2px solid var(--w-light); border-left: 2px solid var(--w-light);
  border-right: 2px solid var(--w-dark); border-bottom: 2px solid var(--w-dark);
  padding: 14px 16px; transition: filter 0.1s;
}
.ev-list-card:hover { filter: brightness(1.04); }

.ev-list-card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.ev-list-badge {
  font-family: var(--pixel); font-size: 8px; padding: 3px 8px;
  background: var(--lav-3); color: var(--text);
  border-top: 1px solid var(--w-light); border-left: 1px solid var(--w-light);
  border-right: 1px solid var(--w-dark); border-bottom: 1px solid var(--w-dark);
  white-space: nowrap;
}
.ev-list-card-date { font-size: 13px; color: var(--text-2); }
.ev-list-card-title { font-family: var(--pixel); font-size: 11px; color: var(--text); margin: 0 0 6px; line-height: 1.7; }
.ev-list-card-meta { font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 10px; }
.ev-list-card-arrow { font-family: var(--pixel); font-size: 9px; color: var(--lav-5); margin-top: 8px; display: block; }

/* Event detail modal (used from calendar page) */
.event-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(61,36,102,0.55); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.event-modal-box {
  background: var(--lav-2); position: relative;
  border-top: 3px solid var(--w-light); border-left: 3px solid var(--w-light);
  border-right: 3px solid var(--w-dark); border-bottom: 3px solid var(--w-dark);
  box-shadow: 4px 4px 0 #000;
  max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto;
}
.event-modal-close {
  position: absolute; top: 6px; right: 6px;
  background: var(--lav-3); color: var(--text); font-size: 18px;
  border-top: 1px solid var(--w-light); border-left: 1px solid var(--w-light);
  border-right: 1px solid var(--w-dark); border-bottom: 1px solid var(--w-dark);
  width: 20px; height: 18px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; line-height: 1;
}
.event-modal-poster { margin-bottom: 0; }
.event-modal-poster img { width: 100%; display: block; max-height: 220px; object-fit: cover; }
.event-modal-body { padding: 16px 20px 20px; }
.event-modal-tag {
  font-family: var(--pixel); font-size: 9px; display: inline-block;
  padding: 3px 9px; background: var(--lav-3);
  border-top: 1px solid var(--w-light); border-left: 1px solid var(--w-light);
  border-right: 1px solid var(--w-dark); border-bottom: 1px solid var(--w-dark);
  color: var(--text); margin-bottom: 10px;
}
.event-modal-title { font-family: var(--pixel); font-size: 13px; color: var(--text); margin: 0 0 12px; line-height: 1.7; }
.event-modal-meta { font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.event-modal-desc { font-size: 14px; color: var(--text-2); line-height: 1.8; margin: 10px 0 0; }
.event-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.event-modal-photos-btn {
  font-family: var(--pixel); font-size: 9px; padding: 8px 14px;
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff; text-decoration: none; text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  border-top: 2px solid var(--w-light); border-left: 2px solid var(--w-light);
  border-right: 2px solid var(--w-dark); border-bottom: 2px solid var(--w-dark);
}
.event-video-links { margin-top: 12px; }

@media (max-width: 720px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-sidebar { display: none; }
}

/* ========================================
   Gallery / Video filter buttons
   ======================================== */
.filter-section,
.video-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  align-items: center;
}

.filter-btn {
  font-family: var(--pixel);
  font-size: 10px;
  padding: 8px 14px;
  background: var(--lav-2);
  color: var(--text);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.1s;
}

.filter-btn:hover {
  filter: brightness(1.06);
}

.filter-btn.active {
  background: linear-gradient(90deg, var(--tb-from), var(--tb-to));
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
}

.filter-btn:active {
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
}

/* ── Photo heart/save button ── */
.photo-heart-btn {
  position: absolute;
  bottom: 6px; right: 6px;
  font-size: 16px;
  background: var(--lav-2);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  color: var(--text-2);
  padding: 3px 6px;
  cursor: pointer;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s;
}

.gallery-item:hover .photo-heart-btn,
.photo-heart-btn.saved {
  opacity: 1;
}

.photo-heart-btn.saved { color: var(--pink-d); }

/* ── Image lightbox modal ── */
.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(61,36,102,0.88);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-modal.open { display: flex; }

.image-modal img {
  max-width: 90vw;
  max-height: 85vh;
  border-top:    3px solid var(--w-light);
  border-left:   3px solid var(--w-light);
  border-right:  3px solid var(--w-dark);
  border-bottom: 3px solid var(--w-dark);
  box-shadow: 4px 4px 0 #000;
  cursor: default;
}

.image-modal-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-family: var(--pixel); font-size: 18px;
  background: var(--lav-2); color: var(--text);
  border-top:    2px solid var(--w-light);
  border-left:   2px solid var(--w-light);
  border-right:  2px solid var(--w-dark);
  border-bottom: 2px solid var(--w-dark);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
}
.image-modal-prev { left: 16px; }
.image-modal-next { right: 16px; }
.image-modal-nav:active {
  border-top:    2px solid var(--w-dark);
  border-left:   2px solid var(--w-dark);
  border-right:  2px solid var(--w-light);
  border-bottom: 2px solid var(--w-light);
}

/* ========================================
   Animations
   ======================================== */
@keyframes twinkle {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}
