.topbar-brand-logo-link{ display:flex; cursor:pointer; }

.presence-stack{ display:flex; }
.presence-stack:not(:empty){ margin-right:4px; }
.presence-avatar{
  width:26px; height:26px; border-radius:50%; border:2px solid var(--md-color-grey-white); margin-left:-8px;
  color:var(--md-color-grey-white); font-family:var(--font-sans); font-size:var(--text-sm); font-weight:var(--font-weight-semibold);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  position:relative; cursor:default;
}
.presence-stack .presence-avatar:first-child{ margin-left:0; }
.presence-avatar-img{ width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; }
.presence-stack .presence-avatar{ cursor:pointer; }
.topbar > .presence-stack{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); }
.presence-hover-card{
  display:none; position:absolute; top:calc(100% + 8px); left:50%; transform:translateX(-50%);
  align-items:center; gap:10px; white-space:nowrap;
  background:var(--md-color-grey-white); border:1px solid var(--ui-border); border-radius:10px; padding:10px;
  box-shadow:var(--shadow-soft); z-index:var(--z-float);
}
.presence-avatar:hover .presence-hover-card{ display:flex; }
.presence-hover-avatar, .presence-hover-avatar-initial{
  width:48px; height:48px; border-radius:50%; flex-shrink:0; object-fit:cover;
}
.presence-hover-avatar-initial{
  color:var(--md-color-grey-white); font-family:var(--font-sans); font-size:var(--text-3xl); font-weight:var(--font-weight-semibold);
  display:flex; align-items:center; justify-content:center;
}
.presence-hover-text{ display:flex; flex-direction:column; gap:2px; }
.presence-hover-name{ font-size:var(--text-base); font-weight:var(--font-weight-semibold); color:var(--ui-text); }
.presence-hover-email{ font-size:var(--text-sm); color:var(--ui-muted); }

.autosave-pill{ display:flex; align-items:center; gap:6px; font-size:var(--text-md); color:var(--ui-muted); padding:0 4px; }
.autosave-dot{ width:7px; height:7px; border-radius:50%; background:var(--ui-success); flex-shrink:0; }
.autosave-pill.dirty .autosave-dot{ background:var(--ui-warning); }
.autosave-pill.save-error{ color:var(--md-status-danger-foreground-1-rest); }
.autosave-pill.save-error .autosave-dot{ background:var(--ui-danger); }

.split-menu{
  position:absolute; top:calc(100% + 6px); right:0; min-width:170px; max-width:260px; background:var(--md-color-grey-white);
  border:1px solid var(--ui-border); border-radius:8px; box-shadow:var(--shadow-soft);
  display:none; padding:6px; z-index:var(--z-dropdown); overflow-y:auto;
}
.split-menu.open{ display:block; }
.split-menu.flip-up{ top:auto; bottom:calc(100% + 6px); }
.split-menu button{
  display:flex; align-items:center; gap:8px; width:100%; text-align:left; padding:8px 10px;
  border:none; background:none; border-radius:6px; white-space:nowrap;
  font-family:var(--font-sans); font-size:var(--text-sm); color:var(--ui-text); cursor:pointer;
}
.split-menu button:hover{ background:var(--ui-surface-2); }
.split-menu button.hidden{ display:none; }
.split-menu-label{ padding:6px 10px 2px; font-family:var(--font-sans); font-size:var(--text-xs); color:var(--ui-muted); text-transform:uppercase; letter-spacing:0.03em; }
.split-menu button.active .split-menu-icon{ color:var(--ui-accent); }
.dropdown-keynav-active{ background:var(--ui-surface-2); border-radius:6px; }
.split-menu button.dropdown-keynav-active{ background:var(--ui-surface-2); }
.split-menu-icon{ position:relative; display:inline-flex; width:14px; height:14px; flex-shrink:0; }
.split-menu-icon i{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:var(--text-base); }
.split-menu-icon i.fa-solid{ opacity:0; }
.split-menu button:hover .split-menu-icon i.fa-regular{ opacity:0; }
.split-menu button:hover .split-menu-icon i.fa-solid{ opacity:1; }
.rail-panel-menu-toggle{ position:relative; }
.update-available-dot{ position:absolute; top:-2px; right:-2px; width:8px; height:8px; border-radius:50%; background:var(--ui-accent); border:1.5px solid var(--md-color-grey-white); }
.update-available-dot.hidden{ display:none; }
.split-menu button.danger{ color:var(--md-neutral-foreground-1-rest); }
.split-menu button.danger:hover{ background:var(--md-status-danger-background-1-rest); color:var(--md-status-danger-foreground-1-rest); }
.view-menu-wrap{ position:relative; display:flex; }
.view-menu{ min-width:220px; }
.view-menu-option{ justify-content:space-between; }
.view-menu-check{ opacity:0; font-size:var(--text-md); color:var(--ui-accent); }
.view-menu-option.active .view-menu-check{ opacity:1; }

