/* ==========================================================================
   餐边柜 SKU Studio · public interface
   Fluid glass, quiet motion, three breakpoints.
   ========================================================================== */

:root,
html[data-bg="aurora"] {
  --orb-one: rgba(88, 126, 255, 0.42);
  --orb-two: rgba(255, 177, 128, 0.3);
  --orb-three: rgba(132, 226, 203, 0.28);
}

html[data-bg="sand"] {
  --orb-one: rgba(215, 169, 102, 0.34);
  --orb-two: rgba(238, 211, 167, 0.4);
  --orb-three: rgba(174, 189, 142, 0.28);
}

html[data-bg="bloom"] {
  --orb-one: rgba(255, 145, 177, 0.28);
  --orb-two: rgba(255, 190, 137, 0.3);
  --orb-three: rgba(184, 156, 255, 0.25);
}

html[data-bg="mono"] {
  --orb-one: rgba(137, 148, 166, 0.25);
  --orb-two: rgba(185, 192, 204, 0.25);
  --orb-three: rgba(110, 121, 140, 0.18);
}

html[data-theme="dark"] {
  --orb-one: rgba(49, 85, 203, 0.22);
  --orb-two: rgba(148, 82, 49, 0.16);
  --orb-three: rgba(34, 115, 101, 0.17);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --orb-one: rgba(49, 85, 203, 0.22);
    --orb-two: rgba(148, 82, 49, 0.16);
    --orb-three: rgba(34, 115, 101, 0.17);
  }
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, 1320px);
  margin-inline: auto;
  padding: calc(18px + var(--safe-top)) 0 calc(48px + var(--safe-bottom));
}

.skip-link {
  position: fixed;
  z-index: 300;
  top: calc(12px + var(--safe-top));
  left: 16px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 13px;
  font-weight: 650;
  transform: translateY(-160%);
  transition: transform var(--speed-base) var(--ease-spring);
}

.skip-link:focus-visible {
  color: var(--accent-contrast);
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Ambient light field
   -------------------------------------------------------------------------- */

.ambient {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(88px);
  opacity: 0.9;
  will-change: transform;
}

.orb--one {
  top: -22vw;
  left: -6vw;
  width: 58vw;
  max-width: 850px;
  aspect-ratio: 1;
  background: var(--orb-one);
  animation: drift-one 30s var(--ease-smooth) infinite alternate;
}

.orb--two {
  top: 12vh;
  right: -22vw;
  width: 62vw;
  max-width: 920px;
  aspect-ratio: 1;
  background: var(--orb-two);
  animation: drift-two 36s var(--ease-smooth) infinite alternate;
}

.orb--three {
  bottom: -34vw;
  left: 24vw;
  width: 58vw;
  max-width: 800px;
  aspect-ratio: 1;
  background: var(--orb-three);
  animation: drift-three 32s var(--ease-smooth) infinite alternate;
}

.ambient__grain {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.52'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  z-index: 40;
  top: calc(12px + var(--safe-top));
  margin-bottom: 22px;
  border-radius: 22px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-float), var(--inset-highlight);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 7px 10px 7px 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--accent-contrast);
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255, 255, 255, 0.36), transparent 52%),
    linear-gradient(145deg, var(--accent), var(--accent-alt));
  box-shadow:
    0 12px 24px -14px rgba(var(--accent-rgb), 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.04em;
  user-select: none;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand__name {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 660;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand__tagline {
  color: var(--text-tertiary);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.nav-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--text-secondary);
  background: transparent;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
  transition:
    color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth),
    border-color var(--speed-fast) var(--ease-smooth),
    transform var(--speed-fast) var(--ease-out);
}

.nav-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-button {
  position: relative;
}

.nav-button:hover,
.icon-button:hover {
  color: var(--text);
  background: var(--surface-muted);
}

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

.icon-button {
  width: 38px;
  padding: 0;
}

.nav-button__dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  animation: dot-breathe 2.8s var(--ease-smooth) infinite;
}

.theme-glyph {
  display: grid;
  place-items: center;
}

.theme-glyph .icon-sun {
  display: none;
}

.theme-glyph .icon-moon {
  display: block;
}

html[data-theme="dark"] .theme-glyph .icon-sun {
  display: block;
}

html[data-theme="dark"] .theme-glyph .icon-moon {
  display: none;
}

.is-hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Announcement banner
   -------------------------------------------------------------------------- */

.notice-slot {
  position: relative;
  z-index: 2;
}

.notice {
  --notice-accent: var(--accent);
  --notice-tint: var(--accent-soft);
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(120% 220% at 0% 0%, var(--notice-tint), transparent 55%),
    linear-gradient(140deg, var(--glass-strong), var(--glass));
  animation: notice-in 0.65s var(--ease-out) both;
}

.notice[data-tone="success"] {
  --notice-accent: var(--success);
  --notice-tint: var(--success-soft);
}

.notice[data-tone="warning"] {
  --notice-accent: var(--warning);
  --notice-tint: var(--warning-soft);
}

.notice[data-tone="important"] {
  --notice-accent: var(--danger);
  --notice-tint: var(--danger-soft);
}

.notice::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: var(--notice-accent);
  opacity: 0.9;
}

.notice__content {
  flex: 1;
  min-width: 0;
}

.notice__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--text-tertiary);
  font-size: 10.5px;
}

.notice__badge,
.notice__pinned {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--notice-accent);
  background: var(--notice-tint);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.04em;
}

.notice__pinned {
  color: var(--text-secondary);
  background: var(--surface-muted);
}

.notice__title {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 640;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.notice__body {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.55;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.notice__actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
}

.notice__actions .btn {
  height: 34px;
  padding: 0 13px;
  border-color: var(--hairline);
  background: var(--surface);
  font-size: 11.5px;
}

.notice__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--text-tertiary);
  background: transparent;
  cursor: pointer;
  transition:
    color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth);
}

.notice__close:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.notice__close svg {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   Layout · sidebar and workspace
   -------------------------------------------------------------------------- */

.app-layout {
  display: grid;
  grid-template-columns: minmax(300px, 352px) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 38px);
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding-top: 12px;
}

.workspace {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding: 3px 3px 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.65;
}

.hero__title {
  margin-top: 17px;
  color: var(--text);
  font-size: clamp(2.35rem, 3.15vw, 3.1rem);
  font-weight: 670;
  letter-spacing: -0.055em;
  line-height: 1.05;
  text-wrap: balance;
}

.hero__subtitle {
  max-width: 36ch;
  margin-top: 17px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.75;
  text-wrap: pretty;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 22px;
}

.metric {
  min-width: 0;
  padding: 12px 11px 11px;
  border: 1px solid var(--hairline);
  border-radius: 15px;
  background: var(--surface-soft);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--inset-highlight);
}

.metric__value {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.3rem, 1.95vw, 1.55rem);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.metric:first-child .metric__value {
  color: var(--accent);
}

