/* Figma Navbar 744:4617 */

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/viewer/assets/fonts/golos-400-cyr.woff2") format("woff2");
  unicode-range: U+0400-04FF, U+0500-052F;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/viewer/assets/fonts/golos-400-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F;
}

/* backdrop-filter на position:fixed не сэмплит страницу, пока html — scroll-контейнер */
html {
  overflow-x: visible;
  overflow-y: visible;
}

body {
  overflow-x: visible;
}

#app.app {
  overflow-x: clip;
  max-width: 100%;
}

body::before {
  content: "";
  position: fixed;
  top: -100px;
  left: 18%;
  width: 520px;
  height: 240px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(113, 119, 248, 0.26), transparent 72%);
}

[data-theme="light"] body::before,
:root:not([data-theme="dark"]) body::before {
  background: radial-gradient(ellipse at center, rgba(113, 119, 248, 0.16), transparent 72%);
}

.site-header--figma {
  position: relative;
  z-index: 80;
  background: transparent;
  box-shadow: none;
}

.site-header--figma::before {
  content: "";
  display: block;
  height: var(--header-nav-height, 68px);
}

.figma-nav-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding-top: 12px;
  background: rgba(22, 23, 28, 0.42);
  border-bottom: 1px solid rgba(242, 243, 247, 0.12);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: none;
  transition:
    background 0.22s ease,
    backdrop-filter 0.28s ease,
    -webkit-backdrop-filter 0.28s ease;
}

.figma-nav-shell.is-scrolled {
  background: rgba(22, 23, 28, 0.92);
  backdrop-filter: blur(20px) saturate(1.05);
  -webkit-backdrop-filter: blur(20px) saturate(1.05);
  box-shadow: none;
}

[data-theme="light"] .figma-nav-shell,
:root:not([data-theme="dark"]) .figma-nav-shell {
  background: rgba(255, 255, 255, 0.48);
  border-bottom-color: rgba(18, 19, 26, 0.08);
}

[data-theme="light"] .figma-nav-shell.is-scrolled,
:root:not([data-theme="dark"]) .figma-nav-shell.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px) saturate(1.05);
  -webkit-backdrop-filter: blur(20px) saturate(1.05);
}

[data-theme="light"] .site-header--figma,
:root:not([data-theme="dark"]) .site-header--figma {
  --figma-nav-bg: var(--bg-elevated);
}

[data-theme="dark"] .site-header--figma {
  --figma-nav-bg: #16171c;
}

.figma-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  height: 56px;
  min-height: 56px;
  padding: 0 var(--page-padding);
}

@media (display-mode: standalone) {
  .figma-nav-shell {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
  .site-header--figma::before {
    height: calc(var(--header-nav-height, 68px) + env(safe-area-inset-top, 0px));
  }
}

.figma-nav__left {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
  position: relative;
}

.figma-nav__menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.figma-nav__menu-btn svg {
  width: 20px;
  height: 20px;
}

.figma-nav__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  width: 187px;
  height: 19px;
  text-decoration: none;
  color: var(--text-primary);
}

.figma-nav__logo-wordmark {
  display: block;
  width: 187px;
  height: 19px;
}

[data-theme="light"] .figma-nav__logo-wordmark,
:root:not([data-theme="dark"]) .figma-nav__logo-wordmark {
  filter: invert(1);
}

[data-theme="light"] .figma-nav__logo::after,
:root:not([data-theme="dark"]) .figma-nav__logo::after {
  content: "";
  position: absolute;
  left: 179px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff335f;
  pointer-events: none;
}

.figma-nav__tabs {
  display: flex;
  align-items: center;
  gap: 20px;
}

