/* ── Reset & Base ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* color */
  --bg: #080c16;
  --surface: #0d1220;
  --surface2: #131926;
  --border: #1e2a3a;
  --accent: #00d4ff;
  --accent2: #6ab0ff;
  --danger: #ff5060;
  --text: #c8d8ec;
  /* Legacy; avoid using directly — prefer --text-muted which meets WCAG AA. */
  --text-dim: #4a6070;
  /* WCAG AA safe muted text on --bg (~7:1). */
  --text-muted: rgba(200, 220, 240, 0.72);
  /* Slightly stronger muted for secondary-but-still-readable labels. */
  --text-label: rgba(0, 220, 255, 0.85);

  /* typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-ui: 'Inter', system-ui, sans-serif;
  --text-xs: 0.75rem;     /* 12px — minimum */
  --text-sm: 0.8125rem;   /* 13px */
  --text-base: 0.875rem;  /* 14px */
  --text-lg: 1rem;        /* 16px */
  --text-xl: 1.125rem;    /* 18px */

  /* spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius: 8px; /* legacy */

  /* motion */
  --motion-fast: 120ms;
  --motion-med: 180ms;
  --motion-slow: 240ms;

  /* tap target (WCAG 2.5.5 / Apple / Google) */
  --tap-min: 44px;

  /* focus ring */
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);

  /* layout */
  --panel-w: 280px;
  --dock-h: 130px;
}

html,
body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#root {
  width: 100%;
  height: 100%;
}

/* ── Focus visibility ───────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Canvas focus is important for keyboard users but should not draw a giant
   outline over the whole viewport — use a subtle inset ring. */
#canvas:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--accent);
}

/* ── Skip link ─────────────────────────────────────────────────────── */
.skipLink {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 200;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--motion-fast) ease;
}
.skipLink:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Canvas ─────────────────────────────────────────────────────────── */
#canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  :root {
    --panel-w: 280px;
    --dock-h: 132px;
  }
}

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Forced colors (Windows High Contrast) ──────────────────────────── */
@media (forced-colors: active) {
  .skipLink,
  button,
  input,
  [role='dialog'],
  [role='tab'] {
    border: 1px solid ButtonBorder;
    forced-color-adjust: none;
  }
  :focus-visible {
    outline: 2px solid Highlight;
  }
}

/* ── High contrast preference ───────────────────────────────────────── */
@media (prefers-contrast: more) {
  :root {
    --text-muted: rgba(230, 240, 250, 0.92);
    --text-label: rgba(0, 230, 255, 1);
    --border: #3a5070;
  }
}
._loading_3cmf9_1 {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--text-base);
  letter-spacing: 0.12em;
  color: var(--text);
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

._loading_3cmf9_1::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: var(--space-3);
  animation: _pulse_3cmf9_1 1.1s ease-in-out infinite;
}

@keyframes _pulse_3cmf9_1 {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  ._loading_3cmf9_1::before {
    animation: none;
    opacity: 0.85;
  }
}
/* ── Dock container ──────────────────────────────────────────────── */
._dock_845x5_2 {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4)
    calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: rgba(6, 10, 20, 0.94);
  border-top: 1px solid rgba(0, 200, 255, 0.22);
}

/* ── Segmented stepper (speed) ───────────────────────────────────── */
._stepperSeg_845x5_20 {
  display: flex;
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

._stepperSegBtn_845x5_28 {
  flex: 0 0 auto;
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  line-height: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
  user-select: none;
}
@media (hover: hover) {
  ._stepperSegBtn_845x5_28:hover {
    color: #00e8ff;
    background: rgba(0, 200, 255, 0.1);
  }
  ._stepperSegBtn_845x5_28:active {
    transform: scale(0.96);
  }
}
._stepperSegBtn_845x5_28:disabled {
  color: rgba(180, 200, 220, 0.2);
  cursor: not-allowed;
  pointer-events: none;
}

._stepperSegVal_845x5_61 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-label);
  white-space: nowrap;
  min-width: 52px;
  border-left: 1px solid rgba(0, 200, 255, 0.15);
  border-right: 1px solid rgba(0, 200, 255, 0.15);
}

