@font-face {
  font-family: "ChillDINGothicVF";
  src: url("/assets/fonts/ChillDINGothicVF.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg-color: #000000;
  --article-bg: #1c1c1e;
  --surface: rgba(28, 28, 30, 0.7);
  --surface-solid: #1c1c1e;
  --surface-muted: #0b0b0c;
  --surface-raised: #222226;
  --card-bg: #1c1c1e;
  --card-bg-hover: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.08);
  --text-heading: #f5f5f7;
  --text-body: #f5f5f7;
  --text-muted: #a1a1a6;
  --accent-color: #2997ff;
  --accent-soft: rgba(41, 151, 255, 0.18);
  --danger: #ff453a;
  --success: #30d158;
  --warning: #ffd60a;
  --shadow-soft: 0 30px 90px rgba(0, 0, 0, 0.46);
  --font-sans: "ChillDINGothicVF", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  --nav-height: 52px;
  --page-gutter: clamp(18px, 3vw, 44px);
  --container-max: 1440px;
  --article-max: 65ch;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --text-scale: 1;
  --density-scale: 0.86;
  --motion-duration: 0.84s;
  --motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-alpha: 0.7;
  --toolbar-alpha: 0.82;
  --status-alpha: 0.58;
  --nav-blur: 20px;
  --toolbar-blur: 20px;
  --panel-blur: 24px;
  --status-blur: 18px;
  --sheet-blur: 28px;
  --glass-saturate: 180%;
  --squircle-radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-variation-settings: "wght" 520, "wdth" 98;
  font-size: calc(17px * var(--text-scale));
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    var(--bg-color);
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

p,
h1,
h2,
h3,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--text-heading);
  font-weight: 600;
  font-stretch: 96%;
  font-variation-settings: "wght" 680, "wdth" 96;
  letter-spacing: 0;
  line-height: 1.04;
}

h1 {
  font-size: clamp(3.35rem, 7vw, 6.35rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 4.25rem);
}

h3 {
  font-size: 1.02rem;
  line-height: 1.18;
}

p {
  color: var(--text-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
}

.skip-link,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  width: auto;
  height: auto;
  clip: auto;
  border-radius: var(--radius-sm);
  background: var(--text-heading);
  color: var(--bg-color);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: calc(var(--nav-height) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background-color: rgba(28, 28, 30, var(--nav-alpha));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--nav-blur));
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--nav-blur));
}

.nav-shell {
  width: min(100%, 1024px);
  height: var(--nav-height);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "left center right";
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-heading);
  font-size: 0.86rem;
  font-weight: 600;
}

.brand-lockup img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
}

.nav-icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  line-height: 1;
  transition: transform 150ms ease, filter 180ms ease, opacity 180ms ease, background 180ms ease;
  transform-origin: center;
  will-change: transform, opacity;
}

.nav-icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon-button:hover,
.nav-icon-button:focus-visible {
  filter: brightness(1.08);
  background: rgba(255, 255, 255, 0.09);
}

.nav-icon-button:active {
  transform: scale(0.95);
}

.nav-icon-button.is-pressing {
  transform: scale(0.92);
}

.nav-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: scale(0.98);
}

.paste-icon-button {
  grid-area: left;
  justify-self: start;
  color: #ffffff;
  background: var(--accent-color);
  box-shadow: none;
}

.segmented-control {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  font-stretch: 95%;
  font-variation-settings: "wght" 620, "wdth" 95;
}

.nav-segmented {
  grid-area: center;
  justify-self: center;
  max-width: min(100%, 500px);
}

.nav-actions {
  grid-area: right;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-self: end;
  justify-content: flex-end;
  gap: 8px;
}

.nav-search {
  min-width: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-search input[type="search"] {
  width: 0;
  height: 38px;
  margin-right: 0;
  border-width: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    width 360ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    margin-right 360ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    padding 360ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 220ms ease,
    border-color 180ms ease;
}

.nav-search.open input[type="search"] {
  width: 200px;
  margin-right: 8px;
  border-width: 1px;
  padding: 0 13px;
  opacity: 1;
  pointer-events: auto;
}

.nav-search.open .search-toggle {
  background: rgba(255, 255, 255, 0.1);
}

.segmented-control {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.segmented-control::-webkit-scrollbar {
  display: none;
}

.segmented-pill {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 0;
  height: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  pointer-events: none;
  transform: translate3d(4px, 4px, 0);
  will-change: transform, width, height;
}

.segmented-control a {
  position: relative;
  z-index: 1;
  border-radius: 999px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease;
}

.segmented-control a:hover,
.segmented-control a:focus-visible,
.segmented-control a.active {
  color: var(--text-heading);
}

.segmented-control a:hover,
.segmented-control a:focus-visible {
  background: rgba(255, 255, 255, 0.035);
}

.ghost-button,
.primary-button,
.mini-button,
.danger-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.06);
  padding: 9px 13px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.ghost-button:hover,
.mini-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

.primary-button {
  border-color: rgba(41, 151, 255, 0.5);
  background: var(--accent-color);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--accent-color);
  opacity: 0.8;
}

.danger-button {
  color: #ffffff;
  border-color: rgba(255, 69, 58, 0.5);
  background: rgba(255, 69, 58, 0.18);
}

.danger-button:hover {
  background: rgba(255, 69, 58, 0.28);
}

.app-shell {
  width: min(100%, var(--container-max));
  margin: 0 auto;
  padding: calc(var(--nav-height) + 22px) var(--page-gutter) 96px;
}

.date-info-line {
  width: min(100%, 980px);
  min-height: 1.4em;
  margin: 0 auto 28px;
  border: 0;
  padding: 0;
  display: block;
  color: var(--text-muted);
  background: transparent;
  font-size: clamp(0.82rem, 1.05vw, 0.95rem);
  font-weight: 500;
  font-stretch: 96%;
  font-variation-settings: "wght" 540, "wdth" 96;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.date-info-line:hover,
.date-info-line:focus-visible,
.date-info-line.is-calendar-open {
  color: var(--text-heading);
}

.date-info-line:active {
  transform: scale(0.992);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.metric-card,
.lightbox-card,
.archive-card,
.probe-card,
.settings-sheet,
.section-heading,
.insight-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
}

.metric-card,
.lightbox-card {
  border: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

input[type="search"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.42);
  color: var(--text-heading);
  outline: none;
}

input::placeholder {
  color: var(--text-muted);
}

input[type="search"]:focus {
  border-color: rgba(41, 151, 255, 0.46);
  box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.14);
}

