/* ══════════════════════════════════════════════════════
   BOOTSTRAP 5 — tema gelap (satu-satunya integrasi yang perlu)
   Override --bs-* supaya utilitas text-body-* / border-* ikut gelap.
   ══════════════════════════════════════════════════════ */
:root {
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-secondary-color: #9aa3b5;
  --bs-tertiary-color: #6d7488;
  --bs-border-color: rgba(255,255,255,.07);
  --bs-info: var(--cyan);
  --bs-info-rgb: 34,211,238;
}
body { background: var(--bg); color: var(--text); }

/* Tabrakan nama kelas dengan komponen Bootstrap.
   .carousel-item & .carousel-caption & .toast milik Bootstrap punya gaya sendiri
   (display:none / text-align:center / .toast:not(.showing){display:none}) yang
   sneaking merusak carousel & notifikasi kita. Dinetralkan di sini.
   Upgrade kalau perlu: ganti prefiks kelas ini (mis. .wn-car-item) di CSS+JS. */
.carousel-item { display: block; float: none; width: auto; margin-right: 0; backface-visibility: visible; }
.carousel-item.active { display: block; }
.carousel-caption {
  right: auto; bottom: 0; text-align: left; color: #fff; opacity: 0;
  padding: 2rem 1.2rem 1rem; background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
}
.toast:not(.showing) { display: flex; }
.toast {
  width: auto; max-width: 340px; background: var(--surface2); color: var(--text);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: .75rem 1.2rem;
  font-size: .82rem; font-weight: 500; pointer-events: all;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

/* Nav utama: kaca, menempel atas, hormati notch. Dihidden di halaman detail
   (they punya header "Kembali" sendiri) oleh index.html. */
#main-nav {
  background: rgba(5,5,5,.62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding-top: calc(.5rem + env(safe-area-inset-top));
}
#main-nav .navbar-brand { color: #fff; letter-spacing: -.01em; }
#main-nav .nav-link { color: #b9c1d1; font-size: .82rem; font-weight: 600; padding: .3rem .55rem; }
#main-nav .nav-link:hover, #main-nav .nav-link.active { color: var(--cyan); }
#main-nav .nav-link.active { box-shadow: inset 0 -2px 0 var(--cyan); }

/* Burger: hanya di layar kecil (<992px). Desktop ≥992px = navbar Bootstrap
   yang sendiri membentangkan link-nya, tanpa JS. */
.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 38px; padding: 8px;
  flex-direction: column; justify-content: center; gap: 5px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: 11px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991.98px) {
  #nav-toggle { display: flex; }
  #nav-menu {
    display: none; width: 100%; order: 3;
    border-top: 1px solid rgba(255,255,255,.08); margin-top: .5rem; padding-top: .5rem;
  }
  #nav-menu.open { display: block; }
  #nav-menu .nav-link {
    display: block; padding: .7rem .6rem; font-size: .95rem; border-radius: 10px;
  }
  #nav-menu .nav-link.active { background: rgba(34,211,238,.10); box-shadow: none; }
  #main-nav { flex-wrap: wrap; }
  #main-nav .navbar-brand { margin-right: auto; }
}

/* Jangkar tidak tertutup navbar fixed */
#quick-nav, #students, #seating-chart, #random-gallery, #timeline, #movie, #carousel-section { scroll-margin-top: 72px; }

/* ══════════════════════════════════════════════════════
   WARSONE CMS — Master Stylesheet
   Extracted & enhanced from original index.html
   ══════════════════════════════════════════════════════ */

/* ─── VARIABLES ──────────────────────────────────────── */
:root {
  --cyan:     #22d3ee;
  --cyan-dim: rgba(34,211,238,0.12);
  --border-subtle: rgba(255,255,255,0.08);
  --border-hover:  rgba(255,255,255,0.22);
  --bg:       #050505;
  --surface:  #111111;
  --surface2: #1a1a1a;
  --surface3: #222222;
  --text:     #e8e8e8;
  --muted:    #888;
  --danger:   #ef4444;
  --success:  #22c55e;
  --warning:  #f59e0b;
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; overflow-x: hidden; max-width: 100vw; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video, iframe { max-width: 100%; }
section, header, footer { max-width: 100vw; overflow-x: clip; }
body.player-active { padding-bottom: 72px; }
@media (max-width: 640px) { body.player-active { padding-bottom: 68px; } }
button { touch-action: manipulation; }
::selection { background: rgba(34,211,238,0.28); color: #fff; }

/* ─── INITIAL LOAD CURTAIN ───────────────────────────── */
#page-curtain {
  position: fixed; inset: 0; z-index: 100001;
  background: var(--bg);
  pointer-events: all;
  opacity: 1;
  will-change: opacity;
}

/* ─── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 99px; }

/* ─── TYPOGRAPHY ─────────────────────────────────────── */
.section-label {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--cyan); text-transform: none; margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.1;
  will-change: transform, opacity;
}
.reveal .section-title {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed .section-title {
  opacity: 1; transform: none;
}
.cyan-text  { color: var(--cyan); }
#student-count, .card-number, .time-labels, .album-meta, .album-date,
.timeline-meta, .rg-when, .rg-n, #lightbox-counter, #photo-count-badge {
  font-variant-numeric: tabular-nums;
}
/* Album & Event page — judul besar tanpa glow/layout push */
#event-title-bar {
  will-change: opacity;
}
.album-page-grid + * .section-title,
#album-page-grid { will-change: transform, opacity; }
.glow-text  { color: var(--cyan); }
.muted-text { color: var(--muted); }

/* ─── BURGER ─────────────────────────────────────────── */
/* ─── NAV OVERLAY ────────────────────────────────────── */
/* ─── HERO ───────────────────────────────────────────── */
#hero {
  position: relative; height: 100svh; height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-top: calc(56px + env(safe-area-inset-top));
}
#hero-bg {
  position: absolute; inset: 0;
  background: center/cover no-repeat;
  filter: brightness(0.35) saturate(0.75);
  transform: scale(1.02);
  transition: background-image 0.8s ease;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0.78) 100%);
}
#hero-content { position: relative; z-index: 2; text-align: center; padding: 0 1rem; max-width: 100%; }

