/* Extracted from index.html. Keep order-sensitive shared layout overrides in index.html. */

/* 顶部导航栏：永久固定，不随滚动或弹层消失，始终置于最顶层；贴边无左右留白 */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  backdrop-filter: saturate(180%) blur(20px);
  background: rgba(251, 251, 253, 0.82);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  visibility: visible;
  opacity: 1;
  overflow: visible;
}

html.theme-dark .top-nav {
  background: rgba(24, 24, 24, 0.86);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html.theme-dark body:has(#ai-workbench.panel.active) .top-nav {
  background: #141414;
  border-bottom-color: rgba(255, 255, 255, 0.07);
}


.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  height: 50px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  overflow: visible;
  position: relative;
}

.nav-version-hint {
  position: fixed;
  right: 40px;
  top: 13px;
  z-index: 10002;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(185, 188, 196, 0.88);
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  text-decoration: none;
}

.nav-ai-quota-btn {
  position: fixed;
  right: 72px;
  top: 12px;
  z-index: 10002;
  height: 26px;
  min-width: 64px;
  max-width: 118px;
  padding: 0 9px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.045);
  color: rgba(29, 29, 31, 0.76);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-ai-quota-btn[hidden] {
  display: none !important;
}

.nav-ai-quota-btn strong {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 650;
  color: inherit;
}

.nav-ai-quota-btn:hover,
.nav-ai-quota-btn[aria-expanded="true"] {
  background: rgba(0, 0, 0, 0.075);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1d1d1f;
}

.nav-ai-quota-btn.is-low {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.18);
  color: #b4232f;
}

html.theme-dark .nav-ai-quota-btn {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(240, 240, 240, 0.82);
}

html.theme-dark .nav-ai-quota-btn:hover,
html.theme-dark .nav-ai-quota-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.13);
  color: #fff;
}

html.theme-dark .nav-ai-quota-btn.is-low {
  background: rgba(255, 92, 96, 0.14);
  border-color: rgba(255, 92, 96, 0.22);
  color: #ff9699;
}

