:root {
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "STSong", Georgia, serif;
  --radius-panel: 24px;
  --radius-soft: 16px;
  --radius-control: 12px;
  --stroke-soft: rgba(176, 204, 255, 0.24);
  --stroke-strong: rgba(198, 220, 255, 0.42);
  --focus-ring: 0 0 0 3px rgba(90, 155, 255, 0.28);

  --fresh-bg-0: #081128;
  --fresh-bg-1: #0e1b39;
  --fresh-bg-2: #172c53;
  --fresh-surface: rgba(18, 31, 68, 0.9);
  --fresh-surface-strong: rgba(24, 41, 84, 0.95);
  --fresh-border: rgba(171, 197, 248, 0.24);
  --fresh-border-strong: rgba(197, 220, 255, 0.36);
  --fresh-text: #edf4ff;
  --fresh-subtle: #b7cbea;
  --fresh-accent: #62b6ff;
  --fresh-accent-2: #79a3ff;
  --fresh-accent-3: #37d2c4;
  --fresh-danger: #ff8b97;
  --fresh-low: #55d4a1;
  --fresh-neutral: #d6bd66;
  --fresh-high: #ff93a4;
  --fresh-shadow: 0 22px 48px rgba(6, 13, 30, 0.42);

  --terminal-bg-0: #060d1f;
  --terminal-bg-1: #0a1733;
  --terminal-bg-2: #0f2550;
  --terminal-surface: rgba(10, 22, 48, 0.94);
  --terminal-surface-strong: rgba(15, 30, 64, 0.96);
  --terminal-border: rgba(128, 166, 228, 0.28);
  --terminal-border-strong: rgba(156, 193, 255, 0.44);
  --terminal-text: #dde9ff;
  --terminal-subtle: #a6bfdc;
  --terminal-accent: #59c6ff;
  --terminal-accent-2: #73a0ff;
  --terminal-accent-3: #3fd4c2;
  --terminal-danger: #ff8798;
  --terminal-low: #59d39f;
  --terminal-neutral: #d9c067;
  --terminal-high: #ff8198;
  --terminal-shadow: 0 24px 54px rgba(3, 8, 22, 0.56);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  transition: background 0.35s ease, color 0.35s ease;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body[data-theme="fresh"] {
  --bg: linear-gradient(132deg, var(--fresh-bg-0) 0%, var(--fresh-bg-1) 52%, var(--fresh-bg-2) 100%);
  --surface: var(--fresh-surface);
  --surface-strong: var(--fresh-surface-strong);
  --border: var(--fresh-border);
  --border-strong: var(--fresh-border-strong);
  --text: var(--fresh-text);
  --subtle: var(--fresh-subtle);
  --accent: var(--fresh-accent);
  --accent-2: var(--fresh-accent-2);
  --accent-3: var(--fresh-accent-3);
  --danger: var(--fresh-danger);
  --low: var(--fresh-low);
  --neutral: var(--fresh-neutral);
  --high: var(--fresh-high);
  --shadow: var(--fresh-shadow);
}

body[data-theme="terminal"] {
  --bg: linear-gradient(145deg, var(--terminal-bg-0), var(--terminal-bg-1) 58%, var(--terminal-bg-2));
  --surface: var(--terminal-surface);
  --surface-strong: var(--terminal-surface-strong);
  --border: var(--terminal-border);
  --border-strong: var(--terminal-border-strong);
  --text: var(--terminal-text);
  --subtle: var(--terminal-subtle);
  --accent: var(--terminal-accent);
  --accent-2: var(--terminal-accent-2);
  --accent-3: var(--terminal-accent-3);
  --danger: var(--terminal-danger);
  --low: var(--terminal-low);
  --neutral: var(--terminal-neutral);
  --high: var(--terminal-high);
  --shadow: var(--terminal-shadow);
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 12%, rgba(71, 128, 236, 0.26), transparent 42%),
    radial-gradient(circle at 83% 8%, rgba(72, 175, 255, 0.17), transparent 41%),
    radial-gradient(circle at 78% 87%, rgba(41, 198, 186, 0.12), transparent 34%);
  z-index: -3;
}

.noise-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.08;
  background-image: radial-gradient(#8ca2dd 0.8px, transparent 0.8px);
  background-size: 6px 6px;
}

.bg-layer {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 6% 8%, rgba(92, 153, 255, 0.1), transparent 38%),
    radial-gradient(circle at 92% 10%, rgba(57, 192, 208, 0.08), transparent 34%);
  z-index: -1;
  opacity: 0.72;
  pointer-events: none;
}

