:root{
  --bg0:#050714;
  --bg1:#060a18;
  --fg:#e8ebff;
  --muted:rgba(232,235,255,.72);
  --muted2:rgba(232,235,255,.55);
  --glass:rgba(14,16,34,.55);
  --glass2:rgba(10,12,26,.42);
  --stroke:rgba(255,255,255,.12);
  --stroke2:rgba(255,255,255,.08);
  --shadow:0 18px 60px rgba(0,0,0,.55);
  --radius:24px;
  --pad:18px;
  --gap:16px;
  --player-h:208px;
  --safe-b:env(safe-area-inset-bottom, 0px);
  --safe-t:env(safe-area-inset-top, 0px);
}

*{box-sizing:border-box}
html,body{height:100%;width:100%}
html{
  background:#050714;
  overscroll-behavior-y:none;
}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--fg);
  background:linear-gradient(160deg,#050714 0%,#050818 36%,#01030a 100%);
  min-height:100dvh;
  overflow-x:hidden;
  overscroll-behavior-y:none;
  -webkit-overflow-scrolling:touch;
}
/* Hide scrollbars globally (keeps scroll functional) */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

/* iOS Safari: keep viewport fill color consistent and reduce elastic pull visual gap */
@supports (-webkit-touch-callout: none) {
  html, body { background-color:#050714; }
  body { min-height:-webkit-fill-available; }
}

.bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:radial-gradient(800px 500px at 10% 0%, rgba(140,80,255,.14), transparent 60%),
             radial-gradient(760px 520px at 100% 10%, rgba(0,210,255,.11), transparent 60%),
             radial-gradient(780px 560px at 50% 100%, rgba(255,0,150,.10), transparent 55%);
  filter:saturate(1.2);
}
.bg__glow{
  position:absolute;
  width:520px;
  height:520px;
  border-radius:999px;
  filter:blur(48px);
  opacity:.35;
}
.bg__glow--a{left:-160px;top:-180px;background:radial-gradient(circle at 40% 40%, rgba(255,0,160,.65), rgba(140,80,255,.08) 60%, transparent 70%)}
.bg__glow--b{right:-190px;top:-120px;background:radial-gradient(circle at 60% 30%, rgba(0,255,185,.55), rgba(0,110,255,.10) 60%, transparent 72%)}
.bg__glow--c{left:18%;bottom:-280px;background:radial-gradient(circle at 50% 50%, rgba(255,160,0,.55), rgba(255,0,90,.10) 62%, transparent 72%)}

.app{
  width:min(980px, 100%);
  margin:0 auto;
  padding:calc(var(--pad) + var(--safe-t)) var(--pad) calc(var(--pad) + var(--player-h) + var(--safe-b) + 22px);
}

/* Home layout baseline: fill vertically across phone heights */
.home .app{
  min-height:100svh;
  display:flex;
  flex-direction:column;
}
.home .menu-card{
  min-height:clamp(120px, 16vh, 186px);
}
.home .spacer{
  flex:1 1 auto;
  min-height:10px;
}

.glass{
  background:linear-gradient(180deg, rgba(18,20,44,.66), rgba(10,12,26,.46));
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.topbar{position:sticky;top:0;z-index:10}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 14px;
  border-radius:calc(var(--radius) + 2px);
}
.topbar__left{
  min-width:0;
  flex:1 1 auto;
}
.topbar__right{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex:0 1 auto;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.brand__icon{
  width:44px;
  height:44px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, rgba(255,0,160,.25), rgba(140,80,255,.18), rgba(0,210,255,.12));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 12px 42px rgba(255,0,160,.10);
}
.brand__icon svg{width:22px;height:22px}
.brand__text{min-width:0}
.brand__title{
  font-weight:700;
  letter-spacing:.2px;
  line-height:1.1;
}
.brand__subtitle{
  margin-top:3px;
  font-size:12px;
  color:var(--muted2);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  font-weight:600;
  font-size:12px;
  letter-spacing:.2px;
  border:1px solid rgba(255,255,255,.12);
}
.badge--live{
  background:linear-gradient(135deg, rgba(0,255,140,.20), rgba(0,190,100,.12));
  color:#d7ffe9;
  box-shadow:0 12px 42px rgba(0,255,140,.12);
}
.badge__dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#30ff9a;
  box-shadow:0 0 0 6px rgba(48,255,154,.12), 0 0 18px rgba(48,255,154,.35);
}
.badge--socket{
  min-width:66px;
  justify-content:center;
  transition:background .18s ease, color .18s ease, border-color .18s ease;
}
.badge--socket.is-online{
  background:linear-gradient(135deg, rgba(0,255,140,.20), rgba(0,190,100,.12));
  color:#d7ffe9;
  border-color:rgba(48,255,154,.35);
}
.badge--socket.is-offline{
  background:linear-gradient(135deg, rgba(255,59,92,.22), rgba(165,17,44,.14));
  color:#ffdce4;
  border-color:rgba(255,84,116,.35);
}

