/* ===========================================================================
   Plus Teacher App - design system (section 5)

   Night is the default. Day redefines the same tokens, so no component knows
   which theme it is in. Everything is sized for one thumb on a phone.
   =========================================================================== */

:root {
  --bg: #05090a;
  --card: rgba(13, 21, 23, 0.72);
  --card-solid: #0e1618;
  --card2: #182226;
  --tx: #f1f8f8;
  --mu: #8e9a9c;
  --teal: #00c2cb;
  --tt: #00c2cb;
  --green: #2dff8a;
  --gt: #2dff8a;
  --pink: #ff4d94;
  --pt: #ff4d94;
  --ink: #04191b;
  --line: rgba(160, 235, 240, 0.1);
  --glow-1: rgba(0, 194, 203, 0.32);
  --glow-2: rgba(0, 194, 203, 0.16);
  --shadow: none;

  /* The backdrop: deep teal into charcoal, cyan circuit traces, soft nodes. */
  --bd-base: linear-gradient(168deg, #08262a 0%, #0a1719 34%, #070b0c 68%, #030505 100%);
  --bd-trace: rgba(64, 232, 242, 0.42);
  --bd-trace-glow: drop-shadow(0 0 2.5px rgba(0, 229, 240, 0.85)) drop-shadow(0 0 9px rgba(0, 194, 203, 0.45));
  --bd-node: rgba(0, 220, 230, 0.55);
  --bd-node-soft: rgba(0, 194, 203, 0.16);

  --r-card: 22px;
  --r-btn: 23px;
  --r-sheet: 28px;
  --r-nav: 32px;

  /* Point 6: one spacing scale. Nothing in this file may invent a value
     outside it - 4, 8, 12, 16, 24, 32 - so gaps match from screen to screen. */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;

  /* Point 6: every control has one height. */
  --gutter: 20px;
  --fld-h: 50px;
  --btn-h: 54px;
  --btn-h-card: 46px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* Day is not night with the lights on: white cards that lift off a cool,
   faintly teal page, darker text for daylight, and the circuit drawn in ink
   rather than light. Every colour pairing here clears WCAG AA. */
:root[data-mode='day'] {
  --bg: #eef4f5;
  --card: rgba(255, 255, 255, 0.86);
  --card-solid: #ffffff;
  --card2: #e3edee;
  --tx: #0c1a1c;
  --mu: #566b6f;
  --tt: #00747a;
  --green: #1fd16f;
  --gt: #0a7f43;
  --pink: #ff4d94;
  --pt: #c4165f;
  --line: rgba(12, 52, 58, 0.11);
  --glow-1: rgba(0, 194, 203, 0.16);
  --glow-2: rgba(0, 194, 203, 0.08);
  --shadow: 0 1px 2px rgba(12, 52, 58, 0.06), 0 6px 18px rgba(12, 52, 58, 0.07);

  --bd-base: linear-gradient(168deg, #e2f2f3 0%, #eef5f6 40%, #f6f9f9 72%, #edf3f4 100%);
  --bd-trace: rgba(0, 122, 128, 0.16);
  --bd-trace-glow: none;
  --bd-node: rgba(0, 150, 158, 0.3);
  --bd-node-soft: rgba(0, 194, 203, 0.09);
}

* {
  box-sizing: border-box;
  margin: 0;
}

html,
body {
  height: 100%;
}

/* Point 4: double-tap zoom off, and iOS may not grow text on rotate. */
html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Point 6: nothing scrolls sideways, on any screen width. */
html,
body {
  overflow-x: hidden;
}

body {
  background: #0b0e0f;
  color: var(--tx);
  font: 500 14px/1.45 Manrope, system-ui, sans-serif;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

:root[data-mode='day'] body {
  background: #dfe8ea;
}

/* Tamil and Sinhala are wider than Latin and do not suit uppercase or letter
   spacing (section 8.4). Anton has no glyphs for either, so headings switch
   to the script's own font instead of falling back to a mismatched system one. */
:root[data-lang='ta'] body,
:root[data-lang='ta'] h1,
:root[data-lang='ta'] .big,
:root[data-lang='ta'] .lbl,
:root[data-lang='ta'] .btn,
:root[data-lang='ta'] #nav button {
  font-family: 'Noto Sans Tamil', Manrope, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
/* Manrope first: it has no Sinhala, so the browser takes each Sinhala letter
   from Noto and keeps names, numbers and "Grade 10 Maths" in Manrope. */
:root[data-lang='si'] body,
:root[data-lang='si'] h1,
:root[data-lang='si'] .big,
:root[data-lang='si'] .lbl,
:root[data-lang='si'] .btn,
:root[data-lang='si'] #nav button,
:root[data-lang='si'] .sheet-h,
:root[data-lang='si'] .cal-h {
  font-family: Manrope, 'Noto Sans Sinhala', sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
:root[data-lang='ta'] .sheet-h,
:root[data-lang='ta'] .cal-h {
  font-family: 'Noto Sans Tamil', Manrope, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}

/* The language picker on the sign-in screens: three scripts, one row. */
.lang-pick {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--card2);
  border: 1px solid var(--line);
}
.lang-pick button {
  border: 0;
  background: none;
  color: var(--mu);
  border-radius: 999px;
  padding: 7px 11px;
  font: 700 13px/1 Manrope, 'Noto Sans Sinhala', 'Noto Sans Tamil', sans-serif;
  cursor: pointer;
}
.lang-pick button.on {
  background: var(--teal);
  color: var(--ink);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  z-index: 99;
  background: var(--teal);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 20px;
}

/* --------------------------------------------------------- phone frame --- */

.phone {
  position: relative;
  width: 100%;
  max-width: 410px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}

@media (min-width: 500px) and (min-height: 900px) {
  .phone {
    height: 860px;
    margin: auto;
    border-radius: 44px;
    border: 8px solid #181c1e;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  }
}

/*
 * The backdrop, in three layers behind every screen:
 *
 *   ::before  the teal-to-charcoal gradient, two soft glows, and the bokeh
 *             nodes - blurred dots, each a radial gradient, no images.
 *   ::after   the circuit traces. assets/circuit.svg is a mask, so its colour
 *             (and the glow) comes from the theme: cyan light at night, faint
 *             ink by day. One 2 KB file serves both.
 *
 * The glow breathes slowly; prefers-reduced-motion stops it (see above).
 */
.phone::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 71% 21%, var(--bd-node) 0 1.4px, transparent 2.8px),
    radial-gradient(circle at 17% 47%, var(--bd-node) 0 1.2px, transparent 2.6px),
    radial-gradient(circle at 86% 71%, var(--bd-node) 0 1.4px, transparent 2.8px),
    radial-gradient(circle at 31% 64%, var(--bd-node) 0 1px, transparent 2.4px),
    radial-gradient(circle at 57% 11%, var(--bd-node) 0 1.2px, transparent 2.6px),
    radial-gradient(circle at 45% 88%, var(--bd-node) 0 1px, transparent 2.4px),
    radial-gradient(circle at 88% 14%, var(--bd-node-soft) 0, transparent 26px),
    radial-gradient(circle at 12% 30%, var(--bd-node-soft) 0, transparent 18px),
    radial-gradient(circle at 78% 62%, var(--bd-node-soft) 0, transparent 34px),
    radial-gradient(circle at 22% 84%, var(--bd-node-soft) 0, transparent 22px),
    radial-gradient(circle at 64% 92%, var(--bd-node-soft) 0, transparent 14px),
    radial-gradient(circle at 36% 8%, var(--bd-node-soft) 0, transparent 12px),
    radial-gradient(circle at 92% 44%, var(--bd-node-soft) 0, transparent 10px),
    radial-gradient(ellipse at 86% 4%, var(--glow-1), transparent 46%),
    radial-gradient(ellipse at 0% 58%, var(--glow-2), transparent 50%),
    radial-gradient(ellipse at 100% 100%, var(--glow-2), transparent 44%),
    var(--bd-base);
  pointer-events: none;
  z-index: 0;
}
.phone::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bd-trace);
  -webkit-mask: url('/assets/circuit.svg') center / cover no-repeat;
  mask: url('/assets/circuit.svg') center / cover no-repeat;
  filter: var(--bd-trace-glow);
  pointer-events: none;
  z-index: 0;
  animation: trace-breathe 7s ease-in-out infinite;
}
@keyframes trace-breathe {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

#scr,
#join {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: calc(18px + env(safe-area-inset-top)) var(--gutter) 110px;
  z-index: 1;
}

#join {
  position: relative;
  min-height: 100%;
  padding-bottom: 60px;
}

