* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== Theme variables ===== */
:root{
  --bg: #050608;
  --fg: #ffffff;
  --muted: rgba(255,255,255,0.70);
  --muted2: rgba(255,255,255,0.55);
  --line: rgba(255,255,255,0.08);
  --panel: rgba(5,6,8,0.65);

  --bubble-a: #2f8cff;
  --bubble-b: #0a84ff;
  --bubble-shadow: rgba(0,0,0,0.40);
  --soft: rgba(255,255,255,0.35);
}

/* light mode */
body.light{
  --bg: #f5f7fb;
  --fg: #0b0c0e;
  --muted: rgba(0,0,0,0.65);
  --muted2: rgba(0,0,0,0.55);
  --line: rgba(0,0,0,0.10);
  --panel: rgba(245,247,251,0.70);

  --bubble-a: #2f8cff;
  --bubble-b: #00b0ff;
  --bubble-shadow: rgba(0,0,0,0.18);
  --soft: rgba(0,0,0,0.38);
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'IBM Plex Mono', monospace;
}

/* grain */
body::after{
  content:"";
  position: fixed;
  inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events:none;
  z-index: 0;
}

/* ========== TOP BAR / TABS ========== */
.topbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.tabs{
  display: flex;
  gap: 22px;
  justify-content: center;
  align-items: center;
  padding: 16px 14px;
}

.tab{
  appearance: none;
  background: none;
  border: none;
  color: var(--muted2);
  font-family: inherit;
  letter-spacing: 0.28em;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 6px;
  transition: opacity 200ms ease, color 200ms ease;
}

.tab:hover{ color: rgba(255,255,255,0.85); }
body.light .tab:hover{ color: rgba(0,0,0,0.85); }

.tab.is-active{ color: rgba(255,255,255,0.95); }
body.light .tab.is-active{ color: rgba(0,0,0,0.92); }

/* theme toggle button */
.theme-toggle{
  margin-left: 10px;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--fg);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  letter-spacing: normal;
}
body.light .theme-toggle{ background: rgba(0,0,0,0.03); }

/* main panels offset for fixed header */
.panels{
  position: relative;
  z-index: 1;
  padding-top: 62px;
}

/* show/hide panels */
.panel{ display: none; }
.panel.is-active{ display: block; }

/* ========== SECTIONS ========== */
.hero{
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 20px;
}

/* ========== (OLD PRESAVE CSS kept as-is) ========== */
.album{ text-align: center; letter-spacing: 0.12em; }
.status{ font-size: 15px; opacity: 0.75; margin-bottom: 26px; }
.title{ font-size: 44px; font-weight: 500; margin-bottom: 56px; }