/* ── Segmented toggle (playback, Pan/Draw, Alive/Dead) ───────────── */
._segmented_845x5_76 {
  display: flex;
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

._segBtn_845x5_84 {
  flex: 1;
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  line-height: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
  user-select: none;
}
@media (hover: hover) {
  ._segBtn_845x5_84:hover {
    color: #00e8ff;
    background: rgba(0, 200, 255, 0.08);
  }
  ._segBtn_845x5_84:active {
    transform: scale(0.96);
  }
}
._segBtn_845x5_84:disabled {
  color: rgba(180, 200, 220, 0.2);
  cursor: not-allowed;
  pointer-events: none;
}
._segActive_845x5_116 {
  background: rgba(0, 200, 255, 0.2);
  color: #00e8ff;
}

/* ── Icon variant for playback group ─────────────────────────────── */
._segBtnIcon_845x5_122 {
  font-size: var(--text-lg);
  letter-spacing: 0;
  min-width: var(--tap-min);
  flex: 0 0 auto;
}

/* Danger hover (reset button) */
@media (hover: hover) {
  ._segBtnDanger_845x5_131:hover {
    color: #ff607a;
    background: rgba(255, 80, 100, 0.12);
  }
}

@keyframes _flash-bg_845x5_1 {
  0% {
    background: rgba(255, 80, 100, 0.25);
  }
  100% {
    background: transparent;
  }
}
._flash_845x5_145 {
  animation: _flash-bg_845x5_1 0.3s ease forwards;
}

/* ── Brush blob buttons (desktop, hidden on mobile) ──────────────── */
._brushBlobBtns_845x5_150 {
  display: flex;
  gap: 4px;
  align-items: center;
}

._brushBlobBtn_845x5_150 {
  flex: 0 0 auto;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 0;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    box-shadow var(--motion-fast);
  user-select: none;
}
@media (hover: hover) {
  ._brushBlobBtn_845x5_150:hover {
    background: rgba(0, 200, 255, 0.10);
    border-color: rgba(0, 200, 255, 0.35);
  }
  ._brushBlobBtn_845x5_150:active {
    transform: scale(0.96);
  }
}
._brushBlobBtnActive_845x5_183 {
  background: rgba(0, 200, 255, 0.15);
  border-color: rgba(0, 200, 255, 0.65);
  box-shadow: 0 0 6px rgba(0, 200, 255, 0.25);
}

/* ── Brush mobile stepper (hidden on desktop, shown on mobile) ───── */
._brushMobileStepper_845x5_190 {
  display: none;
}

/* ── Help button ─────────────────────────────────────────────────── */
._helpBtn_845x5_195 {
  flex: 0 0 var(--tap-min);
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) 0;
  font-family: var(--font-mono);
  font-size: var(--text-base);
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
  user-select: none;
}
@media (hover: hover) {
  ._helpBtn_845x5_195:hover {
    background: rgba(0, 200, 255, 0.12);
    border-color: rgba(0, 200, 255, 0.4);
    color: #00e8ff;
  }
  ._helpBtn_845x5_195:active {
    transform: scale(0.96);
  }
}

