@import url('./account-menu.css');
/* Reserve the avatar slot before the individual view styles arrive. */
:where(.gd-avatar,.ac-channel-avatar,.re-avatar,.rc-avatar,.mr-mark) {
  display:inline-grid; width:42px; height:42px;
}
.cc-platform-logo,.cc-preview-avatar { display:grid; flex:none; width:28px; height:28px; }
.cc-preview-avatar { width:35px; height:35px; }
.channel-avatar { display:grid; place-items:center; position:relative; width:100%; height:100%; border-radius:inherit; }
.channel-logo { display:block; width:100%; height:100%; object-fit:contain; }
.channel-logo[hidden] { display:none; }
.channel-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:inherit; opacity:0; }
.channel-photo[data-loaded] { opacity:1; }
.studio-content {
  --cc-columns:minmax(0,1.65fr) minmax(235px,.85fr);
  --cc-gap:18px;
}
.cc-list-loading { min-height:10rem;padding:clamp(16px,2vw,26px); }
@media(max-width:1100px) {
  .studio-content { --cc-columns:minmax(0,1.5fr) minmax(210px,.8fr);--cc-gap:12px; }
}
@media(max-width:760px) {
  .studio-content { --cc-columns:minmax(0,1fr); }
}

/* The detail placeholder and the loaded view reserve the same grid before channel data arrives. */
.channel-detail,[data-channel-detail-loading] { container:channel-detail / inline-size;min-width:0;--cd-title-size:clamp(1.75rem,3.45vw,3rem); }
.cd-back {
  display:inline-flex;align-items:center;gap:5px;min-height:32px;margin-bottom:10px;
  color:var(--muted);font-size:.84rem;font-weight:550;text-decoration:none;
}
.cd-back svg { width:15px;height:15px; }
[data-channel-detail-loading] .cd-back svg { transform:rotate(180deg); }
.cd-identity,.cd-loading-hero {
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;
  gap:16px 22px;padding:clamp(20px,2.7vw,36px);
}
.cd-avatar,.cd-loading-avatar { display:grid;width:72px;height:72px;border-radius:16px; }
.cd-avatar>.channel-avatar,.cd-avatar img { width:100%;height:100%; }
.cd-loading-avatar { background:var(--raised); }
.cd-loading-hero>p { display:flex;align-items:center;min-height:calc(1.12 * var(--cd-title-size) + 29px); }
.cd-loading-actions { width:9rem;height:var(--cd-control-height,39px);border-radius:7px;background:var(--raised); }
.cd-grid,.cd-loading-grid { display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);align-items:start;gap:16px;margin-top:16px; }
.cd-loading-grid>.panel { min-height:8rem; }
.cd-loading-grid>.panel:first-child { min-height:20rem; }
@container channel-detail (max-width:52rem) {
  .cd-identity,.cd-loading-hero { grid-template-columns:auto minmax(0,1fr); }
  .cd-loading-actions { grid-column:1/-1;margin-top:15px; }
}
@container channel-detail (max-width:43rem) {
  .cd-grid,.cd-loading-grid { grid-template-columns:minmax(0,1fr);gap:12px;margin-top:12px; }
  .cd-identity,.cd-loading-hero { padding:18px;gap:14px; }
  .cd-avatar,.cd-loading-avatar { width:56px;height:56px;border-radius:12px; }
}
@container channel-detail (max-width:25rem) {
  .cd-loading-actions { display:grid;grid-template-columns:1fr 1fr;gap:6px;width:100%;height:auto;background:transparent; }
  .cd-loading-actions::before,.cd-loading-actions::after { content:"";height:var(--cd-control-height,39px);border-radius:7px;background:var(--raised); }
  .cd-loading-actions::before { grid-column:1/-1; }
  .cd-loading-grid>.panel:first-child { min-height:30.5rem; }
}
@media(pointer:coarse) {
  .cd-back { min-height:44px; }
  [data-channel-detail-loading] { --cd-control-height:44px; }
}
/* Align the lockup with the project selector inside the topbar's bottom border. */
#sidebar .brand-row {
  display:grid; grid-template-columns:minmax(0,1fr); place-items:center; flex:none;
  min-height:61px; padding:0 0 1px; margin-bottom:15px;
}
#sidebar .brand-row > * { grid-area:1 / 1; }
#sidebar .brand-row .brand { min-width:0; width:184px; max-width:100%; }
#sidebar .studio-logo { display:block; width:100%; height:auto; }
#sidebar .brand-row .nav-close { justify-self:end; }
@media (max-width:900px) {
  #sidebar .brand-row { min-height:54px; margin-bottom:10px; }
  #sidebar .brand-row .brand { max-width:calc(100% - 72px); }
}
:root { --side:var(--sidebar); --sur:var(--panel); --sur2:var(--raised); --mut:var(--muted); --action:var(--button); --on:var(--button-ink); --fill:var(--wash); }
:root[data-theme] {
  --nav-selected-bg:var(--selection-bg); --nav-selected-ink:var(--selection-ink); --nav-indicator:var(--selection-edge);
  --accent:var(--selection-edge); --wash:var(--selection-bg);
  --button:var(--selection-bg); --button-ink:var(--selection-ink);
  accent-color:var(--selection-edge);
}
.studio-footer {
  flex:none;
  margin:auto 0 6px; padding:9px 8px 0; border-top:1px solid var(--line);
  color:var(--dim); font-size:10px;
}
.service-admin-nav { flex:none; margin:auto 2px 6px; }
.service-admin-nav[hidden],#experiment-nav[hidden] { display:none; }
.service-admin-nav:not([hidden]) + .studio-footer { margin-top:0; }
.main-column { --studio-content-limit:1550px; }
.main-column>.view { max-width:var(--studio-content-limit); }
@media (min-width:901px) {
  :root { scroll-padding-block-start:61px; }
  .main-column>.topbar {
    position:sticky; inset-block-start:0; z-index:8; background-color:var(--bg);
  }
  #sidebar { overflow:clip; }
  #sidebar .studio-nav { min-height:0; overflow-y:auto; scrollbar-width:thin; }
  #sidebar .studio-nav :focus-visible { outline-offset:-2px; }
}
@media (min-width:901px) and (max-height:720px) {
  #sidebar .compose-split { margin-bottom:16px; }
  #sidebar .studio-nav { gap:12px; padding-bottom:12px; }
}
.workspace-switch .portfolio-mark {
  width:24px; height:24px; display:inline-grid; place-items:center; flex:none;
  color:var(--text); background:var(--raised); border-radius:6px;
}
.workspace-switch .portfolio-mark .gi { width:16px; height:16px; color:inherit; }
.workspace-switch[open] summary .portfolio-mark .gi { transform:none; }
.workspace-list [data-project-options],
.workspace-list .workspace-actions { display:grid; gap:4px; }
.workspace-list [data-project-options] {
  --project-dot:8px; --project-gap:6px; --project-avatar-size:25px;
}
.workspace-list [data-choice] .gpa-project-mark { gap:var(--project-gap); }
.workspace-list [data-choice] .gpa-color-dot { width:var(--project-dot); height:var(--project-dot); }
.workspace-list [data-choice] :is(.workspace-badge,.portfolio-mark) {
  width:var(--project-avatar-size); height:var(--project-avatar-size);
}
.workspace-list [data-choice] .portfolio-mark { margin-inline-start:calc(var(--project-dot) + var(--project-gap)); }
.workspace-list button[draggable=true] { position:relative; cursor:grab; user-select:none; }
.workspace-list button[data-project-dragging] { opacity:.5; cursor:grabbing; }
.workspace-list button[data-drop-side]::after {
  content:""; position:absolute; inset-inline:3px; height:2px; border-radius:2px; background:var(--nav-indicator); pointer-events:none;
}
.workspace-list button[data-drop-side=before]::after { top:0; }
.workspace-list button[data-drop-side=after]::after { bottom:0; }
.workspace-list [data-project-usage] {
  margin:5px 0 0; padding:9px 9px 4px; border-top:1px solid var(--line);
  text-align:end; font-variant-numeric:tabular-nums;
}
.workspace-list [data-project-full]:not([hidden]) { display:block; margin-bottom:3px; }
.workspace-list [data-project-count] { white-space:nowrap; }
.portfolio-picker { max-width:580px; padding:clamp(18px,3vw,28px); }
.portfolio-picker h2 { font-size:18px; margin-bottom:12px; }
.portfolio-picker nav { display:grid; }
.portfolio-picker a { display:flex; align-items:center; gap:10px; min-height:50px; padding:8px; border-top:1px solid var(--line); color:var(--text); }
.portfolio-picker a:hover,.portfolio-picker a:focus-visible { background:var(--selection-bg); }
.portfolio-picker a>span:nth-child(2) { flex:1; overflow-wrap:anywhere; }
.portfolio-picker a>.gi { width:15px; color:var(--muted); }
#view h1 {
  letter-spacing:normal;
  line-height:1.12;
}
@media(min-width:1151px) {
  .main-column { --studio-gutter:clamp(20px,3.5vw,58px); }
  .main-column>.view { padding-inline:var(--studio-gutter); }
  .main-column>.topbar {
    padding-inline-end:calc(var(--studio-gutter) + max(0px,(100% - var(--studio-content-limit)) / 2));
  }
}
.shell .btn.studio-create { display:inline-flex; align-items:center; gap:8px; }
.shell .btn.studio-create,
.bp-main .btn.primary[type=submit] {
  background:var(--nav-selected-bg); color:var(--nav-selected-ink);
  border:1px solid color-mix(in srgb,var(--nav-indicator) 28%,var(--nav-selected-bg));
}
.shell .btn.studio-create:hover,
.bp-main .btn.primary[type=submit]:hover:enabled { background:var(--selection-hover); }
.shell .studio-create:focus-visible,
.bp-main .btn.primary[type=submit]:focus-visible,
.studio-project-tabs a:focus-visible,
.ps-rail a.bp-project-row:focus-visible { outline:2px solid var(--nav-indicator); outline-offset:2px; }
.shell .btn.studio-create .gi { flex:none; width:17px; height:17px; }
.compose-split { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 36px; flex:none; margin:1px 3px 22px; }
.compose-split > .compose { margin:0; border-inline-end:0; border-radius:7px 0 0 7px; }
.compose-menu > summary { width:100%; height:100%; margin:0; padding:0; border-radius:0 7px 7px 0; cursor:pointer; list-style:none; }
.compose-menu > summary::-webkit-details-marker { display:none; }
.shell .compose-menu > summary .gi { width:14px; height:14px; }
.compose-menu[open] > summary .gi:last-child { transform:rotate(180deg); }
.compose-options {
  position:absolute; z-index:3; inset-inline:0; top:calc(100% + 5px); padding:4px;
  background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 24px #0003;
}
.compose-options a { display:flex; gap:9px; align-items:center; min-height:36px; padding:7px 10px; font-size:13px; border-radius:5px; }
.compose-options a:is(:hover,:focus-visible) { background:var(--selection-bg); color:var(--selection-ink); }
.compose-options .gi { width:16px; height:16px; }
@media(pointer:coarse) {
  .compose-split { grid-template-columns:minmax(0,1fr) 44px; }
  .compose-split > .compose,.compose-menu > summary,.compose-options a { min-height:44px; }
}
#sidebar [data-nav][aria-current=page],
.topbar .account:is([aria-current=page],[aria-expanded=true]),
.workspace-list :is(button,a):is([aria-current=true],:hover,:focus-visible),
.week-days .day-choice[aria-pressed=true] {
  background:var(--nav-selected-bg); color:var(--nav-selected-ink);
}
.dash-head h1 em { color:inherit; }
#view .feature-content .eyebrow { color:#d4d4d4; }
#view .feature-content .lit-dot { background:currentColor; box-shadow:none; }
#view .feature .post-link { color:var(--selection-ink); background:var(--selection-bg); border-color:var(--selection-edge); }
#view .feature .post-link:hover { background:var(--selection-hover); }
.shell :is(.grr-filter,.pub-mode-switch,.ds-filters) button:hover {
  background:var(--selection-hover); color:var(--nav-selected-ink);
}
.shell :is(.grr-filter,.pub-mode-switch,.ds-filters) button[aria-pressed=true] {
  background:var(--nav-selected-bg); color:var(--nav-selected-ink); font-weight:650;
}
.shell :is(.grr-filter,.pub-mode-switch,.ds-filters) button:focus-visible {
  outline:2px solid var(--nav-indicator); outline-offset:-2px;
}
.shell :is(.ds-destination-picker label,.pub-check):has(input:checked),
.shell :is(.pub-platform,.ac-segment,.ac-platform)[aria-pressed=true] {
  background:var(--selection-bg); color:var(--selection-ink); border-color:var(--selection-edge);
}
.shell .gd-picker [role=option][aria-selected=true],
.shell select option:checked { background:var(--selection-bg); color:var(--selection-ink); }
.shell .gd-picker [role=option]:is(:hover,[data-active]) { background:var(--selection-hover); color:var(--selection-ink); }
.shell .pi-swatch input:is(:checked,:focus-visible) + span { outline-color:var(--selection-edge); }
.shell [aria-checked=true] .ac-switch { background:var(--selection-edge); border-color:var(--selection-edge); }
.shell [aria-checked=true] .ac-switch::before { background:var(--selection-bg); }
.week-days .day-choice[aria-pressed=true] { border-color:var(--nav-indicator); }
.week-days .day-choice[aria-pressed=true] :is(b,span) { color:inherit; }
.week-days .day-choice[aria-pressed=true] .has-posts { background:var(--nav-indicator); }
.week-days .day-choice:focus-visible { outline-color:var(--nav-indicator); }
.workspace-list :is(button,a):focus-visible { outline:2px solid var(--nav-indicator); outline-offset:-2px; }
#sidebar [data-nav][aria-current=page]>.gi,.topbar .account[aria-expanded=true]>.gi { color:inherit; }
#sidebar [data-nav][aria-current=page]::before { background:var(--nav-indicator); }
.topbar .crumb-divider .gi { width:12px; height:12px; }
.topbar .crumb-parent { color:var(--muted); white-space:nowrap; }
.topbar .crumb-parent:hover,.topbar .crumb-parent:focus-visible { color:var(--text); text-decoration:underline; text-underline-offset:3px; }
.topbar .crumb [hidden] { display:none; }
.topbar .workspace-switch > summary { border:0; background:transparent; }
.topbar .workspace-switch > summary:hover,.topbar .workspace-switch[open] > summary { background:var(--raised); }
.topbar .account {
  flex:0 1 auto; max-width:min(18rem,48%); min-height:44px; padding:4px 8px;
  text-align:start; border-radius:8px;
}
@media(min-width:661px) and (max-width:900px) {
  .topbar .crumb { flex:1; }
}
@media(max-width:660px) {
  .topbar .crumb { flex:1; }
  .topbar .crumb:not([data-nested]) .crumb-parent { display:none; }
  .topbar:has(.crumb[data-nested]) {
    display:grid; grid-template-columns:minmax(0,1fr) auto; height:auto; gap:0 8px; padding-block:3px 6px;
  }
  .topbar:has(.crumb[data-nested]) .mobile-menu { grid-area:1/1; justify-self:start; }
  .topbar:has(.crumb[data-nested]) .account { grid-area:1/2; max-width:min(70vw,18rem); }
  .topbar .crumb[data-nested] { grid-area:2/1/3/-1; gap:5px; }
  .topbar .crumb[data-nested] .crumb-divider:not([hidden]),
  .topbar .crumb[data-nested] .crumb-current { display:inline-flex; flex:none; }
}
@media(max-width:540px) {
  .topbar .crumb { flex:1 1 0%; }
  .topbar .mobile-menu { flex:none; }
  .topbar .account { max-width:52%; gap:5px; padding-inline:4px; }
  .topbar .account .avatar { width:28px; height:28px; }
}
@media(max-width:359px) {
  .topbar .account>.gi { display:none; }
}
.account[data-user-zone][aria-expanded=true] > .gi { transform:rotate(180deg); }
.studio-content { min-width:0; }
.studio-gate { max-width:560px; padding:clamp(20px,4vw,36px); }
.studio-gate h1 { font-size:clamp(26px,4vw,38px); }
.studio-gate p { margin:12px 0 20px; color:var(--muted); }
.studio-gate .studio-login-code {
  width:fit-content;padding:8px 14px;border:1px solid var(--line);border-radius:8px;background:var(--raised);
  color:var(--text);font-size:clamp(22px,6vw,32px);font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:.14em;
}
.studio-login-actions { display:flex;flex-wrap:wrap;gap:8px; }
.studio-gate [data-login-error] { color:var(--error); }
.studio-gate [data-login-error]:empty { display:none; }
.account-avatar { overflow:hidden; }
.account-avatar-photo { display:block;width:100%;height:100%;object-fit:cover; }
.studio-content .ac-card,.studio-content .ac-row,.studio-content .ac-widget { background:var(--panel);border-color:var(--line); }
.studio-content .ac-primary,.studio-content .ac-button { border-radius:7px; }
.studio-content .account-section,.studio-content .studio-form { min-width:0; }
.studio-project-tabs { display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px; }
.studio-project-tabs a[aria-current=page] {
  color:var(--nav-selected-ink); background:var(--nav-selected-bg); border-color:var(--nav-indicator);
}
.studio-settings-stack { display:grid;gap:16px; }
.studio-profile-preference { max-width:760px; }
.studio-profile-back .gi { transform:rotate(180deg); }
.studio-profile-preference [data-zone-status] { color:var(--muted);font-size:13px; }
.studio-profile-preference [data-zone-status]:empty { display:none; }
.studio-profile-preference [data-zone-status].feedback-error { color:var(--error); }
.studio-signature { cursor:pointer; }
.studio-signature:has(input:disabled) { cursor:default; }
.studio-toggle {
  box-sizing:border-box; flex:none; appearance:none; display:grid; align-items:center; width:42px; height:24px;
  margin:0; padding:3px; border:1px solid var(--dim); border-radius:16px; background:var(--bg); cursor:inherit;
}
.studio-toggle::before {
  content:""; width:16px; height:16px; border-radius:50%; background:var(--muted);
}
.studio-toggle:checked { background:var(--selection-edge); border-color:var(--selection-edge); }
.studio-toggle:checked::before { justify-self:end; background:var(--bg); }
.studio-toggle:disabled { opacity:.65; }
.studio-toggle:focus-visible { outline:2px solid var(--selection-edge); outline-offset:3px; }
.studio-signature #profile-signature-note:has(+ [data-signature-status]:not(:empty)) { display:none; }
.studio-signature [data-signature-status]:empty { display:none; }
.studio-signature [data-signature-status].feedback-error { color:var(--error); }
@media(forced-colors:active) {
  .studio-toggle { appearance:auto; }
  .studio-toggle::before { content:none; }
}
.studio-settings-panel { padding:clamp(15px,2.4vw,26px);display:grid;gap:14px; }
.studio-settings-panel h2 { font-size:18px; }
.studio-setting-links { display:flex;gap:8px;flex-wrap:wrap; }
.studio-settings-panel input:not([type=radio],[role=switch]),.studio-settings-panel select { min-width:0;max-width:100%;background:var(--bg);border:1px solid var(--line);border-radius:7px;padding:9px 12px;color:var(--text); }
.studio-settings-panel label { display:grid;gap:5px; }
.studio-settings-panel .studio-approval-setting {
  grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; min-height:44px; cursor:pointer;
}
.studio-approval-setting:has(input:disabled) { cursor:default; }
.studio-approval-setting > span { display:grid;gap:5px;min-width:0; }
.studio-approval-setting strong { line-height:1.35; }
.studio-approval-setting small { color:var(--muted);font-size:13px;line-height:1.4; }
.studio-approval-setting small[data-feedback]:empty { display:none; }
.studio-approval-setting small.feedback-error { color:var(--error); }
.studio-project-action { margin-top:12px; }
.ps-rail .bp-project-row[aria-current=true] { background:var(--nav-selected-bg); color:var(--nav-selected-ink); }
.ps-rail .bp-project-row[aria-current=true] .bp-project-name small { color:var(--nav-indicator); }
.ps-rail a.bp-project-row:hover { background:var(--raised);border-color:var(--dim); }
.studio-content a:focus-visible,.studio-content button:focus-visible { outline-offset:2px; }