.hero-class {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--cyan); text-transform: none;
  border: 1px solid var(--border-subtle);
  background: rgba(17,17,17,0.65);
  padding: 0.4rem 1.1rem; border-radius: 999px; margin-bottom: 1.5rem;
  will-change: transform, opacity; backdrop-filter: blur(8px);
}
/* Logo kelas di hero: contain + ukuran tetap → tidak gepeng, tidak terpotong */
.class-logo {
  display: block;
  width: clamp(96px, 22vw, 180px);
  height: clamp(96px, 22vw, 180px);
  object-fit: contain;
  margin: 0 auto 1.1rem;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,.45));
}
.class-logo[hidden] { display: none; }
.hero-title {
  font-size: clamp(2.6rem, 17vw, 14rem); font-weight: 600;
  line-height: 0.92; letter-spacing: -0.04em; color: #fff;
  max-width: 100%; overflow-wrap: anywhere;
  will-change: transform, opacity;
}
.hero-subtitle {
  font-size: clamp(0.85rem, 2vw, 1.1rem); font-weight: 500;
  letter-spacing: 0.35em; color: var(--cyan); margin-top: 0.75rem;
  will-change: transform, opacity;
}
.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(255,255,255,0.85);
  font-weight: 400; max-width: min(520px, 100%); margin: 1.75rem auto 0;
  line-height: 1.75; letter-spacing: 0.01em;
  will-change: transform, opacity;
}

/* ─── STUDENT GRID ───────────────────────────────────── */
/* Grid siswa pakai CSS grid, BUKAN .row/.col Bootstrap: gutter Bootstrap masuk
   ke dalam kartu sehingga foto tidak ikut ter-clip radius (kotak tajam). */
#students-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 576px)  { #students-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px)  { #students-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.student-card {
  position: relative; aspect-ratio: 3/4; overflow: hidden;
  border-radius: 14px; cursor: pointer; background: var(--surface);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1);
}
.student-card img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block;
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1), opacity 0.35s ease;
}
.student-card:hover img { transform: scale(1.04); }
.student-card:hover { border-color: var(--cyan); }
.card-name-slide {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, transparent 100%);
  padding: 2.5rem 0.8rem 0.8rem;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.student-card:hover .card-name-slide { transform: translateY(0); }
.card-name   { font-size: clamp(1rem, 1.8vw, 1.35rem); font-weight: 600; letter-spacing: 0.01em; color: #fff; line-height: 1.25; }
.card-number { font-size: 0.72rem; color: var(--cyan); letter-spacing: 0.12em; font-weight: 600; margin-top: 0.25rem; display: block; }

/* ─── STUDENT MODAL ──────────────────────────────────── */
#modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.22,1,0.36,1);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#modal-overlay.open { opacity: 1; pointer-events: all; }
#modal-bg-blur { display: none; }
#modal-backdrop { position: absolute; inset: 0; background: transparent; }
#modal-card {
  position: relative; z-index: 1; background: rgba(17,17,17,0.96);
  border: 1px solid var(--border-subtle);
  border-radius: 20px; width: 100%; max-width: 720px;
  padding: 3rem 2rem 2rem;
  display: flex; gap: 2rem; align-items: flex-start;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: scale(0.96) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
#modal-overlay.open #modal-card { transform: scale(1) translateY(0); }
#modal-close {
  position: sticky; top: 1rem; right: 1rem;
  align-self: flex-end; z-index: 10; margin-bottom: 1rem;
  width: 36px; height: 36px; min-width: 36px; min-height: 36px; flex-shrink: 0;
  border-radius: 50%; background: rgba(255,255,255,0.07); border: 1px solid var(--border-subtle); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}
