:root {
  --ink: #151a2d;
  --ink-soft: #4c556c;
  --muted: #8b93a7;
  --line: #e8ebf3;
  --line-strong: #dfe3ee;
  --canvas: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f9fafe;
  --nav: #0a1020;
  --nav-soft: #121a2c;
  --primary: #5968f2;
  --primary-deep: #4151df;
  --primary-soft: #edf0ff;
  --cyan: #1cc8bc;
  --cyan-soft: #e5fbf8;
  --violet: #8c63f4;
  --violet-soft: #f2ecff;
  --orange: #f19a48;
  --orange-soft: #fff3e7;
  --red: #e65b66;
  --red-soft: #fff0f1;
  --green: #1fae7a;
  --green-soft: #e8f8f1;
  --blue: #3388e8;
  --blue-soft: #ebf4ff;
  --shadow-sm: 0 3px 12px rgba(20, 31, 61, 0.045);
  --shadow-md: 0 16px 46px rgba(20, 31, 61, 0.09);
  --shadow-lg: 0 30px 90px rgba(7, 14, 33, 0.19);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --sidebar-width: 254px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(89, 104, 242, 0.22);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

[hidden] {
  display: none !important;
}

.mobile-splash {
  display: none;
}

@media (max-width: 760px) {
  body.splash-active {
    overflow: hidden;
  }

  .mobile-splash:not([hidden]) {
    background: #061226;
    display: block;
    inset: 0;
    opacity: 1;
    position: fixed;
    transition: opacity 280ms ease;
    z-index: 10000;
  }

  .mobile-splash.is-leaving {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-splash-image {
    display: block;
    height: 100%;
    height: 100dvh;
    height: 100svh;
    inset: 0;
    object-fit: cover;
    object-position: center;
    position: absolute;
    width: 100%;
  }

  .mobile-splash-skip {
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    backdrop-filter: blur(12px);
    background: rgba(3, 12, 30, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #fff;
    display: flex;
    font-size: 13px;
    font-weight: 650;
    gap: 7px;
    height: 38px;
    padding: 0 13px;
    position: absolute;
    right: max(16px, env(safe-area-inset-right));
    top: calc(env(safe-area-inset-top) + 16px);
    z-index: 1;
  }

  .mobile-splash-skip b {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    min-width: 28px;
    padding: 3px 6px;
    text-align: center;
  }
}

svg {
  display: block;
  height: 1em;
  width: 1em;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  background:
    radial-gradient(circle at 8% 4%, rgba(89, 104, 242, 0.28), transparent 32%),
    radial-gradient(circle at 100% 85%, rgba(28, 200, 188, 0.1), transparent 38%),
    linear-gradient(168deg, #0b1222 0%, #090f1d 64%, #0c1323 100%);
  bottom: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  left: 0;
  overflow-y: auto;
  padding: 25px 18px 18px;
  position: fixed;
  scrollbar-width: none;
  top: 0;
  width: var(--sidebar-width);
  z-index: 40;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar::after {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
  position: absolute;
}

.brand,
.primary-nav,
.sidebar-status,
.sidebar-footer {
  position: relative;
  z-index: 1;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 3px 9px 31px;
}

.brand-mark {
  background: #07142d;
  border: 1px solid rgba(114, 226, 255, 0.3);
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(17, 124, 197, 0.3);
  flex: 0 0 auto;
  height: 43px;
  overflow: hidden;
  width: 43px;
}

.brand-mark img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.brand-name {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.brand-name b {
  color: #8c98ff;
  font-size: 12px;
  margin-left: 2px;
  vertical-align: top;
}

.brand-sub {
  color: #6f7a96;
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  margin-top: 3px;
}

.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-caption {
  color: #5d6881;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 0 13px 8px;
}

.nav-caption-spaced {
  margin-top: 22px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border-radius: 12px;
  color: #9da6bd;
  display: flex;
  font-size: 13px;
  gap: 12px;
  min-height: 46px;
  padding: 0 13px;
  position: relative;
  text-align: left;
  transition: 160ms ease;
  width: 100%;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #f5f7ff;
}

.nav-item.active {
  background: linear-gradient(100deg, rgba(89, 104, 242, 0.26), rgba(89, 104, 242, 0.1));
  box-shadow: inset 0 0 0 1px rgba(111, 124, 255, 0.16);
  color: #fff;
}

.nav-item.active::before {
  background: #7c88ff;
  border-radius: 0 5px 5px 0;
  content: "";
  height: 22px;
  left: -18px;
  position: absolute;
  top: 12px;
  width: 3px;
}

.nav-icon,
.card-icon,
.stat-icon,
.header-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 19px;
  justify-content: center;
}

.nav-count {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: #8e98ae;
  font-size: 10px;
  margin-left: auto;
  min-width: 25px;
  padding: 3px 7px;
  text-align: center;
}

.nav-count-accent {
  background: rgba(124, 136, 255, 0.2);
  color: #aab2ff;
}

.nav-dot {
  background: var(--cyan);
  border-radius: 50%;
  height: 7px;
  margin-left: auto;
  width: 7px;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-status {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  display: flex;
  gap: 12px;
  margin: 20px 2px 14px;
  padding: 13px;
}

.status-orbit {
  align-items: baseline;
  background: conic-gradient(#7d87ff 0deg, #58d7cf 170deg, rgba(255, 255, 255, 0.08) 170deg);
  border-radius: 50%;
  display: flex;
  flex: 0 0 auto;
  font-family: "Bahnschrift", sans-serif;
  font-size: 14px;
  height: 48px;
  justify-content: center;
  padding-top: 15px;
  position: relative;
  width: 48px;
}

.status-orbit::before {
  background: #11192a;
  border-radius: 50%;
  content: "";
  inset: 4px;
  position: absolute;
}

.status-orbit span,
.status-orbit small {
  position: relative;
  z-index: 1;
}

.status-orbit small {
  color: #7c87a2;
  font-size: 10px;
  margin-left: 1px;
}

.sidebar-status strong,
.sidebar-status span {
  display: block;
}

.sidebar-status strong {
  color: #cfd5e5;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
}

.sidebar-status > div > span {
  color: #69748d;
  font-size: 10px;
  line-height: 1.45;
}

.sidebar-footer {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  display: flex;
  gap: 4px;
  padding: 16px 5px 0;
}

.avatar {
  align-items: center;
  background: linear-gradient(145deg, #2b3855, #1a2337);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #bec7df;
  display: flex;
  font-size: 12px;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}

.sidebar-footer strong {
  color: #cfd5e3;
  font-size: 11px;
  font-weight: 600;
}

.sidebar-footer span {
  color: #66718a;
  font-size: 10px;
  margin-top: 3px;
}

.workspace {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.sidebar-scrim {
  backdrop-filter: blur(3px);
  background: rgba(8, 14, 28, 0.38);
  border: 0;
  display: none;
  inset: 0;
  position: fixed;
  width: 100%;
  z-index: 35;
}

body.sidebar-open {
  overflow: hidden;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(245, 247, 251, 0.88);
  border-bottom: 1px solid rgba(223, 227, 238, 0.8);
  display: flex;
  height: 74px;
  justify-content: space-between;
  padding: 0 clamp(22px, 3vw, 48px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left,
.topbar-actions,
.breadcrumb,
.reference-chip {
  align-items: center;
  display: flex;
}

.topbar-left {
  gap: 18px;
}

.lottery-switch {
  background: #eef1f7;
  border-radius: 10px;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
}

.lottery-switch button {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  color: #7e879b;
  display: inline-flex;
  font-size: 10px;
  gap: 5px;
  height: 31px;
  padding: 0 10px;
  transition: 150ms ease;
}

.lottery-switch button b {
  color: #a1a8b7;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
}

.lottery-switch button.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 29, 49, 0.09);
  color: var(--primary-deep);
  font-weight: 650;
}

.lottery-switch button.active b {
  color: var(--primary);
}

.breadcrumb {
  color: #9aa1b3;
  font-size: 12px;
  gap: 10px;
}

.breadcrumb i {
  color: #c7ccd8;
  font-style: normal;
}

.breadcrumb strong {
  color: #4a5268;
  font-weight: 600;
}

.topbar-actions {
  gap: 10px;
}

.reference-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  color: #747d93;
  font-size: 11px;
  gap: 7px;
  height: 38px;
  padding: 0 11px;
}

.live-dot {
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(28, 200, 188, 0.1);
  height: 6px;
  width: 6px;
}

.reference-chip input {
  background: #f5f7fb;
  border: 0;
  border-radius: 6px;
  font-family: "Bahnschrift", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 6px;
  text-align: center;
  width: 44px;
}

.reference-chip input[readonly] {
  cursor: default;
  user-select: none;
}

.icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  color: #667086;
  display: inline-flex;
  font-size: 17px;
  height: 38px;
  justify-content: center;
  transition: 150ms ease;
  width: 38px;
}

.icon-button:hover {
  border-color: #d5dae8;
  color: var(--ink);
  transform: translateY(-1px);
}

.icon-button.subtle {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #6d7892;
  height: 32px;
  margin-left: auto;
  width: 32px;
}

.mobile-menu {
  display: none;
  margin-right: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.text-button {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  gap: 7px;
  height: 42px;
  justify-content: center;
  padding: 0 18px;
  transition: 160ms ease;
  white-space: nowrap;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 8px 20px rgba(65, 81, 223, 0.23);
  color: #fff;
}

.primary-button:hover {
  box-shadow: 0 11px 28px rgba(65, 81, 223, 0.3);
  transform: translateY(-1px);
}

.primary-button.compact {
  height: 38px;
  padding: 0 15px;
}

.secondary-button {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: #4c556c;
}

.secondary-button:hover {
  border-color: #d2d8e5;
  color: var(--ink);
}

.ghost-button {
  background: transparent;
  color: #657087;
}

.ghost-button:hover {
  background: #f0f2f8;
  color: var(--ink);
}

.text-button {
  background: transparent;
  color: var(--primary);
  height: auto;
  padding: 0;
}

.text-button:hover {
  color: var(--primary-deep);
}

.view-root {
  margin: 0 auto;
  max-width: 1500px;
  padding: 28px clamp(22px, 3vw, 48px) 48px;
}

.site-copyright {
  color: #929aac;
  font-size: 10px;
  margin: 0 auto;
  max-width: 1500px;
  padding: 0 clamp(22px, 3vw, 48px) 26px;
}

.copyright-inner {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 15px 24px;
  justify-content: space-between;
  padding-top: 18px;
}

.copyright-owner,
.copyright-records {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.copyright-owner a,
.copyright-records a {
  color: #7b8398;
  text-decoration: none;
  transition: 140ms ease;
}

.copyright-owner a:hover,
.copyright-records a:hover {
  color: var(--primary);
}

.copyright-records i {
  color: #c7cbd5;
  font-style: normal;
  margin: 0 5px;
}

.workspace-hero {
  background:
    radial-gradient(circle at 88% 12%, rgba(76, 218, 207, 0.18), transparent 25%),
    radial-gradient(circle at 67% 100%, rgba(117, 108, 255, 0.27), transparent 34%),
    linear-gradient(120deg, #0f1930 0%, #111c35 58%, #182342 100%);
  border-radius: var(--radius-xl);
  box-shadow: 0 22px 60px rgba(14, 25, 52, 0.16);
  color: #fff;
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, 0.75fr);
  min-height: 230px;
  overflow: hidden;
  padding: clamp(28px, 3.4vw, 42px);
  position: relative;
}

.workspace-hero::before,
.workspace-hero::after {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  position: absolute;
}

.workspace-hero::before {
  height: 380px;
  right: -84px;
  top: -185px;
  width: 380px;
}

.workspace-hero::after {
  height: 210px;
  right: 65px;
  top: -100px;
  width: 210px;
}

.hero-copy,
.hero-metrics {
  position: relative;
  z-index: 1;
}

.eyebrow {
  align-items: center;
  color: #8997bf;
  display: flex;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  font-weight: 600;
  gap: 9px;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

.eyebrow::before {
  background: linear-gradient(90deg, #6d79ff, #45d7cb);
  border-radius: 3px;
  content: "";
  height: 2px;
  width: 24px;
}

.hero-copy h1 {
  font-size: clamp(27px, 2.6vw, 39px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.23;
  margin: 0;
  max-width: 650px;
}

.hero-copy h1 span {
  background: linear-gradient(90deg, #aab2ff, #65e0d5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  color: #8f9ab5;
  font-size: 12px;
  line-height: 1.7;
  margin: 14px 0 23px;
  max-width: 590px;
}

.hero-actions {
  display: flex;
  gap: 10px;
}

.hero-actions .primary-button {
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  color: #263052;
}

.hero-actions .primary-button:hover {
  background: #f7f8ff;
}

.hero-actions .ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #b9c1d8;
}

.hero-actions .ghost-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.hero-metrics {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.hero-metric {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 17px;
  padding: 16px;
}

.hero-metric:not(.wide) {
  display: grid;
  grid-template-rows: 20px 34px 5px;
  row-gap: 8px;
}

.hero-metric.wide {
  grid-column: span 2;
}

.hero-metric:not(.wide) .metric-label {
  margin: 0;
  min-width: 0;
  overflow: hidden;
}

.metric-label {
  align-items: center;
  color: #8591ad;
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  margin-bottom: 9px;
}

.metric-label span:last-child {
  color: #62708f;
  flex: 1 1 auto;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-label span:first-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

.metric-value {
  align-items: baseline;
  display: flex;
  font-family: "Bahnschrift", "DIN Alternate", sans-serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.metric-value small {
  color: #7986a2;
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  margin-left: 6px;
}

.metric-progress {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  height: 5px;
  margin-top: 13px;
  overflow: hidden;
}

.hero-metric:not(.wide) .metric-progress {
  margin: 0;
}

.metric-progress span {
  background: linear-gradient(90deg, #7a84ff, #54ddd2);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 400ms ease;
}

.sparkline {
  align-items: flex-end;
  display: flex;
  gap: 4px;
  height: 27px;
  margin-top: 11px;
}

.sparkline span {
  background: linear-gradient(to top, rgba(102, 113, 255, 0.24), #6976ff);
  border-radius: 3px 3px 1px 1px;
  flex: 1;
  min-height: 3px;
}

.sparkline span:nth-child(3n) {
  background: linear-gradient(to top, rgba(69, 215, 203, 0.2), #45d7cb);
}

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

.stat-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 13px;
  min-height: 84px;
  padding: 15px 17px;
}

.stat-icon {
  background: var(--blue-soft);
  border-radius: 12px;
  color: var(--blue);
  font-size: 19px;
  height: 42px;
  width: 42px;
}

.stat-card:nth-child(2) .stat-icon {
  background: var(--violet-soft);
  color: var(--violet);
}

.stat-card:nth-child(3) .stat-icon {
  background: var(--green-soft);
  color: var(--green);
}

.stat-card:nth-child(4) .stat-icon {
  background: var(--orange-soft);
  color: var(--orange);
}

.stat-copy span,
.stat-copy strong {
  display: block;
}

.stat-copy span {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}

.stat-copy strong {
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 20px;
  font-weight: 650;
}

.stat-copy strong small {
  color: #9ba2b2;
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  margin-left: 3px;
}

.section-block {
  margin-top: 28px;
}

.section-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 17px;
}

.section-heading h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 5px;
}

.section-heading p {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
}

.heading-aside {
  align-items: center;
  color: #9ca3b4;
  display: flex;
  font-size: 10px;
  gap: 7px;
}

.toolbar-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 18px;
  min-width: 0;
  overflow: hidden;
  padding: 11px;
}

.category-tabs {
  display: flex;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  background: transparent;
  border-radius: 10px;
  color: #778097;
  flex: 0 0 auto;
  font-size: 11px;
  padding: 9px 13px;
  transition: 150ms ease;
}

.category-tab:hover {
  background: #f2f4f9;
  color: var(--ink);
}

.category-tab.active {
  background: var(--ink);
  box-shadow: 0 5px 14px rgba(21, 26, 45, 0.15);
  color: #fff;
}

.search-box {
  align-items: center;
  background: #f7f8fb;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #9ca3b4;
  display: flex;
  flex: 0 0 210px;
  gap: 8px;
  height: 40px;
  padding: 0 11px;
}

.search-box:focus-within {
  background: #fff;
  border-color: #d8ddeb;
  box-shadow: 0 0 0 3px rgba(89, 104, 242, 0.08);
}

.search-box input {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 11px;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.search-box input::placeholder {
  color: #afb5c2;
}

.filters-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filter-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 2px 7px rgba(24, 34, 61, 0.025);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 172px;
  padding: 18px;
  position: relative;
  text-align: left;
  transition: 180ms ease;
  width: 100%;
}

.filter-card::after {
  background: radial-gradient(circle, var(--tone-soft) 0%, transparent 68%);
  border-radius: 50%;
  content: "";
  height: 100px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: -28px;
  top: -28px;
  transition: opacity 180ms ease;
  width: 100px;
}

.filter-card:hover {
  border-color: #d6dbea;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.filter-card:hover::after,
.filter-card.active::after {
  opacity: 1;
}

.filter-card.active {
  border-color: var(--tone-border);
  box-shadow: inset 0 0 0 1px var(--tone-border), var(--shadow-sm);
}

.filter-card.active::before {
  background: var(--tone);
  border-radius: 20px;
  content: "";
  height: 3px;
  left: 18px;
  position: absolute;
  top: 0;
  width: 32px;
}

.filter-card-top {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.card-icon {
  background: var(--tone-soft);
  border-radius: 12px;
  color: var(--tone);
  font-size: 20px;
  height: 42px;
  width: 42px;
}

.card-meta {
  align-items: flex-end;
  color: #a4aabb;
  display: flex;
  flex-direction: column;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  gap: 4px;
  justify-content: flex-start;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-en {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-indicator {
  align-items: center;
  background: var(--green-soft);
  border-radius: 20px;
  color: var(--green);
  display: inline-flex;
  font-family: "Microsoft YaHei UI", sans-serif;
  font-size: 10px;
  gap: 4px;
  letter-spacing: 0;
  padding: 4px 7px;
}

.active-indicator::before {
  background: var(--green);
  border-radius: 50%;
  content: "";
  height: 4px;
  width: 4px;
}

.filter-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 15px 0 6px;
  position: relative;
  z-index: 1;
}

.filter-card p {
  color: #8b93a4;
  display: -webkit-box;
  font-size: 10px;
  line-height: 1.6;
  margin: 0;
  max-height: 3.2em;
  min-height: 32px;
  overflow: hidden;
  position: relative;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  z-index: 1;
}

.filter-card-foot {
  align-items: center;
  color: #b0b6c4;
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 13px;
  position: relative;
  z-index: 1;
}

.filter-card-foot span:last-child {
  align-items: center;
  color: #8f97aa;
  display: inline-flex;
  font-size: 15px;
  transition: transform 150ms ease;
}

.filter-card:hover .filter-card-foot span:last-child {
  color: var(--tone);
  transform: translateX(3px);
}

.tone-blue {
  --tone: var(--blue);
  --tone-soft: var(--blue-soft);
  --tone-border: #cfe2fb;
}

.tone-cyan {
  --tone: #12aaa2;
  --tone-soft: var(--cyan-soft);
  --tone-border: #c4eee9;
}

.tone-violet {
  --tone: var(--violet);
  --tone-soft: var(--violet-soft);
  --tone-border: #dfd1ff;
}

.tone-orange {
  --tone: #df8532;
  --tone-soft: var(--orange-soft);
  --tone-border: #f8d9b9;
}

.tone-red {
  --tone: var(--red);
  --tone-soft: var(--red-soft);
  --tone-border: #f6ccd0;
}

.tone-green {
  --tone: var(--green);
  --tone-soft: var(--green-soft);
  --tone-border: #c6eadb;
}

.empty-grid {
  align-items: center;
  background: #fff;
  border: 1px dashed #d7dce9;
  border-radius: var(--radius-lg);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 12px;
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 250px;
  padding: 30px;
  text-align: center;
}

.empty-grid .empty-icon {
  align-items: center;
  background: var(--primary-soft);
  border-radius: 16px;
  color: var(--primary);
  display: flex;
  font-size: 25px;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.page-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin: 4px 0 24px;
}

.page-heading h1 {
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 750;
  letter-spacing: -0.035em;
  margin: 0 0 8px;
}

.page-heading p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  max-width: 620px;
}

.page-heading-actions {
  display: flex;
  gap: 9px;
}

.steps-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 22px;
}

.panel-header h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.panel-header p {
  color: var(--muted);
  font-size: 10px;
  margin: 5px 0 0;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 360px;
  padding: 14px;
}

.step-row {
  align-items: start;
  background: #fbfcff;
  border: 1px solid #edf0f6;
  border-radius: 15px;
  display: grid;
  gap: 13px;
  grid-template-columns: 28px 44px minmax(0, 1fr);
  min-height: 96px;
  padding: 16px;
  transition: 140ms ease;
}

.step-row:hover {
  background: #f8f9ff;
  border-color: #e3e7f1;
}

.step-row + .step-row {
  border-top: 1px solid #edf0f6;
}

.step-order {
  align-items: center;
  background: #f4f6fa;
  border: 1px solid #e8ebf2;
  border-radius: 8px;
  color: #b6bcc9;
  display: flex;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  height: 27px;
  justify-content: center;
  margin-top: 8px;
  padding-top: 0;
  width: 27px;
}

.step-content {
  min-width: 0;
}

.step-row > .card-icon {
  border-radius: 12px;
  height: 44px;
  width: 44px;
}

.step-headline {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.step-main {
  flex: 1;
  min-width: 0;
}

.step-title-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.step-title-line strong {
  font-size: 12px;
}

.participation-toggle {
  align-items: center;
  background: #f4f5f9;
  border: 1px solid #e8eaf1;
  border-radius: 20px;
  color: #949bad;
  display: inline-flex;
  font-size: 10.5px;
  gap: 4px;
  height: 23px;
  padding: 0 8px;
  transition: 140ms ease;
  white-space: nowrap;
}

.participation-toggle svg {
  font-size: 11px;
}

.participation-toggle:hover {
  border-color: #cfd4ef;
  transform: translateY(-1px);
}

.participation-toggle.active {
  background: var(--primary-soft);
  border-color: #d9ddff;
  color: var(--primary-deep);
}

.step-summary {
  color: #949bac;
  display: flex;
  font-size: 10px;
  gap: 10px;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-summary span + span::before {
  color: #c3c8d3;
  content: "·";
  margin-right: 10px;
}

.step-params {
  background: #fff;
  border: 1px solid #edf0f5;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 11px;
}

.step-param {
  align-items: flex-start;
  color: #747d91;
  display: grid;
  font-size: 10px;
  gap: 7px;
  grid-template-columns: auto 72px minmax(0, 1fr);
  line-height: 1.5;
}

.param-mode {
  background: var(--green-soft);
  border-radius: 5px;
  color: var(--green);
  font-size: 10px;
  line-height: 17px;
  min-width: 31px;
  padding: 0 5px;
  text-align: center;
  white-space: nowrap;
}

.param-mode.exclude {
  background: var(--red-soft);
  color: var(--red);
}

.param-label {
  color: #949cad;
  min-width: 0;
  padding-top: 1px;
}

.param-values {
  color: #475168;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  overflow-wrap: anywhere;
  padding-top: 1px;
}

.step-param-empty {
  color: #b0b6c2;
  font-size: 10px;
}

.step-count {
  color: #7d8699;
  font-family: "Bahnschrift", sans-serif;
  font-size: 11px;
  text-align: right;
  width: 58px;
}

.step-tools {
  align-items: center;
  background: #f4f6fb;
  border: 1px solid #e9ecf3;
  border-radius: 10px;
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  padding: 4px;
}

.step-count strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
}

.step-count span {
  color: #a1a8b6;
  font-size: 10px;
}

.tolerance-chip {
  background: #f5f6fa;
  border: 1px solid #e8ebf2;
  border-radius: 8px;
  color: #7f8799;
  flex: 0 0 auto;
  font-size: 10px;
  height: 30px;
  padding: 0 9px;
  transition: 150ms ease;
  white-space: nowrap;
}

.tolerance-chip:hover {
  background: #eef1ff;
  border-color: #dce0ff;
  color: var(--primary-deep);
}

.tolerance-chip.active {
  background: var(--primary-soft);
  border-color: #d8ddff;
  color: var(--primary-deep);
  font-weight: 650;
}

.step-actions {
  display: flex;
  gap: 3px;
}

.mini-icon-button {
  align-items: center;
  background: transparent;
  border-radius: 7px;
  color: #a3aaba;
  display: flex;
  font-size: 14px;
  height: 29px;
  justify-content: center;
  width: 29px;
}

.mini-icon-button:hover {
  background: #eef1f7;
  color: #4e5870;
}

.mini-icon-button.danger:hover {
  background: var(--red-soft);
  color: var(--red);
}

.switch {
  background: #e5e8f0;
  border: 1px solid #dde2eb;
  border-radius: 20px;
  display: inline-flex;
  flex: 0 0 42px;
  height: 24px;
  position: relative;
  transition: background 150ms ease, border-color 150ms ease;
  width: 42px;
}

.switch::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(20, 29, 49, 0.2);
  content: "";
  height: 18px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: 150ms ease;
  width: 18px;
}

.switch.on {
  background: var(--primary);
  border-color: var(--primary);
}

.switch.on::after {
  left: 20px;
}

.steps-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  min-height: 330px;
  padding: 30px;
  text-align: center;
}

.steps-empty-icon {
  align-items: center;
  background: linear-gradient(145deg, #eef1ff, #f7f8ff);
  border-radius: 22px;
  color: #7a83d6;
  display: flex;
  font-size: 30px;
  height: 72px;
  justify-content: center;
  width: 72px;
}

.steps-empty strong {
  color: #50596f;
  font-size: 13px;
}

.steps-empty span {
  font-size: 10px;
  line-height: 1.7;
  max-width: 260px;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.run-summary {
  background:
    radial-gradient(circle at 100% 0%, rgba(84, 221, 210, 0.18), transparent 36%),
    linear-gradient(140deg, #111b32, #0d1527);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 22px;
}

.run-summary .eyebrow {
  margin-bottom: 19px;
}

.run-number {
  font-family: "Bahnschrift", sans-serif;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.run-number small {
  color: #75819f;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 7px;
}

.run-caption {
  color: #7d89a4;
  font-size: 10px;
  margin: 9px 0 21px;
}

.run-summary .primary-button {
  background: #fff;
  box-shadow: none;
  color: #1c2643;
  width: 100%;
}

.run-summary .ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #aab3ca;
  margin-top: 8px;
  width: 100%;
}

.group-panel {
  padding-bottom: 8px;
}

.group-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px;
}

.group-row {
  align-items: center;
  display: flex;
  gap: 6px;
}

.group-row .group-chip {
  flex: 1;
}

.group-chip {
  align-items: center;
  background: #f8f9fc;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #697286;
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.group-chip.active {
  background: var(--primary-soft);
  border-color: #dce0ff;
  color: var(--primary-deep);
}

.group-chip span:last-child {
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
}

.group-tolerance-chip {
  background: #f5f6fa;
  border: 1px solid #e9ecf3;
  border-radius: 8px;
  color: #8790a2;
  flex: 0 0 auto;
  font-size: 10px;
  height: 34px;
  padding: 0 9px;
  transition: 150ms ease;
  white-space: nowrap;
}

.group-tolerance-chip:hover {
  background: var(--primary-soft);
  border-color: #d8ddff;
  color: var(--primary-deep);
}

.group-tolerance-chip.active {
  background: var(--primary-soft);
  border-color: #d4d9ff;
  color: var(--primary-deep);
  font-weight: 650;
}

.group-help {
  align-items: flex-start;
  color: #969eae;
  display: flex;
  font-size: 10px;
  gap: 7px;
  line-height: 1.55;
  padding: 9px 6px 2px;
}

.group-help svg {
  color: var(--primary);
  flex: 0 0 auto;
  font-size: 13px;
  margin-top: 1px;
}

.base-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.history-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
}

.history-editor {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.history-count {
  background: var(--primary-soft);
  border-radius: 20px;
  color: var(--primary-deep);
  flex: 0 0 auto;
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 10px;
  padding: 6px 10px;
  white-space: nowrap;
}

.history-records-header {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 80px;
  padding: 15px 20px 14px;
}

.history-records-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.history-records-head h2 {
  font-size: 16px;
  margin: 0;
}

.history-records-header > p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  margin: 0;
}

.history-source-note {
  align-items: center;
  background: #f5f8fb;
  border-bottom: 1px solid var(--line);
  color: #7f899c;
  display: flex;
  font-size: 10.5px;
  gap: 7px;
  padding: 9px 20px;
}

.history-source-note svg {
  color: var(--cyan);
  font-size: 14px;
}

.history-sync-error {
  align-items: center;
  background: #fff8ef;
  border-bottom: 1px solid #f2e2ce;
  color: #8d704e;
  display: flex;
  font-size: 10.5px;
  gap: 8px;
  line-height: 1.5;
  padding: 10px 20px;
}

.history-sync-error > svg {
  color: var(--orange);
  flex: 0 0 auto;
  font-size: 14px;
}

.history-sync-error > span {
  flex: 1;
}

.history-sync-error button {
  background: #fff;
  border: 1px solid #f1dfc9;
  border-radius: 7px;
  color: #a77944;
  flex: 0 0 auto;
  font-size: 10px;
  padding: 6px 8px;
}

.history-textarea {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, #eef0f7, #f4f6fa) border-box;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #333c54;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.9;
  margin: 18px 20px 12px;
  min-height: 436px;
  padding: 17px;
  resize: vertical;
  width: calc(100% - 40px);
}

.history-textarea::placeholder {
  color: #adb4c3;
}

.history-editor-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: #969eaf;
  display: flex;
  font-size: 10px;
  gap: 8px;
  padding: 13px 20px;
}

.history-editor-footer > span {
  margin-right: auto;
}

.history-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.draw-records {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  padding: 16px;
}

.draw-record {
  background: #f8f9fc;
  border: 1px solid #eef0f5;
  border-radius: 13px;
  padding: 14px;
}

.draw-record.current {
  background:
    radial-gradient(circle at 100% 0%, rgba(89, 104, 242, 0.12), transparent 56%),
    var(--primary-soft);
  border-color: #dce0ff;
}

.draw-record span,
.draw-record strong,
.draw-record small {
  display: block;
}

.draw-record span {
  color: #8e96a7;
  font-size: 10px;
  margin-bottom: 8px;
}

.draw-record strong {
  color: var(--ink);
  font-family: "Bahnschrift", monospace;
  font-size: 28px;
  letter-spacing: 0.1em;
}

.draw-record small {
  color: #9ca3b3;
  font-size: 10px;
  margin-top: 7px;
}

.history-empty {
  align-items: center;
  color: #a0a7b6;
  display: flex;
  flex-direction: column;
  font-size: 10px;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 115px;
}

.history-empty svg {
  color: #858fdd;
  font-size: 25px;
}

.history-sync-state {
  align-items: center;
  border-top: 1px solid var(--line);
  color: #949cad;
  display: flex;
  font-size: 10px;
  gap: 7px;
  padding: 11px 17px;
}

.history-sync-state > span {
  background: #c9ced9;
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.history-sync-state > span.ready {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 174, 122, 0.1);
}

.history-temperature {
  overflow: hidden;
}

.history-window {
  background: #f2f4f8;
  border-radius: 8px;
  display: flex;
  padding: 3px;
}

.history-window button {
  background: transparent;
  border-radius: 6px;
  color: #9299aa;
  font-size: 10px;
  padding: 5px 7px;
}

.history-window button.active {
  background: #fff;
  box-shadow: 0 2px 7px rgba(20, 29, 49, 0.08);
  color: var(--ink);
}

.digit-frequency {
  align-items: flex-end;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  height: 128px;
  padding: 17px 18px 13px;
}

.digit-frequency-item {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}

.frequency-head {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin-bottom: 6px;
}

.frequency-head strong {
  font-family: "Bahnschrift", sans-serif;
  font-size: 12px;
}

.frequency-head span {
  color: #b08a55;
  font-size: 10px;
  margin-top: 2px;
}

.digit-frequency-item.hot .frequency-head span {
  color: var(--red);
}

.digit-frequency-item.cold .frequency-head span {
  color: var(--blue);
}

.frequency-track {
  align-items: flex-end;
  background: #f4f5f9;
  border-radius: 5px 5px 2px 2px;
  display: flex;
  height: 55px;
  overflow: hidden;
  width: 100%;
}

.frequency-track i {
  background: linear-gradient(to top, #eee0ca, #e3ab68);
  border-radius: inherit;
  display: block;
  width: 100%;
}

.digit-frequency-item.hot .frequency-track i {
  background: linear-gradient(to top, #ffd9dc, #ee7c86);
}

.digit-frequency-item.cold .frequency-track i {
  background: linear-gradient(to top, #dbeafe, #69a8e8);
}

.digit-frequency-item small {
  color: #a2a9b7;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  margin-top: 5px;
}

.temperature-summary {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 13px 18px 16px;
}

.temperature-summary > div + div {
  border-left: 1px solid var(--line);
  padding-left: 15px;
}

.temperature-summary span,
.temperature-summary strong {
  display: block;
}

.temperature-summary span {
  color: #9ba2b2;
  font-size: 10px;
  margin-bottom: 5px;
}

.temperature-summary strong {
  color: #50596f;
  font-family: "Bahnschrift", sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.history-relation-tip {
  align-items: flex-start;
  background: linear-gradient(135deg, #f6f7ff, #fbfcfd);
  color: #7f88a0;
  display: flex;
  font-size: 10px;
  gap: 11px;
  line-height: 1.65;
  padding: 16px 18px;
}

.history-relation-tip > svg {
  color: var(--primary);
  flex: 0 0 auto;
  font-size: 18px;
  margin-top: 1px;
}

.history-relation-tip strong {
  color: #4e5870;
  display: block;
  font-size: 11px;
  margin-bottom: 4px;
}

.history-relation-tip p {
  margin: 0;
}

.about-hero {
  align-items: center;
  background:
    radial-gradient(circle at 88% 12%, rgba(67, 220, 207, 0.18), transparent 26%),
    radial-gradient(circle at 60% 100%, rgba(120, 104, 255, 0.26), transparent 36%),
    linear-gradient(120deg, #101a30, #172341);
  border-radius: var(--radius-xl);
  box-shadow: 0 22px 60px rgba(14, 25, 52, 0.16);
  color: #fff;
  display: grid;
  gap: 35px;
  grid-template-columns: minmax(0, 1fr) 180px;
  overflow: hidden;
  padding: 38px 42px;
  position: relative;
}

.about-hero h1 {
  font-size: clamp(35px, 4vw, 54px);
  letter-spacing: -0.045em;
  margin: 0 0 13px;
}

.about-hero p {
  color: #93a0bd;
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
  max-width: 700px;
}

.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.about-pills span {
  align-items: center;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  color: #b9c3da;
  display: inline-flex;
  font-size: 10px;
  gap: 6px;
  padding: 7px 11px;
}

.about-pills svg {
  color: #79ded4;
  font-size: 13px;
}

.about-mark {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 13px;
  justify-content: center;
}

.tool-orbit {
  align-items: center;
  display: flex;
  height: 168px;
  justify-content: center;
  position: relative;
  width: 168px;
}

.orbit-ring {
  background:
    radial-gradient(circle at 50% 50%, rgba(89, 104, 242, 0.16), transparent 52%),
    conic-gradient(from 20deg, rgba(108, 123, 255, 0.04), rgba(83, 222, 211, 0.32), rgba(108, 123, 255, 0.04));
  border-radius: 50%;
  inset: 8px;
  mask: radial-gradient(circle, transparent 57%, #000 58%);
  position: absolute;
}

.orbit-ring::before,
.orbit-ring::after {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
  inset: 22px;
  position: absolute;
}

.orbit-ring::after {
  border-style: dashed;
  inset: 43px;
}

.orbit-core {
  align-items: center;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.3), transparent 27%),
    linear-gradient(145deg, #7180ff, #4051dc);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 21px;
  box-shadow: 0 20px 42px rgba(57, 72, 210, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  color: #fff;
  display: flex;
  font-size: 25px;
  height: 58px;
  justify-content: center;
  position: relative;
  transform: rotate(-4deg);
  width: 58px;
  z-index: 2;
}

.orbit-core::after {
  background: #63ded4;
  border: 3px solid #1b2947;
  border-radius: 50%;
  bottom: -3px;
  content: "";
  height: 11px;
  position: absolute;
  right: -3px;
  width: 11px;
}

.orbit-node {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  box-shadow: 0 9px 22px rgba(6, 12, 28, 0.18);
  color: #93a0bf;
  display: flex;
  font-size: 15px;
  height: 36px;
  justify-content: center;
  position: absolute;
  width: 36px;
  z-index: 3;
}

.node-one {
  color: #8290ff;
  left: 8px;
  top: 34px;
}

.node-two {
  color: #5bd8ce;
  right: 7px;
  top: 30px;
}

.node-three {
  bottom: 25px;
  color: #af92ff;
  left: 20px;
}

.node-four {
  bottom: 20px;
  color: #ffb45f;
  right: 17px;
}

.about-mark > span {
  color: #6c7896;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
}

.about-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-info-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-info-card {
  display: flex;
  flex-direction: column;
  min-height: 285px;
  padding: 23px;
  position: relative;
  transition: 180ms ease;
}

.tool-info-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-info-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.tool-info-head > span {
  color: #c1c6d2;
  font-family: "Bahnschrift", sans-serif;
  font-size: 11px;
}

.tool-info-card > small {
  color: var(--tone);
  font-family: "Bahnschrift", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  margin-top: 15px;
}

.tool-info-card h3 {
  font-size: 20px;
  margin: 6px 0 10px;
}

.tool-info-card > p {
  color: #7f899e;
  font-size: 11.5px;
  line-height: 1.8;
  margin: 0;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
}

.tool-tags span {
  background: var(--tone-soft);
  border-radius: 7px;
  color: var(--tone);
  font-size: 10px;
  padding: 5px 8px;
}

.tool-info-card > a {
  align-items: center;
  border-top: 1px solid var(--line);
  color: #515b72;
  display: flex;
  font-size: 11px;
  font-weight: 600;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  text-decoration: none;
}

.tool-info-card > a svg {
  color: var(--tone);
  font-size: 14px;
  margin-left: auto;
}

.tool-info-card > a:hover {
  color: var(--tone);
}

.about-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.about-card .card-icon {
  height: 40px;
  width: 40px;
}

.about-card h3 {
  font-size: 15px;
  margin: 15px 0 8px;
}

.about-card p {
  color: #858ea2;
  font-size: 11px;
  line-height: 1.7;
  margin: 0;
}

.about-workflow {
  margin-top: 18px;
  overflow: hidden;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 20px;
}

.workflow-step {
  border-left: 1px solid var(--line);
  padding: 2px 17px;
}

.workflow-step:first-child {
  border-left: 0;
  padding-left: 0;
}

.workflow-step:last-child {
  padding-right: 0;
}

.workflow-step > span {
  color: var(--primary);
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
}

.workflow-step strong {
  display: block;
  font-size: 12px;
  margin: 8px 0 6px;
}

.workflow-step p {
  color: #8d95a7;
  font-size: 10.5px;
  line-height: 1.65;
  margin: 0;
}

.about-disclaimer {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #8790a3;
  display: flex;
  font-size: 10px;
  gap: 8px;
  line-height: 1.65;
  margin-top: 16px;
  padding: 13px 16px;
}

.about-disclaimer svg {
  color: var(--primary);
  flex: 0 0 auto;
  font-size: 15px;
}

.base-editor {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.base-editor .panel-header {
  gap: 15px;
}

.mode-switch {
  background: #f2f4f8;
  border-radius: 9px;
  display: inline-flex;
  padding: 3px;
}

.mode-switch button {
  background: transparent;
  border-radius: 7px;
  color: #8a92a5;
  font-size: 10px;
  padding: 7px 11px;
}

.mode-switch button.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 29, 49, 0.08);
  color: var(--ink);
}

.base-textarea {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, #eef0f7, #f4f6fa) border-box;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #333c54;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  line-height: 1.85;
  margin: 18px 20px 12px;
  min-height: 340px;
  padding: 17px;
  resize: vertical;
  width: calc(100% - 40px);
}

.base-textarea::placeholder {
  color: #adb4c3;
  font-family: "Microsoft YaHei UI", sans-serif;
  letter-spacing: 0;
}

.base-textarea[readonly] {
  color: #566078;
  cursor: default;
}

.base-editor-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  padding: 13px 20px;
}

.helper-text {
  color: #9ca3b4;
  font-size: 10px;
  margin-right: auto;
}

.base-insights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insight-card {
  padding: 21px;
}

.insight-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.insight-title strong {
  font-size: 13px;
}

.insight-title span {
  color: var(--muted);
  font-size: 10px;
}

.big-number {
  font-family: "Bahnschrift", sans-serif;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.big-number small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  margin-left: 6px;
}

.histogram {
  align-items: flex-end;
  display: flex;
  gap: 5px;
  height: 94px;
  margin-top: 22px;
}

.histogram-column {
  align-items: center;
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}

.histogram-bar {
  background: linear-gradient(to top, #d9defe, #6674f2);
  border-radius: 4px 4px 2px 2px;
  max-width: 18px;
  min-height: 3px;
  transition: 300ms ease;
  width: 70%;
}

.histogram-column:nth-child(3n) .histogram-bar {
  background: linear-gradient(to top, #cbefed, #26bdb5);
}

.histogram-column span {
  color: #b0b6c3;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  margin-top: 7px;
}

.quick-samples {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.quick-sample {
  background: #f8f9fc;
  border: 1px solid #eef0f6;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
}

.quick-sample:hover {
  background: var(--primary-soft);
  border-color: #dde1ff;
}

.quick-sample strong,
.quick-sample span {
  display: block;
}

.quick-sample strong {
  font-size: 10px;
  margin-bottom: 4px;
}

.quick-sample span {
  color: #9ba2b3;
  font-size: 10px;
}

.results-hero {
  align-items: center;
  background:
    radial-gradient(circle at 85% 10%, rgba(84, 221, 210, 0.16), transparent 28%),
    linear-gradient(115deg, #121c34, #10182a);
  border-radius: var(--radius-xl);
  color: #fff;
  display: flex;
  gap: 30px;
  justify-content: space-between;
  padding: 31px 34px;
}

.results-hero-copy h1 {
  font-size: 29px;
  letter-spacing: -0.025em;
  margin: 0 0 9px;
}

.results-hero-copy p {
  color: #8692ae;
  font-size: 11px;
  line-height: 1.7;
  margin: 0;
}

.results-hero-stats {
  align-items: center;
  display: flex;
  gap: 28px;
}

.result-stat {
  min-width: 92px;
}

.result-stat span {
  color: #78849f;
  display: block;
  font-size: 10px;
  margin-bottom: 7px;
}

.result-stat strong {
  font-family: "Bahnschrift", sans-serif;
  font-size: 25px;
}

.result-stat strong small {
  color: #75819e;
  font-size: 10px;
}

.donut {
  align-items: center;
  background: conic-gradient(#61d9cf 0deg, #818bff 270deg, rgba(255, 255, 255, 0.08) 270deg);
  border-radius: 50%;
  display: flex;
  height: 76px;
  justify-content: center;
  position: relative;
  width: 76px;
}

.donut::before {
  background: #10192b;
  border-radius: 50%;
  content: "";
  inset: 6px;
  position: absolute;
}

.donut-value {
  font-family: "Bahnschrift", sans-serif;
  font-size: 14px;
  position: relative;
}

.result-mode-bar {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 16px;
  padding: 10px 12px 10px 17px;
}

.result-mode-copy strong,
.result-mode-copy span {
  display: block;
}

.result-mode-copy strong {
  font-size: 12px;
  margin-bottom: 4px;
}

.result-mode-copy span {
  color: #929aac;
  font-size: 10.5px;
}

.result-mode-switch {
  background: #f3f5f9;
  border-radius: 11px;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 4px;
}

.result-mode-switch button {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  color: #828b9f;
  display: inline-flex;
  font-size: 11px;
  gap: 6px;
  height: 36px;
  justify-content: center;
  min-width: 92px;
  padding: 0 12px;
  transition: 150ms ease;
}

.result-mode-switch button svg {
  font-size: 14px;
}

.result-mode-switch button b {
  color: #a0a7b6;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  font-weight: 500;
}

.result-mode-switch button.active {
  background: #fff;
  box-shadow: 0 3px 10px rgba(20, 31, 61, 0.09);
  color: var(--primary-deep);
  font-weight: 650;
}

.result-mode-switch button.active b {
  color: var(--primary);
}

.result-shape-bar {
  align-items: center;
  background: linear-gradient(115deg, #ffffff 0%, #fbfcff 62%, #f8fafe 100%);
  border: 1px solid #e4e8f1;
  border-radius: 18px;
  box-shadow: 0 5px 18px rgba(27, 37, 65, 0.055);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  margin-top: 10px;
  padding: 13px 15px 13px 18px;
}

.result-shape-copy {
  min-width: 0;
  padding-left: 13px;
  position: relative;
}

.result-shape-copy::before {
  background: linear-gradient(180deg, var(--primary), #7a8bff);
  border-radius: 4px;
  content: "";
  height: 34px;
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
}

.result-shape-copy strong,
.result-shape-copy span {
  display: block;
}

.result-shape-copy strong {
  color: #263149;
  font-size: 13px;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

.result-shape-copy span {
  color: #929aac;
  font-size: 11.5px;
  line-height: 1.4;
}

.result-shape-switch {
  background: #f1f4f9;
  border: 1px solid #e7ebf3;
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(28, 39, 68, 0.035);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  justify-content: center;
  justify-self: center;
  padding: 4px;
}

.result-shape-switch button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #7f899d;
  font-size: 12px;
  font-weight: 600;
  height: 38px;
  min-width: 102px;
  padding: 0 15px;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
  white-space: nowrap;
}

.result-shape-switch button:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #4e5970;
}

.result-shape-switch button b {
  color: #a0a7b6;
  font-family: "Bahnschrift", sans-serif;
  font-size: 11px;
  font-weight: 500;
  margin-left: 5px;
}

.result-shape-switch button.active {
  background: linear-gradient(145deg, #ffffff, #f7f8ff);
  border-color: #dfe3ff;
  box-shadow: 0 4px 12px rgba(65, 77, 154, 0.11);
  color: var(--primary-deep);
}

.result-shape-switch button.active b {
  color: var(--primary);
}

.leopard-fill-button {
  align-items: center;
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 12px;
  box-shadow: 0 3px 11px rgba(31, 42, 71, 0.045);
  color: #697389;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 10px;
  justify-self: end;
  min-height: 46px;
  min-width: 188px;
  padding: 7px 14px;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.leopard-fill-button > svg {
  color: #7b86de;
  font-size: 18px;
}

.leopard-fill-button span,
.leopard-fill-button strong,
.leopard-fill-button small {
  display: block;
}

.leopard-fill-button strong {
  color: #4f596e;
  font-size: 12px;
}

.leopard-fill-button small {
  color: #969eaf;
  font-size: 10.5px;
  margin-top: 2px;
}

.leopard-fill-button:hover {
  background: #f9faff;
  border-color: #cfd5f5;
  box-shadow: 0 5px 14px rgba(57, 69, 145, 0.08);
  transform: translateY(-1px);
}

.leopard-fill-button.active {
  background: linear-gradient(145deg, #eff1ff, #f9faff);
  border-color: #d1d7ff;
  box-shadow: 0 4px 13px rgba(65, 77, 154, 0.1);
}

.leopard-fill-button.active > svg,
.leopard-fill-button.active strong {
  color: var(--primary-deep);
}

@media (min-width: 761px) and (max-width: 1180px) {
  .result-shape-bar {
    gap: 12px 16px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .result-shape-switch {
    justify-self: end;
  }

  .leopard-fill-button {
    grid-column: 1 / -1;
    justify-self: stretch;
    min-width: 0;
    width: 100%;
  }
}

.result-toolbar {
  align-items: center;
  display: flex;
  gap: 9px;
  justify-content: space-between;
  margin: 20px 0 15px;
}

.result-toolbar-left,
.result-toolbar-right {
  align-items: center;
  display: flex;
  gap: 8px;
}

.result-search {
  flex-basis: 250px;
}

.number-grid {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  max-height: 590px;
  overflow: auto;
  padding: 20px;
}

.number-pill {
  align-items: center;
  background: #f7f8fc;
  border: 1px solid #eff1f6;
  border-radius: 9px;
  color: #3e475e;
  display: flex;
  font-family: "Bahnschrift", monospace;
  font-size: 13px;
  height: 38px;
  justify-content: center;
  letter-spacing: 0.08em;
  transition: 130ms ease;
}

.number-pill:hover {
  background: var(--primary-soft);
  border-color: #dfe2ff;
  color: var(--primary-deep);
  transform: translateY(-1px);
}

.number-grid.group-mode .number-pill {
  background: #f9f8ff;
  border-color: #eeebfb;
}

.number-grid.group-mode .number-pill:hover {
  background: var(--violet-soft);
  border-color: #dfd4ff;
  color: #7350d4;
}

.results-empty {
  align-items: center;
  background: #fff;
  border: 1px dashed #d7dce9;
  border-radius: var(--radius-xl);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  min-height: 420px;
  text-align: center;
}

.results-empty-icon {
  align-items: center;
  background: linear-gradient(145deg, #eef1ff, #f8f9ff);
  border-radius: 23px;
  color: #7a83d6;
  display: flex;
  font-size: 34px;
  height: 80px;
  justify-content: center;
  width: 80px;
}

.results-empty strong {
  color: #4c556b;
  font-size: 15px;
}

.results-empty span {
  font-size: 10px;
  line-height: 1.7;
  max-width: 330px;
}

.drawer-layer,
.modal-layer {
  inset: 0;
  position: fixed;
  z-index: 100;
}

.drawer-scrim,
.modal-scrim {
  backdrop-filter: blur(4px);
  background: rgba(12, 18, 35, 0.34);
  inset: 0;
  position: absolute;
  width: 100%;
}

.drawer {
  animation: drawer-in 260ms cubic-bezier(0.22, 0.8, 0.24, 1);
  background: #f8f9fc;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 680px;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 0;
  width: min(680px, 92vw);
}

@keyframes drawer-in {
  from {
    opacity: 0.6;
    transform: translateX(35px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.drawer-header {
  align-items: flex-start;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 15px;
  padding: 23px 26px 20px;
}

.drawer-header .card-icon {
  height: 48px;
  margin-top: 2px;
  width: 48px;
}

.drawer-title-wrap {
  flex: 1;
  min-width: 0;
}

.drawer-title-wrap h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 1px 0 6px;
}

.drawer-title-wrap p {
  color: #858ea3;
  font-size: 10px;
  line-height: 1.65;
  margin: 0;
}

.drawer-close {
  margin-left: 6px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 30px;
}

.drawer-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 7px rgba(20, 30, 56, 0.025);
  margin-bottom: 12px;
  padding: 17px;
}

.drawer-section-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.drawer-section-head strong {
  font-size: 12px;
}

.drawer-section-head span {
  color: #9da4b4;
  font-size: 10px;
}

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

.field-label-row strong {
  font-size: 11px;
  font-weight: 650;
}

.mode-toggle {
  background: #f2f4f8;
  border-radius: 8px;
  display: inline-flex;
  padding: 2px;
}

.mode-toggle button {
  background: transparent;
  border-radius: 6px;
  color: #9aa1b1;
  font-size: 10px;
  min-width: 42px;
  padding: 6px 9px;
}

.mode-toggle button.active {
  background: #fff;
  box-shadow: 0 2px 6px rgba(22, 31, 53, 0.08);
  color: var(--primary-deep);
  font-weight: 600;
}

.mode-toggle button.active.exclude {
  color: var(--red);
}

.options-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fill, minmax(47px, 1fr));
}

.option-chip {
  align-items: center;
  background: #f9fafd;
  border: 1px solid #eceff5;
  border-radius: 8px;
  color: #697286;
  display: flex;
  font-size: 10px;
  height: 35px;
  justify-content: center;
  min-width: 0;
  padding: 0 7px;
  transition: 100ms ease;
}

.option-chip:hover {
  border-color: #d8ddea;
  color: var(--ink);
}

.option-chip.selected {
  background: var(--primary-soft);
  border-color: #cfd4ff;
  color: var(--primary-deep);
  font-weight: 650;
}

.option-chip.selected.exclude {
  background: var(--red-soft);
  border-color: #f4cbd0;
  color: var(--red);
}

.drawer-group-tolerance {
  align-items: center;
  color: #8d95a7;
  display: flex;
  font-size: 10px;
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
}

.drawer-group-tolerance button {
  background: var(--primary-soft);
  border-radius: 7px;
  color: var(--primary-deep);
  flex: 0 0 auto;
  font-size: 10px;
  padding: 7px 9px;
}

.break-group-tabs {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 13px 0;
}

.break-group-tabs button {
  align-items: center;
  background: #f7f8fc;
  border: 1px solid #e9ecf3;
  border-radius: 9px;
  color: #8992a5;
  display: inline-flex;
  flex-direction: column;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  gap: 4px;
  height: 43px;
  justify-content: center;
  position: relative;
}

.break-group-tabs button i {
  background: #d7dbe5;
  border-radius: 50%;
  height: 4px;
  width: 4px;
}

.break-group-tabs button.configured i {
  background: var(--green);
}

.break-group-tabs button.active {
  background: var(--primary-soft);
  border-color: #cfd4ff;
  box-shadow: inset 0 0 0 1px #cfd4ff;
  color: var(--primary-deep);
  font-weight: 650;
}

.break-group-panel {
  background: #f8f9fc;
  border: 1px solid #eceff5;
  border-radius: 12px;
  padding: 13px;
}

.break-group-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.break-group-title strong {
  font-size: 12px;
}

.break-group-title span {
  color: #969eae;
  font-size: 10px;
}

.break-group-footer {
  align-items: center;
  color: #929aab;
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  margin-top: 8px;
}

.break-group-footer button {
  background: transparent;
  color: var(--primary);
  font-size: 10px;
  padding: 4px 0;
}

.multi-slot-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.multi-slot-card {
  background: #f8f9fc;
  border: 1px solid #eceff5;
  border-radius: 11px;
  padding: 11px;
  position: relative;
}

.multi-slot-card.configured {
  background: linear-gradient(135deg, #f8f9ff, #f3fbf9);
  border-color: #dfe7e8;
}

.multi-slot-card.configured::before {
  background: var(--primary);
  border-radius: 0 0 3px 3px;
  content: "";
  height: 2px;
  left: 14px;
  position: absolute;
  top: -1px;
  width: 26px;
}

.multi-slot-card.disabled {
  background: #f7f8fb;
  border-color: #e5e8ef;
  border-style: dashed;
}

.multi-slot-card.disabled.configured::before {
  background: #b8bfcc;
}

.subcondition-card.disabled {
  background: #fbfcfe;
  border-color: #e5e8ef;
}

.subcondition-card.disabled > :not(.subcondition-enable-row),
.multi-slot-card.disabled > :not(.subcondition-enable-row) {
  opacity: 0.58;
}

.subcondition-enable-row {
  align-items: center;
  border-top: 1px solid #e9edf4;
  color: #8b94a6;
  display: flex;
  font-size: 10px;
  gap: 12px;
  justify-content: space-between;
  margin-top: 13px;
  padding-top: 11px;
}

.subcondition-enable-row > span {
  flex: 0 0 auto;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.subcondition-toggle {
  flex: 0 0 auto;
  gap: 2px;
}

.subcondition-toggle button {
  min-width: 78px;
  transition: color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.subcondition-toggle button.active {
  background: #e9f8f2;
  box-shadow: 0 2px 7px rgba(27, 145, 105, 0.1);
  color: #14805d;
}

.subcondition-toggle button.active.exclude {
  background: var(--red-soft);
  box-shadow: 0 2px 7px rgba(208, 67, 82, 0.08);
  color: var(--red);
}

.multi-slot-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.multi-slot-heading > div {
  align-items: baseline;
  display: flex;
  gap: 7px;
}

.multi-slot-heading strong {
  font-size: 12px;
}

.multi-slot-heading span {
  color: #9aa2b3;
  font-size: 10px;
}

.multi-slot-heading > button {
  background: transparent;
  color: #8992a5;
  font-size: 10px;
  padding: 3px 0 3px 8px;
}

.multi-slot-heading > button:hover {
  color: var(--red);
}

.dan-hit-count-panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #e8ebf2;
  border-radius: 10px;
  margin-top: 10px;
  padding: 10px;
}

.field-hit-count-panel {
  margin-top: 0;
  padding: 11px;
}

.field-hit-count-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.field-hit-count-header .dan-hit-count-head {
  flex: 1;
  margin-bottom: 0;
}

.field-hit-count-header .mode-toggle {
  flex: 0 0 auto;
}

.field-hit-count-options {
  margin-top: 9px;
}

.pair-group-caption {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pair-group-caption strong,
.pair-group-caption span {
  display: block;
}

.pair-group-caption strong {
  color: #354056;
  font-size: 13px;
  margin-bottom: 4px;
}

.pair-group-caption span {
  color: #929aac;
  font-size: 11px;
  line-height: 1.5;
}

.pair-group-caption b {
  background: var(--primary-soft);
  border-radius: 7px;
  color: var(--primary-deep);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 650;
  padding: 5px 8px;
}

.pair-group-field {
  background: #f8f9fc;
  border: 1px solid #eceff5;
  border-radius: 12px;
  margin-top: 9px;
  padding: 12px;
}

.pair-group-field.disabled {
  border-style: dashed;
  opacity: 0.68;
}

.pair-hit-count-panel {
  margin-top: 10px;
}

.number-repeat-setting {
  background: #f8f9fc;
  border: 1px solid #eceff5;
  border-radius: 10px;
  margin-top: 10px;
  padding: 11px;
}

.number-repeat-copy {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 9px;
}

.number-repeat-copy strong {
  color: #3f495d;
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1.35;
}

.number-repeat-section {
  padding-top: 0;
}

.number-repeat-section .number-repeat-setting {
  margin-top: 0;
}

.dan-hit-count-options button.active.exclude {
  background: var(--red-soft);
  border-color: #f4cbd0;
  color: var(--red);
}

.dan-setting-row + .dan-setting-row {
  border-top: 1px solid #edf0f5;
  margin-top: 10px;
  padding-top: 10px;
}

.dan-hit-count-head {
  align-items: center;
  color: #707a8e;
  display: flex;
  font-size: 10.5px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dan-hit-count-head > span {
  color: #3f495d;
  font-weight: 650;
}

.dan-hit-count-head > small {
  color: #9aa2b2;
  font-size: 10px;
}

.dan-count-mode-options,
.dan-hit-count-options {
  display: grid;
  gap: 6px;
}

.dan-count-mode-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dan-hit-count-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dan-count-mode-options button,
.dan-hit-count-options button {
  background: #f8f9fc;
  border: 1px solid #e7eaf1;
  border-radius: 8px;
  color: #798397;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10.5px;
  height: 31px;
  min-width: 0;
  padding: 0 4px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.dan-count-mode-options button {
  font-family: inherit;
  font-size: 10px;
}

.dan-count-mode-options button:hover,
.dan-hit-count-options button:hover {
  border-color: #ced4e5;
}

.dan-count-mode-options button.active,
.dan-hit-count-options button.active {
  background: var(--primary-soft);
  border-color: #cfd7ff;
  box-shadow: inset 0 0 0 1px rgba(79, 99, 235, 0.04);
  color: var(--primary-deep);
  font-weight: 700;
}

.multi-slot-summary {
  background: #f5f7fb;
  border-radius: 8px;
  color: #8992a5;
  font-size: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  text-align: right;
}

.drawer-participation-toggle {
  align-items: center;
  background: #f8f9fc;
  border: 1px solid #eceef5;
  border-radius: 10px;
  color: #7f889a;
  display: flex;
  font-size: 10px;
  gap: 8px;
  margin-top: 9px;
  padding: 9px 11px;
  width: 100%;
}

.drawer-participation-toggle svg {
  color: #9aa1b2;
  font-size: 14px;
}

.drawer-participation-toggle b {
  color: #9299aa;
  font-size: 10px;
  font-weight: 500;
  margin-left: auto;
}

.drawer-participation-toggle.active {
  background: var(--primary-soft);
  border-color: #d9ddff;
  color: var(--primary-deep);
}

.drawer-participation-toggle.active svg,
.drawer-participation-toggle.active b {
  color: var(--primary);
}

.options-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
}

.options-grid.pattern {
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
}

.options-grid.pairs {
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
}

.options-grid.many {
  max-height: 257px;
  overflow: auto;
  padding-right: 3px;
}

.field-actions {
  display: flex;
  gap: 12px;
  margin-top: 11px;
}

.field-actions button {
  background: transparent;
  color: #8f97a9;
  font-size: 10px;
  padding: 0;
}

.field-actions button:hover {
  color: var(--primary);
}

.field-actions button:last-child {
  margin-left: auto;
}

.field-actions.set-base-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.field-actions .set-base-action,
.field-actions .set-base-action:last-child {
  border: 1px solid #dfe4ee;
  border-radius: 10px;
  flex: 1 1 150px;
  font-size: 11.5px;
  font-weight: 650;
  height: 40px;
  justify-content: center;
  margin-left: 0;
  min-width: 150px;
  padding: 0 22px;
  white-space: nowrap;
}

.field-actions .set-base-action.secondary-button {
  background: #fff;
  box-shadow: 0 3px 10px rgba(29, 39, 68, 0.05);
  color: #505b72;
}

.field-actions .set-base-action.ghost-button {
  background: #f6f8fc;
  color: #667188;
}

.field-actions .set-base-action:hover {
  background: var(--primary-soft);
  border-color: #cfd6ff;
  color: var(--primary-deep);
}

.drawer-divider {
  align-items: center;
  color: #aaaFbe;
  display: flex;
  font-size: 10px;
  gap: 9px;
  margin: 18px 2px 10px;
}

.drawer-divider::after {
  background: #e6e9f0;
  content: "";
  flex: 1;
  height: 1px;
}

.simple-input,
.simple-select {
  background: #f8f9fc;
  border: 1px solid #e9ecf3;
  border-radius: 9px;
  font-size: 11px;
  height: 38px;
  padding: 0 11px;
  width: 100%;
}

.simple-input:focus,
.simple-select:focus {
  background: #fff;
  border-color: #cfd5f9;
  outline: 0;
}

.field-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.field-group {
  min-width: 0;
}

.field-group label {
  color: #8d95a6;
  display: block;
  font-size: 10px;
  margin-bottom: 7px;
}

.custom-note {
  align-items: flex-start;
  background: #f7f8fc;
  border: 1px solid #eef0f5;
  border-radius: 10px;
  color: #8e96a8;
  display: flex;
  font-size: 10px;
  gap: 8px;
  line-height: 1.6;
  margin-bottom: 13px;
  padding: 10px 11px;
}

.custom-note svg {
  color: #7a84df;
  flex: 0 0 auto;
  font-size: 14px;
  margin-top: 1px;
}

.segmented-large {
  background: #f3f5f9;
  border-radius: 11px;
  display: flex;
  gap: 3px;
  margin-bottom: 12px;
  padding: 4px;
}

.segmented-large button {
  background: transparent;
  border-radius: 8px;
  color: #8b93a5;
  flex: 1;
  font-size: 10px;
  padding: 9px 10px;
}

.segmented-large button.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(22, 31, 53, 0.08);
  color: var(--ink);
  font-weight: 600;
}

.textarea-small {
  background: #f8f9fc;
  border: 1px solid #e9ecf3;
  border-radius: 10px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.7;
  min-height: 82px;
  padding: 11px;
  resize: vertical;
  width: 100%;
}

.textarea-small:focus {
  background: #fff;
  border-color: #cfd5f9;
  outline: 0;
}

.drawer-footer {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding: 14px 22px 16px;
}

.live-preview {
  margin-right: auto;
}

.live-preview span,
.live-preview strong {
  display: block;
}

.live-preview span {
  color: #a0a7b6;
  font-size: 10px;
  margin-bottom: 3px;
}

.live-preview strong {
  font-family: "Bahnschrift", sans-serif;
  font-size: 14px;
}

.drawer-footer .ghost-button {
  border: 1px solid var(--line);
}

.drawer-tolerance {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.drawer-tolerance-panel {
  align-items: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(28, 200, 188, 0.08), transparent 42%),
    linear-gradient(120deg, #f5f7ff, #f8fbfd);
  border: 1px solid #e1e6f5;
  border-radius: 13px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 13px 14px;
}

.tolerance-copy {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.tolerance-icon {
  align-items: center;
  background: linear-gradient(145deg, #f0f2ff, #e5e9ff);
  border: 1px solid #d8ddff;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: #5d6af0;
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.tolerance-icon svg {
  height: 21px;
  width: 21px;
}

.tolerance-copy strong,
.tolerance-copy > div > span {
  display: block;
}

.tolerance-copy strong {
  font-size: 12px;
  margin-bottom: 4px;
}

.tolerance-copy > div > span {
  color: #8d96a9;
  font-size: 10.5px;
  line-height: 1.45;
}

.tolerance-options {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.tolerance-options button {
  background: #f3f5f9;
  border-radius: 7px;
  color: #8c94a5;
  font-size: 10px;
  height: 30px;
  min-width: 30px;
  padding: 6px;
}

.tolerance-options button.active {
  background: var(--primary);
  box-shadow: 0 5px 12px rgba(89, 104, 242, 0.23);
  color: #fff;
}

.tolerance-range-controls {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.tolerance-range-controls label {
  align-items: center;
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 8px;
  color: #8b93a5;
  display: flex;
  font-size: 10px;
  gap: 4px;
  height: 32px;
  padding: 0 7px;
}

.tolerance-range-controls select {
  appearance: none;
  background: var(--primary-soft);
  border: 0;
  border-radius: 6px;
  color: var(--primary-deep);
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  font-weight: 600;
  height: 24px;
  min-width: 26px;
  padding: 0 6px;
  text-align: center;
}

.custom-select-control {
  flex: 0 0 auto;
  min-width: 42px;
  position: relative;
}

.custom-select-native {
  height: 1px;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 1px;
}

.custom-select-trigger {
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--primary-deep);
  display: inline-flex;
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 10px;
  font-weight: 650;
  gap: 5px;
  height: 24px;
  justify-content: center;
  min-width: 42px;
  padding: 0 6px 0 9px;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.custom-select-trigger svg {
  color: #7f8bd7;
  font-size: 11px;
  transition: transform 150ms ease;
}

.custom-select-trigger:hover,
.custom-select-trigger.open {
  background: #edf0ff;
  border-color: #ccd3ff;
}

.custom-select-trigger.open svg {
  transform: rotate(180deg);
}

.custom-select-trigger:focus-visible {
  outline: 2px solid rgba(89, 104, 242, 0.3);
  outline-offset: 2px;
}

.custom-select-menu {
  animation: custom-select-in 140ms ease-out;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e3e7f0;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(29, 38, 68, 0.18), 0 3px 10px rgba(29, 38, 68, 0.07);
  max-width: calc(100vw - 20px);
  padding: 6px;
  position: fixed;
  z-index: 260;
}

@keyframes custom-select-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-select-caption {
  color: #9aa2b2;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 9px 7px;
}

.custom-select-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: min(260px, 52vh);
  overflow-y: auto;
}

.custom-select-options button {
  align-items: center;
  background: transparent;
  border-radius: 9px;
  color: #596478;
  display: flex;
  font-size: 12px;
  font-weight: 550;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 10px;
  text-align: left;
  transition: background 100ms ease, color 100ms ease;
  width: 100%;
}

.custom-select-options button:hover,
.custom-select-options button:focus-visible {
  background: #f4f6fb;
  color: var(--ink);
  outline: none;
}

.custom-select-options button.active {
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 700;
}

.custom-select-options button svg {
  color: var(--primary);
  font-size: 15px;
}

.tolerance-range-controls > i {
  color: #b4bac6;
  font-style: normal;
}

.tolerance-choice-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.tolerance-choice-grid button {
  background: #f8f9fc;
  border: 1px solid #eceff5;
  border-radius: 12px;
  color: #737c90;
  padding: 15px 10px;
  text-align: center;
  transition: 150ms ease;
}

.tolerance-choice-grid button:hover {
  border-color: #d9def2;
  transform: translateY(-1px);
}

.tolerance-choice-grid button.active {
  background: var(--primary-soft);
  border-color: #cfd4ff;
  box-shadow: inset 0 0 0 1px #cfd4ff;
  color: var(--primary-deep);
}

.tolerance-choice-grid strong,
.tolerance-choice-grid span {
  display: block;
}

.tolerance-choice-grid strong {
  font-family: "Bahnschrift", sans-serif;
  font-size: 21px;
  margin-bottom: 4px;
}

.tolerance-choice-grid span {
  font-size: 10.5px;
}

.group-range-status {
  align-items: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(89, 104, 242, 0.09), transparent 45%),
    #f7f8fd;
  border: 1px solid #e6e9f5;
  border-radius: 14px;
  display: grid;
  gap: 3px 10px;
  grid-template-columns: auto 1fr;
  margin-top: 18px;
  padding: 14px 15px;
}

.group-range-status > span {
  align-items: center;
  color: #7a8499;
  display: flex;
  font-size: 10px;
  gap: 6px;
  grid-column: 1;
  grid-row: 1;
}

.group-range-status > span svg {
  color: var(--primary);
  font-size: 14px;
}

.group-range-status strong {
  color: var(--ink);
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 20px;
  grid-column: 2;
  grid-row: 1;
}

.group-range-status small {
  color: #9aa2b3;
  font-size: 10px;
  grid-column: 2;
  grid-row: 2;
}

.total-tolerance-status {
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  margin: 18px 18px 0;
  max-width: none;
  min-width: 0;
  width: auto;
}

.total-tolerance-status small {
  grid-column: 1 / -1;
  grid-row: 2;
  line-height: 1.5;
  margin-top: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.group-range-editor {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.total-tolerance-editor {
  margin: 14px 18px 18px;
  max-width: none;
  min-width: 0;
  width: auto;
}

.range-field {
  background: #fafbfe;
  border: 1px solid #eceef5;
  border-radius: 13px;
  padding: 14px;
}

.range-field > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 11px;
}

.range-field strong {
  font-size: 11px;
}

.range-field span {
  color: #9da4b4;
  font-size: 10px;
}

.total-tolerance-editor .range-field > div:first-child {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-start;
}

.total-tolerance-editor .range-field strong {
  flex: 0 0 auto;
  white-space: nowrap;
}

.total-tolerance-editor .range-field span {
  line-height: 1.45;
}

.range-option-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(auto-fit, minmax(31px, 1fr));
  max-height: 126px;
  overflow: auto;
}

.range-option-grid button {
  background: #fff;
  border: 1px solid #e9ecf3;
  border-radius: 7px;
  color: #7d8699;
  font-family: "Bahnschrift", sans-serif;
  font-size: 11px;
  height: 32px;
}

.range-option-grid button:hover {
  border-color: #d3d8eb;
}

.range-option-grid button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.modal {
  animation: modal-in 220ms ease-out;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  left: 50%;
  max-height: min(78vh, 720px);
  max-width: 590px;
  overflow: auto;
  padding: 26px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(590px, calc(100vw - 34px));
}

.modal.confirm-modal {
  padding: 25px;
  width: min(460px, calc(100vw - 34px));
}

.confirm-dialog-head {
  align-items: center;
  display: flex;
  gap: 13px;
}

.confirm-dialog-icon {
  align-items: center;
  background: var(--red-soft);
  border: 1px solid #f6d2d6;
  border-radius: 14px;
  color: var(--red);
  display: flex;
  flex: 0 0 auto;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.confirm-eyebrow {
  color: var(--red);
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.confirm-dialog-head h2 {
  font-size: 19px;
  margin: 5px 0 0;
}

.confirm-message {
  color: #737d92;
  font-size: 11.5px;
  line-height: 1.8;
  margin: 17px 0 13px;
}

.confirm-warning {
  align-items: center;
  background: #fff8f1;
  border: 1px solid #f6e4d2;
  border-radius: 9px;
  color: #9b7a5d;
  display: flex;
  font-size: 10.5px;
  gap: 7px;
  padding: 10px 11px;
}

.confirm-warning svg {
  color: var(--orange);
  flex: 0 0 auto;
  font-size: 14px;
}

.primary-button.danger {
  background: linear-gradient(135deg, #ee6872, #db4c59);
  box-shadow: 0 8px 20px rgba(219, 76, 89, 0.2);
}

.primary-button.danger:hover {
  box-shadow: 0 11px 28px rgba(219, 76, 89, 0.28);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, -47%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.modal-head {
  align-items: flex-start;
  display: flex;
  gap: 13px;
  justify-content: space-between;
  margin-bottom: 17px;
}

.modal-head h2 {
  font-size: 20px;
  margin: 0 0 5px;
}

.modal-head p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  margin: 0;
}

.help-list {
  counter-reset: help-step;
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.help-list li {
  color: #687187;
  display: flex;
  font-size: 11px;
  line-height: 1.7;
  padding-left: 38px;
  position: relative;
}

.help-list li::before {
  align-items: center;
  background: var(--primary-soft);
  border-radius: 9px;
  color: var(--primary-deep);
  content: counter(help-step);
  counter-increment: help-step;
  display: flex;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  font-weight: 600;
  height: 26px;
  justify-content: center;
  left: 0;
  position: absolute;
  top: 0;
  width: 26px;
}

.modal-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

.toast-stack {
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  position: fixed;
  right: 24px;
  z-index: 200;
}

.toast {
  align-items: center;
  animation: toast-in 220ms ease-out;
  background: #111a2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(8, 14, 27, 0.24);
  color: #e8ebf5;
  display: flex;
  font-size: 10px;
  gap: 9px;
  max-width: 340px;
  padding: 12px 16px;
}

.toast svg {
  color: #65d9ce;
  font-size: 16px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.scroll-fade {
  position: relative;
}

::selection {
  background: #d8dcff;
  color: #273069;
}

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

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

  .workspace-hero {
    grid-template-columns: 1fr 360px;
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar-width: 238px;
  }

  .workspace-hero {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-metric.wide {
    grid-column: span 1;
  }

  .steps-layout,
  .base-grid,
  .history-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .sidebar {
    box-shadow: 20px 0 60px rgba(7, 14, 33, 0.28);
    transform: translateX(-104%);
    transition: transform 200ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim:not([hidden]) {
    display: block;
  }

  .workspace {
    margin-left: 0;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar {
    left: 0;
    height: 66px;
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
    padding: 0 16px;
    transition: opacity 160ms ease, visibility 160ms ease;
  }

  body.sidebar-open .topbar {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }

  .breadcrumb span,
  .breadcrumb i,
  .reference-chip span:not(.live-dot) {
    display: none;
  }

  .breadcrumb {
    display: none;
  }

  .topbar-left {
    gap: 8px;
  }

  .lottery-switch button {
    padding: 0 8px;
  }

  .lottery-switch button span {
    display: none;
  }

  .topbar-actions .icon-button {
    display: none;
  }

  .primary-button.compact {
    padding: 0 11px;
  }

  .view-root {
    padding: 84px 15px 36px;
  }

  .workspace-hero {
    border-radius: 21px;
    min-height: 0;
    padding: 24px 20px;
  }

  .hero-copy h1 {
    font-size: 27px;
  }

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

  .hero-metric.wide {
    grid-column: span 2;
  }

  .stats-row {
    gap: 9px;
  }

  .stat-card {
    min-height: 74px;
    padding: 12px;
  }

  .stat-icon {
    height: 36px;
    width: 36px;
  }

  .stat-copy strong {
    font-size: 17px;
  }

  .toolbar-card {
    align-items: stretch;
    flex-direction: column;
    padding: 8px;
  }

  .search-box {
    flex-basis: auto;
  }

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

  .filter-card {
    --mobile-card-title-height: 28px;
    align-content: start;
    align-items: start;
    display: grid;
    grid-template-columns: var(--mobile-card-title-height) minmax(0, 1fr);
    grid-template-rows: var(--mobile-card-title-height) auto auto;
    column-gap: 10px;
    min-height: 132px;
    padding: 15px;
  }

  .filter-card-top {
    display: contents;
  }

  .filter-card .card-icon {
    border-radius: 8px;
    font-size: 17px;
    grid-column: 1;
    grid-row: 1;
    height: var(--mobile-card-title-height);
    width: var(--mobile-card-title-height);
  }

  .filter-card .card-meta {
    display: none !important;
  }

  .filter-card h3 {
    align-self: center;
    display: flex;
    grid-column: 2;
    grid-row: 1;
    height: var(--mobile-card-title-height);
    line-height: var(--mobile-card-title-height);
    margin: 0;
  }

  .filter-card p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 11px;
  }

  .filter-card-foot {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 0;
  }

  .filter-card .card-meta {
    align-items: flex-end;
    max-width: calc(100% - 50px);
    overflow: hidden;
    position: absolute;
    right: 0;
    top: 0;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .page-heading-actions {
    width: 100%;
  }

  .page-heading-actions button {
    flex: 1;
  }

  .results-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 20px;
  }

  .results-hero-stats {
    align-items: end;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .results-hero-stats .result-stat {
    min-width: 0;
    text-align: center;
  }

  .results-hero-stats .donut {
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 3px;
  }

  .result-mode-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
    padding: 14px;
  }

  .result-mode-switch {
    width: 100%;
  }

  .result-mode-switch button {
    flex: 1;
  }

  .result-shape-bar {
    align-items: stretch;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .result-shape-copy {
    min-width: 0;
  }

  .result-shape-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-self: stretch;
    width: 100%;
  }

  .result-shape-switch button {
    min-width: 0;
    padding: 0 7px;
    width: 100%;
  }

  .leopard-fill-button {
    justify-content: center;
    justify-self: stretch;
    min-width: 0;
    width: 100%;
  }

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

  .result-toolbar-left {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .result-toolbar-left button {
    font-size: 10.5px;
    gap: 4px;
    min-width: 0;
    padding: 0 6px;
    width: 100%;
  }

  .result-toolbar-left .ghost-button {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    color: #4c556c;
  }

  .result-toolbar-right {
    flex-wrap: wrap;
  }

  .number-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: 12px;
  }

  .drawer {
    width: 100%;
  }

  .drawer-header {
    padding: 19px 18px 16px;
  }

  .drawer-body {
    padding: 14px 13px 26px;
  }

  .drawer-footer {
    padding: 12px 13px 14px;
  }

  .history-textarea {
    min-height: 300px;
  }

  .history-editor-footer {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .history-editor-footer > span {
    flex-basis: 100%;
  }

  .base-editor-footer {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .base-editor-footer .helper-text {
    flex-basis: 100%;
    line-height: 1.5;
    margin-bottom: 3px;
    white-space: normal;
  }

  .base-editor-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding: 16px;
  }

  .base-editor-header .mode-switch {
    display: flex;
    width: 100%;
  }

  .base-editor-header .mode-switch button {
    flex: 1;
    height: 36px;
    padding: 0 10px;
  }

  .base-editor .base-textarea {
    margin: 14px;
    width: calc(100% - 28px);
  }
}

@media (max-width: 440px) {
  .filters-grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-card {
    border-radius: 17px;
    height: auto;
    min-height: 132px;
    padding: 14px 13px 12px;
  }

  .filter-card .card-icon {
    height: var(--mobile-card-title-height);
    width: var(--mobile-card-title-height);
  }

  .filter-card h3 {
    font-size: 16px;
    margin: 0;
  }

  .filter-card p {
    font-size: 11px;
    line-height: 1.6;
    max-height: 3.2em;
    min-height: 35px;
  }

  .filter-card .card-meta {
    flex: 1;
    font-size: 10px;
    justify-content: flex-end;
    letter-spacing: 0.06em;
    max-width: calc(100% - 50px);
    min-width: 0;
    overflow: hidden;
    position: absolute;
    right: 0;
    text-align: right;
    top: 0;
  }

  .filter-card .card-meta > span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .filter-card-foot {
    gap: 4px;
    font-size: 10.5px;
    padding-top: 9px;
  }

  .filter-card .active-indicator {
    display: inline-flex;
    font-size: 10px;
    max-width: 100%;
    overflow: hidden;
    padding: 4px 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .filter-card-foot > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .stats-row {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    gap: 9px;
    min-width: 0;
    padding: 10px;
  }

  .stat-icon {
    height: 34px;
    width: 34px;
  }

  .stat-copy {
    min-width: 0;
  }

  .stat-copy span {
    font-size: 10.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stat-copy strong {
    font-size: 18px;
  }

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

  .results-hero-stats {
    flex-wrap: wrap;
  }

  .result-stat {
    min-width: 76px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .live-preview {
    display: none;
  }

  .drawer-footer .primary-button {
    flex: 1;
  }

  .draw-records {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 13px;
  }

  .draw-record {
    min-width: 0;
    padding: 12px;
  }

  .draw-record strong {
    font-size: 26px;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  .draw-record span {
    font-size: 10px;
  }

  .draw-record small {
    font-size: 10px;
    white-space: nowrap;
  }

  .digit-frequency {
    gap: 4px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: auto;
    row-gap: 13px;
  }

  .digit-frequency-item {
    height: 110px;
  }
}

@media (max-width: 760px) {
  .about-hero {
    align-items: flex-start;
    grid-template-columns: 1fr;
    padding: 27px 22px;
  }

  .about-mark {
    display: none;
  }

  .tool-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .filter-card h3 {
    margin: 0;
  }
}

/* Readability pass: keep the compact dashboard rhythm while making body copy
   and form controls comfortably legible on both desktop and mobile. */
.nav-item {
  font-size: 14px;
}

.nav-caption {
  font-size: 12px;
}

.sidebar-status strong,
.sidebar-footer strong {
  font-size: 12px;
}

.sidebar-status > div > span,
.sidebar-footer span {
  font-size: 10px;
}

.breadcrumb {
  font-size: 13px;
}

.reference-chip {
  font-size: 12px;
}

.reference-chip input {
  font-size: 14px;
}

.primary-button,
.secondary-button,
.ghost-button {
  font-size: 13px;
}

.hero-copy p {
  font-size: 13.5px;
  line-height: 1.75;
}

.eyebrow {
  font-size: 11px;
}

.metric-label {
  font-size: 12px;
}

.metric-label span:last-child {
  font-size: 10px;
}

.metric-value {
  font-size: 29px;
}

.metric-value small {
  font-size: 11px;
}

.stat-copy span {
  font-size: 12px;
}

.stat-copy strong {
  font-size: 22px;
}

.stat-copy strong small {
  font-size: 10px;
}

.section-heading p,
.page-heading p {
  font-size: 13px;
}

.heading-aside {
  font-size: 11.5px;
}

.category-tab {
  font-size: 12.5px;
  padding-inline: 15px;
}

.search-box input {
  font-size: 13px;
}

.filter-card .card-meta {
  font-size: 10.5px;
}

.filter-card h3 {
  font-size: 17px;
  margin-top: 16px;
}

.filter-card p {
  font-size: 12.5px;
  line-height: 1.65;
  min-height: 41px;
}

.filter-card-foot {
  font-size: 10.5px;
}

.active-indicator {
  font-size: 10.5px;
}

.panel-header h2 {
  font-size: 16px;
}

.panel-header p {
  font-size: 11.5px;
}

.step-order {
  font-size: 12px;
}

.step-title-line strong {
  font-size: 13.5px;
}

.step-summary {
  font-size: 11px;
}

.step-count {
  font-size: 12px;
}

.step-count strong {
  font-size: 15px;
}

.step-count span {
  font-size: 10.5px;
}

.steps-empty strong {
  font-size: 15px;
}

.steps-empty span {
  font-size: 12px;
}

.run-caption,
.group-chip,
.helper-text {
  font-size: 11px;
}

.mode-switch button {
  font-size: 10.5px;
}

.base-textarea {
  font-size: 14px;
}

.insight-title strong {
  font-size: 14px;
}

.insight-title span,
.quick-sample span {
  font-size: 10px;
}

.quick-sample strong {
  font-size: 11.5px;
}

.results-hero-copy p {
  font-size: 12.5px;
}

.result-stat span {
  font-size: 10.5px;
}

.drawer-title-wrap h2 {
  font-size: 22px;
}

.drawer-title-wrap p {
  font-size: 12px;
}

.drawer-section-head strong,
.field-label-row strong {
  font-size: 13px;
}

.mode-toggle button {
  font-size: 10.5px;
}

.subcondition-toggle button {
  font-size: 10px;
}

.option-chip {
  font-size: 12px;
  height: 38px;
}

.field-actions button,
.custom-note {
  font-size: 10px;
}

.custom-note {
  line-height: 1.7;
}

.field-group label {
  font-size: 10px;
}

.simple-input,
.simple-select,
.textarea-small {
  font-size: 12.5px;
}

.segmented-large button {
  font-size: 10.5px;
}

.live-preview span {
  font-size: 10.5px;
}

.live-preview strong {
  font-size: 15px;
}

.tolerance-options button {
  font-size: 10px;
}

.toast {
  font-size: 11.5px;
}

@media (max-width: 760px) {
  button {
    white-space: nowrap;
    word-break: keep-all;
  }

  .filter-card p {
    font-size: 12px;
  }

  .filters-section-heading {
    display: block;
    margin-bottom: 13px;
  }

  .filters-section-heading > div:first-child p {
    display: block;
    font-size: 11.5px;
    line-height: 1.5;
  }

  .filters-section-heading .heading-aside {
    display: flex;
    font-size: 10.5px;
    line-height: 1.5;
    margin-top: 4px;
  }

  .hero-copy p {
    font-size: 13px;
  }

  .category-tab {
    font-size: 12px;
  }

  .step-row {
    display: grid;
    gap: 8px 10px;
    grid-template-columns: 20px 42px minmax(0, 1fr);
  }

  .step-order {
    grid-column: 1;
    grid-row: 1;
  }

  .step-row > .card-icon {
    grid-column: 2;
    grid-row: 1;
  }

  .step-content {
    grid-column: 3;
    grid-row: 1;
  }

  .step-headline {
    flex-direction: column;
    gap: 8px;
  }

  .step-main {
    width: 100%;
  }

  .step-tools {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }

  .step-count {
    text-align: left;
    width: auto;
  }

  .step-count strong,
  .step-count span {
    display: inline;
  }

  .step-count span {
    margin-left: 6px;
  }

  .tolerance-chip {
    height: 28px;
  }

  .step-actions {
    margin-left: auto;
  }

  .step-param {
    gap: 6px;
    grid-template-columns: auto 58px minmax(0, 1fr);
  }

  .drawer-tolerance-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .tolerance-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
    width: 100%;
  }

  .tolerance-options button {
    flex: none;
    width: 100%;
  }

  .tolerance-range-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    width: 100%;
  }

  .tolerance-range-controls label {
    justify-content: space-between;
    width: 100%;
  }

  .custom-select-trigger {
    height: 27px;
    min-width: 44px;
  }

  .custom-select-options button {
    min-height: 44px;
  }

  .group-range-editor {
    grid-template-columns: 1fr;
  }

  .site-copyright {
    padding: 0 15px 22px;
  }

  .copyright-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .filter-card h3 {
    margin: 0 !important;
  }

  .break-group-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .subcondition-enable-row {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .subcondition-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .subcondition-toggle button {
    min-width: 0;
    padding: 8px 6px;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .steps-list {
    padding: 11px;
  }

  .step-row {
    background: #fbfcff;
    border: 1px solid #edf0f6;
    border-radius: 14px;
    display: grid;
    gap: 10px;
    grid-template-columns: 20px 42px minmax(0, 1fr);
    margin-bottom: 9px;
    padding: 14px 11px;
  }

  .step-row + .step-row {
    border-top: 1px solid #edf0f6;
  }

  .step-order {
    align-items: center;
    display: flex;
    font-size: 10px;
    grid-column: 1;
    grid-row: 1;
    height: 24px;
    justify-content: center;
    margin-top: 4px;
    padding-top: 0;
    width: 24px;
  }

  .step-row > .card-icon {
    grid-column: 2;
    grid-row: 1;
  }

  .step-content {
    display: grid;
    gap: 8px;
    grid-column: 3;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .step-headline {
    display: contents;
  }

  .step-main {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  .step-title-line {
    gap: 5px;
  }

  .participation-toggle {
    font-size: 10px;
    height: 22px;
    padding: 0 6px;
  }

  .step-summary {
    margin-top: 5px;
  }

  .step-tools {
    align-items: center;
    background: #f6f8fc;
    border: 1px solid #eceff5;
    border-radius: 10px;
    display: grid;
    gap: 4px;
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: minmax(42px, 1fr) auto 42px;
    padding: 6px;
    width: 100%;
  }

  .step-count {
    display: block;
    grid-column: 1;
    grid-row: 1;
    text-align: left;
    width: auto;
  }

  .step-count strong {
    font-size: 14px;
  }

  .step-count span {
    font-size: 10px;
    margin-left: 0;
  }

  .tolerance-chip {
    grid-column: 2;
    grid-row: 1;
    font-size: 10px;
    height: 26px;
    padding: 0 6px;
  }

  .step-row > .switch {
    grid-column: 3;
    grid-row: 1;
    height: 24px;
    justify-self: end;
    width: 42px;
  }

  .step-actions {
    border-top: 1px solid #e8ebf2;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
    gap: 0;
    margin-left: 0;
    padding-top: 4px;
  }

  .mini-icon-button {
    font-size: 13px;
    height: 26px;
    width: 25px;
  }

  .step-params {
    background: #fff;
    border: 1px solid #eef0f5;
    border-radius: 10px;
    gap: 5px;
    grid-column: 1;
    grid-row: 3;
    margin: 0;
    padding: 9px 10px;
  }

  .step-param {
    font-size: 10.5px;
    gap: 5px;
    grid-template-columns: auto 52px minmax(0, 1fr);
  }
}

.inline-small {
  font-size: 10px;
}

/* Desktop small-text readability bump */
@media (min-width: 761px) {
  .brand-sub {
    font-size: 11px;
  }
  .nav-count {
    font-size: 12px;
  }
  .status-orbit small {
    font-size: 11px;
  }
  .sidebar-status > div > span {
    font-size: 11px;
  }
  .sidebar-footer span {
    font-size: 11px;
  }
  .lottery-switch button {
    font-size: 12px;
  }
  .lottery-switch button b {
    font-size: 11px;
  }
  .site-copyright {
    font-size: 12px;
  }
  .eyebrow {
    font-size: 12px;
  }
  .metric-label {
    font-size: 12px;
  }
  .metric-label span:last-child {
    font-size: 11px;
  }
  .metric-value small {
    font-size: 12px;
  }
  .stat-copy span {
    font-size: 12px;
  }
  .stat-copy strong small {
    font-size: 11px;
  }
  .heading-aside {
    font-size: 12px;
  }
  .card-meta {
    font-size: 11px;
  }
  .active-indicator {
    font-size: 11px;
  }
  .filter-card p {
    font-size: 12px;
  }
  .filter-card-foot {
    font-size: 11px;
  }
  .panel-header p {
    font-size: 12px;
  }
  .step-order {
    font-size: 12px;
  }
  .participation-toggle {
    font-size: 11.5px;
  }
  .step-summary {
    font-size: 11px;
  }
  .step-param {
    font-size: 12px;
  }
  .param-mode {
    font-size: 11px;
  }
  .step-param-empty {
    font-size: 11px;
  }
  .step-count span {
    font-size: 11px;
  }
  .tolerance-chip {
    font-size: 11px;
  }
  .steps-empty span {
    font-size: 12px;
  }
  .run-caption {
    font-size: 12px;
  }
  .group-chip {
    font-size: 12px;
  }
  .group-chip span:last-child {
    font-size: 11px;
  }
  .group-tolerance-chip {
    font-size: 11px;
  }
  .group-help {
    font-size: 11px;
  }
  .history-count {
    font-size: 12px;
  }
  .history-records-header > p {
    font-size: 12.5px;
  }
  .history-source-note {
    font-size: 11.5px;
  }
  .history-sync-error {
    font-size: 11.5px;
  }
  .history-sync-error button {
    font-size: 11px;
  }
  .history-editor-footer {
    font-size: 12px;
  }
  .draw-record span {
    font-size: 11px;
  }
  .draw-record small {
    font-size: 11px;
  }
  .history-empty {
    font-size: 12px;
  }
  .history-sync-state {
    font-size: 11px;
  }
  .history-window button {
    font-size: 11px;
  }
  .frequency-head span {
    font-size: 11px;
  }
  .digit-frequency-item small {
    font-size: 11px;
  }
  .temperature-summary span {
    font-size: 11px;
  }
  .history-relation-tip {
    font-size: 12px;
  }
  .about-pills span {
    font-size: 12px;
  }
  .about-mark > span {
    font-size: 11px;
  }
  .tool-info-card > small {
    font-size: 11.5px;
  }
  .tool-tags span {
    font-size: 11px;
  }
  .workflow-step > span {
    font-size: 12px;
  }
  .workflow-step p {
    font-size: 11.5px;
  }
  .about-disclaimer {
    font-size: 12px;
  }
  .mode-switch button {
    font-size: 11px;
  }
  .helper-text {
    font-size: 11px;
  }
  .insight-title span {
    font-size: 11px;
  }
  .big-number small {
    font-size: 12px;
  }
  .histogram-column span {
    font-size: 11px;
  }
  .quick-sample strong {
    font-size: 12px;
  }
  .quick-sample span {
    font-size: 11px;
  }
  .result-stat span {
    font-size: 11px;
  }
  .result-stat strong small {
    font-size: 11px;
  }
  .result-mode-copy span {
    font-size: 11.5px;
  }
  .result-mode-switch button b {
    font-size: 11px;
  }
  .results-empty span {
    font-size: 12px;
  }
  .drawer-title-wrap p {
    font-size: 12px;
  }
  .drawer-section-head span {
    font-size: 11px;
  }
  .mode-toggle button {
    font-size: 11px;
  }
  .option-chip {
    font-size: 12px;
  }
  .drawer-group-tolerance {
    font-size: 11px;
  }
  .drawer-group-tolerance button {
    font-size: 11px;
  }
  .break-group-tabs button {
    font-size: 12px;
  }
  .break-group-title span {
    font-size: 11px;
  }
  .break-group-footer {
    font-size: 11px;
  }
  .break-group-footer button {
    font-size: 11px;
  }
  .subcondition-enable-row {
    font-size: 11px;
  }
  .multi-slot-heading span {
    font-size: 11px;
  }
  .multi-slot-heading > button {
    font-size: 11px;
  }
  .dan-hit-count-head {
    font-size: 10.5px;
  }
  .dan-hit-count-head > small {
    font-size: 11px;
  }
  .dan-count-mode-options button {
    font-size: 10px;
  }
  .multi-slot-summary {
    font-size: 11px;
  }
  .drawer-participation-toggle {
    font-size: 12px;
  }
  .drawer-participation-toggle b {
    font-size: 11px;
  }
  .field-actions button {
    font-size: 11px;
  }
  .drawer-divider {
    font-size: 11px;
  }
  .field-group label {
    font-size: 11px;
  }
  .custom-note {
    font-size: 11px;
  }
  .segmented-large button {
    font-size: 11px;
  }
  .live-preview span {
    font-size: 11px;
  }
  .tolerance-copy > div > span {
    font-size: 11.5px;
  }
  .tolerance-options button {
    font-size: 11px;
  }
  .tolerance-range-controls label {
    font-size: 11px;
  }
  .tolerance-range-controls select {
    font-size: 12px;
  }
  .custom-select-trigger {
    font-size: 12px;
  }
  .custom-select-caption {
    font-size: 12px;
  }
  .tolerance-choice-grid span {
    font-size: 11.5px;
  }
  .group-range-status > span {
    font-size: 12px;
  }
  .group-range-status small {
    font-size: 11px;
  }
  .range-field span {
    font-size: 11px;
  }
  .confirm-eyebrow {
    font-size: 11.5px;
  }
  .confirm-warning {
    font-size: 11.5px;
  }
  .modal-head p {
    font-size: 12px;
  }
  .help-list li::before {
    font-size: 12px;
  }
  .toast {
    font-size: 12px;
  }
  .sidebar-status > div > span, .sidebar-footer span {
    font-size: 12px;
  }
  .metric-label span:last-child {
    font-size: 12px;
  }
  .stat-copy strong small {
    font-size: 12px;
  }
  .filter-card .card-meta {
    font-size: 11.5px;
  }
  .filter-card-foot {
    font-size: 12.5px;
  }
  .active-indicator {
    font-size: 11.5px;
  }
  .step-count span {
    font-size: 11.5px;
  }
  .mode-switch button {
    font-size: 12.5px;
  }
  .insight-title span, .quick-sample span {
    font-size: 12px;
  }
  .result-stat span {
    font-size: 12.5px;
  }
  .mode-toggle button {
    font-size: 11.5px;
  }
  .subcondition-toggle button {
    font-size: 12px;
  }
  .field-actions button, .custom-note {
    font-size: 12px;
  }
  .field-group label {
    font-size: 12px;
  }
  .segmented-large button {
    font-size: 12.5px;
  }
  .live-preview span {
    font-size: 11.5px;
  }
  .tolerance-options button {
    font-size: 12px;
  }
}

@media (min-width: 761px) {
  .inline-small {
    font-size: 11px;
  }
}

/* Mobile small-text readability bump */
@media (max-width: 760px) {
  .brand-sub {
    font-size: 10px;
  }
  .status-orbit small {
    font-size: 10px;
  }
  .sidebar-status > div > span {
    font-size: 10px;
  }
  .sidebar-footer span {
    font-size: 10px;
  }
  .lottery-switch button b {
    font-size: 10px;
  }
  .card-meta {
    font-size: 10px;
  }
  .active-indicator {
    font-size: 10.5px;
  }
  .step-order {
    font-size: 10px;
  }
  .participation-toggle {
    font-size: 10px;
  }
  .step-param {
    font-size: 10.5px;
  }
  .param-mode {
    font-size: 10px;
  }
  .step-param-empty {
    font-size: 10px;
  }
  .step-count span {
    font-size: 10px;
  }
  .tolerance-chip {
    font-size: 10px;
  }
  .group-chip span:last-child {
    font-size: 10px;
  }
  .group-tolerance-chip {
    font-size: 10px;
  }
  .group-help {
    font-size: 10px;
  }
  .history-source-note {
    font-size: 10.5px;
  }
  .history-sync-error {
    font-size: 10.5px;
  }
  .history-sync-error button {
    font-size: 10px;
  }
  .draw-record span {
    font-size: 10px;
  }
  .draw-record small {
    font-size: 10px;
  }
  .history-sync-state {
    font-size: 10px;
  }
  .history-window button {
    font-size: 10px;
  }
  .frequency-head span {
    font-size: 10px;
  }
  .digit-frequency-item small {
    font-size: 10px;
  }
  .temperature-summary span {
    font-size: 10px;
  }
  .about-mark > span {
    font-size: 10px;
  }
  .tool-info-card > small {
    font-size: 10.5px;
  }
  .tool-tags span {
    font-size: 10px;
  }
  .workflow-step p {
    font-size: 10.5px;
  }
  .helper-text {
    font-size: 10px;
  }
  .insight-title span {
    font-size: 10px;
  }
  .histogram-column span {
    font-size: 10px;
  }
  .quick-sample span {
    font-size: 10px;
  }
  .result-stat strong small {
    font-size: 10px;
  }
  .result-mode-copy span {
    font-size: 10.5px;
  }
  .result-mode-switch button b {
    font-size: 10px;
  }
  .drawer-section-head span {
    font-size: 10px;
  }
  .mode-toggle button {
    font-size: 10.5px;
  }
  .drawer-group-tolerance {
    font-size: 10px;
  }
  .drawer-group-tolerance button {
    font-size: 10px;
  }
  .break-group-title span {
    font-size: 10px;
  }
  .break-group-footer {
    font-size: 10px;
  }
  .break-group-footer button {
    font-size: 10px;
  }
  .subcondition-enable-row {
    font-size: 10px;
  }
  .multi-slot-heading span {
    font-size: 10px;
  }
  .multi-slot-heading > button {
    font-size: 10px;
  }
  .dan-hit-count-head > small {
    font-size: 10px;
  }
  .multi-slot-summary {
    font-size: 10px;
  }
  .drawer-participation-toggle b {
    font-size: 10px;
  }
  .field-actions button {
    font-size: 10px;
  }
  .drawer-divider {
    font-size: 10px;
  }
  .custom-note {
    font-size: 10px;
  }
  .live-preview span {
    font-size: 10.5px;
  }
  .tolerance-copy > div > span {
    font-size: 10.5px;
  }
  .tolerance-range-controls label {
    font-size: 10px;
  }
  .tolerance-choice-grid span {
    font-size: 10.5px;
  }
  .group-range-status small {
    font-size: 10px;
  }
  .range-field span {
    font-size: 10px;
  }
  .confirm-eyebrow {
    font-size: 10.5px;
  }
  .confirm-warning {
    font-size: 10.5px;
  }
  .filter-card .card-meta {
    font-size: 10.5px;
  }
  .filter-card .active-indicator {
    font-size: 10px;
  }
  .filters-section-heading .heading-aside {
    font-size: 10.5px;
  }
  .inline-small {
    font-size: 10px;
  }
}

@media (max-width: 760px) {
  .subcondition-toggle button {
    font-size: 10px;
  }

  .pair-group-caption {
    gap: 8px;
  }

  .pair-group-caption span {
    font-size: 10px;
  }

  .pair-group-field {
    padding: 10px;
  }

  .number-repeat-copy {
    gap: 3px;
  }

  .number-repeat-copy strong {
    font-size: 11px;
  }

  .group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .group-row .group-chip {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .hero-metric:not(.wide) .metric-label span:last-child {
    display: none;
  }
}

.senior-mode-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #4c556c;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 650;
  gap: 7px;
  height: 38px;
  padding: 0 11px 0 7px;
  transition: 150ms ease;
  white-space: nowrap;
}

.senior-mode-toggle:hover {
  border-color: #b9c2d2;
  color: var(--ink);
}

.senior-mode-mark {
  align-items: center;
  background: #edf0ff;
  border-radius: 7px;
  color: var(--primary-deep);
  display: inline-flex;
  font-size: 14px;
  font-weight: 750;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.senior-mode-toggle.active {
  background: #172449;
  border-color: #172449;
  color: #fff;
}

.senior-mode-toggle.active .senior-mode-mark {
  background: #fff;
  color: #26378f;
}

@media (max-width: 760px) {
  .senior-mode-toggle {
    justify-content: center;
    padding: 0;
    width: 38px;
  }

  .senior-mode-label {
    display: none;
  }
}

html.senior-mode {
  --canvas: #edf1f6;
  --ink: #071221;
  --ink-soft: #263347;
  --line: #a5b1c1;
  --line-strong: #7d899b;
  --muted: #3c485b;
  --primary: #3047c8;
  --primary-deep: #2137aa;
  --primary-soft: #dfe5ff;
  --surface: #ffffff;
  --surface-soft: #f4f7fa;
}

html.senior-mode body {
  background: #edf1f6;
  color: #071221;
  font-size: 16px;
}

html.senior-mode .topbar {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 2px solid #aeb8c8;
}

html.senior-mode .nav-item {
  color: #e4e9f2;
  font-size: 15px;
  font-weight: 650;
}

html.senior-mode .brand-sub,
html.senior-mode .nav-caption,
html.senior-mode .sidebar-status span,
html.senior-mode .sidebar-footer span,
html.senior-mode .site-copyright {
  color: #d1d8e5 !important;
  font-size: 12px;
}

html.senior-mode .nav-count {
  font-size: 13px;
}

html.senior-mode .primary-button,
html.senior-mode .secondary-button,
html.senior-mode .ghost-button,
html.senior-mode .text-button,
html.senior-mode .field-actions button,
html.senior-mode .mode-toggle button,
html.senior-mode .option-chip,
html.senior-mode .segmented-large button {
  font-size: 14px;
  font-weight: 650;
}

html.senior-mode .primary-button,
html.senior-mode .secondary-button,
html.senior-mode .ghost-button {
  min-height: 44px;
}

html.senior-mode .simple-input,
html.senior-mode .textarea-small,
html.senior-mode .history-textarea,
html.senior-mode .search-box input {
  border: 2px solid #9dabbd !important;
  background: #fff !important;
  color: #071221 !important;
  font-size: 15px !important;
}

html.senior-mode .filter-card,
html.senior-mode .panel,
html.senior-mode .toolbar-card,
html.senior-mode .stat-card,
html.senior-mode .drawer,
html.senior-mode .modal {
  border-color: #a8b3c2;
}

html.senior-mode .filter-card h3 {
  color: #071221;
  font-size: 18px;
}

html.senior-mode .filter-card p {
  color: #334158;
  font-size: 15px;
  line-height: 1.65;
}

html.senior-mode .card-meta,
html.senior-mode .filter-card-foot,
html.senior-mode .active-indicator,
html.senior-mode .page-heading p,
html.senior-mode .section-heading p,
html.senior-mode .panel-header p,
html.senior-mode .step-summary,
html.senior-mode .step-param-empty,
html.senior-mode .inline-small,
html.senior-mode .stat-copy span {
  color: #3b485b !important;
  font-size: 13px !important;
}

html.senior-mode .page-heading h1 {
  font-size: 34px;
}

html.senior-mode .section-heading h2,
html.senior-mode .panel-header h2 {
  color: #071221;
  font-size: 19px;
}

html.senior-mode .hero-copy p {
  color: #d1d8e8;
  font-size: 15px;
}

html.senior-mode .eyebrow,
html.senior-mode .metric-label {
  font-size: 14px;
}

html.senior-mode .metric-label span:last-child {
  color: #aeb9d0;
  font-size: 12px;
}

html.senior-mode .metric-value {
  font-size: 30px;
}

html.senior-mode .metric-value small {
  color: #c1c9da;
  font-size: 13px;
}

html.senior-mode .category-tab {
  font-size: 14px;
}

html.senior-mode .category-tab.active {
  background: #1f2c4d;
  color: #fff;
}

html.senior-mode .option-chip {
  background: #fff;
  border-color: #aeb8c8;
  color: #253247;
}

html.senior-mode .option-chip.selected,
html.senior-mode .mode-toggle button.active,
html.senior-mode .segmented-large button.active {
  background: #263eae;
  border-color: #263eae;
  color: #fff;
}

html.senior-mode .drawer-title-wrap h2,
html.senior-mode .modal-head h2 {
  font-size: 24px;
}

html.senior-mode .drawer-title-wrap p,
html.senior-mode .modal-head p {
  color: #3b485b;
  font-size: 15px;
  line-height: 1.65;
}

html.senior-mode .field-label-row strong,
html.senior-mode .field-group label,
html.senior-mode .multi-slot-heading strong,
html.senior-mode .dan-hit-count-head,
html.senior-mode .number-repeat-copy strong {
  color: #172337;
  font-size: 14px;
}

html.senior-mode .custom-note,
html.senior-mode .group-help,
html.senior-mode .drawer-group-tolerance,
html.senior-mode .tolerance-copy > div > span,
html.senior-mode .group-range-status small,
html.senior-mode .range-field span {
  color: #354256 !important;
  font-size: 13px !important;
  line-height: 1.6;
}

html.senior-mode .dan-count-mode-options button,
html.senior-mode .dan-hit-count-options button,
html.senior-mode .range-option-grid button {
  font-size: 13px;
}

html.senior-mode .step-row {
  border-color: #aab5c4;
}

html.senior-mode .step-title-line strong {
  color: #071221;
  font-size: 16px;
}

html.senior-mode .step-param {
  color: #2d3a4e;
  font-size: 13px;
}

@media (max-width: 480px) {
  .topbar {
    gap: 6px;
    padding: 0 9px;
  }

  .topbar-left,
  .topbar-actions {
    gap: 6px;
    min-width: 0;
  }

  .topbar-left .mobile-menu {
    flex: 0 0 38px;
    height: 38px;
    width: 38px;
  }

  .lottery-switch {
    gap: 2px;
    padding: 2px;
  }

  .lottery-switch button {
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0 5px;
  }

  .reference-chip {
    gap: 4px;
    height: 36px;
    padding: 0 7px;
  }

  .reference-chip input {
    font-size: 12px;
    padding: 3px 4px;
    width: 36px;
  }

  .senior-mode-toggle {
    height: 36px;
    width: 36px;
  }

  .senior-mode-mark {
    height: 23px;
    width: 23px;
  }

  .primary-button.compact {
    flex: 0 0 auto;
    font-size: 12px;
    gap: 4px;
    height: 36px;
    padding: 0 8px;
  }

  html.senior-mode .primary-button.compact {
    font-size: 13px;
    height: 38px;
    min-height: 38px;
    padding: 0 8px;
  }

}

@media (max-width: 360px) {
  .reference-chip .live-dot {
    display: none;
  }

  .reference-chip {
    padding: 0 5px;
  }

  .topbar-left,
  .topbar-actions {
    gap: 4px;
  }
}