.metric-card small,
.section-heading p,
.item-meta,
.box-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.connection-status {
  position: fixed;
  top: calc(var(--nav-height) + env(safe-area-inset-top) + 12px);
  right: max(16px, var(--page-gutter));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(28, 28, 30, var(--status-alpha));
  color: var(--text-muted);
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--status-blur));
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--status-blur));
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.connection-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.connection-status.is-online {
  color: var(--success);
}

.connection-status.is-syncing {
  color: var(--apple-blue, var(--accent-color));
}

.connection-status.is-offline {
  color: var(--danger);
}

.metrics-grid {
  width: min(100%, 1220px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.metric-card {
  min-height: 132px;
  padding: max(22px, calc(28px * var(--density-scale)));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  font-stretch: 94%;
  font-variation-settings: "wght" 620, "wdth" 94;
}

.metric-card strong {
  color: var(--text-heading);
  font-size: clamp(1.8rem, 3.3vw, 3rem);
  font-weight: 600;
  font-stretch: 88%;
  font-variation-settings: "wght" 720, "wdth" 88;
  line-height: 1;
  letter-spacing: 0;
}

.network-card strong {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.network-card strong b {
  font-weight: 600;
}

.meter {
  display: block;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.meter b {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.96);
}

input[type="search"] {
  height: 48px;
  padding: 0 18px;
}

.view-panel {
  margin-top: 56px;
}

#activeView {
  position: relative;
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  padding: 0 0 28px;
  overflow: hidden;
  background: transparent;
}

#activeView .section-heading {
  display: none;
}

#activeView .section-heading h2 {
  font-size: clamp(2.25rem, 4.7vw, 4.15rem);
  line-height: 1.04;
}

#activeView::after {
  content: "";
  display: none;
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 2;
  width: 142px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.32);
  backdrop-filter: saturate(160%) blur(24px);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  transform: translateX(-50%);
  pointer-events: none;
}

#activeView::before {
  content: "";
  display: none;
  position: absolute;
  left: 50%;
  bottom: 39px;
  z-index: 3;
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(245, 245, 247, 0.92);
  box-shadow:
    44px 0 0 -1px rgba(245, 245, 247, 0.26),
    -44px 0 0 -1px rgba(245, 245, 247, 0.26);
  transform: translateX(-50%);
  pointer-events: none;
}

.section-heading {
  padding: 0 0 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.section-heading p:last-child {
  max-width: 38ch;
  text-align: right;
}

.probe-heading-main {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.probe-heading-side {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-left: 0;
  padding-top: 12px;
}

.probe-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.probe-shortcut {
  min-width: 148px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-heading);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.probe-shortcut:hover,
.probe-shortcut:focus-visible {
  background: rgba(41, 151, 255, 0.12);
  border-color: rgba(41, 151, 255, 0.38);
  transform: translateY(-1px);
}

.lightbox-grid {
  --highlight-card-width: min(1800px, calc(100vw - 32px));
  margin-top: 12px;
  display: flex; /* 变更为横向弹性盒 */
  flex-wrap: nowrap; /* 强制不换行，让所有卡片在一排 */
  overflow-x: auto; /* 开启横向滚动 */
  overflow-y: hidden;
  gap: clamp(22px, 3vw, 34px); /* 卡片之间的间距 */
  padding: 0 0 32px; /* 首尾居中距离交给每张卡片自身宽度计算 */
  scroll-padding-inline: 0;
  scroll-snap-type: x mandatory; /* 核心：强制开启横向滚动吸附 */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* 赋予移动端原生动量滚动 */
}

.lightbox-grid.calendar-mode {
  --calendar-line: rgba(245, 245, 247, 0.14);
  width: 100%;
  display: block;
  overflow: visible;
  padding: 0 max(18px, var(--page-gutter)) 42px;
}

/* 彻底隐藏画廊、卡片、列表的所有原生滚动条 */
.lightbox-grid::-webkit-scrollbar,
.lightbox-card::-webkit-scrollbar,
.item-list::-webkit-scrollbar {
  display: none;
}

.lightbox-grid,
.lightbox-card,
.item-list {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.probe-grid,
.traffic-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.archive-grid {
  margin-top: 4px;
  display: block;
}

.lightbox-card,
.archive-card,
.probe-card,
.insight-card {
  min-width: 0;
  padding: max(24px, calc(30px * var(--density-scale)));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.014)),
    rgba(28, 28, 30, 0.88);
  backdrop-filter: saturate(170%) blur(var(--panel-blur));
  -webkit-backdrop-filter: saturate(170%) blur(var(--panel-blur));
}

.archive-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) + 6px);
  clip-path: inset(0 round var(--squircle-radius));
  transform-origin: 50% 18%;
  will-change: transform, opacity;
}

.lightbox-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  border-radius: 34px;
  clip-path: inset(0 round 34px);
  transform-origin: 50% 18%;
  will-change: transform, opacity;
  display: flex;
  flex-direction: column;
  height: min(clamp(620px, 58vw, 760px), calc(100svh - 80px));
  min-height: 560px;
  padding: clamp(26px, 3.2vw, 42px);
  border: 0;
  background: rgba(30, 30, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 36px 90px rgba(0, 0, 0, 0.42);
  
  /* --- 核心宽度自适应与吸附逻辑 --- */
  flex: 0 0 auto; /* 禁止被 flex 轨道挤压变形 */
  width: min(var(--box-card-width, var(--highlight-card-width)), var(--highlight-card-width));
  min-width: min(var(--box-card-width, 520px), var(--highlight-card-width));
  max-width: var(--highlight-card-width);  /* 防止卡片比屏幕还宽，确保边缘能露出下一张卡片 */
  scroll-snap-align: center; /* 核心：滚动停止时，精准吸附到屏幕正中央 */
}

.lightbox-card:first-child {
  margin-left: max(24px, calc((100vw - min(var(--box-card-width, var(--highlight-card-width)), var(--highlight-card-width))) / 2));
}

.lightbox-card:last-child {
  margin-right: max(24px, calc((100vw - min(var(--box-card-width, var(--highlight-card-width)), var(--highlight-card-width))) / 2));
}

.lightbox-card.is-current {
  border-color: transparent;
  background: rgba(34, 34, 36, 0.88);
}

.lightbox-card .card-head,
.lightbox-header {
  align-items: flex-start;
  gap: clamp(14px, 2vw, 28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding-bottom: 16px;
}

.lightbox-header::after,
.lightbox-header::before,
.lightbox-card .card-head::after,
.lightbox-card .card-head::before {
  display: none !important;
}

.lightbox-card .box-title {
  font-size: clamp(1.12rem, 1.55vw, 1.42rem);
  font-weight: 700;
  font-variation-settings: "wght" 760, "wdth" 92;
  line-height: 1.08;
}

.lightbox-card .box-meta {
  margin-top: 6px;
  font-size: 0.78rem;
}

.lightbox-card > .meter {
  display: none;
}

.archive-card {
  grid-column: span 4;
}

.lightbox-card,
.item-card,
.archive-card,
.archive-row {
  will-change: transform, opacity;
}

.archive-group.archive-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  clip-path: none;
  overflow: visible;
  grid-column: auto;
}

