/* Navigation clean-up (23.11.2026): one-row header on phones, 5-item dock, «Лента · Daily · Демки» switch.
   Loaded last. Theme toggle moves to profile settings on phones (dist/accounts.js). */

/* header: logo and icons in one row; the theme button stays in the header (owner, 24.11) and is also in the profile settings */
@media (max-width:760px){
 html[data-telegram] body header{flex-wrap:nowrap!important;align-items:center;min-height:0}
 html[data-telegram] body header>.brand{flex:none}
 html[data-telegram] body header .header-actions{flex:1 1 auto;min-width:0;justify-content:flex-end;flex-wrap:nowrap}
}

/* dock: five equal items; «Создать» sits in the row like the others (accent square, same label line) */
html[data-interface-style][data-theme] body.interface-v2 .mini-dock,html[data-telegram] body .mini-dock{grid-template-columns:repeat(5,minmax(0,1fr))}
html[data-telegram] body .mini-dock-item.mini-create{margin:0;border:0;order:0}
html[data-interface-style][data-theme] body.interface-v2 .mini-dock-item.mini-create svg,
html[data-telegram] body .mini-dock-item.mini-create svg{width:26px;height:26px;margin:-2px 0;padding:4px;box-sizing:border-box;border-radius:9px;background:var(--orange);color:var(--accent-ink,#121214);stroke:var(--accent-ink,#121214);stroke-width:2.2}
html[data-telegram] body .mini-dock-item.mini-create span{display:block;color:inherit}

/* «+ Пост» in the feed heading repeats «Создать» from the dock */
@media (max-width:999px){html[data-telegram] body .community-compose{display:none!important}}

/* Лента · Daily · Демки */
.mini-feed-switch{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:6px 0 14px;padding:4px;border-radius:16px;background:var(--raised);border:1px solid var(--line)}
.mini-feed-switch[hidden]{display:none}
.mini-feed-switch button{all:unset;box-sizing:border-box;text-align:center;padding:10px 6px;border-radius:12px;font-size:14px;font-weight:650;color:var(--muted);cursor:pointer;transition:background .18s,color .18s,transform .12s}
.mini-feed-switch button:active{transform:scale(.97)}
.mini-feed-switch button:focus-visible{outline:2px solid var(--orange);outline-offset:-2px}
.mini-feed-switch button.active{background:var(--ink);color:var(--bg);box-shadow:0 4px 14px #0003}
@media (min-width:1000px){.mini-feed-switch{max-width:520px;margin:18px auto 6px}}

/* not enough room in the one-row header (mini-app.js fitHeader), step by step */
html[data-telegram] body header.header-compact .header-actions{gap:4px!important}
html[data-telegram] body header.header-compact .header-actions>:is(.notification-button,.themebutton,.mini-fullscreen,.mini-admin-entry){width:32px!important;height:32px!important;min-width:32px!important;padding:6px!important}
html[data-telegram] body header.header-compact .notes-button{height:32px;padding:0 10px}
html[data-telegram] body header.header-compact>.brand{font-size:21px}
html[data-telegram] body header.header-small .header-actions{gap:3px!important}
html[data-telegram] body header.header-small .header-actions>:is(.notification-button,.themebutton,.mini-fullscreen,.mini-admin-entry){width:30px!important;height:30px!important;min-width:30px!important;padding:5px!important}
html[data-telegram] body header.header-small .notes-button{height:30px;padding:0 8px;gap:4px;font-size:12px}
html[data-telegram] body header.header-small>.brand{font-size:19px;letter-spacing:-.6px}
/* last step: logo shows only «#» */
html[data-telegram] body header.header-tight>.brand{font-size:0!important;gap:0}
html[data-telegram] body header.header-tight>.brand .mark{font-size:28px}
@media (max-width:760px){html[data-telegram] body header .header-actions{gap:5px}}

/* confirmed SoundCloud: a quiet line + a folded badge offer (only for well-known artists, 1000+ followers) */
.fame-offer{margin:12px 0 4px;display:grid;gap:6px}
.fame-offer-ok{margin:0;font-size:13px;font-weight:650;color:#7ED18B}
.fame-offer-text{margin:6px 0 8px;font-size:12.5px;line-height:1.55;color:var(--muted)}
.fame-offer-more summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--raised);color:var(--ink);transition:border-color .15s}
.fame-offer-more summary:hover,.fame-offer-more[open] summary{border-color:#8AB4F8}
.fame-offer-icon{flex:none;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#8AB4F822;color:#8AB4F8;font-size:15px}
.fame-offer-text-wrap{flex:1;display:grid;gap:2px;min-width:0}
.fame-offer-text-wrap b{font-size:13.5px}
.fame-offer-text-wrap small{font-size:12px;color:var(--muted)}
.fame-offer-chevron{flex:none;font-size:20px;line-height:1;color:var(--muted);transition:transform .15s}
.fame-offer-more[open] .fame-offer-chevron{transform:rotate(90deg)}
.fame-offer-more summary::-webkit-details-marker{display:none}
.fame-offer .verify-fame{display:grid;gap:8px;margin-top:4px}
.fame-offer .verify-fame input{min-width:0}
.fame-offer .verify-fame .verify-main{justify-self:start;padding:9px 16px;border-radius:999px}

/* «Наверх» (scroll-top.js) */
.scroll-top{position:fixed;right:18px;bottom:calc(24px + env(safe-area-inset-bottom));z-index:60;width:44px;height:44px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink);box-shadow:0 8px 24px #0005;cursor:pointer;opacity:0;transform:translateY(10px) scale(.9);transition:opacity .2s,transform .2s}
.scroll-top.on{opacity:1;transform:none}
.scroll-top[hidden]{display:none}
.scroll-top svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.scroll-top:hover{border-color:var(--ink)}
html[data-telegram] .scroll-top{bottom:calc(96px + var(--rifma-safe-bottom,0px) + env(safe-area-inset-bottom))}
@media (min-width:1000px){html[data-telegram] .scroll-top{bottom:28px;right:28px}}

/* no sideways jump when a section is shorter than the screen or the notes window locks scrolling: keep the scrollbar place */
html{scrollbar-gutter:stable}

/* DM avatars without a picture: graphite circle with a lilac letter, like the rest of the app (no rainbow) */
.dm-avatar:not(:has(img)){background:var(--raised)!important;color:#B7A6F0;border:1px solid var(--line);font-family:var(--font-display,inherit);font-weight:400}
html[data-theme=light] .dm-avatar:not(:has(img)){color:#6B57C9}

/* admin: compact users (controls folded), content filters (admin-compact.js) */
.admin-manage{margin-top:10px}
.admin-manage>summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--line);border-radius:10px;font-size:12px;color:var(--ink)}
.admin-manage>summary::-webkit-details-marker{display:none}
.admin-manage>summary::after{content:"▾";color:var(--muted)}
.admin-manage[open]>summary::after{content:"▴"}
.admin-manage[open]>summary{margin-bottom:10px}
.admin-post-filters{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 4px}
.admin-post-filters select{padding:8px 10px;border-radius:10px;border:1px solid var(--line);background:var(--raised,transparent);color:var(--ink);font-size:12px}
#adminPanel:not([data-admin-tab=posts]) .admin-post-filters{display:none}

/* Discover: the top card is opaque (the card behind showed through under the cover); «назад» button */
.dsc-card.is-top{background:var(--surface)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
.dsc-back{width:42px;height:42px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink);display:grid;place-items:center;cursor:pointer;align-self:center}
.dsc-back svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.dsc-back:disabled{opacity:.35;cursor:default}
.dsc-labels span:first-child{width:42px}

/* Discover: the card behind is only a frame — its cover / player never show through the top card */
.dsc-card.is-next>*{visibility:hidden}
.dsc-player .sc-art{display:none}

/* Discover: the full-size cover rule (.dsc-cover img) must not stretch picture stickers on the cover */
html body .dsc-cover .sticker img,html body .dsc-cover .react-chip-face img{position:static;inset:auto;width:16px;height:16px;object-fit:contain;animation:none}
html body .dsc-cover .sticker.is-pic-only img{width:30px;height:30px}

/* Discover: the author avatar in the cover caption was stretched by .dsc-cover img over the caption — keep it in its circle */
html body .dsc-cover .dsc-meta img{position:static!important;inset:auto!important;width:100%!important;height:100%!important;object-fit:cover;animation:none!important;border-radius:50%}

/* Right panel next to the feed on wide screens, SoundCloud-home style (side-panel.js). Experimental. */
@media (min-width:1200px){
 html.has-side-panel body .community-layout{grid-template-columns:minmax(0,1fr) 330px!important;gap:28px!important;max-width:1240px}
 html.has-side-panel body .community-aside{display:block!important;position:sticky;top:var(--side-top,76px);align-self:start}
 html.has-side-panel body .community-aside::-webkit-scrollbar{display:none}
 html.has-side-panel[data-interface-style] body .community-main section.feed-daily.feed-shelf{display:none!important}
}
.side-panel{display:grid;gap:22px}
.side-panel[hidden]{display:none}
.side-hello{display:grid;gap:4px}
.side-hello>strong{font:800 15px var(--font-body,inherit)}
.side-sub{color:var(--muted);font-size:11.5px;text-transform:lowercase}
.side-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0 12px}
.side-tile{display:grid;gap:6px;padding:12px;border-radius:12px;background:var(--surface);border:1px solid var(--line)}
.side-tile span{font-size:11px;color:var(--muted);font-weight:650}
.side-tile b{font:800 17px var(--font-body,inherit)}
.side-btn{border:1px solid var(--line);background:transparent;color:var(--ink);border-radius:999px;padding:8px 14px;font:700 12px var(--font-body,inherit);cursor:pointer;white-space:nowrap}
.side-btn.is-main{width:100%;padding:11px;background:var(--ink);color:var(--bg);border-color:var(--ink);font-size:13px}
.side-btn:disabled{opacity:.6}
.side-block{display:grid;gap:4px}
.side-head{display:flex;justify-content:space-between;align-items:baseline;padding-bottom:8px;margin-bottom:4px;border-bottom:1px solid var(--line)}
.side-head strong{font:800 12px var(--font-body,inherit);letter-spacing:.06em;text-transform:uppercase}
.side-more{color:var(--muted);font-size:12px;text-decoration:none}
.side-more:hover{color:var(--ink)}
.side-row{display:flex;align-items:center;gap:10px;padding:6px 4px;border-radius:10px;color:var(--ink);text-decoration:none}
.side-row:hover{background:color-mix(in srgb,var(--ink) 6%,transparent)}
.side-n{width:14px;flex:none;color:var(--muted);font:700 12px var(--font-body,inherit);text-align:center}
.side-art{width:48px;height:48px;flex:none;border-radius:6px;overflow:hidden;background:var(--raised,#0003)}
.side-art img{width:100%;height:100%;object-fit:cover;display:block}
.side-text{display:grid;gap:1px;min-width:0}
.side-text b{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-text .side-sub{text-transform:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-stats{color:var(--muted);font-size:11px}
.side-person{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 4px}
.side-person-link{display:flex;align-items:center;gap:10px;min-width:0;color:var(--ink);text-decoration:none}
.side-person-link b{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-avatar{width:40px;height:40px;flex:none;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:var(--raised);color:#B7A6F0;font:700 12px var(--font-body,inherit);border:1px solid var(--line)}
.side-avatar img{width:100%;height:100%;object-fit:cover}
.side-battle{display:grid;grid-template-columns:auto 1fr;column-gap:10px;align-items:center;padding:12px;border-radius:12px;border:1px solid #B7A6F066;background:color-mix(in srgb,#B7A6F0 10%,var(--surface));color:var(--ink);text-decoration:none}
.side-battle-icon{grid-row:1/3;font-size:22px}
.side-battle b{font-size:13px}

/* side panel, calmer: one hello line, light headings */
.side-hello{gap:8px}
.side-hello-line{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:transparent;color:var(--ink);font:650 13px var(--font-body,inherit);cursor:pointer;text-align:left}
.side-hello-line span:first-child{color:#B7A6F0;font-weight:800}
.side-hello-line span+span{color:var(--muted)}
.side-hello-line i{margin-left:auto;font-style:normal;color:var(--muted)}
.side-hello-line:hover{border-color:var(--ink)}
.side-head{border-bottom:0;padding-bottom:2px}
.side-head strong{font-size:11px;color:var(--muted)}
.side-panel{gap:26px}

/* wide home feed: the Daily shelf is in the right panel — hide it by width alone, before the panel script runs (fullscreen switch) */
@media (min-width:1200px){html[data-interface-style] body .community-main.is-home section.feed-daily.feed-shelf{display:none!important}html[data-interface-style] body .community-layout:has(.community-main.is-home){grid-template-columns:minmax(0,1fr) 330px!important;gap:28px!important;max-width:1240px}}

/* ===== performance (26.11): fewer expensive effects, same look ===== */
/* Discover: the top card is opaque, so its glass blur was wasted work over an already blurred backdrop */
html body .dsc-card{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html body .dsc-actions button,html body .dsc-close{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:#ffffff1f}
html body .dsc-bg span{filter:blur(40px) saturate(1.4) brightness(.55);will-change:opacity}
/* swipe badges: the dashed ring no longer spins forever (it repainted glow filters every frame, even when hidden) */
html body .dsc-ring{animation:none!important}
html body .dsc-stamp svg{filter:drop-shadow(0 0 8px var(--glow))!important}
/* Telegram header: solid instead of a live blur that re-renders on every scroll */
html[data-telegram] body header{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:var(--bg)!important}
/* the feed renders only what is near the screen; sizes are remembered so scrolling does not jump */
html body #communityFeed>.community-post,html body #communityFeed>.amb{content-visibility:auto;contain-intrinsic-size:auto 420px}
/* small, cheap feedback on press */
:is(.primary,.author-back,.side-btn,.notes-pack,.battle-go,.mini-dock-item,.notes-button,.post-like,.post-tip,.dsc-actions button,.notes-tabs button,.mini-feed-switch button){transition:transform .12s ease,background-color .15s,border-color .15s,color .15s}
:is(.primary,.author-back,.side-btn,.notes-pack,.battle-go,.mini-dock-item,.notes-button,.post-like,.post-tip,.dsc-actions button,.notes-tabs button,.mini-feed-switch button):active{transform:scale(.96)}
@media (prefers-reduced-motion:reduce){:is(.primary,.author-back,.side-btn,.notes-pack,.battle-go,.mini-dock-item,.notes-button,.post-like,.post-tip,.dsc-actions button,.notes-tabs button,.mini-feed-switch button):active{transform:none}}
/* wide Telegram rail: equal items + «Слушать», notes card, support (rail-extras.js) */
.rail-extras,.rail-support{display:none}
@media(min-width:1000px){
 html[data-telegram] body .mini-dock .mini-dock-item{width:100%;font-size:13px}
 html[data-telegram] body .mini-dock .mini-dock-item.mini-create span{font-size:13px}
 html[data-telegram] body .rail-extras{display:flex;flex-direction:column;gap:2px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
 html[data-telegram] body .rail-label{font-size:10px;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted);padding:0 16px 6px;opacity:.75}
 html[data-telegram] body .rail-link{display:flex;align-items:center;gap:14px;width:100%;padding:10px 16px;border:0;border-radius:10px;background:none;color:var(--muted);font:inherit;font-size:13px;cursor:pointer;text-align:left;transition:background-color .15s,color .15s,transform .12s}
 html[data-telegram] body .rail-link svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 html[data-telegram] body .rail-link.active{background:var(--raised,#ffffff12);color:var(--ink)}
 html[data-telegram] body .rail-link:active{transform:scale(.97)}
 html[data-telegram] body .rail-support{display:flex;margin-top:auto}
 html[data-telegram] body .rail-support+.mini-dock-item[data-section=profile]{margin-top:2px}
 html[data-telegram] body .rail-notes{display:flex;flex-direction:column;gap:7px;margin-top:16px;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface,#ffffff08);color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,transform .12s}
 html[data-telegram] body .rail-notes[hidden]{display:none}
 html[data-telegram] body .rail-notes:active{transform:scale(.97)}
 html[data-telegram] body .rail-notes-top{display:flex;align-items:baseline;gap:6px}
 html[data-telegram] body .rail-notes-icon{color:var(--orange);font-size:17px}
 html[data-telegram] body .rail-notes-top b{font-size:20px;font-weight:650;letter-spacing:-.4px}
 html[data-telegram] body .rail-notes-top small,html[data-telegram] body .rail-notes-sub{color:var(--muted);font-size:11px}
 html[data-telegram] body .rail-notes-bar{height:4px;border-radius:3px;background:var(--line);overflow:hidden}
 html[data-telegram] body .rail-notes-bar i{display:block;height:100%;background:var(--orange);border-radius:3px;transition:width .4s ease}
 @media(hover:hover){html[data-telegram] body .rail-link:hover{color:var(--ink);background:var(--raised,#ffffff0d)}html[data-telegram] body .rail-notes:hover{border-color:var(--orange)}}
}
@media(min-width:1000px) and (max-height:620px){html[data-telegram] body .rail-notes{display:none}}
/* Discover: track lyrics — a separate panel next to the card, big Spotify-like lines (discover.js lyrics) */
html body .dsc-lyrics-btn{position:absolute;top:12px;right:12px;z-index:6;display:flex;align-items:center;gap:6px;padding:7px 12px 7px 10px;border:1px solid #ffffff2e;border-radius:999px;background:#0009;color:#fff;font:inherit;font-size:12px;font-weight:650;cursor:pointer;transition:background-color .15s,color .15s,transform .12s}
html body .dsc-lyrics-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
html body .dsc-lyrics-btn:active{transform:scale(.95)}
html body .dsc-lyrics-btn[aria-expanded=true]{background:#fff;color:#121214}
html body .dsc-stack{transition:transform .38s cubic-bezier(.2,.8,.2,1)}
html body .dsc-lyrics{position:absolute;z-index:20;display:flex;flex-direction:column;border-radius:24px;overflow:hidden;color:#fff;background:linear-gradient(160deg,color-mix(in srgb,var(--orange) 55%,#1c1a24),color-mix(in srgb,var(--orange) 22%,#141318));box-shadow:0 30px 60px #0009;animation:dsc-lyrics-in .38s cubic-bezier(.2,.8,.2,1) both}
html body .dsc-lyrics.is-out{animation:dsc-lyrics-out .22s ease both}
html body .dsc-lyrics-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 6px 24px;flex:none}
html body .dsc-lyrics-head strong{font-size:12px;letter-spacing:1.4px;text-transform:uppercase;opacity:.7}
html body .dsc-lyrics-close{width:32px;height:32px;border-radius:50%;border:0;background:#0003;color:#fff;font-size:20px;line-height:1;cursor:pointer}
html body .dsc-lyrics-lines{flex:1;overflow:auto;overscroll-behavior:contain;padding:8px 24px 32px;-webkit-user-select:text;user-select:text;scrollbar-width:thin;scrollbar-color:#ffffff40 transparent;-webkit-mask-image:linear-gradient(#000 85%,transparent);mask-image:linear-gradient(#000 85%,transparent)}
html body .dsc-lyrics-lines p{margin:0 0 14px;font-family:var(--font-body,inherit);font-size:clamp(20px,1.9vw,26px);line-height:1.3;font-weight:800;letter-spacing:-.3px;color:#ffffffd9;transition:color .15s}
html body .dsc-lyrics-lines p.is-gap{height:14px;margin:0}
@media(hover:hover){html body .dsc-lyrics-lines p:not(.is-gap):hover{color:#fff}}
/* narrow screens: a sheet over Discover */
html body .dsc-lyrics.is-sheet{animation-name:dsc-lyrics-up;border-radius:22px}
html body .dsc-lyrics.is-sheet .dsc-lyrics-head{padding:12px 12px 2px 18px}
html body .dsc-lyrics.is-sheet .dsc-lyrics-lines{padding:4px 18px 24px}
html body .dsc-lyrics.is-sheet.is-out{animation-name:dsc-lyrics-down}
html body .dsc-lyrics.is-sheet .dsc-lyrics-lines p{font-size:19px;margin-bottom:10px}
@keyframes dsc-lyrics-in{from{opacity:0;transform:translateX(-30px) scale(.98)}to{opacity:1;transform:none}}
@keyframes dsc-lyrics-out{to{opacity:0;transform:translateX(-30px) scale(.98)}}
@keyframes dsc-lyrics-up{from{opacity:0;transform:translateY(40px)}to{opacity:1;transform:none}}
@keyframes dsc-lyrics-down{to{opacity:0;transform:translateY(40px)}}
@media (prefers-reduced-motion:reduce){html body .dsc-lyrics,html body .dsc-lyrics.is-out{animation:none}html body .dsc-stack{transition:none}}
/* scroll-top sits above the mini player when it is shown (vibe.js publishes --np-stack) */
html[data-telegram] .scroll-top{bottom:max(calc(96px + var(--rifma-safe-bottom,0px) + env(safe-area-inset-bottom)),var(--np-stack,0px))}
@media (min-width:1000px){html[data-telegram] .scroll-top{bottom:max(28px,var(--np-stack,0px))}}
html:not([data-telegram]) .scroll-top{bottom:max(calc(24px + env(safe-area-inset-bottom)),var(--np-stack,0px))}
/* «Мои слова» on a phone: once there are words, the panel sticks to the bottom (above the dock / mini player), words in one scrolling row */
@media (max-width:999px){
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)){position:sticky;bottom:max(var(--dock-space,12px),var(--np-stack,0px));z-index:40;margin-top:12px;padding:12px 14px;gap:8px;box-shadow:0 -10px 30px #0007;background:var(--surface)}
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)) .selected-top{margin:0;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;justify-content:space-between;gap:8px}
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)) .selected-actions{display:flex;gap:6px;flex-wrap:nowrap;margin:0}
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)) .selected-chip{padding:6px 10px;font-size:14px}
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)) .selected-top h2{font-size:15px}
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)) .selected-actions button{padding:7px 11px;font-size:12px;white-space:nowrap;min-height:0}
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)) .selected-top h2{white-space:nowrap}
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)) #selectedWords{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:6px;margin:0}
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)) #selectedWords::-webkit-scrollbar{display:none}
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)) #selectedWords>*{flex:none}
 #rhymesPanel .selected-panel:has(#selectedWords:not(:empty)) .selected-status{display:none}
}
/* stories viewer (stories.js) */
.st{position:fixed;inset:0;z-index:10000;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#000;color:#fff;opacity:0;transition:opacity .2s;touch-action:none;user-select:none;-webkit-user-select:none;overflow:hidden}
.st.on{opacity:1}
.st[hidden]{display:none}
html.stories-open{overflow:hidden}
.st-bg{position:absolute;inset:-40px;background:#1b1a22 center/cover no-repeat;filter:blur(40px) saturate(1.4) brightness(.5);transform:scale(1.1)}
.st-bars{position:absolute;left:12px;right:12px;top:calc(10px + var(--rifma-safe-top,0px) + var(--tg-content-safe-area-inset-top,0px));display:flex;gap:4px;z-index:2;max-width:520px;margin:0 auto}
.st-bar{flex:1;height:3px;border-radius:2px;background:#ffffff40;overflow:hidden}
.st-bar i{display:block;height:100%;width:0;background:#fff}
.st-bar.is-done i{width:100%}
.st-top{position:absolute;left:12px;right:12px;top:calc(22px + var(--rifma-safe-top,0px) + var(--tg-content-safe-area-inset-top,0px));display:flex;align-items:center;justify-content:space-between;z-index:2;max-width:520px;margin:0 auto}
.st-who{display:flex;align-items:center;gap:9px;color:#fff;text-decoration:none;min-width:0}
.st-who b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-who small{font-size:12px;opacity:.7}
.st-avatar{width:34px;height:34px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#ffffff26;font-size:12px;font-weight:700;flex:none}
.st-avatar img{width:100%;height:100%;object-fit:cover}
.st-close{width:38px;height:38px;border:0;border-radius:50%;background:#0004;color:#fff;font-size:24px;line-height:1;cursor:pointer}
.st-card{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;text-align:center;width:min(88vw,420px);animation:st-in .35s cubic-bezier(.2,.8,.2,1) both}
.st-art{width:100%;aspect-ratio:1;border-radius:20px;overflow:hidden;background:#ffffff1a;display:grid;place-items:center;font-size:48px;color:#ffffff80;box-shadow:0 30px 70px #000a}
.st-art img{width:100%;height:100%;object-fit:cover;display:block}
.st-kind{margin-top:22px;font-size:11px;letter-spacing:1.6px;text-transform:uppercase;opacity:.75}
.st-title{margin:8px 0 0;font-size:clamp(24px,6vw,32px);line-height:1.1;font-weight:800;letter-spacing:-.6px;overflow-wrap:anywhere}
.st-artist{margin:6px 0 0;font-size:15px;opacity:.8}
.st-open{margin-top:22px;padding:13px 26px;border-radius:999px;background:#fff;color:#121214;font-weight:700;font-size:15px;text-decoration:none;transition:transform .12s}
.st-open:active{transform:scale(.96)}
@keyframes st-in{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.st,.st-card{transition:none;animation:none}}
@media (max-height:640px){.st-card{width:min(70vw,300px)}.st-kind{margin-top:12px}.st-open{margin-top:14px}}
dialog.tg-only #accountAuthForm,dialog.tg-only .account-tabs,dialog.tg-only .tg-login-or{display:none!important}
/* «Роли у ника»: ‹ › to reorder */
.roles-visibility-item{display:inline-flex;align-items:center;gap:2px}
.roles-visibility-move{width:26px;height:30px;border:0;border-radius:8px;background:none;color:var(--muted);font-size:18px;line-height:1;cursor:pointer;transition:background-color .15s,color .15s}
.roles-visibility-move:hover:not(:disabled){background:var(--raised,#ffffff12);color:var(--ink)}
.roles-visibility-move:disabled{opacity:.25;cursor:default}
/* roles: drag to reorder (roles-visibility.js) */
.roles-visibility-chip{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;cursor:grab}
.roles-visibility-chip.is-dragging{opacity:.3}
.roles-visibility-ghost{position:fixed;left:0;top:0;z-index:10001;pointer-events:none;margin:0;box-shadow:0 12px 30px #0008;transform-origin:center;opacity:.95;cursor:grabbing}
.roles-visibility-hint{flex-basis:100%;margin:6px 0 0;color:var(--muted);font-size:12px}
/* chips keep their borders visible at the edges of the scroll box */
.selected-words{padding:3px 2px;overflow-anchor:none}
/* topic search hidden until it works well (ROADMAP); «Продолжить строку» takes the freed cell */
.topicbox{display:none!important}
.sx-continue{grid-column:span 2}
