:root {
  /* Ice Cold Leader palette: charcoal + orange */
  --bg-0: #080a0e;
  --bg-1: #0e1116;
  --bg-2: #161a21;
  --gold: #e86a00;        /* brand orange (var names kept for simplicity) */
  --gold-soft: #ff9c4a;
  --gold-deep: #c45205;
  --text: #f2f4f8;
  --muted: #8b93a2;
  --line: rgba(232, 106, 0, 0.22);
  --card: rgba(255, 255, 255, 0.035);
  --card-brd: rgba(255, 255, 255, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
html { background: var(--bg-0); }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(232,106,0,0.10), transparent 60%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1) 55%, var(--bg-2));
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.app { width: 100%; min-height: 100vh; }

/* ---------- Screens ---------- */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: clamp(28px, 7vh, 64px) 22px calc(34px + env(safe-area-inset-bottom));
  max-width: 540px;
  margin: 0 auto;
}
.screen.is-active { display: flex; animation: fade 0.5s ease both; }

@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Brand / Home ---------- */
.brand { text-align: center; margin-top: clamp(8px, 4vh, 36px); }

.brand__mark {
  width: auto; height: 74px;
  margin: 0 auto 22px;
  display: flex; justify-content: center;
}
.brand__mark img { height: 100%; width: auto; display: block; }
.brand__ring {
  position: absolute; inset: 0;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  opacity: 0.35;
}
.brand__ring:nth-child(2) { inset: 14px; opacity: 0.55; }
.brand__orb {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 0 28px rgba(232,106,0,0.45);
  animation: brandPulse 6s ease-in-out infinite;
}
@keyframes brandPulse { 0%,100% { transform: scale(0.86); } 50% { transform: scale(1.08); } }

.brand__title {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand__by {
  margin-top: 12px;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.home__intro {
  margin: clamp(26px, 6vh, 48px) 0 22px;
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
}

/* ---------- Session cards ---------- */
.sessions { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 14px; }

.session {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 16px;
  text-align: left;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--card-brd);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.session:hover, .session:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line);
  background: rgba(232,106,0,0.06);
  outline: none;
}
.session:active { transform: scale(0.99); }

.session__len {
  grid-row: 1 / 4;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 2.7rem;
  font-weight: 400;
  line-height: 1;
  color: var(--gold);
  min-width: 56px;
}
.session__unit {
  align-self: end;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.session__label { align-self: start; font-size: 0.95rem; color: var(--text); opacity: 0.9; }

/* resume indicator on a card */
.session__resume {
  grid-column: 2;
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px;
}
.session__resume[hidden] { display: none; }
.session__bar {
  flex: 1; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,0.12); overflow: hidden;
}
.session__bar > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft));
  border-radius: 3px;
}
.session__resume-txt {
  flex: none;
  font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--gold); white-space: nowrap;
}