.figma-nav__tab {
  color: var(--text-secondary, #969fa8);
  font: 400 14px/20px "Golos Text", var(--font);
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

button.figma-nav__tab {
  appearance: none;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.figma-nav__tab:hover {
  color: var(--text-primary);
}

.figma-nav__tab.is-active {
  color: var(--text-primary, #fafafa);
}

[data-theme="light"] .figma-nav__tab,
:root:not([data-theme="dark"]) .figma-nav__tab {
  color: #4b5563;
}

[data-theme="light"] .figma-nav__tab:hover,
[data-theme="light"] .figma-nav__tab.is-active,
:root:not([data-theme="dark"]) .figma-nav__tab:hover,
:root:not([data-theme="dark"]) .figma-nav__tab.is-active {
  color: #12131a;
}

.figma-nav__search {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 240px;
  max-width: 240px;
}

.figma-nav__search[hidden] {
  display: none !important;
}

.figma-nav__search .search-global-wrap,
.figma-nav__search .search-global,
.figma-nav__search .search-global__box {
  width: 240px;
  max-width: 240px;
}

.figma-nav__search .search-global__input {
  width: 240px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(98, 108, 119, 0.25);
  outline: none;
  box-shadow: none;
}

.figma-nav__search .search-global__input:focus,
.figma-nav__search .search-global__input:focus-visible,
.figma-nav__search .search-global__input:focus-within,
.figma-nav__search .search-global__input--open,
.figma-nav__search .search-global__input--active {
  border: 0;
  outline: none;
  box-shadow: none;
  background: rgba(98, 108, 119, 0.32);
}

[data-theme="light"] .figma-nav__search .search-global__input,
:root:not([data-theme="dark"]) .figma-nav__search .search-global__input {
  background: var(--bg-secondary);
}

[data-theme="light"] .figma-nav__search .search-global__input:focus,
[data-theme="light"] .figma-nav__search .search-global__input:focus-visible,
[data-theme="light"] .figma-nav__search .search-global__input:focus-within,
[data-theme="light"] .figma-nav__search .search-global__input--open,
[data-theme="light"] .figma-nav__search .search-global__input--active,
:root:not([data-theme="dark"]) .figma-nav__search .search-global__input:focus,
:root:not([data-theme="dark"]) .figma-nav__search .search-global__input:focus-visible,
:root:not([data-theme="dark"]) .figma-nav__search .search-global__input:focus-within,
:root:not([data-theme="dark"]) .figma-nav__search .search-global__input--open,
:root:not([data-theme="dark"]) .figma-nav__search .search-global__input--active {
  background: var(--control-tertiary-hover, rgba(127, 140, 153, 0.24));
}

.figma-nav__search .search-global__items {
  padding: 0;
  gap: 10px;
  overflow: hidden;
}

.figma-nav__search .search-global__icon {
  width: 16.992px;
  height: 16.992px;
  margin: 0;
  color: #626c77;
}

.figma-nav__search .search-global__icon img {
  display: block;
  width: 16.992px;
  height: 16.992px;
}

.figma-nav__search .search-global__placeholder {
  font: 400 13px/19.5px var(--font);
  color: #626c77;
}

.figma-nav__search .search-global__placeholder-full,
.search-global__placeholder-short {
  display: none;
}

.figma-nav__search .search-global__placeholder-short {
  display: inline;
}

.search-global__placeholder-full {
  display: inline;
}

.figma-nav__search .search-global__clear,
.figma-nav__search .search-global__add {
  display: none !important;
}

.figma-nav__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  min-width: 0;
  flex-shrink: 0;
}

.figma-nav__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.figma-nav__whats-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(98, 108, 119, 0.25);
  color: #fff;
  font: 600 12px/18px var(--font);
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.figma-nav__whats-new:hover {
  background: rgba(98, 108, 119, 0.36);
}

[data-theme="light"] .figma-nav__whats-new,
:root:not([data-theme="dark"]) .figma-nav__whats-new {
  background: var(--bg-control, #f2f3f7);
  color: var(--text-primary);
}

[data-theme="light"] .figma-nav__whats-new:hover,
:root:not([data-theme="dark"]) .figma-nav__whats-new:hover {
  background: #e4e6ec;
}

.figma-nav__whats-new-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

.figma-nav__whats-new-dot {
  display: block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

[data-theme="light"] .figma-nav__whats-new-icon,
:root:not([data-theme="dark"]) .figma-nav__whats-new-icon {
  filter: invert(1);
}

.figma-nav__ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: #7177f8;
  background-image: none;
  color: #fff;
  font: 600 12px/18px var(--font);
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
}

[data-theme="light"] .figma-nav__ai-btn:not(.figma-nav__collections-btn),
:root:not([data-theme="dark"]) .figma-nav__ai-btn:not(.figma-nav__collections-btn) {
  background: #5b61e6;
  box-shadow: none;
}

.figma-nav__ai-btn:hover {
  background: #646af0;
  color: #fff;
  text-decoration: none;
}

[data-theme="light"] .figma-nav__ai-btn:not(.figma-nav__collections-btn):hover,
:root:not([data-theme="dark"]) .figma-nav__ai-btn:not(.figma-nav__collections-btn):hover {
  background: #4f55d4;
}

/* Коллекции — как «Что нового», не primary AI */
.figma-nav__collections-btn {
  background: rgba(98, 108, 119, 0.25);
  background-image: none;
  color: #fff;
}

.figma-nav__collections-btn:hover {
  background: rgba(98, 108, 119, 0.36);
  color: #fff;
}

.figma-nav__collections-btn.is-active {
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22);
  background: rgba(98, 108, 119, 0.4);
}

[data-theme="light"] .figma-nav__collections-btn,
:root:not([data-theme="dark"]) .figma-nav__collections-btn {
  background: var(--bg-control, #f2f3f7);
  color: var(--text-primary);
}

[data-theme="light"] .figma-nav__collections-btn:hover,
:root:not([data-theme="dark"]) .figma-nav__collections-btn:hover {
  background: #e4e6ec;
  color: var(--text-primary);
}

[data-theme="light"] .figma-nav__collections-btn.is-active,
:root:not([data-theme="dark"]) .figma-nav__collections-btn.is-active {
  box-shadow: none;
  background: #e8eaef;
}

/* icon-bookmark.svg заливка #FAFAFA — в светлой теме инвертируем под тёмный текст */
[data-theme="light"] .figma-nav__collections-btn .figma-nav__ai-icon img,
:root:not([data-theme="dark"]) .figma-nav__collections-btn .figma-nav__ai-icon img {
  filter: invert(1);
}

.figma-nav__ai-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.figma-nav__ai-icon img {
  display: block;
  width: 20px;
  height: 20px;
}

.figma-nav__tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(98, 108, 119, 0.25);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.figma-nav__login-btn {
  width: auto;
  min-width: 76px;
  gap: 8px;
  padding: 0 12px;
  font: 600 14px/20px var(--font-display);
  white-space: nowrap;
}

.figma-nav__login-label {
  display: inline;
}

[data-theme="light"] .figma-nav__tool-btn,
:root:not([data-theme="dark"]) .figma-nav__tool-btn {
  background: var(--bg-control, #f2f3f7);
  box-shadow: none;
}

.figma-nav__tool-btn:hover {
  background: rgba(98, 108, 119, 0.36);
}

[data-theme="light"] .figma-nav__tool-btn:hover,
:root:not([data-theme="dark"]) .figma-nav__tool-btn:hover {
  background: #e4e6ec;
}

.figma-nav__tool-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  overflow: hidden;
}

.figma-nav__tool-icon--sun img {
  display: block;
  width: 17.916px;
  height: 17.916px;
}

.figma-nav__tool-icon--login img {
  display: block;
  width: 14.583px;
  height: 14.583px;
}

[data-theme="light"] .figma-nav__tool-btn img,
:root:not([data-theme="dark"]) .figma-nav__tool-btn img {
  filter: invert(1);
}

.figma-nav__guest,
.figma-nav__authed {
  display: flex;
  align-items: center;
  gap: 6px;
}

.figma-nav__header-links {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9999px;
  background: var(--control-tertiary);
  flex-shrink: 0;
}

.figma-nav__header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 12px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--text-primary);
  font: 500 13.5px/20px var(--font-display);
  letter-spacing: 0.1px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.figma-nav__header-link:hover {
  background: var(--control-tertiary-hover);
}

.figma-nav__header-link.is-active {
  background: color-mix(in srgb, var(--text-primary) 14%, transparent);
  color: var(--text-primary);
}

.figma-nav__header-link--whats-new {
  padding: 4px 10px 4px 8px;
}

.figma-nav__header-link-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

.figma-nav__header-link-text {
  display: inline;
}

.figma-nav__guest[hidden],
.figma-nav__authed[hidden],
.figma-nav__icon-btn[hidden] {
  display: none !important;
}

.figma-nav__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.figma-nav__icon-btn:hover {
  opacity: 0.72;
}

.figma-nav__icon-btn img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
}

.figma-nav__icon-btn svg {
  width: 28px;
  height: 28px;
  display: block;
}

.figma-nav__pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9999px;
  background: #fff;
  color: #141414;
  font: 500 13.5px/20px var(--font-display);
  letter-spacing: 0.2px;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.15s ease;
}

[data-theme="light"] .figma-nav__pill-btn,
:root:not([data-theme="dark"]) .figma-nav__pill-btn {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.figma-nav__pill-btn:hover {
  filter: brightness(0.94);
}

.figma-nav__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
  background: rgba(98, 108, 119, 0.25);
  color: var(--text-primary);
  font: 600 14px/1 var(--font-display);
  cursor: pointer;
  flex-shrink: 0;
}

[data-theme="light"] .figma-nav__avatar,
:root:not([data-theme="dark"]) .figma-nav__avatar {
  background: var(--bg-secondary);
}

.figma-nav__avatar-img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: cover;
}

