:root {
  color-scheme: light;
  --bg: #07152f;
  --bg-elevated: rgba(11, 27, 61, 0.82);
  --bg-strong: #0e2047;
  --text: #f4f8ff;
  --text-soft: #a5b5da;
  --text-faint: #7387b7;
  --line: rgba(152, 186, 255, 0.12);
  --line-strong: rgba(152, 186, 255, 0.22);
  --accent: #0d87ff;
  --accent-strong: #53b7ff;
  --accent-warm: #ffd28c;
  --accent-cool: #1ab4ff;
  --shadow: 0 28px 60px rgba(1, 6, 18, 0.42);
  --shadow-soft: 0 16px 30px rgba(1, 6, 18, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --space: 24px;
  --font-display: "Arial Black", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #030c1f;
  --bg-elevated: rgba(8, 18, 42, 0.9);
  --bg-strong: #0b1a39;
  --text: #f6f9ff;
  --text-soft: #9db2dd;
  --text-faint: #6f86b9;
  --line: rgba(152, 186, 255, 0.1);
  --line-strong: rgba(152, 186, 255, 0.22);
  --accent: #1696ff;
  --accent-strong: #66c7ff;
  --accent-warm: #ffd89d;
  --accent-cool: #22b2ff;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 16px 30px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 16%, rgba(44, 144, 255, 0.2), transparent 24%),
    radial-gradient(circle at 82% 22%, rgba(25, 176, 255, 0.18), transparent 18%),
    linear-gradient(135deg, #102a66 0%, #081633 44%, #030b1d 100%),
    var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  color: inherit;
}

.app-shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 28px 24px 112px;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.6;
  pointer-events: none;
}

.ambient-a {
  width: 260px;
  height: 260px;
  background: rgba(13, 135, 255, 0.18);
  top: -60px;
  left: -40px;
}

.ambient-b {
  width: 320px;
  height: 320px;
  background: rgba(26, 180, 255, 0.12);
  right: -90px;
  bottom: 15vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  padding: 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffffff 0 36%, var(--accent) 36% 100%);
  color: white;
  font: 900 1.05rem/1 var(--font-display);
  box-shadow: var(--shadow-soft);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.brand-copy strong,
.hero-copy h1,
.view h2,
.view h3 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.brand-copy small {
  color: var(--text-soft);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.streak-pill,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.main-content {
  display: block;
}

.view {
  display: none;
  animation: fade-slide 320ms ease;
}

.view.active {
  display: block;
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-panel,
.surface,
.card,
.metric-card,
.break-card,
.focus-panel,
.settings-panel,
.progress-panel,
.session-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.hero-panel {
  padding: 34px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(8, 18, 42, 0.96) 0%, rgba(10, 21, 48, 0.96) 56%, rgba(11, 38, 95, 0.94) 100%);
  border: 1px solid rgba(84, 153, 255, 0.18);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}

.hero-copy p,
.muted {
  color: var(--text-soft);
}

.hero-actions,
.inline-actions,
.toast-actions,
.choice-grid,
.settings-grid,
.stats-grid,
.break-grid,
.category-tabs,
.focus-presets,
.weekly-bars,
.quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button,
.ghost-button,
.chip-button,
.tab-button {
  border-radius: 16px;
  padding: 14px 18px;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.chip-button:hover,
.tab-button:hover,
.nav-item:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(145deg, var(--accent), var(--accent-cool));
  color: white;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(152, 186, 255, 0.14);
  color: var(--text);
}

.ghost-button,
.chip-button,
.tab-button {
  background: transparent;
  border: 1px solid var(--line);
}

.chip-button.active,
.tab-button.active {
  background: rgba(13, 135, 255, 0.14);
  border-color: rgba(13, 135, 255, 0.32);
  color: var(--accent-strong);
}

.hero-visual {
  display: grid;
  gap: 14px;
  align-content: space-between;
}

.orbital-card {
  position: relative;
  min-height: 340px;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(15, 31, 71, 0.92), rgba(6, 15, 35, 0.95));
  border-radius: var(--radius-xl);
  border: 1px solid rgba(84, 153, 255, 0.18);
}

.ring {
  width: 180px;
  height: 180px;
  margin: 10px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) 0deg, rgba(255, 255, 255, 0.18) 0deg);
  position: relative;
}