#modal-close:hover { background: var(--cyan); color: #000; }
.modal-photo { width: 140px; min-width: 140px; aspect-ratio: 3/4; border-radius: 10px; object-fit: cover; border: 1px solid var(--border-hover); }
.modal-name  { font-size: 1.75rem; font-weight: 600; color: var(--cyan); letter-spacing: -0.02em; line-height: 1.1; }
.modal-nick  { font-size: 0.85rem; color: #aaa; letter-spacing: 0.06em; font-weight: 500; margin-top: 0.3rem; }
.modal-desc  { font-size: 0.97rem; color: rgba(255,255,255,0.85); line-height: 1.75; margin-top: 1rem; font-weight: 400; }
.modal-song-info  { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.modal-song-label { font-size: 0.72rem; color: var(--cyan); letter-spacing: 0.06em; font-weight: 600; }
.modal-song-row   { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.2rem; }
.modal-song-meta  { min-width: 0; }
.modal-song-name  { font-size: 0.9rem; font-weight: 600; }
.modal-song-artist{ font-size: 0.75rem; color: #888; }
.modal-song-play {
  display: inline-flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
  padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--border-hover);
  background: var(--cyan-dim); color: var(--cyan);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.modal-song-play:hover {
  background: var(--cyan); color: #000; border-color: var(--cyan);
  transform: translateY(-1px);
}
.modal-song-play.active { background: var(--cyan); color: #000; border-color: var(--cyan); }
.modal-song-play i { font-size: 0.7rem; }

/* ─── ALBUM (masonry) ───────────────────────────────────── */
.album-page-grid { columns: 4 250px; column-gap: 1.25rem; }
.album-page-card {
  position: relative; display: block; break-inside: avoid; margin: 0 0 1.25rem;
  border-radius: 16px; overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-subtle);
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), border-color 0.25s ease;
}
.album-page-card:hover { transform: translateY(-3px); border-color: var(--cyan); }
.album-page-card img { display: block; width: 100%; height: auto; }
.album-page-card-body {
  position: absolute; inset: auto 0 0 0; padding: 2.2rem 1rem .9rem;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.45) 55%, transparent);
  display: flex; flex-direction: column; gap: .25rem;
}
.album-page-card-body h3 { margin: 0; font-size: .95rem; font-weight: 600; color: #fff; line-height: 1.25; }
.album-page-card-body .album-meta { font-size: .72rem; color: var(--cyan); font-weight: 600; }
@media (max-width: 640px) {
  .album-page-grid { columns: 2 140px; column-gap: .75rem; }
  .album-page-card { margin-bottom: .75rem; border-radius: 12px; }
  .album-page-card-body { padding: 1.6rem .6rem .6rem; }
  .album-page-card-body h3 { font-size: .78rem; }
  .album-page-card-body .album-meta { font-size: .68rem; }
}

/* ─── CAROUSEL ───────────────────────────────────────── */
.carousel-track {
  display: flex; gap: 1.5rem;
  transition: transform 0.7s cubic-bezier(0.22,1,0.36,1);
  will-change: transform;
}
.carousel-item {
  flex: 0 0 auto; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), opacity 0.6s ease, border-color 0.3s ease;
  position: relative; cursor: pointer;
}
.carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-item.active { box-shadow: 0 20px 50px rgba(0,0,0,0.55); border: 1px solid var(--cyan); }
.carousel-item.active img { filter: brightness(1) saturate(1.05); }
.carousel-item:not(.active) img { filter: brightness(0.45) saturate(0.6); }
.carousel-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 2rem 1.2rem 1rem; background: linear-gradient(to top, rgba(0,0,0,0.88), transparent); opacity: 0; transition: opacity 0.35s ease; }
.carousel-item.active .carousel-caption { opacity: 1; }
.carousel-caption-text { font-size: 0.92rem; font-weight: 600; color: #fff; }
.carousel-caption-date { font-size: 0.72rem; color: var(--cyan); letter-spacing: 0.08em; margin-top: 0.25rem; }

/* ─── TIMELINE ───────────────────────────────────────── */
.timeline-line {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border-hover) 20%, var(--border-hover) 80%, transparent);
  transform: translateX(-50%);
}
.timeline-item {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 2rem;
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1), transform 0.65s cubic-bezier(0.22,1,0.36,1);
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); flex-shrink: 0; }
.timeline-photo-wrap { border-radius: 12px; overflow: hidden; border: 1px solid var(--border-subtle); transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1); cursor: pointer; }
.timeline-photo-wrap:hover { border-color: var(--cyan); transform: scale(1.015); }
.timeline-photo-wrap img { width: 100%; height: auto; display: block; }
.timeline-meta    { font-size: 0.76rem; color: var(--muted); letter-spacing: 0.06em; margin-top: 0.6rem; }
.timeline-caption { font-size: 1.05rem; font-weight: 600; margin-top: 0.3rem; }
.timeline-note    { font-size: 0.87rem; color: #9c9c9c; margin-top: 0.35rem; line-height: 1.7; font-weight: 400; }
.tl-delay-1 { transition-delay: 0s; }
.tl-delay-2 { transition-delay: 0.08s; }
.tl-delay-3 { transition-delay: 0.16s; }

/* ─── QUICK NAV (4 kotak) + WARSONE MOVIE ────────────── */
.qn-card {
  position: relative; border: 0; padding: 0; cursor: pointer; border-radius: 20px;
  aspect-ratio: 4/5; overflow: hidden; background: var(--surface);
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
}
.qn-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55;
  filter: saturate(1.05); transition: opacity .35s ease, transform .5s ease; }
.qn-veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.25) 60%, rgba(0,0,0,.1)); }
.qn-body { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
  padding: 1rem 1.1rem; color: #fff; text-align: left; }
.qn-body i { font-size: .95rem; color: var(--cyan); }
.qn-body b { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.qn-body em { font-style: normal; font-size: .7rem; color: rgba(255,255,255,.65); }
.qn-card:hover img, .qn-card:focus-visible img { opacity: 1; transform: scale(1.05); }
.qn-card:hover { outline: 1px solid rgba(57,197,187,.55); }

/* 1 video per baris, lebar maksimal 960px (video 960x540) */
.movie-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; max-width: 960px; margin-inline: auto; }
.movie-item { border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid rgba(255,255,255,.08); }
.movie-thumb { position: relative; aspect-ratio: 16/9; background: #000; }
.movie-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.movie-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.movie-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
  background: rgba(0,0,0,.15); }
.movie-play span { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); color: #fff; font-size: 1.1rem; transition: transform .2s, background .2s; }
.movie-play:hover span { transform: scale(1.12); background: var(--cyan); color: #000; }
.movie-meta { padding: .7rem .9rem .9rem; }
.movie-meta b { display: block; font-size: .88rem; font-weight: 700; }
.movie-meta span { font-size: .7rem; color: var(--muted); }

/* ─── STICKY BACK BAR (seragam di semua menu) ────────── */
.page-back-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: .8rem;
  padding: .7rem clamp(.8rem, 3vw, 2rem); background: rgba(10,10,10,.88); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.07); }