.archive-group + .archive-group {
  margin-top: 0;
}

.archive-lazy-sentinel {
  width: 100%;
  min-height: 96px;
  pointer-events: none;
}

.archive-group {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: start;
  transform-origin: 50% 0;
}

.archive-date-header {
  position: sticky;
  top: var(--nav-height);
  z-index: 12;
  margin: 0;
  padding: 18px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--text-muted);
  background: var(--bg-color);
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.archive-date-header span {
  color: var(--text-heading);
}

.archive-date-header small {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.archive-list {
  min-width: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  border-radius: 0;
}

.archive-row {
  min-width: 0;
  padding: 17px 0;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  transform-origin: 50% 0;
  will-change: transform, opacity;
}

.archive-item-text {
  display: block;
  width: 100%;
  color: var(--text-heading);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.62;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

a.archive-item-text:hover,
a.archive-item-text:focus-visible {
  color: var(--accent-color);
}

.archive-link {
  display: inline-block;
  margin-top: 5px;
  color: var(--accent-color);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.probe-card {
  grid-column: span 4;
}

.probe-card h3 {
  margin-bottom: 10px;
}

.probe-card p {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.probe-card strong {
  display: block;
  margin-top: 18px;
  color: var(--text-heading);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
}

.probe-card.wide,
.insight-card.wide {
  grid-column: span 8;
}

.traffic-grid .probe-card {
  grid-column: span 6;
}

.traffic-inline-panel,
.traffic-split-panel,
.traffic-table-panel,
.traffic-mini-panel {
  min-width: 0;
  contain: layout paint;
  background: transparent;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.probe-inline-metric {
  min-width: 0;
  padding: 16px 18px 14px;
  border-right: 2px solid rgba(255, 255, 255, 0.12);
}

.probe-inline-metric:last-child {
  border-right: 0;
}

.probe-inline-metric span {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.probe-inline-metric strong {
  display: block;
  margin-top: 10px;
  color: var(--text-heading);
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  line-height: 1;
  font-weight: 650;
}

.probe-inline-metric p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.traffic-inline-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid rgba(255, 255, 255, 0.12);
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
}

.traffic-inline-metric {
  min-width: 0;
  padding: 16px 18px 14px;
  border-right: 2px solid rgba(255, 255, 255, 0.12);
}

.traffic-inline-metric:last-child {
  border-right: 0;
}

.traffic-inline-metric span {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.traffic-inline-metric strong {
  display: block;
  margin-top: 10px;
  color: var(--text-heading);
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  line-height: 1;
  font-weight: 650;
}

.traffic-inline-metric p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.64rem;
  line-height: 1.35;
  white-space: nowrap;
}

.traffic-inline-metric.primary strong {
  color: var(--accent-color);
}

.traffic-split-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 50%) minmax(220px, 1fr);
  gap: 34px;
  width: 100%;
  max-width: 1240px;
  align-items: stretch;
  padding: 18px 0 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
}

.traffic-split-main,
.traffic-split-side {
  min-width: 0;
}

.traffic-split-side {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  padding-left: 34px;
}

.traffic-panel-head,
.traffic-mini-panel {
  padding-bottom: 10px;
}

.traffic-panel-head h3,
.traffic-mini-panel h3,
.traffic-table-panel h3 {
  margin: 0;
  color: var(--text-heading);
  font-size: 0.95rem;
  font-weight: 700;
}

.traffic-panel-head p,
.traffic-mini-panel p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.traffic-mini-panel {
  padding-top: 0;
}

.traffic-mini-panel strong {
  display: block;
  margin-top: 12px;
  color: var(--text-heading);
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  line-height: 1;
}

.traffic-table-panel {
  grid-column: span 6;
  padding-top: 16px;
  border-top: 2px solid rgba(255, 255, 255, 0.12);
}

.traffic-table-panel table {
  margin-top: 12px;
}

.traffic-detail-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.traffic-kpi-card {
  grid-column: span 4;
  min-width: 0;
  padding: 12px 0 10px;
  border-top: 2px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.traffic-kpi-card span {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.traffic-kpi-card strong {
  display: block;
  margin-top: 10px;
  color: var(--text-heading);
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  line-height: 1;
}

.traffic-kpi-card.primary strong {
  color: var(--accent-color);
}

.traffic-bars {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(var(--traffic-days, 31), minmax(0, 1fr));
  align-items: end;
  gap: clamp(1px, 0.18vw, 3px);
  min-height: 128px;
}

.traffic-bar {
  min-width: 0;
  min-height: 124px;
  height: 134px;
  display: grid;
  grid-template-rows: minmax(70px, 1fr) auto auto;
  align-items: end;
  gap: 5px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  text-align: center;
  cursor: default;
}

.traffic-bar-track {
  display: block;
  position: relative;
  width: 17px;
  max-width: 100%;
  height: 100%;
  min-height: 70px;
  margin: 0 auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.traffic-bar-fill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  height: var(--bar-height, 10%);
  min-height: 10px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.64);
  transition: background-color 140ms ease;
}

.traffic-bar-day {
  color: var(--text-muted);
  font-size: 0.6rem;
  font-weight: 600;
  transition: color 140ms ease;
}

.traffic-bar b {
  color: var(--text-muted);
  font-size: 0.48rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 140ms ease, font-size 140ms ease;
}

.traffic-bars.compact .traffic-bar {
  gap: 5px;
}

.traffic-bar:hover .traffic-bar-fill,
.traffic-bar:focus-within .traffic-bar-fill {
  background: rgba(255, 255, 255, 1);
}

.traffic-bar:hover .traffic-bar-day,
.traffic-bar:hover b,
.traffic-bar:focus-within .traffic-bar-day,
.traffic-bar:focus-within b {
  color: var(--text-heading);
}

.traffic-bar:hover b,
.traffic-bar:focus-within b {
  font-size: 0.62rem;
}

.traffic-grid .stat-table,
.traffic-grid .connection-table {
  border-top: 2px solid rgba(255, 255, 255, 0.12);
}

.card-head,
.item-head,
.archive-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.box-title,
.archive-title {
  color: var(--text-heading);
  font-size: 1.08rem;
  font-weight: 700;
  font-variation-settings: "wght" 760, "wdth" 92;
}

.box-actions,
.item-actions,
.archive-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lightbox-card .box-actions,
.lightbox-card .item-actions {
  flex-wrap: nowrap;
}

.lightbox-card .item-actions {
  flex-shrink: 0;
  padding-right: 3px;
  opacity: 1;
  transform: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.lightbox-card .item-card:hover .item-actions,
.lightbox-card .item-card:focus-within .item-actions {
  opacity: 1;
  transform: translateX(0);
}

.mini-button {
  padding: 8px 11px;
  font-size: 0.75rem;
}

.lightbox-card .mini-button {
  border-radius: 999px;
  padding: 7px 11px;
  color: rgba(245, 245, 247, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.lightbox-card .copy-parse-button {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-card .danger-button {
  min-width: 52px;
  color: #ffd8d4;
  border-color: rgba(255, 69, 58, 0.52);
  background: rgba(255, 69, 58, 0.24);
}

.lightbox-card .danger-button:hover,
.lightbox-card .danger-button:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 69, 58, 0.72);
  background: rgba(255, 69, 58, 0.38);
}

.item-list {
  flex: 1;
  min-height: 0;
  margin-top: clamp(16px, 2vw, 26px);
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr)); /* 严格限制最多只能有 5 行 */
  grid-auto-flow: column;              /* 排满 5 行后，自动向右生成新列 */
  grid-auto-columns: minmax(340px, 360px); /* 动态生成的新列的宽度 */
  column-gap: 40px;                    /* 内部列与列之间的间隙 */
  row-gap: 0;
  overflow: hidden;
}

.lightbox-card[data-column-count="1"] .item-list {
  grid-auto-columns: minmax(320px, 1fr);
  justify-content: stretch;
}

.item-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* 极简线性分割 */
  background: transparent;
}

.item-motion-ghost {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(30, 30, 32, 0.92);
  box-shadow: none;
}

.item-motion-ghost .item-head {
  align-items: flex-start;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 0;
}

.item-motion-ghost .item-meta {
  margin-top: 4px;
  font-size: 0.66rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-motion-ghost .mini-button {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.lightbox-card .item-head {
  align-items: flex-start;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 0;
}

.lightbox-card .item-head > div:first-child {
  min-width: 0;
}

.lightbox-card .item-meta {
  margin-top: 4px;
  font-size: 0.66rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card:nth-child(5n) {
  border-bottom: none; 
}

.item-card:last-child {
  border-bottom: 0;
}

.item-text {
  flex: 0 0 auto;
  margin-top: 5px;
  color: var(--text-body);
  font-size: clamp(0.78rem, 0.82vw, 0.86rem);
  font-weight: 700;
  font-variation-settings: "wght" 700, "wdth" 96;
  line-height: 1.28;
  white-space: nowrap;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-link {
  flex: 0 0 auto;
  display: block;
  max-width: 100%;
  margin-top: 3px;
  color: var(--accent-color);
  cursor: pointer;
  font-size: 0.68rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.66rem;
  font-weight: 600;
}

.platform-pill img {
  width: 16px;
  height: 16px;
  border-radius: 5px;
}

.calendar-shell {
  width: min(900px, calc(100vw - 2 * var(--page-gutter)));
  margin: 0 auto;
  color: var(--text-heading);
  user-select: none;
  touch-action: pan-y;
}

.calendar-head {
  margin-bottom: clamp(12px, 1.6vw, 20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.calendar-head h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.55rem);
  font-weight: 700;
  font-stretch: 88%;
  font-variation-settings: "wght" 760, "wdth" 88;
  line-height: 0.98;
}

.calendar-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calendar-control {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 245, 247, 0.78);
  background: transparent;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.calendar-control svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-control:hover,
.calendar-control:focus-visible {
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.07);
}

.calendar-control:active {
  transform: scale(0.94);
}

.calendar-weekdays,
.calendar-cells {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-cells {
  grid-template-rows: repeat(6, clamp(84px, 7.8vw, 116px));
}

.calendar-weekdays span {
  min-height: 28px;
  padding-bottom: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: rgba(245, 245, 247, 0.94);
  font-size: clamp(0.72rem, 0.92vw, 0.9rem);
  font-weight: 700;
  font-stretch: 90%;
  font-variation-settings: "wght" 660, "wdth" 90;
  line-height: 1;
}

.calendar-weekdays span + span,
.calendar-cell:not(:nth-child(7n + 1)) {
  border-left: 1px solid var(--calendar-line);
}

.calendar-cell {
  min-height: 0;
  height: clamp(84px, 7.8vw, 116px);
  border-top: 1px solid var(--calendar-line);
  position: relative;
  display: flex;
}

.calendar-cell::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 12px;
  background: rgba(245, 245, 247, 0);
  pointer-events: none;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.calendar-cell:hover::before,
.calendar-cell:focus-within::before {
  background: rgba(245, 245, 247, 0.045);
  box-shadow: inset 0 0 0 1px rgba(245, 245, 247, 0.04);
}

.calendar-day {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  padding: clamp(10px, 1.1vw, 16px) clamp(8px, 1vw, 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 0.7vw, 10px);
  color: rgba(245, 245, 247, 0.96);
  background: transparent;
  letter-spacing: 0;
  overflow: hidden;
  text-align: center;
  word-break: keep-all;
  transition: color 180ms ease, opacity 180ms ease, transform 220ms var(--motion-ease);
}

.calendar-day:hover,
.calendar-day:focus-visible {
  transform: translateY(-1px);
}

.calendar-day.is-today {
  color: var(--danger);
  background: transparent;
}

.calendar-day.is-outside-month {
  color: rgba(245, 245, 247, 0);
  opacity: 0;
  background: transparent;
}

.calendar-day.is-outside-month:hover,
.calendar-day.is-outside-month:focus-visible {
  color: rgba(245, 245, 247, 0.55);
  opacity: 1;
}

.calendar-day.has-items {
  box-shadow: none;
}

.calendar-day-number {
  position: static;
  display: block;
  color: currentColor;
  font-size: clamp(2.15rem, 3.5vw, 3.62rem);
  font-weight: 800;
  font-stretch: 74%;
  font-variation-settings: "wght" 800, "wdth" 74;
  line-height: 0.86;
  pointer-events: none;
  text-rendering: geometricPrecision;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.calendar-item-count {
  position: static;
  display: block;
  color: rgba(245, 245, 247, 0.46);
  opacity: 0.58;
  font-size: clamp(0.78rem, 0.96vw, 1rem);
  font-weight: 620;
  font-stretch: 86%;
  font-variation-settings: "wght" 620, "wdth" 86;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.calendar-day.has-items .calendar-item-count {
  opacity: 0.72;
}

.calendar-day.is-outside-month .calendar-item-count {
  color: rgba(245, 245, 247, 0);
  opacity: 0;
}

.calendar-day.is-outside-month:hover .calendar-item-count,
.calendar-day.is-outside-month:focus-visible .calendar-item-count {
  color: rgba(245, 245, 247, 0.32);
  opacity: 0.48;
}

.day-grid {
  margin-top: 12px;
}

.date-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: clamp(26px, 3vw, 42px);
  align-items: start;
}

.date-split-panel {
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  contain: layout paint;
}

.date-column-head {
  padding: 0 0 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
}

.date-column-head h3 {
  margin-bottom: 6px;
}

.date-column-head p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.date-entry-list {
  border-top: 0;
}

.date-entry-list .archive-row {
  padding: 18px 0;
}

.date-empty-line {
  padding: 22px 0;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
}

.date-traffic-inline {
  margin-top: 12px;
}

.date-traffic-table {
  margin-top: 16px;
}

.day-group .archive-date-header {
  top: calc(var(--nav-height) + 1px);
}

.empty-state {
  flex: 0 0 min(620px, 82vw);
  width: min(620px, 82vw);
  min-height: min(420px, calc(100svh - 180px));
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 34px;
  padding: clamp(34px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--text-muted);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(30, 30, 32, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 34px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.empty-state-mark {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 46px rgba(0, 0, 0, 0.34);
}

.empty-state-mark img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.empty-state-title {
  color: rgba(245, 245, 247, 0.86);
  font-size: clamp(1.15rem, 1.8vw, 1.6rem);
  font-weight: 600;
  line-height: 1.2;
}

.stat-table,
.connection-table {
  width: 100%;
  border-collapse: collapse;
}

.stat-table th,
.stat-table td,
.connection-table th,
.connection-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  padding: 12px 8px;
  color: var(--text-body);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  vertical-align: top;
}

.stat-table th,
.connection-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.stat-table tr:last-child td,
.connection-table tr:last-child td {
  border-bottom: 0;
}

.settings-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
}

.settings-panel.open {
  pointer-events: auto;
  opacity: 1;
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(calc(var(--sheet-blur) - 10px));
  -webkit-backdrop-filter: blur(calc(var(--sheet-blur) - 10px));
}

.settings-sheet {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  top: calc(var(--nav-height) + 22px + env(safe-area-inset-top));
  width: min(420px, calc(100vw - 36px));
  padding: 28px;
  background: rgba(28, 28, 30, 0.92);
  backdrop-filter: blur(var(--sheet-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--sheet-blur)) saturate(160%);
}

.range-row,
.switch-row {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  color: var(--text-heading);
  font-weight: 600;
}

.range-row input {
  grid-column: 1 / -1;
  width: 100%;
}

.range-row output {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.settings-actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 100;
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(28, 28, 30, 0.88);
  color: var(--text-heading);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  font-size: 0.85rem;
  font-weight: 600;
}

[data-reveal],
.motion-card {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.no-gsap [data-reveal],
.reduce-motion [data-reveal],
.no-gsap .motion-card,
.reduce-motion .motion-card {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* --- 实时流量专属高级排版 --- */
.traffic-dual-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.traffic-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.traffic-stat strong {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem); /* 字号微调，确保极简精致 */
  white-space: nowrap; /* 绝对禁止数字和单位被腰斩换行 */
}

.traffic-stat small {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Vault page */
.vault-workspace {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.ledger-workspace {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.ledger-toolbar-card,
.ledger-dashboard-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(28, 28, 30, 0.74);
  box-shadow: var(--shadow-soft);
}

.ledger-toolbar-card {
  position: sticky;
  top: calc(var(--nav-height) + env(safe-area-inset-top) + 14px);
  z-index: 9;
  padding: 14px;
  margin-bottom: 18px;
  backdrop-filter: saturate(var(--glass-saturate)) blur(22px);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(22px);
}

.ledger-toolbar-main,
.ledger-panel-head,
.ledger-toolbar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ledger-toolbar-main h3,
.ledger-panel-head h3 {
  margin: 0;
  color: var(--text-heading);
  font-size: 1.04rem;
  letter-spacing: 0;
}

.ledger-toolbar-meta,
.ledger-panel-head p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 560;
}

.ledger-month-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 12px;
  scrollbar-width: none;
}

.ledger-month-row::-webkit-scrollbar {
  display: none;
}

.ledger-month-chip {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.ledger-month-chip.active {
  border-color: rgba(250, 255, 105, 0.78);
  background: #faff69;
  color: #101010;
}

.ledger-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.ledger-kpi-card {
  min-height: 118px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ledger-kpi-card span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.ledger-kpi-card strong {
  color: var(--text-heading);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}

.ledger-kpi-card.is-offset strong {
  color: #5af0b3;
}

.ledger-member-panel,
.ledger-record-panel {
  padding: 18px;
  margin-bottom: 18px;
}

.ledger-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ledger-member-card {
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.ledger-member-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-heading);
  font-weight: 850;
}

.ledger-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ledger-member-card h4,
.ledger-record-row h4 {
  margin: 0;
  color: var(--text-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
}

.ledger-member-card p,
.ledger-record-row p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.45;
}

.ledger-member-card.is-positive p {
  color: #5af0b3;
}

.ledger-member-card.is-negative p {
  color: #ff8fab;
}

.ledger-person-section {
  margin-bottom: 18px;
}

.ledger-person-rail {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  padding: 2px 2px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  scrollbar-width: none;
}

.ledger-person-rail::-webkit-scrollbar {
  display: none;
}

.ledger-person-card {
  width: min(420px, 86vw);
  min-width: min(420px, 86vw);
  min-height: 430px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}

.ledger-person-card.is-positive {
  border-color: rgba(90, 240, 179, 0.3);
}

.ledger-person-card.is-negative {
  border-color: rgba(255, 143, 171, 0.3);
}

.ledger-person-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ledger-person-head h4 {
  margin: 0;
  color: var(--text-heading);
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0;
}

.ledger-person-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 720;
}

.ledger-person-card.is-positive .ledger-person-head p {
  color: #5af0b3;
}

.ledger-person-card.is-negative .ledger-person-head p {
  color: #ff8fab;
}

.ledger-person-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.ledger-person-stats div {
  min-width: 0;
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.24);
}

.ledger-person-stats span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.ledger-person-stats strong {
  color: var(--text-heading);
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}

.ledger-person-list {
  min-height: 0;
  max-height: 250px;
  margin-top: 14px;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
}

.ledger-person-row {
  min-width: 0;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: rgba(0, 0, 0, 0.22);
}

.ledger-person-row b {
  display: block;
  overflow: hidden;
  color: var(--text-heading);
  font-size: 0.82rem;
  font-weight: 820;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ledger-person-row span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ledger-person-row strong {
  color: var(--text-heading);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}

.ledger-record-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ledger-record-row {
  min-width: 0;
  min-height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  background: rgba(0, 0, 0, 0.28);
}

.ledger-record-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ledger-record-type {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(250, 255, 105, 0.14);
  color: #faff69;
  font-size: 0.78rem;
  font-weight: 850;
}

.ledger-record-row.is-repay .ledger-record-type {
  background: rgba(90, 240, 179, 0.13);
  color: #5af0b3;
}

.ledger-record-row.is-lend .ledger-record-type {
  background: rgba(116, 185, 255, 0.13);
  color: #74b9ff;
}

.ledger-record-amount {
  text-align: right;
  white-space: nowrap;
}

.ledger-record-amount strong {
  display: block;
  color: var(--text-heading);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0;
}

.ledger-record-amount span {
  display: block;
  margin-top: 4px;
  color: #5af0b3;
  font-size: 0.74rem;
  font-weight: 760;
}

.ledger-empty-line {
  min-height: 76px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.vault-toolbar-card,
.vault-auth-panel,
.vault-empty-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(28, 28, 30, 0.74);
  box-shadow: var(--shadow-soft);
}

.vault-toolbar-card {
  position: sticky;
  top: calc(var(--nav-height) + env(safe-area-inset-top) + 14px);
  z-index: 9;
  padding: 14px;
  margin-bottom: 18px;
  backdrop-filter: saturate(var(--glass-saturate)) blur(22px);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(22px);
}

.vault-search-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.vault-search-field {
  min-width: 0;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.5);
}

.vault-search-field span {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 800;
}

.vault-search-field input[type="search"] {
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 660;
}

.vault-add-button,
.vault-sync-button,
.vault-add-row-button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 20px;
  color: #101010;
  background: #faff69;
  font-size: 0.92rem;
  font-weight: 850;
  transition: transform 160ms ease, filter 180ms ease, opacity 180ms ease;
}

.vault-sync-button {
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.08);
}

.vault-category-create {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.vault-category-create-lightbox {
  margin: 8px 0 4px;
}

.vault-category-input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0 13px;
  color: var(--text-heading);
  background: rgba(0, 0, 0, 0.34);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 720;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.vault-category-input::placeholder {
  color: var(--text-muted);
}

.vault-category-input:focus {
  border-color: rgba(250, 255, 105, 0.48);
  background: rgba(250, 255, 105, 0.07);
  box-shadow: 0 0 0 3px rgba(250, 255, 105, 0.08);
}

.vault-category-button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 15px;
  color: #101010;
  background: #faff69;
  font-size: 0.84rem;
  font-weight: 860;
  white-space: nowrap;
  transition: transform 160ms ease, filter 180ms ease;
}

.vault-add-button:hover,
.vault-sync-button:hover,
.vault-add-row-button:hover,
.vault-category-button:hover {
  filter: brightness(1.05);
}

.vault-add-button:active,
.vault-sync-button:active,
.vault-add-row-button:active,
.vault-category-button:active,
.vault-login-button:active,
.vault-user-pill button:active {
  transform: scale(0.97);
}

.vault-toolbar-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.vault-user-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.vault-user-pill button {
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  color: #101010;
  background: #faff69;
  font-size: 0.72rem;
  font-weight: 850;
  transition: transform 160ms ease, filter 180ms ease;
}

.vault-filter-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 6px;
}

.vault-filter-chip {
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(255, 122, 89, 0.28);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--text-muted);
  background: rgba(55, 24, 24, 0.72);
  font-size: 0.82rem;
  font-weight: 820;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.vault-filter-chip.active {
  color: #faff69;
  border-color: #faff69;
  box-shadow: 0 0 0 1px rgba(250, 255, 105, 0.58);
}

.vault-filter-chip:active {
  transform: scale(0.97);
}

.vault-list-shell {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
}

.vault-card {
  position: relative;
  min-height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--vault-accent-soft), transparent 46%),
    var(--card-bg);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  animation: vaultCardIn 360ms cubic-bezier(0.2, 0, 0, 1) both;
  animation-delay: var(--vault-delay);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.vault-card:hover,
.vault-card:focus-within {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--vault-accent) 55%, rgba(255, 255, 255, 0.1));
}

.vault-card-mark,
.vault-lightbox-mark {
  width: 54px;
  height: 54px;
  border: 2px solid var(--vault-accent);
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-heading);
  background: var(--vault-accent-soft);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.vault-card-copy {
  min-width: 0;
}

.vault-card-title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.vault-card-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--vault-accent);
}