.ring::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #07152f;
}

.ring-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.ring-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.panel-grid,
.explore-layout,
.progress-layout,
.settings-layout,
.focus-layout {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

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

.metric-card,
.card,
.break-card,
.focus-panel,
.settings-panel,
.progress-panel,
.session-panel {
  padding: 22px;
}

.metric-card strong,
.stat-value {
  display: block;
  margin-top: 10px;
  font-size: 1.75rem;
  font-family: var(--font-display);
}

.quick-stats {
  margin-top: 18px;
}

.quick-stat {
  min-width: 120px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(152, 186, 255, 0.12);
}

.quick-stat span {
  display: block;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.quick-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

.subhead {
  color: var(--text-soft);
  max-width: 62ch;
}

.explore-layout,
.progress-layout,
.settings-layout,
.focus-layout {
  grid-template-columns: 1.15fr 0.85fr;
}

.break-grid {
  align-items: stretch;
}

.break-card {
  flex: 1 1 220px;
  min-width: 220px;
}

.break-card .duration-badge,
.category-label {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(13, 135, 255, 0.14);
  color: var(--accent-strong);
}

.list {
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.list li + li {
  margin-top: 10px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.progress-stat {
  padding: 16px;
  border-radius: 18px;
  background: var(--bg-strong);
  border: 1px solid var(--line);
}

.weekly-bars {
  align-items: flex-end;
  min-height: 220px;
  padding-top: 24px;
}

.weekly-bar {
  flex: 1;
  min-width: 34px;
  border-radius: 16px 16px 8px 8px;
  background: linear-gradient(180deg, #4fd0ff, #0d87ff);
  position: relative;
}

.weekly-bar span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -28px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.weekly-bar strong {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
}

.session-panel {
  display: grid;
  gap: 18px;
  max-width: 860px;
  margin: 0 auto;
}

.session-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: center;
}

.session-step {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-strong);
  border: 1px solid var(--line);
}

.instruction-list {
  padding-left: 18px;
  color: var(--text-soft);
}

.focus-progress {
  display: grid;
  gap: 16px;
}

.progress-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(13, 135, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, var(--accent), var(--accent-cool));
  transition: width 300ms ease;
}

.focus-presets button {
  flex: 1 1 160px;
}

.settings-grid {
  align-items: stretch;
}

.field,
.toggle-row,
.custom-plan {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.field:last-child,
.toggle-row:last-child,
.custom-plan:last-child {
  border-bottom: 0;
}

.field label,
.toggle-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.field input,
.field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg-strong);
  color: var(--text);
  padding: 12px 14px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  display: flex;
  gap: 8px;
  padding: 10px;
  width: min(92vw, 720px);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: var(--shadow);
  border-radius: 24px;
  z-index: 20;
}

body[data-theme="dark"] .bottom-nav {
  background: rgba(12, 25, 30, 0.86);
}

.nav-item {
  flex: 1;
  padding: 14px 12px;
  border-radius: 16px;
  background: transparent;
  color: var(--text-soft);
}

.nav-item.active {
  background: rgba(13, 135, 255, 0.12);
  color: var(--accent-strong);
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 100px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  z-index: 40;
}

.toast {
  padding: 16px;
  border-radius: 20px;
  background: var(--bg-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.toast-copy strong {
  display: block;
  margin-bottom: 4px;
}

.onboarding-dialog {
  width: min(760px, calc(100vw - 24px));
  border: 0;
  background: transparent;
  padding: 0;
}

.onboarding-dialog::backdrop {
  background: rgba(5, 15, 18, 0.42);
  backdrop-filter: blur(10px);
}

.onboarding-card {
  padding: 28px;
  background: var(--bg-strong);
  border-radius: 30px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.choice-grid label {
  flex: 1 1 180px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(8, 18, 42, 0.72);
  border: 1px solid var(--line);
}

.promo-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.promo-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 85%);
}

.promo-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
}

.promo-lockup {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promo-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  line-height: 0.9;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.promo-logo .promo-logo-mark {
  color: #ffffff;
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  font-style: italic;
  letter-spacing: -0.08em;
}

.promo-logo .promo-logo-word {
  color: var(--accent);
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  font-style: italic;
  letter-spacing: -0.08em;
}

.promo-tagline {
  color: var(--text-soft);
  max-width: 18ch;
}

.promo-model-stage {
  position: absolute;
  right: 12px;
  bottom: 0;
  width: 56%;
  height: 100%;
  z-index: 2;
}

.promo-model-glow {
  position: absolute;
  right: 10%;
  bottom: 3%;
  width: 72%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 168, 255, 0.35) 0%, rgba(70, 168, 255, 0.06) 56%, transparent 72%);
  filter: blur(4px);
}