/* start-over link in player */
.restart {
  margin-top: 12px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-family: inherit; font-size: 0.74rem;
  letter-spacing: 0.04em; padding: 7px 16px; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.restart:hover { color: var(--text); border-color: var(--gold); }

.home__footer {
  margin-top: auto;
  padding-top: 30px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
}
.about-link {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--gold); font-family: inherit; font-size: 0.8rem;
  letter-spacing: 0.08em; padding: 9px 20px; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.about-link:hover { background: rgba(232,106,0,0.08); border-color: var(--gold); }
.home__links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.home__note { color: var(--muted); font-size: 0.78rem; opacity: 0.8; }

/* ---------- About Errol ---------- */
.screen--about { justify-content: flex-start; }
.about { text-align: center; padding-bottom: 20px; }

.about__photo {
  position: relative;
  width: 132px; height: 132px;
  margin: clamp(8px, 3vh, 24px) auto 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #1c222b, #0c0f14);
  border: 1px solid var(--line);
  overflow: hidden;
}
.about__mono {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 2.6rem; font-weight: 600;
  color: var(--gold); letter-spacing: 0.04em;
}
.about__photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.about__photo img:not([src]), .about__photo img[src=""] { display: none; }

.about__name {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 600; font-size: clamp(1.9rem, 6vw, 2.4rem);
}
.about__tag {
  margin-top: 8px;
  color: var(--gold); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}

.about__bio { margin-top: 26px; text-align: left; }
.about__bio p {
  color: #cdd5e6; font-size: 0.98rem; line-height: 1.65;
  margin-bottom: 16px;
}
.about__bio em { color: var(--text); font-style: italic; }

.about__actions {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.about__btn {
  display: inline-block;
  padding: 12px 22px; border-radius: 999px;
  font-size: 0.86rem; letter-spacing: 0.04em; text-decoration: none;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  color: #1a1206; font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.about__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(232,106,0,0.3); }
.about__btn--ghost {
  background: none; color: var(--gold);
  border: 1px solid var(--line); font-weight: 500;
}
.about__btn--ghost:hover { border-color: var(--gold); box-shadow: none; }
.about__booknote {
  margin-top: 14px; text-align: center;
  color: var(--muted); font-size: 0.8rem;
}
.about__booknote em { font-style: italic; }

/* ---------- Safety ---------- */
.screen--safety { justify-content: flex-start; }
.safety { width: 100%; padding-bottom: 12px; }

.safety__icon {
  width: 60px; height: 60px; margin: clamp(4px, 2vh, 16px) auto 18px;
  display: grid; place-items: center; border-radius: 50%;
  color: var(--gold);
  background: radial-gradient(circle at 35% 30%, rgba(232,106,0,0.18), rgba(232,106,0,0.05));
  border: 1px solid var(--line);
}
.safety__title {
  text-align: center;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 600; font-size: clamp(1.8rem, 6vw, 2.3rem);
}
.safety__lead {
  margin: 14px auto 24px; max-width: 30em; text-align: center;
  color: #cdd5e6; font-size: 0.98rem; line-height: 1.6;
}
.safety__list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.safety__list li {
  position: relative; padding-left: 26px;
  color: #cdd5e6; font-size: 0.96rem; line-height: 1.5;
}
.safety__list li::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
}
.safety__list strong { color: var(--text); font-weight: 600; }

.safety__note {
  margin-top: 24px; color: var(--muted); font-size: 0.8rem;
  line-height: 1.5; text-align: center;
}

/* Acknowledge button only appears when shown as a first-time gate */
.safety__agree {
  display: none;
  width: 100%; margin-top: 26px;
  padding: 15px; border: none; border-radius: 14px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  color: #1a1206; font-family: inherit; font-weight: 600;
  font-size: 0.98rem; letter-spacing: 0.03em; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.safety__agree:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(232,106,0,0.35); }
.safety__agree:active { transform: scale(0.99); }
.screen--safety.is-gate .safety__agree { display: block; }

/* ---------- Streak chip (home) ---------- */
.streak-chip {
  margin: -6px auto 18px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,106,0,0.1);
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--gold); font-family: inherit;
  font-size: 0.82rem; letter-spacing: 0.03em;
  padding: 7px 16px; cursor: pointer;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.streak-chip:hover { background: rgba(232,106,0,0.16); }
.streak-chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px rgba(232,106,0,0.7);
}

/* ---------- Stats / progress ---------- */
.screen--stats { justify-content: flex-start; }
.stats { width: 100%; }
.stats__title {
  text-align: center;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 600; font-size: clamp(1.9rem, 6vw, 2.4rem);
  margin-bottom: clamp(18px, 4vh, 32px);
}
.stats__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.stat {
  background: var(--card); border: 1px solid var(--card-brd);
  border-radius: 16px; padding: 20px 10px; text-align: center;
}
.stat__num {
  display: block;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: clamp(2.1rem, 9vw, 2.8rem); font-weight: 600;
  color: var(--gold); line-height: 1;
}
.stat__label {
  display: block; margin-top: 8px;
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}

.stats__history { margin-top: 30px; }
.stats__subhead {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 12px;
}
.history { list-style: none; display: flex; flex-direction: column; }
.history li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 2px; border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.95rem; color: var(--text);
}
.history li:last-child { border-bottom: none; }
.history__date { color: var(--muted); font-size: 0.85rem; }

.stats__empty {
  margin-top: 28px; text-align: center; color: var(--muted);
  font-size: 0.95rem; line-height: 1.6;
}
.stats__note {
  margin-top: 26px; text-align: center;
  color: var(--muted); font-size: 0.78rem; opacity: 0.8;
}

/* ---------- Email signup (about) ---------- */
.signup {
  margin-top: 34px; padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.07); text-align: center;
}
.signup__head {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 600; font-size: 1.5rem;
}
.signup__sub {
  margin: 8px auto 16px; max-width: 28em;
  color: var(--muted); font-size: 0.9rem; line-height: 1.5;
}
.signup__form { display: flex; gap: 10px; flex-wrap: wrap; }
.signup__input {
  flex: 1 1 180px; min-width: 0;
  padding: 13px 16px; border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-brd); color: var(--text);
  font-family: inherit; font-size: 0.95rem;
}
.signup__input::placeholder { color: var(--muted); }
.signup__input:focus { outline: none; border-color: var(--gold); }
.signup__btn {
  flex: 0 0 auto;
  padding: 13px 24px; border: none; border-radius: 12px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  color: #1a1206; font-family: inherit; font-weight: 600;
  font-size: 0.95rem; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.signup__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(232,106,0,0.3); }
