:root[data-channel-loading] body>main{visibility:hidden}
/*
 * Play by Praya. Background correction: restore the pre-palette dark shell; the supplied
 * palette controls accents, not the page background. Keep the five --p-* reference values
 * unchanged for the wordmark, buttons, indicators and QR ink.
 * Base/panel/row/border values come from the pre-v18 backup, not a new interpretation of the image.
 * Contrast is checked on the actual resolved surfaces in the palette tests.
 */
:root{
  color-scheme:dark;
  --safe-area-top:env(safe-area-inset-top,0px);
  --safe-area-right:env(safe-area-inset-right,0px);
  --safe-area-bottom:env(safe-area-inset-bottom,0px);
  --safe-area-left:env(safe-area-inset-left,0px);

  /* ---------- the five supplied palette colours: the single source ---------- */
  --p-navy:#020038;
  --p-blue:#097AEC;
  --p-cyan:#00FFEE;
  --p-magenta:#F511CB;
  --p-violet:#6425A7;

  /* ---------- restored dark shell; reference colours are accents only ---------- */
  --bg:#0e1015;
  --surface:#151922;
  --surface-2:#1b2029;
  --surface-hover:#2a323f;
  --surface-active:#17262a;
  --surface-inset:#101720;
  --backdrop:#05070cbb;
  --backdrop-strong:#0e1015f2;
  --line:#242a35;
  --line-soft:#1e2430;
  --accent-line:#1f7f74;        /* a cyan-family border, dimmed so it reads as a border not a fill */
  --secondary-line:#2b4f96;     /* a blue-family border */
  --paused:#f0cd85;             /* a PAUSED progress bar: warm amber, deliberately not cyan and not red */

  /* ---------- drag-and-drop cues: the BLUE secondary family ---------- */
  --drop-line:var(--p-blue);              /* the dashed outline of the dragged placeholder */
  --drop-ghost-bg:#097aec1a;              /* the placeholder slot behind a dragged row */
  --drop-available-bg:#097aec0f;          /* a list that can accept a drop */
  --drop-available-line:#097aec59;
  --drop-over-bg:#097aec24;               /* the list currently hovered by a drag */
  --drop-over-line:#097aecb3;

  /* ---------- readable text ---------- */
  --text:#f2f5ff;               /* 15.8:1 on a panel, 18.2:1 on the base */
  --muted:#b3bde8;              /* 9.3:1 on a panel */
  --muted-dim:#9aa5db;          /* 7.2:1 on a panel */

  /* ---------- semantic aliases of the palette ---------- */
  --accent:var(--p-cyan);              /* primary accent: bright cyan */
  --accent-strong:#6bfff5;             /* hover of a cyan fill */
  --accent-ink:var(--p-navy);          /* dark navy glyph on a bright cyan fill: 15.6:1 */
  --accent-text:#8dfff8;               /* cyan-family TEXT, kept bright on any navy surface */
  --secondary:var(--p-blue);           /* borders, outlines and secondary cues */
  --secondary-text:#6cb2f7;            /* readable blue-family text: 7.7:1 on a panel */
  --tint:var(--p-violet);              /* hover/active tint only, never fine text */
  --tint-text:#c3a2ee;                 /* readable violet-family text: 8.0:1 on a panel */
  --brand:var(--p-magenta);            /* the "Play" wordmark */
  --brand-strong:#ff5cd8;
  --accent-soft:#00ffee14;
  --accent-glow:#00ffee12;
  --accent-glow-strong:#00ffee20;
  --menu-divider:#ffffff0d;
  --listener-row-line:#ffffff08;
  --listener-row-active:#ffffff03;
  --sound-backdrop:#05070bb8;
  /* Warm red stays a DISTINCT destructive/error semantic: never a disguised success colour. */
  --danger:#ff9aa2;
  --danger-line:#7c2b3c;
  --danger-bg:#3a1030;
  --warning:#f0cd85;
  --warning-line:#8a6a2f;

  --radius:14px;--radius-sm:10px;
  --button-height:44px;--button-radius:999px;--button-font-size:14px;--button-line-height:20px;--button-weight:550;--button-padding:10px 16px;
  font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  background:var(--bg);color:var(--text);font-synthesis:none;
}
/* The same Minimal design follows the personal mode before channel artwork has loaded. */
:root[data-color-mode=light]{
  color-scheme:var(--channel-color-scheme,light);
  --bg:#f5f6f8;--surface:#ffffff;--surface-2:#eef0f3;
  --surface-active:#dbe6e8;--surface-hover:#e5ecef;--surface-inset:#f5f6f8;
  --text:#20252e;--muted:#586170;--muted-dim:#586170;
  --line:#c6cbd2;--line-soft:#c6cbd2;
  --accent:#00756c;--accent-ink:#ffffff;--accent-strong:#00665e;--accent-text:#00756c;--accent-line:#00756c;
  --secondary:#3469ac;--secondary-text:#3469ac;--secondary-line:#3469ac;
  --brand:#b50b95;--brand-strong:#94097b;--tint:#6425a7;--tint-text:#6425a7;--paused:#80612a;
  --drop-line:#3469ac;--drop-ghost-bg:#3469ac1a;--drop-available-bg:#3469ac0f;
  --drop-available-line:#3469ac59;--drop-over-bg:#3469ac24;--drop-over-line:#3469acb3;
  --backdrop:#252c4266;--backdrop-strong:#f5f6f8f2;--sound-backdrop:#252c4266;
  --accent-soft:#00756c14;--accent-glow:#00756c12;--accent-glow-strong:#00756c20;
  --menu-divider:#c6cbd2;--listener-row-line:#c6cbd2;--listener-row-active:#eef0f3;
  --range-rail:#b2b7bf;--scroll-thumb:#a3a9b2;--scroll-track:#ffffff;
  --danger:#995c61;--danger-line:#ccaeb0;--danger-bg:#f5efef;--warning:#7d6b45;--warning-line:#beb5a2;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);--channel-page-pad:clamp(20px,4.5vw,60px)}
main{max-width:1440px;min-height:100svh;margin:0 auto;padding:calc(var(--channel-page-pad) + var(--safe-area-top)) calc(var(--channel-page-pad) + var(--safe-area-right)) calc(var(--channel-page-pad) + var(--safe-area-bottom)) calc(var(--channel-page-pad) + var(--safe-area-left))}
h1,h2,h3{margin:0;letter-spacing:-.02em;font-weight:640}
h1{font-size:30px;line-height:1.2}
h2{font-size:17px}
p{margin:0}
svg{width:20px;height:20px;fill:currentColor;display:block}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- top bar ---------- */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:44px;margin-bottom:18px}
/**
 * The wordmark. Two lines in a grid so the second line starts on the SAME left edge as the first,
 * which is what makes their optical widths line up without any image scaling or font stretching.
 *
 * Both lines are sized from the same root font size and use explicit tracking instead of a transform,
 * so a narrower viewport shrinks the whole mark uniformly and the two lines stay proportional. The
 * negative tracking on "Play" and the positive tracking on "by Praya" are tuned so the shorter, lighter
 * line fills the width of the larger one; the numbers are documented in docs/PLAY-V17.md.
 */