.metric__label {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 540;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Mode switch
   -------------------------------------------------------------------------- */

.workbench {
  position: sticky;
  z-index: 32;
  top: 100px;
  display: flex;
  align-items: stretch;
  gap: 5px;
  margin-bottom: 13px;
  padding: 6px;
  border-radius: 22px;
}

.mode-panel {
  padding: 5px 5px 7px;
  border-radius: 18px;
}

.mode-panel--desktop {
  display: flex;
  flex: 0 1 318px;
  flex-direction: column;
  justify-content: center;
  min-width: 268px;
  padding-right: 14px;
  border-right: 1px solid var(--hairline);
  border-radius: 0;
}

.mode-panel--mobile {
  display: none;
}

.workbench .summary {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  padding: 8px 10px 8px 12px;
  border-radius: 0;
}

.workbench .summary__chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.workbench .summary__chips::-webkit-scrollbar {
  display: none;
}

.workbench .summary-chip {
  flex: 0 0 auto;
}

.segmented {
  --mode-index: 0;
  position: relative;
  display: flex;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: var(--surface-muted);
  box-shadow: inset 0 1px 2px rgba(20, 25, 36, 0.04);
  isolation: isolate;
}

.segmented__thumb {
  position: absolute;
  z-index: 0;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--surface-strong);
  box-shadow:
    0 2px 7px rgba(20, 25, 36, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform var(--speed-base) var(--ease-spring);
}

html[data-theme="dark"] .segmented__thumb {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.segmented[data-mode="combo"] .segmented__thumb {
  transform: translateX(100%);
}

.segment {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  color: var(--text-secondary);
  background: transparent;
  font-size: 13px;
  font-weight: 570;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--speed-fast) var(--ease-smooth);
}

.segment:hover {
  color: var(--text);
}

.segment[aria-selected="true"] {
  color: var(--text);
  font-weight: 640;
}

.mode-panel__caption {
  padding: 8px 9px 2px;
  color: var(--text-tertiary);
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
  transition: opacity var(--speed-base) var(--ease-smooth);
}

/* --------------------------------------------------------------------------
   Step rail
   -------------------------------------------------------------------------- */

.steps-panel {
  min-width: 0;
}

.steps-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 6px 9px;
}

.steps-panel__label {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.steps-panel__count {
  color: var(--text-tertiary);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.steps::before {
  content: "";
  position: absolute;
  top: 23px;
  bottom: 23px;
  left: 24px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--accent-line),
    var(--hairline) 55%,
    var(--hairline)
  );
  pointer-events: none;
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text-secondary);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth),
    border-color var(--speed-fast) var(--ease-smooth),
    transform var(--speed-fast) var(--ease-out);
}

.step:hover:not(:disabled):not(.is-active) {
  color: var(--text);
  background: var(--surface-soft);
}

.step:active:not(:disabled) {
  transform: scale(0.995);
}

.step:disabled {
  cursor: default;
  opacity: 0.42;
}

.step.is-active {
  color: var(--text);
  border-color: var(--hairline);
  background: var(--surface);
  box-shadow: var(--shadow-xs), var(--inset-highlight);
}

.step__marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  color: var(--text-tertiary);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  transition:
    color var(--speed-base) var(--ease-smooth),
    background var(--speed-base) var(--ease-smooth),
    border-color var(--speed-base) var(--ease-smooth),
    box-shadow var(--speed-base) var(--ease-smooth);
}

.step__marker svg {
  width: 12px;
  height: 12px;
}

.step.is-active .step__marker {
  color: var(--accent-contrast);
  border-color: transparent;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.step.is-done .step__marker {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.step__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.step__name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 570;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.step.is-active .step__name {
  font-weight: 650;
}

.step__meta {
  overflow: hidden;
  color: var(--text-tertiary);
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.step__index {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0.72;
}

.step.is-active .step__index {
  color: var(--accent);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Summary
   -------------------------------------------------------------------------- */

.summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 11px 13px;
  border-radius: 18px;
}

.workspace > .summary {
  margin-bottom: 13px;
}

.workbench .summary__empty {
  padding-top: 1px;
}

.summary__head {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
}

.summary__title {
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.summary__hint {
  color: var(--text-tertiary);
  font-size: 9.5px;
  line-height: 1.45;
}

.summary__chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 27px;
  padding: 4px 9px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth),
    transform var(--speed-fast) var(--ease-out);
}

.summary-chip:hover {
  border-color: var(--accent-line);
  background: var(--accent-softer);
  transform: translateY(-1px);
}

.summary-chip__label {
  flex: 0 0 auto;
  color: var(--text-tertiary);
}

.summary-chip__value {
  overflow: hidden;
  font-weight: 560;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.summary__empty {
  flex: 1;
  margin-top: 0;
  color: var(--text-tertiary);
  font-size: 10.5px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Wizard shell
   -------------------------------------------------------------------------- */

.wizard {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: calc(var(--radius) + 4px);
  min-height: 620px;
  animation: panel-in 0.85s var(--ease-out) both;
}

.wizard__progress {
  height: 3px;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px) calc(var(--radius) + 4px) 0 0;
  background: var(--hairline);
}

.wizard__progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.55);
  transition: width 0.65s var(--ease-out);
}

.wizard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 31px 34px 22px;
}

.wizard__heading {
  min-width: 0;
}

.step-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.wizard__title {
  margin-top: 9px;
  color: var(--text);
  font-size: clamp(1.65rem, 2.2vw, 2rem);
  font-weight: 660;
  letter-spacing: -0.04em;
  line-height: 1.15;
  text-wrap: balance;
}

.wizard__title:focus,
.modal:focus {
  outline: none;
}

.wizard__hint {
  max-width: 61ch;
  margin-top: 9px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
  text-wrap: pretty;
}

.step-tools {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 3px;
}

.step-content {
  flex: 1 1 auto;
  padding: 6px 34px 14px;
}

.step-content.is-enter {
  animation: content-in 0.5s var(--ease-out) both;
}

.step-content.is-quiet {
  animation: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 12.5px;
  font-weight: 590;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth),
    border-color var(--speed-fast) var(--ease-smooth),
    box-shadow var(--speed-fast) var(--ease-smooth),
    transform var(--speed-fast) var(--ease-out),
    opacity var(--speed-fast) var(--ease-smooth);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: scale(0.975);
}

.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--primary {
  color: var(--accent-contrast);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background:
    radial-gradient(120% 140% at 10% 0%, rgba(255, 255, 255, 0.24), transparent 50%),
    linear-gradient(135deg, var(--accent), var(--accent-alt));
  box-shadow:
    0 14px 26px -16px rgba(var(--accent-rgb), 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--primary:hover:not(:disabled) {
  box-shadow:
    0 17px 32px -15px rgba(var(--accent-rgb), 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--ghost {
  color: var(--text-secondary);
  border-color: var(--hairline);
  background: var(--surface);
  box-shadow: var(--inset-highlight);
}

.btn--ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--hairline-strong);
  background: var(--surface-strong);
}

.btn--quiet {
  color: var(--text-secondary);
  border-color: transparent;
  background: transparent;
}

.btn--quiet:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-muted);
}

.btn--danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 22%, transparent);
  background: var(--danger-soft);
}

.btn--sm {
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 10.5px;
  box-shadow: none;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  color: var(--text-secondary);
  background: var(--surface);
  font-size: 11px;
  font-weight: 560;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth),
    border-color var(--speed-fast) var(--ease-smooth),
    transform var(--speed-fast) var(--ease-out);
}

.mini-btn svg {
  width: 13px;
  height: 13px;
}

.mini-btn:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-softer);
}

.mini-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.mini-btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.mini-btn--danger:hover:not(:disabled) {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 24%, transparent);
  background: var(--danger-soft);
}

/* --------------------------------------------------------------------------
   Selection groups and option cards
   -------------------------------------------------------------------------- */

.series-group {
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface-soft) 80%, transparent);
}