.vault-card h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text-heading);
  font-size: clamp(1.05rem, 1.4vw, 1.34rem);
  font-weight: 900;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-card-meta {
  position: relative;
  max-width: 100%;
  margin-top: 7px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 680;
  white-space: nowrap;
}

.vault-card-meta-track {
  display: inline-flex;
  gap: 38px;
  min-width: 100%;
}

.vault-card-meta.is-marquee .vault-card-meta-track {
  animation: vaultMarquee var(--vault-marquee-duration) linear infinite;
}

.view-panel.hidden .vault-card-meta-track,
body.vault-lightbox-open .vault-card-meta-track {
  animation-play-state: paused;
}

.vault-card-type {
  align-self: start;
  border: 1px solid color-mix(in srgb, var(--vault-accent) 42%, transparent);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--vault-accent);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.72rem;
  font-weight: 820;
  white-space: nowrap;
}

@keyframes vaultCardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes vaultMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 19px));
  }
}

.vault-auth-panel,
.vault-empty-panel {
  padding: 28px;
}

.vault-auth-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(280px, 400px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  justify-content: space-between;
}

.vault-auth-panel h3,
.vault-empty-panel h3 {
  margin: 0 0 10px;
  color: var(--text-heading);
  font-size: clamp(1.28rem, 2vw, 1.9rem);
  line-height: 1.12;
}