.brand{display:inline-flex;flex-direction:column;align-items:flex-start;gap:0;text-decoration:none;line-height:1;color:var(--text)}
/* One grid column keeps the two lines left-aligned to the same edge with no extra markup. */
.brand-line{display:block;white-space:nowrap}
.brand-play{font-size:clamp(24px,4.6vw,30px);font-weight:760;letter-spacing:-.022em;color:var(--brand);padding-bottom:1px}
.brand-by{font-size:clamp(11px,1.9vw,13px);font-weight:470;letter-spacing:.055em;color:var(--muted-dim)}
.brand:hover .brand-play{color:var(--brand-strong)}
.brand:hover .brand-by{color:var(--muted)}
/* The accessible name is the full wordmark; the two lines are decorative halves of one label. */
.brand .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.top-actions{display:flex;align-items:center;gap:10px}
.conn{font-size:12px;color:var(--muted);white-space:nowrap;max-width:190px;overflow:hidden;text-overflow:ellipsis}
.conn::before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--muted-dim);margin-right:7px;vertical-align:middle}
.conn.ok::before{background:var(--accent)}
.conn.bad::before{background:var(--danger)}
.profile-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:4px;background:transparent;border:0;border-radius:50%;color:var(--text);font-size:13px;font-weight:550;cursor:pointer}
.profile-button:hover{background:var(--surface-hover)}
.avatar{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-size:13px;font-weight:700}
.profile-button .avatar{width:36px;height:36px}
.profile-label{display:none}
.status{font-size:12.5px;color:var(--accent-strong);margin:-6px 0 12px;line-height:1.5;overflow-wrap:anywhere}
.status:empty{display:none}
/* Global feedback is reserved for failures/access loss and never participates in page layout. */
#global-status:not(:empty){position:fixed;inset:auto calc(16px + var(--safe-area-right)) calc(20px + var(--safe-area-bottom)) calc(16px + var(--safe-area-left));width:max-content;max-width:min(560px,calc(100vw - 32px - var(--safe-area-left) - var(--safe-area-right)));z-index:60;margin:0 auto;padding:12px 16px;border:0;border-radius:10px;background:var(--surface-2);color:var(--danger);box-shadow:0 8px 30px #0003}

/* ---------- menus: real buttons + aria-expanded, closed on Escape/outside ---------- */
.menu-anchor{position:relative;display:inline-flex}
.menu{position:absolute;top:calc(100% + 7px);left:0;z-index:40;min-width:212px;max-width:min(320px,86vw);max-height:calc(100svh - 100px);overflow-y:auto;padding:7px;background:var(--surface-2);border:0;border-radius:var(--radius-sm);box-shadow:0 14px 34px #0007;display:flex;flex-direction:column;gap:2px}
.menu-right{left:auto;right:0}
.menu button,.menu a.menu-link{display:flex;align-items:center;gap:9px;width:100%;min-height:40px;padding:9px 11px;background:transparent;border:0;border-radius:8px;color:var(--text);font:inherit;font-size:13.5px;font-weight:520;text-align:left;text-decoration:none;cursor:pointer}
.menu button:hover,.menu a.menu-link:hover{background:var(--surface-hover)}
.menu-title{margin:7px 11px 2px;font-size:11.5px;color:var(--muted-dim)}
.menu-value{margin:0 11px 7px;font-size:12.5px;color:var(--muted);overflow-wrap:anywhere}
.menu-note{margin:6px 11px 8px;font-size:11.5px;line-height:1.5;color:var(--muted-dim)}
.head-actions .menu-anchor{align-items:center}

/* ---------- generic controls ---------- */
/* Pages and Radix dialogs use the same button geometry and semantic variants. */
button,.upload,a.button-link{border:0;border-radius:var(--button-radius);background:var(--surface-2);color:var(--text);font:inherit;font-size:var(--button-font-size);font-weight:var(--button-weight);line-height:var(--button-line-height);min-height:var(--button-height);padding:var(--button-padding);cursor:pointer;touch-action:manipulation;transition:background .14s ease,color .14s ease}
button:where(:not(:disabled):not([aria-disabled=true])):hover,.upload:hover,a.button-link:hover{background:var(--surface-hover)}
button:disabled{opacity:.45;cursor:not-allowed}
.primary{background:var(--accent);color:var(--accent-ink)}
.primary:where(:not(:disabled):not([aria-disabled=true])):hover{background:var(--accent-strong)}
.quiet{background:transparent;color:var(--muted)}
.quiet:where(:not(:disabled):not([aria-disabled=true])):hover{background:var(--surface-hover);color:var(--text)}
.danger{background:transparent;color:var(--danger)}
.danger:where(:not(:disabled):not([aria-disabled=true])):hover{background:var(--danger-bg)}
.icon-button{display:inline-flex;align-items:center;justify-content:center;width:var(--button-height);height:var(--button-height);padding:0;background:transparent;color:var(--muted)}
.icon-button:where(:not(:disabled):not([aria-disabled=true])):hover{background:var(--surface-hover);color:var(--text)}
.icon-button.primary{background:var(--accent);color:var(--accent-ink)}
.icon-button.primary:where(:not(:disabled):not([aria-disabled=true])):hover{background:var(--accent-strong)}
.secondary{background:var(--surface-2);color:var(--text)}
.secondary:where(:not(:disabled):not([aria-disabled=true])):hover{background:var(--surface-hover);color:var(--text)}
.actions{display:flex;gap:9px;flex-wrap:wrap}
.upload{display:inline-flex;align-items:center;gap:6px;margin:0;white-space:nowrap}
input,select{width:100%;min-width:0;min-height:44px;background:var(--surface-inset);color:var(--text);border:0;border-radius:var(--radius-sm);padding:10px 12px;font:inherit;font-size:16px;line-height:22px}
input[type=range]{min-height:26px;padding:0;accent-color:var(--accent);background:transparent;border:0}
input[type=checkbox]{width:auto;min-height:17px;accent-color:var(--accent)}
input[readonly]{font:16px ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--muted)}
label.field{min-width:0;display:flex;flex-direction:column;gap:7px;font-size:12.5px;color:var(--muted);margin:0 0 16px}
label.checkbox{display:flex;flex-direction:row;align-items:center;gap:9px;font-size:13.5px;color:var(--text);margin:0 0 11px;min-height:26px}
.sub{color:var(--muted);line-height:1.55}
.small{font-size:12px;line-height:1.55}
.sub.small{margin-top:6px}
.vis{font-size:11.5px;color:var(--muted-dim)}
.panel{padding:18px;border:0;border-radius:var(--radius);background:var(--surface);margin-bottom:16px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.head-actions{display:flex;align-items:center;gap:8px}
.disclosure{margin:4px 0 12px;padding-top:12px}
.settings-section{margin:16px 0 12px;padding-top:13px}
.settings-section h3{font-size:13.5px;font-weight:600;margin-bottom:6px}
.settings-section .sub.small{margin-bottom:10px}
/* ---------- account, sessions and auth form ---------- */
/* Session rows reuse the library row shape so desktop and mobile show one consistent list. */
.session-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 14px;background:var(--surface-2);border:0;border-radius:var(--radius-sm)}
.session-row .library-title{min-width:0;flex:1 1 180px}
.session-badge{display:inline-block;padding:2px 8px;border:0;border-radius:999px;font-size:11px;color:var(--muted);white-space:nowrap}
.session-row button{flex:0 0 auto}
.auth-preview{margin:12px 0;padding:12px;border:0;border-radius:var(--radius-sm);background:var(--surface-2)}
.auth-preview h3{font-size:13.5px;font-weight:600;margin-bottom:6px}
.auth-preview .library{gap:0}
.auth-warning{color:var(--muted);padding:10px 12px;background:var(--surface-2);border-radius:var(--radius-sm)}
.menu-value.small{font-size:11.5px;color:var(--muted-dim)}
.disclosure summary{font-size:13px;font-weight:550;color:var(--muted);cursor:pointer;list-style:none;min-height:32px;display:flex;align-items:center}
.disclosure summary::-webkit-details-marker{display:none}
.disclosure summary::before{content:'\203A';margin-right:9px;font-size:15px;transition:transform .15s ease}
.disclosure[open] summary::before{transform:rotate(90deg)}
.disclosure summary:hover{color:var(--text)}