.page-back-bar b { font-size: .95rem; font-weight: 800; }
.page-back-bar small { font-size: .68rem; color: var(--muted); display: block; }
.back-btn { display: inline-flex; align-items: center; gap: .45rem; background: rgba(255,255,255,.08); color: #fff;
  border: 0; border-radius: 999px; padding: .5rem .95rem; font-size: .76rem; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.back-btn:hover { background: rgba(57,197,187,.28); }

/* ─── GALERI KE-RANDOMAN ───────────────────────────── */
.random-groups { display: flex; flex-direction: column; gap: 2.2rem; }
.random-group-title { font-size: 1.05rem; font-weight: 800; margin-bottom: .6rem; }
.random-group-date { font-size: .7rem; color: var(--cyan); font-weight: 600; letter-spacing: .04em; }
.random-grid { columns: 3; column-gap: .8rem; }
.random-grid .rg-item { break-inside: avoid; margin-bottom: .8rem; cursor: pointer; border-radius: 12px; overflow: hidden; }
.random-grid .rg-item img { width: 100%; height: auto; display: block; border-radius: 12px; }
@media (max-width: 768px) { .random-grid { columns: 2; } }
@media (max-width: 420px) { .random-grid { columns: 1; } }

/* ─── GALERI RANDOM FULL-SCREEN (ala galeri HP) ───────── */
#rg-overlay {
  position: fixed; inset: 0; z-index: 9200; display: none;
  background: rgba(0,0,0,0.9); backdrop-filter: blur(12px);
}
#rg-overlay.open { display: block; }
#rg-card {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.2rem clamp(1rem, 4vw, 3rem) 5rem;
}
#rg-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 1rem;
  padding: .6rem 0 1rem; background: linear-gradient(to bottom, rgba(0,0,0,.92) 65%, transparent);
}
#rg-back {
  display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0;
  background: rgba(255,255,255,.08); border: 0; color: #fff; cursor: pointer;
  padding: .5rem .9rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
}
#rg-back:hover { background: rgba(57,197,187,.25); }
.rg-head-title { font-size: 1.35rem; font-weight: 800; margin: 0; line-height: 1.2; }
.rg-head-sub { font-size: .72rem; color: var(--muted); margin: .15rem 0 0; }
#rg-groups { display: flex; flex-direction: column; gap: 3rem; margin-top: .5rem; }
.rg-group-head {
  display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap;
  margin-bottom: .9rem; padding-bottom: .5rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.rg-group-head h3 { font-size: 1.25rem; font-weight: 800; margin: 0; line-height: 1.25; }
.rg-group-head .rg-when { font-size: .92rem; color: var(--cyan); font-weight: 600; white-space: nowrap; }
.rg-group-head .rg-n { font-size: .7rem; color: var(--muted); margin-left: auto; }
#rg-groups .random-grid { columns: 4; column-gap: .85rem; }
#rg-groups .rg-item { margin-bottom: .85rem; border-radius: 14px; }
#rg-groups .rg-item img { border-radius: 14px; transition: transform .25s ease, box-shadow .25s ease; }
#rg-groups .rg-item:hover img { transform: scale(1.02); box-shadow: 0 0 26px rgba(57,197,187,.22); }
@media (max-width: 1100px) { #rg-groups .random-grid { columns: 3; } }
@media (max-width: 820px)  { #rg-groups .random-grid { columns: 2; } }
@media (max-width: 480px)  {
  #rg-groups .random-grid { columns: 2; }
  .rg-group-head h3 { font-size: 1.1rem; }
  .rg-group-head .rg-when { font-size: .84rem; }
  #rg-card { padding-bottom: 6rem; }
}

/* ─── LIRIK (LRCLIB) ────────────────────────────────── */
.player-left { min-width: 0; }
.player-left-row { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.player-meta { min-width: 0; flex: 1 1 auto; }
.lyrics-box {
  position: relative; height: 26px; margin-top: 2px; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}
.lyrics-track { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; gap: 1px;
  transition: transform .5s cubic-bezier(.22,1,.36,1); will-change: transform; }
.lyric {
  margin: 0; font-size: .72rem; line-height: 1.25; color: rgba(255,255,255,0.32);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .35s ease, opacity .35s ease, transform .35s ease, filter .35s ease;
  transform-origin: left center;
}
.lyric.is-past { color: rgba(255,255,255,0.22); }
.lyric.is-active { color: #fff; font-weight: 600; transform: scale(1.02); filter: drop-shadow(0 0 8px rgba(57,197,187,.35)); }
.lyric-static { margin: 0; font-size: .68rem; color: rgba(255,255,255,0.45); font-style: italic; }
.lyrics-box.is-loading .lyrics-track { opacity: .35; }
/* Lirik HANYA di popup Now Playing. Di bar mini (collapsed) lirik bikin
   tinggi bar melebar dan lirik terpotong — disembunyikan di semua lebar. */
#player-bar:not(.in-popup) .lyrics-box { display: none; }

/* Lirik di dalam popup Now Playing */
.np-lyrics-slot { margin-top: .8rem; }
.np-lyrics-slot .lyrics-box { height: 150px; border-radius: 14px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07); padding: 0 .8rem; }
.np-lyrics-slot .lyric { font-size: .92rem; white-space: normal; }
.np-lyrics-slot .lyric-static { font-size: .8rem; }
@media (max-width: 640px) {
  .lyrics-box { height: 24px; }
  .np-lyrics-slot .lyrics-box { height: 120px; }
}

/* ─── MUSIC PLAYER ───────────────────────────────────── */
#player-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 7000; min-height: 68px;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(30px) saturate(140%);
  border-top: 1px solid rgba(255,255,255,0.07);
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr) minmax(0,1fr);
  align-items: center; gap: 1.25rem;
  padding: 0.55rem 1.25rem max(0.55rem, env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform 0.45s cubic-bezier(0.22,1,0.36,1);
}
#player-bar.active { transform: translateY(0); }
.player-info { display: block; text-align: left; background: none; border: 0; padding: 0; cursor: pointer;
  min-width: 0; color: inherit; font: inherit; }
.player-info:hover .player-track-name { color: var(--cyan); }
.player-info:focus-visible { outline: 1px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.player-art  { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border-subtle); }
.player-track-name { font-size: 0.86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { font-size: 0.75rem; color: #9a9a9a; font-weight: 500; }
#player-like { background: none; border: none; color: #888; font-size: 1rem; cursor: pointer; transition: color 0.2s ease, transform 0.2s ease; }
#player-like.liked { color: var(--cyan); }
#player-like:hover { transform: scale(1.1); }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.ctrl-btn { background: none; border: none; color: #aaa; font-size: 1rem; cursor: pointer; transition: color 0.2s ease, transform 0.2s ease; }
.ctrl-btn:hover { color: #fff; transform: scale(1.08); }
#btn-play-pause { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #000; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; transition: background-color 0.2s ease, transform 0.2s ease; flex-shrink: 0; }
#btn-play-pause:hover { background: var(--cyan); transform: scale(1.06); }
.progress-wrap { display: flex; flex-direction: column; gap: 0; }
#progress-bar-wrap { position: relative; width: 100%; padding: 4px 0; }
#oneui-seekbar { display: block; width: 100%; height: 30px; cursor: pointer; touch-action: none; }
/* Range transparan di atas canvas: klik/drag/keyboard ditangani browser (tahan banting) */
#seek-range {
  position: absolute; inset: -6px 0; width: 100%; height: calc(100% + 12px);
  margin: 0; opacity: 0; cursor: pointer; touch-action: none; z-index: 2;
  -webkit-appearance: none; appearance: none; background: transparent;
}
#seek-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 44px; }
#seek-range::-moz-range-thumb { width: 24px; height: 44px; border: 0; }
.time-labels { display: flex; justify-content: space-between; font-size: 0.56rem; color: #8a8a8a; line-height: 1; }

/* ─── NOW PLAYING POPUP ─────────────────────────────── */
#np-overlay {
  position: fixed; inset: 0; z-index: 9500; display: none;
  align-items: center; justify-content: center; padding: 1rem;
  background: rgba(0,0,0,0.72); backdrop-filter: blur(14px);
}
#np-overlay.open { display: flex; animation: npFade .25s ease both; }
@keyframes npFade { from { opacity: 0 } to { opacity: 1 } }
#np-card {
  position: relative; width: min(420px, 100%); max-height: 92vh; overflow-y: auto;
  border-radius: 22px; padding: 1.6rem 1.4rem 1.2rem;
  background: linear-gradient(180deg, rgba(57,197,187,0.18), rgba(16,16,18,0.98) 55%);
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: npPop .3s cubic-bezier(.2,1.2,.3,1) both;
}
@keyframes npPop { from { transform: translateY(18px) scale(.96); opacity: 0 } to { transform: none; opacity: 1 } }
#np-close { position: absolute; top: .9rem; right: .9rem; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; }
#np-art-wrap { width: min(300px, 76vw); margin: 0 auto 1.1rem; aspect-ratio: 1; border-radius: 18px;
  overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.07); }
#np-art { width: 100%; height: 100%; object-fit: cover; display: block; }
#np-meta { text-align: center; margin-bottom: 1rem; }
.np-eyebrow { font-size: .6rem; letter-spacing: .18em; color: #39c5bb; margin-bottom: .35rem; }
#np-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 .2rem; }
#np-artist, #np-student { font-size: .82rem; color: #9a9a9a; margin: 0; }
#np-student { color: #39c5bb; font-weight: 600; }
/* Player yang dipindah ke dalam popup */
#player-bar.in-popup {
  position: static; transform: none; min-height: 0; grid-template-columns: 1fr;
  gap: .9rem; padding: .6rem 0 0; background: transparent; border-top: 0; backdrop-filter: none;
}
#player-bar.in-popup > div:first-child, #player-bar.in-popup .player-volume { display: none; }
@media (max-width: 640px) {
  #player-bar { grid-template-columns: 1fr; gap: .45rem; padding: .5rem .9rem calc(.5rem + env(safe-area-inset-bottom)); }
  #player-bar .player-volume { display: none; }
  #np-card { padding: 1.2rem 1rem 1rem; border-radius: 18px; }
  #np-art-wrap { width: min(240px, 64vw); }
}
.player-volume { display: flex; align-items: center; gap: 0.5rem; justify-content: flex-end; }
#volume-slider { -webkit-appearance: none; width: 80px; height: 4px; background: #444; border-radius: 99px; outline: none; cursor: pointer; }
#volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; background: #fff; border-radius: 50%; cursor: pointer; }

/* ─── BUTTONS ────────────────────────────────────────── */
/* ─── TOAST NOTIFICATIONS ────────────────────────────── */
#toast-container {
  position: fixed; bottom: 90px; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none;
}
.toast {
  background: var(--surface2); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 0.75rem 1.2rem;
  font-size: 0.82rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.6rem;
  animation: toastIn 0.35s cubic-bezier(.34,1.56,.64,1) forwards;
  pointer-events: all; box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.toast.success { border-color: rgba(34,197,94,0.4); color: var(--success); }
.toast.error   { border-color: rgba(239,68,68,0.4); color: var(--danger); }
.toast.info    { border-color: rgba(34,211,238,0.4); color: var(--cyan); }
.toast.out     { animation: toastOut 0.3s ease forwards; }

/* ─── LOADING SKELETON ───────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ─── IMAGE SKELETON (anti layout-shift + GPU reveal) ───── */
/* Dipakai oleh ImageKit.applyImage(): aktif saat gambar belum selesai load. */
.img-loading {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%) !important;
  background-size: 200% 100% !important;
  animation: shimmer 1.5s infinite;
  opacity: 0.01;
  transform: scale(1.02);
  color: transparent;
}
.img-loaded {
  animation: none;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.45s cubic-bezier(0.22,1,0.36,1), transform 0.45s cubic-bezier(0.22,1,0.36,1);
}
.photo-item img {
  min-height: 120px;
  background: var(--surface);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.35s ease;
}
.photo-item img.img-loading { opacity: 0.01; transform: scale(1.02); }
.photo-item img.img-loaded  { opacity: 1; transform: scale(1); }

/* ─── EVENT BADGE ────────────────────────────────────── */
.event-click-hint {
  position: absolute; top: 0.8rem; right: 0.8rem;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  border: 1px solid var(--border-hover); color: var(--cyan);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  opacity: 0; transition: opacity 0.25s ease;
}
.carousel-item.active:hover .event-click-hint { opacity: 1; }

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes heroTitleIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(0.95); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes caretBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pageIntro { from { opacity: 1; } to { opacity: 0; } }
@keyframes pageContentIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── SCROLL REVEAL ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1), transform 0.65s cubic-bezier(0.22,1,0.36,1);
  will-change: opacity, transform;
}
.reveal.revealed { opacity: 1; transform: none; }