.deck-lang-wrap{ position:relative; display:flex; }
.deck-lang-menu{ min-width:140px; }
.deck-lang-option{ justify-content:space-between; }
.deck-lang-check{ opacity:0; font-size:var(--text-md); color:var(--ui-accent); }
.deck-lang-option.active .deck-lang-check{ opacity:1; }

.deck-version-menu{ min-width:260px; max-width:340px; }
.deck-version-menu .deck-lang-option{ gap:8px; }
.deck-version-menu .deck-lang-option > span{ min-width:0; overflow:hidden; text-overflow:ellipsis; }
.deck-version-loading{ padding:8px 10px; font-family:var(--font-sans); font-size:var(--text-sm); color:var(--ui-muted); }
.split-menu-heading{
  display:flex; flex-direction:column; gap:2px; padding:8px 10px 10px;
  font-family:var(--font-sans); font-size:var(--text-sm); color:var(--ui-text);
  border-bottom:1px solid var(--ui-border); margin-bottom:4px; cursor:default;
}
.split-menu-heading span{ font-size:var(--text-xs); color:var(--ui-muted); }
.deck-version-wrap.hidden{ display:none; }

.rail-panel-header-actions{ display:flex; align-items:center; gap:2px; }
.rail-panel-menu-wrap{ position:relative; display:flex; }
.rail-panel-menu-wrap.hidden{ display:none; }
.rail-panel-menu{ min-width:220px; max-width:none; }
.rail-panel-menu button{ white-space:nowrap; }
.rail-panel-menu button:disabled{ opacity:.4; cursor:default; }

#createSlideSplit{ width:100%; }
#createSlideSplit .split-main{ flex:1; text-align:left; }
#createSlideSplit .btn{ border:none; background:var(--ui-surface-2); color:var(--ui-text-2); }
#createSlideSplit .btn:hover{ background:var(--ui-border); }
#createSlideSplit .split-caret{ border-left:1px solid var(--md-color-grey-white); }

.main{ flex:1; min-width:0; display:flex; min-height:0; position:relative; background:var(--md-color-grey-white); }


.readonly-pill{
  display:flex; align-items:center; gap:8px; padding:4px 6px 4px 10px; border-radius:999px;
  background:var(--ui-accent-soft); color:var(--ui-accent); font-size:var(--text-sm); white-space:nowrap;
}
.readonly-pill.hidden{ display:none; }
.readonly-request-btn{
  border:none; border-radius:999px; padding:4px 10px; cursor:pointer; font-family:var(--font-sans);
  font-size:var(--text-sm); font-weight:var(--font-weight-medium); background:var(--ui-accent); color:var(--md-color-grey-white);
}
.readonly-request-btn:hover{ background:var(--ui-accent-hover); }
.readonly-request-btn:disabled{ opacity:0.6; cursor:default; }

.topbar-deck-title{
  position:absolute; top:50%; transform:translateY(-50%);
  left:var(--topbar-title-left, 244px);
  display:flex; align-items:center; gap:2px;
  max-width:38%; min-width:0;
}
.topbar-deck-title-text{
  font-size:var(--text-lg); font-weight:var(--font-weight-semibold); color:var(--ui-text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0;
}
.topbar-deck-title-text{ padding:2px 6px; margin-left:-6px; border-radius:6px; cursor:text; }
body.deck-readonly .topbar-deck-title-text, body.deck-template-edit-mode .topbar-deck-title-text{ cursor:default; }
.topbar-deck-title-text:hover{ background:var(--ui-surface-2); }
body.deck-readonly .topbar-deck-title-text:hover{ background:none; }
.topbar-deck-title-text.editing{
  background:var(--ui-surface); outline:2px solid var(--ui-accent); outline-offset:-1px;
  text-overflow:clip; overflow:visible; min-width:120px;
}
.topbar-deck-title-edit{
  flex-shrink:0; width:28px; height:28px; border:0; border-radius:6px; background:none;
  color:var(--ui-muted); cursor:pointer; display:flex; align-items:center; justify-content:center;
  visibility:hidden; padding:0;
}
.topbar-deck-title:hover .topbar-deck-title-edit{ visibility:visible; }
.topbar-deck-title-edit:hover{ background:var(--ui-surface-2); color:var(--ui-text); }
.topbar-deck-title-edit:focus-visible{ visibility:visible; }