/* ---------------------------------------------------------- typography --- */

h1,
.big {
  font-family: Anton, Manrope, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: 0.01em;
}
h1 {
  font-size: 32px;
  margin: 4px 0;
}
h1.cal-h,
h1.att-h {
  font-size: 24px;
}
.big {
  font-size: 36px;
}
.h3 {
  font-size: 16px;
  display: block;
  margin: 18px 0 2px;
}
.sheet-h {
  font-family: Anton, Manrope, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 24px;
  margin-bottom: 6px;
}
.lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 800;
  color: var(--mu);
}
.lbl em {
  font-style: normal;
  color: var(--pt);
  letter-spacing: 0;
}
.mu {
  color: var(--mu);
  font-size: 12.5px;
}
.center {
  text-align: center;
}
.note {
  margin: 10px 0;
}
.mt {
  margin-top: 14px;
}
.mt-s {
  margin-top: 8px;
}
.blk-b {
  display: block;
  margin-top: 2px;
}
.sess-t {
  font-size: 16px;
  display: block;
  margin-top: 2px;
}
.spacer {
  width: 40px;
}
.code-big {
  font-family: Anton, Manrope, sans-serif;
  font-size: 54px;
  letter-spacing: 0.14em;
  text-align: center;
  color: var(--teal);
  margin: 10px 0;
}