/* ─── PAGE TRANSITION OVERLAY ───────────────────── */
#page-transition {
  position: fixed; inset: 0; z-index: 100000;
  background: #050505;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.22,1,0.36,1);
}
#page-transition.to-out { opacity: 1; pointer-events: all; animation: none; }
#page-transition.page-entering { animation: pageIntro 0.45s ease-out; }

/* ─── EVENT PAGE ────────────────────────────────── */
#event-header, #event-layout { animation: pageContentIn 0.55s cubic-bezier(0.22,1,0.36,1) both; }
#event-layout { animation-delay: 0.05s; }
.event-title-bar.typing::after {
  content: '';
  display: inline-block;
  width: 2px; height: 0.9em;
  margin-left: 3px; vertical-align: -0.1em;
  background: var(--cyan);
  animation: caretBlink 0.8s step-end infinite;
}

/* ─── REDUCED MOTION ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #page-curtain { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

.spinner {
  width: 20px; height: 20px; border: 2px solid rgba(34,211,238,0.2);
  border-top-color: var(--cyan); border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}

/* ─── LIGHTBOX (for event.html) ──────────────────────── */
#lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.95); display: flex;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#lightbox.open { opacity: 1; pointer-events: all; }
#lightbox img  { max-width: 90vw; max-height: 88vh; border-radius: 8px; object-fit: contain; }
#lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
#lightbox-close:hover { background: var(--cyan); color: #000; }
#lightbox-nav {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: space-between; padding: 0 1rem; pointer-events: none;
}
.lb-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease; pointer-events: all;
}
.lb-btn:hover { background: var(--cyan); color: #000; }
#lightbox-counter {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  font-size: 0.75rem; color: rgba(255,255,255,0.5); letter-spacing: 0.1em;
}

