:root {
  color-scheme: light;
  --ad-pad: 0px;
  --ink: #17163b;
  --ink-2: #29275c;
  --muted: #6c6a89;
  --paper: #f6f5ff;
  --panel: #ffffff;
  --line: #dedcf0;
  --violet: #7657ff;
  --violet-dark: #5135d9;
  --pink: #ff4f8f;
  --teal: #28c98b;
  --cyan: #13bcd2;
  --gold: #ffcf4a;
  --orange: #ff9c37;
  --red: #ef476f;
  --green: #18a978;
  --shadow: 0 15px 40px rgba(31, 26, 82, .12);
  --shadow-tight: 0 7px 20px rgba(31, 26, 82, .12);
  --radius: 24px;
  --display: "Bungee", Impact, sans-serif;
  --body: "Nunito", Arial, sans-serif;
  --utility: "Space Mono", Consolas, monospace;
  font-family: var(--body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(rgba(118, 87, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 87, 255, .04) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid rgba(19, 188, 210, .35);
  outline-offset: 3px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
  position: relative;
  padding-bottom: calc(86px + env(safe-area-inset-bottom) + var(--ad-pad));
}

.app-shell.wide {
  width: min(100%, 980px);
}

.screen {
  --screen-pad: clamp(16px, 5vw, 28px);
  padding: 18px var(--screen-pad) 38px;
  animation: screen-in .28s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--violet);
  font: 700 10px/1.2 var(--utility);
  letter-spacing: .13em;
}

.topbar {
  min-height: 70px;
  padding: calc(10px + env(safe-area-inset-top)) clamp(16px, 5vw, 28px) 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(246, 245, 255, .93);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font: 400 clamp(15px, 4.4vw, 20px)/1 var(--display);
  letter-spacing: -.03em;
}

.mini-logo {
  width: 35px;
  height: 35px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--ink);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1);
  transform: rotate(-4deg);
}

.mini-logo .icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke-width: 1.4;
}

.back-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: 700 28px/1 var(--body);
}

.top-stats {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-chip {
  height: 34px;
  min-width: 48px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 8px rgba(31, 26, 82, .06);
}

.stat-chip .icon {
  width: 16px;
  height: 16px;
}

.stat-chip b {
  font: 800 13px/1 var(--body);
}

.fire-chip .icon {
  color: var(--pink);
  fill: rgba(255, 79, 143, .18);
}

.coin-chip .icon {
  color: #c47b00;
  fill: var(--gold);
}

.level-chip {
  width: 50px;
  height: 34px;
  padding: 5px 6px;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  color: #fff;
  background: var(--ink);
}

.level-chip span {
  font: 700 8px/1 var(--utility);
  letter-spacing: .03em;
}

.level-chip i {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}

.level-chip em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.bottom-nav {
  height: calc(70px + env(safe-area-inset-bottom));
  padding: 7px max(12px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(12px, env(safe-area-inset-right));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: fixed;
  z-index: 25;
  bottom: var(--ad-pad);
  left: 50%;
  width: min(100%, 760px);
  transform: translateX(-50%);
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: 0 -10px 25px rgba(31, 26, 82, .08);
}

.bottom-nav button {
  padding: 5px 2px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #8c89a6;
  background: transparent;
  font: 800 10px/1 var(--body);
}

.bottom-nav button .icon {
  width: 22px;
  height: 22px;
  transition: transform .2s ease;
}

.bottom-nav button.active {
  color: var(--violet);
  background: #f1eeff;
}

.bottom-nav button.active .icon {
  transform: translateY(-1px) scale(1.08);
}

.primary,
.secondary,
.danger {
  min-height: 52px;
  padding: 13px 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 900 14px/1.1 var(--body);
  letter-spacing: .01em;
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--violet-dark));
  box-shadow: 0 8px 0 #3e2aaa, 0 13px 22px rgba(81, 53, 217, .22);
}

.primary .icon {
  color: var(--gold);
  fill: currentColor;
  stroke-width: 1.4;
}

.primary:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 #3e2aaa, 0 7px 14px rgba(81, 53, 217, .18);
}

.primary:disabled {
  opacity: .4;
  box-shadow: none;
}

.secondary {
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: 0 5px 0 #d7d4e9;
}

.secondary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #d7d4e9;
}

.danger {
  width: 100%;
  color: #fff;
  background: var(--red);
  box-shadow: 0 5px 0 #b72a4d;
}

.jumbo {
  width: 100%;
  min-height: 58px;
  border-radius: 19px;
  font-size: 16px;
}

.page-title {
  margin: 4px 0 22px;
}

.page-title h1 {
  margin: 0 0 6px;
  font: 400 clamp(28px, 8vw, 42px)/1.04 var(--display);
  letter-spacing: -.045em;
}

.page-title > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.section-heading {
  margin: 26px 0 13px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2 {
  margin: 0;
  font: 900 21px/1.05 var(--body);
  letter-spacing: -.025em;
}

.section-heading > button {
  padding: 7px 0;
  color: var(--violet);
  background: transparent;
  font-weight: 900;
}

.section-heading > span {
  color: var(--muted);
  font: 700 11px/1 var(--utility);
}

/* Onboarding */

.onboarding-app {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ink);
}

.onboarding {
  width: min(100%, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom));
}

.welcome-screen {
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 50% 37%, rgba(118, 87, 255, .48), transparent 31%),
    radial-gradient(circle at 80% 10%, rgba(255, 79, 143, .22), transparent 27%),
    var(--ink);
}

.welcome-grid {
  position: absolute;
  inset: 0;
  opacity: .23;
  background:
    linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 43%, #000, transparent 68%);
}

.welcome-logo {
  width: 126px;
  height: 126px;
  margin-bottom: 25px;
  border: 10px solid #383570;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  color: var(--gold);
  background: conic-gradient(from 215deg, var(--pink), var(--violet), var(--cyan), var(--gold), var(--pink));
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .05), 0 0 70px rgba(118, 87, 255, .55);
  animation: aura-float 3s ease-in-out infinite;
}

.welcome-logo::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.welcome-logo span {
  position: relative;
}

.welcome-logo .icon {
  width: 56px;
  height: 56px;
  fill: currentColor;
  stroke: #fff;
  stroke-width: 1.1;
}

@keyframes aura-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

.welcome-screen .eyebrow {
  position: relative;
  color: #9feef5;
}

.welcome-screen h1 {
  margin: 2px 0 12px;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  font: 400 clamp(54px, 18vw, 90px)/.82 var(--display);
  letter-spacing: -.075em;
  text-shadow: 0 7px 0 rgba(0, 0, 0, .2);
}

.welcome-screen h1 .gcse-word {
  line-height: .8;
}

