:root {
  --bg-start: #153f39;
  --bg-end: #071d1d;
  --accent: #c8f078;
  --accent-rgb: 200, 240, 120;
  --text: #f5f7ee;
  --muted: rgba(245, 247, 238, 0.64);
  --line: rgba(255, 255, 255, 0.12);
  --panel: rgba(5, 24, 23, 0.4);
  --panel-strong: rgba(5, 21, 20, 0.68);
  --font-sans: "DM Sans", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 14% 4%, rgba(var(--accent-rgb), 0.16), transparent 27rem),
    linear-gradient(145deg, var(--bg-start), var(--bg-end) 70%);
  transition: background 900ms ease;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.ambient-orb {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
  transition: background 900ms ease;
}

.ambient-orb--one {
  top: 16%;
  right: -10rem;
  width: 36rem;
  height: 36rem;
  background: rgba(var(--accent-rgb), 0.08);
}

.ambient-orb--two {
  bottom: -15rem;
  left: 20%;
  width: 30rem;
  height: 30rem;
  background: rgba(71, 133, 127, 0.1);
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  height: 88px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand__mark {
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--accent);
}

.brand__mark span {
  display: block;
  width: 2px;
  border-radius: 5px;
  background: var(--bg-end);
}

.brand__mark span:nth-child(1) {
  height: 7px;
}

.brand__mark span:nth-child(2) {
  height: 13px;
}

.brand__mark span:nth-child(3) {
  height: 9px;
}

.topbar__actions,
.master-volume {
  display: flex;
  align-items: center;
}

.topbar__actions {
  gap: 15px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.mute-cross,
.is-muted .volume-wave {
  display: none;
}

.is-muted .mute-cross {
  display: block;
}

.master-volume {
  gap: 11px;
}

.master-volume input,
.sound-card__volume {
  height: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}

.master-volume input {
  width: 96px;
}

.master-volume span {
  width: 36px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(600px, 1.55fr);
  gap: clamp(40px, 7vw, 112px);
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0 100px;
}

.hero {
  position: sticky;
  top: 72px;
  align-self: start;
  padding-top: 44px;
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.hero h1 {
  max-width: 460px;
  margin: 24px 0 24px;
  font-size: clamp(44px, 4.2vw, 66px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero__copy {
  max-width: 370px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.workspace {
  padding: 34px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px);
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 26px;
}

.panel-heading h2 {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.text-button {
  padding: 5px 0;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  font-size: 13px;
}

.text-button:hover {
  color: var(--text);
  border-color: currentColor;
}

.sound-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sound-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 174px;
  padding: 19px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.sound-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.17);
}

.sound-card.is-active {
  background: rgba(var(--card-rgb), 0.16);
  border-color: rgba(var(--card-rgb), 0.48);
}

.sound-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.sound-card__icon {
  width: 34px;
  height: 34px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 220ms ease, transform 220ms ease;
}

.sound-card.is-active .sound-card__icon {
  color: rgb(var(--card-rgb));
  transform: scale(1.08);
}

.sound-card__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.sound-card__toggle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 0 rgba(var(--card-rgb), 0);
  transition: all 220ms ease;
}

.sound-card.is-active .sound-card__toggle {
  background: rgb(var(--card-rgb));
  box-shadow: 0 0 0 5px rgba(var(--card-rgb), 0.12), 0 0 18px rgba(var(--card-rgb), 0.6);
}

.sound-card__name {
  margin-top: auto;
  font-size: 14px;
  font-weight: 500;
}

.sound-card__volume-wrap {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 220ms ease, opacity 220ms ease, margin 220ms ease;
}

.sound-card.is-active .sound-card__volume-wrap {
  grid-template-rows: 1fr;
  margin-top: 14px;
  opacity: 1;
}

.sound-card__volume-inner {
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.sound-card__volume {
  width: 100%;
}

.lower-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  margin-top: 12px;
}

.presets-card,
.timer-card {
  padding: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.panel-heading--compact {
  margin-bottom: 18px;
}

.panel-heading--compact h2 {
  font-size: 18px;
}

.preset-list {
  display: grid;
  gap: 8px;
}

.preset-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 13px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: 12px;
  text-align: left;
  transition: all 180ms ease;
}

.preset-button:hover,
.preset-button.is-current {
  background: rgba(var(--accent-rgb), 0.11);
  border-color: rgba(var(--accent-rgb), 0.24);
}

.preset-button__name {
  font-size: 13px;
  font-weight: 500;
}

.preset-button__meta {
  color: var(--muted);
  font-size: 11px;
}

.preset-button svg {
  width: 15px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timer-card {
  display: flex;
  flex-direction: column;
}

.timer-card__top {
  display: flex;
  justify-content: space-between;
}

.timer-card__hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.timer-status {
  align-self: start;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  font-size: 10px;
}

.timer-display {
  align-self: flex-start;
  padding: 0;
  margin: auto 0 20px;
  cursor: pointer;
  background: transparent;
  border: 0;
  font-size: clamp(48px, 5vw, 62px);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.07em;
}

.timer-controls {
  display: flex;
  gap: 8px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  cursor: pointer;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.primary-button {
  flex: 1;
  gap: 7px;
  color: #10241f;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.primary-button svg {
  width: 14px;
  fill: currentColor;
  stroke: none;
}

.secondary-button {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: min(1180px, calc(100% - 48px));
  padding: 24px 0 42px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 20;
  padding: 11px 16px;
  color: #13271f;
  pointer-events: none;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

  .hero {
    position: static;
    padding-top: 0;
  }

  .hero h1 {
    max-width: 620px;
  }

  .hero__copy {
    max-width: 560px;
  }
}

@media (max-width: 680px) {
  .topbar,
  .app-shell,
  footer {
    width: min(100% - 30px, 1180px);
  }

  .topbar {
    height: 72px;
  }

  .master-volume input {
    width: 66px;
  }

  .master-volume span {
    display: none;
  }

  .app-shell {
    gap: 38px;
    padding-bottom: 62px;
  }

  .hero h1 {
    margin-top: 18px;
    font-size: clamp(43px, 13vw, 62px);
  }

  .workspace {
    padding: 20px;
    border-radius: 24px;
  }

  .sound-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sound-card {
    min-height: 158px;
  }

  .lower-grid {
    grid-template-columns: 1fr;
  }

  .timer-card {
    min-height: 280px;
  }

  footer {
    flex-wrap: wrap;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
