:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0d1b2f;
  --surface: rgba(13, 27, 47, 0.78);
  --surface-strong: rgba(17, 35, 59, 0.94);
  --surface-raised: rgba(21, 43, 70, 0.92);
  --text: #f3f8ff;
  --muted: #9fb4cf;
  --border: rgba(167, 197, 233, 0.18);
  --border-strong: rgba(100, 207, 255, 0.35);
  --accent: #4fc3ff;
  --accent-strong: #72e2ff;
  --success: #37d67a;
  --success-soft: rgba(55, 214, 122, 0.14);
  --danger: #ff5b67;
  --danger-soft: rgba(255, 91, 103, 0.13);
  --warning: #ffca61;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --focus: 0 0 0 4px rgba(79, 195, 255, 0.28);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #edf5ff;
  --bg-soft: #dcecff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-raised: rgba(246, 250, 255, 0.98);
  --text: #08172a;
  --muted: #52677f;
  --border: rgba(42, 70, 103, 0.16);
  --border-strong: rgba(0, 115, 180, 0.24);
  --shadow: 0 24px 70px rgba(23, 50, 80, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(79, 195, 255, 0.22), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(55, 214, 122, 0.16), transparent 24rem),
    linear-gradient(145deg, var(--bg), var(--bg-soft));
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.background-map {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.72;
  background-image:
    linear-gradient(rgba(79, 195, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 195, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at center, transparent 0 6rem, rgba(79, 195, 255, 0.1) 6.05rem 6.12rem, transparent 6.18rem 11rem, rgba(79, 195, 255, 0.08) 11.05rem 11.12rem, transparent 11.18rem);
  background-size: 44px 44px, 44px 44px, 34rem 34rem;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.app-shell {
  width: min(1120px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.35), transparent 28%),
    linear-gradient(145deg, var(--accent), #2272ff 60%, #102d55);
  box-shadow: 0 12px 28px rgba(31, 145, 255, 0.28);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: white;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-toggle {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-raised);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.theme-toggle__icon {
  position: relative;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset -7px -5px 0 #0d1b2f;
}

[data-theme="light"] .theme-toggle__icon {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(255, 202, 97, 0.16);
}

.main-content {
  flex: 1;
  display: grid;
  align-items: center;
}

.screen {
  width: 100%;
  animation: screen-in 260ms ease both;
}

.screen.is-hidden {
  display: none;
}

.hero-card,
.checklist-screen {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.hero-card {
  min-height: clamp(620px, 76svh, 760px);
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.72fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: center;
  padding: clamp(26px, 5vw, 68px);
  overflow: hidden;
}

.hero-copy {
  display: grid;
  gap: 26px;
}

.hero-logo {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 30px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.36), transparent 28%),
    linear-gradient(145deg, #4fc3ff, #245dff 66%, #081a34);
  box-shadow: 0 26px 55px rgba(35, 132, 255, 0.34);
}

.hero-logo svg {
  width: 80px;
  height: 80px;
}

.hero-logo circle:first-child {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 2;
}

.hero-logo path,
.hero-logo circle:not(:first-child) {
  fill: none;
  stroke: #ffffff;
  stroke-width: 5.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.8rem, 6vw, 4.25rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.55rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.subtitle {
  margin-top: 14px;
  color: var(--accent-strong);
  font-size: clamp(1.24rem, 3.6vw, 2.05rem);
  font-weight: 850;
  letter-spacing: -0.035em;
}

.intro,
.checklist-header__copy,
.release-hint {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.intro {
  max-width: 600px;
}

.button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 18px;
  padding: 0 24px;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    background-color 180ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
}

.button--primary {
  justify-self: start;
  min-width: min(100%, 260px);
  color: #061221;
  background: linear-gradient(135deg, var(--accent-strong), var(--success));
  box-shadow: 0 18px 40px rgba(55, 214, 122, 0.25);
}

.button--ghost {
  border: 1px solid var(--border);
  background: var(--surface-raised);
}

.button--nav {
  width: fit-content;
  min-height: 44px;
  margin-bottom: 18px;
  padding: 0 16px;
  border: 1px solid var(--border);
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  font-size: 0.9rem;
}

.button--success {
  color: #03160d;
  background: linear-gradient(135deg, #69f29d, var(--success));
  box-shadow: 0 16px 32px rgba(55, 214, 122, 0.2);
}

.button--success:disabled {
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 91, 103, 0.9), rgba(104, 34, 51, 0.82));
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.72;
}

.flight-panel {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 24%, rgba(79, 195, 255, 0.16), transparent 13rem),
    rgba(6, 16, 30, 0.42);
}

.flight-panel::before {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(79, 195, 255, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.flight-panel__ring {
  width: min(100%, 250px);
  aspect-ratio: 1;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(79, 195, 255, 0.2), transparent 58%),
    conic-gradient(from 18deg, var(--success), var(--accent), transparent 68%, var(--success));
}

.flight-panel__ring span {
  font-size: 4.5rem;
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.flight-panel__ring small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.flight-panel__line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.flight-panel__line span {
  color: var(--muted);
}

.flight-panel__line strong {
  text-align: right;
}

.checklist-screen {
  padding: clamp(18px, 3.5vw, 38px);
}

.checklist-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 270px);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}

.section-label {
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.progress-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 130px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-raised);
}

.progress-card span {
  font-size: 3.3rem;
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.progress-card small {
  color: var(--muted);
  font-weight: 800;
}

.progress-track {
  height: 12px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

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

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.category-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-raised);
}

.category-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-card h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.category-count {
  min-width: 52px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 900;
}

.check-item {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(255, 91, 103, 0.28);
  border-left: 5px solid var(--danger);
  border-radius: 18px;
  background: var(--danger-soft);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.check-item:hover {
  transform: translateY(-1px);
}

.check-item.is-complete {
  border-color: rgba(55, 214, 122, 0.32);
  border-left-color: var(--success);
  background: var(--success-soft);
}

.check-item input {
  width: 29px;
  height: 29px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--success);
  cursor: pointer;
}

.check-item__text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.check-item__label {
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.22;
}

.check-item__status {
  color: var(--danger);
  font-size: 0.77rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.check-item.is-complete .check-item__status {
  color: var(--success);
}

.action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
}

.release-title {
  margin-bottom: 6px;
  font-size: 1.1rem;
  font-weight: 950;
}

.action-panel__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.success-message {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(55, 214, 122, 0.42);
  border-radius: 22px;
  color: #062817;
  background: linear-gradient(135deg, rgba(105, 242, 157, 0.96), rgba(55, 214, 122, 0.9));
  box-shadow: 0 20px 48px rgba(55, 214, 122, 0.18);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.45;
}

.success-message.is-hidden {
  display: none;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.footer span + span::before {
  content: "•";
  margin-right: 18px;
  opacity: 0.5;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@media (max-width: 920px) {
  .hero-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .flight-panel {
    order: -1;
  }

  .flight-panel__ring {
    max-width: 190px;
  }

  .checklist-header,
  .category-grid,
  .action-panel {
    grid-template-columns: 1fr;
  }

  .action-panel__buttons {
    justify-content: stretch;
  }

  .action-panel__buttons .button {
    flex: 1 1 230px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
    gap: 16px;
  }

  .topbar {
    border-radius: 24px;
  }

  .theme-toggle {
    width: 46px;
    padding: 0;
    justify-content: center;
  }

  .theme-toggle span:last-child,
  .brand small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .hero-card,
  .checklist-screen {
    border-radius: 26px;
  }

  .hero-card {
    padding: 22px;
  }

  .hero-copy {
    gap: 20px;
  }

  .hero-logo {
    width: 92px;
    height: 92px;
    border-radius: 24px;
  }

  .hero-logo svg {
    width: 64px;
    height: 64px;
  }

  h1 {
    font-size: clamp(2.75rem, 13vw, 3.2rem);
  }

  .flight-panel {
    padding: 16px;
  }

  .flight-panel__line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .flight-panel__line strong {
    text-align: left;
  }

  .progress-card {
    min-height: 108px;
  }

  .category-card {
    padding: 14px;
  }

  .check-item {
    min-height: 68px;
  }

  .button {
    width: 100%;
  }

  .button--nav {
    width: 100%;
  }

  .footer {
    display: grid;
    justify-items: center;
  }

  .footer span + span::before {
    content: none;
  }
}

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