.welcome-screen h1 .maxxing-word {
  padding: 7px 13px 6px;
  border: 2px solid #fff3b6;
  border-radius: 10px 10px 14px 8px;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 6px 0 #d78a19, 0 11px 20px rgba(0, 0, 0, .28);
  font-size: .45em;
  line-height: 1;
  letter-spacing: .045em;
  text-shadow: none;
  transform: rotate(-2deg);
}

.welcome-copy {
  max-width: 390px;
  margin: 10px auto 20px;
  position: relative;
  color: #d8d6ef;
  font-size: 16px;
  line-height: 1.5;
}

.preview-stats {
  width: 100%;
  max-width: 430px;
  margin: 4px 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, .05);
}

.preview-stats span {
  padding: 12px 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #aaa8c9;
  font: 700 9px/1.2 var(--utility);
}

.preview-stats span + span {
  border-left: 1px solid rgba(255, 255, 255, .1);
}

.preview-stats b {
  color: #fff;
  font: 900 19px/1 var(--body);
}

.welcome-screen .primary {
  max-width: 430px;
  position: relative;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 8px 0 #d99b16, 0 16px 40px rgba(255, 207, 74, .2);
}

.welcome-screen .primary .icon {
  color: var(--ink);
}

.quiet-link {
  margin-top: 22px;
  padding: 8px;
  position: relative;
  color: #bdbad6;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 12px;
}

.setup-screen {
  color: var(--ink);
  background: var(--paper);
}

.setup-top {
  margin-bottom: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-count {
  color: var(--violet);
  font: 700 11px/1 var(--utility);
}

.verified-pill {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #08795c;
  background: #dff9ef;
  font: 900 10px/1 var(--body);
  letter-spacing: .035em;
}

.verified-pill .icon {
  width: 14px;
  height: 14px;
}

.setup-screen h2 {
  margin: 0 0 9px;
  font: 400 clamp(34px, 10vw, 52px)/.98 var(--display);
  letter-spacing: -.05em;
}

.setup-copy {
  margin: 0 0 23px;
  color: var(--muted);
  line-height: 1.45;
}

.subject-picks {
  display: grid;
  gap: 10px;
}

.subject-pick {
  min-height: 70px;
  padding: 10px 13px;
  border: 2px solid var(--line);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 45px 1fr 28px;
  align-items: center;
  gap: 11px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 0 #e1dfef;
}

.subject-pick > .icon {
  width: 43px;
  height: 43px;
  padding: 9px;
  border-radius: 13px;
  color: var(--subject);
  background: var(--pale);
}

.subject-pick span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.subject-pick b {
  font-size: 16px;
}

.subject-pick small {
  color: var(--muted);
  font: 700 10px/1 var(--utility);
}

.subject-pick > i {
  width: 26px;
  height: 26px;
  border: 2px solid var(--line);
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: transparent;
  background: #fff;
}

.subject-pick > i .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.6;
}

.subject-pick.picked {
  border-color: var(--subject);
  background: linear-gradient(90deg, var(--pale), #fff 52%);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--subject) 35%, #ddd);
}

.subject-pick.picked > i {
  border-color: var(--subject);
  color: #fff;
  background: var(--subject);
}

.select-row,
.tier-row,
.name-field {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
}

.select-row > span,
.tier-row > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.select-row small,
.tier-row small {
  color: var(--muted);
  font-size: 11px;
}

.select-row select {
  padding: 9px 29px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 900;
}

.final-setup {
  display: flex;
  flex-direction: column;
}

.minute-picks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.minute-pick {
  min-height: 125px;
  padding: 13px 5px;
  border: 2px solid var(--line);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 0 #dedced;
}

.minute-pick b {
  font: 400 clamp(32px, 11vw, 46px)/1 var(--display);
}

.minute-pick > span {
  color: var(--violet);
  font: 700 9px/1 var(--utility);
  letter-spacing: .15em;
}

.minute-pick small {
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.minute-pick.picked {
  border-color: var(--violet);
  color: #fff;
  background: var(--ink);
  box-shadow: 0 5px 0 var(--violet);
  transform: translateY(-2px);
}

.minute-pick.picked > span,
.minute-pick.picked small {
  color: #d9d5ff;
}

.name-field {
  margin-top: 22px;
  display: block;
}

.name-field span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 900;
}

.name-field input {
  width: 100%;
  padding: 5px 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 18px;
  font-weight: 800;
}

.name-field input::placeholder {
  color: #aaa7c0;
}

.segmented {
  padding: 3px;
  border-radius: 12px;
  display: flex;
  background: #e9e7f5;
}

.segmented button {
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.segmented button.active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 2px 8px rgba(23, 22, 59, .2);
}

.final-setup .primary {
  margin-top: auto;
}

.privacy-note {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

/* Home */

.home-intro {
  margin: 2px 0 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.home-intro h1 {
  margin: 0 0 4px;
  font: 400 clamp(27px, 8vw, 40px)/1 var(--display);
  letter-spacing: -.045em;
}

.home-intro > div > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.round-settings {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-tight);
}

.daily-hero {
  min-height: 350px;
  padding: 22px;
  border-radius: 29px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(140px, .82fr);
  gap: 8px;
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 85% 33%, rgba(118, 87, 255, .65), transparent 30%),
    radial-gradient(circle at 70% 88%, rgba(19, 188, 210, .2), transparent 29%),
    var(--ink);
  box-shadow: 0 16px 0 #0e0d2b, 0 26px 45px rgba(23, 22, 59, .25);
}

.daily-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .14;
  background:
    linear-gradient(rgba(255, 255, 255, .2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .2) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, transparent, #000);
}

.hero-copy,
.hero-mastery,
.hero-stats {
  position: relative;
  z-index: 1;
}

.quest-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #a9f5f4;
  font: 700 10px/1 var(--utility);
  letter-spacing: .1em;
}

.quest-label i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 16px var(--teal);
  animation: blink 1.5s infinite;
}

@keyframes blink {
  50% { opacity: .35; }
}

.hero-copy h2 {
  max-width: 290px;
  margin: 17px 0 9px;
  font: 400 clamp(26px, 7.4vw, 39px)/.98 var(--display);
  letter-spacing: -.045em;
}

.hero-copy p {
  max-width: 295px;
  margin: 0 0 20px;
  color: #c8c5e1;
  font-size: 13px;
  line-height: 1.4;
}

.hero-cta {
  width: fit-content;
  min-height: 49px;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 6px 0 #ca8e13;
}

.hero-cta .icon {
  color: var(--ink);
}

.hero-mastery {
  display: grid;
  place-items: center;
}

.mastery-ring {
  width: 164px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  isolation: isolate;
}

.mastery-ring-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from -35deg, var(--pink) 0deg, var(--gold) calc(var(--progress) * .45), var(--cyan) var(--progress), rgba(255, 255, 255, .12) var(--progress), rgba(255, 255, 255, .12) 360deg);
  box-shadow: 0 0 35px rgba(118, 87, 255, .42);
}

.mastery-ring-track::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset 0 0 22px rgba(118, 87, 255, .35);
}

