@charset "utf-8";

:root {
  --bg: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  --panel: rgba(255, 255, 255, 0.82);
  --panel-hover: rgba(226, 232, 240, 0.88);
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(100, 116, 139, 0.3);
  --text-main: #334155;
  --text-sub: #64748b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  padding: 4px;
  color: var(--text-main);
  font: 13px/1.35 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(203, 213, 225, 0.55), transparent 30%),
    var(--bg);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: calc(100vh - 8px);
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

body::-webkit-scrollbar,
html::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

body::-webkit-scrollbar-track,
html::-webkit-scrollbar-track {
  background: transparent;
}

body::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
}

body::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
}

.action-link,
.nav-pill,
.menu-item {
  display: block;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.action-link:hover,
.nav-pill:hover,
.menu-item:hover {
  border-color: var(--line-strong);
  background: var(--panel-hover);
}

.action-link {
  margin-bottom: 4px;
  padding: 6px 8px;
  text-align: center;
}

.tag-grid,
.menu-list {
  display: grid;
  gap: 4px;
}

.tag-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nav-pill {
  padding: 6px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 7px 8px;
}

.menu-index {
  color: var(--text-sub);
  font-size: 11px;
  text-align: right;
}

.menu-label {
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.compact-nav,
body.compact-nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.compact-nav::-webkit-scrollbar,
body.compact-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

html.compact-nav {
  overflow-y: auto;
}

body.compact-nav {
  overflow: visible;
}

@media (max-width: 680px) {
  .tag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