/* ----------------------------------------------------------- structure --- */

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row.sp {
  justify-content: space-between;
}
.row.gap {
  gap: 10px;
}
.row.gap-s {
  gap: 6px;
}
.row.wrap {
  flex-wrap: wrap;
}
.g {
  flex: 1;
  min-width: 0;
}
.top-row {
  margin-bottom: 8px;
  gap: 12px;
}
.nav-row {
  gap: 8px;
  margin: 8px 0;
}

/* -------------------------------------------------------------- cards ---- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s4);
  margin: var(--s3) 0;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.card.tap {
  cursor: pointer;
  transition: transform 0.12s ease;
}
.card.tap:active {
  transform: scale(0.985);
}
.card.mini {
  flex: 1;
  margin: 0;
  padding: 10px 12px;
}
.card.mini .big {
  font-size: 22px;
}
.card.mine {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal) inset;
}
.card.hero {
  background: var(--teal);
  color: var(--ink);
  border: 0;
}
.card.hero .lbl,
.card.hero .mu {
  color: rgba(4, 25, 27, 0.7);
}
.card.sess {
  border-left: 6px solid var(--teal);
}
.card.empty {
  text-align: center;
  padding: 26px 18px;
}
.empty-i {
  font-size: 30px;
  margin-bottom: 6px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}
.tiles.two {
  grid-template-columns: 1fr 1fr;
}
.tiles .card {
  margin: 0;
  padding: 12px 10px;
}
.tiles .big {
  font-size: 26px;
  margin-top: 4px;
}

/* ------------------------------------------------------------ controls --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-btn);
  height: var(--btn-h);
  padding: 0 20px;
  background: var(--teal);
  color: var(--ink);
  font: 800 14px Manrope, sans-serif;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  flex: 1;
  transition: filter 0.12s ease;
}
.btn:active {
  filter: brightness(0.92);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}
.btn.wide {
  width: 100%;
  flex: none;
  margin: var(--s2) 0;
}
/* Point 6: a button inside a card is the smaller of the two sizes. */
.card .btn:not(.sm) {
  height: var(--btn-h-card);
}
/* Point 6: two buttons side by side share the width equally, 10px apart. */
.row.gap > .btn {
  flex: 1 1 0;
  min-width: 0;
}
.btn.sm {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
}
/* Frosted, not transparent: the circuit backdrop must never run through a label. */
.btn.o {
  background: var(--card);
  color: var(--tx);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.btn.gh {
  background: var(--card2);
  color: var(--tx);
}
.btn.k {
  background: #000;
  color: #fff;
  width: 100%;
  margin-top: 12px;
}
.btn.gr {
  background: var(--green);
  color: var(--ink);
}
.btn.d {
  background: var(--pink);
  color: #fff;
}

.ib {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--card2);
  color: var(--tx);
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.ib.brandy {
  background: var(--teal);
  color: var(--ink);
  font-weight: 800;
}

.pill {
  display: inline-block;
  /* The green tone is .g, which is also the grow-to-fill helper; without
     this a green "Paid" pill stretched across the whole row. */
  flex: none;
  font-size: 11px;
  font-weight: 800;
  border-radius: 20px;
  padding: 4px 10px;
  background: var(--card2);
  color: var(--mu);
  border: 0;
}
.pill.t {
  background: rgba(0, 194, 203, 0.16);
  color: var(--tt);
}
.pill.g {
  background: rgba(45, 255, 138, 0.14);
  color: var(--gt);
}
.pill.p {
  background: rgba(255, 77, 148, 0.15);
  color: var(--pt);
}
.pill.tap {
  cursor: pointer;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s2) 0 var(--s3);
}
.chip {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 9px 14px;
  background: transparent;
  color: var(--tx);
  font: 700 13px inherit;
  font-family: inherit;
  cursor: pointer;
}
.chip.on {
  background: var(--teal);
  color: var(--ink);
  border-color: var(--teal);
}

.seg {
  display: flex;
  background: var(--card2);
  border-radius: 24px;
  padding: 4px;
  margin: 10px 0;
}
.seg button {
  flex: 1;
  border: 0;
  background: none;
  color: var(--mu);
  font: 800 13px inherit;
  font-family: inherit;
  height: 34px;
  border-radius: 20px;
  cursor: pointer;
}
.seg .on {
  background: var(--teal);
  color: var(--ink);
}

.sw {
  width: 52px;
  height: 30px;
  border-radius: 16px;
  border: 0;
  background: var(--card2);
  position: relative;
  cursor: pointer;
  flex: none;
}
.sw i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mu);
  transition: 0.18s ease;
}
.sw.on {
  background: rgba(45, 255, 138, 0.25);
}
.sw.on i {
  left: 25px;
  background: var(--green);
}

.av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card2);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
}

.rank {
  width: 22px;
  text-align: center;
  color: var(--mu);
}

.bar {
  height: 8px;
  background: var(--card2);
  border-radius: 8px;
  overflow: hidden;
  margin: 8px 0;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s ease;
}

.dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  background: rgba(45, 255, 138, 0.2);
  color: var(--gt);
}
.dot.A {
  background: rgba(255, 77, 148, 0.2);
  color: var(--pt);
}

.bub {
  background: var(--green);
  color: var(--ink);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 14px;
  font-weight: 700;
  margin: 10px 0;
  white-space: pre-wrap;
}

.chart {
  width: 100%;
  height: 78px;
  margin-top: 8px;
  overflow: visible;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--mu);
  margin-top: 8px;
}
.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  margin-right: 4px;
}

/* Review with AI: the photographed pages, and the question-by-question list. */
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: var(--s2);
  margin-top: var(--s2);
}
.thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card2);
  border: 1px solid var(--line);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb > span {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 8px;
  padding: 1px 6px;
}
.thumb-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.thumb.add {
  display: grid;
  place-content: center;
  gap: 2px;
  color: var(--tt);
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
  border-style: dashed;
}
.thumb.add span {
  position: static;
  background: none;
  color: var(--mu);
  font-size: 11px;
  padding: 0;
}
.rv-q {
  border-left: 4px solid var(--line);
}
.rv-q.correct {
  border-left-color: var(--green);
}
.rv-q.partial {
  border-left-color: var(--teal);
}
.rv-q.wrong {
  border-left-color: var(--pink);
}
.rv-p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}
.rv-list {
  margin: 6px 0 0;
  padding-left: 18px;
}
.rv-list li {
  margin: 4px 0;
}

.slip {
  width: 100%;
  border-radius: 14px;
  margin-top: 10px;
}

/* ---------------------------------------------------------------- form --- */

.fld {
  display: block;
  margin: 0 0 14px;
  flex: 1;
  min-width: 0;
}
.fld .lbl {
  display: block;
  margin-bottom: 6px;
}
/* The short reason under a field: green when valid, pink when not. */
.fld-note {
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--mu);
}
.fld-note.ok {
  color: var(--gt);
}
.fld-note.no {
  color: var(--pt);
}
.fld-hint {
  font-size: 12px;
  color: var(--mu);
  margin-top: 6px;
}
/* Point 4: 16px is the rule that actually stops Safari zooming into a field.
   Point 6: one height for every box, so neighbouring fields line up. */
input,
select,
textarea {
  width: 100%;
  min-height: var(--fld-h);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--tx);
  padding: var(--s3);
  font: inherit;
  font-family: inherit;
  font-size: 16px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}
/* Point 6: a field that failed its check. */
input.bad,
select.bad,
textarea.bad {
  border-color: var(--pink);
}
textarea {
  resize: vertical;
}
input[type='file'] {
  padding: 10px;
}
.search {
  margin: 8px 0 4px;
}

.picks {
  display: grid;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  margin: 6px 0 12px;
}
.pick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--tx);
  border-radius: 14px;
  padding: 11px 14px;
  font: 700 13px inherit;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.pick em {
  font-style: normal;
  color: var(--mu);
  font-weight: 500;
  font-size: 11px;
}
.pick.on {
  border-color: var(--teal);
  background: rgba(0, 194, 203, 0.12);
}

/* ------------------------------------------------------- bottom nav ----- */

#nav {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  height: 64px;
  border-radius: var(--r-nav);
  background: var(--card);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  display: flex;
  gap: 4px;
  padding: 6px;
  z-index: 5;
}
#nav button {
  flex: 1;
  border: 0;
  background: none;
  color: var(--mu);
  border-radius: 26px;
  font: 800 10.5px inherit;
  font-family: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 0 2px;
}
#nav .on {
  background: var(--teal);
  color: var(--ink);
}
.nav-ic {
  font-size: 15px;
  line-height: 1;
}

/* ------------------------------------------------------ sheets & toast --- */

#sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
  backdrop-filter: blur(2px);
}
#sheet.open {
  display: flex;
}
.sheet-panel {
  background: var(--bg);
  width: 100%;
  max-width: 410px;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 10px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  animation: rise 0.22s ease;
}
.grab {
  width: 44px;
  height: 4px;
  border-radius: 4px;
  background: var(--card2);
  margin: 2px auto 12px;
}
@keyframes rise {
  from {
    transform: translateY(14px);
    opacity: 0.6;
  }
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--ink);
  font-weight: 800;
  border-radius: 20px;
  padding: 11px 18px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 30;
  text-align: center;
  max-width: 340px;
  font-size: 13px;
}
#toast.open {
  opacity: 1;
}
#toast.bad {
  background: var(--pink);
  color: #fff;
}
#toast.info {
  background: var(--card2);
  color: var(--tx);
}

/* --------------------------------------------------------------- login --- */

.brand {
  text-align: center;
  margin: 24px 0 10px;
}
.logo {
  height: 66px;
  width: auto;
  mix-blend-mode: screen;
}
:root[data-mode='day'] .logo {
  mix-blend-mode: normal;
  filter: invert(1) hue-rotate(180deg);
}
.role-ic {
  font-size: 22px;
  width: 40px;
  text-align: center;
}
.role-n {
  font-size: 17px;
}