.mastery-ring-core {
  width: 105px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  color: #fff;
  background: radial-gradient(circle at 40% 35%, #4b478d, #1c1a49 70%);
}

.mastery-ring-core span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  color: var(--gold);
}

.mastery-ring-core .icon {
  width: 25px;
  height: 25px;
  fill: currentColor;
  stroke: #fff;
  stroke-width: 1;
}

.mastery-ring-core b {
  margin-top: 2px;
  font: 900 24px/1 var(--body);
}

.mastery-ring-core em {
  margin-top: 4px;
  color: #a8a5c8;
  font: 700 7px/1 var(--utility);
  letter-spacing: .13em;
}

.mastery-ring-orbit {
  position: absolute;
  z-index: 3;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  pointer-events: none;
}

.orbit-one {
  inset: -8px;
  border-style: dashed;
  animation: spin 13s linear infinite;
}

.orbit-two {
  inset: 23px;
  border-color: rgba(255, 207, 74, .22);
  animation: spin 8s linear infinite reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.mastery-ring-small {
  width: 94px;
}

.mastery-ring-small .mastery-ring-track::after {
  inset: 8px;
}

.mastery-ring-small .mastery-ring-core {
  width: 62px;
}

.mastery-ring-small .mastery-ring-core span {
  display: none;
}

.mastery-ring-small .mastery-ring-core b {
  font-size: 17px;
}

.mastery-ring-small .mastery-ring-core em {
  font-size: 5px;
}

.mastery-ring-small .orbit-one {
  inset: -4px;
}

.mastery-ring-small .orbit-two {
  display: none;
}

.hero-stats {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.hero-stats span {
  color: #aaa7c7;
  font-size: 10px;
  text-align: center;
}

.hero-stats b {
  color: #fff;
  font-size: 12px;
}

.chest-callout {
  width: 100%;
  margin-top: 28px;
  padding: 12px 14px;
  border: 2px solid #efb52a;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 58px 1fr 20px;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--ink);
  background: linear-gradient(100deg, #fff1b8, #fff 72%);
  box-shadow: 0 6px 0 #e2a81f, var(--shadow-tight);
  animation: chest-pulse 2s ease-in-out infinite;
}

@keyframes chest-pulse {
  50% { transform: translateY(-2px); box-shadow: 0 8px 0 #e2a81f, 0 18px 35px rgba(226, 168, 31, .26); }
}

.chest-art {
  width: 55px;
  height: 55px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  position: relative;
  color: #8e4d0a;
  background: var(--gold);
}

.chest-art .icon {
  width: 35px;
  height: 35px;
  fill: #fff0a8;
  stroke-width: 1.5;
}

.chest-callout > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chest-callout small {
  color: #a55d00;
  font: 700 8px/1 var(--utility);
  letter-spacing: .12em;
}

.chest-callout b {
  font-size: 15px;
}

.chest-callout em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.chest-callout .go {
  font-size: 30px;
  font-weight: 900;
}

.subject-strip {
  margin-inline: calc(var(--screen-pad) * -1);
  padding: 0 var(--screen-pad) 8px;
  display: flex;
  gap: 11px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.subject-strip::-webkit-scrollbar {
  display: none;
}

.subject-card {
  min-width: min(78vw, 300px);
  min-height: 89px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--subject) 30%, var(--line));
  border-radius: 20px;
  display: grid;
  grid-template-columns: 49px 1fr 55px;
  align-items: center;
  gap: 11px;
  scroll-snap-align: start;
  text-align: left;
  color: var(--ink);
  background: linear-gradient(110deg, var(--pale), #fff 66%);
  box-shadow: var(--shadow-tight);
}

.subject-icon {
  width: 49px;
  height: 49px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--subject);
  transform: rotate(-3deg);
}

.subject-icon .icon {
  width: 27px;
  height: 27px;
}

.subject-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subject-text b {
  font-size: 16px;
}

.subject-text small {
  color: var(--muted);
  font-size: 10px;
}

.mini-ring {
  width: 51px;
  height: 51px;
  padding: 5px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--subject) var(--value), #e7e4f1 0);
}

.mini-ring::before {
  content: "";
  width: 39px;
  height: 39px;
  border-radius: 50%;
  grid-area: 1 / 1;
  background: #fff;
}

.mini-ring b {
  grid-area: 1 / 1;
  position: relative;
  font: 900 11px/1 var(--body);
}

.mission-board,
.heatmap-card,
.mastery-card,
.badge-card,
.settings-card {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
  box-shadow: var(--shadow-tight);
}

.mission-heading {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mission-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mission-heading > div > span {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--violet);
  background: #eeeaff;
}

.mission-heading h2 {
  margin: 0;
  font-size: 18px;
}

.mission-heading > b {
  color: var(--violet);
  font: 700 12px/1 var(--utility);
}

.mission {
  min-height: 57px;
  padding: 9px 0;
  display: grid;
  grid-template-columns: 33px 1fr auto;
  align-items: center;
  gap: 10px;
}

.mission + .mission {
  border-top: 1px solid #eceaf5;
}

.mission-check {
  width: 29px;
  height: 29px;
  border: 2px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #a19eb8;
}

.mission-check .icon {
  width: 15px;
  height: 15px;
}

.mission > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mission > div b {
  font-size: 13px;
}

.mission > div small {
  color: var(--muted);
  font: 700 9px/1 var(--utility);
}

.mission-reward {
  padding: 6px 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 3px;
  color: #9a5c00;
  background: #fff1bd;
  font: 700 9px/1 var(--utility);
}

.mission-reward .icon {
  width: 13px;
  height: 13px;
  fill: var(--gold);
}

.mission.done .mission-check {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.mission.done .mission-reward.claimed {
  color: #098665;
  background: #e0f9f0;
}

.quick-stats {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.quick-stats > div {
  min-height: 125px;
  padding: 13px 7px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  background: #fff;
}

.quick-icon {
  width: 35px;
  height: 35px;
  margin-bottom: 3px;
  border-radius: 11px;
  display: grid;
  place-items: center;
}

.quick-icon.violet { color: var(--violet); background: #eeeaff; }
.quick-icon.pink { color: var(--pink); background: #ffe7f0; }
.quick-icon.teal { color: var(--green); background: #e0f9f0; }

.quick-stats b {
  font-size: 22px;
}

.quick-stats small {
  max-width: 82px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
}

/* Study map */

.smart-mix {
  width: 100%;
  min-height: 90px;
  padding: 14px;
  border-radius: 22px;
  display: grid;
  grid-template-columns: 52px 1fr 45px;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 7px 0 #0e0d2b, var(--shadow);
}

.smart-orb {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: conic-gradient(var(--pink), var(--violet), var(--cyan), var(--gold));
  box-shadow: inset 0 0 0 8px var(--ink), 0 0 20px rgba(118, 87, 255, .45);
}

.smart-orb .icon {
  width: 23px;
  height: 23px;
  fill: currentColor;
  stroke: #fff;
  stroke-width: 1;
}

.smart-mix > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.smart-mix small {
  color: #9feef5;
  font: 700 8px/1 var(--utility);
  letter-spacing: .1em;
}

.smart-mix b {
  font-size: 17px;
}

.smart-mix em {
  color: #aca9c9;
  font-size: 10px;
  font-style: normal;
}

.smart-mix > i {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--gold);
  font: 400 13px/1 var(--display);
  font-style: normal;
}

.study-grid {
  margin-top: 23px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.study-subject {
  min-height: 242px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--subject) 25%, var(--line));
  border-radius: 23px;
  text-align: left;
  color: var(--ink);
  background: linear-gradient(145deg, var(--pale), #fff 62%);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--subject) 22%, #dcd9eb), var(--shadow-tight);
}

.study-subject:nth-child(5) {
  grid-column: 1 / -1;
  min-height: 205px;
}

.study-subject-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
}

.study-subject-top > span {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--subject);
  transform: rotate(-4deg);
}

.study-subject-top > span .icon {
  width: 29px;
  height: 29px;
}

.study-subject h2 {
  margin: 14px 0 4px;
  font-size: 18px;
  line-height: 1;
}

.study-subject > p {
  min-height: 31px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.topic-dots {
  margin: 8px 0 12px;
  display: flex;
  gap: 4px;
}

.topic-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dcd9e9;
}

.topic-dots i.lit {
  background: var(--subject);
  box-shadow: 0 0 7px color-mix(in srgb, var(--subject) 60%, transparent);
}

.study-subject > small {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.study-subject > small b {
  color: var(--subject);
}

/* Subject and topic screens */

.subject-hero {
  min-height: 145px;
  padding: 19px;
  border: 2px solid color-mix(in srgb, var(--subject) 30%, var(--line));
  border-radius: 25px;
  display: grid;
  grid-template-columns: 60px 1fr 94px;
  align-items: center;
  gap: 13px;
  background: linear-gradient(120deg, var(--pale), #fff 72%);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--subject) 25%, #ddd9e9), var(--shadow);
}

.subject-hero-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--subject);
  transform: rotate(-5deg);
}

.subject-hero-icon .icon {
  width: 34px;
  height: 34px;
}

.subject-hero h1 {
  margin: 9px 0 4px;
  font: 400 clamp(24px, 6.8vw, 36px)/1 var(--display);
  letter-spacing: -.04em;
}

.subject-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.subject-hero .mastery-ring-core,
.study-subject .mastery-ring-core {
  background: #fff;
  color: var(--ink);
}

.subject-hero .mastery-ring-track::after,
.study-subject .mastery-ring-track::after {
  background: #fff;
}

.subject-hero .mastery-ring-core em,
.study-subject .mastery-ring-core em {
  color: var(--muted);
}

.subject-hero .mastery-ring-track,
.study-subject .mastery-ring-track {
  background: conic-gradient(var(--subject) var(--progress), #e3e0ed 0);
  box-shadow: none;
}

.subject-actions {
  margin: 21px 0 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.topic-list {
  display: grid;
  gap: 10px;
}

.topic-row {
  min-height: 105px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  grid-template-columns: 45px 1fr 45px;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 0 #dfddec;
  animation: topic-in .35s var(--delay) both;
}

@keyframes topic-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.topic-node {
  width: 43px;
  height: 43px;
  border: 2px solid color-mix(in srgb, var(--subject) 40%, #ddd);
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--subject);
  background: color-mix(in srgb, var(--subject) 9%, #fff);
}

.topic-node.active {
  color: #fff;
  background: var(--subject);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--subject) 12%, transparent);
}

.topic-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.topic-copy small {
  color: var(--subject);
  font: 700 8px/1 var(--utility);
  letter-spacing: .08em;
}

.topic-copy b {
  font-size: 15px;
}

.topic-copy em {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-copy i,
.mastery-row i,
.vault-chest i,
.mastery-meter i {
  height: 5px;
  margin-top: 4px;
  border-radius: 9px;
  display: block;
  overflow: hidden;
  background: #e5e2ed;
}

.topic-copy u,
.mastery-row u,
.vault-chest u,
.mastery-meter u {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--subject);
  text-decoration: none;
}

.topic-score {
  text-align: right;
}

.topic-score b {
  display: block;
  color: var(--subject);
  font-size: 14px;
}

.topic-score small {
  color: var(--muted);
  font-size: 8px;
}

.source-foot {
  width: 100%;
  margin-top: 17px;
  padding: 13px;
  border: 1px solid #bde9dc;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  color: #176b55;
  background: #e7f9f3;
  font-size: 10px;
}

.source-foot span {
  margin-left: auto;
  white-space: nowrap;
  font-weight: 900;
}

.topic-hero {
  padding: 25px 20px 22px;
  border: 2px solid color-mix(in srgb, var(--subject) 32%, var(--line));
  border-radius: 27px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pale), #fff 67%);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--subject) 25%, #dedbea), var(--shadow);
}

.topic-hero::after {
  content: "";
  width: 170px;
  height: 170px;
  border: 24px solid color-mix(in srgb, var(--subject) 8%, transparent);
  border-radius: 50%;
  position: absolute;
  top: -60px;
  right: -55px;
}

.topic-glyph {
  width: 57px;
  height: 57px;
  margin-bottom: 18px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  color: #fff;
  background: var(--subject);
  transform: rotate(-4deg);
}

.topic-glyph .icon {
  width: 33px;
  height: 33px;
}

.spec-ticket {
  color: var(--subject);
  font: 700 9px/1 var(--utility);
  letter-spacing: .09em;
}

.topic-hero h1 {
  margin: 8px 0 7px;
  font: 400 clamp(29px, 8vw, 43px)/1 var(--display);
  letter-spacing: -.045em;
}

.topic-hero > p {
  max-width: 490px;
  margin: 0 0 19px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.mastery-meter span {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.mastery-meter span b {
  color: var(--subject);
}

.mastery-meter i {
  height: 8px;
}

.cheat-card {
  margin: 24px 5px 0;
  padding: 22px 18px 17px;
  border: 2px dashed color-mix(in srgb, var(--subject) 50%, var(--line));
  border-radius: 20px;
  position: relative;
  background: #fff;
  transform: rotate(-.5deg);
}

.cheat-card-tab {
  width: fit-content;
  margin: -36px auto 13px;
  padding: 7px 11px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  background: var(--subject);
  font: 700 9px/1 var(--utility);
  letter-spacing: .08em;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--subject) 65%, #333);
}

.cheat-card p {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.cheat-card > button {
  margin-top: 13px;
  padding: 7px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #17735b;
  background: transparent;
  font-size: 9px;
  font-weight: 900;
}

.topic-launch {
  margin-top: 23px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-tight);
}

.topic-launch h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.topic-launch > div > p:last-child {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 12px;
}

.topic-history {
  margin-top: 13px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  background: #fff;
}

.topic-history > span {
  width: 37px;
  height: 37px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--subject);
  background: var(--pale);
}

.topic-history div {
  display: flex;
  flex-direction: column;
}

.topic-history b {
  font-size: 12px;
}

.topic-history small {
  color: var(--muted);
  font-size: 9px;
}

.topic-history strong {
  color: var(--subject);
}

/* Quiz */

.quiz-app {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ink);
}

.quiz-shell {
  width: min(100%, 690px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) clamp(15px, 4vw, 25px) calc(25px + env(safe-area-inset-bottom));
  color: #fff;
  background:
    radial-gradient(circle at 100% 5%, color-mix(in srgb, var(--subject) 25%, transparent), transparent 28%),
    var(--ink);
}

.quiz-header {
  height: 45px;
  display: grid;
  grid-template-columns: 40px 1fr 55px;
  align-items: center;
  gap: 12px;
}

.quiz-header > button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #aaa7c7;
  background: rgba(255, 255, 255, .08);
}

.quiz-header > div:nth-child(2) {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-header > div:nth-child(2) > span {
  height: 8px;
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
}

.quiz-header > div:nth-child(2) i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--subject), var(--gold));
  box-shadow: 0 0 10px color-mix(in srgb, var(--subject) 65%, transparent);
  transition: width .25s ease;
}

