/*
 * Drawlive - Collaborative Drawing Review Styles
 */

/* =========================================
   INTER FONT FACE - локальные ассеты для About page
   ========================================= */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: font-url("/assets/inter/regular-eeb015ca.woff2") format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: font-url("/assets/inter/inter-500-180a56bc.woff2") format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: font-url("/assets/inter/inter-600-57722ad3.woff2") format('woff2');
}

/* =========================================
   FOUNDATION (Variables & Reset)
   ========================================= */
:root {
  /* === ABOUT PAGE: Eye-Comfort Palette === */

  /* Backgrounds — layered warm neutrals */
  --theme-bg-primary: #f7f7f6;
  --theme-bg-secondary: #ebebeb;
  --theme-bg-tertiary: #dfdfdf;
  --theme-bg-elevated: #f2f2f1;

  /* Text — soft black hierarchy */
  --theme-text-primary: #2a2a29;
  --theme-text-secondary: #5a5a59;
  --theme-text-tertiary: #7a7a79;
  --theme-text-inverse: #f7f7f6;

  /* Accent — muted engineering blue */
  --theme-accent: #3b5998;
  --theme-accent-hover: #2d4373;
  --theme-accent-subtle: #e8eff5;
  --theme-accent-text: #2d4373;

  /* Semantic — muted, eye-friendly */
  --theme-warning-bg: #fef3c7;
  --theme-warning-text: #92400e;
  --theme-warning-border: #fde68a;

  --theme-error-bg: #fee2e2;
  --theme-error-text: #dc2626;
  --theme-error-border: #fecaca;

  --theme-success-bg: #d1fae5;
  --theme-success-text: #059669;
  --theme-success-border: #a7f3d0;

  /* Borders — refined, barely visible */
  --theme-border: #d8d8d6;
  --theme-border-strong: #b8b8b6;

  /* Surface — layered elevation */
  --theme-surface: #f2f2f1;
  --theme-surface-alt: #e8e8e7;

  /* Shadows — warm, multi-layered */
  --theme-shadow-sm: 0 1px 2px rgba(42, 42, 41, 0.04);
  --theme-shadow-md: 0 4px 6px rgba(42, 42, 41, 0.05), 0 2px 4px rgba(42, 42, 41, 0.03);
  --theme-shadow-lg: 0 10px 15px rgba(42, 42, 41, 0.06), 0 4px 6px rgba(42, 42, 41, 0.04);

  /* Spacing — 4px base unit */
  --theme-space-xs: 4px;
  --theme-space-sm: 8px;
  --theme-space-md: 16px;
  --theme-space-lg: 24px;
  --theme-space-xl: 32px;
  --theme-space-2xl: 48px;
  --theme-space-3xl: 64px;
  --theme-space-4xl: 96px;

  /* Border radius — minimal precision */
  --theme-radius-sm: 4px;
  --theme-radius-md: 6px;
  --theme-radius-lg: 8px;

  /* Transitions — refined */
  --theme-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --theme-transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography — Inter scale */
  --theme-text-xs: 12px;
  --theme-text-sm: 14px;
  --theme-text-base: 16px;
  --theme-text-lg: 18px;
  --theme-text-xl: 20px;
  --theme-text-2xl: 24px;
  --theme-text-3xl: 30px;
  --theme-text-4xl: 36px;

  /* Line heights */
  --theme-leading-tight: 1.25;
  --theme-leading-normal: 1.5;
  --theme-leading-relaxed: 1.625;

  /* Letter spacing — Inter optimized */
  --theme-tracking-tight: -0.01em;
  --theme-tracking-normal: 0;
  --theme-tracking-wide: 0.025em;

  /* === EXISTING DRAWLIVE VARIABLES === */
  --cdr-primary-color: #007bff;
  --cdr-secondary-color: #6c757d;
  --cdr-danger-color: #dc3545;
  --cdr-success-color: #28a745;
  --cdr-warning-color: #ffc107;
  --cdr-background: rgba(255,255,255,0.5);
  --cdr-surface: #f8f9fa;
  --cdr-border: #dee2e6;
  --cdr-text-primary: #212529;
  --cdr-text-secondary: #6c757d;
  --cdr-border-radius: 4px;
  --cdr-toolbar-height: 48px;
  --cdr-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =========================================
   DARK MODE: Eye-Comfort Optimized
   ========================================= */

@media (prefers-color-scheme: dark) {
  :root {
    /* Backgrounds — soft darks */
    --theme-bg-primary: #1c1c1e;
    --theme-bg-secondary: #2c2c2e;
    --theme-bg-tertiary: #3c3c3e;
    --theme-bg-elevated: #2a2a2c;

    /* Text — off-white hierarchy */
    --theme-text-primary: #e8e8e7;
    --theme-text-secondary: #a8a8a7;
    --theme-text-tertiary: #888887;
    --theme-text-inverse: #1c1c1e;

    /* Accent — lighter для dark mode */
    --theme-accent: #6b8cff;
    --theme-accent-hover: #5a7ae6;
    --theme-accent-subtle: #1e2a4a;
    --theme-accent-text: #8aa3ff;

    /* Semantic — adapted для dark */
    --theme-warning-bg: #422006;
    --theme-warning-text: #fbbf24;
    --theme-warning-border: #78350f;

    --theme-error-bg: #450a0a;
    --theme-error-text: #f87171;
    --theme-error-border: #7f1d1d;

    --theme-success-bg: #064e3b;
    --theme-success-text: #34d399;
    --theme-success-border: #065f46;

    /* Borders — refined в dark */
    --theme-border: #3c3c3e;
    --theme-border-strong: #585858;

    /* Surface — layered dark */
    --theme-surface: #2a2a2c;
    --theme-surface-alt: #1c1c1e;

    /* Shadows — darker, warm */
    --theme-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --theme-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    --theme-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.25), 0 4px 6px rgba(0, 0, 0, 0.15);
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--cdr-font-family);
  background-color: var(--cdr-surface);
  color: var(--cdr-text-primary);
}

