:root {
  --bg: #ffffff;
  --screen-green: #f3fff7;
  --surface: #f7f7f7;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #4b5563;
  --primary: #7cd969;
  --primary-dark: #53b542;
  --line: #dadada;
  --shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
  --radius: 16px;
  --danger-bg: #ffe2e2;
  --danger: #fb2c36;
  --success-bg: #dcfce7;
  --success: #16a34a;
  --info-bg: #eff6ff;
}

@font-face {
  font-family: "Cooper Black";
  src: local("Cooper Black"), local("CooperBlackStd");
  font-style: normal;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top right, #d8f7df 0%, #eef7f2 42%, #d5d5d5 100%);
  color: var(--text);
  font-family: "Inter", "Segoe UI", sans-serif;
  overflow-y: auto;
}

h1,
h2,
h3,
h4 {
  font-family: "Cooper Black", "Times New Roman", serif;
  margin: 0;
  line-height: 1.22;
}

strong,
.emphasis,
.preview-row p,
.instruction-item h4,
.score-box p {
  font-family: "Cooper Black", "Times New Roman", serif;
}

p {
  margin: 0;
  line-height: 1.35;
}

ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
  color: #1f2937;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.phone-frame {
  width: min(100%, 430px);
  height: calc(100vh - 36px);
  background: #ffffff;
  border: 1px solid #b8c9bc;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.18);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  position: relative;
}

.view {
  display: none;
  min-height: 100%;
  overflow: visible;
  background: #ffffff;
}

#overview,
#preparation {
  background: var(--screen-green);
}

.view.active {
  display: block;
}

.view.animate-screen .onboarding-content > *,
.view.animate-screen .stack > * {
  animation: contentIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--stagger-index, 0) * 55ms);
}

.view.animate-screen .tutorial-header {
  animation: headerIn 320ms ease both;
}

.view.animate-screen .hero-image,
.view.animate-screen .wide-image {
  animation: mediaIn 420ms ease both;
}

.view.view-enter {
  animation: viewIn 240ms ease both;
}

.view.view-exit {
  animation: viewOut 180ms ease both;
  pointer-events: none;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes viewOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.997);
  }
}

@keyframes contentIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headerIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mediaIn {
  from {
    opacity: 0;
    transform: scale(0.988);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.stack {
  display: grid;
  gap: 16px;
  padding: 16px 16px 22px;
}

.hero-image,
.wide-image {
  width: 100%;
  display: block;
  object-fit: cover;
}

.hero-image {
  height: 46vh;
  min-height: 260px;
}

.rounded {
  border-radius: var(--radius);
}

.onboarding-content {
  padding: 18px 22px 26px;
  min-height: 54%;
  display: grid;
  align-content: start;
  gap: 16px;
}

.onboarding-content h1 {
  font-size: 2.15rem;
}

.onboarding-content p {
  color: #111827;
  font-size: 1.1rem;
}

.dot-group {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 8vh;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #cfcfcf;
}

.dot.active {
  background: #111;
}

.btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--primary);
  color: #fff;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background-color 180ms ease, transform 120ms ease;
}

.btn:hover {
  background: var(--primary-dark);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  background: #b8c0bb;
  cursor: not-allowed;
}

.btn-muted {
  background: #d3d3d3;
  color: #111;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  text-transform: uppercase;
}

.btn-muted:hover {
  background: #c3c3c3;
}

.forward-arrow::after {
  content: " \2192";
  margin-left: 4px;
  font-weight: 700;
  display: inline-block;
  transition: transform 180ms ease;
}

.forward-arrow:hover::after {
  transform: translateX(2px);
}

.screen-head.image-head {
  position: relative;
}

