/* ============================================================
   DANCING ALARM — 2005 teen-site fever dream
   ============================================================ */
:root {
  --hot: #ff3fae;
  --hot-dark: #d4148f;
  --pink: #ff8ed4;
  --pink-soft: #ffd1ec;
  --pink-pale: #fff0f9;
  --blue: #7fe0ff;
  --blue-soft: #c8f2ff;
  --blue-deep: #35a9e0;
  --purple: #6d3bbf;
  --lemon: #fff36b;
  --ink: #33173d;
  --ink-soft: #6f5277;
  --white: #fffafd;
  --chrome-a: #ffffff;
  --chrome-b: #d9e3ec;
  --chrome-c: #9aa7b8;
  --shadow: 0 10px 0 rgba(51, 23, 61, 0.12), 0 18px 34px rgba(51, 23, 61, 0.14);
  --radius: 26px;
  --font-display: 'Bungee', 'Arial Black', sans-serif;
  --font-body: 'Nunito', 'Trebuchet MS', sans-serif;
  --font-pixel: 'Silkscreen', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, #ffe3f5 0%, transparent 42%),
    radial-gradient(circle at 88% 4%, #d8f6ff 0%, transparent 38%),
    radial-gradient(circle at 50% 100%, #ffd9f0 0%, transparent 55%),
    linear-gradient(160deg, #fff8fd 0%, #ffeaf7 45%, #e8faff 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
.hidden { display: none !important; }

/* ---------- ambient decoration ---------- */
.bg-glitter {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,79,184,.35) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(127,224,255,.5) 0 1.2px, transparent 1.6px);
  background-size: 74px 74px, 113px 113px, 157px 157px;
  background-position: 0 0, 34px 61px, 87px 23px;
  opacity: .55;
  animation: glitterDrift 28s linear infinite;
}
@keyframes glitterDrift {
  from { background-position: 0 0, 34px 61px, 87px 23px; }
  to { background-position: 74px 148px, 147px 287px, 244px 337px; }
}
.bg-stickers { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sticker {
  position: absolute;
  font-size: 34px;
  opacity: .5;
  filter: saturate(1.2);
  animation: floaty 9s ease-in-out infinite;
  text-shadow: 0 4px 10px rgba(255, 79, 184, .25);
}
.s1 { top: 18%; left: 3%; animation-delay: -1s; font-size: 44px; }
.s2 { top: 64%; left: 6%; animation-delay: -3s; }
.s3 { top: 36%; right: 4%; animation-delay: -2s; font-size: 48px; }
.s4 { top: 82%; right: 7%; animation-delay: -4s; font-size: 38px; }
.s5 { top: 56%; right: 12%; animation-delay: -5s; font-size: 28px; opacity: .4; }
.s6 { top: 8%; left: 46%; animation-delay: -2.5s; font-size: 26px; }
.s7 { top: 90%; left: 38%; animation-delay: -6s; font-size: 30px; opacity: .35; }
.s8 { top: 27%; right: 18%; animation-delay: -7s; font-size: 26px; opacity: .35; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

/* ---------- layout ---------- */
.site-header,
.slogan-marquee,
.main-nav,
.page-wrap,
.site-footer { position: relative; z-index: 2; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px 8px;
}
.brand { display: flex; align-items: center; gap: 8px; }
.baila-launcher {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  width: 100px;
  height: 100px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform .25s;
}
.baila-launcher:hover { transform: rotate(-4deg) scale(1.06); }
.baila-launcher:active { transform: scale(.96); }
.baila-mini { display: block; width: 96px; height: 96px; filter: drop-shadow(0 8px 12px rgba(53, 169, 224, .35)); }
.baila-mini svg { width: 100%; height: 100%; overflow: visible; }
.baila-hi {
  position: absolute;
  right: -34px;
  top: 4px;
  background: var(--white);
  border: 2px solid var(--hot);
  border-radius: 20px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--hot-dark);
  padding: 5px 7px;
  transform: rotate(8deg);
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(255, 63, 174, .25);
  animation: hiBounce 3.4s ease-in-out infinite;
}
.baila-hi::after {
  content: '';
  position: absolute;
  left: -7px;
  bottom: 1px;
  width: 10px; height: 10px;
  background: var(--white);
  border-left: 2px solid var(--hot);
  border-bottom: 2px solid var(--hot);
  transform: rotate(45deg);
}
@keyframes hiBounce { 0%,100% { transform: rotate(8deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-4px); } }

.logo h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 44px);
  line-height: .95;
  letter-spacing: .5px;
  color: var(--hot-dark);
  text-shadow:
    0 1px 0 #fff, 0 2px 0 #ffc2e6, 0 3px 0 #ff9dd9,
    0 5px 0 rgba(212, 20, 143, .55), 0 9px 18px rgba(255, 63, 174, .35);
}
.logo h1 em {
  font-style: normal;
  color: var(--blue-deep);
  text-shadow:
    0 1px 0 #fff, 0 2px 0 #bdf1ff, 0 3px 0 #86dcff,
    0 5px 0 rgba(53, 169, 224, .5), 0 9px 18px rgba(53, 169, 224, .3);
}
.logo-disc { font-size: .75em; filter: drop-shadow(0 4px 6px rgba(0,0,0,.2)); }
.tagline {
  margin: 6px 0 0 4px;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .5px;
  color: var(--hot);
  text-transform: uppercase;
}
.header-right { text-align: right; flex: none; }
.live-clock {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--purple);
  text-shadow: 0 2px 0 #fff, 0 4px 0 rgba(109, 59, 191, .18);
  letter-spacing: 1px;
}
.tz-line {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--ink-soft);
  letter-spacing: .5px;
}