.quiz-header small {
  color: #aaa7c7;
  font: 700 9px/1 var(--utility);
  white-space: nowrap;
}

.combo-pill {
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #aaa7c7;
  background: rgba(255, 255, 255, .06);
}

.combo-pill.hot {
  color: var(--gold);
  border-color: rgba(255, 207, 74, .5);
  box-shadow: 0 0 18px rgba(255, 207, 74, .18);
  animation: combo-beat .7s infinite alternate;
}

@keyframes combo-beat {
  to { transform: scale(1.06); }
}

.combo-pill .icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.combo-pill b {
  font-size: 12px;
}

.question-meta {
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a9a6c6;
  font: 700 8px/1 var(--utility);
  letter-spacing: .05em;
}

.question-subject {
  padding: 7px 9px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  background: color-mix(in srgb, var(--subject) 85%, #222);
}

.question-subject .icon {
  width: 13px;
  height: 13px;
}

.difficulty {
  margin-left: auto;
  color: var(--gold);
  letter-spacing: .12em;
}

.question-card {
  padding: clamp(19px, 5vw, 28px);
  border-radius: 25px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--subject) 48%, #3d3865), 0 22px 50px rgba(0, 0, 0, .25);
}

.question-card .eyebrow {
  color: var(--subject);
}