.app-shell {
  width: min(1450px, calc(100% - 28px));
  min-height: calc(100dvh - 22px);
  height: auto;
  max-height: none;
  margin: 11px auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  position: relative;
  z-index: 1;
  padding: 0.2rem;
  border-radius: 32px;
  border: 1px solid rgba(182, 211, 255, 0.24);
  background:
    radial-gradient(circle at 10% 15%, rgba(90, 128, 238, 0.15), transparent 44%),
    radial-gradient(circle at 84% 8%, rgba(74, 196, 206, 0.12), transparent 40%),
    linear-gradient(160deg, rgba(8, 17, 39, 0.5), rgba(15, 29, 59, 0.62));
  box-shadow:
    0 28px 66px rgba(2, 7, 20, 0.58),
    inset 0 1px 0 rgba(226, 238, 255, 0.08);
  overflow: visible;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(155, 197, 255, 0.22), transparent 26%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  opacity: 0.55;
}

.panel {
  background:
    radial-gradient(circle at 92% 10%, rgba(98, 160, 247, 0.14), transparent 36%),
    radial-gradient(circle at 8% 88%, rgba(66, 205, 196, 0.1), transparent 40%),
    linear-gradient(165deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--accent-2) 26%, transparent);
  opacity: 0.46;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(225, 238, 255, 0.05), transparent 22%);
  opacity: 0.75;
}

.panel.soft {
  box-shadow: none;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  letter-spacing: 0.01em;
  font-weight: 800;
}

h2 {
  font-size: 1.16rem;
  letter-spacing: 0.01em;
  font-weight: 760;
}

h3 {
  font-size: 0.95rem;
  color: var(--subtle);
}

.eyebrow {
  margin: 0 0 7px;
  color: rgba(210, 221, 255, 0.82);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 800;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--subtle);
  font-size: 0.95rem;
  max-width: 62ch;
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.hero-panel {
  background:
    radial-gradient(circle at 86% 8%, rgba(76, 188, 255, 0.16), transparent 38%),
    linear-gradient(164deg, rgba(24, 42, 90, 0.92), rgba(16, 33, 74, 0.93));
  border-color: rgba(158, 201, 255, 0.38);
  box-shadow:
    0 22px 40px rgba(7, 13, 31, 0.36),
    inset 0 0 0 1px rgba(226, 236, 255, 0.08),
    inset 0 18px 38px rgba(116, 167, 255, 0.05);
}

.hero-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.hero-kpis {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.hero-kpi {
  border: 1px solid rgba(190, 208, 255, 0.28);
  background: linear-gradient(145deg, rgba(50, 69, 126, 0.82), rgba(43, 63, 117, 0.86));
  border-radius: 14px;
  padding: 9px 10px;
}

.hero-kpi-label {
  font-size: 0.72rem;
  color: var(--subtle);
}

.hero-kpi-value {
  margin-top: 5px;
  font-size: 1rem;
  font-weight: 800;
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.hero-actions .btn {
  width: 100%;
}

.hot-refresh-btn.is-loading {
  cursor: wait;
  opacity: 0.82;
}

.board-switch-btn {
  text-decoration: none;
  text-align: center;
}

.status-chip {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: linear-gradient(145deg, rgba(24, 63, 106, 0.46), rgba(21, 49, 88, 0.7));
  border: 1px solid rgba(214, 229, 255, 0.35);
  letter-spacing: 0.01em;
}

.status-chip.subtle {
  background: linear-gradient(145deg, rgba(68, 67, 135, 0.44), rgba(53, 68, 127, 0.58));
  border-color: rgba(210, 209, 255, 0.3);
}

.view-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: sticky;
  top: 10px;
  z-index: 12;
  backdrop-filter: blur(10px);
}

.tab,
.btn,
select,
input {
  font: inherit;
}

.tab,
.btn,
.chip {
  border: 1px solid rgba(188, 212, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(235, 244, 255, 0.04), rgba(235, 244, 255, 0)),
    linear-gradient(145deg, rgba(44, 68, 124, 0.78), rgba(40, 59, 108, 0.86));
  color: var(--text);
  padding: 9px 14px;
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  box-shadow:
    inset 0 1px 0 rgba(240, 247, 255, 0.08),
    0 6px 14px rgba(8, 16, 34, 0.2);
  font-weight: 650;
}

.tab:hover,
.btn:hover,
.chip:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(240, 247, 255, 0.11),
    0 10px 20px rgba(9, 20, 41, 0.28);
  border-color: rgba(203, 223, 255, 0.5);
}

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.tab.is-active,
.chip.is-active {
  background: linear-gradient(
    148deg,
    rgba(72, 138, 255, 0.88),
    rgba(57, 178, 219, 0.82) 58%,
    rgba(53, 202, 188, 0.86)
  );
  border-color: rgba(226, 237, 255, 0.62);
  box-shadow:
    0 10px 22px rgba(17, 54, 111, 0.4),
    inset 0 1px 0 rgba(245, 250, 255, 0.26);
}

.btn.ghost {
  background: linear-gradient(145deg, rgba(40, 54, 98, 0.74), rgba(34, 49, 92, 0.82));
}