/* ─── EVENT PHOTO GRID ───────────────────────────────── */
#event-gallery-container { padding: 1rem; }
.event-video { margin-bottom: .85rem; }
.event-video video {
  width: 100%; max-height: 62vh; display: block;
  border-radius: 12px; background: #000; object-fit: contain;
}
#photo-grid { columns: 4; column-gap: .85rem; }
@media (max-width: 1280px) { #photo-grid { columns: 3; } }
@media (max-width: 900px)  { #photo-grid { columns: 2; } }
@media (max-width: 560px)  { #photo-grid { columns: 1; } }
.photo-fallback {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .35rem; min-height: 120px; width: 100%;
  background: var(--surface); color: var(--muted); font-size: .7rem; text-align: center;
}
.photo-item {
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  margin: 0 0 .85rem; cursor: pointer; position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), border-color 0.2s ease;
}
.photo-item:hover { transform: scale(1.015); border-color: var(--cyan); }
.photo-item img { width: 100%; display: block; border-radius: 12px; }

/* ─── SEATING CHART (DENAH KELAS) ────────────────────── */
/* Formasi 4 Kolom: C1=4 baris, C2=5 baris, C3=5 baris, C4=4 baris + Guru di Row 1 */
.seating-grid {
  --seat-w: 140px;
  --seat-h: calc(var(--seat-w) * 9 / 16); /* 16:9 aspect ratio */
  display: grid;
  grid-template-columns: repeat(4, var(--seat-w));
  grid-template-rows: repeat(6, var(--seat-h)); /* 6 rows: Row 1 for Guru, Rows 2-6 for desks */
  gap: 1rem;
  justify-content: center;
  position: relative;
}
.seat {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, rgba(34,211,238,0.08), rgba(34,211,238,0.02));
  border: 2px solid rgba(34,211,238,0.2);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s, border-color 0.3s;
  overflow: visible;
  display: flex; align-items: center; justify-content: center;
}
.seat:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(34,211,238,0.18);
  border-color: var(--cyan);
  z-index: 10;
}
.seat.teacher-desk {
  background: linear-gradient(145deg, rgba(255,215,0,0.12), rgba(255,215,0,0.04));
  border-color: rgba(255,215,0,0.4);
  font-weight: 700; font-size: 0.85rem; color: #ffd700;
  text-align: center; text-transform: uppercase; letter-spacing: 0.08em;
  display: flex; align-items: center; justify-content: center;
}
.seat.teacher-desk:hover { border-color: #ffd700; box-shadow: 0 16px 40px rgba(255,215,0,0.2); }
.seat .seat-label {
  position: absolute; bottom: 0.5rem; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; color: rgba(255,255,255,0.5); font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
  pointer-events: none;
}
.seat .seat-popout {
  position: absolute;
  bottom: 100%; left: 50%;
  transform: translateX(-50%) translateY(0) scale(0.95);
  width: 240px; height: 135px; max-width: calc(100vw - 2rem);
  opacity: 0; visibility: hidden; pointer-events: none;
  border-radius: 0 0 12px 12px; overflow: visible;
  border: 1px solid var(--border-hover);
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(12px);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.25s;
  z-index: 20;
  padding-bottom: 0;
}
/* Foto keluar dari kotak: meluber di atas, samping, dan sedikit di bawah
   (gradasi bagian bawah foto ikut terlihat, tidak terpotong kotak). */
.seat .seat-popout img {
  position: absolute; left: 50%; bottom: -16px;
  width: calc(100% + 60px); max-width: none;
  height: auto; object-fit: contain;
  display: block;
  border-radius: 0 0 12px 12px;
  transform: translateX(-50%);
  transform-origin: center bottom;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.seat .seat-popout > div:only-child {
  width: 100%; height: 100%;
  border-radius: 0 0 12px 12px;
}
.seat:hover .seat-popout img,
.seat.active .seat-popout img {
  transform: translateX(-50%) translateY(-25%) scale(1.1);
}
.seat:hover .seat-popout,
.seat.active .seat-popout {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1.05);
}
.seating-instruction { text-align: center; color: rgba(255,255,255,0.6); font-size: 0.95rem; line-height: 1.5; }

@media (max-width: 1024px) {
  .seating-grid { --seat-w: 110px; }
}
@media (max-width: 768px) {
  .seating-grid {
    --seat-w: min(88px, calc((100vw - 3.5rem) / 4));
    gap: 0.6rem;
  }
  .seating-grid .seat .seat-popout { width: min(200px, 70vw); }
  /* Mencegah pop-out kepotong di HP untuk meja paling kiri/kanan */
  .seat--col-1 .seat-popout { left: 0; right: auto; transform: translateX(0) translateY(0) scale(0.95); }
  .seat--col-1:hover .seat-popout, .seat--col-1.active .seat-popout { transform: translateX(0) translateY(0) scale(1.05); }
  .seat--col-4 .seat-popout { left: auto; right: 0; transform: translateX(0) translateY(0) scale(0.95); }
  .seat--col-4:hover .seat-popout, .seat--col-4.active .seat-popout { transform: translateX(0) translateY(0) scale(1.05); }
  .seat--col-1 .seat-popout img, .seat--col-4 .seat-popout img { transform-origin: center bottom; }
}
@media (max-width: 480px) {
  .seating-grid {
    --seat-w: min(74px, calc((100vw - 2.5rem) / 4));
    gap: 0.5rem;
  }
  .seating-grid .seat .seat-popout { width: min(160px, 65vw); }
}
@media (max-width: 360px) {
  .seating-grid { --seat-w: min(68px, calc((100vw - 2rem) / 4)); gap: 0.4rem; }
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px)  {
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-line, .timeline-dot { display: none; }
}
@media (max-width: 640px)  {
  #modal-card { flex-direction: column; }
  .modal-photo { width: 100px; min-width: 100px; }
  #player-bar { grid-template-columns: auto 1fr; padding: 0 0.9rem; gap: 0.6rem; height: 68px; }
  .player-volume { display: none; }
  .player-controls { gap: 0.9rem; }
  #btn-play-pause { width: 32px; height: 32px; }
}
/* ─── ALBUM GRID OVERLAY ────────────────────────────── */
.album-grid-overlay {
  position: fixed; inset: 0; z-index: 9000;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s cubic-bezier(.4,0,.2,1), visibility 0.35s;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(12px);
}
.album-grid-overlay.open { opacity: 1; visibility: visible; }
.album-grid-backdrop { position: absolute; inset: 0; }
.album-grid-container {
  position: relative; z-index: 1; width: 95%; max-width: 1100px; max-height: 90vh;
  background: rgba(15,15,15,0.92); backdrop-filter: blur(20px);
  border: 1px solid rgba(34,211,238,0.15); border-radius: 20px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 0 80px rgba(34,211,238,0.1), 0 40px 80px rgba(0,0,0,0.7);
  animation: modalIn 0.4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.92) translateY(15px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.album-grid-header {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(10,10,10,0.85); backdrop-filter: blur(10px);
}
.album-grid-header h2 { font-size: 1.2rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.album-count { font-size: 0.8rem; color: var(--cyan); font-weight: 600; }
.album-close-btn {
  position: sticky; top: 1rem; right: 1rem; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  cursor: pointer; transition: background 0.2s, color 0.2s;
}
.album-close-btn:hover { background: var(--cyan); color: #000; }
.album-grid {
  padding: 1.5rem; overflow-y: auto; max-height: calc(90vh - 80px);
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  -webkit-overflow-scrolling: touch;
}
.album-card {
  position: relative; border-radius: 14px; overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-subtle);
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), border-color 0.25s ease;
  aspect-ratio: 3/4; display: flex; flex-direction: column;
}
.album-card:hover { transform: translateY(-3px); border-color: var(--cyan); }
.album-card img {
  width: 100%; height: 100%; object-fit: cover; flex: 1;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1);
}
.album-card:hover img { transform: scale(1.05); }
.album-info {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1rem; background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, transparent 60%);
}
.album-info h3 { font-size: 0.9rem; font-weight: 700; color: #fff; line-height: 1.3; margin: 0; }
.album-date { font-size: 0.68rem; color: var(--cyan); font-weight: 600; letter-spacing: 0.08em; margin-top: 0.25rem; display: block; }

/* ══════════════════════════════════════════════════════════════
   MOBILE / PORTRAIT — semua di satu blok supaya mudah dilacak.
   Tujuan: tidak ada tombol ketimpa, semua bisa di-scroll/di-reach,
   dan player musik tidak keluar layar.
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* 1. Hero & tinggi layar: pakai dvh/svh agar tidak terpotong address bar HP */
  .hero { height: 100vh; height: 100svh; min-height: 560px; }
  @media (max-width: 480px) {
    .hero-class  { font-size: .68rem; letter-spacing: .18em; padding: .35rem .8rem; }
    .hero-subtitle { letter-spacing: .28em; }
    .hero-desc { margin-top: 1.2rem; line-height: 1.6; }
  }
  @media (max-height: 620px) {
    .hero { min-height: 460px; }
    .scroll-arrow { display: none; }              /* panah bisa menutupi quick-nav */
  }

  /* 2. Sticky header: hormati notch / status bar HP */
  .page-back-bar {
    padding-top: calc(.6rem + env(safe-area-inset-top));
    padding-left: calc(1rem + env(safe-area-inset-left));
    padding-right: calc(1rem + env(safe-area-inset-right));
    min-height: 56px;
  }

  /* 3. Burger: target sentuh ≥44px & tidak keluar area notch */
  /* 4. Menu burger: boleh di-scroll di layar pendek, tidak ada item terpotong */
  @media (max-height: 620px) {
  }

/* 5. Player musik: muat di 320px, tombol tidak tertimpa.
      Collapsed (di luar popup) = hanya cover lingkaran kecil di kanan bawah. */
#player-bar {
  min-height: 64px;
  height: auto;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "info controls" "progress progress";
  gap: .35rem .5rem;
  padding: .45rem .75rem calc(.45rem + env(safe-area-inset-bottom));
}
/* — collapsed: cover saja (KECUALI saat bar dipindah ke popup Now Playing) — */
#player-bar:not(.in-popup) {
  left: auto;
  right: calc(.75rem + env(safe-area-inset-right));
  bottom: calc(.75rem + env(safe-area-inset-bottom));
  width: 58px; height: 58px; min-height: 0;
  padding: 0; gap: 0; border-radius: 50%;
  display: block; overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,.55), 0 0 0 1px rgba(34,211,238,.35);
}
#player-bar:not(.in-popup) .player-art {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}
#player-bar:not(.in-popup) > *:not(.player-left) { display: none !important; }
#player-bar:not(.in-popup) .player-left,
#player-bar:not(.in-popup) .player-left-row { height: 100%; margin: 0; }
#player-bar:not(.in-popup) .player-meta { display: none; }
#player-bar:not(.in-popup):not(.active) { display: none; }
#player-bar .player-left   { grid-area: info;     min-width: 0; }
  #player-bar .player-controls { grid-area: controls; gap: .5rem; }
  #player-bar .progress-wrap { grid-area: progress; }
  #player-bar .player-controls .ctrl-btn,
  #player-bar #btn-play-pause { width: 34px; height: 34px; font-size: .95rem; }
  #player-bar #btn-play-pause { width: 38px; height: 38px; }
  .player-art { width: 36px; height: 36px; }
  .player-track-name { font-size: .78rem; }
  .lyrics-box { height: 20px; }
  #oneui-seekbar { height: 26px; }