.series-group + .series-group {
  margin-top: 13px;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.group-head__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.group-head__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.group-head h3 {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  font-weight: 640;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.group-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.group-empty {
  padding: 4px 0 1px;
  color: var(--text-tertiary);
  font-size: 11.5px;
  line-height: 1.6;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
  gap: 10px;
}

.option-grid--compact .option {
  min-height: 48px;
  padding: 11px 38px 11px 12px;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  border-radius: 14px;
}

.option-grid--compact .option__title {
  max-width: none;
  padding-right: 0;
  font-size: 15.5px;
  line-height: 1.35;
}

.option-grid--compact .option__check {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.option-grid--compact .option.is-selected .option__check {
  transform: translateY(-50%) scale(1.06);
}

.option-grid--compact .option.is-picked .option__check {
  animation: compact-check-pop 0.42s var(--ease-spring);
}

.option-grid--compact .option__tag {
  margin-top: 0;
  font-size: 10.5px;
}

@keyframes compact-check-pop {
  0% {
    transform: translateY(-50%) scale(0.6);
  }
  55% {
    transform: translateY(-50%) scale(1.16);
  }
  100% {
    transform: translateY(-50%) scale(1.06);
  }
}

.option {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 91px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
  color: var(--text);
  background: linear-gradient(150deg, var(--surface-strong), var(--surface-soft));
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--speed-base) var(--ease-smooth),
    background var(--speed-base) var(--ease-smooth),
    box-shadow var(--speed-base) var(--ease-smooth),
    transform var(--speed-base) var(--ease-out);
}

.option::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -50px;
  right: -50px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 18%, transparent),
    transparent 70%
  );
  opacity: 0;
  transition: opacity var(--speed-base) var(--ease-smooth);
}

.option:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.option:hover::before {
  opacity: 0.6;
}

.option:active {
  transform: translateY(-1px) scale(0.99);
}

.option.is-selected {
  border-color: var(--accent);
  background:
    linear-gradient(
      150deg,
      color-mix(in srgb, var(--accent) 9%, var(--surface-strong)),
      var(--surface)
    );
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 8px 24px -18px rgba(var(--accent-rgb), 0.5);
  transform: translateY(-1px);
}

.option.is-selected::before {
  opacity: 1;
}

.option__check {
  position: absolute;
  top: 11px;
  right: 11px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  color: transparent;
  background: var(--surface);
  transition:
    color var(--speed-base) var(--ease-spring),
    background var(--speed-base) var(--ease-spring),
    border-color var(--speed-base) var(--ease-spring),
    transform var(--speed-base) var(--ease-spring);
}

.option__check svg {
  width: 10px;
  height: 10px;
}

.option.is-selected .option__check {
  color: var(--accent-contrast);
  border-color: var(--accent);
  background: var(--accent);
  transform: scale(1.06);
}

.option.is-picked .option__check {
  animation: check-pop 0.42s var(--ease-spring);
}

.option__title {
  max-width: calc(100% - 14px);
  padding-right: 8px;
  color: inherit;
  font-size: 13px;
  font-weight: 590;
  letter-spacing: -0.01em;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.option.is-selected .option__title {
  color: var(--accent);
  font-weight: 650;
}

.option__desc {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.55;
}

.option__tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-top: auto;
  padding: 1px 6px;
  border: 1px solid color-mix(in srgb, var(--warning) 18%, transparent);
  border-radius: 999px;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
}

.option__desc + .option__tag {
  margin-top: 8px;
}

/* Optional rich heading used by the series groups */
.group-head__sub {
  color: var(--text-tertiary);
  font-size: 10px;
}

/* --------------------------------------------------------------------------
   Combo builder
   -------------------------------------------------------------------------- */

.combo-series {
  padding: 14px;
}

.combo-series .group-head {
  margin-bottom: 10px;
}

.combo-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.combo-card {
  padding: 7px 10px;
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  transition:
    border-color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth);
}

.combo-card:first-child {
  border-top: 0;
}

.combo-card:hover {
  background: var(--surface-soft);
}

.combo-card.is-duplicate {
  background: color-mix(in srgb, var(--danger-soft) 70%, var(--surface));
  box-shadow: inset 2px 0 0 var(--danger);
}

.combo-card__rail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.combo-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 10px;
  cursor: pointer;
}

.combo-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.combo-check__box {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid var(--hairline-strong);
  border-radius: 5px;
  color: transparent;
  background: var(--surface);
  transition:
    color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth),
    border-color var(--speed-fast) var(--ease-smooth);
}

.combo-check__box svg {
  width: 10px;
  height: 10px;
}

.combo-check input:checked + .combo-check__box {
  color: var(--accent-contrast);
  border-color: var(--accent);
  background: var(--accent);
}

.combo-check input:focus-visible + .combo-check__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.combo-card__title {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 620;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--text-secondary);
  background: var(--surface-muted);
  font-size: 9px;
  font-weight: 620;
  line-height: 1;
}

.badge--danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.badge--accent {
  color: var(--accent);
  background: var(--accent-soft);
}

.combo-card__actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
}

.combo-icon-btn {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition:
    color var(--speed-fast) var(--ease-smooth),
    border-color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth),
    transform var(--speed-fast) var(--ease-out);
}

.combo-icon-btn svg {
  width: 14px;
  height: 14px;
}

.combo-icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-softer);
}

.combo-icon-btn:active {
  transform: scale(0.92);
}

.combo-icon-btn.is-danger:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 24%, transparent);
  background: var(--danger-soft);
}

.combo-add-btn {
  display: inline-flex;
  width: auto;
  padding: 0 9px;
  gap: 4px;
  color: var(--text-secondary);
  background: var(--surface);
  font-size: 11.5px;
  white-space: nowrap;
}

.combo-add-btn svg {
  width: 12px;
  height: 12px;
}

.combo-add-btn:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-softer);
}

.combo-fields {
  display: flex;
  flex: 1 1 300px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.select-wrap {
  position: relative;
  flex: 1 1 166px;
  min-width: 0;
}

.combo-select {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 11px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: var(--surface-strong);
  font-size: 13px;
  font-weight: 510;
  line-height: 36px;
  text-overflow: ellipsis;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition:
    border-color var(--speed-fast) var(--ease-smooth),
    box-shadow var(--speed-fast) var(--ease-smooth);
}

.combo-select:hover {
  border-color: var(--hairline-strong);
}

.combo-select:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.select-wrap__chevron {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 13px;
  height: 13px;
  color: var(--text-tertiary);
  pointer-events: none;
  transform: translateY(-50%);
}

.combo-plus {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.7;
}

.combo-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.5;
}

.combo-status::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: currentColor;
}

.combo-status.is-ready {
  color: var(--success);
}

.combo-status.is-error {
  color: var(--danger);
}

.group-head .combo-status {
  margin-top: 0;
}

/* Cascading cabinet picker */

body.is-picker-open {
  overflow: hidden;
}

.combo-picker-wrap {
  position: relative;
  flex: 1 1 166px;
  min-width: 0;
}

.combo-picker-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: var(--surface-strong);
  font-size: 13px;
  font-weight: 510;
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--speed-fast) var(--ease-smooth),
    box-shadow var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth);
}

.combo-picker-trigger:hover {
  border-color: var(--hairline-strong);
}

.combo-picker-trigger:focus-visible,
.combo-picker-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.combo-picker-trigger__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.combo-picker-trigger:not(.has-value) .combo-picker-trigger__text {
  color: var(--text-tertiary);
}