/* ---------- home ---------- */
#home{min-width:0;container-type:inline-size;--home-hero-bleed:0px}
/* A compact static crop of the original reference, with faces kept in view. */
.home-hero-slot{width:100%;margin:0 0 12px}
.home-hero-frame{width:100%;aspect-ratio:3/1;margin:0;border-radius:18px;overflow:hidden}
.home-hero{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 30%;margin:0;border-radius:inherit}
@media(max-width:720px){.home-hero-frame{aspect-ratio:2.6/1}}
.home-title{font-size:clamp(23px,3vw,32px);line-height:1.2;font-weight:560}
.home-head{min-height:44px;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.home-intro{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;padding:0 0 16px;margin-bottom:24px;border-bottom:1px solid var(--line)}
.home-intro-copy{display:grid;gap:6px;min-width:0}
#home-intro-title{font-size:clamp(22px,2.4vw,28px);font-weight:600;line-height:1.25;letter-spacing:-.02em;text-wrap:balance}
.home-intro-actions{display:grid;grid-template-columns:minmax(108px,1fr) minmax(0,3fr);gap:12px;align-items:stretch}
.home-intro-actions :is(button,a){width:100%;min-width:0;min-height:56px;font-size:24px;line-height:1.15;font-weight:700;padding-inline:12px;white-space:nowrap;border-radius:12px}
html[lang="ru"] .home-intro-actions{grid-template-columns:minmax(max-content,1fr) minmax(0,3fr)}
@media(max-width:360px){html[lang="ru"] .home-intro-actions :is(button,a){font-size:20px;padding-inline:8px}}
.home-cta-label{display:inline-block;color:#f4ffff;filter:drop-shadow(0 1px 1px #17233666)}
@supports (background-clip:text) or (-webkit-background-clip:text){.home-cta-label{background:linear-gradient(180deg,#ffffff 10%,#f2ffff 100%);background-clip:text;-webkit-background-clip:text;color:transparent}}
/* Keep related purple/cyan/blue garment hues at their original x / 1672 positions; omit warm/green stops. */
#home #new-channel{background:#da6436;color:#f4ffff}
#home #home-browse{background-color:#a15bdd;background-image:linear-gradient(90deg,#a15bdd 28.947368%,#885cdd 43.600478%,#188fc9 78.409091%,#9560dc 88.337321%,#537bd9 92.105263%);background-image:linear-gradient(90deg in oklch shorter hue,#a15bdd 28.947368%,#885cdd 43.600478%,#188fc9 78.409091%,#9560dc 88.337321%,#537bd9 92.105263%);background-size:calc(100cqw + 2*var(--home-hero-bleed)) 100%;background-position:right calc(-1*var(--home-hero-bleed)) center;background-repeat:no-repeat;color:#f4ffff}
@media(forced-colors:none){#home .home-intro-actions :is(#new-channel,#home-browse):hover{box-shadow:inset 0 0 0 999px #0000000a}}
@media(forced-colors:active){#home #new-channel,#home #home-browse{background:ButtonFace;color:ButtonText;box-shadow:none}.home-cta-label{background:none;color:ButtonText;filter:none}}
.home-noscript{font-size:14px;color:var(--muted)}
@media(max-width:720px){.home-intro{gap:18px;padding-bottom:14px;margin-bottom:20px}.home-intro-actions{grid-template-columns:minmax(96px,1fr) minmax(0,3fr);gap:8px}.home-intro-actions :is(button,a){min-height:52px;padding-inline:10px;font-size:21px}}
.home-channel-groups{display:grid;gap:30px}
.home-channel-group{min-width:0}
.home-channel-group-title{font-size:clamp(20px,2.5vw,26px);line-height:1.2;font-weight:560;margin-bottom:18px}
.channel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:20px;align-items:start}
.channel-card{display:block;min-width:0;overflow:hidden;border-radius:18px;background:var(--bg);color:var(--text);text-decoration:none;transition:box-shadow .15s ease}
.channel-card:not([data-channel-palette]){background:var(--surface)}
.channel-card:hover{box-shadow:0 8px 28px #0002}
.channel-card:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.channel-card-banner-wrap{aspect-ratio:16/9;overflow:hidden;background:var(--bg)}
.channel-card-banner{display:block;width:100%;height:100%;object-fit:cover}
.channel-card-banner-placeholder{height:100%;background:var(--surface-2)}
.channel-card-body{display:flex;align-items:flex-start;gap:12px;padding:16px}
.channel-card-logo-wrap{display:grid;place-items:center;flex:0 0 52px;width:52px;height:52px;overflow:hidden;border-radius:14px;background:var(--surface-2)}
.channel-card-logo{display:block;width:100%;height:100%;object-fit:contain}
.channel-card-initial{font-size:24px;font-weight:600;color:var(--accent-text)}
.channel-card-copy{flex:1;min-width:0}
.channel-card-heading{display:flex;align-items:baseline;gap:6px;height:2.7em;font-size:18px}
.channel-card-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;min-width:0;overflow:hidden;font-size:inherit;font-weight:560;line-height:1.35;overflow-wrap:anywhere}
.channel-card-lock{flex:none;color:var(--muted)}
.channel-card-lock svg{width:14px;height:14px}
.channel-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;height:20px;margin-top:8px;color:var(--muted);font-size:12px;line-height:20px}
.channel-card-role{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.channel-card-role:empty{display:none}
.channel-card-listening{display:inline-flex;flex:none;align-items:center;gap:5px;margin-inline-start:auto;white-space:nowrap}
.channel-card-listening svg{width:16px;height:16px}
.channel-card-lock svg,.channel-card-listening svg{fill:none}
.channel-card-listening-count{font-variant-numeric:tabular-nums}
.channel-card-unavailable{display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0;padding:20px;border-radius:18px;background:var(--surface);color:var(--muted)}
.channel-card-unavailable-title{font-size:17px;font-weight:560;color:var(--text)}
.channel-card-unavailable-copy{font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.channel-card-unavailable button{margin-inline-start:-16px}
.home-empty{grid-column:1/-1;padding:32px 0;color:var(--muted);font-size:15px;line-height:1.6}
.home-channels-status{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;min-height:44px;margin-top:8px;color:var(--muted);font-size:13px;line-height:1.5}
@media(forced-colors:active){.channel-card,.channel-card-unavailable{outline:1px solid CanvasText}.channel-card:focus-visible{outline:2px solid Highlight}}
.library{display:flex;flex-direction:column;gap:7px}
a.track{text-decoration:none}
.track{display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;width:100%;min-height:52px;padding:12px 14px;background:var(--surface-2);border:0;border-radius:var(--radius-sm);color:var(--text);font-size:13.5px}
@media(hover:hover) and (pointer:fine) and (not (any-pointer:coarse)){
 .track:hover{background:var(--surface-hover)}
}
.track-name{display:block;overflow-wrap:anywhere;line-height:1.45}
.track-info{display:block;color:var(--muted-dim);font-size:11.5px;margin-top:3px}
.track.unavailable{border-style:dashed;border-color:var(--line);opacity:.9}
#recovery .actions{margin-top:12px}

/* ---------- channel head ---------- */
.channel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.channel-title{min-width:0}
.channel-name-line{display:flex;align-items:center;gap:8px;min-width:0}
.channel-name-line h1{min-width:0}
.channel-lock{display:inline-flex;flex:none;align-items:center;color:var(--muted)}
.channel-lock svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.channel-head h1{font-size:26px;overflow-wrap:anywhere}
.channel-sub{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin-top:5px}
.channel-sub .sub.small{margin:0}
.channel-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.channel-share,.channel-people{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.channel-share svg,.channel-people svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
/* Reserve space for both subscription labels so neighbouring actions stay still. */
@media(min-width:721px){.channel-actions>#subscription-toggle{inline-size:9em;flex:0 0 auto}}

/* ---------- dialogs ---------- */
.sheet-body{padding:24px;min-width:0}
.sheet-body h2{margin-bottom:14px}
.sheet-body>.sub.small{margin-bottom:11px}
.sheet-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:16px}
.sheet-actions .small{margin:0}
.danger-zone{margin-top:20px;padding-top:14px}
/* A deliberate two-step confirmation, expressed as a class so the role-based [data-admin] pass can never
   resurrect the first button while the confirmation is pending. */
.danger-zone.confirming #delete-channel{display:none}
.danger-zone #delete-confirm-box{margin-top:11px;display:flex;gap:9px;flex-wrap:wrap;align-items:center}
.danger-zone #delete-confirm-box .sub{width:100%;margin:0 0 3px}
/* ---------- account deletion and the account landings (v16) ---------- */
/* The account deletion contract is a collapsed danger section: the consequences are read before the
   confirmation exists, and the confirmation only appears after the server's real preview is loaded. */
.danger-section summary{color:var(--danger)}
.danger-section #delete-account-contract{margin-top:11px}
.danger-section #delete-account-lines{gap:0}
.danger-section #delete-account-lines .sub{margin:0 0 5px}
.danger-section #delete-account-password{margin-top:4px}
.danger-section .sheet-actions{margin-top:11px}
/* A plain anchor styled as a button, used by the landing pages for "На главную" and "Войти". */
a.button-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
a.button-link.primary{background:var(--accent);color:var(--accent-ink)}
a.button-link.primary:hover{background:var(--accent-strong);color:var(--accent-ink)}
#verify-resend-status:empty,#delete-account-status:empty,#forgot-status:empty{display:none}
#verify-resend-status,#verify-resend-status:empty{margin:0}
.auth-error{color:var(--danger)}
#channel-info{white-space:pre-line}
#upload-status{white-space:pre-line;margin-top:8px}
#action-status:empty,#upload-status:empty,#rename-status:empty,#copy-status:empty,#create-error:empty{display:none}
#action-status,#copy-status{color:var(--accent-strong)}
#create-error,#rename-status{color:var(--danger)}
#share-url{margin:6px 0 12px}

/* ---------- participants ---------- */
.presence-summary{display:flex;flex-wrap:wrap;align-items:center;gap:5px;color:var(--muted);font-size:13px;line-height:1.5;margin-bottom:12px}
.presence-summary>[title]{cursor:help}
.participant-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;overflow-wrap:anywhere}
.participant-row:first-child{border-top:0}
.participant-row .who{min-width:0;flex:1}
.participant-row strong{font-size:13.5px;font-weight:600}
.participant-row .state{display:block;font-size:11.5px;color:var(--muted-dim);margin-top:2px}
.participant-row details{width:100%}
.participant-row details summary{font-size:11.5px;color:var(--muted-dim);cursor:pointer;list-style:none;padding:3px 0}
.participant-row details summary::-webkit-details-marker{display:none}
.participant-row details p{margin:5px 0 0;font-size:11.5px;color:var(--muted);white-space:pre-line;line-height:1.6}
.participant-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}
.participant-actions>.icon-button{width:44px;height:44px;min-height:44px}
.participant-action-menu{position:fixed;inset:auto;margin:0;box-sizing:border-box;width:min(248px,calc(100vw - 32px));padding:7px;border:0;border-radius:12px;background:var(--surface-2);color:var(--text);box-shadow:0 10px 28px #0004}
.participant-action-menu>button{display:block;width:100%;min-height:44px;padding:9px 10px;border:0;border-radius:7px;text-align:left;font-size:13px;background:transparent}
.participant-action-menu>button:hover{background:var(--surface-hover)}

/* ---------- metrics/diagnostics ---------- */
.metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin:12px 0}
.metrics span{display:block;font-size:11px;color:var(--muted-dim)}
.metrics strong{display:block;font-size:14px;font-weight:560;font-variant-numeric:tabular-nums;white-space:nowrap;margin-top:2px}
pre{font:11px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted);margin:0;max-height:250px;overflow:auto}

/* ---------- output synchronisation (v14) ---------- */
.sync-section .sync-output{margin:10px 0 4px;font-size:14px}
.sync-section .sync-output strong{font-weight:560}
.sync-section .sync-quality-line{margin:8px 0 4px}
.sync-badge{display:inline-block;padding:3px 9px;border-radius:999px;border:0;font-size:11.5px;font-weight:550;color:var(--muted)}
.sync-badge[data-quality="manual"]{border-color:var(--accent-line);color:var(--accent-text)}
.sync-badge[data-quality="review"]{border-color:var(--warning-line);color:var(--warning)}
.sync-badge[data-quality="browser-estimate"]{border-color:var(--secondary-line);color:var(--secondary-text)}
.sync-badge[data-quality="insufficient"]{color:var(--muted-dim)}
.sync-manual,.sync-picker,.sync-test{margin:12px 0 0;padding-top:10px}
.sync-actions button{min-height:34px}
.sync-save{display:flex;gap:8px;align-items:flex-end;margin:0 0 10px}
.sync-save .field{flex:1 1 auto;margin:0}
.sync-save button{flex:0 0 auto;min-height:38px}
.sync-legacy{margin:12px 0 0;padding:10px;border:0;border-radius:9px}
.menu-sync-note{margin-top:2px}
@media(max-width:360px){.sync-save{flex-direction:column;align-items:stretch}.sync-save button{width:100%}}

/* ---------- narrow phones (390 / 320) ---------- */
@media(max-width:720px){
  .brand{font-size:19px}
  h1{font-size:24px}
  .channel-head{flex-direction:column;gap:12px}
  .channel-actions{width:100%;justify-content:flex-start}
  .channel-actions>button{flex:1 1 auto;min-width:calc(50% - 6px)}
  .channel-actions .menu-anchor{flex:0 0 auto}
  .conn{max-width:82px}
  .panel{padding:15px}
  /* A session row stacks instead of squeezing its device label and action onto one cramped line. */
  .session-row{align-items:flex-start}
  .session-row button{width:100%}
}
@media(max-width:360px){
  .sheet-body{padding:18px}
  .metrics{grid-template-columns:1fr}
  .session-row button{font-size:12.5px}
}
@media(prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}

/* One shared page shell. Channel colours are extracted from its own artwork. */
.topbar,.top-actions,.menu-anchor,.profile-button,.profile-label{min-width:0}
@media(max-width:720px),(max-height:500px){
  body{--channel-mobile-inset:16px;--channel-top-pad:calc(10px + var(--safe-area-top));--channel-bottom-pad:calc(12px + var(--safe-area-bottom))}
  main{padding:var(--channel-top-pad) calc(var(--channel-mobile-inset) + var(--safe-area-right)) var(--channel-bottom-pad) calc(var(--channel-mobile-inset) + var(--safe-area-left))}
  /* Bleed across the ordinary gutter only; keep the notch insets in landscape. */
  #home{--home-hero-bleed:var(--channel-mobile-inset)}
  .home-hero-slot{width:calc(100% + 2*var(--channel-mobile-inset));margin-inline:calc(-1*var(--channel-mobile-inset))}
  .home-hero-frame{border-radius:0}
  .topbar{height:44px;min-height:44px;margin-bottom:8px}
  .home-title{font-size:20px}
  .channel-grid{gap:16px}
}

/* Channel-owned artwork on Minimal. Colours arrive as validated semantic variables. */
/* Preserve the source proportions until the banner would dominate the viewport.
   Intrinsic dimensions arrive with channel state, before the image is decoded. */
.channel-banner-frame{position:relative;width:100%;aspect-ratio:var(--channel-banner-ratio);max-height:40svh;overflow:hidden;border-radius:18px;background:var(--surface);margin:0 0 22px}
.channel-banner-frame img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.channel-identity{display:flex;align-items:center;gap:22px;min-width:0;flex:1}
.channel-minimal .channel-head{align-items:center;gap:24px;position:relative;margin-bottom:24px}
.channel-minimal .channel-title{min-width:0}
.channel-minimal .channel-title h1{overflow-wrap:anywhere;font-size:clamp(23px,3vw,32px);line-height:1.2;letter-spacing:-.035em}
.channel-minimal .channel-actions{flex-wrap:wrap;justify-content:flex-end}
.channel-minimal .player-main>.eyebrow{display:none}
.channel-minimal #detail:empty{display:none}
.channel-minimal .qr-frame #cover{display:none}
html[data-channel-palette]{color-scheme:var(--channel-color-scheme)}
html[data-channel-palette] .queue-row.is-current .queue-title strong,
html[data-channel-palette] .queue-row.is-current .queue-time,
html[data-channel-palette] .status{color:var(--text)}
html[data-channel-palette] .primary:where(:not(:disabled):not([aria-disabled=true])):hover{background:var(--accent);color:var(--accent-ink)}
html[data-channel-palette] .qr-frame .qr-center{box-shadow:none}
/* Only the decorative badge follows the banner. QR data, finders and quiet zone keep their contrast. */
html[data-channel-palette] .qr-center-disc{fill:var(--accent)}
html[data-channel-palette],html[data-channel-palette] *{scrollbar-color:var(--scroll-thumb) var(--scroll-track)}
html[data-channel-palette] input[type=range]{appearance:none;-webkit-appearance:none;color:var(--accent)}
html[data-channel-palette] input[type=range]::-webkit-slider-runnable-track{height:4px;border:0;border-radius:4px;background:var(--range-rail)}
html[data-channel-palette] input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:16px;height:16px;margin-top:-6px;border:2px solid var(--surface);border-radius:50%;background:var(--accent)}
html[data-channel-palette] input[type=range]::-moz-range-track{height:4px;border:0;border-radius:4px;background:var(--range-rail)}
html[data-channel-palette] input[type=range]::-moz-range-thumb{width:12px;height:12px;border:2px solid var(--surface);border-radius:50%;background:var(--accent)}
html[data-channel-palette] input[type=range]::-moz-range-progress{height:4px;border-radius:4px;background:var(--accent)}
@media(forced-colors:active){
 html[data-channel-palette],html[data-channel-palette] *{scrollbar-color:auto}
 html[data-channel-palette] input[type=range]{appearance:auto;-webkit-appearance:auto}
 html[data-channel-palette] input[type=range]::-webkit-slider-runnable-track{background:CanvasText}
 html[data-channel-palette] input[type=range]::-webkit-slider-thumb{appearance:auto;-webkit-appearance:auto;background:Highlight;border-color:Canvas}
 html[data-channel-palette] input[type=range]::-moz-range-track{background:CanvasText}
 html[data-channel-palette] input[type=range]::-moz-range-thumb{background:Highlight;border-color:Canvas}
}
.channel-artwork-editor{margin-bottom:20px}
.channel-artwork-editor h3{font-size:17px;margin:0 0 16px}
.artwork-editor-item h4{font-size:14px;margin:0 0 10px}
.artwork-editor-item{margin:0 0 10px}
.artwork-preview{display:block;background:var(--surface-2);border:0;border-radius:12px;margin:0 0 10px}
.artwork-banner-preview{width:100%;height:auto;max-height:180px;object-fit:contain}
.artwork-logo-editor{margin-bottom:0}
.artwork-logo-row{display:flex;align-items:flex-start;gap:12px}
.artwork-logo-preview{flex:none;width:56px;height:56px;object-fit:contain;margin:0}
.artwork-logo-controls{flex:1;min-width:0}
.ui-dialog .artwork-logo-controls .sheet-actions{margin-top:0;gap:8px;flex-wrap:nowrap}
.artwork-logo-controls .icon-button{flex:none}
.artwork-logo-controls .artwork-status{min-height:36px;margin:4px 0 0;font-size:12px;line-height:18px;overflow-wrap:anywhere}
.artwork-status{min-height:1.5em;margin:5px 0;color:var(--muted);white-space:pre-wrap}
.channel-appearance-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;max-width:408px}
.channel-palette-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;flex:1 1 248px;min-width:0;max-width:320px;margin:0}
.channel-palette-options:empty{display:none}
.channel-palette-choice{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;min-width:0;min-height:44px;padding:4px;border:2px solid transparent;border-radius:12px;background:var(--surface);color:var(--text);text-align:left;cursor:pointer}
.channel-palette-choice:hover{background:var(--surface);border-color:var(--muted)}
.channel-palette-choice[aria-checked=true]{border-color:var(--accent)}
.channel-palette-choice[aria-disabled=true]{cursor:wait;opacity:.65}
.palette-choice-preview{display:grid;gap:4px;min-width:0;padding:5px;background:var(--option-bg);border-radius:0;color:var(--option-text)}
.palette-choice-preview:first-child{border-radius:6px 0 0 6px}
.palette-choice-preview:last-child{border-radius:0 6px 6px 0}
.palette-mode-icon{width:14px;height:14px;fill:none;justify-self:center;opacity:.65;transition:opacity .12s ease}
.palette-mode-icon:hover{opacity:1}
.palette-choice-panel{position:relative;display:block;height:30px;padding:5px;border:0;border-radius:3px;background:var(--option-panel)}
.palette-choice-text{display:block;overflow:hidden;width:calc(100% - 13px);height:10px;font-size:10px;font-weight:650;line-height:1}
.palette-choice-line{display:block;width:40%;height:2px;margin:4px 0 0;border-radius:2px;background:var(--option-muted)}
.palette-choice-play{position:absolute;display:grid;place-items:center;right:4px;top:50%;transform:translateY(-50%);width:12px;height:12px;padding:0;border-radius:50%;background:var(--option-accent);color:var(--option-ink);line-height:0}
.palette-choice-play>svg{display:block;width:12px;height:12px;fill:currentColor}
.channel-appearance-feedback{max-width:408px;min-height:40px;padding-top:4px}
.channel-appearance-feedback>p{margin:0;padding:0;border:0;font-size:12px;line-height:18px;overflow-wrap:break-word}
.channel-appearance-feedback>.palette-choice-status,.channel-appearance-feedback>.channel-pattern-status[data-error=true]{color:var(--danger)}
/* A single selected pair and no pattern switch cannot start a request: no empty error slot is needed. */
.channel-pattern-editor:not(:has(.channel-palette-choice:nth-child(2))):has(.channel-pattern-toggle[hidden]) .channel-appearance-feedback{min-height:0;padding-top:0}
.palette-choice-status:empty{display:none}
/* The generated alpha tile stays below page content. QR paper and modules retain their own opaque paints. */
html[data-theme=minimal] body.channel-has-pattern{position:relative;isolation:isolate}
html[data-theme=minimal] body.channel-has-pattern::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:var(--text);opacity:.065;mask-image:var(--channel-pattern-image);mask-mode:alpha;mask-size:240px 240px;mask-repeat:repeat}
.channel-pattern-editor{margin-top:10px}
.channel-pattern-toggle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;flex:0 0 56px;min-height:50px;padding:0;border:0;background:none;color:var(--text);font-size:11px;line-height:14px;text-align:center;cursor:pointer}
.channel-pattern-toggle:hover{background:none;color:var(--text)}
.channel-pattern-toggle[aria-disabled=true]{cursor:wait;opacity:.65}
.channel-pattern-switch{position:relative;display:block;width:44px;height:24px;flex:0 0 24px;border:0;border-radius:999px;background:var(--surface-inset)}
.channel-pattern-switch::after{content:"";position:absolute;top:4px;left:4px;width:16px;height:16px;border-radius:50%;background:var(--muted)}
.channel-pattern-toggle[aria-checked=true] .channel-pattern-switch{background:var(--accent);border-color:var(--accent)}
.channel-pattern-toggle[aria-checked=true] .channel-pattern-switch::after{left:24px;background:var(--accent-ink)}
.channel-pattern-status{color:var(--muted)}
.channel-pattern-status:empty{display:none}
@media(max-width:380px){
 .channel-appearance-row{gap:8px}
 .channel-palette-options{gap:6px}
 .channel-pattern-toggle{flex-basis:44px}
 .channel-palette-choice{padding:2px}
 .palette-choice-preview{padding:2px}
 .palette-choice-panel{padding:2px}
 .palette-choice-play{right:2px}
}
@media(forced-colors:active){html[data-theme=minimal] body.channel-has-pattern::before{display:none}.channel-pattern-switch{border-color:CanvasText}.channel-pattern-switch::after{background:CanvasText}.channel-pattern-toggle[aria-checked=true] .channel-pattern-switch{background:Highlight;border-color:Highlight}.channel-pattern-toggle[aria-checked=true] .channel-pattern-switch::after{background:HighlightText}}
@media(max-width:720px){
 .channel-banner-frame{border-radius:14px;margin-bottom:18px}
 .channel-identity{gap:14px}
 .channel-minimal .channel-head{flex-wrap:wrap;gap:16px;margin-bottom:22px}
 .channel-minimal .channel-actions{width:100%;justify-content:flex-start}
 .channel-minimal .channel-title h1{font-size:23px}
}
.origin-migration-blocked{min-height:100svh;display:grid;align-content:center;justify-items:center;padding:calc(24px + var(--safe-area-top)) calc(24px + var(--safe-area-right)) calc(24px + var(--safe-area-bottom)) calc(24px + var(--safe-area-left));box-sizing:border-box}
.origin-migration-recovery{position:relative;width:min(440px,100%);box-sizing:border-box;padding:28px;border:0;border-radius:18px;background:var(--surface);color:var(--text)}
.origin-migration-recovery h1{margin:0;font-size:24px;line-height:1.25;overflow-wrap:anywhere}
.origin-migration-recovery h1:focus{outline:none}
.origin-migration-recovery p{margin:16px 0 0;font-size:15px;line-height:1.55}
.origin-migration-recovery .origin-migration-recovery-detail{color:var(--muted);font-size:13px}
.origin-migration-recovery button{width:100%;min-height:44px;margin-top:22px;white-space:normal}