#time-current, #time-total { font-size: .58rem; }
/* player di dalam popup: 1 kolom, tinggi otomatis */
#player-bar.in-popup {
  grid-template-columns: 1fr !important;
  grid-template-areas: none !important;
  gap: .5rem; height: auto; min-height: 0;
  padding: .5rem 0 0;
}
/* Header halaman detail (album/event): tinggi ikut isi, judul tidak kepotong */
.ev-title-block { min-width: 0; flex: 1 1 auto; }
#event-title-bar {
  margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.25; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#event-date-bar { margin: 0; font-size: .72rem; line-height: 1.2; color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-title-bar { line-height: 1.25; }
/* Baris dalam: judul MEMBUKA/mengecil, bukan wrap ke baris baru
   (flex-wrap membuat judul terdorong keluar header & kepotong) */
#event-header > div { flex-wrap: nowrap; min-width: 0; }
#event-header .flex-grow-1 { flex: 1 1 0; min-width: 0; }
#photo-count-badge {
  background: var(--cyan-dim); border: 1px solid rgba(34,211,238,.3); color: var(--cyan);
  font-size: .65rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: center; gap: .3rem;
}
#event-header .back-btn { align-self: center; }
/* collapsed: cover kecil tidak butuh ruang bawah ekstra */
body.player-active { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

  /* Popup Now Playing: muat satu layar, sisanya scroll di dalam kartu
     (dulu max-height:none → lirik terpotong di HP) */
  #np-overlay {
    padding: calc(.75rem + env(safe-area-inset-top)) .75rem calc(.75rem + env(safe-area-inset-bottom));
    align-items: center; overflow: hidden;
  }
  #np-card {
    width: 100%; max-width: 420px; margin: auto;
    max-height: calc(100dvh - 1.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    padding: 1rem .9rem .9rem;
  }
  #np-art-wrap { width: min(190px, 48vw); margin-bottom: .7rem; }
  #np-meta { margin-bottom: .6rem; }
  .lyrics-box { max-height: 30vh; overflow-y: auto; }
  #np-close {
    width: 44px; height: 44px;                 /* target sentuh yang nyaman */
    top: calc(.5rem + env(safe-area-inset-top)); right: .5rem;
  }
  .np-lyrics-slot .lyrics-box { height: 96px; }
  /* player yang dipindah ke popup: tinggi otomatis, bukan 68px */
  #player-bar.in-popup { height: auto; min-height: 0; }
  #np-meta { text-align: center; }

  /* 7. Tombol carousel: boleh wrapping, tidak keluar layar */
  .carousel-controls, .flex.justify-center.mt-10 {
    flex-wrap: wrap; row-gap: .6rem;
  }
  /* 8. Galeri random: area isi boleh di-scroll, tombol kembali selalu terlihat */
  #rg-overlay { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  #rg-head {
    padding-top: calc(.5rem + env(safe-area-inset-top));
    padding-bottom: .5rem;
    position: sticky; top: 0;
  }
  #rg-back { min-height: 40px; display: inline-flex; align-items: center; }

  /* 9. Lightbox: tombol prev/next tidak menutupi gambar di layar sempit */
  .lb-btn { width: 40px; height: 40px; }
  #lightbox-counter { font-size: .7rem; }

  /* 10. Toast: tidak meluber di layar 320px, tetap di atas player */
  #toast-container {
    left: .75rem; right: .75rem;
    max-width: min(420px, calc(100vw - 1.5rem));
    bottom: calc(112px + env(safe-area-inset-bottom));
  }

  /* 11. Denah: JANGAN memberi overflow pada seating-grid — itu memotong popout */
  .seat .seat-popout { max-width: calc(100vw - 1rem); }
  /* 12. Modal siswa: tombol play selalu terlihat (tidak tertutup di layar pendek) */
  #modal-overlay { padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom)); overflow-y: auto; }
  .modal-song-row { flex-wrap: wrap; gap: .5rem; }
  .modal-song-play { min-height: 44px; }

}