.tracklist{
  font-size: 16px;
  line-height: 2.4;
  opacity: 0.85;
}
.track{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.track.show{ opacity: 1; transform: translateY(0); }

.presave-sentinel{ height: 1px; }
.presave-slot{ margin-top: 48px; }
.presave{
  font-size: 14px;
  letter-spacing: 0.35em;
  opacity: 0.95;
}
.presave a{ color: inherit; text-decoration: none; }
.presave a:hover{ text-decoration: underline; }
.presave.sticky{
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
}

/* digital */
.digital{ text-align: center; }
.digital-title{
  font-size: 15px;
  letter-spacing: 0.3em;
  opacity: 0.75;
  margin-bottom: 32px;
}
.cover{
  width: 300px;
  max-width: 80vw;
  cursor: pointer;
  transition: transform 0.4s ease;
}
.cover:hover{ transform: scale(1.04); }

/* ========== XVI-122 PANEL ========== */
.xvi{
  min-height: calc(100vh - 62px);
  padding: 64px 22px 110px;
  max-width: 980px;
  margin: 0 auto;
}

.xvi-head{ margin-bottom: 26px; text-align: left; }
.xvi-kicker{
  font-size: 12px;
  letter-spacing: 0.35em;
  opacity: 0.70;
  margin-bottom: 10px;
}
.xvi-title{
  font-size: 38px;
  letter-spacing: 0.18em;
  font-weight: 500;
  margin-bottom: 10px;
}
.xvi-sub{
  font-size: 13px;
  opacity: 0.70;
  line-height: 1.8;
}

.xvi-list{
  margin-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
body.light .xvi-list{ border-top: 1px solid rgba(0,0,0,0.10); }

.song{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  cursor: pointer;
}
body.light .song{ border-bottom: 1px solid rgba(0,0,0,0.10); }

.song:hover{ background: rgba(255,255,255,0.03); }
body.light .song:hover{ background: rgba(0,0,0,0.03); }

.song-left{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.song-num{
  width: 28px;
  text-align: right;
  opacity: 0.70;
  color: var(--fg);
}

.song-meta{ min-width: 0; }

.song-link{
  display: block;
  color: var(--fg);
  text-decoration: none;
}

.song-title{
  font-size: 14px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-sub{
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.70;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-link:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.95;
}

.song-right{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.song-time{
  font-size: 12px;
  opacity: 0.70;
  width: 48px;
  text-align: right;
  color: var(--fg);
}

.song-credits{
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.03);
  color: var(--fg);
  font-family: inherit;
  letter-spacing: 0.22em;
  font-size: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: opacity 200ms ease;
}
body.light .song-credits{
  border: 1px solid rgba(0,0,0,0.20);
  background: rgba(0,0,0,0.03);
}
.song-credits:hover{ opacity: 0.85; }

/* ========== SOCIALS PANEL ========== */
.socials{
  min-height: calc(100vh - 62px);
  padding: 64px 22px 110px;
  max-width: 980px;
  margin: 0 auto;
}

.social-grid{
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.social-card{
  display: block;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  padding: 18px;
  transition: transform 180ms ease, opacity 180ms ease;
  position: relative;
  overflow: hidden;
}
body.light .social-card{
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
}

.social-card:hover{
  transform: translateY(-2px);
  opacity: 0.95;
}

.social-tag{
  font-size: 11px;
  letter-spacing: 0.35em;
  opacity: 0.70;
}
.social-handle{
  margin-top: 14px;
  font-size: 18px;
  letter-spacing: 0.08em;
}
.social-hint{
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.70;
}

/* ========== PURCHASE MODAL ========== */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 120;
}

.modal.show{
  opacity: 1;
  pointer-events: all;
}

.modal-card{
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 36px;
  max-width: 740px;
  width: 90%;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.35s ease;
}
body.light .modal-card{ border: 1px solid rgba(0,0,0,0.15); }

.modal.show .modal-card{ transform: scale(1); }

.close{
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 22px;
  cursor: pointer;
  opacity: 0.75;
}
.close:hover{ opacity: 1; }

.modal-content{
  display: flex;
  gap: 36px;
  align-items: center;
}

.modal-cover{
  width: 240px;
  height: 240px;
  border: 2px solid var(--fg);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.modal-info h2{
  font-size: 22px;
  letter-spacing: 0.2em;
  margin-bottom: 18px;
}
.modal-info p{
  font-size: 14px;
  line-height: 1.9;
  opacity: 0.80;
  margin-bottom: 18px;
}
.price{
  font-size: 17px;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}
.purchase{
  display: inline-block;
  padding: 12px 26px;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-decoration: none;
  color: #000;
  background: #b7ff00;
}
.purchase:hover{ opacity: 0.85; }

/* ========== CREDITS DRAWER ========== */
.drawer{
  position: fixed;
  inset: 0;
  z-index: 130;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}
.drawer.is-open{
  opacity: 1;
  pointer-events: all;
}
.drawer-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

.drawer-panel{
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: #0b0c0e;
  border-left: 1px solid rgba(255,255,255,0.12);
  padding: 18px 18px 18px;
  transform: translateX(12px);
  transition: transform 220ms ease;
}
body.light .drawer-panel{
  background: #f5f7fb;
  border-left: 1px solid rgba(0,0,0,0.12);
}

.drawer.is-open .drawer-panel{ transform: translateX(0); }

.drawer-close{
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 22px;
  cursor: pointer;
  opacity: 0.75;
}
.drawer-close:hover{ opacity: 1; }

.drawer-top{
  padding-right: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
body.light .drawer-top{ border-bottom: 1px solid rgba(0,0,0,0.10); }

.drawer-track{
  font-size: 14px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-sub{
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.70;
}

.drawer-scroll{
  height: calc(100% - 150px);
  overflow: auto;
  padding-right: 8px;
}

.credits-section{
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.light .credits-section{ border-bottom: 1px solid rgba(0,0,0,0.08); }
.credits-section:last-child{ border-bottom: none; }

.credits-title{
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
}

.credits-list{
  list-style: none;
  padding-left: 0;
}

.credits-list li{
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
body.light .credits-list li{ border-top: 1px solid rgba(0,0,0,0.06); }
.credits-list li:first-child{ border-top: none; }

.credit-name{
  font-size: 14px;
  opacity: 0.95;
}

.credit-role{
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.65;
}

.drawer-foot{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.drawer-cta{
  display: block;
  text-align: center;
  padding: 12px 14px;
  letter-spacing: 0.2em;
  font-size: 12px;
  text-decoration: none;
  color: #000;
  background: #b7ff00;
}
.drawer-cta:hover{ opacity: 0.85; }

/* mobile tweaks */
@media (max-width: 600px){
  .modal-content{ flex-direction: column; text-align: center; }
  .social-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   COUNTDOWN PANEL (new)
   ========================================================= */
.countdown-panel{
  min-height: calc(100vh - 62px);
  display: grid;
  place-items: center;
  padding: 80px 20px;
  text-transform: lowercase;
}

.bubble-wrapper{
  display: inline-block;
  text-align: center;
}

/* bubble size exactly as your countdown version */
.bubble{
  min-width: 260px;
  max-width: 420px;
  padding: 18px 26px;
  border-radius: 999px;

  background: linear-gradient(135deg, var(--bubble-a), var(--bubble-b), var(--bubble-a));
  background-size: 220% 220%;
  background-position: var(--gx, 0%) var(--gy, 50%);

  color: white;
  font-size: 20px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 10px 30px var(--bubble-shadow);
  position: relative;

  transition: transform 250ms ease, filter 250ms ease;
}

.bubble::after{
  content: "";
  position: absolute;
  right: -10px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--bubble-a), var(--bubble-b), var(--bubble-a));
  background-size: 220% 220%;
  background-position: var(--gx, 0%) var(--gy, 50%);
  border-radius: 50%;
  transform: rotate(45deg);
}

#countdown{
  transition: opacity 250ms ease;
}
#countdown.fade-out{
  opacity: 0;
}

/* delivered stays where it used to be */
.delivered{
  margin-top: 10px;
  text-align: right;
  font-size: 16px;
  color: var(--muted);
}

/* way under bubble */
.date-line{
  margin-top: 32px;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.credits{
  margin-top: 22px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--soft);
}

/* states */
.ten-days .bubble{
  transform: scale(1.02);
}

.final-minute .bubble{
  transform: scale(1.03);
  filter: brightness(1.06);
}

.done .bubble{
  transform: scale(1.05);
  filter: brightness(1.12);
}

/* mobile perfect */
@media (max-width: 420px){
  .bubble{
    font-size: 17px;
    padding: 16px 20px;
  }
  #countdown{
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* =========================================================
   NOTICE BAR
   ========================================================= */

#siteNoticeBar{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;

  background: var(--bg);
  color: var(--fg);
  border-top: 1px solid var(--line);

  padding: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 300ms ease, transform 300ms ease;
}

#siteNoticeBar.show{
  opacity: 1;
  transform: translateY(0);
}

#siteNoticeBar.hide{
  opacity: 0;
  transform: translateY(10px);
}

.notice-inner{
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  gap: 30px;
  align-items: flex-start;
  justify-content: space-between;
}

.notice-text{
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.85;
}

.notice-btn{
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--fg);
  font-family: inherit;
  letter-spacing: 0.2em;
  font-size: 11px;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 200ms ease;
}

.notice-btn:hover{
  opacity: 0.8;
}

/* Mobile */
@media (max-width: 700px){
  .notice-inner{
    flex-direction: column;
    gap: 16px;
  }

  .notice-btn{
    width: 100%;
    text-align: center;
  }
}