.pin {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 22px 0 4px;
}
.pin i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--teal);
}
.pin i.f {
  background: var(--teal);
}
.pin-note {
  min-height: 18px;
}
.pad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 14px;
  justify-content: center;
  margin-top: 8px;
}
.pad button {
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--tx);
  font: 400 26px Anton, sans-serif;
  cursor: pointer;
}
.pad button:active {
  background: var(--card2);
}
.shake {
  animation: sh 0.4s;
}
@keyframes sh {
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* ------------------------------------------------------------ calendar --- */

.strip {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: space-between;
}
.strip-d {
  display: grid;
  place-items: center;
  gap: 1px;
  border: 0;
  background: transparent;
  color: var(--mu);
  border-radius: 14px;
  padding: 5px 0;
  width: 38px;
  cursor: pointer;
  font-family: inherit;
}
.strip-w {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.strip-n {
  font: 400 17px Anton, sans-serif;
  color: var(--tx);
}
.strip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}
.strip-d.today {
  outline: 1px solid var(--line);
}
.strip-d.on {
  background: var(--teal);
}
.strip-d.on .strip-n,
.strip-d.on .strip-w {
  color: var(--ink);
}
.strip-d.on .strip-dot {
  background: var(--ink);
}

/* The hour grid sits on a frosted panel, so the backdrop stays behind the
   busiest screen in the app instead of running through it. */
.tl {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 6px 8px 4px;
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.tl-hours {
  width: 40px;
  flex: none;
  position: relative;
}
.tl-h {
  height: 56px;
  font-size: 9.5px;
  color: var(--mu);
  font-weight: 700;
}
.tl-grid,
.wk-cols {
  position: relative;
  flex: 1;
  min-width: 0;
}
.wk-cols {
  display: flex;
  gap: 2px;
}
.wk-col {
  position: relative;
  flex: 1;
  min-width: 0;
}
.wk-col.today {
  background: rgba(0, 194, 203, 0.06);
  border-radius: 8px;
}
.tl-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line);
  pointer-events: none;
}
.now {
  position: absolute;
  left: -4px;
  right: 0;
  height: 2px;
  background: var(--pink);
  border-radius: 2px;
  z-index: 3;
}
.now::before {
  content: '';
  position: absolute;
  left: -2px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
}

.blk {
  position: absolute;
  border: 0;
  border-radius: 12px;
  padding: 5px 7px;
  text-align: left;
  color: var(--ink);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: inherit;
  z-index: 2;
}
.blk b {
  font-size: 10px;
  opacity: 0.8;
}
.blk span {
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.15;
}
.blk i {
  font-size: 9.5px;
  font-style: normal;
  opacity: 0.75;
}
.blk.is-done {
  opacity: 0.45;
}

.wk-head {
  display: grid;
  grid-template-columns: 40px repeat(7, 1fr);
  gap: 2px;
  margin-top: 6px;
  padding-left: 0;
}
.wk-head::before {
  content: '';
}
.wk-h {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--mu);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 3px 0;
  cursor: pointer;
  font-family: inherit;
}
.wk-h b {
  font: 400 15px Anton, sans-serif;
  color: var(--tx);
}
.wk-h.today {
  background: rgba(0, 194, 203, 0.14);
}

.mon {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 6px;
}
.mon-d {
  min-height: 52px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid transparent;
  padding: 4px 3px;
  font-size: 10px;
  cursor: pointer;
  color: var(--tx);
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: stretch;
  font-family: inherit;
}
.mon-d.x {
  opacity: 0.35;
}
.mon-d.today {
  border-color: var(--teal);
}
.mon-n {
  font-weight: 800;
  text-align: left;
}
.mon-d i {
  display: block;
  height: 4px;
  border-radius: 3px;
}
.mon-d em {
  font-style: normal;
  font-size: 8px;
  color: var(--mu);
}

/* ------------------------------------------------------------ feedback --- */

.att-row.is-absent {
  border-color: rgba(255, 77, 148, 0.45);
}
.att-row.is-present {
  border-color: rgba(45, 255, 138, 0.3);
}

.load {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 80px 0;
}
.spin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--card2);
  border-top-color: var(--teal);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

