:root {
  --bg-top: #f3f5ef;
  --bg-bottom: #dce9dd;
  --card: rgba(255, 255, 255, 0.8);
  --line: rgba(67, 96, 88, 0.18);
  --text-main: #23312d;
  --text-soft: #4d6660;
  --mint: #83b7a0;
  --mint-dark: #5e9a86;
  --sand: #f5e7d5;
  --shadow: 0 20px 45px rgba(34, 62, 53, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", "Segoe UI", sans-serif;
  color: var(--text-main);
  background: linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  position: relative;
  overflow-x: hidden;
  padding-bottom: 154px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(2px);
  padding: 0.95rem;
  opacity: 0.65;
  z-index: 0;
}

.shape-a {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 35% 30%, #f8e6d5, #e8cdb3);
  top: -110px;
  right: -90px;
  animation: drift 16s ease-in-out infinite;
}

.shape-b {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at 40% 30%, #cde4d8, #9bc8b3);
  left: -90px;
  bottom: 8vh;
  animation: drift 22s ease-in-out infinite reverse;
}

.shape-c {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at 50% 40%, #f7eac3, #e9d999);
  top: 30vh;
  left: 58%;
  animation: drift 19s ease-in-out infinite;
}

.site-header,
.app-main,
.footer,
.mini-player {
  position: relative;
  z-index: 2;
}

.site-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 22px 14px;
  position: sticky;
  top: 0;
  z-index: 30;
  transition: padding 0.24s ease;
}

.header-inner {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  border-radius: 20px;
  border: 1px solid rgba(67, 96, 88, 0.2);
  background: rgba(245, 250, 246, 0.74);
  backdrop-filter: blur(9px);
  box-shadow: 0 14px 30px rgba(34, 62, 53, 0.1);
  padding: 12px 14px;
  transition:
    padding 0.24s ease,
    border-radius 0.24s ease,
    box-shadow 0.24s ease,
    background 0.24s ease;
}

.brand-block {
  display: grid;
  gap: 6px;
}

.brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(67, 96, 88, 0.22);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(34, 62, 53, 0.12);
  object-fit: cover;
  transition:
    width 0.24s ease,
    height 0.24s ease,
    border-radius 0.24s ease,
    box-shadow 0.24s ease;
}

.brand-text {
  display: grid;
  gap: 4px;
}

.brand-name {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(1.55rem, 3.1vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: #2b3b36;
  transform-origin: left center;
  transition: transform 0.24s ease;
}

.brand-copy {
  color: var(--text-soft);
  max-width: 580px;
  font-size: clamp(0.95rem, 1.65vw, 1.08rem);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.eyebrow {
  color: var(--mint-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-link {
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
  font-weight: 700;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    padding 0.24s ease,
    background 0.24s ease,
    color 0.24s ease;
}

.site-header.is-compact {
  padding-top: 9px;
  padding-bottom: 11px;
}

.site-header.is-compact .header-inner {
  padding: 10px 13px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(34, 62, 53, 0.08);
  background: rgba(246, 251, 247, 0.84);
}

.site-header.is-compact .brand-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  box-shadow: 0 7px 16px rgba(34, 62, 53, 0.1);
}

.site-header.is-compact .brand-name {
  transform: scale(0.94);
}

.site-header.is-compact .brand-copy {
  opacity: 0.91;
  transform: translateY(-0.6px);
}

.site-header.is-compact .nav-link {
  padding: 8px 13px;
}

.nav-link:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 154, 134, 0.45);
}

.nav-link.active {
  background: var(--mint);
  color: #fff;
  border-color: transparent;
}

.app-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 6px 22px 40px;
}

.layout {
  display: grid;
}

.page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.55s ease forwards;
}

.page-home .hero-panel {
  grid-column: 1 / -1;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}

.content-ad {
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.72);
}

.tip-rotator {
  margin-top: 16px;
  border: 1px solid rgba(94, 154, 134, 0.28);
  border-radius: 16px;
  padding: 12px 15px;
  background: linear-gradient(180deg, rgba(235, 246, 239, 0.92), rgba(225, 240, 231, 0.84));
}

.tip-rotator-label {
  font-size: 0.73rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mint-dark);
  font-weight: 700;
}

.tip-rotator-text {
  margin-top: 6px;
  color: #335147;
  font-weight: 700;
  font-size: 0.96rem;
  min-height: 1.4em;
}

.content-ad-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  font-weight: 700;
  margin-bottom: 8px;
}

.content-ad-slot {
  width: 100%;
  min-height: 90px;
}

#breathing-explanation-panel .tip-list + h2,
#music-frequency-explanation-panel .tip-list + h2 {
  margin-top: 22px;
}

#breathing-explanation-panel .tip-list + .note-text,
#music-frequency-explanation-panel .tip-list + .note-text {
  margin-top: 14px;
}

#content-ad-panel + #breathing-explanation-panel,
#content-ad-panel + #music-frequency-explanation-panel {
  margin-top: 20px;
}

.panel-wide {
  grid-column: 1 / -1;
}

.lead-copy {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: clamp(1rem, 2.1vw, 1.14rem);
  max-width: 900px;
}

.note-text {
  margin-top: 10px;
  color: var(--text-soft);
  font-weight: 700;
}

.tip-list,
.step-list {
  margin: 12px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--text-soft);
}

.step-list.compact {
  margin-top: 10px;
}

.status {
  min-height: 1.2em;
  margin: 10px 0 14px;
  color: var(--mint-dark);
  font-weight: 700;
}

