:root {
  --bg: #0a0d12;
  --bg-2: #10151c;
  --surface: rgb(255 255 255 / .045);
  --surface-hi: rgb(255 255 255 / .085);
  --line: rgb(255 255 255 / .08);
  --ink: #eef2f6;
  --muted: #8a96a6;
  --a1: #2dd4bf;
  --a2: #8b5cf6;
  --grad: linear-gradient(135deg, var(--a1), var(--a2));
  --like: #fb7185;
  --radius: 14px;
  --player-h: 96px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 15px/1.45 Manrope, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.i { width: 22px; height: 22px; flex: none; display: block; }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 2px; }

/* Layout */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 24px 16px calc(var(--player-h) + 16px);
  border-right: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; gap: 24px; overflow-y: auto;
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; padding: 0 8px; }
.brand span { font: 800 24px Unbounded, sans-serif; letter-spacing: -.02em; }
.nav { display: grid; gap: 4px; }
.nav a {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 700; transition: background .15s, color .15s;
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-hi); }
.nav a[aria-current="page"] .i { color: var(--a1); }
.side-lists { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 16px; }
.side-lists a { padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-lists a:hover { color: var(--ink); background: var(--surface); }

.side-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 0 8px; font-size: 12px; }
.side-foot a { color: var(--muted); text-decoration: none; }
.side-foot a:hover { color: var(--ink); }
.content { min-width: 0; padding-bottom: calc(var(--player-h) + 32px); }
.top {
  position: sticky; top: 0; z-index: 5; padding: 16px 32px;
  background: linear-gradient(var(--bg) 60%, transparent);
}
.search {
  display: flex; align-items: center; gap: 10px; max-width: 520px; padding: 0 16px;
  border-radius: 999px; background: var(--surface-hi); border: 1px solid var(--line); color: var(--muted);
  transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--a1); background: rgb(255 255 255 / .1); }
.search input { flex: 1; min-width: 0; padding: 12px 0; border: 0; background: none; color: var(--ink); font: inherit; outline: none; }
main { padding: 8px 32px 0; outline: none; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* Headers */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 40px 32px; margin-bottom: 32px;
  background: radial-gradient(120% 140% at 0% 0%, rgb(45 212 191 / .35), transparent 55%),
              radial-gradient(100% 120% at 100% 100%, rgb(139 92 246 / .45), transparent 60%), var(--bg-2);
}
.hero h1 { font: 800 clamp(32px, 5vw, 56px)/1 Unbounded, sans-serif; letter-spacing: -.03em; margin: 0 0 12px; }
.hero p { margin: 0; color: rgb(238 242 246 / .75); max-width: 52ch; }
.hero .hero-kicker, .hero-kicker { font: 600 13px Unbounded, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--a1); margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips button { font: 700 14px Manrope, sans-serif; color: var(--ink); background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .1); border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: background .15s, color .15s; }
.chips button:hover { background: rgb(255 255 255 / .14); }
.chips button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
h1 { font: 800 32px/1.1 Unbounded, sans-serif; letter-spacing: -.02em; margin: 8px 0 20px; }
h2 { font: 600 18px Unbounded, sans-serif; margin: 32px 0 14px; }
.note { color: var(--muted); }
.note a { color: var(--a1); }