.figma-nav .lang-switcher {
  position: relative;
}

.figma-nav .lang-menu {
  right: 0;
  left: auto;
}

.profile-switcher {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.profile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 89;
  border: 0;
  display: none;
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  isolation: isolate;
}

.profile-menu-backdrop[hidden] {
  display: none !important;
}

.profile-menu {
  position: fixed;
  top: 0;
  right: 12px;
  z-index: 220;
  display: none;
  flex-direction: column;
  width: 240px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: rgba(18, 19, 24, 0.72);
  backdrop-filter: blur(32px) saturate(1.6);
  -webkit-backdrop-filter: blur(32px) saturate(1.6);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  color: #fff;
}

[data-theme="light"] .profile-menu,
:root:not([data-theme="dark"]) .profile-menu {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
  border: 0;
}

[data-theme="light"] .profile-menu-backdrop,
:root:not([data-theme="dark"]) .profile-menu-backdrop {
  background: rgba(255, 255, 255, 0.22);
}

.profile-menu.is-open {
  display: flex;
}

.profile-menu__head {
  display: grid;
  gap: 6px;
  padding: 0 16px 12px;
}

.profile-menu__name {
  margin: 0;
  color: inherit;
  font: 600 15px/22px var(--font-display);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-menu__email {
  margin: 0;
  color: var(--text-tertiary);
  font: 500 13px/20px var(--font-display);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .profile-menu__email {
  color: #969fa8;
}

.profile-menu__profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 8px;
  padding: 9px 16px;
  border-radius: 9999px;
  background: rgba(237, 237, 237, 0.08);
  color: inherit;
  font: 400 13px/20px var(--font-display);
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: background 0.15s ease, filter 0.15s ease;
}

/* display:flex выше перебивает UA [hidden] без !important — кнопка «Про» оставалась кликабельной */
.profile-menu__profile-btn[hidden],
.profile-menu__sep[hidden] {
  display: none !important;
}

.profile-menu__profile-btn--pro {
  background: var(--accent-pro);
  color: var(--accent-pro-text);
}

.profile-menu__profile-btn:hover,
.profile-menu__profile-btn.is-active {
  background: rgba(237, 237, 237, 0.14);
}

.profile-menu__profile-btn--pro:hover,
.profile-menu__profile-btn--pro.is-active {
  background: var(--accent-pro);
  filter: brightness(0.96);
}

.profile-menu__sep {
  height: 1px;
  margin: 6px 4px;
  background: rgba(237, 237, 237, 0.08);
  border: 0;
}

[data-theme="light"] .profile-menu__sep,
:root:not([data-theme="dark"]) .profile-menu__sep {
  background: rgba(127, 140, 153, 0.16);
}

.profile-menu__section {
  display: grid;
  gap: 2px;
  padding: 0;
}

.profile-menu__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: 400 16px/24px var(--font-display);
  letter-spacing: 0.2px;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.profile-menu__row:hover,
.profile-menu__row.is-active {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .profile-menu__row:hover,
[data-theme="light"] .profile-menu__row.is-active,
:root:not([data-theme="dark"]) .profile-menu__row:hover,
:root:not([data-theme="dark"]) .profile-menu__row.is-active {
  background: rgba(18, 19, 26, 0.06);
}

.profile-menu__row--plain {
  justify-content: flex-start;
}

.profile-menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #bbc1c7;
}

.profile-menu__icon--settings,
.profile-menu__icon--link {
  color: #474747;
}

[data-theme="light"] .profile-menu .profile-menu__icon {
  color: var(--text-secondary);
}

[data-theme="light"] .profile-menu .profile-menu__icon--settings,
[data-theme="light"] .profile-menu .profile-menu__icon--link,
:root:not([data-theme="dark"]) .profile-menu .profile-menu__icon--settings,
:root:not([data-theme="dark"]) .profile-menu .profile-menu__icon--link {
  color: #474747;
}

.profile-menu__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.profile-menu__theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
}

