/* ============================================================
   DNA Extraction Helper — Core Design System
   Apple-like aesthetics | Glove-friendly | Lab-optimized
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --color-accent:        #2563EB;   /* Blue-600 */
  --color-accent-soft:   #DBEAFE;   /* Blue-100 */
  --color-success:       #16A34A;   /* Green-600 */
  --color-success-soft:  #DCFCE7;   /* Green-100 */
  --color-warn:          #D97706;   /* Amber-600 */

  /* Light Mode Surface */
  --bg-page:             #F5F5F7;
  --bg-card:             #FFFFFF;
  --bg-card-hover:       #FAFAFA;
  --bg-header:           rgba(255,255,255,0.82);

  /* Light Mode Text */
  --text-primary:        #1D1D1F;
  --text-secondary:      #6E6E73;
  --text-tertiary:       #AEAEB2;
  --text-on-accent:      #FFFFFF;

  /* Borders */
  --border-subtle:       rgba(0,0,0,0.08);
  --border-card:         rgba(0,0,0,0.06);

  /* Shadows */
  --shadow-card:         0 2px 12px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05);
  --shadow-card-hover:   0 8px 28px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  --shadow-btn:          0 2px 8px rgba(37,99,235,0.30);

  /* Spacing & Shape */
  --radius-card:         18px;
  --radius-btn:          14px;
  --radius-input:        12px;
  --radius-checkbox:     9px;

  /* Transition */
  --transition-base:     all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring:   all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Dark Mode Tokens ──────────────────────────────────────── */
[data-theme="dark"] {
  --bg-page:             #111113;
  --bg-card:             #1C1C1E;
  --bg-card-hover:       #242426;
  --bg-header:           rgba(18,18,20,0.88);

  --text-primary:        #F5F5F7;
  --text-secondary:      #AEAEB2;
  --text-tertiary:       #636366;

  --border-subtle:       rgba(255,255,255,0.08);
  --border-card:         rgba(255,255,255,0.06);

  --shadow-card:         0 2px 12px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
  --shadow-card-hover:   0 8px 28px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.4);

  --color-accent-soft:   rgba(37,99,235,0.18);
  --color-success-soft:  rgba(22,163,74,0.18);
}

/* ── Global Reset & Base ───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Sticky Header ─────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--border-subtle);
  /* ── iOS safe area: push content below notch/status bar ── */
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-base);
}

.app-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-header__icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(37,99,235,0.35);
  flex-shrink: 0;
}

.app-header__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.app-header__subtitle {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.1px;
}

/* ── Theme Toggle Button ───────────────────────────────────── */
.theme-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-spring);
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}

.theme-toggle:active {
  transform: scale(0.88);
}

/* ── Main Layout ───────────────────────────────────────────── */
.app-main {
  max-width: 680px;
  margin: 0 auto;
  /* bottom: 60px nav bar + home indicator safe area */
  padding: 24px
           max(16px, env(safe-area-inset-right, 16px))
           calc(100px + env(safe-area-inset-bottom, 0px))
           max(16px, env(safe-area-inset-left, 16px));
}

/* ── Section Title ─────────────────────────────────────────── */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ── Card Component ────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  transition: var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