/* Radix surfaces: shared by home, account and all channel tools. */
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.ui-dialog-overlay{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:max(12px,var(--safe-area-top)) max(12px,var(--safe-area-right)) max(12px,var(--safe-area-bottom)) max(12px,var(--safe-area-left));background:var(--backdrop);overflow:hidden}
.ui-dialog{position:relative;display:flex;flex-direction:column;flex:0 1 520px;width:100%;max-width:520px;min-width:0;min-height:0;max-height:100%;overflow:hidden;border:0;border-radius:18px;background:var(--surface);color:var(--text);box-shadow:0 24px 80px #0005;outline:none}
.ui-dialog-form-host,[data-ui-dialog]{min-width:0;max-width:100%}
.ui-dialog-form-host{min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:16px}
.ui-dialog-header{display:flex;flex:none;align-items:center;gap:16px;padding:12px 16px 12px 24px;background:var(--surface)}
.ui-dialog-heading{flex:1;min-width:0}
.ui-dialog-heading h2{margin:0;font-size:20px;line-height:1.3}
.ui-dialog-close{flex:none}
.ui-dialog-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.ui-dialog .sheet-body{padding-top:20px}
.ui-dialog .sheet-body>h3{margin-top:20px}
.ui-dialog :is(p,label,summary,h2,h3,h4){overflow-wrap:anywhere}
.ui-dialog :is(input,button,select){max-width:100%}
.ui-dialog .sheet-actions{gap:8px;margin-top:16px}
.ui-dialog .sheet-actions+label.field,.ui-dialog .sheet-actions+.settings-section{margin-top:24px}
.ui-dialog .sheet-actions button{white-space:normal}
.ui-dialog .sheet-body>.sub.small{margin-bottom:16px;font-size:13px;line-height:1.5}
.ui-dialog .sheet-body>label.field{font-size:13px;line-height:1.4;gap:8px}
.ui-dialog .sheet-body>label.checkbox{margin-block:20px;align-items:flex-start}
.ui-dialog label.checkbox input{flex:none;margin-top:3px}
.ui-dialog .sheet-body>p[role=status]:empty{display:none}
.ui-dialog .sheet-body>p[role=status]:not(:empty){margin-top:12px;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.ui-dialog:has(.auth-form){max-width:440px;flex-basis:440px}
.ui-dialog .auth-form{padding-top:8px}
.auth-form .auth-password-label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;min-height:44px;font-size:13px}
.auth-form .auth-text-action{padding-inline:0;font-size:13px;min-height:44px;background:transparent;color:var(--accent-text)}
.auth-password-control{position:relative}
.auth-password-control input{width:100%;padding-right:52px;min-height:48px}
.auth-password-control .icon-button{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:44px;height:44px;padding:12px;color:var(--muted)}
.auth-password-control svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor}
.auth-password-control .auth-eye-slash{display:none}
.auth-password-control [aria-pressed=true] .auth-eye-slash{display:block}
.auth-form #auth-password-hint{margin:8px 0 0;font-size:12px}
.auth-form .auth-primary-actions{display:flex;flex-direction:column;align-items:stretch;gap:4px;margin-top:20px}
.auth-form .auth-primary-actions>.primary{width:100%;min-height:48px}
.auth-form #auth-note{margin:16px 0 0;font-size:12px;line-height:1.5}
.auth-form .auth-preview{margin:12px 0 0;padding:0;background:transparent;font-size:12px;color:var(--muted)}
.auth-preview summary{cursor:pointer;min-height:32px;display:list-item;align-content:center}
.auth-preview[open] #auth-retains{margin-top:8px}
.auth-switch-row{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 8px;margin-top:12px;font-size:13px;color:var(--muted)}
.auth-captcha{margin-top:16px;max-width:100%}
.auth-captcha p{margin:0;font-size:12px}
.auth-captcha[data-phase=ready]{margin-top:0}
.ui-dialog-header .presence-summary{margin:0}
/* Playback invitation uses Radix modality without the settings-window chrome. */
.ui-dialog-overlay:has(.ui-dialog-playback){background:var(--sound-backdrop);backdrop-filter:blur(7px)}
.ui-dialog-playback{flex-basis:288px;max-width:288px;border-radius:0;background:transparent;box-shadow:none}
.ui-dialog-playback .ui-dialog-form-host{padding:6px}
.sound-permission{display:grid;justify-items:center;gap:12px;padding:12px 0;text-align:center}
.sound-permission #sound-permission-enable{display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:64px;gap:12px;font-size:18px}
.sound-permission-symbol{flex:none;width:26px;height:26px;fill:currentColor}
.sound-permission #sound-permission-dismiss{min-width:120px;min-height:44px;color:var(--text);font-size:14px;font-weight:500}
.sound-permission #sound-permission-error{margin:0;padding:12px 16px;border-radius:16px;background:var(--surface);color:var(--danger);font-size:13px;line-height:1.5}
.sound-permission #sound-permission-error:empty{display:none}
.ui-popover{z-index:120;max-width:calc(100vw - 24px);outline:none}
.ui-popover .menu,.ui-popover .participant-action-menu{position:static;inset:auto;margin:0;max-width:min(320px,calc(100vw - 24px));max-height:var(--radix-popover-content-available-height);overflow-y:auto;overscroll-behavior:contain}
.ui-popover .menu button{min-height:44px;font-size:14px}
.appearance-mode{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 7px 8px 11px;margin-bottom:4px;font-size:14px;color:var(--muted)}
.appearance-mode-options{display:flex;gap:3px;padding:3px;background:var(--surface-inset);border:0;border-radius:12px}
.menu .appearance-mode-button{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:10px;border:0;border-radius:8px;color:var(--muted)}
.appearance-mode-button svg{fill:none}
.menu .appearance-mode-button[aria-pressed=true]{background:var(--surface-active);color:var(--text)}
.ui-select-mount{display:block;min-width:0;width:100%}
.ui-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:10px;background:var(--surface-inset);color:var(--text);font:inherit;font-size:16px;line-height:22px;text-align:left}
.ui-select-trigger>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ui-select-icon{flex:none;width:18px;height:18px;display:grid;place-items:center;color:var(--muted)}
.ui-select-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7}
.ui-select-content{z-index:140;min-width:var(--radix-select-trigger-width);max-width:calc(100vw - 24px);max-height:min(320px,var(--radix-select-content-available-height));padding:5px;background:var(--surface-2);color:var(--text);border:0;border-radius:12px;box-shadow:0 12px 38px #0005;overflow:hidden}
.ui-select-item{position:relative;display:flex;align-items:center;min-height:44px;padding:10px 34px 10px 12px;border-radius:7px;outline:none;cursor:pointer;font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.ui-select-item[data-highlighted]{background:var(--surface-hover)}
.ui-select-item[data-state=checked]{color:var(--accent-strong);font-weight:600}
.ui-select-item[data-disabled]{opacity:.45;pointer-events:none}
.ui-select-indicator{position:absolute;right:10px}
.ui-dialog #step+*{width:auto;display:inline-flex}
@media(max-width:720px){.ui-dialog-header{padding:8px 12px 8px 20px}.ui-dialog .sheet-body{padding:20px}.ui-dialog input{font-size:16px}}

.ui-select-indicator svg{fill:none;stroke:currentColor;stroke-width:1.8}
.ui-select-scroll{display:grid;place-items:center;height:24px;color:var(--muted)}
/* System high-contrast mode needs explicit edges when custom surface colours disappear. */
@media(forced-colors:active){:is(button,input,select,.upload,.button-link,.ui-dialog,.ui-select-content,.ui-popover .menu){outline:1px solid ButtonText}:focus-visible{outline:2px solid Highlight;outline-offset:2px}.channel-palette-choice[aria-checked=true]{border-color:Highlight}}
/* Personal language uses the same compact Radix controls as account settings. */
.profile-language{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 7px 8px 11px;margin:0 0 4px;color:var(--muted);font-size:14px}
.profile-language .ui-select-mount{width:auto;min-width:0;max-width:72%}
.menu .profile-language .ui-select-trigger{width:auto;min-width:156px;min-height:44px;padding:8px 12px;font-size:16px;color:var(--text);gap:8px}

@media(max-width:720px){.channel-title{width:100%}}

/* Pending access is separate from actual connected/listening presence. */
.access-waiting{max-width:560px;margin:32px auto;padding:24px;overflow-wrap:anywhere}
.access-waiting h1{font-size:24px;line-height:1.25;margin:0 0 16px}
.access-waiting .sheet-actions{align-items:center;flex-wrap:wrap}
.channel-access-requests{margin-bottom:24px}
.channel-access-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0}
.channel-access-row>strong{min-width:0;overflow-wrap:anywhere}
.channel-access-row .sheet-actions{flex-shrink:0;margin:0;gap:8px}
#channel-access-status:empty{display:none}
@media(max-width:480px){.access-waiting{margin:20px 0;padding:20px}.channel-access-row{align-items:flex-start;flex-direction:column;gap:8px}.channel-access-row .sheet-actions{flex-wrap:wrap}}

/* Presence has a real title and a compact summary; connections stay inside each profile. */
.ui-dialog:has(#people-dialog){max-width:420px}
.ui-dialog:has(#people-dialog) .ui-dialog-header{padding:10px 12px 6px 20px}
.ui-dialog:has(#people-dialog) .ui-dialog-heading h2{font-size:18px}
.ui-dialog #people-dialog .sheet-body{padding:0 20px 16px}
#people-dialog .presence-summary{margin:0 0 12px;gap:6px;font-size:13px}
#people-dialog .presence-summary>span[title]{display:inline-flex;align-items:center;gap:4px;min-height:32px}
#people-dialog .participant-row{padding:12px 0;align-items:flex-start;border-top:1px solid var(--line-soft)}
#people-dialog .participant-row strong{font-size:14px;line-height:20px}
#people-dialog .participant-row .state{font-size:12px;line-height:18px;margin-top:2px}
#people-dialog .participant-row summary{display:flex;align-items:center;gap:6px;min-height:44px;padding:0;font-size:12px;color:var(--muted)}
#people-dialog .participant-row summary::before{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);margin-inline:1px 3px}
#people-dialog .participant-row details[open] summary::before{transform:rotate(45deg)}
#people-dialog .participant-row details p{margin:0 0 4px;line-height:1.6}

/* A plain page step: one file action and a private/public choice. */
.stream-media-pending #channel{display:none}
.stream-media-start{position:relative;width:min(100%,340px);margin:clamp(40px,12vh,120px) auto 48px;padding:0}
.stream-media-close{position:absolute;right:0;top:-60px;background:none;color:var(--muted)}
.stream-media-picker{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}
.stream-media-picker.is-dragging{outline:2px dashed var(--accent);outline-offset:14px}
.stream-media-picker>button{width:100%;min-height:52px;font-size:18px}
.stream-media-privacy{display:flex;justify-content:center;gap:20px;margin-top:26px}
.stream-media-privacy>button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:0 2px;background:none;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--muted);font-size:14px;font-weight:500}
.stream-media-privacy>button[aria-checked=true]{color:var(--text);border-bottom-color:var(--accent)}
.stream-media-privacy svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#stream-media-privacy-status{margin:12px 0 0;text-align:center}
.stream-media-feedback{display:grid;gap:14px;padding:24px 0 0}
.stream-media-feedback>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}
.stream-media-feedback>p{margin:0;overflow-wrap:anywhere}
.stream-media-feedback progress{width:100%;height:6px;accent-color:var(--accent)}
.stream-media-feedback .sheet-actions:has(>button:not([hidden])){margin-top:8px}
.stream-media-feedback .sheet-actions:not(:has(>button:not([hidden]))){display:none}

/* Pre-channel page: one generous file target and two explicit start actions. */
.stream-draft{position:relative;width:min(100%,680px);margin:clamp(48px,9vh,88px) auto 48px}
.stream-draft-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;width:100%;min-height:300px;padding:32px 20px;background:transparent;border:1.5px dashed var(--muted);border-radius:20px;color:var(--text);text-align:center}
.stream-draft-drop:hover,.stream-draft-drop.is-dragging{border-color:var(--accent);background:var(--surface-inset)}
.stream-draft-drop:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.stream-draft-drop>svg{width:48px;height:48px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;color:var(--muted)}
.stream-draft-drop>strong{font-size:clamp(18px,3vw,24px);line-height:1.3}
.stream-draft-file-link{color:var(--accent);font-size:15px;text-decoration:underline;text-underline-offset:4px}
.stream-draft-selection{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;color:var(--muted)}
.stream-draft-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}
.stream-draft-actions>button{min-height:56px;padding:12px 10px;font-size:16px;line-height:1.3}
#stream-draft-status{margin:16px 0 0;text-align:center;overflow-wrap:anywhere}
#stream-draft-progress{width:100%;height:6px;margin-top:14px;accent-color:var(--accent)}
@media(max-width:480px){.stream-draft-drop{min-height:260px;padding:24px 16px}.stream-draft-actions{gap:8px}.stream-draft-actions>button{font-size:14px;min-height:60px}}