.view-panel {
  display: none;
  min-height: 0;
  overflow: visible;
  gap: 14px;
}

.view-panel.is-active {
  display: grid;
  min-height: 0;
  overflow: visible;
  animation: reveal 0.34s cubic-bezier(0.22, 0.62, 0.28, 1);
}

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

@keyframes cardSweep {
  0% {
    transform: translateX(-148%) skewX(-22deg);
    opacity: 0;
  }
  9% {
    opacity: 0.24;
  }
  24% {
    opacity: 0.1;
  }
  34% {
    transform: translateX(138%) skewX(-22deg);
    opacity: 0;
  }
  100% {
    transform: translateX(138%) skewX(-22deg);
    opacity: 0;
  }
}

.layout-two {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
}

.layout-two-top {
  grid-template-columns: 1.15fr 1fr;
}

.layout-two > * {
  min-width: 0;
}

.layout-two.compact {
  grid-template-columns: 1fr 1fr;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.panel-title-row.compact {
  margin-bottom: 8px;
}

.hint {
  color: var(--subtle);
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 9px;
}

.metrics-hero .metric-block {
  padding: 11px;
}

.metric-block {
  border: 1px solid rgba(186, 204, 255, 0.26);
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(circle at 10% 14%, rgba(100, 146, 243, 0.2), transparent 44%),
    linear-gradient(160deg, rgba(42, 58, 112, 0.88), rgba(35, 50, 99, 0.9));
}

.metric-block .label {
  color: var(--subtle);
  font-size: 0.76rem;
}

.metric-block .value {
  margin-top: 6px;
  font-size: 1.08rem;
  font-weight: 800;
}

.regime-meter {
  margin-top: 12px;
  border: 1px solid rgba(181, 200, 250, 0.3);
  border-radius: 14px;
  padding: 10px;
  background:
    radial-gradient(circle at 90% 12%, rgba(166, 115, 247, 0.14), transparent 42%),
    linear-gradient(160deg, rgba(28, 45, 90, 0.86), rgba(25, 40, 80, 0.9));
}

.regime-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--subtle);
}

.regime-title-row strong {
  color: var(--text);
}

.regime-bar {
  margin-top: 8px;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: rgba(21, 33, 66, 0.84);
  border: 1px solid rgba(178, 198, 247, 0.24);
}

.regime-seg.high {
  background: linear-gradient(90deg, color-mix(in srgb, var(--high) 70%, transparent), var(--high));
}

.regime-seg.neutral {
  background: linear-gradient(90deg, color-mix(in srgb, var(--neutral) 70%, transparent), var(--neutral));
}

.regime-seg.low {
  background: linear-gradient(90deg, color-mix(in srgb, var(--low) 70%, transparent), var(--low));
}

.regime-legend {
  margin-top: 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--subtle);
}

.regime-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.regime-legend .dot.high {
  background: var(--high);
}

.regime-legend .dot.neutral {
  background: var(--neutral);
}

.regime-legend .dot.low {
  background: var(--low);
}

.insight-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.insight-card {
  border: 1px solid rgba(184, 201, 249, 0.26);
  border-radius: 14px;
  padding: 10px;
  text-align: left;
  background:
    radial-gradient(circle at 12% 18%, rgba(97, 144, 238, 0.16), transparent 42%),
    linear-gradient(162deg, rgba(35, 51, 100, 0.9), rgba(28, 43, 88, 0.92));
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(12, 20, 42, 0.2);
}

.insight-card:hover {
  border-color: rgba(221, 230, 255, 0.5);
}

.insight-card .insight-title {
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--subtle);
}

.insight-card .insight-name {
  margin-top: 4px;
  font-size: 0.92rem;
  font-weight: 700;
}

.insight-card .insight-value {
  margin-top: 7px;
  font-size: 1.08rem;
  font-weight: 800;
}

.insight-card .insight-meta {
  margin-top: 5px;
  font-size: 0.76rem;
  color: var(--subtle);
}

.insight-card.tone-high .insight-value {
  color: var(--high);
}

.insight-card.tone-low .insight-value {
  color: var(--low);
}

.insight-card.tone-accent .insight-value {
  color: var(--accent-3);
}

.quick-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.jump-chip {
  border: 1px solid rgba(189, 206, 255, 0.32);
  background: linear-gradient(145deg, rgba(54, 79, 141, 0.76), rgba(43, 63, 116, 0.82));
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.jump-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral);
}

.jump-chip .name {
  font-size: 0.8rem;
}

.jump-chip strong {
  font-size: 0.76rem;
}

.jump-chip.high .dot {
  background: var(--high);
}

.jump-chip.low .dot {
  background: var(--low);
}

.jump-chip.neutral .dot {
  background: var(--neutral);
}