/* =========================================
   LAYOUT
   ========================================= */
.app-container {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.main-content {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.pdf-workspace {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #e0e0e0;
  display: flex;
  flex-direction: column;
}

/* =========================================
   DOCUMENT VIEWER
   ========================================= */
.document-viewer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: #e0e0e0;
  cursor: grab;
  touch-action: none;
}

.document-viewer.cursor-hand {
  cursor: grab;
}

.document-viewer.cursor-hand:active {
  cursor: grabbing;
}

.document-viewer.cursor-crosshair {
  cursor: crosshair;
}

.document-viewer:active {
  cursor: grabbing;
}

.pdf-workspace > .document-viewer {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.viewer-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center center;
}

.pdf-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.pdf-canvas--gl {
  z-index: 1;
}

.pdf-image {
  position: absolute;
  transform-origin: top left;
  pointer-events: none;
  user-select: none;
  max-width: none;
  max-height: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  height: 100%;
}

/* =========================================
   TOOLBAR
   ========================================= */
.toolbar-container {
  grid-column: 1 / -1;
  border: 1px solid var(--cdr-border);
  border-radius: var(--cdr-border-radius);
  padding: 10px;
  margin-bottom: 20px;
}

.toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.tool-group {
  display: flex;
  gap: 2px;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--cdr-border);
}

.tool-group:last-child {
  border-right: none;
}

