/* === ALTERNATE NOSTRIL BREATHING === */

.page-header { margin-bottom: 24px; }

/* Settings panel — same pattern as diaphragmatic-breathing */
.settings {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 18px 6px;
  margin-bottom: 6px;
}

.settings.locked { opacity: 0.55; pointer-events: none; }

.settings-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.settings-row:last-child { border-bottom: none; }

.settings-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  flex: 0 0 auto;
  min-width: 110px;
}

.seg-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
}

.seg {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  min-width: 64px;
}

.seg:hover { border-color: var(--green-mid); color: var(--green-dark); }

.seg.active {
  background: var(--green-light);
  border-color: var(--green-mid);
  color: var(--green-dark);
  font-weight: 500;
}

.seg-title { font-weight: 600; font-size: 0.92rem; }
.seg-sub { font-size: 0.7rem; opacity: 0.8; }

/* Pre-instruction */
.pre-instruction {
  background: var(--green-light);
  border-left: 3px solid var(--green-mid);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.55;
}

.pre-instruction summary {
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.pre-instruction summary::-webkit-details-marker { display: none; }

.pre-instruction summary::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid var(--green-mid);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
}

.pre-instruction[open] summary::before { transform: rotate(90deg); }

.pre-instruction p { margin: 8px 0 0; }

/* Stage with nose icon and arrows */
.anb-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 28px 0 12px;
}

.anb-nose-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.anb-nose {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50%;
  transition: border-color 0.3s, background 0.3s;
}

.anb-nose-icon {
  font-size: 4rem;
  line-height: 1;
}

.anb-nostril {
  position: absolute;
  top: 60%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-mid);
  transition: background 0.25s, opacity 0.25s, box-shadow 0.25s, transform 0.25s;
  z-index: 2;
  opacity: 0.9;
}

.anb-nostril-left  { left: 34%; }
.anb-nostril-right { left: 56%; }

.anb-nostril.open {
  background: var(--green-dark);
  box-shadow: 0 0 14px rgba(74,122,90,0.55);
  opacity: 1;
  transform: scale(1.15);
}

.anb-nostril.closed {
  background: #C8C8C8;
  opacity: 0.55;
  transform: scale(0.85);
}

.anb-arrow {
  font-size: 1.6rem;
  color: var(--green-dark);
  width: 32px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  font-weight: 600;
}

.anb-arrow.visible { opacity: 1; }

/* During inhale/exhale phases, the nose ring takes the phase color */
.anb-nose.phase-inhale  { border-color: #6AA1C8; background: #EFF6FC; }
.anb-nose.phase-hold    { border-color: #9AA5AC; background: #EFF1F3; }
.anb-nose.phase-exhale  { border-color: #E0996B; background: #FCF4EC; }

.anb-phase-line {
  display: flex;
  align-items: baseline;
  gap: 16px;
  text-align: center;
}

.anb-phase {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--green-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.anb-seconds {
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.hint-text {
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
  min-height: 2.6rem;
  max-width: 360px;
}

/* Controls now sit above settings — add breathing room below them. */
.controls { margin-bottom: 24px; }

/* Session info */
.session-info {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.info-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 6px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 90px;
}

.info-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.info-val {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Done banner */
.done-banner {
  text-align: center;
  padding: 28px 20px;
  background: var(--green-light);
  border-radius: var(--radius);
  margin: 24px 0;
}

.done-emoji { font-size: 2.4rem; color: var(--green-dark); margin-bottom: 6px; }
.done-msg   { font-size: 1.25rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.done-sub   { font-size: 0.95rem; color: var(--text-muted); }

/* Numbered steps + bullet list */
.numbered-steps {
  list-style: decimal;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0 16px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.info-section a {
  color: var(--green-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.info-section a:hover { color: var(--green-mid); }

@media (max-width: 480px) {
  main { padding-top: 28px; }
  .page-header { margin-bottom: 16px; }
  .settings { padding: 6px 14px; }
  .settings-label { min-width: 100%; margin-bottom: 4px; }
  .anb-nose { width: 110px; height: 110px; }
  .anb-nose-icon { font-size: 3.2rem; }
  .anb-nostril { width: 11px; height: 11px; }
  .anb-seconds { font-size: 2rem; }
  .anb-phase { font-size: 0.95rem; }
}