body.busy .phone {
  cursor: progress;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ===========================================================================
   Plus App v2 - the screens from the improvement plan.
   Every size below comes from the scale in :root (points 4 and 6).
   =========================================================================== */

/* -------------------------------------- point 2 · sticky Back / Next bar --- */

/* The footer is pinned to the bottom of the frame, above the home bar and
   above the keyboard, so Submit is never scrolled out of reach. The screen
   that uses it adds .has-footer, which reserves the same height below the
   content so the last field is never hidden. */
.footer-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: var(--s3) var(--gutter) calc(var(--s3) + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  z-index: 6;
}
.footer-bar > .btn {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}
.footer-bar > .btn.back {
  flex: 0 0 34%;
}
.has-footer {
  padding-bottom: calc(var(--btn-h) + var(--s6) + var(--safe-b)) !important;
}

/* Point 2: the sending state. The label is replaced, not hidden, so the
   button never changes width mid-tap. */
.btn .spin-s {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
  margin-right: var(--s2);
}
.btn.is-busy {
  pointer-events: none;
  filter: saturate(0.6);
}

/* Point 2: the success screen after Submit. */
.ok-screen {
  display: grid;
  place-items: center;
  gap: var(--s4);
  text-align: center;
  padding: var(--s6) var(--s2);
}
.ok-tick {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 40px;
  background: rgba(45, 255, 138, 0.16);
  color: var(--gt);
}
.ok-tick.no {
  background: rgba(255, 77, 148, 0.16);
  color: var(--pt);
}

/* ------------------------------------------ point 8 · four-step progress --- */

.steps {
  display: flex;
  gap: var(--s1);
  margin: var(--s3) 0 var(--s2);
}
.steps i {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--card2);
}
.steps i.on {
  background: var(--teal);
}
.step-n {
  font-size: 12px;
  font-weight: 800;
  color: var(--tt);
  margin-bottom: var(--s3);
}

/* -------------------------------------------- point 3 · +94 phone field --- */

.tel {
  display: flex;
  gap: var(--s2);
  align-items: stretch;
}
.tel-cc {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0 var(--s3);
  min-height: var(--fld-h);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--mu);
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
}
.tel input {
  flex: 1;
  min-width: 0;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.tel input.ok {
  border-color: var(--green);
}

/* -------------------------------------- point 5 · full-screen code entry --- */

/* Nothing else is on the screen: no cards, no tab bar, no logo. */
.lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s4);
  padding: calc(var(--s5) + var(--safe-t)) var(--gutter) calc(var(--s5) + var(--safe-b));
  background:
    radial-gradient(circle at 50% 12%, var(--glow-1), transparent 55%),
    var(--bg);
  z-index: 2;
}
.lock-role {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tx);
  background: var(--card2);
  border-radius: 20px;
  padding: 6px 16px;
}
.lock h1 {
  font-size: 22px;
  text-align: center;
}
.lock .pin {
  margin: 0;
}
.lock-note {
  min-height: 18px;
  font-size: 12.5px;
  color: var(--mu);
  text-align: center;
}
.lock-note.no {
  color: var(--pt);
  font-weight: 700;
}
.lock-foot {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 272px;
  margin-top: var(--s2);
}
.lock-foot button {
  background: none;
  border: 0;
  color: var(--tx);
  font: 700 14px inherit;
  font-family: inherit;
  padding: var(--s2);
  cursor: pointer;
}
.lock-foot button[disabled] {
  opacity: 0.35;
}
/* Point 5: keys are 72px wide, with the letters under each digit. */
.pad button {
  display: grid;
  place-items: center;
  gap: 0;
  line-height: 1;
}
.pad button em {
  font: 800 8.5px/1 Manrope, sans-serif;
  font-style: normal;
  letter-spacing: 0.16em;
  color: var(--mu);
  margin-top: 3px;
}
.pad button.blank {
  visibility: hidden;
  pointer-events: none;
}

/* ------------------------------------------------- point 9 · calendar ----- */

/* The layer the floating controls live in: the whole frame, click-through
   except where a control actually is. */
#over {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
#over > * {
  pointer-events: auto;
}

/* The "+" that sits over the calendar, clear of the tab bar. */
/* A labelled pill, not a bare "+": the label is what makes it findable. */
.fab {
  position: absolute;
  right: var(--gutter);
  bottom: calc(96px + var(--safe-b));
  height: 54px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--teal);
  color: var(--ink);
  font: 800 16px/1 Manrope, sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(0, 194, 203, 0.18);
  z-index: 4;
}
.fab span {
  font: 800 26px/1 Manrope, sans-serif;
  margin-top: -2px;
}

/* ---------------------------------------- point 13 · the time wheels ----- */

/* Three columns - hour, minute, AM/PM - turning behind one highlighted band,
   as on the iPhone alarm. Rows are 40px; five are visible. */
.wheels {
  position: relative;
  display: flex;
  gap: 4px;
  height: 200px;
  margin: 6px 0 14px;
  padding: 0 12px;
  border-radius: 18px;
  background: var(--card2);
}
.wheels::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 80px;
  height: 40px;
  border-radius: 12px;
  background: var(--line);
  pointer-events: none;
}
.wheel {
  position: relative;
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 80px 0;
  -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
  mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
}
.wheel::-webkit-scrollbar {
  display: none;
}
.wheel-i {
  display: block;
  width: 100%;
  height: 40px;
  border: 0;
  background: none;
  color: var(--mu);
  font: 500 22px/40px Manrope, sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
  scroll-snap-align: center;
  cursor: pointer;
}
.wheel-i.on {
  color: var(--tx);
  font-weight: 700;
}