.vault-auth-panel p,
.vault-empty-panel p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.vault-auth-error {
  margin-top: 10px !important;
  color: #ff8f7d !important;
  font-weight: 760;
}

.vault-login-actions {
  display: grid;
  width: min(100%, 400px);
  justify-self: end;
  align-self: center;
  align-content: center;
  gap: 12px;
}

.vault-google-button-shell {
  position: relative;
  min-height: 46px;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
}

.vault-google-proxy {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 0 16px 0 14px;
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 160ms ease, border-color 180ms ease, background 180ms ease;
}

.vault-google-copy {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 850;
  white-space: nowrap;
}

.vault-google-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #4285f4;
  background: #fff;
  font-weight: 900;
  font-family: Arial, sans-serif;
}

.vault-google-next {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.vault-google-slot {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 46px;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0.001;
}

.vault-google-slot iframe {
  width: calc(100% + 32px) !important;
  min-width: calc(100% + 32px) !important;
  height: 54px !important;
  margin: -4px 0 0 -16px;
  display: block;
  border: 0 !important;
}

.vault-google-button-shell:hover .vault-google-proxy,
.vault-google-button-shell:focus-within .vault-google-proxy {
  border-color: rgba(250, 255, 105, 0.42);
  background: rgba(250, 255, 105, 0.1);
}

.vault-google-button-shell:active .vault-google-proxy {
  transform: scale(0.99);
}

.vault-google-button-shell.is-fallback {
  overflow: visible;
}

.vault-google-button-shell.is-fallback .vault-google-proxy {
  display: none;
}

.vault-google-button-shell.is-fallback .vault-google-slot {
  position: static;
  opacity: 1;
}

.vault-password-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.vault-password-input {
  min-width: 0;
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.055);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.vault-password-input::placeholder {
  color: var(--text-muted);
}

.vault-password-input:focus {
  border-color: rgba(250, 255, 105, 0.42);
  background: rgba(250, 255, 105, 0.08);
  box-shadow: 0 0 0 3px rgba(250, 255, 105, 0.08);
}

.vault-password-button {
  width: auto;
  min-width: 108px;
  flex: 0 0 auto;
}

.vault-login-button {
  min-height: 46px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text-heading);
  background: rgba(0, 0, 0, 0.38);
  font-size: 0.9rem;
  font-weight: 850;
  transition: transform 160ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.vault-login-button:not(.is-disabled):hover {
  border-color: rgba(250, 255, 105, 0.42);
  background: rgba(250, 255, 105, 0.12);
}

.vault-login-button.is-disabled,
.vault-login-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

body.vault-lightbox-open .app-shell,
body.vault-lightbox-open .nav-bar,
body.vault-lightbox-open .connection-status {
  filter: blur(9px);
  transition: filter 180ms ease;
  pointer-events: none;
}

.vault-lightbox-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 44px);
  animation: vaultLayerIn 200ms ease both;
}