/* ── Divider ───────────────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 28px 0;
}

/* ── Placeholder Block ─────────────────────────────────────── */
.placeholder-block {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 2px dashed var(--border-subtle);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-scale-in {
  animation: scaleIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Stagger delay helpers */
.delay-100 { animation-delay: 0.10s; }
.delay-200 { animation-delay: 0.20s; }
.delay-300 { animation-delay: 0.30s; }
.delay-400 { animation-delay: 0.40s; }

/* ── Scrollbar Styling ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--text-tertiary);
  border-radius: 3px;
}

/* ── Mobile Safe Area ──────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .app-main {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

/* ════════════════════════════════════════════════════════════
   M1 — MASTER MIX CALCULATOR
════════════════════════════════════════════════════════════ */

.calculator-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Sample Input Card ─────────────────────────────────────── */
.sample-input-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sample-input-card__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-input-card__label-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Mix Section Layout ────────────────────────────────────── */
.mix-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mix-section__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.mix-section__header--blue {
  background: linear-gradient(135deg, rgba(37,99,235,0.10), rgba(6,182,212,0.06));
  border: 1px solid rgba(37,99,235,0.15);
}

.mix-section__header--teal {
  background: linear-gradient(135deg, rgba(13,148,136,0.10), rgba(6,182,212,0.06));
  border: 1px solid rgba(13,148,136,0.15);
}

.mix-section__icon { font-size: 18px; }

.mix-section__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

/* ── Mix Divider ───────────────────────────────────────────── */
.mix-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 20px;
  padding: 2px 0;
}

/* ── Link / Custom Pills ───────────────────────────────────── */
.link-pills {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.link-pill {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 36px;
  transition: var(--transition-base);
  white-space: nowrap;
}

.link-pill--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.link-pill--custom.link-pill--active {
  background: #0D9488;
  border-color: #0D9488;
  box-shadow: 0 2px 8px rgba(13,148,136,0.30);
}

.link-pill:active { transform: scale(0.92); }

/* ── Linked Badge ──────────────────────────────────────────── */
.linked-badge {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--color-accent-soft);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.linked-badge strong {
  color: var(--color-accent);
  font-weight: 700;
}

/* ── Count Input Block (inside card) ───────────────────────── */
.count-input-block { display: flex; flex-direction: column; gap: 12px; }

.count-input-block__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.count-input-block__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}


/* n+1 badge */
.n-plus-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.n-plus-badge strong {
  font-size: 14px;
  font-weight: 700;
}

/* ── Stepper Controls ──────────────────────────────────────── */
.sample-input-card__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* Large glove-friendly stepper buttons */
.stepper-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-spring);
  user-select: none;
  flex-shrink: 0;
}

.stepper-btn--minus {
  background: var(--border-subtle);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-card);
}

.stepper-btn--minus:not(:disabled):hover {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FECACA;
}

.stepper-btn--plus {
  background: var(--color-accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-btn);
}

.stepper-btn--plus:not(:disabled):hover {
  background: #1D4ED8;
  transform: scale(1.06);
}

.stepper-btn:active:not(:disabled) {
  transform: scale(0.88);
}

.stepper-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Typeable sample number input */
.sample-num-input {
  width: 100px;
  height: 64px;
  border-radius: var(--radius-input);
  border: 2px solid var(--border-subtle);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 36px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  letter-spacing: -1px;
  transition: var(--transition-base);
  /* Remove number input arrows */
  -moz-appearance: textfield;
}
.sample-num-input::-webkit-inner-spin-button,
.sample-num-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.sample-num-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.sample-num-input--small {
  width: 60px;
  height: 48px;
  font-size: 22px;
}

/* ── Buffer Toggle Row ──────────────────────────────────────── */
.buffer-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
}

/* Toggle switch button */
.buffer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  min-height: 44px;
  font-family: inherit;
}

.buffer-toggle__track {
  width: 48px;
  height: 28px;
  border-radius: 99px;
  background: var(--border-subtle);
  border: 1.5px solid var(--border-card);
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

.buffer-toggle--on .buffer-toggle__track {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.buffer-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.buffer-toggle--on .buffer-toggle__thumb {
  transform: translateX(20px);
}

.buffer-toggle__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.buffer-toggle--on .buffer-toggle__label {
  color: var(--color-accent);
}

/* n+1 badge active state */
.n-plus-badge--active {
  background: rgba(22, 163, 74, 0.12);
  color: var(--color-success);
}
[data-theme="dark"] .n-plus-badge--active {
  background: rgba(22, 163, 74, 0.18);
}

/* ── Buffer Stepper (appears when Buffer ON) ─────────────────── */
.buffer-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Mini stepper buttons */
.stepper-btn--mini {
  width: 48px !important;
  height: 48px !important;
  font-size: 22px !important;
}

.buffer-eq {
  font-size: 14px;
  color: var(--text-secondary);
  margin-left: 4px;
  white-space: nowrap;
}

.buffer-eq strong {
  font-size: 16px;
  color: var(--color-success);
  font-weight: 800;
}


/* ── Mix Cards Grid ────────────────────────────────────────── */
.mix-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .mix-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Mix Card ──────────────────────────────────────────────── */
.mix-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1.5px solid var(--border-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition-base);
}

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

.mix-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}