.question-card h1 {
  margin: 10px 0 clamp(21px, 5vw, 31px);
  font-size: clamp(21px, 5.5vw, 29px);
  line-height: 1.22;
  letter-spacing: -.025em;
}

.answers {
  display: grid;
  gap: 10px;
}

.answer {
  min-height: 61px;
  padding: 10px 12px;
  border: 2px solid #e1dfed;
  border-radius: 17px;
  display: grid;
  grid-template-columns: 36px 1fr 25px;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--ink);
  background: #faf9ff;
  box-shadow: 0 4px 0 #dedbea;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.answer:not(:disabled):active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #dedbea;
}

.answer > span {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--subject);
  background: var(--pale);
  font: 700 12px/1 var(--utility);
}

.answer b {
  font-size: 13px;
  line-height: 1.25;
}

.answer > i {
  display: grid;
  place-items: center;
}

.answer.correct {
  border-color: var(--teal);
  background: #e6fbf3;
  box-shadow: 0 4px 0 #82dabc;
}

.answer.correct > span,
.answer.correct > i {
  color: #fff;
  background: var(--teal);
}

.answer.correct > i {
  width: 25px;
  height: 25px;
  border-radius: 8px;
}

.answer.wrong {
  border-color: var(--red);
  background: #ffe8ee;
  box-shadow: 0 4px 0 #e5a1b3;
}

.answer.wrong > span,
.answer.wrong > i {
  color: #fff;
  background: var(--red);
}

.answer.wrong > i {
  width: 25px;
  height: 25px;
  border-radius: 8px;
}

.quiz-nudge {
  padding: 22px 8px 5px;
  color: #9692b6;
  text-align: center;
  font-size: 11px;
}

.answer-reveal {
  margin-top: 19px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 22px;
  background: rgba(255, 255, 255, .07);
  animation: reveal-up .3s ease both;
}

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(15px); }
}

.result-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.result-title > span {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
}

.is-correct .result-title > span { background: var(--teal); }
.is-wrong .result-title > span { background: var(--red); }

.result-title > span .icon {
  width: 25px;
  height: 25px;
}

.is-correct .result-title > span .icon {
  fill: currentColor;
}

.result-title small {
  color: var(--gold);
  font: 700 8px/1 var(--utility);
  letter-spacing: .09em;
}

.result-title h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.answer-reveal > p {
  margin: 14px 0;
  color: #d5d2e8;
  font-size: 13px;
  line-height: 1.45;
}

.spec-proof {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(159, 238, 245, .23);
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  color: #9feef5;
  background: rgba(19, 188, 210, .08);
  font-size: 9px;
}

.spec-proof span {
  margin-left: auto;
  font-weight: 900;
  white-space: nowrap;
}

.next-question {
  width: 100%;
  margin-top: 15px;
}

/* Results */

.result-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  color: #fff;
  background: var(--ink);
}

.result-screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(35px + env(safe-area-inset-top)) 20px calc(30px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(118, 87, 255, .52), transparent 28%),
    radial-gradient(circle at 12% 68%, rgba(255, 79, 143, .16), transparent 24%);
}