/* ── Mobile: 2 rows, left-justified, no help, blob→stepper swap ─── */
@media (max-width: 600px) {
  ._dock_845x5_2 {
    flex-wrap: wrap;
    padding: var(--space-2) var(--space-3)
      calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  }
  ._helpBtn_845x5_195 {
    display: none;
  }
  ._brushBlobBtns_845x5_150 {
    display: none;
  }
  ._brushMobileStepper_845x5_190 {
    display: flex;
  }
}
._ruleEditor_anhfz_1 {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

._presets_anhfz_7 {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

._presetBtn_anhfz_13 {
  min-height: 32px;
  padding: var(--space-2) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(220, 235, 250, 0.95);
  cursor: pointer;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
  user-select: none;
}
@media (hover: hover) {
  ._presetBtn_anhfz_13:hover {
    background: rgba(0, 200, 255, 0.12);
    border-color: rgba(0, 200, 255, 0.4);
    color: #00e8ff;
  }
  ._presetBtn_anhfz_13:active {
    transform: scale(0.96);
  }
}

._ruleRow_anhfz_43 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

._ruleLabel_anhfz_49 {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-label);
  min-width: 14px;
  font-weight: 600;
}

._toggleRow_anhfz_57 {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  flex: 1;
}

._toggleBtn_anhfz_64 {
  min-width: 28px;
  min-height: 32px;
  padding: 0 var(--space-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
  user-select: none;
}
@media (hover: hover) {
  ._toggleBtn_anhfz_64:hover {
    border-color: rgba(0, 200, 255, 0.4);
    color: #00e8ff;
    background: rgba(0, 200, 255, 0.08);
  }
  ._toggleBtn_anhfz_64:active {
    transform: scale(0.94);
  }
}
._toggleActive_anhfz_97 {
  background: rgba(0, 200, 255, 0.22);
  border-color: rgba(0, 200, 255, 0.55);
  color: #00e8ff;
}

._hint_anhfz_103 {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}
/* ── Drawer container ────────────────────────────────────────────── */
._drawer_q5jot_2 {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  width: 280px;
  max-height: calc(100vh - var(--space-5) - var(--dock-h, 0px));
  max-height: calc(100dvh - var(--space-5) - var(--dock-h, 0px));
  overflow-y: auto;
  overflow-x: visible;
  z-index: 19;
  /* Visible-but-subtle scrollbar so overflow affordance is preserved. */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 200, 255, 0.4) transparent;
}
._drawer_q5jot_2::-webkit-scrollbar {
  width: 8px;
}
._drawer_q5jot_2::-webkit-scrollbar-track {
  background: transparent;
}
._drawer_q5jot_2::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 255, 0.4);
  border-radius: 4px;
}
._drawer_q5jot_2::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 200, 255, 0.6);
}

/* ── Panel layout ───────────────────────────────────────────────── */
._panel_q5jot_31 {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* ── Card base ──────────────────────────────────────────────────── */
._card_q5jot_38 {
  background: rgba(6, 10, 20, 0.88);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(0, 200, 255, 0.22);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color var(--motion-med);
  min-width: 0;
}
@media (hover: hover) {
  ._card_q5jot_38:hover {
    border-color: rgba(0, 200, 255, 0.32);
  }
}

._cardLabel_q5jot_57 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-label);
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1;
  margin: 0;
}

/* ── Stats card ─────────────────────────────────────────────────── */
._statsRow_q5jot_72 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}
._stat_q5jot_72 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
._statVal_q5jot_86 {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-variant-numeric: tabular-nums;
  color: #e6f0fa;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
._statPop_q5jot_97 {
  color: #00e8ff;
}
._statKey_q5jot_100 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
}
._statDivider_q5jot_108 {
  width: 1px;
  height: 28px;
  background: rgba(0, 200, 255, 0.18);
  flex-shrink: 0;
}

/* ── Presets card ───────────────────────────────────────────────── */
._presetTabs_q5jot_116 {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}
._presetTab_q5jot_116 {
  flex: 1 1 auto;
  min-height: 32px;
  padding: var(--space-2) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
  user-select: none;
  white-space: nowrap;
}
@media (hover: hover) {
  ._presetTab_q5jot_116:hover {
    color: #00e8ff;
    border-color: rgba(0, 200, 255, 0.32);
    background: rgba(0, 200, 255, 0.08);
  }
  ._presetTab_q5jot_116:active {
    transform: scale(0.96);
  }
}
._presetTabActive_q5jot_153 {
  background: rgba(0, 200, 255, 0.14);
  border-color: rgba(0, 200, 255, 0.45);
  color: #00e8ff;
}

._comingSoon_q5jot_159 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
._presetBtns_q5jot_166 {
  display: flex;
  gap: var(--space-1);
}
._presetBtn_q5jot_166 {
  flex: 1;
  min-height: 32px;
  padding: var(--space-2) var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(200, 220, 240, 0.5);
  cursor: not-allowed;
  user-select: none;
}

