:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #17201b;
  background: #f4f0e8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: stretch;
  padding: 28px;
  background:
    linear-gradient(120deg, rgba(104, 153, 133, 0.24), transparent 40%),
    linear-gradient(315deg, rgba(210, 110, 84, 0.18), transparent 36%),
    #f4f0e8;
}

.practice,
.settings {
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.78);
  box-shadow: 0 24px 70px rgba(23, 32, 27, 0.12);
  backdrop-filter: blur(18px);
}

.practice {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  padding: 34px;
  overflow: hidden;
}

.practice__header,
.controls,
.sound-toggle,
.session-summary {
  display: flex;
  align-items: center;
}

.practice__header {
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #65736b;
  font-size: 14px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(46px, 7vw, 96px);
  line-height: 0.96;
}

h2 {
  font-size: 26px;
}

.metric {
  min-width: 132px;
  padding: 14px 16px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.74);
  text-align: right;
}

.metric span {
  display: block;
  font-size: 30px;
  font-weight: 750;
}

.metric small,
.session-summary span {
  color: #65736b;
}

.breath-stage {
  position: relative;
  flex: 1;
  min-height: 390px;
  display: grid;
  place-items: center;
}

.halo,
.breath-orb {
  position: absolute;
  border-radius: 50%;
}

.halo {
  width: min(56vw, 540px);
  aspect-ratio: 1;
  border: 1px solid rgba(84, 127, 108, 0.18);
  transform: scale(var(--orb-scale, 0.68));
  transition: transform 900ms ease-in-out;
}

.halo--outer {
  opacity: 0.48;
}

.halo--inner {
  width: min(44vw, 410px);
  opacity: 0.68;
}

.breath-orb {
  --orb-scale: 0.68;
  width: min(40vw, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #17201b;
  background:
    radial-gradient(circle at 39% 35%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.24) 35%, transparent 36%),
    linear-gradient(145deg, #78ad90, #e0a173);
  box-shadow:
    inset 0 0 44px rgba(255, 255, 255, 0.56),
    0 30px 84px rgba(76, 119, 98, 0.34);
  transform: scale(var(--orb-scale));
  transition:
    transform 900ms ease-in-out,
    background 900ms ease-in-out;
}

.breath-orb[data-phase="exhale"] {
  background:
    radial-gradient(circle at 39% 35%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.2) 35%, transparent 36%),
    linear-gradient(145deg, #6f96b5, #9dc49d);
}

.breath-orb span,
.breath-orb strong,
.breath-orb small {
  grid-area: 1 / 1;
}

.breath-orb span {
  transform: translateY(-58px);
  color: rgba(23, 32, 27, 0.72);
  font-size: 24px;
}

.breath-orb strong {
  font-size: 94px;
  letter-spacing: 0;
}

.breath-orb small {
  width: 180px;
  transform: translateY(70px);
  color: rgba(23, 32, 27, 0.62);
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.timeline {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 27, 0.1);
}

.timeline__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4e836a, #d99168);
  transition: width 120ms linear;
}

.controls {
  gap: 12px;
  margin-top: 22px;
}

.button {
  height: 52px;
  border: 1px solid rgba(23, 32, 27, 0.14);
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(23, 32, 27, 0.12);
}

.button--primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  background: #1d3329;
  color: #fffaf1;
}

.button--ghost {
  width: 52px;
  background: #fffaf1;
  color: #17201b;
  font-size: 24px;
}

.button__icon {
  width: 18px;
  text-align: center;
}

.sound-toggle {
  gap: 9px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.66);
  color: #38443e;
}

.sound-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #4e836a;
}

.settings {
  align-self: start;
  display: grid;
  gap: 18px;
  padding: 18px;
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  padding: 16px;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.72);
}

.slider-row span {
  color: #65736b;
}

.slider-row strong {
  font-size: 22px;
}

.slider-row input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #4e836a;
}

.session-summary {
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  background: #1d3329;
  color: #fffaf1;
}

.session-summary div {
  display: grid;
  gap: 4px;
}

.session-summary span {
  color: rgba(255, 250, 241, 0.68);
  font-size: 13px;
}

.session-summary strong {
  font-size: 18px;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .practice {
    min-height: 680px;
    padding: 22px;
  }

  .practice__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric {
    width: 100%;
    text-align: left;
  }

  .breath-stage {
    min-height: 340px;
  }

  .breath-orb {
    width: min(76vw, 310px);
  }

  .halo {
    width: min(88vw, 430px);
  }
}