.result-rays {
  width: 430px;
  height: 430px;
  position: absolute;
  top: 15px;
  border-radius: 50%;
  opacity: .16;
  background: repeating-conic-gradient(from 0deg, #fff 0deg 6deg, transparent 6deg 18deg);
  mask-image: radial-gradient(circle, transparent 0 25%, #000 25% 60%, transparent 72%);
  animation: spin 35s linear infinite;
}

.result-screen > *:not(.result-rays) {
  position: relative;
  z-index: 1;
}

.result-screen .eyebrow {
  color: #9feef5;
}

.result-screen h1 {
  margin: 6px 0 20px;
  color: var(--gold);
  font: 400 clamp(35px, 11vw, 57px)/.95 var(--display);
  letter-spacing: -.06em;
  text-shadow: 0 5px 0 rgba(0, 0, 0, .2);
}

.result-screen .mastery-ring {
  width: 185px;
}

.result-copy {
  max-width: 380px;
  margin: 23px auto 16px;
  color: #d0cde5;
  font-size: 14px;
  line-height: 1.4;
}

.reward-rack {
  width: min(100%, 440px);
  margin: 5px 0 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, .06);
}

.reward-rack > div {
  min-height: 91px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.reward-rack > div + div {
  border-left: 1px solid rgba(255, 255, 255, .1);
}

.reward-icon {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font: 900 9px/1 var(--utility);
}

.reward-icon.xp { color: #fff; background: var(--violet); }
.reward-icon.coin { color: #925200; background: var(--gold); }
.reward-icon.combo { color: var(--ink); background: var(--cyan); }

.reward-icon .icon {
  width: 18px;
  height: 18px;
}

.reward-rack b {
  font-size: 19px;
}

.reward-rack small {
  color: #9693b4;
  font-size: 8px;
}

.level-up-banner,
.badge-unlock {
  width: min(100%, 440px);
  min-height: 65px;
  margin-bottom: 10px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 207, 74, .45);
  border-radius: 17px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  color: var(--gold);
  background: rgba(255, 207, 74, .1);
}

.level-up-banner > .icon,
.badge-unlock > .icon {
  width: 31px;
  height: 31px;
}

.level-up-banner span,
.badge-unlock span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.level-up-banner small,
.badge-unlock small {
  font: 700 8px/1 var(--utility);
  letter-spacing: .1em;
}

.level-up-banner b,
.badge-unlock b {
  color: #fff;
  font-size: 13px;
}

.badge-unlock em {
  margin-left: auto;
  font-size: 10px;
  font-style: normal;
}

.result-screen > .primary,
.result-screen > .secondary {
  width: min(100%, 440px);
  margin-top: 10px;
}

.chest-result {
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 6px 0 #c98c14;
}

.chest-result .icon {
  color: var(--ink);
  fill: none;
}

/* Progress */

.progress-hero {
  padding: 20px;
  border-radius: 25px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 13px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 0 #0e0d2b, var(--shadow);
}

.big-stat {
  display: flex;
  flex-direction: column;
}

.big-stat small {
  color: #9feef5;
  font: 700 8px/1 var(--utility);
  letter-spacing: .09em;
}

.big-stat b {
  margin: 8px 0 3px;
  color: var(--gold);
  font: 400 clamp(45px, 13vw, 65px)/1 var(--display);
}

.big-stat span {
  color: #aaa7c7;
  font-size: 10px;
}

.stat-stack {
  display: grid;
  gap: 6px;
}

.stat-stack div {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: rgba(255, 255, 255, .06);
}

.stat-stack b {
  font-size: 16px;
}

.stat-stack small {
  color: #9693b4;
  font-size: 8px;
}

.heatmap-card .section-heading,
.mastery-card .section-heading,
.badge-card .section-heading {
  margin-top: 0;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.heatmap > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.heatmap span {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #9b98b1;
  background: #efedf7;
  font: 700 8px/1 var(--utility);
}

.heatmap small {
  color: #aaa7bd;
  font: 700 7px/1 var(--utility);
}

.heatmap span.heat-1 { color: #5d48bd; background: #ddd6ff; }
.heatmap span.heat-2 { color: #fff; background: #9b85ff; }
.heatmap span.heat-3 { color: #fff; background: var(--violet); }
.heatmap span.heat-4 { color: var(--ink); background: var(--gold); box-shadow: 0 0 12px rgba(255, 207, 74, .4); }

.mastery-row {
  width: 100%;
  min-height: 59px;
  padding: 8px 0;
  display: grid;
  grid-template-columns: 38px 1fr 42px;
  align-items: center;
  gap: 11px;
  text-align: left;
  color: var(--ink);
  background: transparent;
}

.mastery-row + .mastery-row {
  border-top: 1px solid #eceaf5;
}

.mastery-row > span {
  width: 37px;
  height: 37px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--subject);
}

.mastery-row b {
  font-size: 13px;
}

.mastery-row i {
  height: 6px;
}

.mastery-row u {
  background: var(--subject);
}

.mastery-row strong {
  color: var(--subject);
  text-align: right;
  font-size: 14px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.badge {
  min-height: 130px;
  padding: 13px 9px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  background: #f8f7fc;
}

.badge > span {
  width: 48px;
  height: 48px;
  margin-bottom: 2px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.badge.earned > span {
  color: #8c5000;
  background: radial-gradient(circle at 35% 30%, #fff4b5, var(--gold));
  box-shadow: 0 5px 0 #d89a16, 0 9px 18px rgba(216, 154, 22, .2);
}

.badge.locked {
  filter: grayscale(1);
  opacity: .55;
}

.badge.locked > span {
  color: #9895aa;
  background: #e5e3ec;
}

.badge b {
  font-size: 12px;
}

.badge small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
}

/* Rewards */

.vault-chest {
  width: 100%;
  min-height: 140px;
  padding: 20px;
  border: 2px solid #4a467a;
  border-radius: 25px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 15px;
  position: relative;
  overflow: hidden;
  text-align: left;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 0 #0e0d2b, var(--shadow);
}

.vault-chest.ready {
  border-color: var(--gold);
}

.vault-chest > span {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  color: #874b00;
  background: var(--gold);
  transform: rotate(-4deg);
}

.vault-chest > span .icon {
  width: 45px;
  height: 45px;
  fill: #fff0a0;
}

.vault-chest > div:nth-of-type(2) {
  position: relative;
  z-index: 1;
}

.vault-chest small {
  color: #9feef5;
  font: 700 8px/1 var(--utility);
  letter-spacing: .09em;
}

.vault-chest h2 {
  margin: 7px 0 12px;
  font-size: 19px;
}

.vault-chest i {
  background: rgba(255, 255, 255, .12);
}

.vault-chest u {
  background: linear-gradient(90deg, var(--violet), var(--gold));
}

.vault-chest > b {
  position: relative;
  z-index: 1;
  color: var(--gold);
  font: 400 12px/1 var(--display);
}

.vault-rays {
  width: 250px;
  height: 250px;
  position: absolute;
  left: -70px;
  border-radius: 50%;
  opacity: .12;
  background: repeating-conic-gradient(#fff 0 7deg, transparent 7deg 17deg);
  animation: spin 30s linear infinite;
}

.coin-balance {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #efcd79;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 48px auto 1fr;
  align-items: center;
  gap: 11px;
  background: linear-gradient(100deg, #fff4c9, #fff);
}

.coin-balance > span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #925300;
  background: var(--gold);
  box-shadow: 0 4px 0 #d49a20;
}

.coin-balance > span .icon {
  width: 27px;
  height: 27px;
}

.coin-balance div {
  display: flex;
  flex-direction: column;
}

.coin-balance small {
  color: #98620c;
  font: 700 8px/1 var(--utility);
}

.coin-balance b {
  font-size: 25px;
}

.coin-balance p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.theme-card {
  min-height: 222px;
  padding: 13px;
  border: 2px solid var(--line);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 0 #dfddec;
}

.theme-card.active {
  border-color: var(--one);
  box-shadow: 0 5px 0 var(--one);
}

.theme-preview {
  width: 100%;
  height: 88px;
  margin-bottom: 12px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: var(--ink);
}

.theme-preview i {
  width: 70px;
  height: 70px;
  border: 10px solid var(--one);
  border-top-color: var(--two);
  border-right-color: var(--two);
  border-radius: 50%;
  position: absolute;
}

.theme-preview em {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  color: var(--two);
  background: #232150;
}

.theme-preview em .icon {
  fill: currentColor;
  stroke: #fff;
  stroke-width: 1;
}

.theme-card > b {
  font-size: 13px;
}

.theme-card > small {
  min-height: 28px;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
}

.theme-card > strong {
  margin-top: auto;
  padding: 7px 9px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--one);
  background: color-mix(in srgb, var(--one) 10%, #fff);
  font: 700 8px/1 var(--utility);
}

.theme-card > strong .icon {
  width: 13px;
  height: 13px;
  fill: var(--gold);
  color: #9d6200;
}

.reward-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.reward-badge {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  filter: grayscale(1);
  opacity: .45;
}

.reward-badge.got {
  filter: none;
  opacity: 1;
}

.reward-badge span {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8d5200;
  background: var(--gold);
  box-shadow: 0 4px 0 #d89c1d;
}

.reward-badge:not(.got) span {
  color: #8d8a9f;
  background: #e7e5ed;
  box-shadow: 0 4px 0 #d4d2dc;
}

.reward-badge small {
  max-width: 70px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Settings */

.setting-text,
.setting-line {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
}

.setting-text + .setting-line,
.setting-line + .setting-line {
  border-top: 1px solid #eceaf5;
}

.setting-text span,
.setting-line > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.setting-text b,
.setting-line b {
  font-size: 13px;
}

.setting-text small,
.setting-line small {
  color: var(--muted);
  font-size: 9px;
}

.setting-text input {
  width: 120px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--paper);
  text-align: right;
  font-weight: 800;
}

.segmented.small button {
  padding: 7px 8px;
  font-size: 9px;
}

.setting-line input[type="checkbox"] {
  width: 47px;
  height: 28px;
  appearance: none;
  border-radius: 999px;
  position: relative;
  background: #d9d6e6;
  transition: background .2s ease;
}

.setting-line input[type="checkbox"]::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .18);
  transition: transform .2s ease;
}

.setting-line input[type="checkbox"]:checked {
  background: var(--violet);
}

.setting-line input[type="checkbox"]:checked::after {
  transform: translateX(19px);
}

.setting-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-heading > span {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #0d8667;
  background: #dff9ef;
}

.setting-heading h2 {
  margin: 0;
  font-size: 17px;
}

.setting-heading small {
  color: var(--muted);
  font: 700 8px/1 var(--utility);
}

.accuracy-settings > p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.accuracy-settings .secondary {
  width: 100%;
}

.ad-settings .primary {
  width: 100%;
  margin-top: 4px;
}

.ad-settings .primary:disabled {
  opacity: .58;
}

.ad-links {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.ad-links button,
.ad-links a {
  padding: 0;
  border: 0;
  color: var(--violet);
  background: transparent;
  font: 900 10px/1.3 var(--body);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.data-settings {
  padding-block: 8px;
}

.data-settings > button {
  width: 100%;
  min-height: 63px;
  padding: 9px 0;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--ink);
  background: transparent;
}

.data-settings > button + button {
  border-top: 1px solid #eceaf5;
}

.data-settings > button > span {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--violet);
  background: #eeeaff;
}

.data-settings > button:nth-child(2) > span {
  color: var(--red);
  background: #ffe8ee;
}

.data-settings > button div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.data-settings b {
  font-size: 13px;
}

.data-settings small {
  color: var(--muted);
  font-size: 9px;
}

.data-settings em {
  font-size: 24px;
  font-style: normal;
}

.settings-foot {
  margin: 18px auto;
  max-width: 430px;
  color: var(--muted);
  text-align: center;
  font-size: 9px;
  line-height: 1.4;
}

.settings-foot a {
  color: var(--violet);
  font-weight: 900;
}

.settings-foot span {
  margin: 0 8px;
}

.legal-page {
  min-height: 100vh;
  margin: 0;
  padding: 32px 18px 72px;
  color: #f8f7ff;
  background:
    radial-gradient(circle at 15% 8%, rgba(122, 85, 255, 0.38), transparent 34%),
    radial-gradient(circle at 85% 24%, rgba(255, 68, 143, 0.22), transparent 30%),
    #101026;
}

.legal-wrap {
  width: min(720px, 100%);
  margin: 0 auto;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font: 400 20px/1 var(--display);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.legal-brand span {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #15132f;
  background: var(--acid);
  box-shadow: 0 0 26px rgba(212, 255, 56, 0.38);
}

.legal-card {
  margin-top: 28px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  color: #292747;
  background: #fff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
}

.legal-card .eyebrow {
  color: var(--violet);
}

.legal-card h1 {
  margin: 8px 0 12px;
  font: 400 clamp(40px, 9vw, 68px)/0.94 var(--display);
  letter-spacing: -0.03em;
}

.legal-card h2 {
  margin: 30px 0 8px;
  font-size: 20px;
}

.legal-card p,
.legal-card li {
  color: #5d5978;
  font-size: 15px;
  line-height: 1.65;
}

.legal-card ul {
  padding-left: 22px;
}

.legal-card a {
  color: var(--violet);
  font-weight: 900;
}

.legal-stamp {
  display: inline-flex;
  margin-top: 16px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #236b51;
  background: #e4fbf2;
  font: 800 11px/1 var(--utility);
  letter-spacing: 0.05em;
}

/* Modals and effects */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: end;
  opacity: 0;
  transition: opacity .2s ease;
}

.modal-layer.open {
  opacity: 1;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(13, 12, 38, .72);
  backdrop-filter: blur(5px);
}

.modal-card {
  width: min(100%, 640px);
  max-height: min(88vh, 860px);
  margin: 0 auto;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  position: relative;
  overflow-y: auto;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .3);
  transform: translateY(30px);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}

.modal-layer.open .modal-card {
  transform: translateY(0);
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-top > button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #fff;
}

.ledger-modal h2,
.confirm-modal h2,
.chest-modal h2,
.flash-modal h2 {
  margin: 22px 0 8px;
  font: 400 clamp(28px, 8vw, 42px)/1 var(--display);
  letter-spacing: -.045em;
}

.ledger-modal > p,
.confirm-modal > p,
.chest-modal > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.ledger-stats {
  margin: 18px 0 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ledger-stats div {
  min-height: 80px;
  padding: 10px 5px;
  border: 1px solid #bde9dc;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #e8faf4;
}

.ledger-stats b {
  color: #0d8667;
  font-size: 23px;
}

.ledger-stats small {
  color: #357c6a;
  font-size: 8px;
}

.ledger-modal h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.source-list {
  display: grid;
  gap: 8px;
}

.source-list a {
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}

.source-list a > span {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #0d8667;
  background: #dff9ef;
}

.source-list a div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.source-list b {
  font-size: 11px;
}

.source-list small {
  color: var(--muted);
  font-size: 8px;
}

.source-list em {
  color: var(--violet);
  font-style: normal;
}

.ledger-note {
  margin-bottom: 0;
  padding: 11px;
  border-radius: 13px;
  background: #ece9f9;
  font-size: 10px !important;
}

.confirm-modal .danger,
.confirm-modal .secondary {
  margin-top: 12px;
}

.confirm-modal .secondary {
  width: 100%;
}

.chest-layer .modal-card {
  text-align: center;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 207, 74, .32), transparent 30%),
    var(--paper);
}

.opened-chest {
  width: 145px;
  height: 130px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  position: relative;
}

.opened-chest > i {
  width: 170px;
  height: 170px;
  position: absolute;
  border-radius: 50%;
  opacity: .22;
  background: repeating-conic-gradient(var(--gold) 0 8deg, transparent 8deg 20deg);
  animation: spin 20s linear infinite;
}

.opened-chest > span {
  width: 100px;
  height: 80px;
  border-radius: 23px;
  display: grid;
  place-items: center;
  position: relative;
  color: #8d4f00;
  background: var(--gold);
  box-shadow: 0 8px 0 #c98c13;
  transform: translateY(18px);
}

.opened-chest > span .icon {
  width: 63px;
  height: 63px;
  fill: #fff0a4;
}

.opened-chest > em {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: absolute;
  z-index: 2;
  top: 3px;
  color: var(--violet);
  background: #fff;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .2);
  animation: reward-bob 1s ease-in-out infinite alternate;
}

@keyframes reward-bob {
  to { transform: translateY(-8px) rotate(6deg); }
}

.opened-chest > em .icon {
  width: 31px;
  height: 31px;
}

.chest-modal > b {
  color: var(--violet);
  font: 400 20px/1 var(--display);
}

.chest-modal .primary {
  margin-top: 18px;
}

.flash-modal {
  --subject: var(--violet);
  --pale: #eeeaff;
  text-align: center;
}

.flash-icon {
  width: 76px;
  height: 76px;
  margin: 28px auto 15px;
  border-radius: 23px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--subject);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--subject) 65%, #555);
  transform: rotate(-4deg);
}

.flash-icon .icon {
  width: 43px;
  height: 43px;
}

.flash-modal > small {
  color: var(--subject);
  font: 700 9px/1 var(--utility);
  letter-spacing: .08em;
}

.flash-modal > p {
  min-height: 92px;
  margin: 12px 0 25px;
  padding: 20px;
  border: 2px dashed color-mix(in srgb, var(--subject) 45%, var(--line));
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.flash-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#toast {
  max-width: calc(100% - 30px);
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom) + var(--ad-pad));
  color: #fff;
  background: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  font: 700 10px/1 var(--utility);
  letter-spacing: .04em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: opacity .2s ease, transform .2s ease;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#fx {
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none;
  overflow: hidden;
}

.confetti {
  width: 9px;
  height: 15px;
  border-radius: 3px;
  position: absolute;
  left: var(--x);
  top: var(--y);
  background: var(--c);
  animation: confetti-fly var(--d) cubic-bezier(.15, .7, .35, 1) both;
}

@keyframes confetti-fly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.4) rotate(0deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), var(--ty)) scale(1) rotate(var(--r)); }
}