/* ------------------------------------------- adding students to a class -- */

.roster {
  display: grid;
  gap: 6px;
  margin: 10px 0 4px;
}
.roster-i {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--tx);
  border-radius: 14px;
  padding: 11px 14px;
  font: 700 14px inherit;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.roster-i em {
  display: block;
  font-style: normal;
  color: var(--mu);
  font-weight: 500;
  font-size: 12px;
  margin-top: 2px;
}
.roster-box {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--mu);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 14px;
  color: transparent;
}
.roster-i.on {
  border-color: var(--teal);
  background: rgba(0, 194, 203, 0.12);
}
.roster-i.on .roster-box {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--ink);
}

/* Month view: a tapped day opens its agenda underneath, as Google does. */
.mon-d.sel {
  background: var(--teal);
}
.mon-d.sel .mon-n {
  color: var(--ink);
}
.agenda-h {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mu);
  margin: var(--s4) 0 var(--s2);
}
.agenda {
  display: grid;
  gap: var(--s2);
}
.agenda-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: var(--s3);
  align-items: start;
}
.agenda-t {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--mu);
  padding-top: var(--s3);
  font-variant-numeric: tabular-nums;
}
.agenda-c {
  border: 0;
  border-radius: 14px;
  padding: var(--s3);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  display: block;
  width: 100%;
  font-family: inherit;
}
.agenda-c b {
  display: block;
  font-size: 13.5px;
}
.agenda-c span {
  font-size: 11.5px;
  opacity: 0.78;
}
.agenda-c.is-done {
  opacity: 0.55;
}

/* An empty slot on the Day / Week grid is tappable: it opens quick-create. */
.slot {
  position: absolute;
  left: 0;
  right: 0;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
.slot:active {
  background: rgba(0, 194, 203, 0.1);
}

/* --------------------------------- point 10 · class start, timer and end --- */

.timer {
  font: 400 44px/1 Anton, Manrope, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-align: center;
  margin: var(--s3) 0;
}
.att-head {
  border-left: 4px solid var(--teal);
}
.att-note {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mu);
  margin: var(--s4) 0 var(--s2);
}
.att-row {
  margin: var(--s2) 0;
}
.att-row.is-absent {
  border-color: var(--pink);
}
.warn {
  border-color: var(--pink);
  background: rgba(255, 77, 148, 0.08);
}
.warn b {
  color: var(--pt);
}
.link-btn {
  background: none;
  border: 0;
  color: var(--tt);
  font: 800 13px inherit;
  font-family: inherit;
  padding: var(--s2) 0 0;
  cursor: pointer;
  text-decoration: underline;
}

/* ----------------------------------------- point 11 · payment & receipt --- */

.receipt {
  background: var(--card2);
  border-radius: 14px;
  padding: var(--s3);
  margin: var(--s3) 0;
}
.receipt div {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding: 3px 0;
  font-size: 13px;
}
.receipt div span {
  color: var(--mu);
}
.receipt div b {
  font-variant-numeric: tabular-nums;
}
/* Point 6: money lines up on the right with equal-width digits. */
.amt {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.big {
  font-variant-numeric: tabular-nums;
}
.check {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: var(--s3) 0;
  cursor: pointer;
  font-size: 13px;
  background: none;
  border: 0;
  color: var(--tx);
  font-family: inherit;
  text-align: left;
  width: 100%;
  padding: 0;
}
.check i {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card2);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 13px;
  color: transparent;
}
.check.on i {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}

/* ------------------------------------------- point 13 · time slot sheet --- */

.chips.scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: var(--s1);
  scrollbar-width: none;
}
.chips.scroll::-webkit-scrollbar {
  display: none;
}
.chips.scroll .chip {
  flex: 0 0 auto;
}
.slotline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  background: var(--card2);
  border-radius: 14px;
  padding: var(--s3);
  margin: var(--s2) 0;
}
.slotline b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------- point 1 · skeletons ------ */