/* Кнопка выхода - прижимается к правому краю */
.tool-group.exit-group {
  margin-left: auto;
  border-right: none;
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Логотип пользователя */
.user-logo {
  width: 1;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.user-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.exit-button {
  background: rgba(220, 53, 69, 0.1);
}

.exit-button:hover {
  background: rgba(220, 53, 69, 0.2);
}

.tool-button,
.color-button {
  padding: 6px 8px;
  border: none;
  background: var(--cdr-background);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tool-button:hover {
  background: rgba(255,255,255,0.8);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.tool-button:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.tool-button.active {
  background: var(--cdr-primary-color);
  color: white;
  box-shadow: 0 2px 8px rgba(0,123,255,0.4);
  transform: scale(1.05);
}

.tool-button.active:hover {
  background: #0056b3;
  transform: scale(1.08);
}

.color-button {
  width: 32px;
  height: 32px;
  min-width: 0;
  min-height: 0;
  padding: 4px;
  font-size: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  margin: 0 2px;
  background-clip: content-box;
}

.color-button:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.color-button:active {
  transform: scale(1.05);
}

.color-button.active {
  border-color: var(--cdr-primary-color);
  box-shadow: 0 0 0 2px white;
}

.color-button-random {
  font-size: 12px;
  font-weight: bold;
  color: #666;
}

.color-button-random.initialized {
  font-size: 0;
  color: transparent;
}

/* =========================================
   BUTTONS
   ========================================= */
.actions-bar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 100;
}

.action-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--cdr-background);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.button {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: var(--cdr-border-radius);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.button-primary {
  background: var(--cdr-primary-color);
  color: white;
}

.button-primary:hover {
  background: #0056b3;
}

.button-secondary {
  background: var(--cdr-surface);
  color: var(--cdr-text-primary);
  border: 1px solid var(--cdr-border);
}

.button-secondary:hover {
  background: var(--cdr-border-color);
}

.button-danger {
  background: var(--cdr-danger-color);
  color: white;
}

.button-danger:hover {
  background: #c82333;
}

/* =========================================
   ZOOM CONTROLS
   ========================================= */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.zoom-controls .zoom-level {
  font-size: 12px;
  font-weight: 600;
  color: var(--cdr-text-primary);
  min-width: 40px;
  text-align: center;
  padding: 0 4px;
}

/* =========================================
   PAGE NAVIGATION
   ========================================= */
.page-navigation {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-navigation-input {
  width: 32px;
  height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--cdr-border);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: white;
  color: var(--cdr-text-primary);
  appearance: textfield;
  -moz-appearance: textfield;
}

.page-navigation-input::-webkit-outer-spin-button,
.page-navigation-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.page-navigation-input:focus {
  outline: none;
  border-color: var(--cdr-primary-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.page-navigation-separator {
  color: var(--cdr-text-secondary);
  font-size: 14px;
  margin: 0 2px;
}

.page-navigation-from {
  font-size: 14px;
  color: var(--cdr-text-secondary);
  min-width: 24px;
  padding: 0 0 0 6px;
}

.page-navigation-total {
  font-size: 14px;
  font-weight: 500;
  color: var(--cdr-text-secondary);
  min-width: 24px;
}

.page-navigation .tool-button {
  padding: 6px 10px;
  font-size: 14px;
}

.page-navigation .tool-button:disabled,
.page-navigation .tool-button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.page-navigation .tool-button:disabled:hover,
.page-navigation .tool-button.disabled:hover {
  background: var(--cdr-background);
  transform: none;
}

/* =========================================
   UTILITIES
   ========================================= */
.hidden {
  display: none !important;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--cdr-text-secondary);
  font-size: 18px;
}

 /* =========================================
   ANIMATIONS
   ========================================= */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================
   DOCUMENT LOADING OVERLAY
   ========================================= */
.document-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--cdr-background);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 1s ease;
}

.document-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.document-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--cdr-border);
  border-top-color: var(--cdr-primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.document-loading-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--cdr-text-primary);
}

.document-loading-progress {
  font-size: 12px;
  color: var(--cdr-text-secondary);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .tool-group {
    border-right: none;
  }
}

/* =========================================
   USER IDENTITY - Эмблема пользователя с формой
   ========================================= */