/* ---------- slogan marquee ---------- */
.slogan-marquee {
  max-width: 1180px;
  margin: 4px auto 0;
  padding: 9px 0;
  overflow: hidden;
  border-top: 2px dashed rgba(255, 63, 174, .45);
  border-bottom: 2px dashed rgba(53, 169, 224, .45);
  background: linear-gradient(90deg, rgba(255, 255, 255, .6), rgba(255, 214, 240, .55), rgba(214, 245, 255, .6));
}
.slogan-track {
  display: flex;
  gap: 34px;
  width: max-content;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 1.4px;
  color: var(--hot-dark);
  white-space: nowrap;
  animation: marquee 32s linear infinite;
}
.slogan-star { color: var(--blue-deep); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- nav ---------- */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 16px 4px;
  max-width: 1180px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.nav-btn {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 15px;
  color: var(--purple);
  background: rgba(255, 255, 255, .65);
  border: 2px solid rgba(109, 59, 191, .18);
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  transition: all .2s;
  backdrop-filter: blur(6px);
}
.nav-btn:hover { transform: translateY(-2px); border-color: var(--hot); color: var(--hot-dark); }
.nav-btn.is-active {
  background: linear-gradient(180deg, #fff 0%, #ffd9ef 55%, #ffb6e0 100%);
  border-color: var(--hot);
  color: var(--hot-dark);
  box-shadow: 0 4px 0 rgba(255, 63, 174, .35), inset 0 1px 0 #fff;
}
.nav-btn span { margin-right: 4px; }

/* ---------- pages / cards ---------- */
.page-wrap { max-width: 1180px; margin: 0 auto; padding: 16px 22px 60px; }
.page { display: none; animation: pageIn .4s ease both; }
.page.is-active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.card {
  background: linear-gradient(170deg, rgba(255,255,255,.94), rgba(255, 244, 251, .9));
  border: 2px solid rgba(255, 63, 174, .3);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow), inset 0 2px 0 rgba(255,255,255,.9);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: calc(var(--radius) - 8px);
  border: 1px dashed rgba(255, 63, 174, .16);
  pointer-events: none;
}
.card > * { position: relative; }
.card h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .4px;
  color: var(--hot-dark);
  text-shadow: 0 2px 0 #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head h3 { margin-bottom: 14px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--hot-dark);
  background: rgba(255, 255, 255, .7);
  border: 1.5px dashed var(--hot);
  border-radius: 999px;
  padding: 5px 10px;
  margin-bottom: 12px;
}
.pixel-label { font-family: var(--font-pixel); font-size: 8px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.small { font-size: 12.5px; }
.center { text-align: center; }
.page-sub { margin: 6px 0 0; color: var(--ink-soft); max-width: 640px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  border-radius: 34px;
  padding: 34px 36px 30px;
  margin: 14px 0 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .85) 0%, transparent 32%),
    radial-gradient(circle at 12% 92%, rgba(255, 255, 255, .35) 0%, transparent 40%),
    linear-gradient(120deg, #ff9cd8 0%, #ff5cbb 38%, #7fd8ff 100%);
  border: 3px solid #fff;
  box-shadow: 0 14px 0 rgba(53, 169, 224, .25), 0 22px 50px rgba(255, 63, 174, .35);
  min-height: 330px;
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(255, 255, 255, .55);
  border-radius: 26px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.85) 0 1.5px, transparent 2px),
    radial-gradient(circle, rgba(255,255,255,.45) 0 1px, transparent 1.6px);
  background-size: 90px 90px, 57px 57px;
  background-position: 10px 20px, 44px 8px;
  opacity: .7;
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; max-width: 560px; }
.hero-copy .eyebrow { background: rgba(255,255,255,.8); border-color: #fff; color: var(--hot-dark); }
.hero h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.02;
  color: #fff;
  text-shadow:
    0 2px 0 #ff9dd9, 0 4px 0 rgba(212, 20, 143, .55),
    0 8px 0 rgba(109, 59, 191, .25), 0 14px 30px rgba(51, 23, 61, .28);
  letter-spacing: .5px;
}
.hero-sub { color: #3a1c48; font-size: 15.5px; line-height: 1.6; max-width: 490px; margin: 0 0 20px; font-weight: 600; }
.hero-sub strong { color: #fff; text-shadow: 0 1px 2px rgba(109, 59, 191, .5); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-fine { font-family: var(--font-pixel); font-size: 8.5px; color: rgba(51, 23, 61, .72); margin: 16px 0 0; max-width: 430px; line-height: 1.7; }
.hero-baila { position: absolute; right: 14px; bottom: -8px; width: 300px; max-width: 36vw; z-index: 2; filter: drop-shadow(0 16px 22px rgba(51, 23, 61, .3)); }
.hero-baila svg { width: 100%; height: auto; overflow: visible; }
.hero-sparkles span { position: absolute; color: #fff; font-size: 30px; text-shadow: 0 0 14px #fff; animation: sparkle 2.6s ease-in-out infinite; }
.hero-sparkles span:nth-child(1) { top: 40px; right: 300px; animation-delay: 0s; }
.hero-sparkles span:nth-child(2) { top: 120px; right: 120px; font-size: 22px; animation-delay: .8s; }
.hero-sparkles span:nth-child(3) { bottom: 46px; right: 330px; font-size: 18px; animation-delay: 1.4s; }
@keyframes sparkle { 0%,100% { opacity: .2; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(20deg); } }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .2px;
  border: 2px solid rgba(51, 23, 61, .22);
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, filter .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  position: relative;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,.2);
  box-shadow: 0 5px 0 rgba(51, 23, 61, .18), inset 0 2px 0 rgba(255,255,255,.55);
  background: linear-gradient(180deg, #ff79c9 0%, var(--hot) 48%, var(--hot-dark) 100%);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 7px 0 rgba(51, 23, 61, .18), inset 0 2px 0 rgba(255,255,255,.55); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(51, 23, 61, .18), inset 0 2px 0 rgba(255,255,255,.35); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.btn-hot { background: linear-gradient(180deg, #ff8ed4 0%, #ff3fae 45%, #c91087 100%); }
.btn-chrome {
  color: var(--purple);
  text-shadow: 0 1px 0 #fff;
  background: linear-gradient(180deg, #ffffff 0%, #eef3f8 42%, #cdd8e4 72%, #eef4f9 100%);
  border-color: #9fb0c3;
  box-shadow: 0 5px 0 #9fb0c3, inset 0 2px 0 #fff, inset 0 -4px 8px rgba(120,140,165,.25);
}
.btn-chrome:hover { box-shadow: 0 7px 0 #9fb0c3, inset 0 2px 0 #fff, inset 0 -4px 8px rgba(120,140,165,.25); }
.btn-tap { background: linear-gradient(180deg, #a4ecff 0%, #52c8f1 48%, #1e8fc4 100%); }
.btn-party { background: linear-gradient(180deg, #ffe98a 0%, #ffb52e 45%, #ff7a00 100%); color: #5a2400; text-shadow: 0 1px 0 #fff2c7; border-color: #d96a00; }
.btn-danger { background: linear-gradient(180deg, #ff7a8a 0%, #e01b45 50%, #a30024 100%); }
.btn-sm { padding: 8px 16px; font-size: 13px; box-shadow: 0 3px 0 rgba(51,23,61,.18); }
.btn-wide { width: 100%; }
.btn-jumbo { padding: 18px 34px; font-size: 20px; font-family: var(--font-display); letter-spacing: .5px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.text-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
  padding: 6px;
}
.text-btn:hover { color: var(--hot-dark); }
.icon-btn {
  background: rgba(255,255,255,.7);
  border: 2px solid rgba(109,59,191,.2);
  border-radius: 50%;
  width: 42px; height: 42px;
  font-size: 17px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform .2s;
}
.icon-btn:hover { transform: scale(1.08); }

/* ---------- home grid ---------- */
.home-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 22px; }
.alarms-card { min-height: 300px; }
.how-card { background: linear-gradient(165deg, #fff8fd, #e9f9ff); }
.how-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 13px; }
.how-steps li { display: flex; gap: 11px; align-items: flex-start; }
.how-num {
  flex: none;
  width: 27px; height: 27px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 13px;
  color: #fff;
  background: linear-gradient(180deg, #ff8ed4, var(--hot-dark));
  box-shadow: 0 3px 0 rgba(212, 20, 143, .35), inset 0 1px 0 rgba(255,255,255,.6);
  margin-top: 1px;
}
.how-steps strong { font-size: 14px; }
.how-steps p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.how-card .btn-wide { margin-top: 4px; }

/* next alarm */
.next-alarm {
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 16px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,255,255,.7), transparent 45%),
    linear-gradient(120deg, #e5f8ff, #ffe6f5);
  border: 2px dashed rgba(53, 169, 224, .45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.next-alarm .na-label { font-family: var(--font-pixel); font-size: 8px; color: var(--blue-deep); letter-spacing: .8px; }
.next-alarm .na-time { font-family: var(--font-display); font-size: 32px; line-height: 1.05; color: var(--purple); text-shadow: 0 2px 0 #fff; }
.next-alarm .na-meta { font-size: 12.5px; color: var(--ink-soft); font-weight: 700; margin-top: 3px; }
.next-alarm .na-in { text-align: right; }
.next-alarm .na-count { font-family: var(--font-display); font-size: 20px; color: var(--hot-dark); }
.next-alarm .na-sub { font-family: var(--font-pixel); font-size: 8px; color: var(--ink-soft); }
.next-alarm .na-none { font-size: 13.5px; color: var(--ink-soft); font-weight: 700; }
.next-alarm .na-none strong { color: var(--hot-dark); }

/* alarm list */
.alarm-list { display: grid; gap: 11px; }
.alarm-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  border: 2px solid rgba(255, 63, 174, .18);
  transition: all .2s;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.alarm-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--pink), var(--hot));
}
.alarm-item:hover { border-color: rgba(255, 63, 174, .45); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(255, 63, 174, .12); }
.alarm-item.is-off { opacity: .58; filter: grayscale(.35); }
.alarm-item.is-off::before { background: #b9b9c9; }
.alarm-time-box { min-width: 86px; }
.alarm-time {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  color: var(--purple);
  letter-spacing: .5px;
}
.alarm-time sup { font-size: 11px; color: var(--hot); margin-left: 2px; }
.alarm-name { font-weight: 900; font-size: 14px; margin-top: 3px; }
.alarm-meta { font-size: 11.5px; color: var(--ink-soft); font-weight: 700; margin-top: 2px; }
.alarm-meta .dot { margin: 0 5px; opacity: .5; }
.alarm-song { font-size: 12px; color: var(--blue-deep); font-weight: 800; margin-top: 3px; }
.alarm-actions { margin-left: auto; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.alarm-actions .icon-btn { width: 36px; height: 36px; font-size: 14px; }
.alarm-actions .icon-btn.danger:hover { border-color: #e01b45; background: #ffe5ea; }
.empty-alarms {
  text-align: center;
  padding: 26px 16px;
  border: 2px dashed rgba(255, 63, 174, .3);
  border-radius: 18px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13.5px;
  background: rgba(255,255,255,.4);
}
.empty-alarms span { display: block; font-size: 34px; margin-bottom: 8px; }

/* switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  width: 46px; height: 26px;
  border-radius: 999px;
  background: #d9d2e0;
  border: 2px solid #b9aec4;
  position: relative;
  transition: all .2s;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.14);
  flex: none;
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: linear-gradient(180deg, #fff, #e8e2ee);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,.22);
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
}
.switch input:checked + .switch-track { background: linear-gradient(180deg, #ff9bd8, var(--hot)); border-color: var(--hot-dark); }
.switch input:checked + .switch-track::after { left: 22px; }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--purple); outline-offset: 2px; }
.switch-text { font-weight: 800; font-size: 13px; color: var(--ink-soft); }
.inline-switch { margin-top: 4px; }

/* party banner */
.party-banner {
  margin-top: 22px;
  border-radius: 28px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.55), transparent 40%),
    linear-gradient(100deg, #ffe27a 0%, #ff9c3f 35%, #ff3fae 100%);
  border: 3px solid #fff;
  box-shadow: 0 12px 0 rgba(255, 122, 0, .3), 0 18px 36px rgba(255, 63, 174, .25);
  flex-wrap: wrap;
}
.party-eyebrow { font-family: var(--font-pixel); font-size: 9px; color: #6b2a00; letter-spacing: .8px; }
.party-banner h3 { margin: 5px 0 5px; font-family: var(--font-display); font-size: 21px; color: #581a00; text-shadow: 0 2px 0 rgba(255,255,255,.5); }
.party-banner p { margin: 0; font-size: 13px; color: #6b2a00; font-weight: 700; max-width: 560px; line-height: 1.5; }
.btn-party { flex: none; }

/* ---------- music ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 14px 0 20px; flex-wrap: wrap; }
.page-head h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 38px); color: var(--hot-dark); text-shadow: 0 2px 0 #fff, 0 5px 0 rgba(255, 63, 174, .2); }
.page-head-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.music-toolbar {
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap;
  background: rgba(255,255,255,.6);
  border: 2px dashed rgba(53,169,224,.3);
  border-radius: 20px; padding: 12px 16px;
}
.text-input, .select-input {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(109, 59, 191, .25);
  border-radius: 12px;
  padding: 10px 13px;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.text-input:focus, .select-input:focus {
  outline: none;
  border-color: var(--hot);
  box-shadow: 0 0 0 4px rgba(255, 63, 174, .16);
}
.music-toolbar .text-input { max-width: 320px; }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 13px;
  border-radius: 999px;
  border: 2px solid rgba(109, 59, 191, .2);
  background: #fff;
  color: var(--purple);
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--hot); transform: translateY(-1px); }
.chip.is-active {
  background: linear-gradient(180deg, #ff8ed4, var(--hot));
  color: #fff;
  border-color: var(--hot-dark);
  box-shadow: 0 3px 0 rgba(212,20,143,.25);
}

.music-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.song-card {
  background: rgba(255,255,255,.84);
  border: 2px solid rgba(255, 63, 174, .2);
  border-radius: 20px;
  padding: 13px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.song-card:hover { transform: translateY(-3px); border-color: rgba(255,63,174,.5); box-shadow: 0 10px 22px rgba(255,63,174,.16); }
.song-art {
  width: 62px; height: 62px;
  flex: none;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 26px;
  border: 2px solid #fff;
  box-shadow: 0 4px 8px rgba(51,23,61,.18), inset 0 2px 0 rgba(255,255,255,.6);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ff9bd8, #7fd8ff);
}
.song-art::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.22) 0 6px, transparent 6px 12px);
  opacity: .5;
}
.song-art.is-party { background: linear-gradient(135deg, #ffe36e, #ff8a2a 55%, #ff3fae); }
.song-art.is-mj { background: linear-gradient(135deg, #f7f7f7, #c7c7d6 45%, #6d3bbf); }
.song-art.is-modern { background: linear-gradient(135deg, #b6f3ff, #6f8bff 55%, #c86bff); }
.song-art span { position: relative; z-index: 1; }
.song-info { min-width: 0; flex: 1; }
.song-title { font-weight: 900; font-size: 14.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-artist { font-size: 12px; font-weight: 800; color: var(--hot-dark); margin-top: 2px; }
.song-meta { font-family: var(--font-pixel); font-size: 7.5px; color: var(--ink-soft); margin-top: 5px; letter-spacing: .3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vibe-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ffe0f2;
  color: var(--hot-dark);
  letter-spacing: .2px;
}
.vibe-tag.party { background: #fff0b3; color: #8a4b00; }
.song-actions { display: flex; flex-direction: column; gap: 5px; flex: none; }
.preview-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--hot);
  background: #fff;
  color: var(--hot-dark);
  font-size: 13px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: all .18s;
}
.preview-btn:hover { background: var(--hot); color: #fff; transform: scale(1.08); }
.preview-btn.is-playing { background: var(--hot); color: #fff; animation: pulsePlay 1s ease-in-out infinite; }
@keyframes pulsePlay { 0%,100% { box-shadow: 0 0 0 0 rgba(255,63,174,.5); } 50% { box-shadow: 0 0 0 8px rgba(255,63,174,0); } }
.song-use {
  font-size: 9.5px;
  font-weight: 900;
  border: 0;
  background: none;
  color: var(--blue-deep);
  cursor: pointer;
  text-decoration: underline;
  padding: 2px;
}
.song-use:hover { color: var(--hot-dark); }
.empty-note { text-align: center; padding: 26px; color: var(--ink-soft); font-weight: 700; font-size: 13.5px; }

.upload-card { margin-top: 24px; }
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 28px 18px;
  border: 2.5px dashed rgba(53, 169, 224, .55);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(232,250,255,.8), rgba(255,240,249,.65));
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  margin-top: 12px;
}
.drop-zone:hover, .drop-zone.is-drag { border-color: var(--hot); background: #fff0f9; transform: scale(1.005); }
.drop-icon { font-size: 32px; }
.drop-zone strong { font-size: 14px; }
.upload-list { display: grid; gap: 9px; margin-top: 14px; }
.upload-item {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border: 2px solid rgba(53,169,224,.22);
  padding: 10px 13px; border-radius: 14px; flex-wrap: wrap;
}
.upload-item .u-name { font-weight: 900; font-size: 13px; flex: 1; min-width: 120px; word-break: break-word; }
.upload-item .u-size { font-family: var(--font-pixel); font-size: 7.5px; color: var(--ink-soft); }
.upload-item .icon-btn { width: 32px; height: 32px; font-size: 13px; }

/* ---------- setup ---------- */
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.setup-wide { grid-column: 1 / -1; }
.readiness-list { display: grid; gap: 9px; margin-bottom: 6px; }
.ready-item { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; }
.ready-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.ready-dot.ok { background: #2fc06b; box-shadow: 0 0 0 3px rgba(47,192,107,.18); }
.ready-dot.warn { background: #ffb52e; box-shadow: 0 0 0 3px rgba(255,181,46,.2); }
.ready-dot.bad { background: #e01b45; box-shadow: 0 0 0 3px rgba(224,27,69,.15); }
.ready-item span:last-child { margin-left: auto; font-family: var(--font-pixel); font-size: 7.5px; color: var(--ink-soft); }

.reliability-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.reliability-table th {
  text-align: left;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: .4px;
  color: var(--ink-soft);
  padding: 7px 6px;
  border-bottom: 2px solid rgba(255,63,174,.25);
}
.reliability-table td { padding: 9px 6px; border-bottom: 1px dashed rgba(109,59,191,.14); font-weight: 700; }
.reliability-table td.ok { color: #1d9450; }
.reliability-table td.warn { color: #b47400; }
.reliability-table td.bad { color: #c2163c; }

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(109,59,191,.12);
  font-size: 13px;
  font-weight: 800;
  flex-wrap: wrap;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row label:first-child { flex: 1; min-width: 130px; }
.setting-row input[type="range"] { width: 130px; accent-color: var(--hot); }
.setting-row output { font-family: var(--font-pixel); font-size: 8px; color: var(--hot-dark); min-width: 46px; text-align: right; }
.setting-row .select-input { width: 160px; }
.setting-row .switch { margin-left: auto; }
.fine-print { margin: 0; padding-left: 18px; display: grid; gap: 9px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }
.fine-print strong { color: var(--ink); }
.small.note { margin-top: 8px; }

/* ---------- footer ---------- */
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px 34px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--ink-soft);
  border-top: 2px dashed rgba(255,63,174,.25);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(51, 23, 61, .45);
  backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: linear-gradient(170deg, #fffdfd, #fff1f9 60%, #eefaff);
  border: 3px solid #fff;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(51, 23, 61, .35), 0 0 0 4px rgba(255, 63, 174, .22);
  padding: 28px;
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  position: relative;
  animation: popIn .28s cubic-bezier(.34,1.4,.64,1);
}
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(14px); } to { opacity: 1; transform: none; } }
.modal h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 23px; color: var(--hot-dark); text-shadow: 0 2px 0 #fff; }
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255,63,174,.3);
  background: #fff;
  color: var(--hot-dark);
  font-weight: 900;
  cursor: pointer;
  z-index: 2;
  font-size: 14px;
}
.modal-close:hover { background: var(--hot); color: #fff; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* Baila help */
.baila-modal { width: min(680px, 100%); }
.baila-hero { display: flex; gap: 14px; align-items: center; margin: 6px 0 14px; padding-right: 30px; }
.baila-big { width: 150px; height: 150px; flex: none; }
.baila-big svg { width: 100%; height: 100%; overflow: visible; }
.baila-quote { font-size: 14.5px; font-weight: 800; font-style: italic; color: var(--purple); margin: 0; line-height: 1.5; }
.help-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.help-tab {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 13px;
  border-radius: 999px;
  border: 2px solid rgba(109,59,191,.18);
  background: #fff;
  color: var(--purple);
  cursor: pointer;
}
.help-tab.is-active { background: var(--hot); color: #fff; border-color: var(--hot-dark); }
.help-panel { display: none; background: rgba(255,255,255,.7); border: 2px dashed rgba(255,63,174,.22); border-radius: 16px; padding: 16px 18px; }
.help-panel.is-active { display: block; animation: fadeIn .2s; }
.help-panel h4 { margin: 0 0 8px; font-size: 15px; color: var(--hot-dark); }
.help-panel ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.help-panel strong { color: var(--ink); }

/* Alarm form */
.alarm-modal { width: min(700px, 100%); }
.form-row { display: grid; gap: 13px; margin-bottom: 13px; }
.form-row.two { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 900; color: var(--ink-soft); }
.field > span { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.field em { font-style: normal; font-family: var(--font-pixel); font-size: 8px; color: var(--hot-dark); }
.quick-times { display: flex; gap: 6px; flex-wrap: wrap; margin: -3px 0 16px; }
.field-group { border: 2px dashed rgba(109,59,191,.18); border-radius: 16px; padding: 14px; margin: 0 0 14px; }
.field-group legend { font-size: 12px; font-weight: 900; color: var(--ink-soft); padding: 0 6px; }
.weekday-row { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.day-chip {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(109,59,191,.22);
  background: #fff;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 13px;
  color: var(--purple);
  cursor: pointer;
  transition: all .15s;
}
.day-chip:hover { border-color: var(--hot); }
.day-chip.is-on { background: linear-gradient(180deg, #ff8ed4, var(--hot)); color: #fff; border-color: var(--hot-dark); box-shadow: 0 3px 0 rgba(212,20,143,.3); }
.date-field { margin-top: 10px; }
.custom-duration { margin-bottom: 13px; }
.alarm-preview {
  background: linear-gradient(120deg, rgba(229,248,255,.8), rgba(255,230,245,.8));
  border: 2px dashed rgba(53,169,224,.45);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  margin-top: 4px;
}
.alarm-preview strong { color: var(--hot-dark); }
.alarm-preview .warn { color: #a86800; }
.form-error {
  margin: 10px 0 0;
  padding: 10px 13px;
  border-radius: 12px;
  background: #ffe4ea;
  border: 2px solid #e01b45;
  color: #a30024;
  font-size: 12.5px;
  font-weight: 800;
}

/* assign */
.assign-list { display: grid; gap: 8px; margin-top: 12px; }
.assign-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(255,63,174,.2);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: all .15s;
  width: 100%;
}
.assign-item:hover { border-color: var(--hot); background: #fff4fb; transform: translateX(2px); }
.assign-time { font-family: var(--font-display); font-size: 17px; color: var(--purple); flex: none; }
.assign-name { font-weight: 900; font-size: 13px; }
.assign-meta { font-size: 11px; color: var(--ink-soft); }

/* camera modal */
.camera-modal { width: min(680px, 100%); }
.camera-stage {
  position: relative;
  margin: 12px 0;
  border-radius: 18px;
  overflow: hidden;
  background: #2a1035;
  aspect-ratio: 16 / 9;
  border: 3px solid #fff;
  box-shadow: inset 0 0 30px rgba(0,0,0,.5);
}
.camera-stage video, .camera-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.camera-stage canvas { pointer-events: none; }
.camera-badge {
  position: absolute;
  left: 10px; bottom: 10px;
  background: rgba(42,16,53,.75);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}
.calibration-status {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.8);
  border: 2px dashed rgba(255,63,174,.25);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 4px;
}
.calibration-status.ok { border-color: #2fc06b; background: #e9fff2; color: #146c38; }
.calibration-status.bad { border-color: #ffb52e; background: #fff8e6; color: #8a5a00; }

/* emergency */
.emergency-modal { border-color: #ffd0d8; box-shadow: 0 24px 60px rgba(51,23,61,.4), 0 0 0 4px rgba(224,27,69,.25); }
.emergency-modal h3 { color: #c2163c; }
.emergency-modal p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* toasts */
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 500; display: grid; gap: 9px; max-width: 340px; }
.toast {
  background: linear-gradient(170deg, #fff, #fff1f9);
  border: 2px solid var(--hot);
  border-radius: 14px;
  padding: 12px 15px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(255,63,174,.25);
  animation: toastIn .25s ease both;
}
.toast.warn { border-color: #ffb52e; box-shadow: 0 8px 22px rgba(255,181,46,.3); }
.toast.bad { border-color: #e01b45; box-shadow: 0 8px 22px rgba(224,27,69,.25); }
.toast.out { animation: toastOut .25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ============================================================
   CHALLENGE OVERLAY
   ============================================================ */
.challenge {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  color: #fff;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.challenge-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 230, 120, .35), transparent 40%),
    radial-gradient(circle at 82% 14%, rgba(127, 224, 255, .5), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(255, 63, 174, .6), transparent 55%),
    linear-gradient(135deg, #3b0a55 0%, #7a1058 38%, #1f5c8c 100%);
  background-size: 200% 200%;
  animation: partyBg 14s ease-in-out infinite alternate;
}
.challenge-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1.5px, transparent 2px),
    radial-gradient(circle, rgba(255,255,255,.5) 0 2px, transparent 2.6px);
  background-size: 110px 110px, 67px 67px;
  background-position: 0 0, 30px 40px;
  opacity: .5;
  animation: glitterDrift 20s linear infinite;
}
@keyframes partyBg { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

.challenge-stage {
  display: none;
  min-height: 100vh;
  padding: 24px clamp(16px, 4vw, 46px);
  align-items: center;
  justify-content: center;
}
.challenge-stage.is-active { display: flex; animation: pageIn .35s ease both; }

/* setup */
.setup-panel {
  width: min(560px, 100%);
  background: rgba(255, 255, 255, .12);
  border: 3px solid rgba(255, 255, 255, .55);
  border-radius: 34px;
  padding: clamp(20px, 3vw, 32px);
  text-align: center;
  backdrop-filter: blur(14px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .35), inset 0 0 60px rgba(255, 255, 255, .06);
  margin: auto;
}
.challenge-eyebrow { font-family: var(--font-pixel); font-size: 8.5px; letter-spacing: 1px; color: #ffe987; }
.challenge-title {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(34px, 7vw, 58px);
  line-height: .98;
  color: #fff;
  text-shadow: 0 3px 0 #ff3fae, 0 7px 0 rgba(212,20,143,.6), 0 14px 30px rgba(0,0,0,.4);
}
.challenge-title span { color: #ffe36e; text-shadow: 0 3px 0 #ff8a2a, 0 7px 0 rgba(217,106,0,.6), 0 14px 30px rgba(0,0,0,.4); }
.challenge-song { font-family: var(--font-pixel); font-size: 10px; color: #c8f2ff; margin: 6px 0 12px; line-height: 1.6; }
.setup-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.5);
  color: #fff;
}
.camera-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0,0,0,.4);
  border: 2px solid rgba(255,255,255,.35);
  margin-bottom: 14px;
}
.camera-preview video, .camera-preview canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.camera-overlay {
  position: absolute;
  z-index: 4;
  left: 9px; bottom: 9px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 7.5px;
  padding: 5px 8px;
  border-radius: 7px;
  max-width: 90%;
  line-height: 1.4;
}
.setup-actions { display: grid; gap: 9px; }
.setup-panel .muted { color: rgba(255,255,255,.75); margin: 10px 0 4px; }
.emergency-link { color: rgba(255,255,255,.6); margin-top: 6px; }
.emergency-link:hover { color: #ffe36e; }

/* live */
.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .9fr);
  gap: 20px;
  width: min(1180px, 100%);
  margin: auto;
  align-items: start;
}
.live-main {
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 28px;
  padding: clamp(15px, 2.4vw, 26px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.live-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.live-alarm { font-family: var(--font-pixel); font-size: 9px; color: #ffe36e; letter-spacing: .6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-wrap { text-align: center; padding: 4px 0 12px; }
.timer {
  font-family: var(--font-display);
  font-size: clamp(58px, 12vw, 110px);
  line-height: .95;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 4px 0 #ff3fae, 0 9px 0 rgba(212,20,143,.55), 0 18px 36px rgba(0,0,0,.4);
  font-variant-numeric: tabular-nums;
}
.timer.is-penalty { animation: penaltyShake .5s ease; color: #ffe36e; }
@keyframes penaltyShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-10px) rotate(-2deg); }
  40% { transform: translateX(10px) rotate(2deg); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
.timer-label { font-family: var(--font-pixel); font-size: 8px; color: rgba(255,255,255,.65); letter-spacing: 1.2px; margin-top: 6px; }
.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1.5px solid rgba(255,255,255,.25);
  overflow: hidden;
  margin-top: 12px;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: repeating-linear-gradient(45deg, #ffe36e 0 8px, #ff8a2a 8px 16px);
  box-shadow: 0 0 14px rgba(255, 227, 110, .7);
  transition: width .4s linear;
}

.warning-banner {
  background: linear-gradient(90deg, #ff3fae, #ff8a2a);
  border: 2px solid #fff;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 10px;
  animation: warnPulse .8s ease-in-out infinite alternate;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.warning-banner strong { font-family: var(--font-display); font-size: 12px; color: #ffe36e; }
@keyframes warnPulse { from { box-shadow: 0 0 0 0 rgba(255,63,174,.5); } to { box-shadow: 0 0 0 12px rgba(255,63,174,0); } }
.penalty-toast {
  text-align: center;
  font-family: var(--font-display);
  font-size: 22px;
  color: #ffe36e;
  text-shadow: 0 3px 0 #d4148f, 0 6px 18px rgba(0,0,0,.4);
  padding: 6px;
  animation: penaltyPop .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes penaltyPop { from { transform: scale(.5) rotate(-8deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

.camera-panel {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(0,0,0,.45);
  border: 2px solid rgba(255,255,255,.35);
}
.camera-panel video, .camera-panel canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.camera-panel canvas { pointer-events: none; }
.movement-hud {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px 12px;
  background: linear-gradient(0deg, rgba(20, 5, 30, .9) 0%, rgba(20,5,30,.55) 70%, transparent 100%);
}
.movement-label { display: flex; justify-content: space-between; font-family: var(--font-pixel); font-size: 7.5px; color: rgba(255,255,255,.7); letter-spacing: .5px; }
.movement-label span:last-child { color: #ffe36e; }
.movement-track { height: 9px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; margin: 5px 0 4px; }
.movement-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, #7fe0ff, #ffe36e 60%, #ff3fae); transition: width .15s linear; }
.movement-status { font-size: 11px; font-weight: 900; color: #7fe0ff; }
.movement-status.is-dancing { color: #7dffb0; }
.movement-status.is-still { color: #ff9dbb; }

/* tap mode */
.tap-panel {
  border-radius: 20px;
  border: 2px dashed rgba(255,255,255,.4);
  background: rgba(0,0,0,.22);
  padding: 18px;
  text-align: center;
}
.tap-instruction { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.85); margin: 0 0 12px; line-height: 1.5; }
.tap-button {
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(17px, 3vw, 22px);
  padding: 24px 14px;
  border-radius: 22px;
  border: 3px solid #fff;
  color: #4a0a2a;
  background: radial-gradient(circle at 30% 20%, #fff7a8, #ffe36e 30%, #ff9c3f 70%, #ff3fae 100%);
  cursor: pointer;
  box-shadow: 0 10px 0 rgba(0,0,0,.28), inset 0 3px 0 rgba(255,255,255,.7);
  animation: tapPulse 1.6s ease-in-out infinite;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tap-button:active { transform: translateY(6px) scale(.98); box-shadow: 0 3px 0 rgba(0,0,0,.28); }
@keyframes tapPulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.14); } }
.tap-status { font-family: var(--font-pixel); font-size: 8px; color: #ffe36e; margin-top: 11px; min-height: 14px; }

.live-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.live-controls .btn-chrome { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); text-shadow: 0 1px 2px rgba(0,0,0,.3); box-shadow: 0 4px 0 rgba(0,0,0,.22); }
.live-controls .btn-chrome:hover { background: rgba(255,255,255,.25); }

/* coach */
.live-side { display: grid; gap: 14px; }
.baila-coach {
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 26px;
  padding: 16px 16px 14px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0,0,0,.25);
}
.baila-coach-avatar { width: 150px; height: 150px; margin: -6px auto 6px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.baila-coach-avatar svg { width: 100%; height: 100%; overflow: visible; }
.coach-bubble {
  position: relative;
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.4;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 0 rgba(0,0,0,.18);
  border: 2px solid #ffd1ec;
}
.coach-bubble::before {
  content: '';
  position: absolute;
  top: -9px; left: 50%;
  width: 14px; height: 14px;
  background: #fff;
  border-left: 2px solid #ffd1ec;
  border-top: 2px solid #ffd1ec;
  transform: translateX(-50%) rotate(45deg);
}
.coach-name { font-family: var(--font-pixel); font-size: 7.5px; color: #ffe36e; margin-top: 10px; letter-spacing: .6px; }
.live-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 16px;
  padding: 10px 6px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.stat-num { display: block; font-family: var(--font-display); font-size: 19px; color: #ffe36e; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { display: block; font-family: var(--font-pixel); font-size: 6.5px; color: rgba(255,255,255,.7); margin-top: 4px; line-height: 1.4; letter-spacing: .2px; }
.baila-tip {
  background: rgba(255, 227, 110, .15);
  border: 1.5px dashed rgba(255, 227, 110, .5);
  border-radius: 14px;
  padding: 10px 13px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffeeb0;
  line-height: 1.45;
}
.emergency-hold {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.85);
  border-radius: 999px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.hold-fill { position: absolute; inset: 0; width: 0%; background: linear-gradient(90deg, rgba(224,27,69,.8), rgba(255,63,174,.8)); transition: none; }
.hold-label { position: relative; z-index: 1; }
.emergency-hold .emergency-link { color: inherit; }

/* done */
.done-panel {
  width: min(620px, 100%);
  margin: auto;
  text-align: center;
  background: rgba(255,255,255,.12);
  border: 3px solid rgba(255,255,255,.6);
  border-radius: 34px;
  padding: clamp(24px, 4vw, 40px);
  backdrop-filter: blur(14px);
  box-shadow: 0 26px 60px rgba(0,0,0,.35);
  position: relative;
}
.done-sparkles { font-size: 24px; color: #ffe36e; letter-spacing: 10px; margin-bottom: 4px; animation: sparkle 2s infinite; }
.done-panel .baila-big { width: 190px; height: 190px; margin: 0 auto 4px; }
.done-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 54px);
  margin: 0 0 8px;
  color: #ffe36e;
  text-shadow: 0 3px 0 #ff8a2a, 0 7px 0 rgba(217,106,0,.6), 0 14px 30px rgba(0,0,0,.35);
}
.done-sub { color: rgba(255,255,255,.85); font-size: 14px; font-weight: 700; margin: 0 auto 18px; max-width: 420px; line-height: 1.5; }
.done-stats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.done-stat {
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 16px;
  padding: 10px 20px;
  min-width: 96px;
}
.done-stat strong { display: block; font-family: var(--font-display); font-size: 24px; color: #fff; line-height: 1.1; }
.done-stat span { font-family: var(--font-pixel); font-size: 7px; color: rgba(255,255,255,.7); }
.done-panel .muted { color: rgba(255,255,255,.6); margin-top: 10px; }
.confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 230; }

/* ============================================================
   BAILA SVG MOODS
   ============================================================ */
.baila-eye-open, .baila-eye-happy, .baila-eye-worried, .baila-eye-star, .baila-eye-sleep { transition: opacity .2s; }
.baila-eye-happy, .baila-eye-worried, .baila-eye-star, .baila-eye-sleep { opacity: 0; }
.baila-mouth-smile, .baila-mouth-o, .baila-mouth-worried, .baila-mouth-grin, .baila-mouth-sleep { transition: opacity .2s; }
.baila-mouth-o, .baila-mouth-worried, .baila-mouth-grin, .baila-mouth-sleep { opacity: 0; }

[data-mood="happy"] .baila-eye-open,
[data-mood="happy"] .baila-eye-worried { opacity: 0; }
[data-mood="happy"] .baila-eye-happy { opacity: 1; }
[data-mood="happy"] .baila-mouth-smile,
[data-mood="happy"] .baila-mouth-o,
[data-mood="happy"] .baila-mouth-worried { opacity: 0; }
[data-mood="happy"] .baila-mouth-grin { opacity: 1; }

[data-mood="excited"] .baila-eye-open,
[data-mood="excited"] .baila-eye-worried { opacity: 0; }
[data-mood="excited"] .baila-eye-star { opacity: 1; }
[data-mood="excited"] .baila-mouth-smile,
[data-mood="excited"] .baila-mouth-worried { opacity: 0; }
[data-mood="excited"] .baila-mouth-grin { opacity: 1; }

[data-mood="worried"] .baila-eye-open,
[data-mood="worried"] .baila-eye-happy { opacity: 0; }
[data-mood="worried"] .baila-eye-worried { opacity: 1; }
[data-mood="worried"] .baila-mouth-smile,
[data-mood="worried"] .baila-mouth-grin { opacity: 0; }
[data-mood="worried"] .baila-mouth-worried { opacity: 1; }

[data-mood="ooh"] .baila-eye-open { opacity: 1; }
[data-mood="ooh"] .baila-mouth-smile { opacity: 0; }
[data-mood="ooh"] .baila-mouth-o { opacity: 1; }

[data-mood="sleep"] .baila-eye-open,
[data-mood="sleep"] .baila-eye-happy { opacity: 0; }
[data-mood="sleep"] .baila-eye-sleep { opacity: 1; }
[data-mood="sleep"] .baila-mouth-smile,
[data-mood="sleep"] .baila-mouth-grin { opacity: 0; }
[data-mood="sleep"] .baila-mouth-sleep { opacity: 1; }

.baila-body-wrap { transform-origin: 100px 140px; animation: bailaBob 3.2s ease-in-out infinite; }
[data-mood="excited"] .baila-body-wrap { animation: bailaParty .55s ease-in-out infinite; }
[data-mood="worried"] .baila-body-wrap { animation: bailaWorry 1s ease-in-out infinite; }
[data-mood="sleep"] .baila-body-wrap { animation: bailaSleep 4s ease-in-out infinite; }
@keyframes bailaBob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
@keyframes bailaParty { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-11px) rotate(6deg); } }
@keyframes bailaWorry { 0%,100% { transform: rotate(-3deg); } 25% { transform: rotate(3deg); } 50% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
@keyframes bailaSleep { 0%,100% { transform: translateY(3px) rotate(-4deg); } 50% { transform: translateY(-2px) rotate(-2deg); } }

.baila-spark { transform-origin: center; animation: sparkle 2.4s ease-in-out infinite; }
.baila-spark:nth-of-type(2) { animation-delay: .7s; }
.baila-spark:nth-of-type(3) { animation-delay: 1.3s; }

/* ============================================================
   TIKTOK DANCE DEMO
   ============================================================ */
.vibe-tag.tiktok { background: linear-gradient(135deg, #2a1533, #7a4cff 55%, #ff3fae); color: #fff; }
.demo-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid #7a4cff;
  background: linear-gradient(180deg, #ffffff, #efe8ff);
  color: #5a2bbf;
  font-size: 15px;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 3px 0 rgba(90, 43, 191, .28);
  transition: transform .15s, background .15s;
}
.demo-btn:hover { transform: translateY(-2px); background: linear-gradient(180deg, #f6f0ff, #dccfff); }

.dance-modal { width: min(880px, 100%); }
.dance-sub { margin: -4px 0 14px; font-weight: 800; color: var(--ink-soft); font-size: 13.5px; }
.dance-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: stretch; }
.dance-stage {
  position: relative;
  min-height: 390px;
  border-radius: 24px;
  border: 3px solid #fff;
  background: radial-gradient(circle at 50% 18%, #ffffff 0%, #ffd9f2 38%, #b9ecff 100%);
  box-shadow: inset 0 0 0 2px rgba(255,63,174,.15), 0 12px 30px rgba(51,23,61,.14);
  overflow: hidden;
}
.dance-floor {
  position: absolute;
  left: -10%; right: -10%; bottom: 0;
  height: 92px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 2px, transparent 2px 34px),
    linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,63,174,.22));
  transform: perspective(220px) rotateX(48deg);
  transform-origin: bottom center;
}
.dancer-mount { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 2px; }
.dancer-svg { width: 250px; height: 372px; display: block; filter: drop-shadow(0 12px 14px rgba(51,23,61,.18)); }
.dance-sparkles { position: absolute; inset: 0; pointer-events: none; }
.dance-sparkles span {
  position: absolute;
  color: #fff;
  font-size: 22px;
  text-shadow: 0 0 10px #ff3fae;
  animation: danceSpark 2.6s ease-in-out infinite;
}
.dance-sparkles span:nth-child(1) { top: 12%; left: 14%; }
.dance-sparkles span:nth-child(2) { top: 26%; right: 12%; font-size: 16px; animation-delay: .6s; }
.dance-sparkles span:nth-child(3) { top: 52%; left: 8%; font-size: 14px; animation-delay: 1.2s; }
.dance-sparkles span:nth-child(4) { top: 8%; right: 30%; font-size: 12px; animation-delay: 1.8s; }
@keyframes danceSpark {
  0%, 100% { opacity: .25; transform: scale(.7) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(18deg); }
}
.dance-now {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  color: #fff;
  background: rgba(51,23,61,.55);
  padding: 5px 9px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.dance-side { display: flex; flex-direction: column; gap: 10px; }
.dance-credit { margin: 0; font-size: 12.5px; font-weight: 900; color: var(--purple); }
.dance-moves { display: flex; flex-wrap: wrap; gap: 6px; }
.dance-move {
  font-size: 11px;
  font-weight: 900;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid rgba(255,63,174,.2);
  color: var(--ink-soft);
  transition: all .18s;
}
.dance-move.is-active {
  background: var(--hot);
  border-color: var(--hot-dark);
  color: #fff;
  transform: scale(1.04);
  box-shadow: 0 3px 0 rgba(201,16,135,.35);
}
.dance-fine { margin: 2px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--ink-soft); }
.dance-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .home-grid { grid-template-columns: 1fr; }
  .setup-grid { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: 1fr; max-width: 640px; }
  .live-side { grid-template-columns: 1fr 1fr; }
  .baila-coach { grid-column: 1 / -1; display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 8px; text-align: left; padding: 12px; }
  .baila-coach-avatar { width: 120px; height: 120px; margin: 0; grid-row: span 2; }
  .coach-bubble { min-height: 0; }
  .coach-name { grid-column: 2; margin-top: 0; }
  .coach-bubble::before { left: 22px; }
  .hero-baila { width: 240px; opacity: .95; }
  .hero-sparkles { display: none; }
}

@media (max-width: 720px) {
  .site-header { padding: 10px 14px 4px; gap: 6px; }
  .baila-launcher { width: 72px; height: 72px; }
  .baila-mini { width: 70px; height: 70px; }
  .baila-hi { display: none; }
  .logo h1 { font-size: 25px; }
  .tagline { font-size: 7px; }
  .header-right .live-clock { font-size: 20px; }
  .tz-line { display: none; }
  .page-wrap { padding: 12px 14px 50px; }
  .card { padding: 18px; border-radius: 22px; }
  .hero { padding: 24px 20px 180px; min-height: 0; border-radius: 26px; }
  .hero h2 { font-size: 32px; }
  .hero-sub { font-size: 13.5px; }
  .hero-baila { width: 210px; right: 50%; transform: translateX(50%); bottom: -14px; max-width: 60vw; }
  .hero-actions .btn { flex: 1; }
  .party-banner { padding: 20px; }
  .party-banner .btn-party { width: 100%; }
  .page-head { align-items: flex-start; }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { flex: 1; font-size: 13px; padding: 10px 12px; }
  .music-toolbar { padding: 10px; }
  .music-toolbar .text-input { max-width: 100%; }
  .form-row.two { grid-template-columns: 1fr; }
  .modal { padding: 22px 18px; border-radius: 22px; }
  .dance-layout { grid-template-columns: 1fr; }
  .dance-stage { min-height: 340px; }
  .dancer-svg { width: 210px; height: 312px; }
  .dance-actions { margin-top: 4px; }
  .dance-actions .btn { width: 100%; }
  .baila-hero { flex-direction: column; text-align: center; padding-right: 0; }
  .baila-big { width: 120px; height: 120px; }
  .modal-actions .btn { flex: 1; }
  .reliability-table { font-size: 11.5px; }
  .reliability-table th { font-size: 7px; }
  .setup-grid { gap: 14px; }
  .live-side { grid-template-columns: 1fr; }
  .baila-coach { grid-template-columns: 100px 1fr; }
  .baila-coach-avatar { width: 96px; height: 96px; }
  .timer { font-size: 68px; }
  .challenge-stage { padding: 14px; }
  .live-main { padding: 14px; border-radius: 22px; }
  .camera-panel { aspect-ratio: 1 / 1; }
  .live-controls .btn { flex: 1 1 45%; font-size: 11.5px; padding: 9px 10px; }
  .done-stat { padding: 8px 14px; min-width: 84px; }
  .site-footer { font-size: 7px; }
}

@media (max-width: 380px) {
  .logo h1 { font-size: 21px; }
  .nav-btn { padding: 8px 14px; font-size: 13px; }
  .alarm-item { gap: 10px; }
  .alarm-actions { width: 100%; margin-left: 0; justify-content: flex-end; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .slogan-track { animation: none; }
  .bg-glitter, .sticker, .hero-sparkles span { animation: none; }
}

/* focus */
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.challenge :focus-visible { outline-color: #ffe36e; }

/* print none */
@media print { .bg-glitter, .bg-stickers, .challenge, .modal-backdrop { display: none !important; } }

/* ============================================================
   v8 — Baila dolphin logo, streaks, Y2K snap filters, clips
   ============================================================ */
.logo-dolphin {
  display: inline-block;
  font-size: 1.1em;
  line-height: 1;
  transform: rotate(-8deg) translateY(2px);
  filter: drop-shadow(0 4px 0 rgba(51, 23, 61, 0.18));
  animation: dolphinBob 3.2s ease-in-out infinite;
}
@keyframes dolphinBob {
  0%, 100% { transform: rotate(-8deg) translateY(2px); }
  50% { transform: rotate(-2deg) translateY(-3px); }
}

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #ffe1f2);
  border: 2px solid #ff9ed8;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 0 rgba(51, 23, 61, 0.12);
  white-space: nowrap;
}
.streak-pill strong { font-size: 15px; color: var(--hot-dark); }
.streak-pill .streak-flame { filter: grayscale(0.7); opacity: 0.55; font-size: 14px; }
.streak-pill.is-hot {
  border-color: #ff7a2f;
  background: linear-gradient(180deg, #fff6d9, #ffe0b0);
  box-shadow: 0 0 0 3px rgba(255, 140, 60, 0.18), 0 3px 0 rgba(51, 23, 61, 0.12);
}
.streak-pill.is-hot .streak-flame { filter: none; opacity: 1; animation: flamePop 1.6s ease-in-out infinite; }
.streak-pill.is-hot strong { color: #e0561a; }
@keyframes flamePop {
  0%, 100% { transform: scale(1) rotate(-4deg); }
  50% { transform: scale(1.18) rotate(4deg); }
}

/* filters */
.filter-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  pointer-events: none;
  z-index: 3;
}
.filter-block {
  margin: 14px 0 4px;
  padding: 12px 14px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 225, 245, 0.75));
  border: 2px solid rgba(255, 158, 216, 0.6);
}
.filter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 10px;
}
.filter-hint { font-weight: 600; letter-spacing: 0; color: var(--ink-soft); font-size: 11px; }
.filter-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
}
.filter-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px 6px;
  border-radius: 16px;
  border: 2px solid rgba(154, 167, 184, 0.45);
  background: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.filter-option:hover { transform: translateY(-2px); }
.filter-option.is-active {
  border-color: var(--hot);
  box-shadow: 0 0 0 3px rgba(255, 63, 174, 0.18);
  background: linear-gradient(180deg, #fff, #ffeaf6);
}
.filter-art { font-size: 26px; line-height: 1.1; }
.filter-name { font-size: 11px; font-weight: 800; color: var(--ink); text-align: center; }
.filter-option .filter-hint { font-size: 9px; line-height: 1.1; }

.live-filter-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 10px auto 4px;
}
.live-filter-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
  backdrop-filter: blur(4px);
}
.live-filter-btn:hover { transform: scale(1.08); }
.live-filter-btn.is-active {
  background: var(--hot);
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 63, 174, 0.35);
}

.rec-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(20, 4, 20, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2b4e;
  animation: recPulse 1.1s ease-in-out infinite;
}
@keyframes recPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.clip-block {
  width: min(420px, 92vw);
  margin: 18px auto 6px;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 226, 245, 0.9));
  border: 2px solid rgba(255, 158, 216, 0.7);
  box-shadow: var(--shadow);
}
.clip-head {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 8px;
}
.clip-block video {
  width: 100%;
  max-height: 260px;
  border-radius: 14px;
  background: #1b0d1e;
  display: block;
}
.clip-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.clip-actions .btn { text-decoration: none; }
.clip-note {
  margin: 8px 0 0;
  font-size: 10px;
  text-align: center;
  color: var(--ink-soft);
}

@media (max-width: 720px) {
  .streak-pill { padding: 4px 9px; font-size: 10px; }
  .streak-pill strong { font-size: 13px; }
  .filter-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter-art { font-size: 22px; }
  .filter-name { font-size: 10px; }
  .filter-option .filter-hint { display: none; }
  .live-filter-btn { width: 38px; height: 38px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-dolphin, .streak-pill.is-hot .streak-flame, .rec-dot { animation: none; }
}
