:root {
  color-scheme: light;
  --blue: #5d9bef;
  --sky: #82c8f8;
  --violet: #8d6be8;
  --lavender: #b178ee;
  --aqua: #6be7e9;
  --navy: #17345f;
  --ink: #18345e;
  --muted: #506684;
  --card: rgba(255, 255, 255, 0.9);
  --card-strong: #ffffff;
  --line: rgba(23, 52, 95, 0.15);
  --glass-line: rgba(255, 255, 255, 0.42);
  --focus: #ffd36d;
  --shadow: 0 24px 70px rgba(23, 52, 95, 0.28);
  font-family: Inter, "SF Pro Text", "SF Pro Display", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--blue);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 3%, rgba(107, 231, 233, 0.44), transparent 18rem),
    radial-gradient(circle at 90% 14%, rgba(255, 211, 109, 0.2), transparent 16rem),
    linear-gradient(155deg, #5d9bef 0%, #7387ee 42%, #8d6be8 72%, #b178ee 100%);
}

button,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(23, 52, 95, 0.28);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy);
  background: white;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.prototype-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

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

.app-bar {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.app-title {
  min-width: 0;
  text-align: center;
  color: white;
  text-shadow: 0 1px 12px rgba(23, 52, 95, 0.3);
}

.app-title p,
.app-title h1,
.class-command h2,
.class-command p,
.section-heading h2,
.section-heading p,
.focus-card h3,
.focus-card p,
.tray-heading h2,
.tray-heading p {
  margin: 0;
}

.app-title p,
.eyebrow,
.section-heading p {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.app-title h1 {
  margin-top: 2px;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--glass-line);
  border-radius: 50%;
  color: white;
  background: rgba(23, 52, 95, 0.22);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(18px);
}

.class-command {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  color: white;
  background:
    linear-gradient(145deg, rgba(23, 52, 95, 0.72), rgba(23, 52, 95, 0.38)),
    linear-gradient(135deg, rgba(107, 231, 233, 0.34), rgba(177, 120, 238, 0.42));
  box-shadow: var(--shadow);
}

.class-command h2 {
  max-width: 15ch;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1.05;
}

.class-command p:not(.eyebrow) {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.42;
}

.privacy-pill,
.status-badge {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 900;
}

.privacy-pill span {
  color: #18857d;
  font-size: 11px;
}

.step-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
  padding: 6px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: rgba(23, 52, 95, 0.24);
  backdrop-filter: blur(18px);
}

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

.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.82);
}

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

.command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.command-strip article {
  min-width: 0;
  min-height: 74px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  box-shadow: 0 12px 28px rgba(23, 52, 95, 0.12);
}

.command-strip strong,
.command-strip span,
strong,
small {
  display: block;
}

.command-strip strong {
  font-size: 22px;
  line-height: 1;
}

.command-strip span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.screen-stack {
  position: relative;
}

.panel {
  display: none;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

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

.section-heading,
.tray-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading p,
.eyebrow {
  color: #49617f;
}

.section-heading h2,
.tray-heading h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.15;
}

.file-card,
.privacy-note,
.focus-card,
.tray-cards article {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card-strong);
}

.file-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 12px;
}

.file-icon {
  flex: 0 0 auto;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 13px;
  color: var(--navy);
  background: linear-gradient(135deg, var(--aqua), #c5fbff);
  font-size: 13px;
  font-weight: 950;
}

small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.preview-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(58px, 0.6fr) minmax(0, 1.05fr);
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(23, 52, 95, 0.1);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

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

.preview-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.preview-head {
  color: var(--navy);
  background: #eef7ff;
  font-size: 12px;
  font-weight: 900;
}

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

.map-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.5fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(23, 52, 95, 0.26);
  border-radius: 999px;
  color: var(--navy);
  background: #f7fbff;
  font-size: 13px;
  font-weight: 850;
}

.privacy-note {
  margin-top: 12px;
  padding: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

.privacy-note strong {
  margin-bottom: 4px;
}

.focus-card {
  padding: 15px;
  margin-bottom: 10px;
  background:
    linear-gradient(135deg, rgba(107, 231, 233, 0.22), rgba(130, 200, 248, 0.18)),
    white;
}

.focus-card h3 {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.16;
}

.focus-card p:not(.eyebrow) {
  margin-top: 9px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.42;
}

.plan-grid {
  display: grid;
  gap: 9px;
}

.plan-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.plan-grid span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.36;
}

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

.avatar {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(23, 52, 95, 0.2);
  border-radius: 50%;
  color: var(--navy);
  background: white;
  font-size: 13px;
  font-weight: 950;
}

.avatar.is-present {
  background: var(--aqua);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.quick-actions button {
  min-height: 46px;
  border: 1px solid rgba(23, 52, 95, 0.16);
  border-radius: 999px;
  color: var(--navy);
  background: white;
  font-size: 14px;
  font-weight: 850;
}

.note-field {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 850;
}

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

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

.next-tray {
  margin-top: 14px;
  padding: 10px 14px 14px;
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(23, 52, 95, 0.16);
  backdrop-filter: blur(22px);
}

.tray-handle {
  width: 44px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: rgba(23, 52, 95, 0.25);
}

.tray-heading {
  margin-bottom: 10px;
}

.tray-heading span {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--navy);
  background: white;
  font-size: 12px;
  font-weight: 900;
}

.tray-cards {
  display: grid;
  gap: 8px;
}

.tray-cards article {
  padding: 12px;
}

@media (min-width: 760px) {
  .prototype-shell {
    padding: 30px;
  }

  .phone {
    min-height: 860px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 34px;
    box-shadow: 0 30px 90px rgba(23, 52, 95, 0.38);
  }
}

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

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