:root {
  --ink: #edf2f6;
  --card-bg: rgba(14, 22, 30, 0.46);
  --card-border: rgba(255, 255, 255, 0.24);
  --card-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  --dock-bg: rgba(8, 16, 24, 0.64);
  --chip-bg: rgba(255, 255, 255, 0.12);
  --chip-active: rgba(156, 214, 247, 0.32);
  --chip-border: rgba(255, 255, 255, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  padding: 0 0 168px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
}

canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.09), transparent 44%),
    radial-gradient(circle at 82% 82%, rgba(124, 209, 255, 0.1), transparent 40%);
}

.card {
  width: min(92vw, 710px);
  margin: 6vh auto 0;
  padding: 44px 46px;
  border-radius: 34px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(18px) saturate(118%);
  box-shadow: var(--card-shadow);
  text-align: center;
}

body.zen .card {
  --card-bg: rgba(12, 30, 31, 0.44);
  --card-border: rgba(172, 243, 225, 0.36);
}

body.focus .card {
  --card-bg: rgba(12, 14, 34, 0.44);
  --card-border: rgba(177, 198, 255, 0.34);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 11px;
  opacity: 0.72;
}

h1,
h2 {
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  margin: 10px 0 12px;
  letter-spacing: 0.03em;
}

h1 {
  font-size: clamp(34px, 6.1vw, 56px);
  line-height: 1.05;
}

h2 {
  font-size: clamp(24px, 4.4vw, 38px);
}

.tagline {
  max-width: 470px;
  margin: 0 auto 24px;
  line-height: 1.55;
  font-size: 16px;
  opacity: 0.88;
}

.install-btn {
  display: inline-block;
  border-radius: 999px;
  text-decoration: none;
  padding: 14px 34px;
  color: #f8f9fa;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(125deg, #2b7080, #5f9cc0 56%, #a8cfb6);
  box-shadow: 0 14px 34px rgba(31, 87, 102, 0.45);
}

.helper {
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.68;
}

.drag-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.drag-arrow {
  animation: arrowPulse 2.8s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%,
  100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 0.9; transform: translateY(-4px); }
}

.divider {
  width: min(380px, 72%);
  margin: 24px auto 16px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.33), transparent);
}

.instructions {
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
  font-size: 13px;
  opacity: 0.9;
}

.instructions div {
  margin-bottom: 8px;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.22);
}

.kbd {
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
  padding: 2px 6px;
  font-size: 11px;
}

.landing-content,
.zen-content,
.focus-content {
  transition: opacity 0.35s ease;
}

.zen-content,
.focus-content {
  display: none;
}

body.zen .landing-content,
body.focus .landing-content {
  display: none;
}

body.zen .zen-content {
  display: block;
}

body.focus .focus-content {
  display: block;
}

.breath-circle,
.focus-orb {
  margin: 18px auto;
  border-radius: 50%;
}

.breath-circle {
  width: 168px;
  height: 168px;
  background: radial-gradient(circle at 43% 40%, rgba(185, 255, 232, 0.68), rgba(50, 143, 159, 0.11));
  box-shadow: 0 0 38px rgba(162, 255, 226, 0.35);
  animation: breathe 6.4s ease-in-out infinite;
}

.focus-orb {
  width: 148px;
  height: 148px;
  background: radial-gradient(circle at 43% 34%, rgba(187, 217, 255, 0.95), rgba(37, 58, 118, 0.22));
  box-shadow: 0 0 42px rgba(123, 160, 245, 0.42);
}

@keyframes breathe {
  0%,
  100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.controls-dock {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 30;
  width: min(94vw, 760px);
}

.dock-shell {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background: var(--dock-bg);
  backdrop-filter: blur(15px) saturate(120%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.mode-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mode-row button {
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: inherit;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.mode-row button.active {
  background: var(--chip-active);
  border-color: rgba(191, 236, 255, 0.62);
}

#soundBtn {
  min-width: 132px;
}

#soundBtn.sound-off {
  opacity: 0.76;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

@media (max-width: 960px) {
  .card {
    margin-top: 4vh;
    padding: 34px 24px;
  }

  .controls-dock {
    width: min(96vw, 680px);
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 150px;
  }

  .card {
    width: 94vw;
    margin-top: 2vh;
    padding: 24px 16px;
    border-radius: 22px;
  }

  .tagline {
    font-size: 14px;
  }

  .instructions {
    font-size: 12px;
  }

  .controls-dock {
    width: 96vw;
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .dock-shell {
    border-radius: 18px;
    padding: 10px;
    gap: 7px;
  }

  .mode-row button {
    font-size: 11px;
    padding: 7px 11px;
  }
}
