/* One-Minute Breather — layout & breathing circle */

:root {
  --bg: #f6f8fc;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --soft: #888;
  --accent: #3d6fd8;
  --accent-deep: #2a4a9e;
  --accent-light: #8eb8ff;
  --ring: rgba(168, 200, 255, 0.55);
  --success-bg: #e8f5e9;
  --success-border: #a5d6a7;
  --min-scale: 0.38;
  --max-scale: 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

h1 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.tagline {
  font-size: 1.08rem;
  line-height: 1.45;
  color: #2a2a2a;
  margin: 0 0 1rem;
}

.tagline strong {
  color: var(--text);
}

.success-banner {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: #1b5e20;
  font-size: 0.98rem;
}

.success-banner.hidden {
  display: none;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.controls.hidden,
.hidden {
  display: none !important;
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: 0.5rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid #c5d4ef;
  background: #fff;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

button:hover {
  background: #f0f5ff;
  border-color: var(--accent-light);
}

button:active {
  transform: scale(0.98);
}

button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-deep);
  flex: 1;
  min-width: 8rem;
}

button.primary:hover {
  background: #3568c9;
}

.btn-row {
  display: flex;
  gap: 0.65rem;
  width: 100%;
}

.btn-row button {
  flex: 1;
}

/* Breathing stage */
.breather {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 22rem;
  padding: 0.5rem 0 1rem;
}

.timer {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: #222;
}

.timer-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.breath-label {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 1rem;
  min-height: 1.5em;
  text-align: center;
}

.circle-stage {
  position: relative;
  width: 300px;
  height: 300px;
  display: grid;
  place-items: center;
}

/* 60s progress ring (SVG) sits behind the breathing orb */
.minute-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Outer ring + fill scale together */
.circle-scale {
  position: relative;
  z-index: 1;
  width: 300px;
  height: 300px;
  transform: scale(var(--circle-scale, 0.69));
  transition: transform 0.12s ease-out;
  will-change: transform;
}

.ring-outer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 252px;
  height: 252px;
  border-radius: 50%;
  border: 2.5px solid var(--ring);
  filter: blur(0.5px);
  box-shadow: 0 0 12px rgba(91, 141, 239, 0.25);
  pointer-events: none;
}

.breath-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 38% 38%,
    #8eb8ff 0%,
    #5b8def 45%,
    #3559a8 100%
  );
  border: 2.2px solid var(--accent-deep);
  box-shadow:
    0 0 24px rgba(61, 111, 216, 0.45),
    0 0 48px rgba(61, 111, 216, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.15);
}

hr.divider {
  border: none;
  border-top: 1px solid #dde5f0;
  margin: 2rem 0 1.5rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: #333;
}

.learn-block,
.faq-block,
.meta-block {
  margin-bottom: 1.75rem;
}

.meta-body {
  font-size: 0.92rem;
  color: #444;
  line-height: 1.55;
  margin: 0 0 0.85rem;
}

.meta-disclaimer {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
  background: #eef2f8;
  border: 1px solid #dde5f0;
}

.meta-subheading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  color: #333;
}

.meta-links {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.92rem;
  color: #444;
  line-height: 1.6;
}

.meta-links a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.meta-links a:hover {
  color: var(--accent);
}

details {
  margin-bottom: 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.45rem;
  background: #fff;
  overflow: hidden;
}

details summary {
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #2d3a4d;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: "▸";
  font-size: 0.75rem;
  color: var(--accent);
  transition: transform 0.2s;
}

details[open] summary::before {
  transform: rotate(90deg);
}

details .detail-body {
  padding: 0 0.85rem 0.85rem;
  font-size: 0.92rem;
  color: #444;
  line-height: 1.55;
}

details .detail-body strong {
  color: #222;
}

@media (max-width: 380px) {
  .circle-stage {
    width: 260px;
    height: 260px;
  }

  .minute-ring {
    width: 260px;
    height: 260px;
  }

  .ring-outer {
    width: 218px;
    height: 218px;
  }

  .breath-circle {
    width: 190px;
    height: 190px;
  }
}