/* Preset list */
._presetList_q5jot_186 {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 200, 255, 0.4) transparent;
}
._presetList_q5jot_186::-webkit-scrollbar {
  width: 6px;
}
._presetList_q5jot_186::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 255, 0.4);
  border-radius: 3px;
}
._presetItem_q5jot_202 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 235, 250, 0.95);
  cursor: pointer;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    transform var(--motion-fast);
  user-select: none;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  min-width: 0;
}
@media (hover: hover) {
  ._presetItem_q5jot_202:hover {
    background: rgba(0, 200, 255, 0.1);
    border-color: rgba(0, 200, 255, 0.4);
  }
  ._presetItem_q5jot_202:active {
    transform: scale(0.98);
  }
}
._presetThumb_q5jot_232 {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
._presetName_q5jot_239 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.2;
  color: #e6f0fa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
._presetTag_q5jot_249 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px var(--space-1);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  line-height: 1;
}
._tag-glider_q5jot_259 {
  background: rgba(0, 220, 255, 0.2);
  color: rgba(150, 240, 255, 1);
}
._tag-oscillator_q5jot_263 {
  background: rgba(180, 100, 255, 0.22);
  color: rgba(220, 180, 255, 1);
}
._tag-still-life_q5jot_267 {
  background: rgba(80, 220, 120, 0.22);
  color: rgba(160, 240, 180, 1);
}

._presetInfo_q5jot_272 {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  min-width: 0;
}
._presetSubmitter_q5jot_280 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

._actionBtns_q5jot_290 {
  display: flex;
  gap: var(--space-1);
}

._shareBtn_q5jot_295,
._addPresetBtn_q5jot_296 {
  flex: 1;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
  user-select: none;
}
@media (hover: hover) {
  ._shareBtn_q5jot_295:hover,
  ._addPresetBtn_q5jot_296:hover {
    background: rgba(0, 200, 255, 0.12);
    border-color: rgba(0, 200, 255, 0.4);
    color: #00e8ff;
  }
  ._shareBtn_q5jot_295:active,
  ._addPresetBtn_q5jot_296:active {
    transform: scale(0.96);
  }
}

/* ── Add Preset Modal ───────────────────────────────────────────── */
._addPresetModal_q5jot_334 {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid rgba(0, 200, 255, 0.32);
  border-radius: var(--radius-md);
  background: rgba(6, 10, 20, 0.96);
}
._addPresetTitle_q5jot_343 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-label);
  margin: 0;
  line-height: 1;
}
._addPresetField_q5jot_353 {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
._addPresetFieldLabel_q5jot_358 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1;
}
._addPresetInput_q5jot_364 {
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: #e6f0fa;
  outline: none;
  box-sizing: border-box;
}
._addPresetInput_q5jot_364:focus-visible {
  border-color: rgba(0, 200, 255, 0.6);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
._addPresetTags_q5jot_383 {
  display: flex;
  gap: var(--space-1);
}
._addPresetTagBtn_q5jot_387 {
  flex: 1;
  min-height: 32px;
  padding: var(--space-2) var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    border-color var(--motion-fast),
    background var(--motion-fast),
    transform var(--motion-fast);
  line-height: 1;
}
@media (hover: hover) {
  ._addPresetTagBtn_q5jot_387:hover {
    border-color: rgba(255, 255, 255, 0.4);
  }
  ._addPresetTagBtn_q5jot_387:active {
    transform: scale(0.96);
  }
}
._addPresetTagActive_q5jot_412 {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(0, 200, 255, 0.35);
}
._addPresetActions_q5jot_416 {
  display: flex;
  gap: var(--space-1);
}
._addPresetSubmit_q5jot_420,
._addPresetCancel_q5jot_421 {
  flex: 1;
  min-height: var(--tap-min);
  padding: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(220, 235, 250, 0.95);
  cursor: pointer;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
}
@media (hover: hover) {
  ._addPresetSubmit_q5jot_420:hover:not(:disabled) {
    background: rgba(0, 200, 255, 0.12);
    border-color: rgba(0, 200, 255, 0.4);
    color: #00e8ff;
  }
  ._addPresetSubmit_q5jot_420:active:not(:disabled),
  ._addPresetCancel_q5jot_421:active {
    transform: scale(0.96);
  }
  ._addPresetCancel_q5jot_421:hover {
    background: rgba(255, 80, 100, 0.12);
    border-color: rgba(255, 80, 100, 0.4);
    color: #ff7088;
  }
}
._addPresetSubmit_q5jot_420:disabled {
  color: rgba(180, 200, 220, 0.5);
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
}

/* ── Tablet (≤768px): narrower drawer, stays docked ─────────────── */
@media (max-width: 768px) and (min-width: 521px) {
  ._drawer_q5jot_2 {
    width: 260px;
  }
}

/* ── Mobile (slide-in drawer) ───────────────────────────────────── */
@media (max-width: 520px) {
  ._drawer_q5jot_2 {
    top: 0;
    right: 0;
    bottom: var(--dock-h, 0px);
    width: 85%;
    max-width: 320px;
    max-height: none;
    background: rgba(6, 10, 20, 0.96);
    border-left: 1px solid rgba(0, 200, 255, 0.22);
    transform: translateX(100%);
    transition: transform var(--motion-slow) ease;
    /* top padding clears the fixed toggle button */
    padding: 64px var(--space-3) var(--space-3);
    visibility: hidden;
    pointer-events: none;
  }
  ._drawerOpen_q5jot_487 {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
}
._toggle_13jf3_1 {
  display: none;
  position: fixed;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 30;
  width: var(--tap-min);
  height: var(--tap-min);
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid rgba(0, 200, 255, 0.32);
  color: var(--text);
  font-size: var(--text-lg);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
}

._toggleOpen_13jf3_24 {
  background: rgba(255, 80, 100, 0.14);
  border-color: rgba(255, 80, 100, 0.55);
  color: #ff7088;
}

@media (hover: hover) {
  ._toggle_13jf3_1:hover {
    background: rgba(0, 200, 255, 0.12);
    border-color: rgba(0, 200, 255, 0.45);
    color: #00e8ff;
  }
  ._toggle_13jf3_1:active {
    transform: scale(0.94);
  }
  ._toggleOpen_13jf3_24:hover {
    background: rgba(255, 80, 100, 0.24);
    border-color: rgba(255, 80, 100, 0.75);
    color: #ff5060;
  }
}

@media (max-width: 520px) {
  ._toggle_13jf3_1 {
    display: flex;
  }
}
._backdrop_1d2fg_1 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px) saturate(1.2);
  -webkit-backdrop-filter: blur(6px) saturate(1.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--space-5);
}

