:root {
  --lime: #C6F135;
  --lime-2: #AED624;
  --ink: #142004;
  --bg: #0E1014;
  --top: #0A0B0E;
  --card: #171A20;
  --card-2: #1E2229;
  --text: #EEF0F3;
  --dim: #9AA0AA;
  --mute: #6B7079;
  --line: #262A33;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: #07080A; color: var(--text);
  font: 15.5px/1.45 "Manrope", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
.app {
  max-width: 460px; margin: 0 auto; height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg);
}

/* верхняя строка */
.bar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--top); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.logo { width: 38px; height: 38px; border-radius: 12px; background: var(--lime); color: var(--ink); display: grid; place-items: center; }
.logo svg { width: 21px; height: 21px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.status { font-size: 11.5px; color: var(--dim); font-weight: 600; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.bar-link { font-size: 12px; color: var(--mute); font-weight: 700; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }

/* экран */
#qb { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.scr { padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.stepline { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--dim); margin-bottom: 14px; }
.dots { display: flex; gap: 5px; }
.dots i { width: 20px; height: 4px; border-radius: 2px; background: #2A2E37; }
.dots i.on { background: var(--lime); }

.hero { font-size: 27px; line-height: 1.15; font-weight: 800; letter-spacing: -.6px; margin: 4px 0 14px; }
.hero em { font-style: normal; color: var(--lime); }

/* реплика бота */
.say { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 14px; }
.ava { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; background: var(--lime); color: var(--ink); display: grid; place-items: center; }
.ava svg { width: 17px; height: 17px; }
.bubble {
  background: var(--card-2); border-radius: 4px 16px 16px 16px; padding: 10px 13px; font-size: 14.5px;
  min-height: 40px; max-width: calc(100% - 40px);
}
.bubble b { color: var(--lime); }
.bubble.flash { animation: flash .5s ease; }
@keyframes flash { from { box-shadow: 0 0 0 2px rgba(198,241,53,.45); } to { box-shadow: 0 0 0 0 rgba(198,241,53,0); } }
.bubble.typing { display: inline-flex; gap: 4px; align-items: center; padding: 15px 14px; }
.bubble.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); animation: dot 1s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .15s; }
.bubble.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* калькулятор */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.field + .field { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.field-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.field-top span { font-size: 13px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .5px; }
.field-top output { font-size: 26px; font-weight: 800; color: var(--lime); letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; margin: 8px 0;
  background: linear-gradient(90deg, var(--lime) var(--fill, 50%), #2A2E37 var(--fill, 50%)); outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--lime);
  border: 6px solid var(--card); box-shadow: 0 0 0 1.5px var(--lime);
}
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 6px solid var(--card); box-shadow: 0 0 0 1.5px var(--lime); }
.ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--mute); font-weight: 600; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.quick button { background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 8px 2px; font-size: 12.5px; font-weight: 700; color: var(--dim); white-space: nowrap; }
.quick button.on { border-color: var(--lime); color: var(--lime); background: rgba(198,241,53,.07); }

.cta {
  display: block; width: 100%; margin-top: 14px; padding: 16px; border: 0; border-radius: 16px;
  background: var(--lime); color: var(--ink); font-size: 16.5px; font-weight: 800; letter-spacing: -.2px;
}
.cta:active { transform: scale(.99); background: var(--lime-2); }
.note { text-align: center; font-size: 12px; color: var(--mute); margin: 10px 0 0; font-weight: 600; }

/* вопрос */
.q { font-size: 21px; line-height: 1.22; font-weight: 800; letter-spacing: -.4px; margin: 6px 0 14px; }
.opts { display: flex; flex-direction: column; gap: 9px; }
.opt {
  text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px;
  padding: 15px 16px; font-size: 16px; font-weight: 700; transition: border-color .15s, opacity .2s;
}
.opt:active, .opt.on { border-color: var(--lime); color: var(--lime); }
.opt.off { opacity: .35; pointer-events: none; }

.scan { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 15px; }
.scan-t { font-weight: 800; margin-bottom: 6px; }
.scan-l { display: flex; gap: 9px; font-size: 14px; color: var(--mute); margin-top: 8px; opacity: .45; transition: .3s; }
.scan-l b { color: var(--lime); }
.scan-l.on { opacity: 1; color: var(--text); }
.scan-bar { height: 6px; border-radius: 99px; background: #2A2E37; margin-top: 12px; overflow: hidden; }
.scan-bar i { display: block; height: 100%; width: 0; background: var(--lime); border-radius: 99px; transition: width .7s ease; }

/* места */
.gauge { position: relative; width: 140px; height: 140px; margin: 0 auto 6px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.g-bg, .g-fg { fill: none; stroke-width: 10; }
.g-bg { stroke: #23272F; }
.g-fg { stroke: var(--lime); stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1); }
.g-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.g-num b { font-size: 30px; font-weight: 800; color: var(--lime); letter-spacing: -.5px; }
.g-num span { font-size: 10.5px; color: var(--dim); font-weight: 700; margin-top: -2px; }

.timer {
  display: flex; justify-content: center; gap: 6px; width: fit-content; margin: 4px auto 14px;
  font-size: 12px; font-weight: 700; color: var(--dim); background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 5px 10px; font-variant-numeric: tabular-nums;
}
.timer b { color: var(--lime); }

.offer { position: relative; background: var(--card); border: 1.5px solid var(--lime); border-radius: 22px; padding: 22px 16px 16px; margin-top: 16px; }
.offer-badge {
  position: absolute; top: -11px; left: 16px; background: var(--lime); color: var(--ink);
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 8px; text-transform: uppercase; letter-spacing: .4px;
}
.offer-hook { font-size: 21px; font-weight: 800; letter-spacing: -.4px; line-height: 1.2; }
.offer-sub { font-size: 14px; color: var(--dim); margin-top: 4px; }
.offer-hint { font-size: 12.5px; color: var(--mute); margin-top: 10px; text-align: center; }

.final { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px 18px; text-align: center; margin-top: 10px; }
.final-ic { width: 56px; height: 56px; border-radius: 18px; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-size: 28px; font-weight: 800; margin: 0 auto 12px; }
.final h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.final p { margin: 0 0 12px; color: var(--dim); font-size: 14px; }
.final-warn { background: rgba(255,138,101,.08); border: 1px solid rgba(255,138,101,.25); color: #FFB199; font-size: 13px; border-radius: 12px; padding: 10px 12px; text-align: left; }

.track { margin-top: 18px; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 11px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.row-n { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #23272F; color: var(--dim); }
.row-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.row-t b { font-size: 14px; font-weight: 700; }
.row-t small { font-size: 12px; color: var(--mute); font-weight: 600; }
.row.cur .row-n { background: var(--lime); color: var(--ink); }
.row.done .row-n { background: rgba(198,241,53,.15); color: var(--lime); }
.row.done .row-t b { color: var(--dim); }
.row.lock { opacity: .55; }
.row-again { flex: 0 0 auto; background: none; border: 0; color: var(--mute); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.tile {
  display: flex; align-items: center; gap: 9px; text-align: left; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 12px; font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.25;
}
.tile-ic { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: rgba(198,241,53,.12); color: var(--lime); font-size: 12px; font-weight: 800; }
.tile.seen { opacity: .5; }
.tile:active { border-color: var(--lime); }
.is-done .say, .is-done .timer { display: none; }