.combo-picker-trigger__chevron {
  display: grid;
  place-items: center;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
}

.combo-picker-trigger__chevron svg {
  width: 13px;
  height: 13px;
}

.picker-layer {
  position: fixed;
  z-index: 180;
  inset: 0;
  background: rgba(7, 10, 15, 0.18);
  -webkit-backdrop-filter: blur(5px) saturate(120%);
  backdrop-filter: blur(5px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--speed-base) var(--ease-smooth),
    visibility var(--speed-base) var(--ease-smooth);
}

.picker-layer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.combo-picker {
  position: fixed;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  outline: none;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(36px) saturate(165%);
  backdrop-filter: blur(36px) saturate(165%);
  box-shadow:
    0 40px 90px -38px rgba(4, 9, 15, 0.62),
    0 10px 28px -16px rgba(4, 9, 15, 0.35),
    var(--inset-highlight);
  opacity: 0;
  transform: translateY(-7px) scale(0.985);
  transition:
    opacity var(--speed-base) var(--ease-out),
    transform var(--speed-base) var(--ease-spring);
}

.picker-layer.is-open .combo-picker {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.combo-picker [hidden] {
  display: none !important;
}

.combo-picker__grabber {
  display: none;
}

.combo-picker__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  padding: 17px 17px 12px 19px;
  border-bottom: 1px solid var(--hairline);
}

.combo-picker__head h2 {
  color: var(--text);
  font-size: 19px;
  font-weight: 660;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.combo-picker__head p {
  max-width: 46ch;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.55;
}

.combo-picker__close {
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--text-tertiary);
  background: var(--surface-muted);
  cursor: pointer;
}

.combo-picker__close:hover {
  color: var(--text);
  background: var(--surface);
}

.combo-picker__close svg {
  width: 14px;
  height: 14px;
}

.combo-picker__body {
  min-height: 0;
  overflow-y: auto;
  padding: 6px 10px 10px;
  overscroll-behavior: contain;
}

.picker-series + .picker-series {
  border-top: 1px solid var(--hairline);
}

.picker-series__toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 9px 8px;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.picker-series__toggle:hover,
.picker-model__toggle:hover {
  background: var(--surface-soft);
}

.picker-series__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.picker-series__name {
  font-size: 14.5px;
  font-weight: 650;
}

.picker-series__meta,
.picker-model__meta {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 450;
  white-space: nowrap;
}

.picker-chevron {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--text-tertiary);
  transition: transform var(--speed-base) var(--ease-smooth);
}

.picker-chevron svg {
  width: 13px;
  height: 13px;
}

[aria-expanded="true"] > .picker-chevron {
  transform: rotate(180deg);
}

.picker-series__body {
  padding: 0 0 8px 13px;
}

.picker-model {
  border-top: 1px solid color-mix(in srgb, var(--hairline) 72%, transparent);
}

.picker-model:first-child {
  border-top: 0;
}

.picker-model__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 7px 8px;
  border: 0;
  border-radius: 9px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.picker-model__name {
  font-size: 14px;
  font-weight: 560;
}

.picker-model__widths {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 1px 6px 10px 8px;
}

.picker-width {
  min-width: 68px;
  height: 35px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--text-secondary);
  background: var(--surface);
  font-size: 13px;
  font-weight: 540;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth),
    border-color var(--speed-fast) var(--ease-smooth),
    transform var(--speed-fast) var(--ease-out);
}

.picker-width:hover {
  color: var(--text);
  border-color: var(--hairline-strong);
  background: var(--surface-strong);
}

.picker-width:active {
  transform: scale(0.97);
}

.picker-width.is-selected {
  color: var(--accent-contrast);
  border-color: var(--accent);
  background: var(--accent);
  font-weight: 600;
}

.combo-picker__foot {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  padding: 10px 17px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--hairline);
}

.picker-clear {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--text-secondary);
  background: var(--surface);
  font-size: 11.5px;
  cursor: pointer;
}

.picker-clear:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 22%, transparent);
  background: var(--danger-soft);
}

.picker-empty {
  display: block;
  padding: 10px 8px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.picker-empty--large {
  padding: 32px 16px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Result
   -------------------------------------------------------------------------- */

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

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 17px 16px 15px;
  border: 1px solid var(--hairline);
  border-radius: 17px;
  background: linear-gradient(145deg, var(--surface), var(--surface-soft));
}

.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-line), transparent);
}

.stat-card:first-child {
  border-color: var(--accent-line);
  background:
    radial-gradient(140% 150% at 0% 0%, var(--accent-soft), transparent 60%),
    linear-gradient(145deg, var(--surface-strong), var(--surface));
}

.stat-card__value {
  color: var(--text);
  font-size: clamp(1.7rem, 2.5vw, 2.25rem);
  font-variant-numeric: tabular-nums;
  font-weight: 660;
  letter-spacing: -0.06em;
  line-height: 1;
}

.stat-card:first-child .stat-card__value {
  color: var(--accent);
}

.stat-card__label {
  margin-top: 7px;
  color: var(--text-tertiary);
  font-size: 10.5px;
  font-weight: 520;
  line-height: 1.4;
}

.result-card {
  margin-top: 16px;
  border: 1px solid var(--hairline);
  border-radius: 19px;
  overflow: hidden;
  background: var(--surface-soft);
}

.result-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--hairline);
}

.result-card__title {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 640;
  letter-spacing: -0.01em;
}

.result-card__hint {
  margin-top: 2px;
  color: var(--text-tertiary);
  font-size: 10.5px;
  line-height: 1.5;
}

.result-card__count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.result-list {
  max-height: 540px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.result-series + .result-series {
  border-top: 1px solid var(--hairline);
}

.result-series__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 18px;
  background: var(--surface);
}

.result-series__title {
  color: var(--text);
  font-size: 13px;
  font-weight: 640;
  letter-spacing: 0.01em;
}

.result-series__meta {
  padding: 7px 18px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  color: var(--accent);
  background: var(--accent-softer);
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.result-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 18px;
  border-top: 1px solid color-mix(in srgb, var(--hairline) 66%, transparent);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  transition: background var(--speed-fast) var(--ease-smooth);
}

.result-series__head + .result-row,
.result-series__meta + .result-row {
  border-top: 0;
}

.result-row:hover {
  background: var(--surface);
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 620;
  line-height: 1;
  white-space: nowrap;
}

.pill--stand {
  color: #046fc2;
  background: rgba(2, 132, 199, 0.1);
}

.pill--floor {
  color: #a028a8;
  background: rgba(192, 38, 211, 0.09);
}

html[data-theme="dark"] .pill--stand {
  color: #75c8ff;
  background: rgba(88, 174, 255, 0.13);
}

html[data-theme="dark"] .pill--floor {
  color: #e1a2ff;
  background: rgba(213, 130, 255, 0.12);
}

.result-row__name {
  color: var(--text);
  font-weight: 560;
  overflow-wrap: anywhere;
}

.result-row__extra {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--text-secondary);
  background: var(--surface-muted);
  font-size: 10px;
}

.tag--warning {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}

.result-spacer {
  height: 7px;
}

.result-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--hairline);
  color: var(--text-tertiary);
  font-size: 9.5px;
}

.result-foot .summary-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.result-foot .summary-inline span {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-muted);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 34px 24px;
  text-align: center;
}