._modal_1d2fg_14 {
  background: rgba(6, 10, 20, 0.96);
  border: 1px solid rgba(0, 200, 255, 0.35);
  border-radius: var(--radius-md);
  min-width: 320px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(0, 200, 255, 0.14);
}

._header_1d2fg_29 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
  border-bottom: 1px solid rgba(0, 200, 255, 0.22);
}
._title_1d2fg_37 {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00e8ff;
  margin: 0;
  font-weight: 500;
}
._closeBtn_1d2fg_46 {
  flex-shrink: 0;
  width: var(--tap-min);
  height: var(--tap-min);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(220, 235, 250, 0.95);
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
}
@media (hover: hover) {
  ._closeBtn_1d2fg_46:hover {
    background: rgba(255, 80, 100, 0.14);
    border-color: rgba(255, 80, 100, 0.45);
    color: #ff7088;
  }
  ._closeBtn_1d2fg_46:active {
    transform: scale(0.94);
  }
}

._body_1d2fg_77 {
  padding: var(--space-4);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 200, 255, 0.4) transparent;
}
._body_1d2fg_77::-webkit-scrollbar {
  width: 8px;
}
._body_1d2fg_77::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 255, 0.4);
  border-radius: 4px;
}

._section_1d2fg_94 {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
._sectionTitle_1d2fg_99 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-label);
  margin: 0;
  font-weight: 500;
}
._list_1d2fg_108 {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
._item_1d2fg_116 {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--text-sm);
  min-width: 0;
}
._keys_1d2fg_124 {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}
._kbd_1d2fg_129 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 3px var(--space-2);
  border: 1px solid rgba(0, 200, 255, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(0, 200, 255, 0.1);
  color: #e6f0fa;
  line-height: 1;
  min-width: 16px;
  text-align: center;
}
._label_1d2fg_141 {
  color: rgba(220, 235, 250, 0.95);
  font-family: var(--font-ui);
  min-width: 0;
  overflow-wrap: break-word;
}

@media (max-width: 520px) {
  ._item_1d2fg_116 {
    grid-template-columns: 120px 1fr;
  }
}
