:root {
  --bg: #ffffff;
  --surface: #f3f4f7;
  --ink: #111216;
  --ink-2: #686b74;
  --ink-3: #a5a8b0;
  --line: #e6e8ec;
  --scale: #2b55f0;
  --scale-2: #1a38b5;
  --string: #9fb1f5;
  --needle: #111216;
  --shadow: rgba(20, 30, 70, 0.1);
  --good: #1fa463;
  --ok: #f2b32a;
  --meh: #f08533;
  --bad: #e5484d;
  --btn: #111216;
  --btn-ink: #ffffff;
  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #111214;
    --surface: #1c1d21;
    --ink: #f4f5f7;
    --ink-2: #a0a3ab;
    --ink-3: #62656d;
    --line: #2a2c31;
    --scale: #5b7cff;
    --scale-2: #3d5ce6;
    --string: #3b4a86;
    --needle: #f4f5f7;
    --shadow: rgba(0, 0, 0, 0.45);
    --good: #2dbd76;
    --ok: #f5bd3d;
    --meh: #f39447;
    --bad: #ef5a5f;
    --btn: #f4f5f7;
    --btn-ink: #111214;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
}

#app {
  max-width: 460px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 16px calc(14px + env(safe-area-inset-bottom));
}

/* ---------- header ---------- */

.top {
  height: 58px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  display: inline-block;
  font-weight: 800;
  font-size: 27px;
  letter-spacing: -0.04em;
  transform: rotate(-7deg);
  transform-origin: 30% 60%;
}

.logo b {
  color: var(--scale);
  font-weight: 800;
}

.num {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.actions {
  display: flex;
  gap: 2px;
  margin-right: -8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
  background: var(--surface);
  color: var(--ink);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

#btnSound .i-off,
#btnSound.muted .i-on {
  display: none;
}

#btnSound.muted .i-off {
  display: block;
}

/* ---------- screens ---------- */

.screen {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.screen.on {
  display: flex;
  animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- buttons ---------- */

.btn {
  height: 56px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.2s, background 0.2s;
  touch-action: manipulation;
}

.btn.primary {
  background: var(--btn);
  color: var(--btn-ink);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.25;
  cursor: default;
  transform: none;
}

.btn.ghost {
  background: transparent;
  color: var(--ink-2);
  height: 46px;
  font-weight: 500;
  font-size: 16px;
  box-shadow: none;
}

.btn.ghost:hover {
  color: var(--ink);
}

.btn:focus-visible,
.nudge:focus-visible,
.icon-btn:focus-visible {
  outline: 3px solid var(--scale);
  outline-offset: 2px;
}

/* ---------- intro ---------- */

.hero {
  flex: 1;
  min-height: 170px;
  display: flex;
  padding-top: 8px;
}

.hero svg {
  width: 100%;
  height: 100%;
  display: block;
}

.intro-text {
  text-align: center;
  flex: none;
}

.intro-title {
  font-weight: 800;
  font-size: clamp(30px, 8.6vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 6px 0 10px;
}

.intro-sub {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.45;
  margin: 0 auto 22px;
  max-width: 27ch;
}

.intro-actions {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta {
  text-align: center;
  font-size: 14px;
  color: var(--ink-3);
  margin: 6px 0 0;
  flex: none;
}

/* ---------- play ---------- */

.progress {
  flex: none;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.round-label {
  flex: none;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 26px;
}

.round-label span {
  color: var(--ink-3);
  font-weight: 500;
}

.mega {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  transform: rotate(-4deg);
}

.mega[hidden] {
  display: none;
}

.dots {
  display: flex;
  gap: 6px;
}

.progress .dots {
  flex: 1;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.35s, transform 0.35s;
}

.progress .dot {
  flex: 1;
  height: 6px;
  border-radius: 3px;
}

.progress .dot.cur {
  background: var(--ink);
}

.dot.perfect,
.dot.good {
  background: var(--good);
}
.dot.ok {
  background: var(--ok);
}
.dot.meh {
  background: var(--meh);
}
.dot.bad {
  background: var(--bad);
}
.dot.just {
  animation: dotPop 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
}

@keyframes dotPop {
  from {
    transform: scaleY(0.2);
  }
}

/* prompt and scale travel together, centered in the space left over */
.play-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 8px;
}

.prompt {
  flex: none;
  font-weight: 500;
  font-size: clamp(21px, 6vw, 25px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  margin: 0;
  min-height: 2.5em;
  color: var(--ink-2);
}

.prompt b {
  font-weight: 800;
  color: var(--ink);
}

.prompt.enter {
  animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.stage {
  flex: 1 1 0;
  min-height: 200px;
  max-height: calc((min(100vw, 460px) - 32px) * 0.921);
  margin-top: 14px;
  position: relative;
  display: flex;
}

.stage svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.panel {
  flex: none;
  height: 150px;
  position: relative;
  margin-top: 4px;
}

.panel > div {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  transition: opacity 0.3s 0.14s, transform 0.3s 0.14s;
}

.panel > div:not(.on) {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition-duration: 0.14s;
  transition-delay: 0s;
}

.slider-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.nudge {
  flex: none;
  width: 44px;
  height: 44px;
  margin-top: -4px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.1s, background 0.2s;
}

.nudge:hover {
  background: var(--line);
}

.nudge:active {
  transform: scale(0.9);
}

.nudge svg {
  width: 20px;
  height: 20px;
}

.nudge:disabled {
  opacity: 0.35;
}

.slider-wrap {
  flex: 1;
  min-width: 0;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 36px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --f: 0;
}

.range:focus {
  outline: none;
}

.range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    var(--scale) calc(15px + (100% - 30px) * var(--f)),
    var(--line) calc(15px + (100% - 30px) * var(--f))
  );
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--bg);
  border: 5px solid var(--scale);
  box-shadow: 0 3px 10px var(--shadow);
  transition: transform 0.12s;
}

.range:active::-webkit-slider-thumb {
  transform: scale(1.15);
}

.range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--scale) 25%, transparent);
}