.promo-model-figure {
  position: absolute;
  right: 10%;
  bottom: 0;
  width: 58%;
  height: 82%;
  border-radius: 46% 46% 20% 20% / 28% 28% 12% 12%;
  background:
    radial-gradient(circle at 55% 13%, #f4d0b7 0 13%, transparent 14%),
    radial-gradient(circle at 48% 12%, #8f562f 0 9%, transparent 10%),
    radial-gradient(circle at 53% 16%, #f1d7c4 0 7%, transparent 8%),
    radial-gradient(circle at 57% 8%, #c2783d 0 16%, transparent 17%),
    linear-gradient(180deg, transparent 0 19%, #0d87ff 19% 57%, #ffffff 57% 63%, #0d87ff 63% 100%);
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.3);
  clip-path: polygon(38% 0%, 62% 0%, 74% 12%, 79% 20%, 82% 32%, 78% 47%, 86% 63%, 77% 100%, 26% 100%, 18% 64%, 24% 47%, 20% 32%, 24% 20%, 28% 12%);
}

.promo-model-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 55% 15%, rgba(255, 255, 255, 0.22), transparent 9%),
    linear-gradient(180deg, transparent 0 50%, rgba(0, 0, 0, 0.12) 100%);
}

.promo-ball {
  position: absolute;
  right: 0;
  bottom: 18px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.2) 40%, rgba(13, 135, 255, 0.6) 72%, rgba(13, 135, 255, 0.18) 100%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(13, 135, 255, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
}

.promo-ball::before,
.promo-ball::after {
  content: "";
  position: absolute;
  inset: 18% 16%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.promo-ball::after {
  inset: 33% 4%;
}

.choice-grid input {
  margin-right: 8px;
}

.onboarding-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-top: 18px;
}

.empty-state {
  text-align: center;
  padding: 34px 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-strong);
}

@media (max-width: 980px) {
  .hero-panel,
  .explore-layout,
  .progress-layout,
  .settings-layout,
  .focus-layout,
  .session-hero,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .panel-grid {
    display: grid;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 18px 16px 110px;
  }

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

  .topbar-meta {
    width: 100%;
    justify-content: space-between;
  }

  .hero-panel,
  .metric-card,
  .card,
  .break-card,
  .focus-panel,
  .settings-panel,
  .progress-panel,
  .session-panel,
  .onboarding-card {
    padding: 18px;
    border-radius: 24px;
  }

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

  .bottom-nav {
    gap: 4px;
    padding: 8px;
  }

  .nav-item {
    padding: 12px 8px;
    font-size: 0.86rem;
  }

  .onboarding-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .promo-model-stage {
    width: 68%;
    opacity: 0.94;
  }

  .promo-logo .promo-logo-mark,
  .promo-logo .promo-logo-word {
    font-size: 2.7rem;
  }
}