.hero{
  position:relative;
  text-align:center;
  padding:22px 6px 8px;
}
.lang-btn{
  position:absolute;
  top:8px;
  right:8px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:inherit;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  box-shadow:0 18px 70px rgba(0,0,0,.35);
}
.lang-btn svg{width:18px;height:18px;color:#fff}
.lang-btn__code{font-size:12px;font-weight:800;letter-spacing:.3px;color:rgba(255,255,255,.92)}
.lang-btn:focus-visible{outline:3px solid rgba(181,107,255,.35);outline-offset:3px}
.lang-btn:active{transform:scale(.98)}
.hero .lang-btn{display:none}

.topbar__right .lang-btn{
  position:static;
  margin:0;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  box-shadow:none;
}
.topbar__right .lang-btn svg{width:16px;height:16px}
.topbar__right .lang-btn__code{font-size:11px}
.hero__title{
  margin:0;
  font-size:clamp(26px, 4.4vw, 42px);
  line-height:1.12;
  letter-spacing:-.5px;
}
.hero__accent{
  background:linear-gradient(90deg, #ff3aa3 0%, #b56bff 45%, #6a76ff 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-shadow:0 10px 40px rgba(255,58,163,.12);
}
.hero__subtitle{
  margin:10px 0 0;
  color:var(--muted);
  font-size:14px;
}

.menu{margin-top:14px}
.grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:var(--gap);
}

.menu-card{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px;
  text-align:left;
  padding:18px 16px;
  min-height:120px;
  border-radius:var(--radius);
  border:1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(240px 170px at 28% 30%, var(--card-splash, rgba(255,255,255,.10)), transparent 62%),
    linear-gradient(180deg, rgba(16,18,40,.78), rgba(9,11,24,.56));
  box-shadow:0 26px 90px rgba(0,0,0,.62);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  color:inherit;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  transition:transform .18s ease, border-color .18s ease, filter .18s ease;
}
.menu-card:focus-visible{
  outline:3px solid rgba(181,107,255,.35);
  outline-offset:3px;
}
.menu-card::before{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:calc(var(--radius) + 10px);
  background:var(--card-grad);
  opacity:.55;
  filter:blur(12px);
  pointer-events:none;
}
.menu-card::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:calc(var(--radius) + 1px);
  background:
    radial-gradient(160px 120px at 18% 32%, rgba(255,255,255,.16), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0));
  opacity:.18;
  pointer-events:none;
}
.menu-card{filter:brightness(1.08) saturate(1.18)}
.menu-card:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.22);filter:brightness(1.12) saturate(1.24)}
.menu-card.is-pressed{transform:translateY(1px) scale(.99);filter:saturate(1.06)}

