/* === Desktop Header === */

.lc-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 50;
  background: var(--lc-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--lc-border-divider);
}

.lc-header__inner {
  max-width: var(--lc-max);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 var(--lc-space);
  gap: 24px;
  width: 100%;
  justify-content: space-between;
}

.lc-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--lc-on-surface);
  flex: 0 0 auto;
}

.lc-header__brand-mark {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--lc-font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--lc-primary), var(--lc-primary-soft));
  box-shadow: 0 2px 8px rgba(54, 80, 199, 0.25);
}

.lc-header__brand-mark--image {
  background: none;
  box-shadow: none;
}

.lc-header__brand-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.lc-header__brand-initial {
  display: block;
}

.lc-header__brand-text {
  display: flex;
  flex-direction: column;
}

.lc-header__brand-name {
  font-family: var(--lc-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.lc-header__nav {
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
}

.lc-header__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lc-header__menu .lc-nav__link {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--lc-on-surface);
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lc-header__menu .lc-nav__link:hover {
  background: var(--lc-chip-bg);
  color: var(--lc-primary);
}

.lc-header__menu .lc-nav__link:focus-visible {
  outline: 2px solid var(--lc-focus-ring);
  outline-offset: 2px;
}

.lc-header__menu>.current-menu-item>.lc-nav__link,
.lc-header__menu>.current-menu-ancestor>.lc-nav__link {
  color: var(--lc-primary);
  background: rgba(82, 106, 226, 0.1);
}

.lc-header__menu>.current-menu-item>.lc-nav__link:hover,
.lc-header__menu>.current-menu-ancestor>.lc-nav__link:hover {
  background: rgba(82, 106, 226, 0.15);
}

.lc-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: 96px;
}

.lc-header__search {
  display: flex;
  align-items: center;
}

.lc-header__search .lc-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px;
  box-shadow: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.lc-header__search:not(:focus-within):not(.lc-header__search--expanded) .lc-search {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.lc-header__search:focus-within .lc-search,
.lc-header__search--expanded .lc-search {
  background: var(--lc-glass-search);
  border: 1px solid var(--lc-input-border);
  box-shadow: none;
}

.lc-header__search .lc-search__input {
  width: 0;
  padding: 0;
  opacity: 0;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-family: var(--lc-font-body);
  color: var(--lc-on-surface);
  outline: none;
  transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.lc-header__search .lc-search__input::placeholder {
  color: var(--lc-placeholder);
}

.lc-header__search:focus-within .lc-search__input,
.lc-header__search--expanded .lc-search__input {
  width: 200px;
  padding: 8px 14px;
  opacity: 1;
  background: transparent;
  border-radius: 999px;
}

.lc-header__search .lc-search__submit {
  background: transparent;
  border: none;
  color: var(--lc-meta);
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lc-header__search .lc-search__submit:hover {
  color: var(--lc-primary);
  background: var(--lc-chip-bg);
}

.lc-header__theme {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

/* Desktop: icon opens popover with the same 3-segment switch as the mobile drawer */
.lc-color-scheme--header {
  position: relative;
  display: flex;
  align-items: center;
}

.lc-color-scheme__trigger {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--lc-meta);
  cursor: pointer;
  opacity: 0.88;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    opacity 0.2s ease;
}

.lc-color-scheme__trigger:hover {
  color: var(--lc-on-surface);
  background: var(--lc-chip-bg);
  opacity: 1;
}

.lc-color-scheme__trigger:focus-visible {
  outline: 2px solid var(--lc-focus-ring);
  outline-offset: 2px;
}

.lc-color-scheme__trigger-icon {
  display: block;
}

.lc-color-scheme__popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 148px;
  padding: 10px;
  border-radius: 14px;
  background: var(--lc-glass-strong);
  border: 1px solid var(--lc-input-border);
  box-shadow: var(--lc-shadow), var(--lc-inner-light);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lc-color-scheme__popover[hidden] {
  display: none;
}

.lc-color-scheme__popover .lc-color-scheme__switch {
  width: 100%;
  min-width: 120px;
}

/* === Sidebar: Mobile Drawer Only === */

.lc-root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* 居中画幅：侧栏 fixed 顶满视口；主内容在 .lc-shell 内 */

.lc-frame {
  margin-left: auto;
  margin-right: auto;
  /* padding: 0 var(--lc-space); */
  box-sizing: border-box;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

/* --- Sidebar：桌面 fixed 满窗高；小屏抽屉 --- */

.lc-sidebar {
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 0;
  min-width: 0;
  width: var(--lc-sidebar-w);
}

.lc-sidebar__glass {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: var(--lc-radius-xl);
  background: var(--lc-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--lc-shadow), var(--lc-inner-light);
  min-width: 0;
}

@media (min-width: 901px) {
  .lc-header {
    display: flex;
  }

  .lc-sidebar {
    display: none;
  }

  .lc-mobile-header {
    display: none;
  }

  .lc-root {
    padding-top: 72px;
  }

  .lc-shell {
    padding-top: calc(var(--lc-space) + 48px);
    padding-bottom: calc(var(--lc-space) + 48px);
  }

  .lc-shell {
    margin-left: 0;
    width: auto;
    max-width: 100%;
    min-width: 0;
  }

  .lc-widgets__inner {
    position: sticky;
    top: calc(72px + var(--lc-space)) !important;
  }
}

.lc-mobile-header {
  display: none;
}

.lc-root {
  padding-top: 72px;
}

.lc-shell {
  padding-top: calc(var(--lc-space) + 48px);
  padding-bottom: calc(var(--lc-space) + 48px);
}

.lc-shell {
  margin-left: 0;
  width: auto;
  max-width: 100%;
  min-width: 0;
}


/* 主内容 + 右侧栏（小屏蒙层只盖此处） */

.lc-shell {
  position: relative;
  max-width: var(--lc-max);
  margin: 0 auto;
  z-index: 1;
  min-width: 0;
  padding: var(--lc-space);
}

.lc-sidebar__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.lc-brand__mark {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--lc-font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(135deg,
      var(--lc-primary),
      var(--lc-primary-soft));
  box-shadow: var(--lc-shadow);
}

.lc-brand__mark--image {
  padding: 0;
  overflow: hidden;
  background: var(--lc-brand-mark-bg);
  border: 1px solid var(--lc-brand-mark-border);
}

.lc-brand__mark-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.lc-brand__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lc-brand__name {
  font-family: var(--lc-font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 站点描述：默认单行；溢出时由 JS 加 --scroll，LED 风跑马灯循环 */
.lc-brand__tag-wrap {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  line-height: 1.35;
  min-height: 1em;
}

.lc-brand__tag-led {
  display: block;
  overflow: hidden;
  width: 100%;
}

.lc-brand__tag-led__track {
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  will-change: transform;
}

.lc-brand__tag-wrap--scroll .lc-brand__tag-led__track {
  animation: lc-brand-tag-marquee linear infinite;
  animation-duration: var(--lc-marquee-sec, 14s);
}

.lc-brand__tag-wrap--scroll:hover .lc-brand__tag-led__track {
  animation-play-state: paused;
}

@keyframes lc-brand-tag-marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.lc-brand__tag-led__chunk {
  display: inline-block;
  flex-shrink: 0;
  padding-right: 2.25rem;
  box-sizing: content-box;
  font-family: var(--lc-font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--lc-neutral);
  /* 轻微 LED 感：等宽字 + 淡光（不依赖深色/浅色单独调色） */
  text-shadow:
    0 0 10px rgba(72, 200, 170, 0.28),
    0 0 1px rgba(54, 80, 199, 0.15);
}

@media (prefers-reduced-motion: reduce) {
  .lc-brand__tag-wrap--scroll .lc-brand__tag-led__track {
    animation: none;
  }
}

.lc-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--lc-input-border);
  cursor: pointer;
  color: var(--lc-on-surface);
  background: var(--lc-pill-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--lc-shadow), var(--lc-inner-light);
}

.lc-menu-toggle:focus-visible {
  outline: 2px solid rgba(54, 80, 199, 0.35);
  outline-offset: 2px;
}

.lc-sidebar__panel {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* 菜单与岛屿区滚动，版权条始终贴在玻璃卡片底部 */
.lc-sidebar__panel-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: space-between;
}

.lc-sidebar__panel-body::-webkit-scrollbar {
  display: none;
}

.lc-nav__menu,
.lc-nav>ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lc-nav__menu>li,
.lc-nav>ul>li {
  margin: 0;
}

.lc-nav__link,
.lc-nav>ul>li>a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--lc-font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--lc-on-surface);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.lc-nav__link:focus-visible,
.lc-nav>ul>li>a:focus-visible {
  outline: 2px solid rgba(54, 80, 199, 0.35);
  outline-offset: 2px;
}

.lc-nav__menu>.current-menu-item>.lc-nav__link,
.lc-nav__menu>.current-menu-ancestor>.lc-nav__link,
.lc-nav>ul>li.current_page_item>a,
.lc-nav>ul>li.current_page_parent>a {
  color: #fff;
  background: linear-gradient(120deg,
      var(--lc-primary),
      var(--lc-primary-soft));
  box-shadow: 0 10px 30px rgba(54, 80, 199, 0.22);
}

.lc-nav__link:hover,
.lc-nav>ul>li>a:hover {
  background: rgba(82, 106, 226, 0.1);
}

.lc-sidebar__islands {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 0.5rem;
}

.lc-island {
  padding: 1rem 1.1rem;
  border-radius: var(--lc-radius-xl);
  background: var(--lc-island-bg);
  border: 1px solid var(--lc-border-divider);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: none;
}

.lc-island__label,
.lc-island .widget-title {
  font-family: var(--lc-font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lc-neutral);
  margin: 0 0 0.65rem;
}

.lc-island--widget {
  margin-bottom: 16px;
}

.lc-island--widget:last-child {
  margin-bottom: 0;
}

.lc-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--lc-font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(120deg,
      var(--lc-primary),
      var(--lc-primary-soft));
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.lc-cta:hover {
  transform: translateY(-1px);
}

.lc-island--theme {
  padding-bottom: 0.85rem;
}

.lc-color-scheme {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* 三档开关：轨道 + 滑块（thumb）在浅色 / 系统 / 深色 之间滑动 */
.lc-color-scheme__switch {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  padding: 5px;
  border-radius: 999px;
  background: var(--lc-color-switch-track);
  box-shadow: inset 0 0 0 1px var(--lc-input-border);
}

.lc-color-scheme__thumb {
  --lc-thumb-i: 1;
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 5px;
  width: calc((100% - 10px) / 3);
  height: calc(100% - 10px);
  border-radius: 999px;
  background: linear-gradient(145deg,
      var(--lc-primary-soft),
      var(--lc-primary));
  box-shadow: 0 2px 12px rgba(54, 80, 199, 0.38);
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.22, 0.85, 0.32, 1);
  transform: translateX(calc(var(--lc-thumb-i) * 100%));
}

.lc-color-scheme__seg {
  position: relative;
  z-index: 2;
  flex: 1 1 0;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--lc-neutral);
  background: transparent;
  line-height: 0;
  transition: color 0.18s ease;
}

.lc-color-scheme__seg svg {
  display: block;
  flex-shrink: 0;
}

.lc-color-scheme__seg:hover {
  color: var(--lc-on-surface);
}

.lc-color-scheme__seg[aria-checked="true"] {
  color: #fff;
}

.lc-color-scheme__seg:focus {
  outline: none;
}

.lc-color-scheme__seg:focus-visible {
  box-shadow: 0 0 0 2px var(--lc-focus-ring);
}

.lc-sidebar__foot {
  flex: 0 0 auto;
  margin: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--lc-border-divider);
  font-family: var(--lc-font-mono);
  font-size: 0.7rem;
  color: var(--lc-neutral);
}

/* --- Search (pill) --- */

.lc-island.lc-island--search {
  min-width: 0;
  width: 100%;
}

.lc-island--search {
  padding: 0 1px;
}

.lc-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--lc-input-border);
  background: var(--lc-glass-search);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--lc-inner-light);
  transition:
    box-shadow 0.2s ease,
    background 0.2s ease;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.lc-sidebar .lc-search {
  flex-wrap: nowrap;
}

.lc-sidebar .lc-search__input {
  font-size: 0.875rem;
}

.lc-sidebar .lc-search__submit {
  flex-shrink: 0;
}

.lc-search:focus-within {
  box-shadow:
    0 0 0 1px var(--lc-primary),
    var(--lc-inner-light);
  background: var(--lc-search-focus-bg);
}

.lc-search__input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--lc-font-body);
  font-size: 0.95rem;
  color: var(--lc-on-surface);
  min-width: 0;
}

.lc-search__input:focus {
  outline: none;
}

.lc-search__input::placeholder {
  color: var(--lc-placeholder);
}

.lc-search__submit {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg,
      var(--lc-primary),
      var(--lc-primary-soft));
  box-shadow: var(--lc-shadow);
}

.lc-search__submit:focus-visible {
  outline: 2px solid rgba(54, 80, 199, 0.45);
  outline-offset: 2px;
}

.lc-search-highlight {
  background: var(--lc-highlight-bg, #c01b05);
  color: var(--lc-highlight-color, #1a1a1a);
  border-radius: 2px;
  padding: 0 2px;
}