details.user-identity-details {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.user-identity__summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-identity__edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.user-identity__edit > * {
  flex-shrink: 0;
}

.user-identity__input {
  flex-shrink: 1;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.user-identity__input:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

.user-identity__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.user-identity__check {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--cdr-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-identity__summary::-webkit-details-marker {
  display: none;
}

.user-identity__summary:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-identity__summary:active {
  transform: scale(1.05);
}

/* Input для идентификатора */
.user-identity__input {
  width: 150px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.user-identity__input:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

.user-identity__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Кнопка с галочкой */
.user-identity__check {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--cdr-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-identity__check:hover {
  background: rgba(0, 123, 255, 0.12);
  color: var(--cdr-primary-color);
}

/* Сообщение об ошибке */
.user-identity__error {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  padding: 4px 8px;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
}

/* PWA стили вынесены в отдельный файл: pwa.css */
/* Video стили вынесены в отдельный файл: video.css */

/* =========================================
   SESSION TOPBAR - спокойный хром вокруг сцены
   ========================================= */
.session-topbar__tools,
.session-topbar__profile {
  position: fixed !important;
  top: 16px;
  z-index: 120;
  color: #202124;
}

.session-topbar__tools {
  left: 16px;
  right: auto;
  width: max-content;
  max-width: calc(100vw - 32px);
  align-items: flex-start;
}

.session-topbar__tools .session-topbar__popover {
  left: 0;
  top: calc(100% + 8px);
  right: auto;
  bottom: auto;
  transform: none;
  margin: 0;
}

.session-topbar__profile {
  left: auto;
  right: 16px;
  width: max-content;
  max-width: calc(100vw - 32px);
  min-height: 48px;
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  padding: 5px;
  box-sizing: border-box;
  border: 1px solid var(--cdr-border);
  border-radius: 24px;
  background: var(--cdr-background);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.session-topbar__summary {
  box-sizing: border-box;
  min-width: 48px;
  min-height: 48px;
  height: 48px;
  padding: 12px 20px;
}

.session-topbar__profile .user-identity__summary {
  flex: 0 0 36px;
}

.session-topbar__summary::-webkit-details-marker { display: none; }
.session-topbar__summary:hover { background: var(--cdr-background); }
.session-topbar__summary kbd { display: none; }

.session-topbar__tool-indicator {
  width: 20px;
  text-align: center;
}

.session-topbar__tool-indicator .icon,
.tool-button .icon,
.file-icon .icon,
.empty-state .icon,
.user-identity__check .icon {
  display: block;
  width: 20px;
  height: 20px;
}

.session-topbar__color-indicator {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #b8b8b8;
}

.session-topbar__popover {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  bottom: auto;
  transform: none;
  margin: 0;
  width: min(360px, calc(100vw - 32px));
  min-width: 0;
  max-width: min(360px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 8px;
  color: #202124;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  z-index: 121;
}

.session-topbar__popover.meeting-panel {
  min-width: 0;
  max-width: min(360px, calc(100vw - 32px));
}

.session-topbar__profile .user-identity__edit { box-sizing: border-box; }
.session-topbar__profile .user-identity__edit form { display: flex; min-width: 0; width: 100%; }

.session-topbar__section + .session-topbar__section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e5e5;
}

.session-topbar__section-label {
  display: block;
  margin-bottom: 5px;
  color: #686868;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.session-topbar__popover .tool-group {
  padding: 0;
  border: 0;
  gap: 2px;
  flex-wrap: nowrap;
}

.shortcut-hint {
  margin-top: 4px;
  color: #686868;
  font-size: 11px;
}

.session-topbar__popover kbd {
  padding: 1px 4px;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  background: #f1f1f1;
  color: #303030;
  font-family: inherit;
  font-size: 10px;
}

.session-topbar__popover .tool-button {
  min-width: 30px;
  min-height: 30px;
  padding: 4px 5px;
}

.tool-button--shortcut { position: relative; flex-direction: column; gap: 1px; }
.tool-button--shortcut kbd { display: block; padding: 0 3px; font-size: 9px; line-height: 1.2; }

.session-topbar__exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: var(--theme-radius-md);
  color: #5a5a59;
  text-decoration: none;
}

.session-topbar__exit-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.session-topbar__exit:hover { background: #ebebeb; }

.session-topbar__profile details.user-identity-details { gap: 0; }
.session-topbar__profile details.user-identity-details {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.session-topbar__profile .user-identity__summary {
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px;
}
.session-topbar__profile .user-logo {
  width: 36px !important;
  height: 36px !important;
}
.session-topbar__profile .user-identity__edit {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}
.session-topbar__profile .user-identity__edit form { gap: 4px; }
.session-topbar__profile details[open] .user-identity__edit { display: flex; }
.session-topbar__profile .user-identity__input {
  width: 180px;
  min-width: 0;
  flex: 1 1 auto;
  border-color: #c8c8c8;
  background: #ffffff;
  color: #202124;
}
.session-topbar__profile .user-identity__check { color: #3b5998; }

@media (max-width: 560px) {
  .session-topbar__tools { left: 10px; top: 10px; }
  .session-topbar__profile { right: 10px; top: 10px; }
  .session-topbar__popover { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .session-topbar__popover .tool-group { flex-wrap: wrap; }
  .session-topbar__profile .user-identity__edit { max-width: calc(100vw - 20px); }
  .session-topbar__profile .user-identity__input { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .session-topbar__summary,
  .session-topbar__profile * { transition: none !important; }
}