.profile-menu__theme-label {
  font: 400 16px/24px var(--font-display);
  letter-spacing: 0.2px;
}

.profile-menu__theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 5px;
  border-radius: 9999px;
  background: rgba(237, 237, 237, 0.08);
}

[data-theme="light"] .profile-menu__theme-switch,
:root:not([data-theme="dark"]) .profile-menu__theme-switch {
  background: rgba(127, 140, 153, 0.16);
}

.profile-menu__theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.profile-menu__theme-btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

.profile-menu__theme-btn--sun svg {
  width: 16px;
  height: 16px;
}

.profile-menu__theme-switch[data-active="dark"] [data-theme-pick="dark"],
.profile-menu__theme-switch[data-active="light"] [data-theme-pick="light"] {
  opacity: 1;
  background: #252525;
}

[data-theme="light"] .profile-menu__theme-switch[data-active="dark"] [data-theme-pick="dark"],
:root:not([data-theme="dark"]) .profile-menu__theme-switch[data-active="dark"] [data-theme-pick="dark"] {
  background: rgba(127, 140, 153, 0.28);
}

[data-theme="light"] .profile-menu__theme-switch[data-active="light"] [data-theme-pick="light"],
:root:not([data-theme="dark"]) .profile-menu__theme-switch[data-active="light"] [data-theme-pick="light"] {
  background: rgba(127, 140, 153, 0.28);
}