.aura-flex {
  position: absolute;
  top: 35%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--gold);
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .4));
  animation: aura-pop 1.1s cubic-bezier(.15, .8, .2, 1) both;
}

.aura-flex .icon {
  width: 100px;
  height: 100px;
  fill: currentColor;
  stroke: #fff;
  stroke-width: .8;
}

.aura-flex b {
  margin-top: -8px;
  font: 400 24px/1 var(--display);
}

@keyframes aura-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.1) rotate(-25deg); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1.2) rotate(5deg); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(.9); }
}

/* Earned themes */

.theme-lava {
  --violet: #ff5a36;
  --violet-dark: #cf3423;
  --pink: #ff7c39;
  --cyan: #ffc247;
  --gold: #ffe36b;
}

.theme-frost {
  --violet: #3c78ff;
  --violet-dark: #2254c3;
  --pink: #5c7cff;
  --cyan: #13cfe5;
  --gold: #a8f3ff;
}

.theme-mint {
  --violet: #16a77e;
  --violet-dark: #08785b;
  --pink: #59cf79;
  --cyan: #b5e942;
  --gold: #ecff79;
}

.theme-cosmic {
  --violet: #a85cff;
  --violet-dark: #7134c1;
  --pink: #ff5fa2;
  --cyan: #6fe5ff;
  --gold: #ffe17a;
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: .001ms !important;
}