.vault-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.vault-lightbox-panel {
  position: relative;
  width: min(100%, 780px);
  max-height: min(760px, calc(100svh - 46px));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(135deg, var(--vault-accent-soft), transparent 42%),
    #171718;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  overflow: hidden;
  animation: vaultPanelIn 240ms cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes vaultLayerIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes vaultPanelIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.vault-lightbox-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 48px;
  gap: 15px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vault-lightbox-mark {
  position: relative;
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
}

.vault-lightbox-mark b {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #101010;
  background: #faff69;
  font-size: 0.62rem;
  font-weight: 900;
}

.vault-lightbox-mark.is-editing {
  border-color: #5af0b3;
  background: rgba(90, 240, 179, 0.16);
}

.vault-lightbox-mark-input {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  color: var(--text-heading);
  background: transparent;
  font: inherit;
  text-align: center;
}

.vault-lightbox-title-block {
  min-width: 0;
}

.vault-lightbox-title-block h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text-heading);
  font-size: clamp(1.28rem, 2vw, 1.9rem);
  font-weight: 900;
  line-height: 1.12;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vault-lightbox-title-block p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.vault-lightbox-close {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.9rem;
  line-height: 1;
}

.vault-lightbox-categories {
  padding: 16px 0 4px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 7px;
}