.profile-menu__links {
  display: grid;
  gap: 2px;
  padding: 0;
}

.profile-menu__link {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: 400 16px/24px var(--font-display);
  letter-spacing: 0.2px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.profile-menu__link:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .profile-menu__link:hover,
:root:not([data-theme="dark"]) .profile-menu__link:hover {
  background: rgba(18, 19, 26, 0.06);
}

.profile-menu__link--logout {
  color: #ff6b4a;
}

.profile-menu__link--logout:hover {
  background: rgba(216, 64, 12, 0.16);
  color: #ff8f75;
}

[data-theme="light"] .profile-menu__link--logout,
:root:not([data-theme="dark"]) .profile-menu__link--logout {
  color: #d8400c;
}

[data-theme="light"] .profile-menu__link--logout:hover,
:root:not([data-theme="dark"]) .profile-menu__link--logout:hover {
  background: rgba(216, 64, 12, 0.1);
  color: #b8360a;
}

.figma-nav .topbar-menu,
.figma-nav__menu {
  left: 0;
  top: calc(100% + 8px);
  right: auto;
  min-width: 240px;
  max-width: min(320px, calc(100vw - 24px));
  padding: 10px;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--text-primary) 10%, transparent);
  border-radius: 16px;
  background: var(--figma-nav-bg, var(--bg-elevated));
  box-shadow: 0 16px 40px color-mix(in srgb, #000 42%, transparent);
}