@media (min-width: 700px) {
  body {
    background: var(--ink);
  }

  .app-shell {
    border-inline: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 0 80px rgba(0, 0, 0, .28);
  }

  .daily-hero {
    min-height: 320px;
    grid-template-columns: 1.3fr .7fr;
  }

  .study-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .study-subject:nth-child(5) {
    grid-column: auto;
    min-height: 242px;
  }

  .badge-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .theme-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .theme-card {
    min-height: 235px;
  }
}

@media (max-width: 430px) {
  .daily-hero {
    min-height: 405px;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-right: 115px;
  }

  .hero-copy h2 {
    font-size: 26px;
  }

  .hero-copy p {
    font-size: 11px;
  }

  .hero-mastery {
    position: absolute;
    z-index: 1;
    top: 65px;
    right: 4px;
    transform: scale(.72);
  }

  .hero-stats {
    margin-top: auto;
  }

  .subject-hero {
    grid-template-columns: 53px 1fr;
  }

  .subject-hero .mastery-ring {
    display: none;
  }

  .subject-hero-icon {
    width: 52px;
    height: 52px;
  }

  .subject-actions {
    grid-template-columns: 1fr;
  }

  .setting-line:has(.segmented) {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .screen {
    --screen-pad: 13px;
    padding-inline: 13px;
  }

  .topbar {
    padding-inline: 13px;
  }

  .brand-button > span:last-child {
    display: none;
  }

  .back-button > span:last-child {
    display: inline;
  }

  .daily-hero {
    padding: 17px;
  }

  .hero-copy {
    padding-right: 100px;
  }

  .hero-mastery {
    right: -13px;
    transform: scale(.64);
  }

  .study-grid {
    grid-template-columns: 1fr;
  }

  .study-subject:nth-child(5) {
    grid-column: auto;
  }

  .preview-stats span {
    font-size: 7px;
  }

  .minute-pick {
    min-height: 112px;
  }

  .minute-pick small {
    font-size: 8px;
  }

  .tier-row {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