.toolbar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(180px, 1.2fr);
  gap: 10px;
  margin-bottom: 10px;
}

.toolbar-grid label,
.detail-controls label,
.compare-controls label,
.settings-grid .panel.soft > label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--subtle);
  font-weight: 560;
}

select,
input[type="number"],
input[type="text"],
input[type="date"] {
  border: 1px solid rgba(185, 211, 255, 0.38);
  background: linear-gradient(145deg, rgba(24, 41, 78, 0.88), rgba(17, 32, 63, 0.92));
  color: var(--text);
  border-radius: var(--radius-control);
  padding: 10px 11px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 2px 8px rgba(5, 10, 26, 0.18);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color-scheme: dark;
  padding-right: 36px;
  background-image:
    linear-gradient(145deg, rgba(24, 41, 78, 0.88), rgba(17, 32, 63, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2 5l5 5 5-5' fill='none' stroke='%23cfe1ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 12px center;
  background-size: auto, 14px 14px;
}

select:hover {
  border-color: rgba(187, 211, 255, 0.56);
  background-image:
    linear-gradient(145deg, rgba(31, 50, 92, 0.92), rgba(21, 38, 73, 0.96)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2 5l5 5 5-5' fill='none' stroke='%23e7f0ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

select option {
  color: #eef4ff;
  background: #1b2c5a;
}

select option:checked {
  color: #ffffff;
  background: #2a4f8f;
}

select option:hover {
  background: #325ea7;
}

select:focus,
input:focus {
  outline: none;
  border-color: rgba(157, 206, 255, 0.86);
  box-shadow:
    var(--focus-ring),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

#data-mode-chip {
  display: none;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(282px, 1fr));
  gap: 10px;
}

#view-overview .panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
}

#view-overview .snapshot-grid {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  align-content: start;
  padding-right: 0;
}

#view-overview .overview-footer {
  flex-shrink: 0;
}

#view-detail .panel,
#view-compare .panel,
#view-settings .panel {
  height: auto;
  overflow: visible;
  overscroll-behavior: auto;
}

.overview-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.overview-footer .btn[hidden] {
  display: none !important;
}

.snapshot-grid.is-searching {
  grid-template-columns: repeat(auto-fill, minmax(282px, 340px));
  justify-content: start;
  align-content: start;
}

.snapshot-grid.is-searching .snapshot-card {
  width: 100%;
  max-width: 340px;
  justify-self: start;
}

.snapshot-card {
  --card-edge: rgba(153, 175, 235, 0.38);
  --card-glow: rgba(104, 132, 230, 0.11);
  --card-top: rgba(73, 70, 151, 0.885);
  --card-bottom: rgba(30, 47, 108, 0.965);
  --card-flare: rgba(200, 210, 255, 0.11);
  --card-glass: rgba(174, 197, 255, 0.072);
  --card-sweep: rgba(165, 227, 255, 0.11);
  --card-sweep-delay: 0s;
  --card-pin: var(--accent-2);
  --card-text-glow: rgba(130, 170, 255, 0.18);
  border: 1px solid var(--card-edge);
  border-radius: 20px;
  padding: 12px;
  background:
    linear-gradient(180deg, var(--card-glass), rgba(255, 255, 255, 0) 36%),
    radial-gradient(circle at 14% -16%, rgba(166, 136, 255, 0.31), transparent 44%),
    radial-gradient(circle at 50% 112%, rgba(60, 95, 179, 0.32), transparent 56%),
    linear-gradient(155deg, var(--card-top), var(--card-bottom) 68%);
  cursor: pointer;
  box-shadow:
    0 10px 18px rgba(8, 14, 32, 0.3),
    0 0 0 1px rgba(244, 249, 255, 0.04) inset,
    0 0 14px var(--card-glow);
  color: #ffffff;
  position: relative;
  min-height: 240px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(7px) saturate(112%);
  backdrop-filter: blur(7px) saturate(112%);
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, opacity 0.2s ease;
}

.snapshot-card:hover {
  transform: translateY(-3px) scale(1.004);
  border-color: color-mix(in srgb, var(--card-edge) 80%, rgba(234, 243, 255, 0.62));
  box-shadow:
    0 18px 30px rgba(6, 13, 29, 0.4),
    0 0 0 1px rgba(241, 246, 255, 0.1) inset,
    0 0 18px var(--card-glow);
}

.snapshot-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(122deg, var(--card-flare) 0%, transparent 40%);
  mix-blend-mode: screen;
  opacity: 0.6;
}

.snapshot-card::after {
  content: "";
  position: absolute;
  inset: -34% auto -34% -64%;
  width: 52%;
  background: linear-gradient(90deg, transparent 0%, var(--card-sweep) 46%, transparent 100%);
  pointer-events: none;
  mix-blend-mode: screen;
  animation: cardSweep 12.8s ease-in-out infinite;
  animation-delay: var(--card-sweep-delay);
  opacity: 0.02;
}

