:root {
  --ink: #14213d;
  --nav: #22314d;
  --cream: #ede7d8;
  --accent: #3967c2;
  --accent-soft: #e8efff;
  --bright: #6fa0ff;
  --bg: #f7f6f2;
  --card: #ffffff;
  --muted: #636c80;
  --line: #e3e4e8;
  --line-strong: #d2d5dc;
  --ok: #188166;
  --ok-soft: #e5f5ef;
  --warn: #a26318;
  --warn-soft: #fff4e5;
  --danger: #bd3e4d;
  --danger-soft: #feecee;
  --star: #e3a008;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--nav);
  color: var(--cream);
  padding-top: env(safe-area-inset-top);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 18px 10px;
}
.top-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.top-text {
  flex: 1;
  min-width: 0;
}
.top-text strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.14em;
}
.top-text span {
  display: block;
  overflow: hidden;
  color: #aab3c5;
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.top-step {
  color: #aab3c5;
  font-size: 12.5px;
  font-weight: 600;
}
.steps {
  display: flex;
  gap: 5px;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 18px 14px;
}
.steps i {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: #ffffff2e;
  transition: background 0.3s;
}
.steps i.on {
  background: var(--bright);
}

/* layout */
.wrap {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 28px;
}
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
h1 {
  margin: 6px 0 4px;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
}
.sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13.5px;
}
.intro {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-left: 3px solid var(--bright);
  border-radius: 0 12px 12px 0;
  background: var(--accent-soft);
}
.intro p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
}
.intro .intro-title {
  margin-bottom: 4px;
  font-size: 15.5px;
  font-weight: 700;
}
.hello {
  margin: 0 0 14px;
  font-size: 15px;
}

/* video */
.video {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 14px 34px #14213d26;
}
.video video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}
.watch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
}
.watch .bar {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: #e6e4dd;
  overflow: hidden;
}
.watch .bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.4s;
}
.watch.done .bar i {
  background: var(--ok);
}
.watch.done span {
  color: var(--ok);
  font-weight: 600;
}

/* cards */
.card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.card h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.card p.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.guide .btn {
  flex: 1 1 100%;
}
@media (min-width: 520px) {
  .guide .btn {
    flex: 0 0 auto;
  }
}
.guide .ic {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 56px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.guide .tx {
  flex: 1;
  min-width: 0;
}
.guide .tx strong {
  display: block;
  font-size: 15px;
}
.guide .tx span {
  color: var(--muted);
  font-size: 12.5px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn.block {
  width: 100%;
  margin-top: 14px;
}
.btn.light {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn svg {
  width: 17px;
  height: 17px;
}
.done-chip[hidden] {
  display: none;
}
.done-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--ok);
  font-size: 12.5px;
  font-weight: 600;
}

/* question */
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 14.5px;
  line-height: 1.35;
  text-align: left;
}
.opt .r {
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}
.opt:not(:disabled):hover {
  border-color: var(--accent);
}
.opt.good {
  border-color: #7cc8ad;
  background: var(--ok-soft);
}
.opt.good .r {
  border-color: var(--ok);
  background: radial-gradient(circle, var(--ok) 45%, transparent 50%);
}
.opt.bad {
  border-color: #f0b4bc;
  background: var(--danger-soft);
}
.opt.bad .r {
  border-color: var(--danger);
}
.opt:disabled {
  cursor: default;
}
.verdict {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
}
.verdict.good {
  background: var(--ok-soft);
  color: #14523f;
}
.verdict.bad {
  background: var(--warn-soft);
  color: #6b4210;
}
.verdict strong {
  display: block;
}

/* rating */
.stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 4px;
}
.stars button {
  padding: 2px;
  border: 0;
  background: none;
  color: #d6d9e0;
}
.stars button.on {
  color: var(--star);
}
.stars svg {
  width: 36px;
  height: 36px;
}
textarea {
  width: 100%;
  min-height: 96px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  font-size: 14.5px;
  resize: vertical;
}
.count {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: right;
}

/* end + states */
.finish {
  margin-top: 16px;
  padding: 22px 18px;
  border-radius: 16px;
  background: var(--nav);
  color: var(--cream);
  text-align: center;
}
.finish .big {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #ffffff1a;
  color: var(--bright);
}
.finish h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
.finish p {
  margin: 0;
  color: #c9cfdb;
  font-size: 14px;
}
.state {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 70px 10px;
  color: var(--muted);
  text-align: center;
}
.state h1 {
  color: var(--ink);
  font-size: 21px;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 calc(18px + env(safe-area-inset-bottom));
  color: #8a90a0;
  font-size: 11.5px;
}
@media (min-width: 700px) {
  .wrap {
    padding-top: 28px;
  }
  h1 {
    font-size: 30px;
  }
}