.mix-card__badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.mix-card--blue .mix-card__badge {
  background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
}

.mix-card--teal .mix-card__badge {
  background: linear-gradient(135deg, #CCFBF1, #99F6E4);
}

.mix-card__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.mix-card__hint {
  font-size: 10.5px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* ── Reagent Rows ──────────────────────────────────────────── */
.mix-card__reagents {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reagent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-page);
  gap: 8px;
  transition: var(--transition-base);
}

.reagent-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
}

.reagent-volume {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.reagent-unit {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
  margin-left: 2px;
}

/* ── Mix Card Total ────────────────────────────────────────── */
.mix-card__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.mix-card__total span:first-child {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-tertiary);
}

.mix-card__total-value {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.mix-card--blue .mix-card__total-value {
  color: var(--color-accent);
}

.mix-card--teal .mix-card__total-value {
  color: #0D9488;
}

[data-theme="dark"] .mix-card--teal .mix-card__total-value {
  color: #2DD4BF;
}

/* ════════════════════════════════════════════════════════════
   M2 — PROTOCOL CHECKLIST
════════════════════════════════════════════════════════════ */

.checklist-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
  transition: color 0.4s ease;
}

.progress-pct--done {
  color: var(--color-success);
}

.progress-track {
  height: 8px;
  background: var(--border-subtle);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #06B6D4);
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill--done {
  background: linear-gradient(90deg, #16A34A, #22C55E);
}

/* ── Steps List ────────────────────────────────────────────── */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Step Item ─────────────────────────────────────────────── */
.step-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1.5px solid var(--border-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  /* Ensure large tap target */
  min-height: 72px;
}

.step-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.step-item:active::before {
  opacity: 0.04;
}

.step-item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

/* Completed state */
.step-item--done {
  background: var(--color-success-soft);
  border-color: rgba(22, 163, 74, 0.25);
}

[data-theme="dark"] .step-item--done {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.2);
}

.step-item--done:hover {
  border-color: rgba(22, 163, 74, 0.5);
}

/* ── Step Number Badge ─────────────────────────────────────── */
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-subtle);
  border: 1.5px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-spring);
  margin-top: 2px;
}

.step-num--done {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #FFFFFF;
  transform: scale(1.05);
}

/* ── Step Content ──────────────────────────────────────────── */
.step-content {
  flex: 1;
  min-width: 0;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.step-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  transition: color 0.2s, opacity 0.2s;
}

.step-item--done .step-title {
  color: var(--text-tertiary);
  text-decoration: line-through;
  text-decoration-color: var(--color-success);
}

.step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 4px;
  transition: opacity 0.2s;
}

.step-item--done .step-desc {
  opacity: 0.5;
}

.step-detail {
  font-size: 11.5px;
  color: var(--text-tertiary);
  line-height: 1.4;
  font-style: italic;
  transition: opacity 0.2s;
}

.step-item--done .step-detail {
  opacity: 0.4;
}

/* ── Tap Hint Arrow ────────────────────────────────────────── */
.step-tap-hint {
  font-size: 20px;
  font-weight: 300;
  color: var(--text-tertiary);
  align-self: center;
  flex-shrink: 0;
  transition: var(--transition-base);
  line-height: 1;
}

.step-item:hover .step-tap-hint {
  color: var(--color-accent);
  transform: translateX(3px);
}

.step-item--done .step-tap-hint {
  color: var(--color-success);
  font-size: 18px;
  font-weight: 600;
}

/* ── Reset Button ──────────────────────────────────────────── */
.reset-btn {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 14px 20px;
  background: transparent;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-base);
}

.reset-btn:not(:disabled):hover {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #DC2626;
}

[data-theme="dark"] .reset-btn:not(:disabled):hover {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.3);
  color: #F87171;
}

.reset-btn:not(:disabled):active {
  transform: scale(0.97);
}

