  :root{
    --bg:#0b0b0f;
    --panel:#131319;
    --panel-2:#1b1b24;
    --line:#26262f;
    --line-soft:#1f1f28;
    --text:#f0f0f5;
    --muted:#8e8ea3;
    --muted-2:#63637a;
    --accent:#ff5a1f;
    --accent-2:#ff8a4c;
    --ok:#36d17c;
    --wave:#3a3a48;
    --wave-played:#ff5a1f;
    --radius:12px;
  }
  *{box-sizing:border-box}
  html,body{height:100%;margin:0}
  /* На телефоне 100% считается вместе с адресной строкой и низ уезжает
     за край экрана. dvh учитывает её реальную высоту. */
  @supports (height: 100dvh) {
    html,body{height:100dvh}
  }
  body{
    background:var(--bg); color:var(--text);
    font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,sans-serif;
    overflow:hidden;
  }
  button{font:inherit;color:inherit;cursor:pointer}
  ::-webkit-scrollbar{width:10px;height:10px}
  ::-webkit-scrollbar-thumb{background:#2a2a35;border-radius:10px;border:3px solid var(--bg)}

  /* ============ каркас ============ */
  .app{
    display:grid; height:100%;
    grid-template-columns:232px 1fr;
    grid-template-rows:1fr 84px;
    grid-template-areas:"side main" "player player";
  }

  /* ============ боковая панель ============ */
  aside{
    grid-area:side; background:var(--panel); border-right:1px solid var(--line);
    display:flex; flex-direction:column; overflow:hidden;
  }
  .brand{
    display:flex; align-items:center; gap:10px; padding:18px 18px 14px;
    font-size:16px; font-weight:700; letter-spacing:-.2px;
  }
  .brand .mark{
    width:28px;height:28px;border-radius:8px;flex:0 0 auto;
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    display:grid;place-items:center;
  }
  nav{padding:4px 10px; overflow-y:auto; flex:1 1 auto}
  .nav-group{margin-bottom:16px}
  .nav-title{
    font-size:11px; text-transform:uppercase; letter-spacing:.7px;
    color:var(--muted-2); padding:8px 10px 6px; font-weight:600;
  }
  .nav-item{
    display:flex; align-items:center; gap:11px; width:100%;
    padding:9px 10px; border:0; background:none; border-radius:9px;
    color:var(--muted); font-size:14px; text-align:left; transition:.15s;
  }
  .nav-item:hover{background:var(--panel-2); color:var(--text)}
  .nav-item.on{background:var(--panel-2); color:var(--text); font-weight:600}
  .nav-item.on svg{color:var(--accent)}
  .nav-item svg{flex:0 0 auto; color:var(--muted-2)}
  .nav-item .count{margin-left:auto; font-size:11px; color:var(--muted-2)}

  /* пункт владельца — заметный, его не должно быть трудно найти */
  .nav-item.boss{
    background:linear-gradient(135deg,rgba(255,90,31,.14),rgba(176,111,252,.10));
    border:1px solid rgba(255,90,31,.28); color:var(--text); font-weight:600;
  }
  .nav-item.boss svg{color:var(--accent)}
  .nav-item.boss:hover{background:linear-gradient(135deg,rgba(255,90,31,.2),rgba(176,111,252,.14))}
  .nav-item.boss.on{border-color:var(--accent)}
  .live-dot{
    margin-left:auto; font-size:10px; font-weight:700; color:#fff;
    background:var(--ok); border-radius:9px; padding:1px 6px;
    display:inline-flex; align-items:center; gap:4px;
  }
  .live-dot::before{
    content:""; width:5px; height:5px; border-radius:50%; background:#fff;
    animation:pulse 1.8s ease-in-out infinite;
  }
  @keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}

  .me{
    border-top:1px solid var(--line); padding:12px 14px;
    display:flex; align-items:center; gap:10px;
  }
  .me .ava{
    width:32px;height:32px;border-radius:50%;flex:0 0 auto;
    background:linear-gradient(135deg,#6d5efc,#b06ffc);
    display:grid;place-items:center;font-size:13px;font-weight:700;
  }
  .me .nm{font-size:13px;font-weight:600;line-height:1.2}
  .me .sb{font-size:11px;color:var(--muted-2)}

  /* ============ основная область ============ */
  /* Фоновый узор. background-attachment:local — узор едет вместе
     с контентом, поэтому при прокрутке он раскрывается целиком,
     а не стоит на месте. */
  main{
    grid-area:main; overflow-y:auto; position:relative;
    background-color:var(--bg);
    background-image:
      /* мягкие цветные пятна для глубины */
      radial-gradient(700px 520px at 88% 1%,   rgba(255,90,31,.20),  transparent 68%),
      radial-gradient(620px 500px at 2%  22%,  rgba(109,94,252,.19), transparent 68%),
      radial-gradient(760px 580px at 96% 46%,  rgba(54,209,124,.12), transparent 68%),
      radial-gradient(640px 520px at 6%  70%,  rgba(176,111,252,.16), transparent 68%),
      radial-gradient(700px 540px at 86% 92%,  rgba(255,138,76,.14), transparent 68%),
      /* волновой узор — читаемости не мешает, но его видно */
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='140'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2' stroke-opacity='.075'%3E%3Cpath d='M0 35 Q45 7 90 35 T180 35'/%3E%3Cpath d='M0 70 Q45 42 90 70 T180 70'/%3E%3Cpath d='M0 105 Q45 77 90 105 T180 105'/%3E%3Cpath d='M0 140 Q45 112 90 140 T180 140'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.085'%3E%3Ccircle cx='90' cy='35' r='1.6'/%3E%3Ccircle cx='0' cy='70' r='1.6'/%3E%3Ccircle cx='180' cy='70' r='1.6'/%3E%3Ccircle cx='90' cy='105' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat:no-repeat,no-repeat,no-repeat,no-repeat,no-repeat,repeat;
    background-attachment:local;
  }
  .topbar{
    position:sticky; top:0; z-index:5;
    background:rgba(11,11,15,.82); backdrop-filter:blur(12px);
    border-bottom:1px solid var(--line-soft);
    padding:14px 28px; display:flex; align-items:center; gap:14px;
  }
  .search{
    flex:1 1 auto; max-width:460px; position:relative;
  }
  .search input{
    width:100%; background:var(--panel); border:1px solid var(--line);
    border-radius:10px; padding:9px 12px 9px 36px; color:var(--text);
    font:inherit; outline:none;
  }
  .search input:focus{border-color:#3a3a48}
  .search svg{position:absolute; left:11px; top:50%; transform:translateY(-50%); color:var(--muted-2)}
  .topbar .sp{flex:1}
  .tbtn{
    background:var(--panel); border:1px solid var(--line); border-radius:9px;
    padding:8px 13px; font-size:13px; display:inline-flex; align-items:center; gap:7px;
  }
  .tbtn:hover{background:var(--panel-2)}
  .tbtn.primary{background:var(--accent); border-color:var(--accent); font-weight:600}
  .tbtn.primary:hover{background:#ff6b33}

  .page{padding:24px 28px 40px; display:none}
  .page.on{display:block}
  h1{font-size:24px; margin:0 0 4px; letter-spacing:-.4px}
  .sub{color:var(--muted); font-size:13px; margin:0 0 22px}
  h2{font-size:16px; margin:30px 0 14px; letter-spacing:-.2px}
  h2:first-of-type{margin-top:22px}

  /* источник трека */
  .src{
    display:inline-flex; align-items:center; gap:4px; font-size:10px;
    padding:2px 7px; border-radius:20px; font-weight:600;
    text-transform:uppercase; letter-spacing:.4px; vertical-align:middle;
  }
  .src.mine{background:rgba(255,90,31,.14); color:var(--accent-2)}
  .src.cc{background:rgba(54,209,124,.13); color:var(--ok)}
  .src.sc{background:rgba(120,130,255,.14); color:#8f9bff}
  /* метка источника прямо на обложке: карточки остаются одной высоты */
  .src.on-art{
    position:absolute; left:8px; top:8px; z-index:2;
    background:rgba(8,8,12,.72); backdrop-filter:blur(6px);
    padding:3px 8px;
  }
  .src.on-art.mine{color:var(--accent-2)}
  .src.on-art.cc{color:#5ce8a0}
  .src.on-art.sc{color:#a6b0ff}

  /* ============ карточки ============ */
  .grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(168px,1fr)); gap:18px}
  .card{cursor:pointer}
  .card .art{
    aspect-ratio:1; border-radius:10px; position:relative; overflow:hidden;
    margin-bottom:10px; box-shadow:0 6px 18px rgba(0,0,0,.4);
  }
  .card .art::after{
    content:""; position:absolute; inset:0; background:rgba(0,0,0,.35);
    opacity:0; transition:.18s;
  }
  .card:hover .art::after{opacity:1}
  .card .play{
    position:absolute; right:10px; bottom:10px; width:40px; height:40px;
    border-radius:50%; background:var(--accent); border:0; display:grid;
    place-items:center; opacity:0; transform:translateY(6px); transition:.18s;
    box-shadow:0 4px 14px rgba(0,0,0,.5); z-index:2;
  }
  .card:hover .play{opacity:1; transform:none}
  .card .t{font-size:13px; font-weight:600; margin-bottom:2px;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
  .card .a{font-size:12px; color:var(--muted);
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

  /* ============ список треков ============ */
  .list{border:1px solid var(--line-soft); border-radius:var(--radius); overflow:hidden}
  .row{
    display:grid; grid-template-columns:32px 44px 1fr 120px 56px 40px;
    align-items:center; gap:14px; padding:9px 14px;
    border-bottom:1px solid var(--line-soft); transition:.12s;
  }
  .row:last-child{border-bottom:0}
  .row:hover{background:var(--panel)}
  .row.playing{background:rgba(255,90,31,.07)}
  .row.playing .rt{color:var(--accent)}
  .row .num{color:var(--muted-2); font-size:12px; text-align:center; font-variant-numeric:tabular-nums}
  .row:hover .num{color:transparent}
  .row .np{
    position:absolute; width:32px; text-align:center; opacity:0; color:var(--text);
  }
  .row:hover .np{opacity:1}
  .row .mini{width:44px;height:44px;border-radius:7px;flex:0 0 auto}
  .rt{font-size:13px; font-weight:600; margin-bottom:1px;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
  .ra{font-size:12px; color:var(--muted);
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
  .row .mw{height:26px}
  .row .dur{font-size:12px; color:var(--muted); text-align:right; font-variant-numeric:tabular-nums}
  .icn{background:none;border:0;color:var(--muted-2);padding:5px;border-radius:6px;display:grid;place-items:center}
  .icn:hover{color:var(--text);background:var(--panel-2)}
  .icn.liked{color:var(--accent)}

  /* ============ лента друзей ============ */
  .feed{max-width:680px}
  .post{
    border:1px solid var(--line-soft); border-radius:var(--radius);
    padding:16px; margin-bottom:14px; background:var(--panel);
  }
  .post .who{display:flex; align-items:center; gap:10px; margin-bottom:13px; font-size:12px; color:var(--muted)}
  .post .who .ava{width:26px;height:26px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;font-size:11px;font-weight:700}
  .post .who b{color:var(--text); font-weight:600}
  .post .body{display:flex; gap:14px}
  .post .body .art{width:88px;height:88px;border-radius:9px;flex:0 0 auto}
  .post .info{flex:1 1 auto; min-width:0}
  .post .info .t{font-size:15px;font-weight:600;margin-bottom:2px}
  .post .info .a{font-size:13px;color:var(--muted);margin-bottom:10px}
  .post .acts{display:flex; gap:6px; margin-top:12px; align-items:center}
  .chip{
    background:none;border:1px solid var(--line);border-radius:7px;
    padding:5px 10px;font-size:12px;color:var(--muted);
    display:inline-flex;align-items:center;gap:6px;
  }
  .chip:hover{color:var(--text);border-color:#3a3a48}
  .chip.on{color:var(--accent);border-color:rgba(255,90,31,.4);background:rgba(255,90,31,.08)}

  /* ============ загрузка ============ */
  .drop{
    border:2px dashed var(--line); border-radius:16px; padding:48px 24px;
    text-align:center; background:var(--panel); transition:.2s; max-width:680px;
  }
  .drop:hover{border-color:var(--accent); background:rgba(255,90,31,.04)}
  .drop .ic{
    width:52px;height:52px;border-radius:14px;margin:0 auto 16px;
    background:rgba(255,90,31,.12); display:grid; place-items:center; color:var(--accent);
  }
  .drop h3{margin:0 0 6px; font-size:17px}
  .drop p{margin:0 0 18px; color:var(--muted); font-size:13px}
  .up-row{
    display:flex; align-items:center; gap:12px; padding:11px 14px;
    border:1px solid var(--line-soft); border-radius:10px; margin-top:10px;
    max-width:680px; background:var(--panel);
  }
  .up-row .nm{flex:1 1 auto; font-size:13px; min-width:0;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
  .bar{height:4px;background:var(--line);border-radius:3px;width:120px;overflow:hidden;flex:0 0 auto}
  .bar i{display:block;height:100%;background:var(--accent);border-radius:3px}
  .up-row .st{font-size:11px;color:var(--muted-2);width:64px;text-align:right}
  .up-row .st.done{color:var(--ok)}

  /* ============ страница трека ============ */
  .hero{display:flex; gap:22px; margin-bottom:26px}
  .hero .art{width:190px;height:190px;border-radius:12px;flex:0 0 auto;
    box-shadow:0 10px 30px rgba(0,0,0,.5)}
  .hero .meta{flex:1 1 auto; min-width:0; display:flex; flex-direction:column}
  .hero .who{font-size:13px;color:var(--muted);margin-bottom:6px}
  .hero h1{font-size:28px; margin-bottom:10px}
  .hero .big-wave{flex:1 1 auto; min-height:70px; margin:8px 0 14px; cursor:pointer}
  .hero .acts{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
  .big-play{
    width:48px;height:48px;border-radius:50%;background:var(--accent);border:0;
    display:grid;place-items:center;flex:0 0 auto;
  }
  .big-play:hover{background:#ff6b33}
  .stats{display:flex; gap:18px; margin-top:18px; font-size:12px; color:var(--muted)}
  .stats b{color:var(--text); font-weight:600}

  .cmt{display:flex; gap:11px; padding:12px 0; border-bottom:1px solid var(--line-soft)}
  .cmt .ava{width:28px;height:28px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;font-size:11px;font-weight:700}
  .cmt .c-head{font-size:12px;color:var(--muted);margin-bottom:3px}
  .cmt .c-head b{color:var(--text)}
  .cmt .at{color:var(--accent); font-variant-numeric:tabular-nums}
  .cmt .c-body{font-size:13px}

  /* ============ нижний плеер ============ */
  .player{
    grid-area:player; background:var(--panel); border-top:1px solid var(--line);
    display:grid; grid-template-columns:1fr 2fr 1fr; align-items:center;
    gap:20px; padding:0 20px;
  }
  .now{display:flex; align-items:center; gap:12px; min-width:0}
  .now .art{width:52px;height:52px;border-radius:8px;flex:0 0 auto}
  .now .t{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .now .a{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .pc{display:flex; flex-direction:column; align-items:center; gap:6px}
  .pc .btns{display:flex; align-items:center; gap:14px}
  .pbtn{background:none;border:0;color:var(--muted);padding:4px;display:grid;place-items:center;border-radius:6px}
  .pbtn:hover{color:var(--text)}
  .pbtn.main{
    width:36px;height:36px;border-radius:50%;background:var(--text);color:var(--bg);
  }
  .pbtn.main:hover{transform:scale(1.06)}
  .pc .line{display:flex; align-items:center; gap:10px; width:100%; max-width:520px}
  .pc .tm{font-size:11px;color:var(--muted-2);font-variant-numeric:tabular-nums;width:34px}
  .pc .wave{flex:1 1 auto; height:30px; cursor:pointer}
  .right{display:flex; align-items:center; justify-content:flex-end; gap:10px}
  .vol{width:88px;height:4px;background:var(--line);border-radius:3px;position:relative;cursor:pointer}
  .vol i{display:block;height:100%;width:72%;background:var(--muted);border-radius:3px}
  .vol:hover i{background:var(--accent)}

  /* ============ экран входа ============ */
  .auth-screen{
    position:fixed; inset:0; z-index:50; background:var(--bg);
    display:none; place-items:center; padding:20px; overflow:auto;
  }
  .auth-screen.on{display:grid}
  .auth{
    width:100%; max-width:380px; background:var(--panel);
    border:1px solid var(--line); border-radius:16px; padding:30px;
  }
  .auth .brand{padding:0 0 20px; font-size:18px}
  .auth h2{margin:0 0 4px; font-size:19px}
  .auth .sub{margin-bottom:22px}
  .fld{margin-bottom:13px}
  .fld label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px}
  .fld input{
    width:100%; background:var(--bg); border:1px solid var(--line);
    border-radius:9px; padding:10px 12px; color:var(--text); font:inherit; outline:none;
  }
  .fld input:focus{border-color:var(--accent)}
  .auth .full{width:100%; justify-content:center; padding:11px; margin-top:6px}
  .auth .alt{text-align:center; font-size:12px; color:var(--muted); margin-top:16px}
  .auth .alt a{color:var(--accent); text-decoration:none}
  .hint{
    font-size:11px; color:var(--muted-2); background:var(--bg);
    border:1px solid var(--line-soft); border-radius:8px; padding:9px 11px; margin-top:16px;
  }

  /* ============ заявки на регистрацию ============ */
  .req{
    border:1px solid var(--line); border-radius:var(--radius); background:var(--panel);
    padding:16px; margin-bottom:12px; max-width:720px;
  }
  .req-head{display:flex; align-items:center; gap:12px; margin-bottom:12px}
  .ava-lg{width:40px;height:40px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;font-weight:700;font-size:15px}
  .req-nm{font-size:15px;font-weight:600}
  .req-sub{font-size:12px;color:var(--muted)}
  .tag-wait{
    flex:0 0 auto; font-size:11px; font-weight:600; padding:4px 9px; border-radius:20px;
    background:rgba(255,90,31,.14); color:var(--accent-2);
  }
  .req-meta{
    display:flex; flex-wrap:wrap; gap:16px; font-size:12px; color:var(--muted);
    padding:11px 0; border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft);
  }
  .req-meta b{color:var(--text); font-weight:600}
  .req-acts{display:flex; gap:8px; margin-top:13px; flex-wrap:wrap}

  /* макет письма */
  .mail{
    max-width:560px; border:1px solid var(--line); border-radius:var(--radius);
    overflow:hidden; background:#fff; color:#1a1a22;
  }
  .mail-head{padding:14px 18px; border-bottom:1px solid #e6e6ec; font-size:12px; color:#6a6a7a}
  .mail-sub{font-size:15px; color:#1a1a22; font-weight:700; margin-top:5px}
  .mail-body{padding:18px; font-size:13px}
  .mail-tbl{border-collapse:collapse; width:100%}
  .mail-tbl td{padding:5px 0; vertical-align:top}
  .mail-tbl td:first-child{color:#6a6a7a; width:90px}
  .mail-btn{
    display:inline-block; padding:9px 18px; border-radius:7px;
    font-size:13px; font-weight:600; color:#fff;
  }
  .mail-btn.ok{background:var(--accent)}
  .mail-btn.no{background:#6a6a7a}
  .mail-foot{margin:16px 0 0; font-size:11px; color:#8a8a9a; line-height:1.5}

  /* ============ профиль ============ */
  .prof-cover{
    height:150px; border-radius:16px 16px 0 0; position:relative; overflow:hidden;
    background:linear-gradient(115deg,#5b3bd6,#c2419a 48%,#ff7a2f);
  }
  .prof-cover::after{
    content:""; position:absolute; inset:0;
    background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.4' stroke-opacity='.16'%3E%3Cpath d='M0 40 Q30 14 60 40 T120 40'/%3E%3Cpath d='M0 80 Q30 54 60 80 T120 80'/%3E%3C/g%3E%3C/svg%3E");
  }
  .cover-edit{
    position:absolute; right:12px; top:12px; z-index:2;
    background:rgba(8,8,12,.55); backdrop-filter:blur(8px);
    border:1px solid rgba(255,255,255,.18); color:#fff;
  }
  .prof-head{
    background:var(--panel); border:1px solid var(--line); border-top:0;
    border-radius:0 0 16px 16px; padding:0 24px 22px; margin-bottom:24px;
  }
  .prof-top{display:flex; align-items:flex-end; gap:18px; margin-top:-46px; margin-bottom:16px}
  .prof-ava{
    width:96px;height:96px;border-radius:50%;flex:0 0 auto;
    border:4px solid var(--panel); display:grid; place-items:center;
    font-size:34px; font-weight:700; position:relative;
  }
  .prof-ava .emo{font-size:40px}
  .prof-names{flex:1 1 auto; min-width:0; padding-bottom:6px}
  .prof-name{font-size:22px; font-weight:700; letter-spacing:-.3px; display:flex; align-items:center; gap:8px}
  .prof-at{font-size:13px; color:var(--muted)}
  .prof-bio{font-size:14px; line-height:1.55; max-width:560px; white-space:pre-line; margin-bottom:14px}
  .prof-facts{display:flex; flex-wrap:wrap; gap:18px; font-size:12.5px; color:var(--muted)}
  .prof-facts b{color:var(--text); font-weight:600}
  .prof-facts .f{display:flex; align-items:center; gap:6px}
  .tabs{display:flex; gap:4px; border-bottom:1px solid var(--line-soft); margin-bottom:18px}
  .tab{
    background:none; border:0; padding:10px 14px; font-size:13.5px; color:var(--muted);
    border-bottom:2px solid transparent; margin-bottom:-1px;
  }
  .tab.on{color:var(--text); font-weight:600; border-bottom-color:var(--accent)}
  .tab:hover{color:var(--text)}

  /* ============ настройки профиля ============ */
  .settings{max-width:620px}
  .set-card{
    background:var(--panel); border:1px solid var(--line);
    border-radius:var(--radius); padding:20px; margin-bottom:16px;
  }
  .set-card h3{margin:0 0 4px; font-size:15px}
  .set-card .note{font-size:12px; color:var(--muted); margin:0 0 16px}
  .ava-pick{display:flex; align-items:center; gap:16px; flex-wrap:wrap}
  .ava-big{
    width:80px;height:80px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;
    font-size:32px; font-weight:700;
  }
  .ava-opts{display:flex; gap:8px; flex-wrap:wrap}
  .ava-opt{
    width:34px;height:34px;border-radius:50%;border:2px solid transparent;
    display:grid;place-items:center;font-size:16px;cursor:pointer;
  }
  .ava-opt.on{border-color:var(--text)}
  textarea{
    width:100%; background:var(--bg); border:1px solid var(--line); border-radius:9px;
    padding:10px 12px; color:var(--text); font:inherit; outline:none; resize:vertical;
    min-height:82px; line-height:1.5;
  }
  textarea:focus{border-color:var(--accent)}
  select{
    width:100%; background:var(--bg); border:1px solid var(--line); border-radius:9px;
    padding:10px 12px; color:var(--text); font:inherit; outline:none;
  }
  select:focus{border-color:var(--accent)}
  .fld .hint-s{font-size:11px; color:var(--muted-2); margin-top:5px}
  .two{display:grid; grid-template-columns:1fr 1fr; gap:12px}
  .lang-pick{display:flex; gap:8px; flex-wrap:wrap}
  .lang{
    display:flex; align-items:center; gap:9px; padding:11px 14px;
    border:1px solid var(--line); border-radius:10px; background:var(--bg);
    font-size:13.5px; flex:1 1 150px;
  }
  .lang:hover{border-color:#3a3a48}
  .lang.on{border-color:var(--accent); background:rgba(255,90,31,.08); font-weight:600}
  .lang .flag{font-size:19px}
  .opt-tag{
    font-size:10px; text-transform:uppercase; letter-spacing:.5px; font-weight:600;
    color:var(--muted-2); border:1px solid var(--line); border-radius:20px; padding:2px 7px;
    margin-left:7px; vertical-align:middle;
  }
  .emo-row{display:flex; gap:6px; flex-wrap:wrap; margin-top:8px}
  .emo-btn{
    background:var(--bg); border:1px solid var(--line); border-radius:8px;
    padding:5px 9px; font-size:15px; line-height:1;
  }
  .emo-btn:hover{border-color:var(--accent)}

  /* ============ переключатели и приватность ============ */
  .sw-row{
    display:flex; align-items:center; gap:14px; padding:13px 0;
    border-bottom:1px solid var(--line-soft);
  }
  .sw-row:last-child{border-bottom:0}
  .sw-ic{
    width:34px;height:34px;border-radius:9px;flex:0 0 auto;display:grid;place-items:center;
    background:var(--bg); color:var(--muted); border:1px solid var(--line-soft);
  }
  .sw-txt{flex:1 1 auto; min-width:0}
  .sw-t{display:block; font-size:13.5px; font-weight:600}
  .sw-d{display:block; font-size:11.5px; color:var(--muted); margin-top:1px}
  .sw{
    flex:0 0 auto; width:42px; height:24px; border-radius:20px; background:var(--line);
    border:0; padding:0; position:relative; transition:.18s;
  }
  .sw::after{
    content:""; position:absolute; top:3px; left:3px; width:18px; height:18px;
    border-radius:50%; background:#8e8ea3; transition:.18s;
  }
  .sw.on{background:rgba(255,90,31,.35)}
  .sw.on::after{left:21px; background:var(--accent)}

  .pv-sel{
    /* важно: перебиваем общее select{width:100%}, иначе список
       растягивается на всю строку и выдавливает подпись */
    flex:0 0 auto; width:auto; min-width:150px;
    background:var(--bg); border:1px solid var(--line); border-radius:8px;
    padding:7px 10px; color:var(--text); font:inherit; font-size:12.5px; outline:none;
  }
  .pv-sel:focus{border-color:var(--accent)}
  .warn-note{
    display:flex; gap:10px; font-size:11.5px; color:var(--muted); line-height:1.5;
    background:rgba(255,154,107,.07); border:1px solid rgba(255,154,107,.18);
    border-radius:9px; padding:11px 13px; margin-top:14px;
  }
  .warn-note svg{flex:0 0 auto; color:#ff9a6b; margin-top:1px}

  .bio-card{
    display:flex; align-items:center; gap:15px; padding:16px;
    border:1px solid rgba(255,90,31,.3); border-radius:12px;
    background:linear-gradient(135deg,rgba(255,90,31,.10),rgba(176,111,252,.07));
    margin-bottom:16px;
  }
  .bio-ic{
    width:46px;height:46px;border-radius:12px;flex:0 0 auto;display:grid;place-items:center;
    background:rgba(255,90,31,.15); color:var(--accent);
  }
  .bio-card .bt{display:block; font-size:14.5px; font-weight:600}
  .bio-card .bd{display:block; font-size:12px; color:var(--muted); margin-top:2px}

  .dev-row{
    display:flex; align-items:center; gap:12px; padding:11px 0;
    border-bottom:1px solid var(--line-soft); font-size:13px;
  }
  .dev-row:last-child{border-bottom:0}
  .dev-row .dn{flex:1 1 auto; min-width:0}
  .dev-row .dd{font-size:11.5px; color:var(--muted)}
  .dev-row .cur{font-size:10px; color:var(--ok); font-weight:600; text-transform:uppercase; letter-spacing:.4px}

  /* ============ панель владельца ============ */
  .stat-row{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin:20px 0 8px}
  .stat{background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:15px 17px}
  .stat .sv{font-size:23px; font-weight:700; letter-spacing:-.5px}
  .stat .sl{font-size:12px; color:var(--muted); margin-top:2px}

  .live{
    display:flex; align-items:center; gap:13px; padding:13px 15px;
    border:1px solid var(--line); border-radius:var(--radius);
    background:var(--panel); margin-bottom:10px; max-width:720px;
  }
  .live .ava-lg{width:38px;height:38px;font-size:14px}
  .live .who-nm{font-size:14px; font-weight:600; display:flex; align-items:center; gap:7px}
  .live .who-sub{font-size:12px; color:var(--muted)}
  .dot-live{
    width:7px;height:7px;border-radius:50%;background:var(--ok);flex:0 0 auto;
    box-shadow:0 0 0 3px rgba(54,209,124,.18);
  }
  .live .track{
    flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:10px;
    padding-left:15px; border-left:1px solid var(--line-soft);
  }
  .live .track .mini{width:36px;height:36px;border-radius:6px}
  .live .tk-t{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .live .tk-a{font-size:11.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .live .since{font-size:11px; color:var(--muted-2); flex:0 0 auto}

  .log{
    max-width:720px; border:1px solid var(--line-soft); border-radius:var(--radius);
    overflow:hidden; font-size:12.5px;
  }
  .log-row{
    display:flex; gap:12px; padding:9px 14px; border-bottom:1px solid var(--line-soft);
    align-items:baseline;
  }
  .log-row:last-child{border-bottom:0}
  .log-row .tm{color:var(--muted-2); flex:0 0 auto; font-variant-numeric:tabular-nums; width:52px}
  .log-row .ev{flex:1 1 auto}
  .log-row .ev b{font-weight:600}
  .log-row.warn .ev{color:#ff9a6b}

  /* переключатель роли (только в макете) */
  .role{
    display:flex; align-items:center; gap:0; background:var(--panel-2);
    border:1px solid var(--line); border-radius:9px; padding:2px; flex:0 0 auto;
  }
  .role button{
    background:none;border:0;padding:5px 11px;font-size:12px;color:var(--muted);border-radius:7px;
  }
  .role button.on{background:var(--accent); color:#fff; font-weight:600}
  .owner-only{}

  /* ============ нижняя навигация (только телефон) ============ */
  .mobnav{display:none}

  /* ============ адаптив ============ */
  @media (max-width:860px){
    .app{
      grid-template-columns:1fr;
      grid-template-rows:1fr 64px 58px;
      grid-template-areas:"main" "player" "mobnav";
    }
    aside{display:none}
    .player{grid-template-columns:1fr auto; gap:12px; padding:0 14px}
    .pc .line{display:none}
    .right{display:none}
    .now .art{width:42px;height:42px}
    .page{padding:18px 16px 26px}
    .topbar{padding:12px 16px}
    /* переключатель ролей нужен только для показа на большом экране */
    .role{display:none}

    /* карточки: две колонки, а не одна огромная */
    .grid{grid-template-columns:repeat(2,1fr); gap:14px}
    .card .t{font-size:12.5px}
    .card .a{font-size:11.5px}

    .row{grid-template-columns:44px 1fr 52px 34px; gap:10px}
    .row .num,.row .mw{display:none}
    .hero{flex-direction:column}
    .hero .art{width:100%;height:auto;aspect-ratio:1;max-width:260px}
    h1{font-size:21px}

    .req-acts .tbtn{flex:1 1 auto; justify-content:center}
    .mail{max-width:100%}

    /* профиль на телефоне */
    .prof-cover{height:110px; border-radius:14px 14px 0 0}
    .prof-head{padding:0 16px 18px}
    .prof-top{flex-direction:column; align-items:flex-start; gap:10px; margin-top:-38px}
    .prof-ava{width:76px;height:76px;font-size:26px}
    .prof-ava .emo{font-size:32px}
    .prof-name{font-size:19px}
    .prof-top .tbtn{width:100%; justify-content:center}
    .prof-facts{gap:12px; font-size:12px}
    .tabs{overflow-x:auto; -webkit-overflow-scrolling:touch}
    .tab{white-space:nowrap; padding:10px 11px}

    /* настройки на телефоне */
    .two{grid-template-columns:1fr}
    .set-card{padding:16px}
    .lang{flex:1 1 100%}
    .ava-pick{gap:12px}

    /* панель владельца на телефоне */
    .live{flex-wrap:wrap; gap:10px}
    .live .track{border-left:0; padding-left:0; width:100%}
    .live .since{display:none}
    .stat-row{grid-template-columns:1fr 1fr}
    .stat .sv{font-size:19px}

    .mobnav{
      grid-area:mobnav; display:flex; background:var(--panel);
      border-top:1px solid var(--line); padding-bottom:env(safe-area-inset-bottom,0);
    }
    .mobnav button{
      flex:1 1 0; background:none; border:0; color:var(--muted-2);
      display:flex; flex-direction:column; align-items:center; justify-content:center;
      gap:3px; font-size:10px; padding:8px 2px; position:relative;
    }
    .mobnav button.on{color:var(--accent)}
    .mobnav .badge{
      position:absolute; top:5px; right:50%; transform:translateX(16px);
      background:var(--accent); color:#fff; font-size:9px; font-weight:700;
      min-width:15px; height:15px; border-radius:8px; display:grid; place-items:center;
      padding:0 4px;
    }
  }

  /* очень узкие экраны */
  @media (max-width:380px){
    .grid{gap:11px}
  }

/* ===================== добавления для рабочего приложения ===================== */

/* экран входа */
.auth-screen{
  position:fixed; inset:0; z-index:100; background:var(--bg);
  display:none; place-items:center; padding:20px; overflow:auto;
}
.auth-screen.on{display:grid}
.auth{
  width:100%; max-width:390px; background:var(--panel);
  border:1px solid var(--line); border-radius:16px; padding:28px;
}
.auth .brand{padding:0 0 18px; font-size:18px}
.auth h2{margin:0 0 4px; font-size:19px}
.auth .sub{margin-bottom:20px}
.auth .full{width:100%; justify-content:center; padding:11px; margin-top:8px}
.auth .alt{text-align:center; font-size:12.5px; color:var(--muted); margin-top:16px}
.auth .alt a{color:var(--accent); text-decoration:none; cursor:pointer}
.hint{
  font-size:11.5px; color:var(--muted-2); background:var(--bg);
  border:1px solid var(--line-soft); border-radius:8px; padding:10px 12px; margin-top:14px;
  line-height:1.5;
}

/* сообщения */
.msg{
  border-radius:9px; padding:10px 13px; font-size:13px; margin:12px 0; line-height:1.5;
  display:none;
}
.msg.on{display:block}
.msg.err{background:rgba(255,68,85,.12); color:#ff8b96; border:1px solid rgba(255,68,85,.25)}
.msg.ok{background:rgba(54,209,124,.12); color:#6ee6a8; border:1px solid rgba(54,209,124,.25)}
.msg.info{background:rgba(120,130,255,.1); color:#a6b0ff; border:1px solid rgba(120,130,255,.22)}

/* всплывающее уведомление */
#toast{
  position:fixed; left:50%; bottom:110px; transform:translateX(-50%) translateY(12px);
  background:var(--panel-2); border:1px solid var(--line); border-radius:10px;
  padding:11px 17px; font-size:13px; z-index:200; opacity:0; pointer-events:none;
  transition:.22s; box-shadow:0 8px 28px rgba(0,0,0,.5); max-width:90vw;
}
#toast.on{opacity:1; transform:translateX(-50%) translateY(0)}
#toast.err{border-color:rgba(255,68,85,.4); color:#ff8b96}

/* пустые состояния */
.empty{
  text-align:center; padding:50px 20px; color:var(--muted);
}
.empty .ic{font-size:38px; margin-bottom:12px; opacity:.5}
.empty h3{margin:0 0 6px; font-size:16px; color:var(--text)}
.empty p{margin:0 0 16px; font-size:13px; max-width:380px; margin-inline:auto; line-height:1.5}

/* загрузка */
.spinner{
  width:18px;height:18px;border-radius:50%;flex:0 0 auto;
  border:2px solid var(--line); border-top-color:var(--accent);
  animation:spin .7s linear infinite; display:inline-block; vertical-align:-3px;
}
@keyframes spin{to{transform:rotate(360deg)}}
.loading{padding:36px; text-align:center; color:var(--muted); font-size:13px}

/* зона перетаскивания активна */
.drop.over{border-color:var(--accent); background:rgba(255,90,31,.08)}

/* обложка-заглушка */
.art, .mini, .prof-ava, .ava-lg{background-size:cover; background-position:center}

/* полоса прогресса в плеере кликабельна */
.wave{position:relative}

/* ---------- встроенный плеер SoundCloud ---------- */
.sc-item{
  border:1px solid var(--line); border-radius:var(--radius); background:var(--panel);
  padding:14px; margin-bottom:12px; max-width:760px;
}
.sc-head{display:flex; align-items:center; gap:12px; margin-bottom:12px}
.sc-cover{width:44px;height:44px;border-radius:8px;flex:0 0 auto;background-size:cover;background-position:center}
.sc-t{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sc-s{font-size:12px;color:var(--muted)}
.sc-frame{border:0; width:100%; height:420px; border-radius:10px; display:block; background:#111}
.sc-frame.small{height:170px}

/* =====================================================================
   Мобильная версия: делаем из сайта настоящее приложение
   ===================================================================== */
@media (max-width:860px){

  /* Высота: dvh учитывает адресную строку, иначе низ уезжает за экран */
  .app{
    height:100dvh;
    grid-template-rows:1fr auto auto;
  }

  /* Прокрутка контента — плавная и не «протягивает» страницу целиком */
  main{
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain;
  }

  /* Шапка с поиском всегда доступна: липнет к верху и не уезжает */
  .topbar{
    position:sticky; top:0; z-index:20;
    padding:calc(10px + env(safe-area-inset-top,0)) 14px 10px;
    gap:8px;
  }
  .topbar .search{max-width:none}
  .topbar .search input{padding:10px 12px 10px 36px; font-size:16px}
  /* 16px обязателен: при меньшем Safari зумит страницу на фокусе */
  input, textarea, select{font-size:16px}

  /* Плеер компактнее, чтобы оставалось место контенту */
  .player{
    grid-template-columns:1fr auto;
    gap:10px; padding:8px 12px; align-items:center;
  }
  .now .art{width:40px;height:40px}
  .now .t{font-size:13px}
  .now .a{font-size:11.5px}
  .pc .btns{gap:10px}
  .pbtn.main{width:40px;height:40px}
  /* лишние кнопки на узком экране только мешают */
  #b-shuffle, #b-repeat{display:none}

  /* Нижняя навигация: учитываем «чёлку» и жест-бар */
  .mobnav{
    padding-bottom:env(safe-area-inset-bottom,0);
    position:relative; z-index:20;
  }
  .mobnav button{min-height:52px}

  /* Карточки и списки удобнее для пальца */
  .row{padding:11px 12px; min-height:58px}
  .card .art{border-radius:12px}
  .tbtn{padding:9px 13px; min-height:40px}
  .icn{padding:8px}

  /* Виджет SoundCloud на телефоне ниже */
  .sc-frame{height:340px}
  .sc-frame.small{height:150px}
  .sc-item{padding:11px}

  /* Заголовки не такие громоздкие */
  h1{font-size:20px}
  h2{font-size:15px; margin:22px 0 11px}
  .page{padding:16px 14px 24px}
}

/* Когда приложение запущено с домашнего экрана — своя раскладка:
   адресной строки нет, можно отдать больше места контенту. */
@media (display-mode: standalone){
  .topbar{padding-top:calc(10px + env(safe-area-inset-top,0))}
  body{overscroll-behavior:none}
}

/* Убираем подсветку тапа и выделение на кнопках */
button, .row, .card{-webkit-touch-callout:none}
.row, .card, .nav-item, .mobnav button{user-select:none}

/* =====================================================================
   Выдвижная панель «Ещё» — на телефоне бокового меню нет,
   поэтому остальные разделы открываются отсюда.
   ===================================================================== */
.sheet{position:fixed; inset:0; z-index:60; display:block}
.sheet[hidden]{display:none}
.sheet-bg{
  position:absolute; inset:0; background:rgba(0,0,0,.55);
  backdrop-filter:blur(2px); animation:fade .18s ease;
}
@keyframes fade{from{opacity:0}to{opacity:1}}
.sheet-body{
  position:absolute; left:0; right:0; bottom:0;
  background:var(--panel); border-top:1px solid var(--line);
  border-radius:18px 18px 0 0; padding:8px 10px calc(14px + env(safe-area-inset-bottom,0));
  animation:rise .22s cubic-bezier(.22,1,.36,1);
  max-height:82vh; overflow-y:auto;
}
@keyframes rise{from{transform:translateY(100%)}to{transform:none}}
.sheet-grip{
  width:38px;height:4px;border-radius:3px;background:var(--line);
  margin:6px auto 12px;
}
.sheet-item{
  display:flex; align-items:center; gap:14px; width:100%;
  background:none; border:0; color:var(--text); text-align:left;
  padding:14px 12px; border-radius:11px; font-size:15px;
}
.sheet-item:active{background:var(--panel-2)}
.sheet-item svg{flex:0 0 auto; color:var(--muted)}
.sheet-item.boss-item{color:var(--accent-2); font-weight:600}
.sheet-item.boss-item svg{color:var(--accent)}
.sheet-item.danger{color:#ff8b96}
.sheet-item.danger svg{color:#ff8b96}
.sheet-sep{height:1px; background:var(--line-soft); margin:6px 12px}

/* панель нужна только на телефоне */
@media (min-width:861px){
  .sheet{display:none !important}
}

/* шесть пунктов в нижней панели помещаются, если чуть ужать подписи */
@media (max-width:860px){
  .mobnav button{font-size:9.5px; padding:7px 1px; gap:2px}
  .mobnav button svg{width:20px;height:20px}
}
@media (max-width:360px){
  .mobnav button{font-size:8.5px}
}

/* =====================================================================
   Плейлист во весь экран
   ===================================================================== */
.fullplayer{
  position:fixed; inset:0; z-index:90; background:var(--bg);
  display:flex; flex-direction:column;
}
.fp-bar{
  flex:0 0 auto; display:flex; align-items:center; gap:12px;
  padding:calc(12px + env(safe-area-inset-top,0)) 14px 12px;
  border-bottom:1px solid var(--line); background:var(--panel);
}
.fp-t{
  flex:1 1 auto; min-width:0; font-size:15px; font-weight:600;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.fp-close{
  flex:0 0 auto; background:var(--panel-2); border:1px solid var(--line);
  color:var(--text); width:38px; height:38px; border-radius:10px;
  display:grid; place-items:center;
}
.fp-close:active{background:#2a2a36}
.fp-frame{
  flex:1 1 auto; width:100%; border:0; display:block; background:#111;
  min-height:0;
}

/* кнопки под виджетом */
.sc-acts{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap}
.sc-acts .tbtn{flex:0 1 auto}

/* ---------- виджет: даём достаточно высоты, чтобы список был виден ---------- */
.sc-frame{height:500px}
.sc-frame.small{height:170px}

@media (max-width:860px){
  .sc-frame{height:460px}
  .sc-frame.small{height:150px}
  .sc-acts .tbtn{flex:1 1 auto; justify-content:center}

  /* ---------- убираем пустоту сверху ---------- */
  .page{padding:12px 14px 22px}
  h1{font-size:19px; margin-bottom:2px}
  .sub{font-size:12px; margin-bottom:14px; line-height:1.4}
  h2{font-size:14px; margin:18px 0 9px}
  h2:first-of-type{margin-top:14px}
  .set-card{padding:14px; margin-bottom:12px}
  .warn-note{padding:9px 11px; font-size:11px}
}

/* =====================================================================
   Исправления по итогам проверки в WebKit
   ===================================================================== */

/* display:flex у кнопок перебивал атрибут hidden, и обычный пользователь
   видел пункты владельца. Это правило должно быть сильнее любого другого. */
[hidden]{display:none !important}

@media (max-width:860px){
  /* аватар в настройках был непропорционально большим */
  .ava-big{width:60px;height:60px;font-size:26px}
  .ava-pick{gap:12px; align-items:flex-start}
  .emo-row{gap:5px}
  .emo-btn{padding:6px 8px; font-size:16px}
}

/* =====================================================================
   Края экрана телефона: «чёлка» сверху и жест-бар снизу
   ===================================================================== */

/* Область статус-бара должна быть в цвет шапки, иначе сверху
   висит чёрная полоса, не связанная с приложением. */
html{background:var(--panel)}
body{background:var(--bg)}

@media (max-width:860px){
  /* Шапка пропускает фон сквозь себя — так нет резкой чёрной границы
     между ней и страницей. Заодно закрывает собой зону статус-бара. */
  .topbar{
    background:rgba(19,19,25,.94);
    -webkit-backdrop-filter:blur(14px);
    backdrop-filter:blur(14px);
    border-bottom:1px solid rgba(38,38,47,.7);
  }
  .player{border-bottom:0}
}

/* В приложении с домашнего экрана статус-бар прозрачный,
   поэтому фон под ним рисуем сами. */
@media (display-mode: standalone){
  html, body{background:var(--panel)}
  .app{background:var(--bg)}
}

/* кнопки в пустом состоянии не должны налезать друг на друга */
.empty-acts{
  display:flex; gap:9px; justify-content:center; flex-wrap:wrap; margin-top:4px;
}
.empty .tbtn{margin:0}