.vault-lightbox-categories button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.28);
  font-weight: 800;
}

.vault-lightbox-categories button.active {
  color: #101010;
  border-color: #faff69;
  background: #faff69;
}

.vault-lightbox-row-list {
  min-height: 0;
  padding: 10px 2px 2px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: auto;
}

.vault-lightbox-empty-row {
  grid-column: 1 / -1;
  min-height: 86px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.9rem;
  font-weight: 760;
}

.vault-lightbox-row {
  min-height: 94px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #202125;
  animation: vaultRowIn 220ms cubic-bezier(0.2, 0, 0, 1) both;
  animation-delay: var(--vault-row-delay);
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.vault-lightbox-row.is-editing {
  border-color: rgba(250, 255, 105, 0.56);
}

.vault-lightbox-row.is-removing {
  opacity: 0;
  transform: translateX(18px) scale(0.96);
}

@keyframes vaultRowIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.vault-lightbox-row-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vault-lightbox-row-label,
.vault-row-label-input {
  min-width: 0;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 780;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vault-lightbox-row-label.is-empty {
  color: rgba(245, 245, 247, 0.42);
}

.vault-row-label-input,
.vault-row-input {
  border: 0;
  padding: 0;
  background: transparent;
  font-family: var(--font-sans);
}

.vault-row-delete {
  min-height: 26px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  color: #ff9a86;
  background: rgba(255, 122, 89, 0.16);
  font-size: 0.72rem;
  font-weight: 850;
}

.vault-lightbox-row-body {
  min-height: 34px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.vault-lightbox-row-value,
.vault-row-input {
  width: 100%;
  color: var(--text-heading);
  font-size: clamp(1rem, 1.24vw, 1.22rem);
  font-weight: 850;
  line-height: 1.35;
  word-break: break-word;
}

.vault-lightbox-row-value.is-empty {
  color: rgba(245, 245, 247, 0.42);
}

.vault-lightbox-row-value.is-secret {
  letter-spacing: 0.02em;
}

textarea.vault-row-input {
  min-height: 74px;
  resize: vertical;
}

.vault-lightbox-actions {
  padding-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 12px;
}

@media (max-width: 1120px) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lightbox-card,
  .archive-card,
  .probe-card,
  .traffic-kpi-card,
  .traffic-grid .probe-card,
  .traffic-table-panel,
  .probe-card.wide,
  .insight-card.wide {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 16px;
    --nav-height: 96px;
  }

  .app-shell {
    padding-top: calc(var(--nav-height) + 22px);
  }

  .date-info-line {
    margin-bottom: 22px;
    white-space: normal;
  }

  .nav-shell {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "left spacer right"
      "center center center";
    align-content: center;
    gap: 8px 10px;
  }

  .paste-icon-button {
    width: 36px;
    height: 36px;
  }

  .nav-segmented {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .nav-segmented::-webkit-scrollbar {
    display: none;
  }

  .nav-actions {
    min-width: 0;
    max-width: 100%;
  }

  .nav-search.open input[type="search"] {
    width: min(168px, max(92px, calc(100vw - 178px)));
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .lightbox-grid {
    --highlight-card-width: 85vw;
    padding: 0 max(16px, calc((100vw - var(--highlight-card-width)) / 2)) 24px;
    scroll-padding-inline: max(16px, calc((100vw - var(--highlight-card-width)) / 2));
    gap: 16px;
  }

  .lightbox-grid.calendar-mode {
    padding: 0 16px 34px;
  }

  .calendar-head {
    align-items: flex-start;
  }

  .calendar-weekdays span {
    min-height: 30px;
    padding-bottom: 9px;
    font-size: 0.78rem;
  }

  .calendar-cells {
    grid-template-rows: repeat(6, clamp(58px, 14vw, 78px));
  }

  .calendar-cell {
    height: clamp(58px, 14vw, 78px);
  }

  .calendar-day {
    width: 100%;
    min-height: 100%;
    padding: 8px 4px;
    gap: 5px;
  }

  .calendar-day-number {
    font-size: clamp(1.58rem, 7vw, 2.38rem);
  }

  .calendar-item-count {
    font-size: clamp(0.68rem, 3vw, 0.88rem);
  }

  .lightbox-card {
    width: var(--highlight-card-width);
    max-width: 85vw; /* 移动端卡片宽度略小于屏幕，露出下一张卡片边缘 */
    height: min(640px, calc(100svh - 112px));
    min-height: 560px;
    padding: 24px;
  }

  .lightbox-card:first-child {
    margin-left: 0;
  }

  .lightbox-card:last-child {
    margin-right: 0;
  }

  .item-list {
    grid-auto-columns: minmax(240px, 1fr); /* 移动端内部列宽变窄 */
  }

  .segmented-control {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .metric-card,
  .lightbox-card,
  .archive-card,
  .probe-card,
  .traffic-kpi-card,
  .traffic-grid .probe-card,
  .traffic-table-panel,
  .probe-card.wide,
  .insight-card.wide {
    grid-column: 1 / -1;
  }

  .traffic-inline-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .traffic-inline-metric:nth-child(2n) {
    border-right: 0;
  }

  .traffic-inline-metric:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .traffic-detail-grid {
    grid-template-columns: 1fr;
  }

  .traffic-detail-grid .traffic-kpi-card {
    grid-column: 1 / -1;
  }

  .traffic-split-panel {
    grid-template-columns: minmax(0, 50%) minmax(0, 50%);
    width: 100%;
    gap: 0;
  }

  .traffic-split-side {
    border-left: 2px solid rgba(255, 255, 255, 0.12);
    padding-left: 28px;
  }

  .traffic-bars {
    grid-template-columns: repeat(var(--traffic-days, 31), minmax(0, 1fr));
    gap: clamp(1px, 0.18vw, 3px);
    min-height: 118px;
  }

  .traffic-bar {
    min-height: 114px;
    height: 122px;
    grid-template-rows: minmax(62px, 1fr) auto auto;
    gap: 4px;
  }

  .traffic-bar-track {
    min-height: 62px;
  }

  .traffic-bar-day {
    font-size: 0.58rem;
  }

  .traffic-bar b {
    font-size: 0.46rem;
  }

  .traffic-bar:hover b,
  .traffic-bar:focus-within b {
    font-size: 0.58rem;
  }

  .date-dashboard {
    grid-template-columns: 1fr;
  }

  .archive-group {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .archive-date-header {
    top: var(--nav-height);
    padding: 14px 0 10px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .vault-toolbar-card {
    top: calc(var(--nav-height) + env(safe-area-inset-top) + 10px);
    padding: 12px;
    border-radius: 18px;
  }

  .vault-search-line {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .vault-sync-button {
    display: none;
  }

  .vault-add-button {
    min-width: 68px;
    padding: 0 14px;
  }

  .vault-toolbar-meta {
    font-size: 0.74rem;
    flex-wrap: wrap;
    gap: 8px;
  }

  .vault-category-create {
    grid-template-columns: 1fr;
  }

  .vault-category-button {
    width: 100%;
  }

  .vault-user-pill {
    width: 100%;
    justify-content: space-between;
  }

  .vault-filter-row {
    gap: 5px;
  }

  .vault-filter-chip {
    min-height: 32px;
    padding: 0 4px;
    font-size: clamp(0.68rem, 3vw, 0.8rem);
  }

  .vault-list-shell {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .vault-card {
    min-height: 96px;
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 14px;
    gap: 13px;
  }

  .vault-card-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 1.18rem;
  }

  .vault-card-type {
    display: none;
  }

  .vault-auth-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 22px;
    padding: 22px;
  }

  .vault-login-actions {
    width: 100%;
    justify-self: stretch;
  }

  .vault-google-proxy,
  .vault-login-button,
  .vault-password-input {
    min-height: 48px;
  }

  .vault-password-login {
    grid-template-columns: 1fr;
  }

  .vault-password-button {
    width: 100%;
  }

  .vault-lightbox-layer {
    align-items: center;
    padding: 12px;
  }

  .vault-lightbox-panel {
    width: 100%;
    max-height: calc(100svh - 24px);
    border-radius: 20px;
    padding: 17px;
  }

  .vault-lightbox-head {
    grid-template-columns: 48px minmax(0, 1fr) 42px;
    gap: 12px;
    padding-bottom: 13px;
  }

  .vault-lightbox-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .vault-lightbox-close {
    width: 42px;
    height: 42px;
  }

  .vault-lightbox-categories {
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 5px;
  }

  .vault-lightbox-categories button {
    min-height: 32px;
    font-size: clamp(0.68rem, 3vw, 0.8rem);
  }

  .vault-lightbox-row-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .vault-lightbox-actions {
    grid-template-columns: 1fr 1fr;
  }

  .ledger-toolbar-main,
  .ledger-panel-head,
  .ledger-toolbar-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .ledger-kpi-card {
    min-height: 104px;
    padding: 14px;
  }

  .ledger-member-grid {
    grid-template-columns: 1fr;
  }

  .ledger-record-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ledger-record-amount {
    text-align: left;
    white-space: normal;
    padding-left: 52px;
  }

  .probe-heading-side {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 0;
  }

  .probe-shortcuts {
    width: 100%;
  }

  .probe-shortcut {
    min-width: 0;
    width: 100%;
    text-align: left;
  }

  .section-heading p:last-child {
    text-align: left;
  }

  .panel-head,
  .card-head,
  .item-head,
  .archive-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .box-actions,
  .item-actions,
  .archive-actions {
    justify-content: flex-start;
  }

  .connection-table {
    display: block;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