.studio-file-glyph { display:grid;place-items:center;position:absolute;inset:0;color:var(--accent);background:var(--raised); }
.studio-file-glyph .gi { width:36px;height:36px; }
.studio-content .grr-asset-frame img { position:relative; }
.media-preview :is(img,video) { max-height:56vh;object-fit:contain; }
.grr-empty .btn { margin-top:12px; }

.tag-library-actions {margin-bottom:18px;}
:is(#draft-count,#queue-count) {
  display:inline-flex; align-items:center; justify-content:center; min-height:19px; padding:0 3px;
  line-height:1; letter-spacing:normal; font-variant-numeric:tabular-nums;
}
:is(#draft-count,#queue-count):empty { visibility:hidden; }

.studio-to-top {
  position:fixed; z-index:5;
  inset-inline-end:max(18px,env(safe-area-inset-right));
  bottom:calc(18px + env(safe-area-inset-bottom));
  display:grid; place-items:center; width:44px; height:44px; padding:0;
  border:1px solid var(--line); border-radius:50%;
  background:var(--panel); color:var(--text); box-shadow:0 3px 12px #0002;
  cursor:pointer; transition:opacity .16s ease,transform .16s ease,background-color .16s ease;
}
.studio-to-top[inert] { opacity:0; pointer-events:none; visibility:hidden; transform:translateY(5px); }
.studio-to-top:focus-visible { outline:2px solid var(--selection-edge); outline-offset:3px; }
@media (hover:hover) {
  .studio-to-top:hover { background:var(--raised); border-color:var(--dim); transform:translateY(-2px); }
}
@media (max-width:660px) {
  .main-column .view { padding-bottom:calc(76px + env(safe-area-inset-bottom)); }
  body:has(.notice.shown) .studio-to-top { visibility:hidden; }
}