.track-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.track-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(67, 96, 88, 0.22);
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.track-card:hover {
  border-color: rgba(94, 154, 134, 0.45);
  box-shadow: 0 8px 20px rgba(34, 62, 53, 0.1);
}

.track-card-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.95rem;
  align-items: stretch;
}

.track-cover {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
  border-radius: 0.85rem;
  border: 1px solid rgba(111, 137, 123, 0.22);
  background: #e5efe7;
}

.track-body {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.track-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.track-details {
  display: grid;
  gap: 6px;
}

.track-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.3rem;
}

.category-pill {
  width: fit-content;
  padding: 3px 10px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--sand);
  color: #8b684f;
  border-radius: 999px;
  font-weight: 700;
}

.hz-line {
  color: var(--mint-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

.track-copy {
  color: var(--text-soft);
  font-size: 0.96rem;
}

.track-play-btn {
  min-width: 90px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  background: var(--mint);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: #eef4ef;
  color: var(--text-main);
  border: 1px solid var(--line);
}

.volume-wrap {
  display: grid;
  gap: 5px;
}

.volume-label {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: var(--text-soft);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--mint-dark);
}

.timer-panel {
  display: grid;
  gap: 12px;
}

.timer-shell {
  background: linear-gradient(145deg, #f8faf7, #ecf5ee);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 8px;
}

.session-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--mint-dark);
}

.timer-display {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(95, 140, 123, 0.18);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #7ab197, #5e9a86);
  transition: width 0.35s linear;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-weight: 700;
}

.breathing-area {
  min-height: 220px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fbf7, #eaf3eb);
  margin-bottom: 14px;
}

.breathing-circle {
  --breath-duration: 4s;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #dff2e8, #88bca5);
  box-shadow: 0 0 0 0 rgba(131, 183, 160, 0.3);
  transform: scale(1);
  transition:
    transform var(--breath-duration) ease-in-out,
    box-shadow var(--breath-duration) ease-in-out,
    background var(--breath-duration) ease-in-out;
}

.breathing-circle.inhale {
  box-shadow: 0 0 0 26px rgba(131, 183, 160, 0.18);
  background: radial-gradient(circle at 30% 25%, #d4f1e4, #74ac93);
}

.breathing-circle.hold {
  box-shadow: 0 0 0 22px rgba(131, 183, 160, 0.2);
}

.breathing-circle.exhale {
  box-shadow: 0 0 0 0 rgba(131, 183, 160, 0);
  background: radial-gradient(circle at 30% 25%, #f2fbf5, #8cb9a6);
}

.breathing-instruction {
  min-height: 1.6em;
  color: var(--text-soft);
  margin-bottom: 12px;
  font-weight: 700;
}

.posture-panel h2 {
  margin-bottom: 10px;
}

.posture-guide {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: start;
}

.posture-illustration {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #e4efe6;
}

.posture-copy {
  display: grid;
  gap: 8px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.resource-card {
  display: grid;
  gap: 8px;
  text-decoration: none;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: inherit;
  padding: 15px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.resource-card:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 154, 134, 0.45);
}

.resource-card p {
  color: var(--text-soft);
}

.mini-player {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  width: min(1080px, calc(100% - 24px));
  border: 1px solid var(--line);
  background: rgba(245, 251, 246, 0.92);
  backdrop-filter: blur(7px);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.mini-player-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.2rem;
}

.mini-status {
  color: var(--text-soft);
  font-weight: 700;
}

.mini-buttons .btn {
  padding: 8px 14px;
}

.mini-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.mini-repeat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mini-repeat-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.mini-repeat-one-badge {
  position: absolute;
  right: 6px;
  bottom: 5px;
  min-width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(35, 49, 45, 0.88);
  color: #fff;
  font-size: 0.56rem;
  line-height: 11px;
  text-align: center;
  font-weight: 700;
}

.mini-repeat-btn.is-active {
  border-color: rgba(94, 154, 134, 0.58);
  background: rgba(131, 183, 160, 0.2);
  color: #1f4a3d;
}

.mini-open {
  background: var(--mint-dark);
}

.mini-volume-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--text-soft);
  font-weight: 700;
}

.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px 34px;
  color: var(--text-soft);
  text-align: center;
}

.footer-links {
  margin-top: 8px;
}

.footer-links a {
  color: var(--mint-dark);
  font-weight: 700;
  text-underline-offset: 3px;
}

.footer-copyright {
  margin-top: 7px;
  font-size: 0.86rem;
  opacity: 0.92;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(12px, 18px);
  }
}

@media (max-width: 900px) {
  body {
    padding-bottom: 210px;
  }

  .page {
    grid-template-columns: 1fr;
  }

  .panel-wide,
  .page-home .hero-panel {
    grid-column: auto;
  }

  .track-card-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .track-cover {
    min-height: 148px;
    max-height: 182px;
  }

  .posture-guide {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .site-header {
    padding-top: 10px;
  }

  .brand-head {
    align-items: flex-start;
  }

  .brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .mini-player {
    padding: 10px;
  }

  .content-ad {
    margin-top: 14px;
    padding: 12px 14px;
  }

  #breathing-explanation-panel .tip-list + h2,
  #music-frequency-explanation-panel .tip-list + h2 {
    margin-top: 18px;
  }

  #content-ad-panel + #breathing-explanation-panel,
  #content-ad-panel + #music-frequency-explanation-panel {
    margin-top: 14px;
  }

  .mini-volume-wrap {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