.reset-btn--disabled,
.reset-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Step Done Animation ───────────────────────────────────── */
@keyframes stepDone {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.96); }
  70%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.step-item--done {
  animation: stepDone 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ════════════════════════════════════════════════════════════
   M5 — POLISH, ANIMATIONS & BOTTOM NAV
════════════════════════════════════════════════════════════ */

/* ── Animated volume number ────────────────────────────────── */
.volume-num {
  display: inline-block;
}

/* ── Celebration Banner ────────────────────────────────────── */
.celebration-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(135deg,
    rgba(22, 163, 74, 0.12) 0%,
    rgba(16, 185, 129, 0.10) 50%,
    rgba(6, 182, 212, 0.10) 100%);
  border: 1.5px solid rgba(22, 163, 74, 0.3);
  border-radius: var(--radius-card);
  text-align: center;
}

[data-theme="dark"] .celebration-banner {
  background: linear-gradient(135deg,
    rgba(22, 163, 74, 0.15) 0%,
    rgba(16, 185, 129, 0.12) 100%);
  border-color: rgba(22, 163, 74, 0.25);
}

.celebration-emoji {
  font-size: 28px;
  display: block;
  flex-shrink: 0;
  animation: celebBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.celebration-emoji:last-child { animation-delay: 0.1s; }

@keyframes celebBounce {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);  opacity: 1; }
}

.celebration-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-success);
  letter-spacing: -0.3px;
}

.celebration-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── Bottom Navigation Bar ─────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-header);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-top: 1px solid var(--border-subtle);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav__inner {
  display: flex;
  max-width: 680px;
  margin: 0 auto;
}

.bottom-nav__btn {
  flex: 1;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px 8px 8px;
  position: relative;
  transition: var(--transition-base);
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__btn:active { transform: scale(0.90); }

.bottom-nav__icon {
  font-size: 22px;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav__btn--active .bottom-nav__icon {
  transform: scale(1.15) translateY(-2px);
}

.bottom-nav__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.2px;
  transition: color 0.2s ease;
}

.bottom-nav__btn--active .bottom-nav__label { color: var(--color-accent); }

/* Active indicator pip */
.bottom-nav__pip {
  position: absolute;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pipPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pipPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── Enhanced Hover Glows ──────────────────────────────────── */
.mix-card--blue:hover {
  box-shadow: var(--shadow-card-hover), 0 0 0 3px rgba(37,99,235,0.08);
}

.mix-card--teal:hover {
  box-shadow: var(--shadow-card-hover), 0 0 0 3px rgba(13,148,136,0.08);
}

/* ── Done step subtle ring ─────────────────────────────────── */
.step-item--done {
  box-shadow: var(--shadow-card), 0 0 0 1.5px rgba(22,163,74,0.2);
}

/* ── Focus Visible ─────────────────────────────────────────── */
.step-item:focus-visible,
.stepper-btn:focus-visible,
.reset-btn:focus-visible,
.bottom-nav__btn:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ════════════════════════════════════════════════════════════
   TUBE SPLIT WARNING — Mix B
════════════════════════════════════════════════════════════ */
.tube-split {
  background: linear-gradient(135deg,
    rgba(245, 158, 11, 0.08) 0%,
    rgba(251, 191, 36, 0.05) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

[data-theme="dark"] .tube-split {
  background: linear-gradient(135deg,
    rgba(245, 158, 11, 0.12) 0%,
    rgba(251, 191, 36, 0.07) 100%);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Header row */
.tube-split__header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tube-split__icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1.2;
}

.tube-split__title {
  font-size: 15px;
  font-weight: 800;
  color: #B45309;
  letter-spacing: -0.2px;
}

[data-theme="dark"] .tube-split__title { color: #FCD34D; }

.tube-split__sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Tubes list */
.tube-split__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tube-split__row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 10px 12px;
}

.tube-split__tube-num {
  font-size: 12px;
  font-weight: 700;
  color: #B45309;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="dark"] .tube-split__tube-num {
  color: #FCD34D;
  background: rgba(251, 191, 36, 0.15);
}

.tube-split__details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tube-split__details > span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.tube-split__vol {
  font-size: 11px;
  color: var(--text-secondary);
}

.tube-split__total {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  background: var(--color-accent-soft);
  border-radius: 6px;
  padding: 3px 8px;
}