.nav-ai-quota-panel {
  position: fixed;
  top: 64px;
  right: 72px;
  z-index: 10002;
  width: min(258px, calc(100vw - 20px));
  padding: 12px 14px 11px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.nav-ai-quota-panel[hidden] {
  display: none !important;
}

html.theme-dark .nav-ai-quota-panel {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(34, 34, 34, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

.nav-ai-quota-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.nav-ai-quota-row + .nav-ai-quota-row {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

html.theme-dark .nav-ai-quota-row + .nav-ai-quota-row {
  border-top-color: rgba(255, 255, 255, 0.07);
}

.nav-ai-quota-row span {
  color: var(--muted);
}

.nav-ai-quota-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.nav-ai-quota-note {
  margin: 8px 0 0;
  padding-top: 9px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

html.theme-dark .nav-ai-quota-note {
  border-top-color: rgba(255, 255, 255, 0.07);
}

html.theme-dark .nav-version-hint {
  color: rgba(185, 188, 196, 0.72);
}

.nav-notice-icon {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-notice-badge {
  position: absolute;
  right: -5px;
  top: -5px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #FF5C60;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}

.nav-notice-panel {
  position: fixed;
  top: 64px;
  right: 10px;
  width: min(320px, calc(100vw - 20px));
  max-height: 48vh;
  overflow: auto;
  z-index: 10002;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

html.theme-dark .nav-notice-panel {
  background: rgba(34, 34, 34, 0.98);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-notice-panel[hidden] {
  display: none !important;
}

.nav-notice-item {
  padding: 10px 8px;
  border-radius: 10px;
  background: var(--soft);
}

.nav-notice-item + .nav-notice-item {
  margin-top: 8px;
}

.nav-notice-item-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.nav-notice-item-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}

.nav-notice-empty {
  padding: 14px 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* Shared top-navigation popover material. */
.nav-ai-quota-panel,
.nav-notice-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.28),
    0 18px 48px rgba(31, 39, 52, 0.16),
    0 3px 10px rgba(31, 39, 52, 0.07);
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
}

.nav-ai-quota-row + .nav-ai-quota-row,
.nav-ai-quota-note,
.nav-notice-item + .nav-notice-item {
  border-color: rgba(0, 0, 0, 0.08);
}

html.theme-dark .nav-ai-quota-panel,
html.theme-dark .nav-notice-panel {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(31, 31, 33, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 20px 52px rgba(0, 0, 0, 0.38);
}

html.theme-dark .nav-ai-quota-row + .nav-ai-quota-row,
html.theme-dark .nav-ai-quota-note,
html.theme-dark .nav-notice-item + .nav-notice-item {
  border-color: rgba(255, 255, 255, 0.1);
}

@media (prefers-reduced-transparency: reduce) {
  .nav-ai-quota-panel,
  .nav-notice-panel {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html.theme-dark .nav-ai-quota-panel,
  html.theme-dark .nav-notice-panel {
    background: rgba(31, 31, 33, 0.96);
  }
}

@media (prefers-contrast: more) {
  .nav-ai-quota-panel,
  .nav-notice-panel {
    border-color: rgba(0, 0, 0, 0.34);
    background: rgba(255, 255, 255, 0.92);
  }

  html.theme-dark .nav-ai-quota-panel,
  html.theme-dark .nav-notice-panel {
    border-color: rgba(255, 255, 255, 0.52);
    background: rgba(24, 24, 25, 0.92);
  }
}

.nav-version-hint:not(.has-count) .nav-notice-badge {
  display: none;
}

.nav-version-hint:focus-visible {
  outline: 2px solid rgba(10, 103, 212, 0.26);
  outline-offset: 2px;
}

@media (max-width: 920px) {
  .nav-version-hint {
    right: 32px;
    top: 13px;
  }

  .nav-ai-quota-btn {
    right: 64px;
  }

  .nav-ai-quota-panel {
    right: 64px;
  }
}

@media (max-width: 620px) {
  .nav-ai-quota-btn {
    min-width: 48px;
    max-width: 78px;
    padding: 0 8px;
  }

  .nav-ai-quota-label {
    display: none;
  }
}

.nav-site-logo {
  width: 34px;
  height: 50px;
  border: 0;
  padding: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
}

.nav-site-logo img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

/* 轻量胶囊导航：圆角容器、小胶囊选中态、下拉浮层独立于主按钮 */
.nav-tabs {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  --nav-tab-r-pill: 999px;
  --nav-tab-r-open: 14px;
  font-size: 13px;
}

html.theme-dark .nav-tabs {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.tab-btn {
  position: relative;
  border: 0;
  background: transparent;
  color: #151515;
  height: 30px;
  min-width: 78px;
  padding: 0 14px;
  line-height: 30px;
  border-radius: var(--nav-tab-r-pill);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  transform: translateZ(0) scale(1);
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.tab-btn:hover {
  color: #1d1d1f;
  background: rgba(20, 24, 32, 0.06);
}

html.theme-dark .tab-btn {
  color: rgba(240, 240, 240, 0.72);
}

html.theme-dark .tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  color: #151515;
  background: linear-gradient(180deg, #ffd74a, #ffbc00);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

html.theme-dark .tab-btn.active {
  color: #151515;
  background: linear-gradient(180deg, #ffd74a, #ffbc00);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.tab-btn.active:hover,
html.theme-dark .tab-btn.active:hover {
  color: #151515;
  background: linear-gradient(180deg, #ffd74a, #ffbc00);
}

.tab-btn:active {
  transform: translateZ(0) scale(0.97);
}

.tab-btn.tab-clicking {
  animation: tab-click-pop 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes tab-click-pop {
  0% { transform: translateZ(0) scale(0.98); }
  55% { transform: translateZ(0) scale(1.06); }
  100% { transform: translateZ(0) scale(1); }
}

.tab-btn-split {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--nav-base-width, auto);
  z-index: 55;
  --nav-base-width: auto;
  --nav-expand-width: 132px;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.tab-btn-split-shell {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  width: auto;
  min-width: 0;
  border-radius: var(--nav-tab-r-pill);
  overflow: visible;
  transform: translateZ(0);
  transition:
    border-radius 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.tab-btn-split:hover .tab-btn-split-shell,
.tab-btn-split:focus-within .tab-btn-split-shell,
.tab-btn-split.is-nav-open .tab-btn-split-shell {
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
  transform: translateY(1px) scaleY(0.985);
}

.tab-btn-split:hover,
.tab-btn-split:focus-within,
.tab-btn-split.is-nav-open {
  width: var(--nav-expand-width, auto);
}

html.theme-dark .tab-btn-split:hover .tab-btn-split-shell,
html.theme-dark .tab-btn-split:focus-within .tab-btn-split-shell,
html.theme-dark .tab-btn-split.is-nav-open .tab-btn-split-shell {
  background: transparent;
  box-shadow: none;
}

.tab-btn-split:not(.is-zebra-line-active):not(.is-zebra-chat-active):not(.is-zebra-max-active):not(.is-zebra-auto-active):not(.is-case-lib-active):not(.is-case-personal-active):not(.is-case-tips-active):not(.is-workbench-active) .tab-btn-split-shell {
  background: transparent;
}

.tab-btn-split.is-zebra-line-active .tab-btn-split-shell {
  background: transparent;
}

.tab-btn-split.is-zebra-line-active .tab-zebra-primary {
  background: linear-gradient(180deg, #ffd74a, #ffbc00);
  border-radius: var(--nav-tab-r-pill);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.tab-btn-split.is-zebra-line-active:hover .tab-zebra-primary,
.tab-btn-split.is-zebra-line-active:focus-within .tab-zebra-primary {
  border-radius: 999px;
}

.tab-btn-split.is-zebra-chat-active .tab-btn-split-shell,
.tab-btn-split.is-zebra-max-active .tab-btn-split-shell,
.tab-btn-split.is-zebra-auto-active .tab-btn-split-shell,
.tab-btn-split.is-case-lib-active .tab-btn-split-shell,
.tab-btn-split.is-case-personal-active .tab-btn-split-shell,
.tab-btn-split.is-case-tips-active .tab-btn-split-shell,
.tab-btn-split.is-workbench-active .tab-btn-split-shell {
  background: transparent;
}

.tab-btn-split.is-zebra-chat-active .tab-zebra-primary,
.tab-btn-split.is-zebra-max-active .tab-zebra-primary,
.tab-btn-split.is-zebra-auto-active .tab-zebra-primary,
.tab-btn-split.is-case-lib-active .tab-zebra-primary,
.tab-btn-split.is-case-personal-active .tab-zebra-primary,
.tab-btn-split.is-case-tips-active .tab-zebra-primary,
.tab-btn-split.is-workbench-active .tab-zebra-primary {
  background: linear-gradient(180deg, #ffd74a, #ffbc00);
  border-radius: var(--nav-tab-r-pill);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.tab-btn-split.is-zebra-chat-active:hover .tab-zebra-primary,
.tab-btn-split.is-zebra-chat-active:focus-within .tab-zebra-primary,
.tab-btn-split.is-zebra-max-active:hover .tab-zebra-primary,
.tab-btn-split.is-zebra-max-active:focus-within .tab-zebra-primary,
.tab-btn-split.is-zebra-auto-active:hover .tab-zebra-primary,
.tab-btn-split.is-zebra-auto-active:focus-within .tab-zebra-primary,
.tab-btn-split.is-case-lib-active:hover .tab-zebra-primary,
.tab-btn-split.is-case-lib-active:focus-within .tab-zebra-primary,
.tab-btn-split.is-case-personal-active:hover .tab-zebra-primary,
.tab-btn-split.is-case-personal-active:focus-within .tab-zebra-primary,
.tab-btn-split.is-case-tips-active:hover .tab-zebra-primary,
.tab-btn-split.is-case-tips-active:focus-within .tab-zebra-primary,
.tab-btn-split.is-workbench-active:hover .tab-zebra-primary,
.tab-btn-split.is-workbench-active:focus-within .tab-zebra-primary {
  border-radius: 999px;
}

.tab-zebra-primary {
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  transition: transform 0.18s ease;
}

.tab-btn-split:hover .tab-zebra-primary,
.tab-btn-split:focus-within .tab-zebra-primary,
.tab-btn-split.is-nav-open .tab-zebra-primary {
  transform: scaleX(0.94) scaleY(0.96);
}

.tab-zebra-primary .tab-zebra-row.tab-btn,
.tab-btn-split:hover .tab-zebra-primary .tab-zebra-row.tab-btn,
.tab-btn-split:focus-within .tab-zebra-primary .tab-zebra-row.tab-btn,
.tab-btn-split.is-nav-open .tab-zebra-primary .tab-zebra-row.tab-btn {
  border-radius: var(--nav-tab-r-pill);
}

.tab-zebra-expand {
  position: absolute;
  left: 50%;
  top: -7px;
  display: block;
  min-width: 0;
  width: var(--nav-expand-width);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px) scale(0.985);
  transition:
    opacity 0.16s ease,
    transform 0.22s ease;
}

.tab-zebra-expand::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
  background: transparent;
}

.tab-btn-split:hover .tab-zebra-expand,
.tab-btn-split:focus-within .tab-zebra-expand,
.tab-btn-split.is-nav-open .tab-zebra-expand {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.tab-btn-split.tab-btn-split--collapse-locked .tab-zebra-expand {
  opacity: 0 !important;
  pointer-events: none !important;
}

.tab-btn-split.tab-btn-split--collapse-locked .tab-zebra-expand-body {
  transform: none;
  opacity: 1;
  transition: none;
}

.tab-zebra-expand-body {
  min-height: auto;
  overflow: visible;
  transform-origin: top center;
  transform: none;
  opacity: 1;
  padding: 44px 12px 14px;
  border-radius: 24px;
  border: 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 22px 54px rgba(18, 24, 38, 0.16);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  display: block;
  transition: none;
}

html.theme-dark .tab-zebra-expand-body {
  border-color: transparent;
  background: rgba(34, 34, 34, 0.98);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38);
}

.tab-btn-split:hover .tab-zebra-expand-body,
.tab-btn-split:focus-within .tab-zebra-expand-body,
.tab-btn-split.is-nav-open .tab-zebra-expand-body {
  transform: none;
  opacity: 1;
}

.tab-zebra-expand-body .tab-zebra-row.tab-btn {
  height: 30px;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: var(--nav-tab-r-pill);
  background: transparent;
  color: #1d1d1f;
  line-height: 30px;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
  display: flex;
  text-decoration: none;
}

.tab-zebra-expand-body .tab-zebra-row.tab-btn:hover {
  background: rgba(20, 24, 32, 0.055);
  color: #000;
  text-decoration: none;
}

.tab-zebra-expand-body a.tab-zebra-row.tab-btn:visited,
.tab-zebra-expand-body a.tab-zebra-row.tab-btn:focus-visible {
  text-decoration: none;
}

html.theme-dark .tab-zebra-expand-body .tab-zebra-row.tab-btn {
  color: rgba(255, 255, 255, 0.92);
}

html.theme-dark .tab-zebra-expand-body .tab-zebra-row.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tab-zebra-row.tab-btn {
  position: relative;
  z-index: 1;
  width: auto;
  margin: 0;
  height: 30px;
  min-width: 68px;
  padding: 0 14px;
  line-height: 30px;
  font-size: 13px;
  font-weight: 560;
  border: 0;
  background: transparent;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #151515;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.tab-zebra-row.tab-btn.active {
  background: transparent;
  color: #151515;
}

.tab-btn-split.is-case-lib-active .tab-zebra-row.tab-btn,
.tab-btn-split.is-case-personal-active .tab-zebra-row.tab-btn,
.tab-btn-split.is-case-tips-active .tab-zebra-row.tab-btn,
.tab-btn-split.is-workbench-active .tab-zebra-row.tab-btn,
.tab-btn-split.is-zebra-line-active .tab-zebra-row.tab-btn,
.tab-btn-split.is-zebra-chat-active .tab-zebra-row.tab-btn,
.tab-btn-split.is-zebra-max-active .tab-zebra-row.tab-btn,
.tab-btn-split.is-zebra-auto-active .tab-zebra-row.tab-btn {
  color: #151515;
}

html.theme-dark .tab-zebra-row.tab-btn {
  color: rgba(240, 240, 240, 0.72);
}

.nav-tabs > .tab-btn {
  width: auto;
  flex: 0 0 auto;
}

#tab-wrap-workbench .tab-zebra-expand-body {
  display: block;
}

#tab-wrap-zebra-line {
  --nav-expand-width: 132px;
}

#tab-wrap-case-lib {
  --nav-expand-width: 132px;
}

#tab-wrap-workbench {
  --nav-expand-width: 176px;
}

.workbench-nav-empty {
  opacity: 0.58;
  cursor: default;
  pointer-events: none;
}


.nav-settings {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  height: 30px;
  width: 44px;
  margin-left: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  z-index: 10000;
  transform: translateZ(0);
}

.nav-settings-btn {
  position: relative;
  z-index: 3;
  width: 44px;
  height: 30px;
  border: 0;
  background: transparent;
  color: rgba(29, 29, 31, 0.62);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  transform: translateZ(0) scale(1);
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.nav-settings:hover .nav-settings-btn,
.nav-settings:focus-within .nav-settings-btn,
.nav-settings.delay-close .nav-settings-btn {
  color: #1d1d1f;
  background: transparent;
  transform: none;
}

html.theme-dark .nav-settings-btn {
  color: rgba(240, 240, 240, 0.84);
}

html.theme-dark .nav-settings:hover .nav-settings-btn,
html.theme-dark .nav-settings:focus-within .nav-settings-btn,
html.theme-dark .nav-settings.delay-close .nav-settings-btn {
  color: #fff;
  background: transparent;
}

.nav-settings-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-settings-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 1;
  min-width: 0;
  width: max-content;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  border: 0;
  box-shadow: 0 22px 54px rgba(18, 24, 38, 0.16);
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  opacity: 0;
  transform: translateX(-50%) translateY(-8px) scale(0.985);
  transform-origin: top center;
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.22s ease;
}

.nav-settings-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
  background: transparent;
}

html.theme-dark .nav-settings-panel {
  background: rgba(34, 34, 34, 0.98);
  border-color: transparent;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38);
}

.nav-settings-panel.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.nav-settings:hover .nav-settings-panel,
.nav-settings:focus-within .nav-settings-panel {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.nav-settings.delay-close .nav-settings-panel {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.nav-settings.force-hide .nav-settings-panel {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(-8px) scale(0.985) !important;
  pointer-events: none !important;
}

.nav-menu-item {
  width: auto;
  height: 30px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(29, 29, 31, 0.84);
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-start;
}

.nav-menu-item svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  pointer-events: none;
}

.nav-menu-item:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
}

html.theme-dark .nav-menu-item {
  color: rgba(240, 240, 240, 0.9);
}

html.theme-dark .nav-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-menu-item.disabled {
  color: rgba(29, 29, 31, 0.42);
  cursor: default;
}

.nav-menu-item.disabled:hover {
  background: transparent;
  color: rgba(29, 29, 31, 0.42);
}

html.theme-dark .nav-menu-item.disabled,
html.theme-dark .nav-menu-item.disabled:hover {
  color: rgba(240, 240, 240, 0.42);
}

.nav-menu-item.hidden {
  display: none;
}