.figma-nav__menu-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.figma-nav__menu-sep {
  height: 1px;
  margin: 6px 4px;
  background: color-mix(in srgb, var(--text-primary) 10%, transparent);
}

.figma-nav__menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-tertiary, #707070);
  font: 500 15px/22px var(--font-display);
  letter-spacing: 0.2px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.figma-nav__menu-link:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.figma-nav__menu-link.is-active {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--text-primary) 10%, transparent);
}

.figma-nav__menu-link--whats-new {
  color: var(--text-secondary);
}

.figma-nav__menu-link-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
}

.figma-nav__menu-footer {
  display: flex;
  align-items: center;
  padding: 2px;
}

.figma-nav__menu-theme {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font: 500 15px/22px var(--font-display);
  letter-spacing: 0.2px;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease, background 0.15s ease;
}

.figma-nav__menu-theme:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.figma-nav__menu-theme svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (max-width: 1800px) {
  .figma-nav {
    gap: 12px;
  }

  .figma-nav__left {
    gap: 16px;
  }

  .figma-nav__tabs {
    gap: 12px;
  }

  .figma-nav__whats-new-label {
    display: none;
  }
}

@media (max-width: 1600px) {
  .figma-nav {
    gap: 12px;
  }

  .figma-nav__left {
    gap: 12px;
    position: relative;
  }

  .figma-nav__tabs {
    display: none;
  }

  .figma-nav__menu-btn,
  #menuBtn {
    display: inline-flex;
  }

  .figma-nav .topbar-menu,
  .figma-nav__menu {
    min-width: min(300px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: min(70vh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .figma-nav__whats-new {
    display: none;
  }

  .figma-nav__authed .figma-nav__icon-btn:not(.lang-switcher__btn) {
    display: none;
  }
}

@media (max-width: 900px) {
  .figma-nav__ai-label {
    display: none;
  }

  .figma-nav__ai-btn {
    width: 36px;
    padding: 0;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: clip;
  }

  .figma-nav {
    gap: 6px;
    min-width: 0;
    padding-right: max(var(--page-padding), env(safe-area-inset-right));
    padding-left: max(var(--page-padding), env(safe-area-inset-left));
  }

  .figma-nav__left,
  .figma-nav__right {
    gap: 4px;
    min-width: 0;
  }

  /* React-меню рендерится поверх серверного. На телефоне все разделы
     помещаются в две колонки вместо длинного скроллируемого списка. */
  .hui-nav-menu .hui-menu-panel.figma-nav__menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(360px, calc(100vw - 2 * var(--page-padding)));
    min-width: 0;
    max-width: calc(100vw - 2 * var(--page-padding));
    max-height: calc(100dvh - var(--header-height, 68px) - 20px);
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform-origin: top left;
  }

  .hui-nav-menu .hui-menu-panel.figma-nav__menu > .hui-menu-item {
    min-width: 0;
    min-height: 40px;
    margin: 0;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 20px;
  }

  .hui-nav-menu .hui-menu-panel.figma-nav__menu > .hui-menu-sep {
    grid-column: 1 / -1;
    margin: 4px 2px;
  }

  .figma-nav__search,
  .figma-nav__ai-btn:not(.figma-nav__collections-btn) {
    display: none;
  }

  .figma-nav__logo,
  .figma-nav__logo-wordmark {
    width: 132px;
    height: 13px;
  }

  [data-theme="light"] .figma-nav__logo::after,
  :root:not([data-theme="dark"]) .figma-nav__logo::after {
    left: 126px;
    top: 7px;
    width: 6px;
    height: 6px;
  }

  .figma-nav__header-link-text {
    display: none;
  }

  .figma-nav__login-btn {
    min-width: 68px;
    gap: 6px;
    padding: 0 9px;
    font-size: 13px;
  }

  .figma-nav__header-link--whats-new {
    padding: 8px;
  }

  .figma-nav__pill-btn--pro {
    display: none;
  }
}