.snapshot-card > * {
  position: relative;
  z-index: 1;
}

.snapshot-card > .card-logo-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.snapshot-card > .card-logo-watermark img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  opacity: 0.17;
  filter: saturate(0.9) brightness(1.02) drop-shadow(0 0 10px rgba(168, 200, 255, 0.18));
}

.snapshot-card > .card-logo-watermark.card-logo-watermark--ticker span {
  font-family: var(--font-sans);
  font-weight: 820;
  font-size: clamp(2rem, 8vw, 3.35rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  color: rgba(205, 223, 255, 0.2);
  text-shadow:
    0 0 14px rgba(140, 184, 255, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.08);
  user-select: none;
  white-space: nowrap;
}

.snapshot-card .name-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.snapshot-card .name-row > div {
  min-width: 0;
}

.snapshot-card .name {
  display: block;
  max-width: 100%;
  font-weight: 800;
  font-size: 1.04rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snapshot-card .name.name--compact {
  font-size: 0.96rem;
  letter-spacing: 0;
}

.snapshot-card .name.name--tight {
  font-size: 0.88rem;
  letter-spacing: -0.004em;
}

.snapshot-card .symbol {
  font-size: 0.78rem;
  color: #ffffff;
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
}

.badge.high {
  color: #ffe2ea;
  background: linear-gradient(145deg, rgba(147, 96, 172, 0.26), rgba(123, 78, 150, 0.24));
  border: 1px solid rgba(217, 186, 238, 0.34);
}

.badge.low {
  color: #d5ffef;
  background: linear-gradient(145deg, rgba(68, 149, 175, 0.24), rgba(48, 121, 147, 0.24));
  border: 1px solid rgba(168, 225, 247, 0.36);
}

.badge.neutral {
  color: #dbe8ff;
  background: linear-gradient(145deg, rgba(90, 107, 189, 0.24), rgba(72, 90, 165, 0.24));
  border: 1px solid rgba(181, 197, 246, 0.34);
}

.snapshot-card .line {
  margin-top: 8px;
  font-size: 0.81rem;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: #ffffff;
}

.snapshot-card .line strong {
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 12px var(--card-text-glow);
}

.snapshot-card .line .up {
  color: var(--high);
}

.snapshot-card .line .down {
  color: var(--low);
}

.snapshot-card .line-muted {
  color: #ffffff;
  font-size: 0.74rem;
}

.percent-track-mini {
  margin: 10px auto 0;
  width: 90%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(98, 231, 224, 0.62), rgba(123, 191, 255, 0.58), rgba(168, 129, 245, 0.6));
  position: relative;
  border: 1px solid rgba(205, 220, 255, 0.34);
  box-shadow: 0 0 7px rgba(123, 173, 255, 0.16);
}

.percent-track-mini .pin {
  position: absolute;
  top: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--surface) 52%, rgba(220, 238, 255, 0.6));
  background: color-mix(in srgb, var(--card-pin) 86%, #a8d8ff 14%);
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.18),
    0 0 8px color-mix(in srgb, var(--card-pin) 60%, rgba(182, 220, 255, 0.34));
  transform: translateX(-50%);
}

.heatmap-grid {
  display: grid;
  gap: 7px;
}

.heatmap-head,
.heatmap-row {
  display: grid;
  grid-template-columns: 1.2fr 80px 80px 80px 72px;
  gap: 8px;
  align-items: center;
}

.heatmap-head {
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 700;
}

.heatmap-row {
  border: 1px solid rgba(176, 195, 243, 0.26);
  border-radius: 11px;
  padding: 7px;
  cursor: pointer;
  background: rgba(38, 54, 104, 0.44);
}

.heatmap-row:hover {
  border-color: rgba(220, 229, 255, 0.46);
}

.heat-label {
  font-size: 0.84rem;
}

.heat-cell {
  text-align: center;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid rgba(197, 212, 252, 0.22);
  font-weight: 700;
  font-size: 0.75rem;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.rank-item {
  border: 1px solid rgba(184, 203, 251, 0.3);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  background: linear-gradient(160deg, rgba(45, 62, 121, 0.76), rgba(38, 54, 108, 0.82));
}

.rank-item:hover {
  border-color: rgba(220, 231, 255, 0.52);
}

.rank-item .name {
  font-weight: 700;
}

.note-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: rgba(211, 224, 248, 0.92);
  font-size: 0.84rem;
  line-height: 1.45;
}

.note-list strong {
  color: #f1f5ff;
}

.chart-large {
  width: 100%;
  height: clamp(360px, 58vh, 540px);
  border-radius: var(--radius-soft);
}

.chart-medium {
  width: 100%;
  height: clamp(250px, 36vh, 360px);
  border-radius: var(--radius-soft);
}