/* 13. Semua tombol: area sentuh minimum 44px di HP */
@media (pointer: coarse) {
  .ctrl-btn { min-width: 44px; }
}

/* 14. HP landscape (tinggi layar pendek): player jadi 1 baris, tidak memakan layar */
@media (max-height: 480px) and (orientation: landscape) {
  #player-bar {
    grid-template-columns: minmax(0, 1fr) auto minmax(90px, 26vw);
    grid-template-areas: "info controls progress";
    align-items: center; gap: .5rem;
    padding: .3rem .75rem calc(.3rem + env(safe-area-inset-bottom));
  }
  #player-bar .lyrics-box, .player-art { display: none; }
  #player-bar .player-controls { gap: .35rem; }
  #player-bar .player-controls .ctrl-btn, #player-bar #btn-play-pause { width: 30px; height: 30px; }
  #np-art-wrap { width: min(140px, 24vw); }
  .np-lyrics-slot { display: none; }
  #np-card { max-width: 620px; padding: .8rem; }
  #np-overlay { align-items: center; }
  /* cover tetap bisa di-drag, sedikit lebih kecil */
  #player-bar:not(.in-popup) { width: 48px; height: 48px; }
}

/* ══════════════════════════════════════════════════════════════
   PERFORMA MOBILE — CPU/GPU: matikan efek mahal & animasi tak terlihat.
   (pointer: coarse = HP/tablet; desktop tidak tersentuh)
   ══════════════════════════════════════════════════════════════ */
@media (pointer: coarse) and (max-width: 1024px) {
  /* backdrop-filter & blur sangat berat di GPU HP */
  .seat .seat-popout, #np-card, .modal-card, #rg-head, .sticky, .glass {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* animasi terus-menerus yang tidak terlihat gainsya */
  #hero-bg { animation: none !important; }
  .hero-title { animation: none !important; }
  .scroll-arrow { animation: none !important; }
  .student-card:hover, .qn-card:hover { transform: none !important; }
  /* kurangi blur album/carousel */
  .carousel-item:not(.active) img { filter: brightness(.5) saturate(.6) !important; }
  /* teks & border lebih tebal = tidak perlu blur/shadow mahal */
  /* animasi scroll halus di HP sering bikin nge-lag */
  html { scroll-behavior: auto !important; }
}

/* ─── PERFORMA: section berat tidak dirender saat di luar layar (HP saja).
       Tampilan tidak berubah sama sekali — browser hanya menunda render
       section yang belum terlihat. Ini penyebab utama lag dari denah ke bawah. ─── */
@media (pointer: coarse) and (max-width: 1024px) {
  #seating-chart, #random-gallery, #carousel-section, #timeline, #movie {
    content-visibility: auto;
    contain-intrinsic-size: auto 900px;
  }
  #timeline img, #movie img, #carousel-section img, #random-gallery img {
    content-visibility: auto;
  }
}