.empty-state__art {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  color: var(--text-tertiary);
  background: var(--surface);
  box-shadow: var(--inset-highlight);
}

.empty-state__art svg {
  width: 24px;
  height: 24px;
  opacity: 0.72;
}

.empty-state h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 640;
  letter-spacing: -0.02em;
}

.empty-state p {
  max-width: 36ch;
  margin-top: 6px;
  color: var(--text-tertiary);
  font-size: 11.5px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Wizard footer and page footer
   -------------------------------------------------------------------------- */

.wizard__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 34px 28px;
  border-top: 1px solid var(--hairline);
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 7px 0;
  color: var(--text-tertiary);
  font-size: 10px;
  line-height: 1.5;
}

.page-footer__left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 9px;
  min-width: 0;
}

.page-footer__note {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.page-footer__copy {
  flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  z-index: 220;
  bottom: calc(28px + var(--safe-bottom));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(90vw, 420px);
  padding: 10px 15px 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: var(--on-dark);
  background: rgba(15, 18, 23, 0.88);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
  font-size: 11.5px;
  font-weight: 520;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 14px) scale(0.96);
  transition:
    opacity var(--speed-base) var(--ease-out),
    transform var(--speed-base) var(--ease-spring);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.toast__icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  color: #07130e;
  background: #64e3a6;
}

.toast__icon svg {
  width: 12px;
  height: 12px;
}

.toast.is-error .toast__icon {
  color: #200808;
  background: #ff9b9b;
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */

.modal-layer {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--speed-base) var(--ease-smooth),
    visibility var(--speed-base) var(--ease-smooth);
}

.modal-layer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(92vw, 468px);
  max-height: min(86dvh, 820px);
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(38px) saturate(160%);
  backdrop-filter: blur(38px) saturate(160%);
  box-shadow:
    0 48px 110px -40px rgba(7, 10, 16, 0.6),
    0 12px 36px -20px rgba(7, 10, 16, 0.32),
    var(--inset-highlight);
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition:
    opacity var(--speed-base) var(--ease-out),
    transform var(--speed-slow) var(--ease-spring);
}

.modal-layer.is-open .modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal--wide {
  width: min(94vw, 760px);
}

.modal--announcement {
  width: min(94vw, 640px);
}

.modal__close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--text-tertiary);
  background: var(--surface-muted);
  cursor: pointer;
  transition:
    color var(--speed-fast) var(--ease-smooth),
    background var(--speed-fast) var(--ease-smooth),
    transform var(--speed-fast) var(--ease-out);
}

.modal__close:hover {
  color: var(--text);
  background: var(--surface);
}

.modal__close:active {
  transform: scale(0.92);
}

.modal__close svg {
  width: 14px;
  height: 14px;
}

.modal__body {
  padding: 30px 30px 26px;
}

.modal--copy .modal__body {
  text-align: center;
}

.success-orb {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 19px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--accent-contrast);
  background:
    radial-gradient(120% 120% at 25% 0%, rgba(255, 255, 255, 0.4), transparent 55%),
    linear-gradient(145deg, var(--accent), var(--accent-alt));
  box-shadow:
    0 18px 38px -18px rgba(var(--accent-rgb), 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: orb-pop 0.6s var(--ease-spring) both;
}

.success-orb svg {
  width: 29px;
  height: 29px;
}

.modal__title {
  padding-right: 18px;
  color: var(--text);
  font-size: 22px;
  font-weight: 660;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.modal--copy .modal__title {
  padding-right: 0;
  font-size: 21px;
}

.modal__text {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.7;
  text-wrap: pretty;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 24px;
}

.modal__actions .btn {
  width: 100%;
}

.modal__header {
  padding: 29px 30px 16px;
}

.modal__eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.modal__lead {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.7;
}

.modal__scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 0 30px 26px;
  overscroll-behavior: contain;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 15px 30px calc(18px + var(--safe-bottom));
  border-top: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface-soft) 80%, transparent);
}

/* Help */
.help-intro {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

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

.help-item {
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--surface-soft);
}

.help-item__num {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  margin-bottom: 10px;
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
}

.help-item h3 {
  color: var(--text);
  font-size: 13px;
  font-weight: 630;
  line-height: 1.4;
}

.help-item p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.65;
}

.help-tips {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid var(--hairline);
  border-radius: 15px;
  background: var(--surface-soft);
}

.help-tips h3 {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 640;
}

.help-tips ul {
  margin: 9px 0 0;
  padding-left: 16px;
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.7;
}

.help-tips li + li {
  margin-top: 4px;
}

.help-footer {
  margin-top: 16px;
  color: var(--text-tertiary);
  font-size: 9.5px;
  line-height: 1.65;
}

/* Announcements */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.announcement-item {
  --ann-accent: var(--accent);
  --ann-tint: var(--accent-soft);
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 15px;
  background: var(--surface-soft);
}

.announcement-item[data-tone="success"] {
  --ann-accent: var(--success);
  --ann-tint: var(--success-soft);
}

.announcement-item[data-tone="warning"] {
  --ann-accent: var(--warning);
  --ann-tint: var(--warning-soft);
}

.announcement-item[data-tone="important"] {
  --ann-accent: var(--danger);
  --ann-tint: var(--danger-soft);
}

.announcement-item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
  color: var(--text-tertiary);
  font-size: 9.5px;
}

.announcement-item__badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--ann-accent);
  background: var(--ann-tint);
  font-size: 9px;
  font-weight: 640;
}

.announcement-item__title {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.announcement-item__body {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.7;
  white-space: pre-line;
}

.announcement-item__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  color: var(--ann-accent);
  font-size: 10.5px;
  font-weight: 600;
}

.announcement-item__link svg {
  width: 11px;
  height: 11px;
}

.announcement-empty {
  padding: 32px 0 34px;
  color: var(--text-tertiary);
  font-size: 12px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Generic animation
   -------------------------------------------------------------------------- */

@keyframes drift-one {
  from {
    transform: translate3d(-3%, -2%, 0) scale(1);
  }
  to {
    transform: translate3d(7%, 5%, 0) scale(1.08);
  }
}

@keyframes drift-two {
  from {
    transform: translate3d(2%, 2%, 0) scale(1.02);
  }
  to {
    transform: translate3d(-6%, 7%, 0) scale(0.94);
  }
}

@keyframes drift-three {
  from {
    transform: translate3d(-2%, 1%, 0) scale(0.96);
  }
  to {
    transform: translate3d(5%, -4%, 0) scale(1.06);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.994);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes content-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes check-pop {
  0% {
    transform: scale(0.6);
  }
  55% {
    transform: scale(1.16);
  }
  100% {
    transform: scale(1.06);
  }
}

@keyframes dot-breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--accent-soft);
  }
  50% {
    box-shadow: 0 0 0 4px transparent;
  }
}