.overlay-copy {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.overlay-copy h2 {
  font-size: 2rem;
}

.overlay-copy p {
  margin-top: 4px;
  font-size: 1rem;
}

.icon-btn {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2937;
  font-size: 1.25rem;
  cursor: pointer;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  border: 1px solid #e7efe8;
}

.card h3 {
  font-size: 1.75rem;
  margin-bottom: 10px;
}

.card h4 {
  font-size: 1.35rem;
  margin-top: 8px;
  margin-bottom: 4px;
}

.card p {
  color: var(--muted);
  margin-top: 6px;
}

.progress-card {
  background: #dcf6de;
  border-radius: 10px;
  padding: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.progress-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: #d4d4d4;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #00c950;
  border-radius: inherit;
}

.tiny {
  margin-top: 6px;
  color: #6b7280;
  font-size: 0.95rem;
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.learn-item {
  background: #ececec;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  min-height: 82px;
}

.learn-item span {
  font-size: 1.4rem;
}

.learn-item p {
  color: #111827;
  margin-top: 4px;
  font-size: 0.95rem;
}

.lead {
  font-size: 1.08rem;
  color: #475569;
}

.warning-card {
  background: #fff6da;
  border: 2px solid #f7ca3c;
}

.success-card {
  background: #dcfce7;
  border: 2px solid #7adf86;
}

.center {
  text-align: center;
}

.emoji {
  font-size: 3rem;
}

.two-col-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.step-preview-list,
.instruction-item {
  display: grid;
  gap: 10px;
}

.preview-row,
.instruction-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.num {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #c7edd1;
  color: #0f172a;
  font-weight: 700;
}

.preview-row p,
.instruction-item h4 {
  color: #111;
  font-weight: 700;
}

.preview-row small {
  color: #475569;
}

.tutorial-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tutorial-header .icon-btn {
  position: static;
  width: 30px;
  height: 30px;
  background: transparent;
  font-size: 1.4rem;
}

.progress-wrap {
  flex: 1;
}

.progress-wrap p {
  color: #4b5563;
  font-size: 0.96rem;
  margin-bottom: 5px;
}

.tag {
  display: inline-block;
  background: #edf9f0;
  color: #2f7e49;
  padding: 8px 12px;
  border-radius: 0;
  font-size: 1.2rem;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.option-btn {
  width: 100%;
  text-align: left;
  border-radius: 12px;
  border: 2px solid #9a9a9a;
  padding: 15px 14px;
  background: #fff;
  color: #111;
  font-size: 1.15rem;
  cursor: pointer;
}

.option-btn.selected {
  border-color: #5aa56d;
}

.option-btn.correct {
  background: var(--success-bg);
  border-color: #6ee29b;
}

.option-btn.wrong {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.feedback-box {
  border-radius: 12px;
  border: 2px solid #bedbff;
  background: var(--info-bg);
  padding: 12px;
  color: #0f172a;
  font-size: 1.1rem;
}

.feedback-box.correct {
  border-color: #6ee29b;
  background: var(--success-bg);
}

.feedback-box.wrong {
  border-color: #f9a4ab;
  background: #fff1f2;
}

.hidden {
  display: none;
}

.center-view .stack {
  min-height: 100%;
  place-content: start;
  padding-top: 24px;
}

.results-card h2,
.completion-card h2 {
  font-size: 2.2rem;
}

.score-box {
  background: #dcf6de;
  border-radius: 12px;
  padding: 14px;
}

.score-box p {
  font-size: 3rem;
  color: #111;
}

.score-box small {
  font-size: 1.2rem;
  color: #1f2937;
}

.results-summary {
  background: #e6e6e6;
  border-radius: 10px;
  text-align: left;
  padding: 12px;
}

.results-summary p {
  font-size: 1.1rem;
  color: #111;
  margin-bottom: 8px;
}

.certificate-card {
  background: #c2e2cb;
  border: 2px solid #00aa42;
  border-radius: 12px;
  padding: 12px;
}

.certificate-card small {
  display: inline-block;
  color: #00a840;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.certificate-card h3 {
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 2rem;
}

@media (max-width: 390px) {
  .app-shell {
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    border: none;
  }

  .onboarding-content h1,
  .results-card h2,
  .completion-card h2 {
    font-size: 1.9rem;
  }

  .card h3 {
    font-size: 1.45rem;
  }

  .btn-muted {
    font-size: 1.25rem;
  }
}