.detail-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(360px, 1.08fr);
  gap: 10px;
  margin-bottom: 12px;
}

.detail-visual-main,
.detail-visual-side {
  border: 1px solid rgba(174, 194, 245, 0.32);
  border-radius: 16px;
  padding: 10px;
  background:
    radial-gradient(circle at 14% -24%, rgba(170, 132, 255, 0.28), transparent 46%),
    radial-gradient(circle at 90% 8%, rgba(115, 176, 255, 0.16), transparent 34%),
    linear-gradient(158deg, rgba(66, 55, 126, 0.66) 0%, rgba(39, 56, 112, 0.82) 38%, rgba(27, 40, 88, 0.9) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(231, 237, 255, 0.06),
    inset 0 14px 28px rgba(173, 146, 255, 0.06),
    inset 0 -18px 32px rgba(24, 37, 82, 0.34);
  min-width: 0;
}

.detail-visual-main .chart-large {
  height: clamp(360px, 54vh, 520px);
}

.detail-visual-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-visual-side .chart-medium {
  height: auto;
  min-height: clamp(320px, 42vh, 470px);
  flex: 1;
}

.detail-visual-side .percentile-track {
  margin-top: 0;
}

.detail-controls,
.compare-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-end;
}

.compare-date-range {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.compare-date-range label {
  min-width: 142px;
}

.compare-date-reset {
  height: 40px;
  padding-left: 12px;
  padding-right: 12px;
  white-space: nowrap;
}

.range-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 11px;
  font-size: 0.8rem;
}

.detail-stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  gap: 8px;
}

.stat-pill {
  border: 1px solid rgba(176, 195, 245, 0.34);
  border-radius: 12px;
  padding: 9px;
  background: linear-gradient(160deg, rgba(43, 60, 117, 0.78), rgba(35, 51, 103, 0.84));
}

.stat-pill .k {
  color: var(--subtle);
  font-size: 0.76rem;
}

.stat-pill .v {
  margin-top: 6px;
  font-weight: 800;
}

.percentile-track {
  margin-top: 12px;
  border: 1px solid rgba(176, 195, 245, 0.34);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(160deg, rgba(39, 56, 111, 0.8), rgba(31, 46, 95, 0.86));
}

.percentile-track .title {
  font-size: 0.8rem;
  color: var(--subtle);
  margin-bottom: 8px;
}

.percentile-track .bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(74, 212, 164, 0.52), rgba(221, 199, 102, 0.5), rgba(252, 132, 155, 0.56));
}

.percentile-track .bar .pin {
  position: absolute;
  top: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--surface) 58%, transparent);
  background: var(--accent-2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
}

.percentile-track .labels {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--subtle);
}

.inline-check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.compare-selector {
  margin-bottom: 12px;
  border: 1px solid rgba(176, 195, 245, 0.32);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(35, 52, 104, 0.78), rgba(31, 46, 93, 0.84));
}

.compare-selector-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.compare-selector-heading {
  display: grid;
  gap: 4px;
}

.compare-search-field {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--subtle);
  font-weight: 560;
  min-width: min(280px, 100%);
}

.compare-search-field input {
  width: min(320px, 100%);
}

.compare-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 8px;
  max-height: 226px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(133, 173, 244, 0.75) rgba(18, 30, 66, 0.36);
}

.compare-picker::-webkit-scrollbar {
  width: 10px;
}

.compare-picker::-webkit-scrollbar-track {
  background: rgba(18, 30, 66, 0.36);
  border-radius: 999px;
}

.compare-picker::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(110, 196, 255, 0.82), rgba(105, 140, 255, 0.86));
  border-radius: 999px;
  border: 2px solid rgba(18, 30, 66, 0.36);
}

.compare-item {
  border: 1px solid rgba(172, 192, 242, 0.3);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  font-size: 0.83rem;
  background: linear-gradient(150deg, rgba(39, 57, 109, 0.76), rgba(30, 45, 92, 0.82));
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.compare-item:hover {
  transform: translateY(-1px);
  border-color: rgba(198, 214, 255, 0.46);
  background: linear-gradient(150deg, rgba(46, 66, 122, 0.82), rgba(34, 50, 101, 0.88));
  box-shadow:
    0 10px 18px rgba(8, 15, 35, 0.22),
    inset 0 0 0 1px rgba(236, 244, 255, 0.08);
}

.compare-item.is-selected {
  border-color: rgba(109, 201, 255, 0.62);
  background:
    radial-gradient(circle at 92% 12%, rgba(81, 200, 255, 0.2), transparent 35%),
    linear-gradient(150deg, rgba(44, 77, 136, 0.88), rgba(29, 56, 112, 0.94));
  box-shadow:
    0 14px 24px rgba(6, 14, 34, 0.22),
    inset 0 0 0 1px rgba(222, 243, 255, 0.1);
}

.compare-item-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.compare-item-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.24;
}