.menu-card--songs{--card-splash:rgba(255,26,114,.28); --card-grad:linear-gradient(135deg, rgba(255,26,114,.92), rgba(255,58,163,.52), rgba(181,107,255,.40)); --chip:linear-gradient(135deg, #ff1a72, #ff3aa3 55%, #b56bff); border-color:rgba(255,26,114,.35); box-shadow:0 0 0 2px rgba(255,26,114,.28), 0 30px 110px rgba(255,26,114,.14), 0 26px 90px rgba(0,0,0,.62)}
.menu-card--singers{--card-splash:rgba(74,107,255,.26); --card-grad:linear-gradient(135deg, rgba(74,107,255,.92), rgba(140,80,255,.52), rgba(255,58,163,.36)); --chip:linear-gradient(135deg, #4a6bff, #8c50ff 60%, #ff3aa3); border-color:rgba(74,107,255,.34); box-shadow:0 0 0 2px rgba(74,107,255,.26), 0 30px 110px rgba(74,107,255,.14), 0 26px 90px rgba(0,0,0,.62)}
.menu-card--rankings{--card-splash:rgba(255,138,0,.26); --card-grad:linear-gradient(135deg, rgba(255,138,0,.92), rgba(255,61,0,.52), rgba(255,26,114,.34)); --chip:linear-gradient(135deg, #ff8a00, #ff3d00 60%, #ff1a72); border-color:rgba(255,138,0,.34); box-shadow:0 0 0 2px rgba(255,138,0,.24), 0 30px 110px rgba(255,138,0,.14), 0 26px 90px rgba(0,0,0,.62)}
.menu-card--playlists{--card-splash:rgba(0,231,183,.24); --card-grad:linear-gradient(135deg, rgba(0,231,183,.92), rgba(25,195,141,.52), rgba(74,107,255,.34)); --chip:linear-gradient(135deg, #00e7b7, #19c38d 60%, #4a6bff); border-color:rgba(0,231,183,.32); box-shadow:0 0 0 2px rgba(0,231,183,.22), 0 30px 110px rgba(0,231,183,.14), 0 26px 90px rgba(0,0,0,.62)}
.menu-card--wide{grid-column:1 / -1; min-height:132px}

.menu-card__icon{
  width:62px;
  height:62px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:var(--chip, linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.08)));
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 18px 60px rgba(0,0,0,.36);
  flex:0 0 auto;
  position:relative;
  z-index:1;
}
.menu-card__icon svg{width:22px;height:22px;color:#fff}
.menu-card__text{min-width:0;position:relative;z-index:1;display:flex;flex-direction:column;text-align:left}
.menu-card__title{font-weight:700;letter-spacing:.2px;line-height:1.1;color:#fff}
.menu-card__subtitle{
  margin-top:6px;
  font-size:14px;
  color:rgba(255,255,255,.62);
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}
.menu-card__chev{display:none}

.queue{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 18px;
  min-height:102px;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  transition:transform .18s ease, border-color .18s ease;
  border:1px solid rgba(181,107,255,.28);
  background:
    radial-gradient(220px 160px at 12% 45%, rgba(181,107,255,.30), transparent 62%),
    radial-gradient(260px 180px at 100% 0%, rgba(74,107,255,.18), transparent 60%),
    linear-gradient(180deg, rgba(18,20,44,.66), rgba(10,12,26,.46));
  box-shadow:0 0 0 2px rgba(181,107,255,.20), 0 26px 90px rgba(181,107,255,.10), var(--shadow);
  text-align:left;
}
.queue:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.16)}
.queue.is-pressed{transform:translateY(1px) scale(.995)}

.queue__left{display:flex;align-items:center;gap:12px;min-width:0}
.queue__icon{
  width:56px;
  height:56px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, rgba(181,107,255,.55), rgba(140,80,255,.26), rgba(255,58,163,.18));
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 18px 60px rgba(181,107,255,.10);
}
.queue__icon svg{width:22px;height:22px;color:#fff}
.queue__title{font-weight:700;color:#fff}
.queue__subtitle{margin-top:4px;font-size:13px;color:rgba(255,255,255,.62)}
.queue__text{text-align:left}
.queue__cta{
  width:54px;
  height:54px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, rgba(181,107,255,.42), rgba(255,58,163,.26));
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 18px 64px rgba(255,58,163,.12);
}
.queue__cta svg{width:22px;height:22px;color:#fff}

.queue-sync{
  margin-top:14px;
  padding:14px;
  border-radius:22px;
}
.queue-sync__title{
  font-weight:700;
  font-size:13px;
  color:rgba(255,255,255,.86);
  margin-bottom:10px;
}
.queue-sync__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:180px;
  overflow:auto;
}
.queue-sync__item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:rgba(255,255,255,.04);
}
.queue-sync__song{
  color:#fff;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.queue-sync__artist{
  color:rgba(255,255,255,.62);
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:right;
}
.queue-sync__item--empty{
  justify-content:center;
  color:rgba(255,255,255,.58);
  font-size:12px;
}

.spacer{height:2px}

.player{
  position:fixed;
  left:var(--pad);
  right:var(--pad);
  bottom:calc(10px + var(--safe-b));
}
.player-queue{
  position:relative;
  display:block;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  transition:transform .18s ease, filter .18s ease;
}
.player-queue:hover{transform:translateY(-2px)}
.player-queue.is-pressed{transform:translateY(1px) scale(.995)}
.player-queue:focus-visible{outline:3px solid rgba(181,107,255,.35);outline-offset:3px;border-radius:30px}
.player-queue__outer{
  padding:16px;
  border-radius:30px;
  border:1px solid rgba(181,107,255,.22);
  background:
    radial-gradient(360px 220px at 10% 25%, rgba(181,107,255,.26), transparent 62%),
    radial-gradient(360px 240px at 100% 0%, rgba(74,107,255,.16), transparent 60%),
    radial-gradient(360px 240px at 58% 140%, rgba(48,255,154,.10), transparent 62%),
    linear-gradient(180deg, rgba(18,20,44,.74), rgba(10,12,26,.54));
  box-shadow:
    0 0 0 2px rgba(181,107,255,.16),
    0 28px 110px rgba(0,0,0,.66),
    inset 0 0 0 1px rgba(255,255,255,.04);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.player-queue__label{
  padding-left:2px;
  margin-bottom:12px;
  font-weight:700;
  letter-spacing:.2px;
  color:#fff;
}
.player-queue__pane{
  position:relative;
  padding:16px;
  border-radius:24px;
  border:1px solid rgba(181,107,255,.55);
  background:
    radial-gradient(240px 170px at 12% 38%, rgba(181,107,255,.14), transparent 62%),
    radial-gradient(260px 180px at 100% 0%, rgba(74,107,255,.10), transparent 60%),
    linear-gradient(180deg, rgba(12,14,32,.68), rgba(8,10,22,.50));
  box-shadow:
    0 0 0 1px rgba(181,107,255,.28),
    0 16px 50px rgba(0,0,0,.26),
    inset 0 0 0 1px rgba(255,255,255,.08);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.player-queue__pane::before{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:calc(24px + 10px);
  background:linear-gradient(135deg, rgba(181,107,255,.92), rgba(74,107,255,.58), rgba(255,58,163,.46));
  opacity:.22;
  filter:blur(14px);
  pointer-events:none;
}
.player-queue__pane::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:calc(24px + 1px);
  background:
    radial-gradient(180px 120px at 18% 30%, rgba(255,255,255,.16), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0));
  opacity:.14;
  pointer-events:none;
}
.player-queue__pane .player__controls{position:relative;z-index:1}
.player__controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.player__left{display:flex;align-items:center;gap:12px;min-width:0;flex:1 1 auto}
.album{
  width:56px;
  height:56px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, rgba(255,58,163,.55), rgba(181,107,255,.26), rgba(74,107,255,.18));
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 16px 64px rgba(255,58,163,.12);
  flex:0 0 auto;
}
.album svg{width:22px;height:22px;color:#fff}
.album.is-playing svg{animation:audioBeat 1.1s ease-in-out infinite; transform-origin:50% 50%}
@keyframes audioBeat{
  0%{transform:translateY(0) scaleY(1)}
  25%{transform:translateY(-1px) scaleY(1.08)}
  50%{transform:translateY(0) scaleY(.95)}
  75%{transform:translateY(-0.5px) scaleY(1.04)}
  100%{transform:translateY(0) scaleY(1)}
}
.track{min-width:0}
.track__title{
  font-weight:700;
  font-size:15px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.track__artist{
  margin-top:4px;
  font-size:13px;
  color:rgba(255,255,255,.62);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.player__middle{display:block;flex:1 1 100%;min-width:0}

.progress{
  width:100%;
  appearance:none;
  height:12px;
  border-radius:999px;
  --fill:12%;
  background:transparent;
  box-shadow:0 12px 34px rgba(48,255,154,.10);
  outline:none;
}
.progress::-webkit-slider-runnable-track{
  height:12px;
  border-radius:999px;
  background:
    linear-gradient(90deg, rgba(48,255,154,.82) 0%, rgba(181,107,255,.78) 45%, rgba(255,58,163,.72) 100%) 0/var(--fill) 100% no-repeat,
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.10);
}
.progress::-webkit-slider-thumb{
  appearance:none;
  width:22px;
  height:22px;
  margin-top:-6px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 10px 28px rgba(0,0,0,.45), 0 0 0 6px rgba(181,107,255,.14);
}
.progress::-moz-range-track{
  height:12px;
  border-radius:999px;
  background:
    linear-gradient(90deg, rgba(48,255,154,.82) 0%, rgba(181,107,255,.78) 45%, rgba(255,58,163,.72) 100%) 0/var(--fill) 100% no-repeat,
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.10);
}
.progress::-moz-range-thumb{
  width:22px;
  height:22px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 10px 28px rgba(0,0,0,.45), 0 0 0 6px rgba(181,107,255,.14);
}

.time{
  display:flex;
  justify-content:space-between;
  margin-top:8px;
  font-size:11px;
  color:rgba(255,255,255,.56);
}

.player__right{display:flex;align-items:center;justify-content:center;gap:12px;flex:1 1 100%}
.qbtn{
  width:58px;height:58px;border-radius:999px;display:grid;place-items:center;color:#fff;
  background:linear-gradient(135deg, rgba(255,58,163,.28), rgba(181,107,255,.20), rgba(48,255,154,.12));
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 18px 60px rgba(255,58,163,.10), inset 0 0 0 1px rgba(0,0,0,.10);
  transition:transform .16s ease, filter .16s ease;
}
.qbtn:hover{filter:brightness(1.06)}
.qbtn:active{transform:translateY(1px) scale(.98)}
.qbtn i[data-lucide]{width:22px;height:22px}
.qbtn.is-active{
  box-shadow:0 18px 60px rgba(255,58,163,.18), inset 0 0 0 1px rgba(255,255,255,.18);
  filter:brightness(1.08);
}
.qbtn.qbtn--primary{
  background:linear-gradient(135deg, rgba(255,58,163,.46), rgba(181,107,255,.32), rgba(48,255,154,.18));
  border-color:rgba(255,255,255,.20);
}
.ctrl{
  width:50px;
  height:50px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.07);
  color:inherit;
  display:grid;
  place-items:center;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  transition:transform .18s ease, border-color .18s ease, filter .18s ease;
}
.ctrl svg{width:20px;height:20px;color:#fff}
.ctrl:focus-visible{outline:3px solid rgba(48,255,154,.30);outline-offset:3px}
.ctrl:hover{transform:translateY(-1px);border-color:rgba(255,255,255,.18)}
.ctrl:active{transform:translateY(1px) scale(.99)}
.ctrl--primary{
  width:58px;
  height:58px;
  background:linear-gradient(135deg, rgba(255,58,163,.34), rgba(181,107,255,.22), rgba(48,255,154,.14));
  border-color:rgba(255,255,255,.18);
  box-shadow:0 18px 70px rgba(255,58,163,.10);
}
.ctrl__icon.is-hidden{display:none}
.ctrl.is-muted{filter:saturate(.8);opacity:.88}

.toast{
  position:fixed;
  left:50%;
  bottom:calc(var(--player-h) + var(--safe-b) + 18px);
  transform:translateX(-50%);
  background:rgba(12,14,30,.72);
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  padding:10px 14px;
  color:rgba(255,255,255,.92);
  box-shadow:0 18px 70px rgba(0,0,0,.55);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
  font-size:12px;
  max-width:min(520px, calc(100% - 32px));
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.toast.is-visible{opacity:1;transform:translateX(-50%) translateY(-4px)}

body.is-modal-open{overflow:hidden}

.modal{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  padding:18px;
}
.modal[hidden]{display:none}
.modal__overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.modal__panel{
  position:relative;
  width:min(560px, calc(100% - 12px));
  border-radius:calc(var(--radius) - 4px);
  padding:14px 14px 16px;
}
.modal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:2px 2px 10px;
}
.modal__title{
  font-weight:800;
  letter-spacing:.2px;
}
.modal__close{
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:inherit;
  display:grid;
  place-items:center;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}
.modal__close svg{width:18px;height:18px;color:#fff}
.modal__close:focus-visible{outline:3px solid rgba(48,255,154,.30);outline-offset:3px}
.modal__close:active{transform:scale(.98)}

.modal__body{max-height:min(60vh, 560px); overflow:auto; padding-right:2px}
.lang-options{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px}
.lang-option{
  width:100%;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.14);
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  color:rgba(255,255,255,.92);
  font-weight:700;
  letter-spacing:.1px;
  text-align:left;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  transition:transform .12s ease, border-color .12s ease, background .12s ease;
}
.lang-option:focus-visible{outline:3px solid rgba(181,107,255,.35);outline-offset:3px}
.lang-option:active{transform:scale(.99)}
.lang-option.is-selected{
  border-color:rgba(48,255,154,.42);
  background:linear-gradient(135deg, rgba(48,255,154,.14), rgba(181,107,255,.12), rgba(255,58,163,.10));
}

.playlist-options{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}
.playlist-option{
  position:relative;
  overflow:hidden;
  width:100%;
  min-height:110px;
  padding:14px 14px 13px;
  border-radius:18px;
  appearance:none;
  -webkit-appearance:none;
  font:inherit;
  border:1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(120% 120% at 8% 0%, rgba(255,58,163,.12), transparent 58%),
    radial-gradient(120% 120% at 100% 0%, rgba(181,107,255,.10), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  color:rgba(255,255,255,.92);
  text-align:left;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  transition:transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.playlist-option:focus-visible{outline:3px solid rgba(181,107,255,.35);outline-offset:3px}
.playlist-option:active{transform:scale(.99)}
.playlist-option:hover{
  border-color:rgba(255,255,255,.22);
  box-shadow:0 18px 44px rgba(0,0,0,.22);
}
.playlist-option::after{
  content:"";
  position:absolute;
  inset:-30% auto auto 50%;
  width:120px;
  height:120px;
  border-radius:999px;
  transform:translateX(-50%);
  background:radial-gradient(circle, rgba(255,255,255,.10), transparent 70%);
  pointer-events:none;
}
.playlist-option__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.playlist-option__icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 12px 28px rgba(0,0,0,.20);
  color:#fff;
}
.playlist-option__icon svg{
  width:18px;
  height:18px;
}
.playlist-option__name{
  display:block;
  margin-top:14px;
  font-weight:800;
  letter-spacing:.2px;
  color:#fff;
}
.playlist-option__meta{
  display:block;
  margin-top:6px;
  font-size:12px;
  color:rgba(255,255,255,.62);
}
.playlist-option__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:4px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#fff;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
}
.playlist-option.is-recent{
  border-color:rgba(48,255,154,.40);
  box-shadow:0 18px 48px rgba(48,255,154,.10);
}
.playlist-option.is-recent .playlist-option__badge{
  background:linear-gradient(135deg, rgba(48,255,154,.28), rgba(0,212,255,.20));
  border-color:rgba(48,255,154,.35);
  color:#dbfff0;
}
.playlist-option--tone-1 .playlist-option__icon{
  background:linear-gradient(135deg, #ff4d9d, #b56bff 70%, #6f7cff);
}
.playlist-option--tone-2 .playlist-option__icon{
  background:linear-gradient(135deg, #00c6ff, #4a6bff 70%, #8c50ff);
}
.playlist-option--tone-3 .playlist-option__icon{
  background:linear-gradient(135deg, #ff9a3d, #ff5f6d 70%, #ff3aa3);
}
.playlist-option--tone-4 .playlist-option__icon{
  background:linear-gradient(135deg, #00e7b7, #19c38d 70%, #4a6bff);
}
.playlist-option--tone-5 .playlist-option__icon{
  background:linear-gradient(135deg, #ffd84d, #ff9f43 70%, #ff5e7a);
}
.playlist-picker__hint{
  margin:0 2px 12px;
  font-size:13px;
  line-height:1.4;
  color:rgba(255,255,255,.68);
}
.playlist-picker__hint strong{
  color:#fff;
  font-weight:800;
}

/* Tall phone tuning: keep home UI visually filled (e.g. iPhone 14 Pro Max). */
@media (max-width: 460px) and (min-height: 860px){
  :root{--gap:18px}
  .hero{padding:24px 6px 12px}
  .menu{margin-top:18px}
  .menu-card{
    min-height:150px;
    padding:20px 16px;
  }
  .menu-card__subtitle{font-size:15px}
  .player{
    bottom:calc(24px + var(--safe-b));
  }
}

/* Short phone tuning: keep key content visible without crowding */
@media (max-width: 460px) and (max-height: 739px){
  .home .hero{padding:16px 6px 6px}
  .home .menu{margin-top:10px}
  .home .menu-card{
    min-height:114px;
    padding:16px 14px;
  }
  .home .menu-card__icon{width:56px;height:56px}
  .home .menu-card__subtitle{font-size:13px}
}

/* Narrow Android devices: prevent topbar overflow/cut-off. */
@media (max-width: 390px){
  .topbar__inner{
    flex-wrap:nowrap;
    padding:12px 12px;
  }
  .topbar__right{
    width:auto;
    flex:0 0 auto;
    gap:6px;
    flex-wrap:nowrap;
  }
  .brand{gap:10px}
  .brand__text{max-width:150px}
  .brand__icon{width:40px;height:40px;border-radius:14px}
  .brand__title{font-size:16px}
  .brand__subtitle{font-size:11px}
  .topbar__right .lang-btn{
    padding:7px 9px;
  }
  .topbar__right .lang-btn__code{
    font-size:10px;
  }
  .badge{
    padding:7px 10px;
    font-size:11px;
  }
}

/* Extra small screens: keep single row and compact content. */
@media (max-width: 360px){
  .topbar__inner{
    flex-wrap:nowrap;
    gap:8px;
    padding:10px 10px;
  }
  .topbar__right{
    width:auto;
    flex:0 0 auto;
    gap:4px;
    flex-wrap:nowrap;
  }
  .brand{gap:8px}
  .brand__icon{width:36px;height:36px;border-radius:12px}
  .brand__title{font-size:15px}
  .brand__subtitle{display:none}
  .topbar__right .lang-btn{
    padding:6px 8px;
  }
  .topbar__right .lang-btn__code{
    font-size:10px;
  }
  .badge{
    min-width:58px;
    padding:6px 8px;
    font-size:10px;
  }
}

/* Tablet portrait + landscape: avoid large empty middle area */
@media (min-width: 768px) and (max-width: 1366px){
  .home .app{
    width:min(1100px, 100%);
    padding:calc(var(--pad) + var(--safe-t)) var(--pad) calc(var(--pad) + var(--player-h) + var(--safe-b) + 16px) !important;
  }
  .home .hero{
    padding:26px 6px 10px;
  }
  .home .menu{
    margin-top:18px;
  }
  .home .menu-card{
    min-height:clamp(168px, 20vh, 230px);
    padding:22px 18px;
  }
  .home .menu-card__icon{
    width:66px;
    height:66px;
  }
  .home .menu-card__title{
    font-size:20px;
  }
  .home .menu-card__subtitle{
    font-size:16px;
  }
  .home .spacer{
    display:none;
  }
  .home .player{
    position:fixed;
    left:var(--pad);
    right:var(--pad);
    bottom:calc(14px + var(--safe-b));
    margin:0;
  }
}

@media (min-width: 768px){
  :root{--pad:26px;--gap:22px;--player-h:236px}
  .hero{padding-top:28px}
  .brand__icon{width:48px;height:48px}
  .menu-card{padding:22px 20px;min-height:156px}
  .menu-card__icon{width:62px;height:62px}
  .queue{padding:22px 22px;min-height:120px}
  .player-queue__outer{padding:18px}
  .player-queue__pane{padding:18px 18px 18px}
}

@media (prefers-reduced-motion: reduce){
  .menu-card,.queue,.player-queue,.ctrl,.toast,.lang-option,.assistant-quick__btn,.assistant-result__action,.assistant-compose__send{transition:none}
  .menu-card:hover,.queue:hover,.player-queue:hover,.ctrl:hover{transform:none}
}