.range::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}

.range::-moz-range-progress {
  height: 8px;
  border-radius: 4px;
  background: var(--scale);
}

.range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 5px solid var(--scale);
  box-shadow: 0 3px 10px var(--shadow);
}

.ticks {
  position: relative;
  height: 14px;
  margin: 1px 15px 0;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

/* reveal */

.rv-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rv-score {
  flex: none;
  min-width: 84px;
  font-weight: 800;
  font-size: 50px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.perfect,
.good {
  color: var(--good);
}
.ok {
  color: var(--ok);
}
.meh {
  color: var(--meh);
}
.bad {
  color: var(--bad);
}

.rv-text {
  min-width: 0;
}

.rv-verdict {
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}

.rv-fact {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 1.38;
  color: var(--ink-2);
}

.rv-fact b {
  color: var(--ink);
  font-weight: 700;
}

.rv-weights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.chip img {
  width: 18px;
  height: 18px;
}

/* ---------- scale svg ---------- */

.s-body {
  fill: var(--scale);
}
.s-body-2 {
  fill: var(--scale-2);
}
.s-cap {
  fill: var(--bg);
}
.s-shadow {
  fill: var(--shadow);
}
.s-string {
  stroke: var(--string);
  stroke-width: 1.6;
}
.s-pan {
  fill: var(--scale);
}
.s-pan-in {
  fill: var(--scale-2);
}
.s-dial {
  fill: none;
  stroke: var(--line);
  stroke-width: 2.5;
}
.s-tick {
  stroke: var(--ink-3);
  stroke-width: 2;
  stroke-linecap: round;
}
.s-tick-c {
  stroke: var(--ink-2);
  stroke-width: 2.5;
}
.s-needle {
  stroke: var(--needle);
  stroke-width: 3;
  stroke-linecap: round;
}
.s-needle-tip {
  fill: var(--needle);
}
.s-lock-body {
  fill: var(--ink);
}
.s-lock-shackle {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.s-verdict-bg {
  fill: var(--ink);
}
.s-verdict {
  font: 700 12px var(--font);
  fill: var(--bg);
  text-anchor: middle;
  dominant-baseline: central;
}

.ro-num {
  font: 700 34px var(--font);
  fill: var(--ink);
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.ro-a {
  fill: var(--ink-3);
}
.ro-name {
  font: 500 14px var(--font);
  fill: var(--ink-2);
  text-anchor: middle;
}
.ro-eq {
  font: 500 26px var(--font);
  fill: var(--ink-3);
  text-anchor: middle;
}

.confetti {
  position: absolute;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 5;
}

/* ---------- results ---------- */

#screenResult {
  overflow-y: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

#screenResult > * {
  flex: none;
}

.res-head {
  text-align: center;
  padding: 18px 0 20px;
}

.kicker {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
}

.res-total {
  font-weight: 800;
  font-size: 84px;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.res-total small {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-3);
  margin-left: 4px;
}

.res-rank {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--scale);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  transform: rotate(-3deg);
}

.res-dots {
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.res-dots .dot {
  width: 16px;
  height: 16px;
}

.card {
  background: var(--surface);
  border-radius: 20px;
}

.rounds {
  list-style: none;
  margin: 14px 0 0;
  padding: 2px 16px;
}

.rr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rr:last-child {
  border-bottom: 0;
}

.rr-icons {
  flex: none;
  display: flex;
  align-items: center;
  gap: 3px;
}

.rr-icons img {
  width: 28px;
  height: 28px;
}

.rr-icons span {
  color: var(--ink-3);
  font-size: 13px;
  width: 10px;
  text-align: center;
}

.rr-text {
  flex: 1;
  min-width: 0;
}

.rr-main {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.rr-sub {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 2px;
}

.rr-score {
  flex: none;
  min-width: 36px;
  text-align: right;
  font-weight: 800;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 12px;
  padding: 14px 4px;
}

.stat {
  text-align: center;
}

.stat b {
  display: block;
  font-weight: 800;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 12px;
  color: var(--ink-2);
}

.next {
  text-align: center;
  margin: 18px 0 6px;
  font-size: 14px;
  color: var(--ink-2);
}

.next b {
  display: block;
  margin-top: 3px;
  font-weight: 800;
  font-size: 28px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.res-more {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn.soft {
  flex: 1;
  height: 58px;
  line-height: 1.1;
  border-radius: 18px;
  font-size: 15.5px;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn.soft:hover {
  background: var(--line);
}

.btn.soft small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}

.btn.soft[hidden] {
  display: none;
}

.btn.wide-soft {
  width: 100%;
  flex: none;
  margin-top: 12px;
}

a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

a.btn[hidden],
.dots[hidden],
.bonus-avg[hidden],
.prog-link[hidden] {
  display: none;
}

.bonus-avg {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.prog-link {
  flex: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--scale);
  text-decoration: none;
}

/* ---------- header extras ---------- */

.tag {
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  vertical-align: 2px;
}

.icon-btn.active {
  background: var(--surface);
  color: var(--scale);
}

.icon-btn:disabled {
  opacity: 0.25;
  cursor: default;
  background: transparent;
}

/* ---------- archive ---------- */

#screenArchive {
  overflow-y: auto;
  scrollbar-width: none;
}

#screenArchive > * {
  flex: none;
}

.arc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 16px;
}

.arc-title {
  margin: 0;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.arc-sub {
  margin: 4px 0 0;
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.4;
}

.cal {
  padding: 10px 12px 14px;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 17px;
}

.cal-week,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-week {
  margin: 8px 0 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

.cell {
  aspect-ratio: 1;
  border: 0;
  border-radius: 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  position: relative;
}

.cell i {
  font-style: normal;
  line-height: 1;
}

.cell b {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.9;
}

button.cell {
  cursor: pointer;
  transition: transform 0.12s;
}

button.cell:active {
  transform: scale(0.92);
}

.cell.pad {
  background: transparent;
  color: transparent;
}

.cell.future {
  background: transparent;
  color: var(--ink-3);
  opacity: 0.5;
}

.cell.done {
  color: #fff;
}

.cell.done.perfect,
.cell.done.good {
  background: var(--good);
}
.cell.done.ok {
  background: var(--ok);
}
.cell.done.meh {
  background: var(--meh);
}
.cell.done.bad {
  background: var(--bad);
}

.cell.part b {
  color: var(--scale);
}

.cell.today {
  box-shadow: inset 0 0 0 2.5px var(--scale);
}

.cell.done.today {
  box-shadow: inset 0 0 0 2.5px var(--scale), inset 0 0 0 5px var(--bg);
}

.cell.here::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--ink);
}

.arc-note {
  margin: 14px 4px 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}

/* ---------- help sheet ---------- */

dialog.sheet {
  border: 0;
  padding: 0;
  background: transparent;
  width: calc(100% - 32px);
  max-width: 400px;
  color: var(--ink);
}

dialog.sheet::backdrop {
  background: rgba(10, 12, 20, 0.45);
}

dialog.sheet[open] {
  animation: rise 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.sheet-card {
  background: var(--bg);
  border-radius: 26px;
  padding: 24px 20px 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.sheet-card h2 {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 16px;
}

.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.steps img,
.steps .ico {
  width: 36px;
  height: 36px;
  flex: none;
}

.steps p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.42;
  color: var(--ink-2);
}

.steps b {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Tilt+ ---------- */

.logo b.heart {
  color: #ff5a79;
  font-size: 0.8em;
  margin-left: 2px;
}

.cell.locked {
  opacity: 0.55;
}

.cell.locked b {
  color: var(--scale);
}

.res-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 2px 0 8px;
}

.link-btn {
  border: 0;
  background: none;
  padding: 6px 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--ink);
}

.link-btn[hidden] {
  display: none;
}

.plus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -6px -8px 6px 0;
}

.plus-head h2 {
  margin: 0;
  display: inline-block;
  transform: rotate(-5deg);
  font-size: 32px;
}

.plus-head h2 b {
  color: var(--scale);
}

.plus-reason {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
}

.plus-active {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--good);
}

.perks {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.perks li {
  position: relative;
  padding-left: 26px;
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--ink-2);
}

.perks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 5px;
  width: 12px;
  height: 7px;
  border-left: 3px solid var(--scale);
  border-bottom: 3px solid var(--scale);
  transform: rotate(-45deg);
}

.perks b {
  color: var(--ink);
  font-weight: 700;
}

.plus-small {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
  text-align: center;
}

.plus-small a {
  color: var(--scale);
  font-weight: 600;
}

.plus-key {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.plus-key[hidden] {
  display: none;
}

.plus-key label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.key-row {
  display: flex;
  gap: 8px;
}

.key-row input {
  flex: 1;
  min-width: 0;
  height: 50px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  font: 500 14px var(--font);
  letter-spacing: 0.02em;
}

.key-row input:focus {
  outline: 2px solid var(--scale);
}

.key-row .btn {
  flex: none;
  width: auto;
  height: 50px;
  padding: 0 18px;
  border-radius: 14px;
}

.plus-msg {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

#plusForget[hidden],
#plusBuy[hidden] {
  display: none;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 20;
}

.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .screen.on,
  .prompt.enter,
  dialog.sheet[open] {
    animation: none;
  }
}