@keyframes orb-pop {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes count-up {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card__value.is-updating {
  animation: count-up 0.38s var(--ease-out) both;
}

/* --------------------------------------------------------------------------
   Responsive · tablet and below
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .app-shell {
    width: min(100% - 40px, 1100px);
  }

  .app-layout {
    grid-template-columns: minmax(276px, 318px) minmax(0, 1fr);
    gap: 24px;
  }

  .hero__title {
    font-size: clamp(2.2rem, 3.7vw, 2.8rem);
  }

  .wizard__header {
    padding: 27px 26px 20px;
  }

  .step-content {
    padding: 4px 26px 12px;
  }

  .wizard__footer {
    padding: 18px 26px 24px;
  }
}

@media (max-width: 960px) {
  .app-shell {
    width: min(100% - 36px, 820px);
    padding-top: calc(16px + var(--safe-top));
  }

  .site-header {
    top: calc(10px + var(--safe-top));
    margin-bottom: 18px;
  }

  .app-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    grid-template-areas:
      "hero hero"
      "steps mode";
    align-items: start;
    gap: 16px;
    padding-top: 0;
  }

  .hero {
    grid-area: hero;
    padding: 2px 3px 3px;
  }

  .hero__title {
    max-width: 18ch;
    font-size: clamp(2.5rem, 5.8vw, 3.5rem);
  }

  .hero__subtitle {
    max-width: 55ch;
  }

  .hero-metrics {
    max-width: 440px;
  }

  .steps-panel {
    grid-area: steps;
    align-self: center;
  }

  .steps-panel__head {
    margin-bottom: 8px;
  }

  .steps {
    flex-direction: row;
    gap: 5px;
    overflow-x: auto;
    padding: 1px 1px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

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

  .steps::before {
    display: none;
  }

  .step {
    width: auto;
    flex: 0 0 auto;
    gap: 7px;
    padding: 6px 11px 6px 7px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--surface-soft);
    scroll-snap-align: start;
  }

  .step__marker {
    flex-basis: 23px;
    width: 23px;
    height: 23px;
    border: 0;
    background: var(--surface-muted);
    font-size: 8px;
  }

  .step.is-active {
    border-color: var(--accent-line);
    background: var(--accent-softer);
    box-shadow: none;
  }

  .step.is-active .step__marker {
    box-shadow: none;
  }

  .step__body {
    flex: 0 0 auto;
  }

  .step__name {
    font-size: 10.5px;
  }

  .step__meta,
  .step__index {
    display: none;
  }

  .mode-panel {
    grid-area: mode;
    align-self: center;
  }

  .mode-panel--desktop {
    display: none;
  }

  .mode-panel--mobile {
    display: block;
  }

  .mode-panel__caption {
    padding-top: 6px;
    padding-bottom: 1px;
    font-size: 9.5px;
  }

  .workbench {
    position: static;
    z-index: auto;
    display: block;
    margin-bottom: 12px;
    padding: 5px;
    border-radius: 19px;
  }

  .workbench .summary {
    padding: 8px 10px;
  }

  .workbench .summary__chips {
    flex-wrap: wrap;
    overflow: visible;
  }

  .summary-chip {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 9.5px;
  }

  .wizard {
    min-height: 0;
    border-radius: 28px;
  }

  .wizard__progress {
    border-radius: 28px 28px 0 0;
  }

  .page-footer {
    padding-bottom: 4px;
  }

  .notice__body {
    -webkit-line-clamp: 2;
  }
}

/* --------------------------------------------------------------------------
   Responsive · phone
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .app-shell {
    width: 100%;
    padding: calc(8px + var(--safe-top)) 12px calc(28px + var(--safe-bottom));
  }

  .site-header {
    top: calc(7px + var(--safe-top));
    margin-bottom: 12px;
    border-radius: 19px;
  }

  .site-header__inner {
    min-height: 52px;
    gap: 8px;
    padding: 6px 7px 6px 9px;
  }

  .brand {
    gap: 8px;
  }

  .brand__mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 16px;
  }

  .brand__name {
    max-width: 135px;
    font-size: 12.5px;
  }

  .brand__tagline {
    display: none;
  }

  .header-actions {
    gap: 2px;
  }

  .nav-button {
    width: 36px;
    height: 36px;
    padding: 0;
  }

  .nav-button__label {
    display: none;
  }

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

  .nav-button svg,
  .icon-button svg {
    width: 17px;
    height: 17px;
  }

  .nav-button__dot {
    top: 7px;
    right: 7px;
  }

  .notice {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 13px 13px 11px;
    border-radius: 19px;
  }

  .notice__title {
    white-space: normal;
  }

  .notice__body {
    font-size: 11px;
    -webkit-line-clamp: 2;
  }

  .notice__actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: -2px;
  }

  .notice__actions .btn {
    height: 30px;
  }

  .notice__close {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 28px;
    height: 28px;
  }

  .notice__meta {
    padding-right: 24px;
  }

  .app-layout {
    gap: 16px;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .mode-panel,
  .steps-panel,
  .summary,
  .workbench {
    align-self: stretch;
    width: 100%;
    min-width: 0;
  }

  .hero {
    padding: 5px 3px 2px;
  }

  .eyebrow {
    font-size: 8.5px;
  }

  .hero__title {
    max-width: 19ch;
    margin-top: 13px;
    font-size: clamp(2.07rem, 9vw, 2.65rem);
    letter-spacing: -0.052em;
    line-height: 1.07;
  }

  .hero__subtitle {
    max-width: 42ch;
    margin-top: 12px;
    font-size: 12.5px;
    line-height: 1.7;
  }

  .hero-metrics {
    gap: 6px;
    margin-top: 16px;
  }

  .metric {
    padding: 10px 9px 9px;
    border-radius: 13px;
  }

  .metric__value {
    font-size: 1.3rem;
  }

  .metric__label {
    margin-top: 3px;
    font-size: 9px;
  }

  .mode-panel {
    padding: 4px 4px 5px;
    border-radius: 17px;
  }

  .segment {
    height: 36px;
    font-size: 11.5px;
  }

  .mode-panel__caption {
    padding-top: 6px;
    font-size: 9.5px;
  }

  .steps-panel__head {
    margin: 0 3px 6px;
  }

  .steps {
    gap: 4px;
    padding-bottom: 2px;
  }

  .step {
    padding: 5px 9px 5px 6px;
  }

  .step__name {
    font-size: 10px;
  }

  .summary {
    display: block;
    padding: 11px 12px;
    border-radius: 16px;
  }

  .summary__head {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }

  .summary__hint {
    display: none;
  }

  .summary__chips {
    margin-top: 8px;
  }

  .summary__empty {
    margin-top: 5px;
  }

  .wizard {
    border-radius: 26px;
  }

  .wizard__progress {
    border-radius: 26px 26px 0 0;
  }

  .wizard__header {
    display: block;
    padding: 21px 17px 16px;
  }

  .step-kicker {
    font-size: 8px;
  }

  .wizard__title {
    margin-top: 6px;
    font-size: 1.55rem;
    letter-spacing: -0.036em;
  }

  .wizard__hint {
    margin-top: 7px;
    font-size: 11.5px;
    line-height: 1.65;
  }

  .step-tools {
    margin-top: 13px;
    padding-top: 0;
    gap: 5px;
  }

  .step-tools .btn {
    height: 30px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 10px;
  }

  .step-content {
    padding: 3px 16px 9px;
  }

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

  .series-group + .series-group {
    margin-top: 10px;
  }

  .group-head {
    gap: 8px;
    margin-bottom: 11px;
  }

  .group-head h3 {
    font-size: 12px;
  }

  .group-actions {
    gap: 4px;
  }

  .mini-btn {
    height: 27px;
    padding: 0 8px;
    font-size: 9.5px;
  }

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

  .option {
    min-height: 79px;
    padding: 11px;
    border-radius: 13px;
  }

  .option__check {
    top: 9px;
    right: 9px;
    width: 17px;
    height: 17px;
  }

  .option__title {
    font-size: 11.5px;
    line-height: 1.4;
  }

  .option__desc {
    margin-top: 3px;
    font-size: 9.5px;
    line-height: 1.5;
  }

  .option__tag {
    margin-top: 6px;
    font-size: 8px;
  }

  .combo-card {
    padding: 8px 9px;
    border-radius: 0;
  }

  .combo-card__rail {
    gap: 7px;
  }

  .combo-card__title {
    font-size: 12.5px;
  }

  .combo-card__actions {
    order: 1;
    margin-left: auto;
    justify-content: flex-end;
  }

  .combo-fields {
    order: 2;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  .combo-plus {
    display: none;
  }

  .select-wrap,
  .combo-picker-wrap {
    flex: 1 1 auto;
  }

  .combo-select,
  .combo-picker-trigger {
    height: 38px;
    font-size: 13px;
  }

  .combo-icon-btn {
    width: 28px;
    height: 28px;
  }

  .combo-picker.is-sheet {
    top: auto !important;
    right: 10px !important;
    bottom: calc(10px + var(--safe-bottom));
    left: 10px !important;
    width: auto !important;
    max-height: 82vh;
    max-height: min(82dvh, 760px);
    border-radius: 26px;
  }

  .picker-layer {
    background: rgba(6, 9, 14, 0.32);
  }

  .combo-picker__grabber {
    display: block;
    width: 35px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 999px;
    background: var(--hairline-strong);
  }

  .combo-picker__head {
    padding: 11px 15px 10px 17px;
  }

  .combo-picker__head h2 {
    font-size: 20px;
  }

  .combo-picker__head p {
    font-size: 12.5px;
  }

  .combo-picker__body {
    padding: 5px 8px 8px;
  }

  .picker-series__toggle {
    min-height: 49px;
    padding: 10px 8px;
  }

  .picker-series__name {
    font-size: 15px;
  }

  .picker-model__toggle {
    min-height: 45px;
  }

  .picker-model__name {
    font-size: 14.5px;
  }

  .picker-width {
    min-width: 72px;
    height: 38px;
    font-size: 13.5px;
  }

  .combo-picker__foot {
    padding-bottom: calc(12px + var(--safe-bottom));
  }

  .result-stats {
    gap: 6px;
  }

  .stat-card {
    padding: 13px 10px 11px;
    border-radius: 14px;
  }

  .stat-card__value {
    font-size: 1.55rem;
    letter-spacing: -0.05em;
  }

  .stat-card__label {
    margin-top: 5px;
    font-size: 8.5px;
  }

  .result-card {
    margin-top: 12px;
    border-radius: 16px;
  }

  .result-card__head {
    padding: 12px 14px;
  }

  .result-card__title {
    font-size: 12px;
  }

  .result-card__hint {
    font-size: 9px;
  }

  .result-series__head {
    padding: 10px 14px;
  }

  .result-series__title {
    font-size: 11px;
  }

  .result-series__meta {
    padding: 6px 14px;
    font-size: 8.5px;
  }

  .result-row {
    gap: 5px;
    padding: 8px 14px;
    font-size: 11px;
  }

  .pill {
    height: 18px;
    padding: 0 6px;
    font-size: 9px;
  }

  .result-row__extra {
    font-size: 9.5px;
  }

  .result-list {
    max-height: 480px;
  }

  .empty-state {
    min-height: 210px;
    padding: 28px 20px;
  }

  .wizard__footer {
    position: sticky;
    z-index: 20;
    bottom: calc(8px + var(--safe-bottom));
    flex-wrap: wrap;
    margin: 5px 9px 9px;
    margin-top: auto;
    padding: 9px;
    border: 1px solid var(--glass-border);
    border-radius: 17px;
    background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
    backdrop-filter: blur(26px) saturate(160%);
    box-shadow:
      0 16px 36px -22px rgba(7, 10, 16, 0.45),
      var(--inset-highlight);
  }

  .wizard__footer .btn {
    height: 39px;
    padding: 0 12px;
    border-radius: 11px;
    font-size: 11px;
  }

  .wizard__footer .btn svg {
    width: 14px;
    height: 14px;
  }

  .footer-actions {
    flex: 1;
    gap: 5px;
  }

  .footer-actions .btn--primary {
    flex: 1;
  }

  .page-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 14px 4px 0;
    font-size: 9px;
  }

  .toast {
    bottom: calc(92px + var(--safe-bottom));
    max-width: calc(100vw - 28px);
    font-size: 10.5px;
  }

  .modal-layer {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-width: none;
    max-height: 91dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 28px 28px 0 0;
    transform: translateY(32px) scale(0.99);
  }

  .modal__body {
    padding: 27px 22px calc(20px + var(--safe-bottom));
  }

  .modal__header {
    padding: 24px 22px 13px;
  }

  .modal__scroll {
    padding: 0 22px calc(18px + var(--safe-bottom));
  }

  .modal__footer {
    padding: 12px 22px calc(14px + var(--safe-bottom));
  }

  .modal__close {
    top: 12px;
    right: 12px;
  }

  .modal__title {
    font-size: 20px;
  }

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

  .modal__actions {
    margin-top: 20px;
  }
}

@media (max-width: 374px) {
  .app-shell {
    padding-left: 9px;
    padding-right: 9px;
  }

  .brand__name {
    max-width: 106px;
    font-size: 11.5px;
  }

  .nav-button,
  .icon-button {
    width: 33px;
    height: 33px;
  }

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

  .wizard__footer .btn {
    padding: 0 9px;
    font-size: 10.5px;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 11px 13px;
  }

  .stat-card__label {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb {
    animation: none;
  }

  .wizard,
  .notice {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Legibility pass · critical copy stays comfortably readable
   -------------------------------------------------------------------------- */

@media (min-width: 961px) {
  body {
    font-size: 16px;
  }

  .brand__name {
    font-size: 15.5px;
  }

  .brand__tagline {
    font-size: 10px;
  }

  .nav-button {
    font-size: 14px;
  }

  .hero__subtitle {
    font-size: 15.5px;
  }

  .metric__value {
    font-size: 1.65rem;
  }

  .metric__label {
    font-size: 11.5px;
  }

  .segment {
    height: 42px;
    font-size: 14.5px;
  }

  .mode-panel {
    padding: 6px 6px 8px;
  }

  .mode-panel__caption {
    font-size: 12px;
  }

  .steps-panel__label {
    font-size: 10px;
  }

  .steps-panel__count {
    font-size: 12px;
  }

  .steps::before {
    left: 25px;
  }

  .step {
    padding: 9px 10px;
  }

  .step__marker {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    font-size: 10.5px;
  }

  .step__name {
    font-size: 14px;
  }

  .step__meta {
    font-size: 11.5px;
  }

  .step__index {
    font-size: 10px;
  }

  .summary__title {
    font-size: 13px;
  }

  .summary__hint {
    font-size: 11.5px;
  }

  .summary-chip {
    min-height: 30px;
    padding: 5px 11px;
    font-size: 12.5px;
  }

  .summary__empty {
    font-size: 13px;
  }

  .step-kicker {
    font-size: 10.5px;
  }

  .wizard__title {
    font-size: clamp(1.9rem, 2.35vw, 2.2rem);
  }

  .wizard__hint {
    font-size: 14.5px;
  }

  .btn {
    height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-size: 14px;
  }

  .btn--sm {
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 12px;
  }

  .mini-btn {
    height: 32px;
    padding: 0 11px;
    font-size: 12px;
  }

  .group-head h3 {
    font-size: 15.5px;
  }

  .group-empty {
    font-size: 12.5px;
  }

  .option-grid {
    grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
    gap: 9px;
  }

  .option {
    min-height: 0;
    padding: 13px 14px;
  }

  .option__check {
    width: 21px;
    height: 21px;
  }

  .option__title {
    font-size: 15.5px;
    font-weight: 620;
  }

  .option__desc {
    font-size: 13px;
  }

  .option__tag {
    font-size: 11px;
  }

  .badge {
    height: 21px;
    padding: 0 8px;
    font-size: 10px;
  }

  .combo-card__title {
    font-size: 13.5px;
  }

  .combo-add-btn {
    font-size: 12px;
  }

  .combo-select,
  .combo-picker-trigger {
    height: 38px;
    font-size: 13.5px;
    line-height: 38px;
  }

  .combo-picker-trigger {
    line-height: normal;
  }

  .combo-plus {
    font-size: 13px;
  }

  .combo-status {
    font-size: 13.5px;
  }

  .notice__meta {
    font-size: 11.5px;
  }

  .notice__badge,
  .notice__pinned {
    height: 23px;
    font-size: 11px;
  }

  .notice__title {
    font-size: 15.5px;
  }

  .notice__body {
    font-size: 13.5px;
  }

  .notice__actions .btn {
    height: 36px;
    font-size: 12.5px;
  }

  .stat-card__label {
    font-size: 12px;
  }

  .result-card__title {
    font-size: 15.5px;
  }

  .result-card__hint {
    font-size: 12px;
  }

  .result-card__count {
    height: 26px;
    font-size: 10px;
  }

  .result-series__title {
    font-size: 14px;
  }

  .result-series__meta {
    font-size: 11.5px;
  }

  .result-row {
    gap: 7px;
    padding: 10px 18px;
    font-size: 13.5px;
  }

  .pill {
    height: 22px;
    font-size: 11px;
  }

  .result-row__extra {
    padding: 2px 7px;
    font-size: 11px;
  }

  .tag--warning {
    height: 20px;
    font-size: 10.5px;
  }

  .modal__title {
    font-size: 24px;
  }

  .modal__text {
    font-size: 14px;
  }

  .modal__lead {
    font-size: 13.5px;
  }

  .modal__eyebrow {
    font-size: 10px;
  }

  .help-intro {
    font-size: 14px;
  }

  .help-item h3 {
    font-size: 14px;
  }

  .help-item p {
    font-size: 12.5px;
  }

  .help-tips h3 {
    font-size: 13px;
  }

  .help-tips ul {
    font-size: 12.5px;
  }

  .help-footer {
    font-size: 11px;
  }

  .announcement-item__meta {
    font-size: 10.5px;
  }

  .announcement-item__title {
    font-size: 14px;
  }

  .announcement-item__body {
    font-size: 12.5px;
  }

  .page-footer {
    font-size: 11px;
  }

  .toast {
    font-size: 13px;
  }

  .modal__actions .btn {
    height: 46px;
    font-size: 14px;
  }

  .mode-panel--desktop {
    flex-basis: 326px;
  }
}

@media (min-width: 641px) and (max-width: 960px) {
  .option-grid {
    grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 960px) {
  .brand__name {
    font-size: 15px;
  }

  .nav-button {
    font-size: 13.5px;
  }

  .hero__subtitle {
    font-size: 14.5px;
  }

  .metric__label {
    font-size: 11px;
  }

  .segment {
    height: 42px;
    font-size: 14px;
  }

  .mode-panel__caption {
    font-size: 11.5px;
  }

  .steps-panel__label {
    font-size: 9.5px;
  }

  .steps-panel__count {
    font-size: 11px;
  }

  .step__name {
    font-size: 12px;
  }

  .summary__title {
    font-size: 12.5px;
  }

  .summary-chip {
    min-height: 27px;
    padding: 4px 9px;
    font-size: 11.5px;
  }

  .summary__empty {
    font-size: 12.5px;
  }

  .step-kicker {
    font-size: 9.5px;
  }

  .wizard__title {
    font-size: clamp(1.8rem, 3.2vw, 2.05rem);
  }

  .wizard__hint {
    font-size: 14px;
  }

  .btn {
    font-size: 14px;
  }

  .btn--sm {
    font-size: 12px;
  }

  .mini-btn {
    height: 31px;
    font-size: 11.5px;
  }

  .group-head h3 {
    font-size: 15px;
  }

  .option {
    min-height: 0;
    padding: 13px;
  }

  .option__title {
    font-size: 15px;
    font-weight: 620;
  }

  .option__desc {
    font-size: 13px;
  }

  .option__tag {
    font-size: 10.5px;
  }

  .combo-card__title {
    font-size: 13px;
  }

  .combo-select,
  .combo-picker-trigger {
    font-size: 13.5px;
  }

  .combo-status {
    font-size: 13px;
  }

  .notice__meta {
    font-size: 11px;
  }

  .notice__title {
    font-size: 15px;
  }

  .notice__body {
    font-size: 13px;
  }

  .result-row {
    font-size: 12.5px;
  }

  .pill {
    font-size: 10.5px;
  }

  .result-row__extra {
    font-size: 10.5px;
  }

  .page-footer {
    font-size: 10.5px;
  }
}

@media (max-width: 640px) {
  .brand__name {
    font-size: 14.5px;
  }

  .hero__subtitle {
    font-size: 14.5px;
  }

  .metric__label {
    font-size: 10.5px;
  }

  .segment {
    height: 40px;
    font-size: 14px;
  }

  .mode-panel__caption {
    font-size: 11.5px;
  }

  .step__name {
    font-size: 11.5px;
  }

  .summary__title {
    font-size: 12.5px;
  }

  .summary-chip {
    font-size: 11.5px;
  }

  .summary__empty {
    font-size: 12px;
  }

  .step-kicker {
    font-size: 9.5px;
  }

  .wizard__title {
    font-size: 1.8rem;
  }

  .wizard__hint {
    font-size: 14px;
  }

  .step-tools .btn {
    height: 32px;
    padding: 0 11px;
    font-size: 11.5px;
  }

  .btn {
    font-size: 13.5px;
  }

  .mini-btn {
    height: 30px;
    font-size: 11px;
  }

  .group-head h3 {
    font-size: 14.5px;
  }

  .option {
    min-height: 0;
    padding: 12px;
  }

  .option__title {
    font-size: 14.5px;
    font-weight: 620;
  }

  .option__desc {
    font-size: 12.5px;
  }

  .option__tag {
    font-size: 10.5px;
  }

  .combo-select,
  .combo-picker-trigger {
    font-size: 13.5px;
  }

  .combo-card__title {
    font-size: 12.5px;
  }

  .notice__meta {
    font-size: 11px;
  }

  .notice__title {
    font-size: 15px;
  }

  .notice__body {
    font-size: 13px;
  }

  .result-row {
    font-size: 12.5px;
  }

  .pill {
    font-size: 10px;
  }

  .result-row__extra {
    font-size: 10px;
  }

  .wizard__footer .btn {
    height: 42px;
    font-size: 12.5px;
  }

  .page-footer {
    font-size: 10.5px;
  }
}

@media (max-width: 374px) {
  .wizard__footer .btn {
    font-size: 12px;
  }
}
