/* Christmas Top 32 — Search card, compact AI DJ/Hey Yuki row, full-screen playlist page */
:root { --xm-night: #061633; --xm-night-2: #0a1d45; --xm-red: #e8434b; --xm-gold: #f4c76a; --xm-snow: #f4f7ff; }

/* ---------- Search card ---------- */
.xmas-card { all: unset; box-sizing: border-box; position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 300px;
  margin: 0 0 12px; border-radius: var(--r-card, 20px); overflow: hidden; cursor: pointer; background: var(--xm-night); isolation: isolate;
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .22); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.xmas-card:active { transform: scale(.985); }
.xmas-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; z-index: -1;
  transform-origin: 50% 70%; animation: xmKen 22s ease-in-out infinite alternate; }
@keyframes xmKen { from { transform: scale(1.02); } to { transform: scale(1.1) translateX(-1.5%); } }
.xmas-snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.xmas-card-copy { position: absolute; left: 16px; right: 68px; top: 14px; display: flex; flex-direction: column; gap: 3px; color: var(--xm-snow); }
.xmas-card-copy small { font: 700 10.5px/1 var(--font-main); letter-spacing: .14em; text-transform: uppercase; color: var(--xm-gold); }
.xmas-card-copy b { font: 800 clamp(22px, 6.4vw, 36px)/.98 var(--font-display, var(--font-main)); letter-spacing: -.02em; }
.xmas-card-play { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--xm-snow); color: var(--xm-night); transition: transform .15s ease-out; }
.xmas-card-play:active { transform: scale(.9); }
.xmas-card-play svg { margin-left: 2px; }

/* ---------- AI DJ + Hey Yuki shrunk into a 2-up row ---------- */
.xmas-assist-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 22px; }
.xmas-assist-row .aidj-banner, .xmas-assist-row .voice-banner { margin: 0; padding: 10px 12px; gap: 10px; min-height: 56px; border-radius: 16px; width: auto; min-width: 0; }
.xmas-assist-row .aidj-banner-ico, .xmas-assist-row .voice-banner-ico { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.xmas-assist-row .aidj-banner-ico { border-radius: 50%; }
.xmas-assist-row .aidj-banner-ico svg, .xmas-assist-row .voice-banner-ico svg { width: 18px; height: 18px; }
.xmas-assist-row .aidj-banner-txt b, .xmas-assist-row .voice-banner-txt b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xmas-assist-row small, .xmas-assist-row .aidj-banner > svg:last-child, .xmas-assist-row .voice-banner > svg:last-child { display: none; }

/* ---------- Full-screen page ---------- */
#xmasPage { position: fixed; inset: 0; z-index: 150; background: var(--bg-main, #060709); color: var(--xm-snow);
  opacity: 0; visibility: hidden; transform: translateY(24px); transition: opacity .3s ease-out, transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s .38s; }
