:root {
  --shell-border: rgba(148, 163, 184, 0.18);
  --shell-surface: rgba(12, 12, 15, 0.82);
  --shell-item-bg: rgba(255, 255, 255, 0.03);
  --shell-item-active-bg: rgba(56, 189, 248, 0.14);
  --shell-item-hover-bg: rgba(255, 255, 255, 0.06);
  --shell-item-text: rgba(226, 232, 240, 0.96);
  --shell-item-muted: rgba(148, 163, 184, 0.92);
}

.primary-shell {
  position: relative;
  z-index: 80;
  isolation: isolate;
  overflow: visible;
  margin: 0 0 20px;
}

.primary-shell-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 0;
  overflow: visible;
}

.primary-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0;
  background: transparent;
}

.primary-brand-mark {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}

.primary-tabs-links,
.primary-shell .tabs {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0;
  margin: 0;
  border: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.primary-tabs-links::-webkit-scrollbar,
.primary-shell .tabs::-webkit-scrollbar {
  display: none;
}

.primary-tab-link,
.primary-shell .tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 86px;
  min-height: 70px;
  padding: 10px 14px;
  color: var(--shell-item-muted);
  text-decoration: none;
  white-space: nowrap;
  border: none;
  border-radius: 20px;
  background: transparent;
  font: 600 12px/1.1 "Inter", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.primary-tab-link:hover,
.primary-tab-link:focus-visible,
.primary-shell .tab:hover,
.primary-shell .tab:focus-visible {
  color: var(--shell-item-text);
  background: var(--shell-item-hover-bg);
  outline: none;
}

.primary-tab-link.active,
.primary-shell .tab.active {
  color: var(--shell-item-text);
  background: var(--shell-item-active-bg);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.14);
}

.primary-more {
  position: relative;
  flex: 0 0 auto;
}

.primary-more-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 86px;
  min-height: 70px;
  padding: 10px 14px;
  border: none;
  border-radius: 20px;
  background: transparent;
  color: var(--shell-item-muted);
  font: 600 12px/1.1 "Inter", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  position: relative;
  transition: background 140ms ease, color 140ms ease;
}

.primary-more-toggle:hover,
.primary-more-toggle:focus-visible {
  color: var(--shell-item-text);
  background: var(--shell-item-hover-bg);
  outline: none;
}

.primary-more.open .primary-more-toggle {
  color: var(--shell-item-text);
  background: var(--shell-item-active-bg);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.14);
}

.primary-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(7, 10, 16, 0.98);
  box-shadow: var(--shadow);
  display: none;
  z-index: 999;
}

.primary-more.open .primary-more-menu {
  display: grid;
  gap: 2px;
}

.primary-more-item {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  text-decoration: none;
  text-align: left;
  font: 500 14px/1.25 "Inter", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
}

.primary-more-item:hover,
.primary-more-item:focus-visible,
.primary-more-item.active {
  background: rgba(56, 189, 248, 0.12);
  color: var(--text);
  outline: none;
}

.primary-nav-icon {
  width: 24px;
  height: 24px;
  display: block;
  color: currentColor;
  flex: 0 0 auto;
}

.primary-nav-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.primary-nav-label {
  display: block;
  font: inherit;
}

.shell-page {
  padding: 24px 16px 44px;
}

.shell-page .shell-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.shell-frame-card {
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.shell-frame-card iframe {
  display: block;
  width: 100%;
  min-height: 960px;
  border: none;
  background: transparent;
}

.shell-page-intro {
  padding: 22px 24px 12px;
}

.shell-page-intro h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.shell-page-intro p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 72ch;
}

.shell-closebar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0 0 14px;
}

.shell-closebtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.shell-closebtn:hover,
.shell-closebtn:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(148, 163, 184, 0.28);
  color: var(--text);
  outline: none;
}

.shell-closebtn svg {
  width: 18px;
  height: 18px;
  display: block;
}

@media (max-width: 900px) {
  .primary-shell-inner {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .shell-page {
    padding: 16px 12px 28px;
  }

  .primary-shell-inner {
    gap: 8px;
  }

  .primary-brand {
    width: 56px;
    height: 56px;
  }

  .primary-brand-mark {
    width: 48px;
    height: 48px;
  }

  .primary-tabs-links,
  .primary-shell .tabs {
    gap: 6px;
  }

  .primary-tab-link,
  .primary-shell .tab,
  .primary-more-toggle {
    min-width: 72px;
    min-height: 66px;
    padding: 10px 10px;
    gap: 5px;
    border-radius: 18px;
    font-size: 11px;
  }

  .primary-nav-icon {
    width: 22px;
    height: 22px;
  }

  .primary-more-menu {
    right: 0;
    min-width: min(220px, calc(100vw - 24px));
  }

  .shell-closebar {
    margin-bottom: 12px;
  }

  .shell-closebtn {
    width: 40px;
    height: 40px;
  }

  .shell-page-intro {
    padding: 18px 18px 10px;
  }

  .shell-page-intro h1 {
    font-size: 22px;
  }
}
