:root {
  color-scheme: dark;
  --blue: #5d9bef;
  --sky: #82c8f8;
  --violet: #8d6be8;
  --lavender: #b178ee;
  --aqua: #6be7e9;
  --navy: #17345f;
  --ink: #f8fbff;
  --muted: rgba(248, 251, 255, 0.78);
  --glass: rgba(255, 255, 255, 0.18);
  --glass-strong: rgba(255, 255, 255, 0.28);
  --line: rgba(255, 255, 255, 0.36);
  --shadow: 0 22px 60px rgba(23, 52, 95, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, "SF Pro Display", "Avenir Next", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(107, 231, 233, 0.42), transparent 28rem),
    linear-gradient(160deg, #5d9bef 0%, #7b83ee 42%, #b178ee 100%);
}

button,
select,
textarea {
  font: inherit;
}

.phone-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
}

.app-bar {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  gap: 12px;
  align-items: center;
  padding: 6px 0 16px;
}

.app-bar h1,
.app-bar p,
.hero-card h2,
.hero-card p,
.section-heading h2,
.section-heading p,
.plan-card h3,
.plan-card p {
  margin: 0;
}

.app-bar h1 {
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0;
}

.eyebrow,
.section-heading p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.icon-button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  background: var(--glass);
  backdrop-filter: blur(18px);
}

.icon-button span {
  display: block;
  font-size: 25px;
  line-height: 1;
}

.hero-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -54px auto;
  width: 150px;
  height: 150px;
  border-radius: 38px;
  transform: rotate(18deg);
  background:
    linear-gradient(135deg, rgba(107, 231, 233, 0.9), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(0deg, transparent 0 14px, rgba(23, 52, 95, 0.18) 14px 15px);
  opacity: 0.72;
}

.hero-copy,
.file-chip {
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.hero-card h2 {
  max-width: 12ch;
  margin-top: 12px;
  font-size: 26px;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-card p:last-child {
  max-width: 29ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.42;
}

.file-chip,
.attachment-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 12px;
  background: rgba(23, 52, 95, 0.24);
}

.file-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  color: var(--navy);
  background: var(--aqua);
  font-size: 13px;
  font-weight: 900;
}

strong {
  display: block;
}

small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.step-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 16px 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(23, 52, 95, 0.2);
  backdrop-filter: blur(18px);
}

.step {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.step span {
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-right: 2px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.74);
}

.step.is-active {
  color: var(--navy);
  background: white;
}

.screen-stack {
  position: relative;
}

.panel {
  display: none;
  padding: 18px;
}

.panel.is-visible {
  display: block;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-top: 2px;
  font-size: 21px;
  letter-spacing: 0;
}

.preview-list {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
}

.preview-row {
  display: grid;
  grid-template-columns: 1fr 0.78fr 0.95fr;
  gap: 9px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(23, 52, 95, 0.16);
  font-size: 13px;
  font-weight: 700;
}

.preview-row:first-child {
  border-top: 0;
}

.preview-head {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.signal-grid div {
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.signal-grid strong {
  font-size: 22px;
}

.signal-grid span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mapping-list,
.log-sheet {
  display: grid;
  gap: 10px;
}

.map-card {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  background: rgba(23, 52, 95, 0.16);
}

select {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.primary-action {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  color: var(--navy);
  background: var(--aqua);
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(23, 52, 95, 0.24);
}

.plan-card {
  padding: 14px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(23, 52, 95, 0.17);
}

.plan-card:first-of-type {
  margin-top: 0;
}

.plan-card.featured {
  background: linear-gradient(135deg, rgba(107, 231, 233, 0.34), rgba(255, 255, 255, 0.16));
}

.plan-card h3 {
  margin-top: 8px;
  font-size: 17px;
}

.plan-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.38;
}

.attachment-row {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.14);
}

.attachment-row > span:first-child {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.attendance-strip {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.avatar {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  color: white;
  background: rgba(23, 52, 95, 0.22);
  font-weight: 900;
}

.avatar.is-present {
  color: var(--navy);
  background: white;
  box-shadow: inset 0 -5px 0 var(--aqua);
}

.log-sheet {
  margin-top: 12px;
}

.log-sheet label {
  display: grid;
  gap: 7px;
  color: white;
  font-size: 14px;
  font-weight: 800;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  padding: 12px;
  color: white;
  background: rgba(23, 52, 95, 0.22);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
}

@media (min-width: 760px) {
  body {
    display: grid;
    place-items: start center;
    padding: 28px;
  }

  .phone-shell {
    min-height: auto;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 90px rgba(23, 52, 95, 0.28);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .panel {
    animation: panel-in 180ms ease-out;
  }

  .step,
  .primary-action,
  .icon-button,
  .avatar {
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
  }

  button:active {
    transform: scale(0.97);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