#xmasPage.open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease-out, transform .38s cubic-bezier(.2, .8, .2, 1); }
html.xmas-open .mini-player { z-index: 160; }
html.xmas-open .bottom-nav-container { z-index: 170; }
.xp-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.xp-hero { position: relative; height: min(76vh, 640px); overflow: hidden; background: var(--bg-main, #060709); }
.xp-hero::after { content: ''; position: absolute; inset: auto 0 0; height: 28%; pointer-events: none; background: linear-gradient(transparent, var(--bg-main, #060709)); }
.xp-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  }
#xmasPage.open .xp-hero img { animation: xmHeroIn 1.4s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes xmHeroIn { from { scale: 1.12; } to { scale: 1; } }
.xp-title { position: absolute; left: 20px; right: 20px; top: calc(68px + var(--safe-top, env(safe-area-inset-top))); z-index: 1; }
.xp-title small { display: block; font: 700 12px/1 var(--font-main); letter-spacing: .16em; text-transform: uppercase; color: var(--xm-gold); margin-bottom: 10px; }
.xp-title h1 { margin: 0; font: 800 clamp(40px, 11vw, 112px)/.92 var(--font-display, var(--font-main)); letter-spacing: -.035em; color: var(--xm-snow); }
#xmasPage.open .xp-title > * { animation: xmUp .7s cubic-bezier(.2, .8, .2, 1) both; }
#xmasPage.open .xp-title h1 { animation-delay: .08s; }

.xp-body { position: relative; max-width: 860px; margin: 0 auto; padding: 26px 16px calc(170px + var(--safe-bottom, 0px)); }
.xp-lede { margin: 0 0 14px; font: 500 16px/1.5 var(--font-main); color: rgba(244, 247, 255, .78); max-width: 52ch; }
.xp-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 600 13px var(--font-main); color: rgba(244, 247, 255, .6); }
.xp-meta .xp-days { color: var(--xm-gold); }
.xp-actions { display: flex; gap: 10px; margin: 20px 0 18px; }
.xp-play { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 26px 0 20px;
  border-radius: 999px; background: var(--xm-red); color: #fff; font: 700 16px var(--font-main); transition: transform .15s ease-out; }
.xp-shuffle { all: unset; box-sizing: border-box; cursor: pointer; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  color: var(--xm-snow); box-shadow: inset 0 0 0 1px rgba(244, 247, 255, .28); transition: transform .15s ease-out; }
.xp-play:active, .xp-shuffle:active { transform: scale(.94); }

.xp-list { list-style: none; margin: 0; padding: 0; }
.xp-row { display: grid; grid-template-columns: 28px 48px 1fr auto 36px; align-items: center; gap: 12px; padding: 7px 6px; border-radius: 12px; cursor: pointer;
  transition: background .15s; }
.xp-row:hover { background: rgba(255, 255, 255, .05); }
.xp-row:active { background: rgba(255, 255, 255, .08); }
#xmasPage.open .xp-row { animation: xmUp .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(min(var(--i), 14) * 28ms + .15s); }
@keyframes xmUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.xp-n { font: 600 14px var(--font-num, monospace); color: rgba(244, 247, 255, .45); text-align: center; position: relative; }
.xp-row img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--xm-night-2); }
.xp-t { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.xp-t b { font: 600 15px/1.25 var(--font-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-t small { font: 500 13px var(--font-main); color: rgba(244, 247, 255, .58); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-d { font: 500 12.5px var(--font-num, monospace); color: rgba(244, 247, 255, .45); }
.xp-more { all: unset; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: rgba(244, 247, 255, .6); }
.xp-row.on .xp-t b { color: var(--xm-red); }
.xp-row.playing .xp-n { color: transparent; }
.xp-row.playing .xp-n::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; translate: -50% -50%;
  background: linear-gradient(var(--xm-red), var(--xm-red)) 0 100% / 3px 40% no-repeat, linear-gradient(var(--xm-red), var(--xm-red)) 50% 100% / 3px 100% no-repeat,
  linear-gradient(var(--xm-red), var(--xm-red)) 100% 100% / 3px 60% no-repeat; animation: xmEq .9s ease-in-out infinite alternate; }
@keyframes xmEq { 0% { background-size: 3px 40%, 3px 100%, 3px 60%; } 50% { background-size: 3px 90%, 3px 35%, 3px 100%; } 100% { background-size: 3px 55%, 3px 75%, 3px 30%; } }

.xp-close { position: absolute; left: 14px; top: calc(14px + var(--safe-top, env(safe-area-inset-top))); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; display: grid; place-items: center; color: var(--xm-snow); background: rgba(4, 18, 47, .55); cursor: pointer;
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

@media (min-width: 768px) {
  .xmas-card { aspect-ratio: 21 / 8; }
  .xmas-card img { object-position: 50% 22%; }
  .xmas-card-copy { left: 24px; top: 20px; }
  .xmas-card-play { right: 18px; top: 18px; width: 52px; height: 52px; }
  .xmas-assist-row { max-width: 640px; }
  .xp-hero { height: min(72vh, 720px); }
  .xp-hero img { object-position: 50% 50%; }
  .xp-title { left: max(32px, calc(50% - 414px)); top: 64px; }
  .xp-body { padding-top: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .xmas-card img, #xmasPage.open .xp-hero img, #xmasPage.open .xp-row, #xmasPage.open .xp-title > *, .xp-row.playing .xp-n::after { animation: none; }
}
/* the page is a dark "island" in light theme too */
[data-theme="light"] .xmas-card-copy, [data-theme="light"] #xmasPage { color: var(--xm-snow); }