/* Cards */
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 32px 0 4px; }
.shelf-head h2 { margin: 0; }
.shelf-nav { display: flex; gap: 6px; }
.shelf-nav .icon { background: var(--surface-hi); color: var(--ink); }
.shelf-nav .icon:hover { background: rgb(255 255 255 / .16); }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 184px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 10px; padding: 12px 10px; margin: 0 -10px; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf .card { scroll-snap-align: start; }
img.ph { background: linear-gradient(135deg, #1d3a44, #35265a) !important; }
.art img.ph, .cover-tile img.ph { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 18V6l10-2v12' fill='none' stroke='%23ffffff66' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='6.5' cy='18' r='2.5' fill='%23ffffff66'/%3E%3Ccircle cx='16.5' cy='16' r='2.5' fill='%23ffffff66'/%3E%3C/svg%3E") center / 34% no-repeat, linear-gradient(135deg, #1d3a44, #35265a) !important; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
.card { all: unset; animation: rowIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 40ms); cursor: pointer; display: block; padding: 10px; margin: -10px; border-radius: 16px; transition: background .2s; min-width: 0; }
.card:hover { background: var(--surface); }
.art { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--surface-hi); box-shadow: 0 10px 30px rgb(0 0 0 / .35); }
.art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.card:hover .art img { transform: scale(1.05); }
.art .fab {
  position: absolute; right: 10px; bottom: 10px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--grad); color: #fff;
  box-shadow: 0 8px 20px rgb(0 0 0 / .4); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.card:hover .fab, .card:focus-visible .fab { opacity: 1; transform: none; }
.card strong, .card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card strong { margin-top: 10px; }
.card span { color: var(--muted); font-size: 13px; }

/* Track rows */
.list { list-style: none; margin: 0; padding: 0; }
.row {
  animation: rowIn .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 22ms);
  display: grid; grid-template-columns: 32px 48px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 8px 12px; border-radius: 12px; transition: background .15s;
}
.row:hover { background: var(--surface); }
.row.current { background: var(--surface-hi); }
.row .num { color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; position: relative; height: 22px; display: grid; place-items: center; }
.row .num .i { display: none; color: var(--ink); }
.row:hover .num b { display: none; }
.row:hover .num .i { display: block; }
.row.current .num b { display: none; }
.row img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface-hi); }
.play-row { all: unset; cursor: pointer; display: contents; }
.meta { min-width: 0; }
.meta strong, .meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.current .meta strong { color: var(--a1); }
.meta span { color: var(--muted); font-size: 13px; }
.src { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; margin-right: 6px; white-space: nowrap; }
.actions { display: flex; gap: 2px; align-items: center; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.actions .dur { width: 44px; text-align: right; margin-right: 6px; }
.icon {
  border: 0; background: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); transition: color .15s, background .15s, transform .15s;
}
.icon:hover { color: var(--ink); background: var(--surface-hi); }
.icon:active { transform: scale(.9); }
.icon .i { width: 20px; height: 20px; }
.liked, .liked:hover { color: var(--like); }
.row .hover-only { opacity: 0; }
.row:hover .hover-only, .row .hover-only:focus-visible { opacity: 1; }
@media (hover: none) { .row .hover-only { opacity: 1; } }

/* Equalizer on the playing row */
.eq { display: none; gap: 2px; align-items: flex-end; height: 16px; }
.row.current .eq { display: flex; }
.row.current:hover .eq { display: none; }
.eq i { width: 3px; background: var(--a1); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.4s; } .eq i:nth-child(3) { animation-delay: -.7s; }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 18px; font-weight: 700; }
.btn:hover { background: var(--surface-hi); }
.btn.primary, .primary { background: var(--grad); border-color: transparent; color: #fff; }
.skeleton { height: 64px; border-radius: 12px; margin-bottom: 6px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hi) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Player */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: var(--player-h);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center;
  padding: 0 24px env(safe-area-inset-bottom); overflow: hidden;
  background: rgb(12 16 22 / .82); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.player[hidden] { display: none; }
.p-glow {
  position: absolute; inset: -40px auto -40px -40px; width: 50%; z-index: -1; opacity: .45;
  background: var(--cover, none) center / cover; filter: blur(50px) saturate(1.6);
  mask-image: linear-gradient(90deg, #000, transparent); -webkit-mask-image: linear-gradient(90deg, #000, transparent);
  transition: background-image .4s;
}
.p-track { all: unset; cursor: pointer; display: flex; align-items: center; gap: 14px; min-width: 0; border-radius: 12px; padding: 6px; margin: -6px; transition: background .15s; }
.p-track:hover { background: var(--surface); }
.p-track:focus-visible { outline: 2px solid var(--a1); }
.p-track img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; box-shadow: 0 6px 18px rgb(0 0 0 / .45); }
.p-meta { min-width: 0; }
.p-meta strong, .p-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-meta span { color: var(--muted); font-size: 13px; }
.p-center { display: grid; gap: 6px; justify-items: center; }
.p-controls { display: flex; align-items: center; gap: 12px; }
.play {
  width: 48px; height: 48px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgb(0 0 0 / .4); transition: transform .15s;
}
.play:hover { transform: scale(1.06); }
.play:active { transform: scale(.94); }
.p-progress { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.p-progress span { width: 38px; text-align: center; }
.p-volume { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.p-volume .range { width: 120px; }

/* Range sliders with a gradient fill; --p is set from JS */
.range { --p: 0%; flex: 1; appearance: none; -webkit-appearance: none; height: 16px; background: none; margin: 0; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--a1), var(--a2)) 0 / var(--p) 100% no-repeat, rgb(255 255 255 / .15); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--a1), var(--a2)) 0 / var(--p) 100% no-repeat, rgb(255 255 255 / .15); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .15s; }
.range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range:hover::-moz-range-thumb, .range:focus-visible::-moz-range-thumb { opacity: 1; }