/* Public listening guide: a direct upload entry followed by readable, open sections. */
.home-listen-link{display:inline-flex;align-items:center;gap:6px;min-height:44px;width:fit-content;max-width:100%;color:var(--accent-text);font-size:14px;line-height:1.5;text-underline-offset:4px}
.home-guides{display:flex;flex-wrap:nowrap;gap:clamp(20px,3vw,36px);width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent;scroll-padding-inline:4px;padding:4px 0}
.home-guide-link{display:flex;flex:0 0 auto;align-items:center;gap:6px;width:fit-content;min-width:0;min-height:44px;padding:6px 2px;color:var(--muted);font-size:14px;font-weight:500;line-height:1.4;text-decoration:none}
.home-guide-link>span:first-child{white-space:nowrap}
.home-guide-arrow{flex:none;color:var(--muted-dim)}
.home-guide-link:hover,.home-guide-link:hover .home-guide-arrow{color:var(--accent-text)}
.home-guide-link:focus-visible{outline:2px solid var(--accent-text);outline-offset:-2px;border-radius:4px}
.onboarding-related{display:flex;align-items:center;flex-wrap:wrap;gap:4px 24px}
.onboarding-related{padding:12px 0 8px}
.onboarding-related a{min-height:44px}
.onboarding-upload-hint{margin-top:12px;color:var(--muted);font-size:13px;line-height:1.5;text-align:center}
.listen-page{max-width:1120px;margin:0 auto;padding:clamp(20px,4vw,52px) 0 24px}
.listen-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:clamp(28px,5vw,72px);padding-bottom:clamp(44px,6vw,80px)}
.listen-intro,.listen-upload{min-width:0}
.listen-eyebrow{color:var(--accent-text);font-size:13px;font-weight:600;line-height:1.5;margin-bottom:16px}
.listen-intro h1{max-width:13em;font-size:clamp(32px,3.7vw,48px);line-height:1.1;letter-spacing:-.035em;text-wrap:balance}
.listen-lead{max-width:34em;margin:24px 0 22px;font-size:17px;line-height:1.65;color:var(--muted)}
.listen-text-link{color:var(--text);font-size:14px;line-height:1.6;text-underline-offset:5px;text-decoration-thickness:1px}
.listen-text-link:hover,.home-listen-link:hover{color:var(--accent-text)}
.listen-page a:focus-visible{outline:2px solid var(--accent);outline-offset:5px;border-radius:4px}
.listen-upload .stream-draft{width:100%;margin:0}
.listen-upload .stream-draft-drop{min-height:236px;padding:24px 16px;border-color:var(--accent-line);border-radius:16px;background:var(--surface-inset)}
.listen-upload .stream-draft-drop:hover,.listen-upload .stream-draft-drop.is-dragging{border-color:var(--accent);background:var(--surface)}
.listen-upload .stream-draft-drop>svg{width:40px;height:40px;color:var(--accent-text)}
.listen-upload .stream-draft-drop>strong{font-size:21px}
.listen-upload .stream-draft-actions{margin-top:12px;gap:10px}
.listen-upload .stream-draft-actions>button{font-size:15px;min-height:56px;padding:10px}
.listen-noscript{display:block;margin-top:16px;color:var(--muted);font-size:14px;line-height:1.6}
.listen-illustration{margin:0 0 40px}
.listen-illustration img{display:block;width:100%;height:auto;border-radius:16px}
.listen-illustration figcaption{margin-top:12px;color:var(--muted);font-size:14px;line-height:1.5;text-align:center}
#stream-draft-session-retry{display:block;margin:12px auto 0}
.listen-guide,.listen-scenarios,.listen-questions{border-top:1px solid var(--line);padding:clamp(32px,5vw,56px) 0;scroll-margin-top:24px}
.listen-page h2{font-size:clamp(24px,2.6vw,30px);line-height:1.2;text-wrap:balance}
.listen-page h3{font-size:18px;line-height:1.4;letter-spacing:-.015em}
.listen-steps{--listen-step-art:180px;--listen-step-gap:clamp(48px,5vw,64px);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--listen-step-gap);list-style:none;margin:0;padding:0}
.listen-steps li{position:relative;display:flex;flex-direction:column;align-items:center;gap:14px;min-width:0}
.listen-step-art{display:block;width:min(var(--listen-step-art),100%);height:auto;aspect-ratio:1;object-fit:contain}
.listen-steps h2{display:flex;align-items:baseline;justify-content:center;gap:10px;max-width:100%;font-size:18px;line-height:1.4;letter-spacing:-.015em;text-align:center}
.listen-step-number{flex:none;font-variant-numeric:tabular-nums;font-weight:600;color:var(--accent-text)}
.listen-step-arrow{position:absolute;left:calc(100% + var(--listen-step-gap)/2);top:calc(var(--listen-step-art)/2);width:40px;height:24px;transform:translate(-50%,-50%);fill:none;stroke:var(--accent-text);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.listen-steps--compact .listen-step-arrow{top:50%}
.listen-story p,.listen-answers p{margin-top:10px;color:var(--muted);font-size:15px;line-height:1.75}
.listen-section-heading{margin-bottom:36px}
.listen-story{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:32px;padding:26px 0}
.listen-story+.listen-story{border-top:1px solid var(--line-soft)}
.listen-story p:first-child{margin-top:0}
.listen-answers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 56px;margin-top:32px}
.listen-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:24px;padding:24px 0 0;border-top:1px solid var(--line)}
.listen-footer .button-link{min-height:48px}
#stream-draft-choose{scroll-margin-top:24px}
@media(max-width:760px){
  .listen-page{padding-top:24px}
  .listen-hero{grid-template-columns:minmax(0,1fr);gap:20px;padding-bottom:36px}
  .listen-intro{display:contents}
  .listen-intro>.listen-eyebrow,.listen-intro>.listen-text-link{display:none}
  .listen-intro h1{order:0;font-size:clamp(30px,7vw,40px);max-width:16em}
  .listen-upload{order:1}
  .listen-illustration{margin-bottom:28px}
  .listen-illustration img{border-radius:12px}
  .listen-lead{order:2;font-size:15px;margin:0}
  .listen-eyebrow{margin-bottom:10px}
  .listen-upload .stream-draft-drop{min-height:184px;gap:12px;padding:20px 14px}
  .listen-upload .stream-draft-drop>strong{font-size:20px}
  .listen-steps{--listen-step-art:150px;--listen-step-gap:48px;grid-template-columns:minmax(0,1fr)}
  .listen-steps li{gap:10px}
  .listen-step-arrow,.listen-steps--compact .listen-step-arrow{left:50%;top:calc(100% + var(--listen-step-gap)/2);transform:translate(-50%,-50%) rotate(90deg)}
  .listen-story{grid-template-columns:minmax(0,1fr);gap:12px;padding:24px 0}
  .listen-section-heading{margin-bottom:16px}
  .listen-answers{grid-template-columns:minmax(0,1fr);gap:24px;margin-top:28px}
}
@media(max-width:360px){.listen-upload .stream-draft-actions>button{font-size:14px}.listen-footer{gap:14px}.listen-footer .button-link{padding-inline:16px}}
@media(forced-colors:active){.listen-upload .stream-draft-drop{border-color:ButtonText}}