.signup__btn:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }
.signup__msg {
  margin-top: 12px; font-size: 0.85rem; min-height: 1.2em;
}
.signup__msg.is-ok { color: var(--gold); }
.signup__msg.is-err { color: #e08a7d; }

/* ---------- Brand typography: uppercase geometric headings ---------- */
.player__title,
.about__name,
.safety__title,
.stats__title,
.signup__head {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
/* solid-weight headings */
.about__name,
.safety__title,
.signup__head { font-weight: 700; }
/* two-weight headings: light base, extrabold key word (like the deck) */
.brand__title,
.player__title,
.stats__title { font-weight: 300; }
.brand__title strong,
.player__title strong,
.stats__title strong { font-weight: 800; }

/* ---------- Ice Cold Leader footer logo ---------- */
.icl-footer {
  margin-top: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0.85;
}
.icl-footer img { width: min(185px, 58%); height: auto; }
.icl-footer span {
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Player ---------- */
.screen--player { justify-content: flex-start; }

.player__back {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 0.92rem; font-family: inherit;
  padding: 6px 4px; margin-bottom: clamp(10px, 4vh, 30px);
  transition: color 0.15s ease;
}
.player__back:hover { color: var(--text); }

.player__head { text-align: center; }
.player__title {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 6vw, 2.2rem);
}
.player__sub {
  margin-top: 8px; color: var(--gold);
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
}

/* ---------- Breathing orb ---------- */
.orb {
  position: relative;
  width: min(64vw, 280px);
  aspect-ratio: 1;
  margin: clamp(28px, 7vh, 64px) auto;
  display: grid; place-items: center;
}
.orb__glow, .orb__core { position: absolute; border-radius: 50%; }
.orb__glow {
  inset: 0;
  background: radial-gradient(circle, rgba(232,106,0,0.28), transparent 68%);
  animation: breathe 11s ease-in-out infinite;
}
.orb__core {
  width: 52%; height: 52%;
  background: radial-gradient(circle at 36% 30%, var(--gold-soft), var(--gold) 52%, var(--gold-deep));
  box-shadow: 0 0 60px rgba(232,106,0,0.4);
  animation: breathe 11s ease-in-out infinite;
}
.orb__cue {
  position: relative; z-index: 1;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 1.5rem; letter-spacing: 0.16em;
  color: #2a1c0c; font-weight: 600;
  text-shadow: 0 1px 1px rgba(255,255,255,0.25);
  transition: opacity 0.6s ease;
}
@keyframes breathe {
  0%, 100% { transform: scale(0.8); }
  45%, 55% { transform: scale(1.12); }
}
.orb.is-paused .orb__glow, .orb.is-paused .orb__core { animation-play-state: paused; }

/* ---------- Controls ---------- */
.controls { width: 100%; margin-top: auto; }

.scrub { width: 100%; margin-bottom: 22px; }
#seek {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
}
#seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 10px rgba(232,106,0,0.6);
}
#seek::-moz-range-thumb {
  width: 16px; height: 16px; border: none; border-radius: 50%;
  background: var(--gold-soft);
}
.scrub__times {
  display: flex; justify-content: space-between;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem; color: var(--muted);
}

.buttons { display: flex; align-items: center; justify-content: center; gap: clamp(28px, 9vw, 52px); }

.btn {
  background: none; border: none; cursor: pointer; color: var(--text);
  display: grid; place-items: center; position: relative;
  transition: transform 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.92); }
.btn--skip {
  color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.btn--skip:hover { color: var(--text); }
.btn__num {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.03em;
}

.btn--play {
  width: 78px; height: 78px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  color: #1a1206;
  box-shadow: 0 8px 30px rgba(232,106,0,0.35);
}
.btn--play:hover { box-shadow: 0 8px 38px rgba(232,106,0,0.5); }
.btn--play .ic-pause { display: none; }
.btn--play.is-playing .ic-play { display: none; }
.btn--play.is-playing .ic-pause { display: block; }

/* loading state on play button */
.btn--play.is-loading { pointer-events: none; }
.btn--play.is-loading svg { opacity: 0; }
.btn--play.is-loading::after {
  content: ""; position: absolute;
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(26,18,6,0.3); border-top-color: #1a1206;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