/* Dialog */
dialog { padding: 20px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); color: var(--ink); width: min(400px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(0 0 0 / .55); backdrop-filter: blur(4px); }
dialog h2 { margin-top: 0; }
dialog label { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
dialog .new-pl { flex-direction: column; align-items: stretch; margin-top: 8px; color: var(--muted); }
dialog input:not([type]) { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
dialog input[type=radio] { accent-color: var(--a1); }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 20px 0 0; }
dialog menu button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 9px 18px; font-weight: 700; }

/* Phones */
@media (max-width: 800px) {
  :root { --player-h: 128px; }
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 6; height: auto; padding: 12px 16px; flex-direction: row; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line); }
  .brand span, .side-lists, .side-foot, .nav a span { display: none; }
  .nav { display: flex; margin-left: auto; }
  .top { position: static; padding: 12px 16px; }
  main { padding: 8px 16px 0; }
  .hero { padding: 28px 20px; }
  .row { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 6px 4px; gap: 12px; }
  .row .num, .actions .dur, .src { display: none; }
  .player { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 8px 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .p-center { display: contents; }
  .player .p-controls { grid-column: 2; grid-row: 1; gap: 4px; }
  .player .p-progress { grid-column: 1 / -1; grid-row: 2; }
  .p-volume { display: none; }
  .p-controls .tog { display: none; }
  .p-track img { width: 48px; height: 48px; }
}
/* Toggles (shuffle, repeat) */
.tog.on { color: var(--a1); position: relative; }
.tog.on::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }

/* Playlist header */
.cover-head { display: flex; align-items: flex-end; gap: 24px; margin: 8px 0 28px; }
.cover-head h1 { font-size: clamp(32px, 5vw, 56px); margin: 0 0 6px; }
.cover-head .note { margin: 0 0 14px; }
.cover-tile { width: 168px; height: 168px; flex: none; border-radius: 18px; overflow: hidden; background: var(--surface-hi); box-shadow: 0 20px 40px rgb(0 0 0 / .45); display: grid; place-items: center; }
.cover-tile img { width: 100%; height: 100%; object-fit: cover; }
.cover-tile.likes { background: var(--grad); color: #fff; }
.cover-tile.likes .i { width: 64px; height: 64px; }

/* Full-screen «Now playing» */
.now { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; isolation: isolate; animation: nowIn .45s cubic-bezier(.2,.8,.2,1); }
.now[hidden] { display: none; }
@keyframes nowIn { from { transform: translateY(40px); opacity: 0; } }
.now-bg { position: absolute; inset: -15%; z-index: -1; background: var(--cover, none) center / cover; filter: blur(80px) saturate(1.6) brightness(.55); }
.now-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgb(10 13 18 / .2), rgb(10 13 18 / .85)); }
.now-top { display: flex; align-items: center; gap: 12px; padding: 16px 24px; font: 600 13px Unbounded, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: rgb(238 242 246 / .8); }
.now-top .icon { color: var(--ink); }
.now-src { margin-left: auto; font: 700 12px Manrope, sans-serif; letter-spacing: 0; text-transform: none; padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / .1); }
.now-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 48px; padding: 8px clamp(24px, 6vw, 96px) 40px; align-items: center; }
.now-player { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 22px; justify-items: center; max-width: 520px; width: 100%; margin: 0 auto; }
.now-cover { width: min(100%, 46vh); aspect-ratio: 1; object-fit: cover; border-radius: 24px; box-shadow: 0 40px 80px rgb(0 0 0 / .6); transition: transform .5s cubic-bezier(.2,.8,.2,1); transform: scale(.94); }
.is-playing .now-cover { transform: none; }
.now-info { display: flex; align-items: center; gap: 4px; width: 100%; }
.now-meta { flex: 1; min-width: 0; }
.now-meta h2 { font: 800 clamp(22px, 3vw, 30px)/1.15 Unbounded, sans-serif; letter-spacing: -.02em; margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-meta p { margin: 0; color: rgb(238 242 246 / .7); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-info .icon { color: rgb(238 242 246 / .8); width: 44px; height: 44px; }
.now-info .icon .i { width: 24px; height: 24px; }
.now .p-progress { color: rgb(238 242 246 / .7); }
.now-controls { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.now-controls .icon { color: rgb(238 242 246 / .85); }
.now-controls .icon.big { width: 52px; height: 52px; }
.now-controls .icon.big .i { width: 30px; height: 30px; }
.play.huge { width: 76px; height: 76px; background: var(--ink); color: var(--bg); }
.play.huge .i { width: 32px; height: 32px; }
.now-vol { display: flex; align-items: center; gap: 8px; width: 100%; }
.now-vol .icon { color: rgb(238 242 246 / .7); }
.queue { align-self: stretch; min-height: 0; display: flex; flex-direction: column; padding: 20px; border-radius: 24px; background: rgb(10 13 18 / .45); border: 1px solid rgb(255 255 255 / .08); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.queue h3 { font: 600 15px Unbounded, sans-serif; margin: 0 0 12px; }
.queue ol { list-style: none; margin: 0; padding: 0; overflow-y: auto; scrollbar-width: thin; }
.queue li button { all: unset; cursor: pointer; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; box-sizing: border-box; padding: 6px; border-radius: 10px; font-size: 13px; color: rgb(238 242 246 / .7); }
.queue li button:hover, .queue li button:focus-visible { background: rgb(255 255 255 / .08); }
.queue li img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.queue li b { display: block; color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue li s { text-decoration: none; font-variant-numeric: tabular-nums; }
.queue .empty { color: var(--muted); padding: 8px 6px; font-size: 14px; }
body.now-open { overflow: hidden; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--player-h) + 20px); z-index: 40; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 14px; box-shadow: 0 12px 30px rgb(0 0 0 / .45); transition: opacity .25s, transform .25s cubic-bezier(.2,.8,.2,1); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.now-open .toast { bottom: 32px; }

@media (max-width: 800px) {
  .now-main { grid-template-columns: minmax(0, 1fr); padding: 0 20px 24px; overflow-y: auto; align-items: start; }
  .now-cover { width: min(100%, 42vh); }
  .queue { max-height: 50vh; }
  .cover-head { flex-direction: column; align-items: flex-start; }
  .cover-tile { width: 128px; height: 128px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Account */
.account { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: background .15s, border-color .15s; }
.account:hover { background: var(--surface-hi); }
.account:focus-visible { outline: 2px solid var(--a1); }
.account.signed { border-color: rgb(45 212 191 / .35); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font: 800 15px Unbounded, sans-serif; }
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
.account-text { min-width: 0; display: grid; }
.account-text b, .account-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text small { color: var(--muted); font-size: 12px; }
dialog.auth { width: min(420px, calc(100vw - 32px)); padding: 24px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); margin-bottom: 16px; }
.auth-tabs button { border: 0; border-radius: 999px; padding: 9px; background: none; color: var(--muted); font-weight: 800; }
.auth-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.auth-lead { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
dialog.auth label { flex-direction: column; align-items: stretch; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
dialog.auth input { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
dialog.auth input:focus { outline: 2px solid var(--a1); outline-offset: 0; }
.auth-error { color: var(--like); font-size: 14px; min-height: 20px; margin: 8px 0 0; }
.me-head { display: flex; gap: 16px; align-items: center; }
.me-head h2 { margin: 0 0 4px; }
@media (max-width: 800px) {
  .account { order: 3; padding: 0; border: 0; background: none; }
  .account-text { display: none; }
  .avatar { width: 32px; height: 32px; font-size: 13px; }
}

/* Account recovery and profile */
.link-btn { all: unset; cursor: pointer; color: var(--a1); font-size: 14px; font-weight: 700; padding: 6px 0; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--a1); }
.me-list { display: grid; gap: 6px; margin: 20px 0 4px; }
.me-row { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.me-row:hover { background: var(--surface-hi); }
.me-row:focus-visible { outline: 2px solid var(--a1); }
.me-row b, .me-row small { display: block; }
.me-row small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.me-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface-hi); font-size: 16px; }
.me-row.danger b { color: var(--like); }
#flow-dialog h2, #code-dialog h2 { margin: 0 0 8px; }
.auth-lead a { color: var(--a1); }
.recovery-code { font: 800 clamp(20px, 6vw, 26px) ui-monospace, Consolas, monospace; letter-spacing: .08em; text-align: center; padding: 18px 12px; border-radius: 14px; background: var(--surface); border: 1px dashed rgb(45 212 191 / .6); color: var(--ink); user-select: all; word-break: break-all; }
dialog.auth label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; }
dialog.auth label.check input { width: 18px; height: 18px; accent-color: var(--a1); padding: 0; }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.danger-btn.primary, .primary.danger-btn { background: var(--like); }