/* Grey boxes while the first screen loads, instead of an empty page. */
.skel {
  border-radius: 14px;
  background: linear-gradient(90deg, var(--card2) 25%, var(--card) 50%, var(--card2) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.1s linear infinite;
}
.skel-card {
  height: 92px;
  margin: var(--s3) 0;
  border-radius: var(--r-card);
}
.skel-line {
  height: 14px;
  margin: var(--s2) 0;
}
@keyframes shimmer {
  to {
    background-position: -300% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skel {
    animation: none;
  }
  .btn .spin-s {
    animation: none;
  }
}

/* ------------------------------ point 9, phase 2 · dragging a class ------- */

/* A movable class says so on a pointer device, and never lets the browser
   turn the press-and-hold into a text selection or a native image drag. */
.blk[data-move] {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.blk.is-dragging {
  z-index: 9;
  opacity: 0.92;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transform-origin: center;
  cursor: grabbing;
  transition: none;
}

/* ===========================================================================
   The Income tab (design handoff, screens 1-4).

   Its own look: a teal glow on the growth card, student faces rather than
   bars, and no money anywhere - the handoff is explicit that these screens
   show students and growth, never rupees.
   =========================================================================== */

.plus-mark {
  font: 400 22px/1 Anton, Manrope, sans-serif;
  color: var(--teal);
  letter-spacing: 0.02em;
}

/* --------------------------------------------- screen 1 · the growth card */

.card.grow-card {
  background: linear-gradient(160deg, rgba(0, 194, 203, 0.16), var(--card) 70%);
  border-color: rgba(0, 194, 203, 0.4);
  box-shadow: 0 0 40px rgba(0, 194, 203, 0.1);
}
.grow-h {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 6px;
}
.grow-h.sm {
  font-size: 19px;
}
.grow-n {
  color: var(--teal);
}
.grow {
  width: 100%;
  height: 112px;
  margin-top: var(--s3);
  overflow: visible;
}
.grow-x {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  color: var(--mu);
  margin-top: var(--s1);
}
.grow-x .on {
  color: var(--tx);
}

/* ------------------------------------------ screen 1 · students by month */

.faces {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 150px;
  margin-top: var(--s2);
}
.faces-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.faces-col > b {
  font-size: 12px;
  font-weight: 800;
  color: var(--mu);
  margin-bottom: 6px;
}
.faces-col > b.on {
  color: var(--teal);
}
.faces-col em {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  color: var(--mu);
  margin-top: 7px;
}
.faces-stack {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  padding: 4px;
  border-radius: 14px;
}
/* The month in progress glows, as the handoff draws it. */
.faces-stack.on {
  background: rgba(0, 194, 203, 0.15);
  box-shadow: 0 0 22px rgba(0, 194, 203, 0.35), inset 0 0 0 1.5px var(--teal);
}
.faces-stack i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  margin-top: -2px;
  display: block;
}

/* ------------------------------------------------- the goal and the ring */

.card.almost {
  border-color: rgba(255, 77, 148, 0.5);
  background: linear-gradient(160deg, rgba(255, 77, 148, 0.14), var(--card) 70%);
}
.ring {
  width: 54px;
  height: 54px;
  min-width: 54px;
}
.goal-n {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: block;
}
.goal-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s3) 0;
}
.goal-dots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  flex: 0 0 auto;
}
.goal-dots i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px dashed var(--teal);
  opacity: 0.6;
}
.goal-arrow {
  color: var(--mu);
  font-size: 18px;
}
.goal-prize {
  flex: 1;
  min-width: 0;
  background: var(--card2);
  border-radius: 14px;
  padding: var(--s3);
  box-shadow: inset 0 0 0 1px rgba(0, 194, 203, 0.35);
}
.goal-prize b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.03em;
}
.goal-left {
  color: var(--pt);
  font-weight: 800;
  font-size: 13px;
}

/* -------------------------------------------------- screen 2 · by class */

.card.byclass .pips {
  margin: var(--s2) 0;
}
.pips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.pips i {
  height: 7px;
  flex: 1;
  min-width: 7px;
  border-radius: 4px;
  background: var(--card2);
}
.pips i.on {
  background: var(--teal);
}
.pips.wide i {
  height: 9px;
}
.off-n {
  font-size: 12px;
  font-weight: 800;
  color: var(--pt);
  white-space: nowrap;
}
.on-n {
  font-size: 12px;
  font-weight: 800;
  color: var(--gt);
  white-space: nowrap;
}
.card.plus-on {
  border-color: rgba(45, 255, 138, 0.35);
}

/* --------------------------------------------- screen 4 · the QR invite */

.card.qr-card {
  text-align: center;
}
/* The code needs a white quiet zone whatever the theme, or it will not scan. */
.qr {
  background: #fff;
  border-radius: 16px;
  padding: var(--s3);
  display: inline-block;
  line-height: 0;
  margin-bottom: var(--s3);
}
.qr svg {
  display: block;
  width: 230px;
  height: 230px;
  max-width: 100%;
}
.qr-h {
  display: block;
  font-size: 16px;
  margin-bottom: var(--s1);
}

/* ------------------------------------------- screen 3 · the celebration */

.joined-av {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--card2);
  display: grid;
  place-items: center;
}
.joined-av i {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
}
.joined-av span {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--ink);
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 3px solid var(--bg);
}
.joined-emoji {
  font-size: 30px;
  margin-top: -6px;
}

/* Confetti. Decorative only, and it stops for anyone who asked it to. */
.party {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.party i {
  position: absolute;
  top: -14px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  animation: fall 2.4s linear infinite;
}
@keyframes fall {
  to {
    transform: translateY(640px) rotate(540deg);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .party {
    display: none;
  }
}

/* ------------------------------------- the family screen when locked out */

.locked {
  display: grid;
  place-items: center;
  gap: var(--s4);
  text-align: center;
  padding: var(--s6) var(--s2);
}
.locked-mark {
  font: 400 44px/1 Anton, Manrope, sans-serif;
  color: var(--teal);
}
.locked-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--tx);
}