.compare-item-meta {
  color: rgba(198, 216, 250, 0.86);
  font-size: 0.72rem;
}

.compare-item-check {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid rgba(183, 201, 245, 0.54);
  background: linear-gradient(160deg, rgba(27, 42, 84, 0.96), rgba(20, 33, 67, 0.98));
  box-shadow:
    0 2px 6px rgba(7, 12, 28, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.compare-item-check::after {
  content: "";
  width: 10px;
  height: 6px;
  border: 2px solid #ffffff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) scale(0.8);
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.compare-item-check:checked {
  border-color: rgba(104, 218, 255, 0.88);
  background: linear-gradient(155deg, rgba(59, 208, 255, 0.98), rgba(69, 135, 255, 0.98));
  box-shadow:
    0 0 0 3px rgba(88, 190, 255, 0.18),
    0 10px 20px rgba(9, 25, 54, 0.34);
}

.compare-item-check:checked::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.compare-picker-empty {
  grid-column: 1 / -1;
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(170, 192, 243, 0.34);
  border-radius: 14px;
  background: rgba(18, 30, 66, 0.28);
}

.compare-summary {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.compare-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.02fr) minmax(390px, 1.18fr);
  gap: 10px;
  align-items: stretch;
}

.compare-line-panel,
.compare-side-panel {
  border: 1px solid rgba(176, 195, 245, 0.34);
  border-radius: var(--radius-soft);
  background:
    radial-gradient(circle at 14% -24%, rgba(168, 130, 255, 0.24), transparent 46%),
    radial-gradient(circle at 91% 10%, rgba(111, 172, 255, 0.14), transparent 34%),
    linear-gradient(160deg, rgba(65, 54, 123, 0.6) 0%, rgba(39, 56, 112, 0.82) 40%, rgba(27, 40, 88, 0.9) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(235, 241, 255, 0.05),
    inset 0 12px 30px rgba(176, 148, 255, 0.05),
    inset 0 -18px 34px rgba(22, 36, 80, 0.34);
}

.compare-chart-large {
  height: clamp(340px, 52vh, 500px);
}

.compare-side-panel {
  display: flex;
  flex-direction: column;
  min-height: clamp(340px, 52vh, 500px);
  --compare-name-col: 48%;
  --compare-rest-col: 17.333%;
  --compare-head-font: 0.78rem;
  --compare-cell-font: 0.88rem;
  --compare-name-font: 0.88rem;
}

.compare-table-wrap {
  flex: 1;
  overflow: hidden;
}

.compare-cross-table {
  width: 100%;
  table-layout: fixed;
  font-size: var(--compare-cell-font);
}

.compare-table.compare-cross-table th,
.compare-table.compare-cross-table td {
  border-bottom: none;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.28;
}

.compare-table.compare-cross-table th {
  font-size: var(--compare-head-font);
}

.compare-cross-table tbody td {
  font-size: var(--compare-cell-font);
  white-space: nowrap;
}

.compare-cross-table th:nth-child(1),
.compare-cross-table td:nth-child(1) {
  width: var(--compare-name-col);
}

.compare-cross-table th:nth-child(2),
.compare-cross-table td:nth-child(2),
.compare-cross-table th:nth-child(3),
.compare-cross-table td:nth-child(3),
.compare-cross-table th:nth-child(4),
.compare-cross-table td:nth-child(4) {
  width: var(--compare-rest-col);
}

.compare-cross-table thead tr {
  border-bottom: 1px dashed rgba(171, 192, 243, 0.36);
}

.compare-cross-table tbody tr {
  background: linear-gradient(135deg, rgba(46, 64, 124, 0.42), rgba(31, 47, 96, 0.2));
  border-bottom: 1px dashed rgba(171, 192, 243, 0.32);
  transition: background 0.18s ease;
}

.compare-cross-table tbody tr:hover {
  background: linear-gradient(135deg, rgba(60, 82, 151, 0.56), rgba(37, 56, 112, 0.3));
}

.compare-name-cell {
  font-weight: 800;
  font-size: var(--compare-name-font);
  line-height: 1.16;
}

.compare-name-cell .compare-name-content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.compare-name-cell .line-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
  flex-shrink: 0;
}

.compare-name-cell .compare-name-text {
  display: block;
  flex: 1;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.summary-pill {
  border: 1px solid rgba(176, 195, 245, 0.32);
  border-radius: 12px;
  padding: 8px 9px;
  background: linear-gradient(160deg, rgba(39, 56, 112, 0.76), rgba(32, 47, 96, 0.84));
}

.summary-pill .k {
  font-size: 0.74rem;
  color: var(--subtle);
}

.summary-pill .v {
  margin-top: 5px;
  font-weight: 800;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.table-wrap {
  overflow: hidden;
}

.table-wrap.compare-table-wrap {
  overflow: hidden;
}

.compare-table th,
.compare-table td {
  border-bottom: 1px dashed rgba(171, 192, 243, 0.26);
  padding: 8px 6px;
  text-align: left;
}

.compare-table th {
  color: var(--subtle);
  font-weight: 700;
}

.settings-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
}

.watchlist-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 10px;
  max-height: none;
  overflow: hidden;
  padding-right: 8px;
}

.watch-item {
  border: 1px solid rgba(172, 192, 242, 0.3);
  border-radius: var(--radius-soft);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  font-size: 0.83rem;
  background: linear-gradient(150deg, rgba(39, 57, 109, 0.76), rgba(30, 45, 92, 0.82));
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.watch-item:hover {
  transform: translateY(-1px);
  border-color: rgba(198, 214, 255, 0.46);
  background: linear-gradient(150deg, rgba(46, 66, 122, 0.82), rgba(34, 50, 101, 0.88));
  box-shadow:
    0 10px 18px rgba(8, 15, 35, 0.22),
    inset 0 0 0 1px rgba(236, 244, 255, 0.08);
}

.watch-item-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.watch-item-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.24;
}

.watch-item-meta {
  color: rgba(198, 216, 250, 0.86);
  font-size: 0.72rem;
}

.watch-item-check {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid rgba(183, 201, 245, 0.54);
  background: linear-gradient(160deg, rgba(27, 42, 84, 0.96), rgba(20, 33, 67, 0.98));
  box-shadow:
    0 2px 6px rgba(7, 12, 28, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.watch-item-check::after {
  content: "";
  width: 10px;
  height: 6px;
  border: 2px solid #ffffff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) scale(0.8);
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.watch-item-check:hover {
  border-color: rgba(209, 222, 255, 0.72);
}

.watch-item-check:checked {
  border-color: rgba(160, 199, 255, 0.96);
  background: linear-gradient(150deg, rgba(59, 131, 255, 0.95), rgba(67, 110, 241, 0.94));
  box-shadow:
    0 4px 10px rgba(27, 73, 172, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.watch-item-check:checked::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.watch-item-check:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(82, 145, 255, 0.34),
    0 4px 10px rgba(27, 73, 172, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.action-inline {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  background: linear-gradient(145deg, rgba(52, 78, 138, 0.92), rgba(82, 68, 149, 0.88));
  border: 1px solid rgba(198, 214, 255, 0.44);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.84rem;
  color: var(--text);
  z-index: 24;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

*:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 27, 56, 0.6);
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid rgba(15, 27, 56, 0.65);
  background: linear-gradient(180deg, rgba(112, 165, 255, 0.9), rgba(74, 191, 201, 0.9));
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(134, 179, 255, 0.95), rgba(89, 204, 212, 0.95));
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1320px) {
  .app-shell {
    width: min(1450px, calc(100% - 26px));
  }

  .hero-kpis {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 1160px) {
  .layout-two,
  .layout-two.compact,
  .layout-two-top,
  .detail-visual-grid,
  .settings-grid,
  .compare-main-layout,
  .toolbar-grid {
    grid-template-columns: 1fr;
  }

  .app-header {
    flex-direction: column;
  }

  .header-actions {
    justify-items: start;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .hero-actions .btn {
    width: auto;
  }

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

  .heatmap-head,
  .heatmap-row {
    grid-template-columns: 1fr 64px 64px 64px 60px;
  }

}

@media (max-width: 760px) {
  .app-shell {
    width: calc(100% - 18px);
    min-height: calc(100dvh - 24px);
    height: auto;
    max-height: none;
    margin: 12px auto;
  }

  .panel {
    border-radius: 18px;
    padding: 14px;
  }

  .tab,
  .btn,
  .chip {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .snapshot-grid,
  .snapshot-grid.is-searching,
  .compare-picker,
  .watchlist-box {
    grid-template-columns: 1fr;
  }

  #view-overview .snapshot-grid {
    max-height: none;
  }

  .compare-date-range {
    width: 100%;
  }

  .compare-selector-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .compare-date-range label {
    min-width: 0;
    flex: 1;
  }

  .compare-date-reset {
    width: 100%;
    justify-content: center;
  }

  .compare-search-field,
  .compare-search-field input {
    width: 100%;
    min-width: 0;
  }

  .snapshot-grid.is-searching .snapshot-card {
    max-width: none;
    justify-self: stretch;
  }

  .chart-large {
    height: 45vh;
  }

  .compare-chart-large,
  .compare-side-panel {
    min-height: auto;
    height: auto;
  }

  .compare-chart-large {
    height: clamp(400px, 56vh, 520px);
  }

  .chart-medium {
    height: 34vh;
  }

  .regime-title-row {
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .snapshot-card::after {
    animation: none;
    opacity: 0.12;
  }
}
