:root {
  color-scheme: dark;
  --bg: #120f1b;
  --fg: #f6f2ff;
  --muted: #aaa2b8;
  --card: #1d1829;
  --card-2: #211a31;
  --line: rgba(255, 255, 255, 0.12);
  --primary: #b763ff;
  --primary-2: #7c5cff;
  --danger: #ff5f86;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(183, 99, 255, 0.24), transparent 42rem),
    var(--bg);
  color: var(--fg);
  position: relative;
}

body.modal-open {
  position: fixed;
  inset: 0;
  top: calc(var(--scroll-lock-y, 0px) * -1);
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body.mobile-menu-open {
  position: fixed;
  inset: 0;
  top: calc(var(--mobile-menu-scroll-y, 0px) * -1);
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.glow {
  position: fixed;
  inset: 0 0 auto;
  height: 34rem;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(124, 92, 255, 0.2), transparent 65%);
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  min-height: 6rem;
  margin: 0;
  padding: 1.35rem 2rem;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.14), transparent 28rem),
    linear-gradient(180deg, rgba(16, 13, 26, 0.72), rgba(16, 13, 26, 0.46));
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.menu-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0.62rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--fg);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.menu-toggle span + span {
  margin-top: 0.38rem;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(0.5rem) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-0.5rem) rotate(-45deg);
}

.mobile-login-door {
  display: none;
}

.mobile-account-menu {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
  color: var(--fg);
  text-decoration: none;
}

.logo-avatar {
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
}

.brand-wordmark {
  width: auto;
  height: 2.1rem;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
}

.brand-name {
  color: var(--fg);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.brand-name span {
  color: #5ea0ff;
}

.brand-link,
.nav-links a {
  color: inherit;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.nav-links a:hover {
  color: var(--fg);
}

.app-nav {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
}

.app-nav:hover {
  background: rgba(183, 99, 255, 0.1);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
}

.user-chip span {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.user-chip small {
  color: var(--muted);
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 750;
}

.text-button:hover {
  color: var(--fg);
}

.small-primary {
  padding: 0.7rem 0.95rem;
  font-size: 0.9rem;
}

.logo {
  width: auto;
  height: 3rem;
  display: block;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  box-shadow: none;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0;
}

.intro {
  text-align: center;
  margin-bottom: 2rem;
}

.pill {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(183, 99, 255, 0.35);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(183, 99, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 700;
}

h1 {
  margin: 1.2rem auto 1rem;
  max-width: 720px;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

h1 span {
  color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  background-clip: text;
}

.intro p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.dashboard-intro {
  margin-bottom: 1rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.usage-message {
  margin-top: 1rem !important;
  color: #d9cdeb !important;
  font-size: 0.95rem !important;
}

.usage-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: min(680px, 100%);
  margin: 1.2rem auto 0;
}

.usage-card article {
  border: 1px solid rgba(102, 184, 255, 0.22);
  border-radius: 8px;
  padding: 0.9rem;
  background: rgba(102, 184, 255, 0.07);
  text-align: left;
}

.usage-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.usage-card strong,
.usage-card a {
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 950;
  text-decoration: none;
}

.paywall {
  margin-bottom: 1rem;
  padding: 1.15rem 1.15rem 1.05rem;
  border: 1px solid rgba(183, 99, 255, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(183, 99, 255, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(48, 33, 72, 0.96), rgba(20, 16, 31, 0.98));
  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(183, 99, 255, 0.08) inset;
}

.paywall h3 {
  margin: 0.3rem 0 0.45rem;
  font-size: clamp(1.3rem, 2.3vw, 1.65rem);
  line-height: 1.15;
}

.paywall p {
  color: var(--muted);
  line-height: 1.6;
}

.paywall-kicker {
  color: #d9c1ff;
}

.paywall-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.paywall-points span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(183, 99, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #efe8fb;
  font-size: 0.82rem;
  font-weight: 700;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 50% 100%, rgba(124, 92, 255, 0.22), transparent 26rem),
    rgba(5, 6, 15, 0.72);
  backdrop-filter: blur(16px);
}

.onboarding-card {
  width: min(520px, 100%);
  display: grid;
  gap: 1rem;
  border: 1px solid rgba(183, 99, 255, 0.2);
  border-radius: 24px;
  padding: 1.25rem;
  background:
    radial-gradient(circle at top right, rgba(183, 99, 255, 0.18), transparent 16rem),
    linear-gradient(145deg, rgba(27, 23, 45, 0.98), rgba(12, 12, 25, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.onboarding-card h2 {
  margin: 0;
  font-size: clamp(1.7rem, 6vw, 2.25rem);
  line-height: 1.05;
}

.onboarding-card p {
  margin: 0;
  color: rgba(232, 225, 255, 0.72);
  line-height: 1.5;
}

.onboarding-steps {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.onboarding-steps li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.onboarding-steps li > span {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(183, 99, 255, 0.3), rgba(44, 140, 255, 0.14));
  color: #c994ff;
}

.onboarding-steps svg {
  width: 1.35rem;
  height: 1.35rem;
}

.onboarding-steps strong,
.onboarding-steps small {
  display: block;
}

.onboarding-steps small {
  margin-top: 0.15rem;
  color: rgba(232, 225, 255, 0.62);
}

.onboarding-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.paywall-actions,
.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.empty-state-steps {
  margin: 0.95rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  display: grid;
  gap: 0.42rem;
}

.empty-state-steps li {
  line-height: 1.5;
}

.checkout-state-shell {
  max-width: 640px;
  text-align: left;
}

.checkout-state-shell .section-head {
  margin-bottom: 0.8rem;
}

.checkout-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.checkout-state-actions a {
  min-width: 210px;
  justify-content: center;
}

.controls {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(183, 99, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(183, 99, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.controls-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.15rem;
}

.controls-head span {
  color: var(--fg);
  font-weight: 900;
}

.controls-head p {
  max-width: 31rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.controls-close {
  flex: 0 0 auto;
}

.controls-file {
  grid-column: 1 / -1;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(183, 99, 255, 0.24);
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.08);
  color: #ddd6eb;
  font-size: 0.9rem;
  font-weight: 750;
}

.controls label,
.option-card {
  display: grid;
  gap: 0.45rem;
}

.option-card {
  min-height: 100%;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(12, 10, 18, 0.34);
}

.controls-actions {
  grid-column: 1 / -1;
}

.controls-actions button {
  width: 100%;
}

.uploader.config-stage {
  max-width: 980px;
  margin: 0 auto;
}

body.upload-config-screen-open #intro,
body.upload-config-screen-open .homepage-extra,
body.upload-config-screen-open #status:not(.hidden),
body.upload-config-screen-open #actions:not(.hidden),
body.upload-config-screen-open #notice:not(.hidden),
body.upload-config-screen-open #results:not(.hidden) {
  display: none !important;
}

body.upload-config-screen-open #uploader {
  max-width: 980px;
  margin: 0 auto;
}

body.upload-config-screen-open .shell {
  gap: 1.1rem;
}

.uploader.config-stage #dropZone,
.uploader.config-stage #paywallPanel {
  display: none;
}

.controls.controls-screen-open {
  display: grid;
  gap: 1rem;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 1.3rem;
  border: 1px solid rgba(183, 99, 255, 0.28);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(183, 99, 255, 0.18), transparent 26%),
    radial-gradient(circle at bottom left, rgba(102, 184, 255, 0.08), transparent 24%),
    linear-gradient(
      180deg,
      rgba(32, 24, 48, 0.98),
      rgba(21, 16, 34, 0.985) 42%,
      rgba(13, 10, 22, 0.99)
    );
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(183, 99, 255, 0.15) inset;
  color: #f6f2ff;
}

.controls.controls-screen-open .controls-head {
  align-items: flex-start;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(183, 99, 255, 0.12);
}

.controls.controls-screen-open .controls-head span {
  font-size: 1.45rem;
  color: #f6f2ff;
}

.controls.controls-screen-open .controls-head p {
  max-width: 38rem;
  color: rgba(232, 223, 248, 0.76);
  font-size: 0.94rem;
}

.controls.controls-screen-open .controls-file {
  padding: 1rem 1.05rem;
  border-color: rgba(183, 99, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(183, 99, 255, 0.16), rgba(102, 184, 255, 0.05)),
    rgba(20, 16, 31, 0.88);
  color: #f3edff;
}

.controls.controls-screen-open .option-card {
  gap: 0.55rem;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(58, 45, 85, 0.96), rgba(30, 23, 47, 0.98)),
    rgba(16, 12, 26, 0.92);
  border-color: rgba(183, 99, 255, 0.14);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.controls.controls-screen-open .option-title {
  color: #f6f2ff;
}

.controls.controls-screen-open .option-copy {
  color: rgba(223, 213, 242, 0.78);
}

.controls.controls-screen-open .option-card:focus-within {
  border-color: rgba(183, 99, 255, 0.58);
  box-shadow:
    0 0 0 1px rgba(183, 99, 255, 0.22) inset,
    0 0 0 3px rgba(183, 99, 255, 0.12),
    0 14px 30px rgba(40, 23, 72, 0.28);
}

.controls.controls-screen-open select {
  min-height: 3.2rem;
  border-color: rgba(183, 99, 255, 0.18);
  background: rgba(15, 12, 24, 0.96);
  color: #fcf9ff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.controls.controls-screen-open .controls-actions {
  padding-top: 0.4rem;
}

.controls.controls-screen-open #mobileControlsSubmit {
  min-height: 3.5rem;
  background: linear-gradient(135deg, #b363ff, #7c5cff);
  box-shadow: 0 18px 40px rgba(124, 92, 255, 0.28);
}

.controls-note-card {
  border-style: dashed;
}

.controls-note-card .option-title {
  color: #dcbfff;
}

.controls-note-card .option-copy {
  color: rgba(223, 213, 242, 0.72);
}

.controls.controls-modal-open {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 120;
  display: grid;
  gap: 1rem;
  width: min(680px, calc(100% - 2rem));
  max-height: min(78vh, 42rem);
  overflow-y: auto;
  margin: 0;
  padding: 1.25rem;
  border: 1px solid rgba(193, 132, 255, 0.32);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(194, 149, 255, 0.22), transparent 24%),
    linear-gradient(180deg, rgba(56, 43, 84, 0.98), rgba(31, 24, 46, 0.98));
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transform: translate(-50%, -50%);
  color: var(--fg);
  isolation: isolate;
  opacity: 1;
  filter: none;
  pointer-events: auto;
  touch-action: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.controls.controls-modal-open,
.controls.controls-modal-open * {
  pointer-events: auto;
}

body.mobile-config-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(7, 5, 12, 0.82);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.controls.controls-modal-open .controls-head {
  align-items: flex-start;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.controls.controls-modal-open .controls-file {
  padding: 0.95rem 1rem;
  border-color: rgba(193, 132, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(193, 132, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
  color: #f2ebff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.controls.controls-modal-open .option-card {
  gap: 0.55rem;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(76, 60, 111, 0.98), rgba(42, 33, 63, 0.98)),
    rgba(255, 255, 255, 0.1);
  border-color: rgba(222, 204, 255, 0.14);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.controls.controls-modal-open .option-card:focus-within {
  border-color: rgba(183, 99, 255, 0.62);
  box-shadow:
    0 0 0 1px rgba(183, 99, 255, 0.22) inset,
    0 0 0 3px rgba(183, 99, 255, 0.14),
    0 18px 34px rgba(64, 33, 109, 0.22);
}

.controls.controls-modal-open select {
  min-height: 3.2rem;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(24, 19, 36, 0.96);
  color: #fcf9ff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.controls.controls-modal-open #mobileControlsSubmit {
  min-height: 3.45rem;
  background: linear-gradient(135deg, #b363ff, #7c5cff);
  box-shadow: 0 18px 40px rgba(124, 92, 255, 0.34);
}

.quiz-mode-card {
  align-items: stretch;
}

.option-title {
  color: #f4eeff;
  font-size: 0.94rem;
  font-weight: 900;
}

.option-copy {
  color: rgba(240, 233, 250, 0.86);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

.controls.controls-modal-open .controls-head span {
  font-size: 1.4rem;
}

.controls.controls-modal-open .controls-head p {
  max-width: 34rem;
  color: rgba(232, 224, 246, 0.82);
  font-size: 0.92rem;
}

.controls.controls-modal-open .controls-close {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.controls.controls-modal-open .controls-actions {
  padding-top: 0.3rem;
}

select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  background: rgba(18, 15, 27, 0.72);
  color: var(--fg);
  font: inherit;
}

.legal {
  display: grid;
  gap: 1rem;
  max-width: 820px;
}

.legal h1 {
  margin: 0 0 0.5rem;
  max-width: none;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}

.legal .panel p {
  color: var(--muted);
  line-height: 1.7;
}

.legal .panel ul {
  padding-left: 1.2rem;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  min-height: 290px;
  padding: 2.4rem 2rem;
  border: 1px dashed rgba(183, 99, 255, 0.55);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(28, 22, 43, 0.98), rgba(19, 15, 29, 0.98));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(183, 99, 255, 0.06) inset;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.drop-zone:hover,
.drop-zone.drag {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow:
    0 28px 88px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(183, 99, 255, 0.12) inset;
}

.upload-icon {
  width: 5.7rem;
  height: 5.7rem;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: var(--primary);
  background: linear-gradient(180deg, rgba(110, 67, 214, 0.34), rgba(59, 39, 112, 0.48));
  border: 1px solid rgba(183, 99, 255, 0.24);
  box-shadow: 0 16px 40px rgba(92, 51, 178, 0.24);
  font-size: 2.6rem;
}

.drop-zone strong {
  font-size: 1.65rem;
  line-height: 1.15;
}

.drop-zone span,
.drop-zone small,
#fileName {
  color: var(--muted);
}

.drop-zone span {
  font-size: 1rem;
}

.drop-zone small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  padding: 0.46rem 0.85rem;
  border-radius: 999px;
  background: rgba(183, 99, 255, 0.1);
  color: #cbbaf2;
}

.status {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  width: min(27rem, calc(100% - 2rem));
  margin-top: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
  animation: softAppear 0.22s ease both;
}

.notice {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(183, 99, 255, 0.35);
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.1);
  color: #dfd4ee;
  line-height: 1.55;
}

.results-upgrade-hint {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.95rem;
  align-items: center;
  margin-top: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(183, 99, 255, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(31, 25, 45, 0.96), rgba(20, 16, 29, 0.98)),
    rgba(255, 255, 255, 0.03);
  color: #e7dff5;
}

.results-upgrade-hint.hidden {
  display: none;
}

.results-upgrade-hint-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(183, 99, 255, 0.24);
  background: rgba(183, 99, 255, 0.12);
  color: #d7c5ff;
  font-size: 0.92rem;
  font-weight: 800;
}

.results-upgrade-hint-copy {
  min-width: 0;
}

.results-upgrade-hint-copy strong {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.98rem;
  color: #f5efff;
}

.results-upgrade-hint-copy p {
  margin: 0;
  color: rgba(223, 213, 238, 0.78);
  font-size: 0.9rem;
  line-height: 1.45;
}

.results-upgrade-hint .secondary-button {
  white-space: nowrap;
}

.status.error {
  border-color: rgba(255, 95, 134, 0.5);
  color: var(--danger);
  background: rgba(255, 95, 134, 0.1);
}

.status.success {
  border-color: rgba(98, 240, 164, 0.4);
  color: #dfffea;
  background: rgba(98, 240, 164, 0.1);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.loading-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 6, 14, 0.72);
  backdrop-filter: blur(16px);
  animation: softAppear 0.28s ease both;
}

.loading-panel-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  width: min(760px, 100%);
  padding: 1.35rem;
  border: 1px solid rgba(183, 99, 255, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(183, 99, 255, 0.12), rgba(29, 24, 41, 0.92)),
    rgba(183, 99, 255, 0.08);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.loader-ring {
  width: 3rem;
  height: 3rem;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.loading-panel strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
}

.loading-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.loading-progress {
  grid-column: 1 / -1;
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.loading-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width 0.45s ease;
}

.loading-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.loading-steps li {
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.86rem;
}

.loading-steps li.active {
  border-color: var(--primary);
  color: var(--fg);
  background: rgba(183, 99, 255, 0.14);
  transform: translateY(-1px);
}

.loading-steps li.done {
  color: #62f0a4;
}

.study-set-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.set-inline-action {
  min-height: 2.4rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.86rem;
  white-space: nowrap;
}

.danger-outline {
  border-color: rgba(255, 95, 134, 0.36);
  color: #ffb8c8;
  background: rgba(255, 95, 134, 0.08);
}

.danger-outline:hover {
  border-color: rgba(255, 95, 134, 0.62);
  background: rgba(255, 95, 134, 0.12);
}

.study-set-picker-card {
  width: min(620px, 100%);
}

.study-set-picker-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.study-set-picker-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  padding: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--fg);
  text-align: left;
}

.study-set-picker-item strong,
.focused-study-set strong {
  display: block;
  margin-bottom: 0.2rem;
}

.study-set-picker-item small,
.focused-study-set p {
  color: var(--muted);
}

.study-set-picker-item-primary {
  border-color: rgba(183, 99, 255, 0.35);
  background:
    linear-gradient(180deg, rgba(183, 99, 255, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
}

.focused-study-set {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

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

@keyframes softAppear {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.feature-showcase {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
}

.feature-summary {
  background:
    radial-gradient(circle at 88% 18%, rgba(170, 98, 255, 0.16), transparent 22%),
    linear-gradient(180deg, rgba(36, 29, 55, 0.98), rgba(21, 17, 31, 0.98));
}

.feature-flashcards {
  background:
    radial-gradient(circle at 82% 22%, rgba(68, 255, 169, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(18, 29, 41, 0.98), rgba(14, 20, 30, 0.98));
}

.feature-quiz {
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 108, 194, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(42, 24, 45, 0.98), rgba(28, 16, 31, 0.98));
}

.feature-copy {
  max-width: 18rem;
}

.feature-copy h3 {
  margin: 0;
  font-size: 1.1rem;
}

.feature-copy p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.feature-cta {
  position: relative;
  z-index: 1;
  justify-self: start;
  align-self: end;
  padding: 0.82rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.feature-cta.summary {
  background: rgba(132, 88, 234, 0.16);
  border-color: rgba(159, 116, 255, 0.26);
  color: #c99eff;
}

.feature-cta.flashcards {
  background: rgba(28, 95, 73, 0.24);
  border-color: rgba(56, 243, 163, 0.2);
  color: #47f3ad;
}

.feature-cta.quiz {
  background: rgba(110, 33, 82, 0.24);
  border-color: rgba(255, 114, 197, 0.2);
  color: #ff79c9;
}

.feature-art {
  position: absolute;
  inset: auto 0 0 auto;
  pointer-events: none;
}

.summary-art {
  width: 9.5rem;
  height: 7rem;
  right: -0.35rem;
  bottom: -0.2rem;
}

.summary-art span {
  position: absolute;
  right: 0;
  bottom: 0;
  border: 2px solid rgba(159, 116, 255, 0.75);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 28px 0 0;
}

.summary-art span:nth-child(1) {
  width: 4rem;
  height: 2.7rem;
}

.summary-art span:nth-child(2) {
  width: 6.2rem;
  height: 3.9rem;
  right: 1.1rem;
  opacity: 0.72;
}

.summary-art span:nth-child(3) {
  width: 8.4rem;
  height: 5.2rem;
  right: 2.2rem;
  opacity: 0.46;
}

.flashcards-art {
  width: 8.4rem;
  height: 7rem;
  right: 1rem;
  bottom: 1rem;
}

.flashcards-art span {
  position: absolute;
  width: 4.4rem;
  height: 5.5rem;
  border: 2px solid rgba(56, 243, 163, 0.56);
  border-radius: 14px;
  background: rgba(10, 56, 42, 0.28);
}

.flashcards-art span:nth-child(1) {
  right: 0;
  bottom: 0.2rem;
  transform: rotate(8deg);
}

.flashcards-art span:nth-child(2) {
  right: 1.2rem;
  bottom: 0.8rem;
  transform: rotate(4deg);
  opacity: 0.82;
}

.flashcards-art span:nth-child(3) {
  right: 2.35rem;
  bottom: 1.2rem;
  transform: rotate(0deg);
  opacity: 0.66;
}

.quiz-art {
  width: 7.5rem;
  height: 7rem;
  right: 1.1rem;
  bottom: 0.9rem;
}

.quiz-art span:nth-child(1) {
  position: absolute;
  inset: 0.5rem 0 0 1rem;
  border: 2px solid rgba(255, 114, 197, 0.66);
  border-radius: 14px;
  background: rgba(123, 25, 82, 0.2);
  transform: rotate(9deg);
}

.quiz-art span:nth-child(2),
.quiz-art span:nth-child(3) {
  position: absolute;
  left: 2rem;
  right: 1.3rem;
  height: 2px;
  background: rgba(255, 114, 197, 0.7);
  box-shadow:
    -1.05rem -0.35rem 0 0 rgba(255, 114, 197, 0.7),
    -0.8rem 0.35rem 0 0 rgba(255, 114, 197, 0.7);
}

.quiz-art span:nth-child(2) {
  top: 2.3rem;
}

.quiz-art span:nth-child(3) {
  top: 4.15rem;
}

.content-section {
  margin-top: 3rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 1rem;
}

.mini-card,
.demo-option {
  margin-top: 0.7rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.mini-card p,
.demo-quiz p {
  margin-bottom: 0;
}

.correct-demo {
  border-color: rgba(60, 220, 140, 0.65);
  background: rgba(60, 220, 140, 0.12);
  color: #dfffea;
}

.section-head {
  max-width: 680px;
  margin-bottom: 1.1rem;
}

.section-head h2 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.mini-label {
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.steps-grid,
.audience-grid,
.difference-grid,
.trust-grid,
.pricing-grid {
  display: grid;
  gap: 1rem;
}

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

.audience-grid,
.difference-grid,
.trust-grid,
.pricing-grid {
  grid-template-columns: repeat(3, 1fr);
}

.steps-grid article,
.audience-grid article,
.difference-grid article,
.trust-grid article,
.pricing-card,
.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 24, 41, 0.78);
  padding: 1.15rem;
}

.steps-grid article {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100%;
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(183, 99, 255, 0.08), rgba(29, 24, 41, 0.78)),
    rgba(29, 24, 41, 0.78);
}

.pricing-section .section-head p {
  margin: 0.65rem 0 0;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.featured-plan {
  position: relative;
  border-color: rgba(183, 99, 255, 0.62);
  background:
    linear-gradient(180deg, rgba(183, 99, 255, 0.16), rgba(29, 24, 41, 0.82)),
    rgba(29, 24, 41, 0.78);
}

.popular-badge {
  align-self: flex-start;
  margin-bottom: 0.55rem;
  padding: 0.38rem 0.6rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-label {
  align-self: flex-start;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(183, 99, 255, 0.38);
  border-radius: 8px;
  color: var(--primary);
  background: rgba(183, 99, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-card h3 {
  margin: 1rem 0 0.25rem;
}

.price {
  margin: 0 0 0.7rem !important;
  color: var(--fg) !important;
  font-size: 1.7rem;
  font-weight: 900;
}

.price small {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.pricing-card ul {
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  margin: 0.5rem 0;
}

.plan-features {
  display: grid;
  gap: 0.55rem;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: #ddd6eb;
  line-height: 1.45;
}

.plan-features span {
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  font-weight: 950;
}

.plan-features .included span {
  background: rgba(98, 240, 164, 0.14);
  color: #62f0a4;
}

.plan-features .excluded {
  color: #a99eb8;
}

.plan-features .excluded span {
  background: rgba(255, 95, 134, 0.12);
  color: #ff7b9c;
}

.pricing-summary-card {
  margin-top: 1.1rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(183, 99, 255, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(183, 99, 255, 0.12), transparent 34%),
    rgba(15, 12, 23, 0.94);
}

.pricing-summary-card h2 {
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.2;
}

.pricing-summary-points {
  display: grid;
  gap: 0.7rem;
}

.pricing-summary-points p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.pricing-summary-points strong {
  color: var(--fg);
}

.pricing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  min-height: 3rem;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.primary-pricing-cta,
.pricing-card button.pricing-cta:not(.secondary-button) {
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 16px 35px rgba(124, 92, 255, 0.24);
}

.secondary-pricing-cta,
.pricing-card button.secondary-button.pricing-cta {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
}

.primary-pricing-cta:hover,
.secondary-pricing-cta:hover,
.pricing-card button.pricing-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(183, 99, 255, 0.55);
  filter: brightness(1.05);
}

.pricing-cta.is-disabled,
.pricing-cta.is-disabled:hover {
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
  transform: none;
  filter: none;
  border-color: rgba(255, 255, 255, 0.14);
}

.steps-grid span {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.16);
  color: var(--primary);
  font-weight: 900;
}

.step-icon {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(183, 99, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 1.35rem;
}

.steps-grid h3 {
  margin: 0.15rem 0 0;
  line-height: 1.22;
}

.steps-grid p {
  margin: 0;
}

.section-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(183, 99, 255, 0.28);
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.08);
}

.section-cta p {
  margin: 0;
  color: #e5dcf2;
  font-weight: 750;
}

.section-cta button {
  flex: 0 0 auto;
}

.content-section h3,
.faq summary {
  color: var(--fg);
  font-weight: 850;
}

.saved-sets {
  margin-top: 3.5rem;
}

.admin-panel {
  margin-top: 3.5rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.admin-stats article,
.admin-table-wrap,
.admin-user-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 24, 41, 0.78);
}

.admin-stats article {
  padding: 1rem;
}

.admin-stats span,
.admin-user-meta span,
.role-pill {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-stats strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.8rem;
}

.admin-table-wrap {
  padding: 1rem;
}

.admin-users {
  display: grid;
  gap: 0.75rem;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
}

.admin-user-row strong {
  display: block;
}

.admin-user-row p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.admin-user-meta {
  display: flex;
  gap: 0.5rem;
}

.admin-user-meta span,
.role-pill {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.role-select {
  min-width: 8rem;
}

.saved-list {
  display: grid;
  gap: 0.85rem;
}

.empty-state,
.saved-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 24, 41, 0.78);
  padding: 1.1rem;
}

.empty-state {
  align-items: flex-start;
  flex-direction: column;
}

.saved-card h3,
.empty-state h3 {
  margin: 0;
}

.saved-card p,
.empty-state p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.account-body {
  --account-nav-height: 6rem;
  background:
    radial-gradient(circle at 72% 0%, rgba(124, 92, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 20% 8%, rgba(183, 99, 255, 0.12), transparent 28rem),
    #0d0b16;
}

.account-mobile-nav {
  display: none;
}

.account-dashboard {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 320px;
  gap: 1rem;
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(var(--account-nav-height) + 1rem) 1rem 1rem;
}

.dashboard-sidebar,
.dashboard-panel,
.dashboard-hero-card,
.quick-action-card,
.dashboard-quote {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 13, 24, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.dashboard-sidebar {
  position: sticky;
  top: calc(var(--account-nav-height) + 1rem);
  display: grid;
  grid-template-rows: auto auto;
  gap: 1.2rem;
  align-self: start;
  min-height: calc(100vh - var(--account-nav-height) - 2rem);
  max-height: calc(100vh - var(--account-nav-height) - 2rem);
  overflow: auto;
  padding: 1rem;
}

.dashboard-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg);
  text-decoration: none;
}

.dashboard-brand img {
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
}

.dashboard-brand .logo-avatar {
  width: 2.7rem;
  height: 2.7rem;
}

.dashboard-brand .brand-name {
  font-size: 1.85rem;
}

.dashboard-brand span {
  color: var(--primary);
}

.dashboard-menu {
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

.dashboard-menu-item {
  display: grid;
  grid-template-columns: 1.2rem 1fr;
  align-items: center;
  gap: 0.85rem;
  min-height: 2.55rem;
  padding: 0.62rem 0.78rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(246, 242, 255, 0.78);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.dashboard-menu-item:hover,
.dashboard-menu-item.active {
  color: var(--fg);
  border-color: rgba(183, 99, 255, 0.38);
  background: linear-gradient(180deg, rgba(183, 99, 255, 0.12), rgba(255, 255, 255, 0.02));
  transform: translateX(1px);
}

.dashboard-menu-item span {
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  color: rgba(229, 208, 255, 0.92);
}

.dashboard-upgrade {
  padding: 1rem;
  border: 1px solid rgba(183, 99, 255, 0.28);
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.11);
}

.dashboard-upgrade > span {
  display: block;
  margin-bottom: 0.5rem;
  color: #ffd580;
}

.dashboard-upgrade strong,
.dashboard-user strong {
  display: block;
}

.dashboard-upgrade p {
  margin: 0.45rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.dashboard-upgrade .button-link {
  width: 100%;
  padding: 0.65rem 0.8rem;
}

.dashboard-user {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.dashboard-user-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.82rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(20, 17, 32, 0.88), rgba(15, 13, 24, 0.94)),
    rgba(255, 255, 255, 0.015);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.dashboard-user-card:hover {
  border-color: rgba(183, 99, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(28, 23, 43, 0.9), rgba(17, 14, 28, 0.96)),
    rgba(255, 255, 255, 0.02);
  transform: translateY(-1px);
}

.dashboard-user-card em {
  color: rgba(255, 255, 255, 0.38);
  font-style: normal;
  font-size: 1.1rem;
  line-height: 1;
}

.dashboard-avatar {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
  font-weight: 900;
}

.dashboard-avatar.has-avatar {
  color: transparent;
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-avatar-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.dashboard-avatar-icon {
  display: block;
  width: 72%;
  height: 72%;
  object-fit: contain;
  object-position: center;
}

.dashboard-user-copy {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.dashboard-user small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-plan-mini {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 0.18rem;
  padding: 0.14rem 0.44rem;
  border: 1px solid rgba(183, 99, 255, 0.2);
  border-radius: 999px;
  background: rgba(183, 99, 255, 0.08);
  color: #d7b9ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-user strong {
  font-size: 0.96rem;
  line-height: 1.2;
}

#dashboardUserEmail {
  font-size: 0.8rem;
}

.sidebar-plan-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem;
  border: 1px solid rgba(102, 184, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(102, 184, 255, 0.1), rgba(183, 99, 255, 0.09)),
    rgba(255, 255, 255, 0.035);
}

.sidebar-plan-card span {
  color: #9ed0ff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-plan-card strong {
  color: var(--fg);
  font-size: 1.15rem;
}

.sidebar-plan-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.sidebar-plan-card a {
  display: inline-flex;
  justify-content: center;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #66b8ff, var(--primary-2));
  color: white;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
}

.dashboard-main,
.dashboard-rail {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 6.5rem;
  padding: 1.25rem 1rem 0.25rem;
}

.dashboard-topbar h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

.dashboard-topbar p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.dashboard-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-icon-button {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
  font-size: 1.25rem;
}

.dashboard-hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  min-height: 355px;
  padding: 1.7rem;
  background:
    linear-gradient(135deg, rgba(183, 99, 255, 0.28), rgba(124, 92, 255, 0.1)),
    rgba(15, 13, 24, 0.86);
}

.dashboard-hero-copy {
  position: relative;
  z-index: 1;
}

.dashboard-hero-copy span,
.dashboard-panel-label,
.dashboard-section-head span {
  color: #cba7ff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-hero-copy h2 {
  max-width: 520px;
  margin: 1rem 0 0.55rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.dashboard-hero-copy p {
  max-width: 560px;
  margin: 0 0 1.25rem;
  color: #d4cde4;
  line-height: 1.65;
}

.dashboard-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.dashboard-hero-meta span {
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-hero-visual {
  position: relative;
  min-height: 240px;
}

.book-shape {
  position: absolute;
  right: 3.4rem;
  top: 2.2rem;
  width: 125px;
  height: 180px;
  border-radius: 8px;
  background: linear-gradient(145deg, #7d43ff, #302060);
  box-shadow:
    18px 8px 0 rgba(255, 255, 255, 0.16),
    0 25px 55px rgba(0, 0, 0, 0.4);
  transform: rotate(7deg);
}

.book-shape::after {
  content: "";
  position: absolute;
  inset: 0.8rem auto 0.8rem 0.55rem;
  width: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.floating-note {
  position: absolute;
  right: 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #dcd3ff;
  background: rgba(45, 37, 88, 0.86);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  font-weight: 850;
}

.note-one {
  top: 4.2rem;
}

.note-two {
  right: 2.2rem;
  bottom: 2.4rem;
  color: #8af0a1;
}

.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.quick-action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 5.4rem;
  padding: 1rem;
  color: var(--fg);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.quick-action-card:hover {
  border-color: rgba(183, 99, 255, 0.48);
  background: rgba(183, 99, 255, 0.08);
  transform: translateY(-2px);
}

.quick-action-card > span {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.16);
  color: var(--primary);
  font-size: 1.35rem;
}

.quick-action-card strong,
.quick-action-card small {
  display: block;
}

.quick-action-card small {
  margin-top: 0.25rem;
  color: var(--muted);
}

.quick-action-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 1.5rem;
}

.dashboard-panel {
  padding: 1.25rem;
}

.dashboard-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-section-head a {
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
}

.dashboard-set-list {
  display: grid;
}

.dashboard-set-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.95rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-set-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.dashboard-set-row h3 {
  margin: 0;
  font-size: 1rem;
}

.dashboard-set-row p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.set-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.16);
  color: var(--primary);
  font-weight: 900;
}

.set-icon svg,
.study-set-mobile-icon svg,
.mobile-drawer-icon svg,
.dashboard-menu-item span svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.dashboard-menu-item span,
.mobile-drawer-icon {
  display: inline-grid;
  place-items: center;
}

.set-progress {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.12);
  color: #d8c1ff;
  font-size: 0.85rem;
  font-weight: 850;
}

.dashboard-empty {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  background:
    linear-gradient(180deg, rgba(183, 99, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(183, 99, 255, 0.14);
}

.empty-state-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  background: rgba(183, 99, 255, 0.12);
  color: #d7b7ff;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-rail {
  padding-top: 6.75rem;
}

.dashboard-panel-label {
  display: block;
  margin-bottom: 1rem;
}

.streak-card strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
}

.streak-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.45rem;
  margin: 1.25rem 0 1rem;
}

.streak-days span {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
  font-weight: 900;
}

.streak-days .done {
  border-color: transparent;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.streak-card p,
.goal-card p,
.dashboard-quote p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-stat-list {
  display: grid;
  gap: 0.65rem;
}

.dashboard-stat-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.dashboard-stat-list article > span {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.14);
  color: var(--primary);
  font-weight: 900;
}

.dashboard-stat-list small {
  display: block;
  color: var(--muted);
}

.dashboard-stat-list strong {
  display: block;
  margin-top: 0.1rem;
  font-size: 1.35rem;
}

.goal-card strong {
  display: block;
  margin-bottom: 0.9rem;
  font-size: 1.05rem;
}

.goal-progress {
  height: 0.45rem;
  margin-bottom: 0.9rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.goal-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width 0.4s ease;
}

.dashboard-quote {
  padding: 1.25rem;
  background:
    linear-gradient(135deg, rgba(183, 99, 255, 0.16), rgba(124, 92, 255, 0.06)),
    rgba(15, 13, 24, 0.82);
}

.dashboard-quote strong {
  display: block;
  color: var(--primary);
  font-size: 3rem;
  line-height: 0.8;
}

.account-app-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  width: 100%;
  max-width: none;
}

body.mobile-menu-open .account-app-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.account-nav-brand img {
  width: auto;
  height: 2.7rem;
}

.account-nav-links {
  gap: 0.75rem;
}

.account-app-nav .nav-links {
  display: none;
}

.mobile-drawer {
  display: none;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  z-index: 54;
  border: 0;
  background: rgba(4, 4, 10, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.profile-menu {
  position: relative;
}

.nav-menu-footer {
  display: grid;
  gap: 0.65rem;
  margin-left: 0.35rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-drawer-brand,
.nav-feedback-card {
  display: none;
}

.nav-drawer-label {
  display: none;
}

.nav-drawer-item,
.nav-drawer-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
}

.nav-drawer-button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.nav-drawer-item:hover,
.nav-drawer-button:hover {
  color: var(--fg);
}

.nav-drawer-item span,
.nav-drawer-button span {
  color: var(--primary);
}

.nav-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 1.8rem;
  padding: 0.18rem 0.6rem;
  border: 1px solid rgba(102, 184, 255, 0.22);
  border-radius: 999px;
  background: rgba(102, 184, 255, 0.08);
  color: #bfe0ff;
  font-size: 0.72rem;
  font-weight: 850;
}

.nav-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.nav-profile-plan {
  display: block;
  color: #cbb8ff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-profile-card small {
  color: var(--muted);
}

.nav-profile-card em {
  color: rgba(255, 255, 255, 0.54);
  font-style: normal;
  font-size: 1.35rem;
}

.nav-logout-button {
  justify-self: start;
  padding: 0.15rem 0;
}

.dashboard-menu-section {
  display: grid;
  gap: 0.2rem;
}

.dashboard-menu-label {
  padding: 0 0.22rem 0.22rem;
  color: rgba(236, 229, 248, 0.44);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dashboard-sidebar {
  display: grid;
  align-content: space-between;
  gap: 1.25rem;
}

.profile-menu summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
  box-shadow: none;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-menu summary::after {
  content: "⌄";
  color: var(--muted);
  font-size: 0.8rem;
  padding-right: 0.2rem;
}

.profile-menu summary:hover strong,
.profile-menu summary:hover::after {
  color: var(--fg);
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  z-index: 8;
  display: grid;
  gap: 0.35rem;
  width: 210px;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 15, 27, 0.98);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

.profile-dropdown a,
.profile-dropdown button {
  width: 100%;
  padding: 0.72rem 0.75rem;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: rgba(183, 99, 255, 0.12);
  color: var(--fg);
}

.study-home {
  grid-template-columns: 220px minmax(0, 1fr);
  width: 100%;
  max-width: none;
  min-height: calc(100vh - var(--account-nav-height));
  gap: 0;
  padding: 0;
}

.study-home .dashboard-sidebar {
  position: sticky;
  top: var(--account-nav-height);
  align-self: start;
  min-height: calc(100vh - var(--account-nav-height));
  max-height: calc(100vh - var(--account-nav-height));
  margin: 0;
  padding: 1.15rem 1rem 1.4rem;
  border-top: 0;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(24, 18, 38, 0.96), rgba(13, 11, 22, 0.98)),
    rgba(15, 13, 24, 0.96);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.study-home .dashboard-user {
  grid-template-columns: auto minmax(0, 1fr);
}

.study-main {
  gap: 0.95rem;
  padding: 1rem 1.2rem 4rem;
}

.study-sets-list-shell {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.study-sets-overview-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 1rem;
  align-items: center;
  overflow: hidden;
  padding: 1.2rem 1.15rem;
  border-color: rgba(183, 99, 255, 0.12);
  background:
    radial-gradient(circle at top right, rgba(141, 98, 255, 0.24), transparent 22%),
    radial-gradient(circle at bottom left, rgba(78, 120, 255, 0.14), transparent 26%),
    linear-gradient(135deg, rgba(52, 34, 95, 0.94), rgba(23, 19, 40, 0.96));
  box-shadow: 0 18px 38px rgba(8, 7, 18, 0.24);
}

.study-sets-overview-shell::after {
  content: "";
  position: absolute;
  inset: auto auto -42px -42px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(123, 92, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.study-sets-overview-shell .dashboard-overview-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.7rem;
}

.study-sets-overview-shell .dashboard-overview-copy span {
  color: #d4bbff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.study-sets-overview-shell .dashboard-overview-copy h2 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
}

.study-sets-overview-shell .dashboard-overview-copy p {
  margin: 0;
  max-width: 34rem;
  color: #d8d1e5;
  font-size: 1.02rem;
  line-height: 1.55;
}

.study-overview-cta {
  width: fit-content;
  padding-inline: 1.15rem;
}

.study-hub-main {
  gap: 1rem;
}

.study-hub-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(19rem, 0.95fr);
  gap: 1.2rem;
  padding: 1.15rem;
  border-color: rgba(183, 99, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(149, 102, 255, 0.2), transparent 26%),
    linear-gradient(135deg, rgba(42, 31, 70, 0.97), rgba(20, 17, 33, 0.99));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.study-hub-copy {
  gap: 0.85rem;
}

.study-hub-copy .mini-label {
  color: #d8b7ff;
}

.study-hub-copy h1 {
  max-width: 12ch;
}

.study-hub-copy p {
  max-width: 34rem;
}

.study-hub-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.study-hub-secondary-cta {
  min-height: 3rem;
  padding-inline: 1rem;
  border-color: rgba(183, 99, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.study-hub-secondary-cta:hover {
  border-color: rgba(183, 99, 255, 0.36);
  background: rgba(183, 99, 255, 0.1);
}

.study-hub-hero-side {
  display: grid;
  gap: 0.9rem;
  align-items: center;
  justify-items: end;
  min-width: 0;
}

.study-hub-stats {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.study-hub-stats .overview-stat-card {
  min-width: 0;
  padding: 0.85rem 0.85rem 0.8rem;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(10, 9, 20, 0.34);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.study-hub-stats .overview-stat-card span {
  color: #beb4d0;
  font-size: 0.72rem;
}

.study-hub-stats .overview-stat-card strong {
  font-size: 1.55rem;
}

.study-hub-stats .overview-stat-card small {
  color: #9b92ac;
}

.study-hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 180px;
}

.study-hero-stack {
  position: relative;
  width: 180px;
  height: 145px;
}

.study-hero-sheet {
  position: absolute;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 34px rgba(6, 5, 16, 0.28);
}

.study-hero-sheet-back {
  right: 10px;
  bottom: 6px;
  width: 108px;
  height: 72px;
  background: linear-gradient(180deg, rgba(132, 102, 255, 0.42), rgba(76, 54, 151, 0.6));
  transform: rotate(-10deg);
}

.study-hero-sheet-mid {
  right: 20px;
  bottom: 28px;
  width: 118px;
  height: 76px;
  background: linear-gradient(180deg, rgba(74, 118, 255, 0.5), rgba(36, 55, 118, 0.62));
  transform: rotate(5deg);
}

.study-hero-sheet-front {
  right: 38px;
  top: 0;
  width: 104px;
  height: 126px;
  background: linear-gradient(180deg, rgba(246, 243, 255, 0.98), rgba(225, 220, 244, 0.92));
}

.study-hero-sheet-front::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 24px 24px 0;
  border-style: solid;
  border-color: transparent rgba(198, 186, 232, 0.9) transparent transparent;
  border-top-right-radius: 10px;
}

.study-hero-sheet-front em {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 0.48rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #8f66ff, #5d87ff);
  color: #fff;
  font-style: normal;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.study-sets-overview-shell .dashboard-overview-stats {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  width: min(100%, 430px);
  gap: 0.7rem;
}

.study-sets-overview-shell .overview-stat-card {
  min-width: 0;
  padding: 0.8rem 0.85rem;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(10, 9, 20, 0.34);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.study-sets-overview-shell .overview-stat-card span {
  color: #bfb8cc;
  font-size: 0.72rem;
}

.study-sets-overview-shell .overview-stat-card strong {
  font-size: 1.65rem;
}

.study-sets-overview-shell .overview-stat-card small {
  color: #9f98ae;
}

.study-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.study-search-shell {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  min-height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.study-search-icon {
  color: #aca4ba;
  font-size: 1.1rem;
}

.study-search-shell input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
}

.study-search-shell input::placeholder {
  color: #928aa4;
}

.study-search-shell input:focus {
  outline: none;
}

.study-search-icon {
  color: #aca4ba;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
}

.study-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid rgba(183, 99, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #e5d8ff;
  font: inherit;
  font-weight: 700;
}

.study-filter-toggle span {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
}

.study-filter-toggle[aria-pressed="true"] {
  border-color: rgba(183, 99, 255, 0.4);
  background: rgba(183, 99, 255, 0.12);
}

.study-sets-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.study-sets-list-head h2 {
  margin: 0.24rem 0 0;
  font-size: 1.25rem;
}

.study-sets-head-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(183, 99, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #d8bcff;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.study-sets-head-link:hover {
  border-color: rgba(183, 99, 255, 0.34);
  background: rgba(183, 99, 255, 0.08);
  transform: translateY(-1px);
}

.study-sets-mobile-list {
  display: grid;
  gap: 0.9rem;
}

.study-set-mobile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(31, 25, 48, 0.95), rgba(19, 16, 30, 0.98)),
    rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.study-set-mobile-card:hover {
  border-color: rgba(183, 99, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(41, 31, 70, 0.98), rgba(21, 17, 34, 0.98)),
    rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.study-set-mobile-open {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.study-set-mobile-icon {
  width: 3.35rem;
  height: 3.35rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.12rem;
  font-weight: 900;
}

.study-set-mobile-icon.tone-purple { background: rgba(157, 107, 255, 0.16); color: #cfb4ff; }
.study-set-mobile-icon.tone-green { background: rgba(70, 214, 144, 0.14); color: #8ef0bc; }
.study-set-mobile-icon.tone-blue { background: rgba(92, 164, 255, 0.14); color: #a5cbff; }
.study-set-mobile-icon.tone-amber { background: rgba(255, 183, 76, 0.14); color: #ffd08c; }
.study-set-mobile-icon.tone-teal { background: rgba(59, 208, 193, 0.14); color: #8debe2; }

.study-set-mobile-body {
  min-width: 0;
  overflow: hidden;
}

.study-set-mobile-body h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  max-width: 100%;
}

.study-set-mobile-body p,
.study-set-mobile-body small {
  display: block;
  margin: 0.22rem 0 0;
  color: #aca4ba;
  line-height: 1.45;
}

.study-set-mobile-meta {
  display: grid;
  gap: 0.28rem;
}

.study-set-mobile-meta p,
.study-set-mobile-meta small {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.study-set-mobile-meta span {
  display: inline-flex;
  width: 0.92rem;
  height: 0.92rem;
  color: #c7b6e8;
}

.study-set-mobile-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
}

.study-set-mobile-progress-row strong {
  color: #b98cff;
  font-size: 0.88rem;
}

.study-set-mobile-progress {
  margin-top: 0.75rem;
  width: 100%;
  height: 0.34rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.study-set-mobile-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b62ff, #5a8eff);
}

.study-set-mobile-actions {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  justify-items: center;
  flex: 0 0 auto;
}

.study-set-menu-shell {
  position: relative;
}

.study-set-favorite,
.study-set-more {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #c7c0d6;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.study-set-favorite svg,
.study-set-more svg,
.study-search-icon svg,
.study-filter-toggle span svg,
.study-set-mobile-meta span svg,
.practice-set-meta span svg {
  width: 100%;
  height: 100%;
  display: block;
}

.study-set-inline-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 12;
  min-width: 10.5rem;
  display: none;
  padding: 0.4rem;
  border: 1px solid rgba(183, 99, 255, 0.16);
  border-radius: 16px;
  background: rgba(19, 16, 30, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.study-set-inline-menu.open {
  display: grid;
  gap: 0.2rem;
}

.study-set-continue-pill {
  align-self: center;
  min-width: 6.8rem;
  min-height: 3.35rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(183, 99, 255, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(147, 89, 255, 0.98), rgba(103, 92, 255, 0.9));
  color: #f4eeff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(72, 41, 141, 0.24);
}

.practice-main-shell {
  gap: 0.9rem;
}

.practice-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.05rem;
  border-color: rgba(183, 99, 255, 0.12);
  background:
    radial-gradient(circle at top right, rgba(141, 98, 255, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(38, 28, 63, 0.96), rgba(19, 16, 31, 0.98));
}

.practice-hero-copy {
  display: grid;
  gap: 0.7rem;
}

.practice-hero-copy h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(1.95rem, 4vw, 2.9rem);
  line-height: 1.04;
}

.practice-hero-copy p {
  margin: 0;
  max-width: 36rem;
  color: #d2cadf;
  line-height: 1.55;
}

.practice-hero-badges {
  display: grid;
  gap: 0.65rem;
  justify-items: end;
}

.practice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(183, 99, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #e8dcff;
  font-size: 0.9rem;
  font-weight: 700;
}

.practice-library-shell {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.practice-library-head h2 {
  margin-top: 0.22rem;
}

.practice-library-list {
  display: grid;
  gap: 0.85rem;
}

.practice-set-card {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.practice-set-card:hover {
  transform: translateY(-2px);
  border-color: rgba(183, 99, 255, 0.28);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.practice-set-copy {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
}

.practice-set-copy h3 {
  margin: 0;
  font-size: 1.04rem;
}

.practice-set-copy p,
.practice-set-copy small {
  margin: 0;
  color: #aca4ba;
  line-height: 1.45;
}

.practice-set-meta {
  display: grid;
  gap: 0.3rem;
}

.practice-set-meta p,
.practice-set-meta small {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.practice-set-meta span {
  display: inline-flex;
  width: 0.92rem;
  height: 0.92rem;
  color: #cbb6eb;
}

.practice-set-progress {
  width: 100%;
  height: 0.34rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.practice-set-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9f72ff, #5d8eff);
}

.practice-focused-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-color: rgba(183, 99, 255, 0.18);
  background:
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(40, 28, 66, 0.96), rgba(22, 18, 35, 0.98));
}

.practice-focused-copy {
  min-width: 0;
  display: grid;
  gap: 0.4rem;
}

@media (max-width: 980px) {
  .study-hub-hero {
    grid-template-columns: 1fr;
  }

  .study-hub-hero-side {
    justify-items: stretch;
  }

  .study-sets-overview-shell {
    grid-template-columns: 1fr;
    padding-bottom: 1rem;
  }

  .study-hero-visual {
    order: 2;
    justify-self: end;
    min-width: 0;
  }

  .study-sets-overview-shell .dashboard-overview-stats {
    position: static;
    order: 3;
    grid-template-columns: repeat(3, minmax(96px, 1fr));
    width: 100%;
  }
}

@media (max-width: 760px) {
  .study-main {
    gap: 0.85rem;
    padding: 0.8rem 0.75rem 5rem;
  }

  .study-hub-main {
    gap: 0.85rem;
  }

  .study-hub-hero {
    gap: 1rem;
    padding: 1rem;
    border-radius: 26px;
  }

  .study-hub-copy h1 {
    max-width: none;
    font-size: 2.2rem;
  }

  .study-hub-copy p {
    font-size: 0.96rem;
  }

  .study-hub-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .study-hub-secondary-cta,
  .study-overview-cta {
    width: 100%;
    justify-content: center;
  }

  .study-hub-hero-side {
    gap: 0.8rem;
    justify-items: center;
  }

  .study-hub-stats {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
    overflow-x: auto;
    width: 100%;
    padding-bottom: 0.2rem;
  }

  .study-sets-overview-shell {
    gap: 0.9rem;
    padding: 1rem;
  }

  .study-sets-overview-shell .dashboard-overview-copy h2 {
    max-width: none;
    font-size: 2.2rem;
  }

  .study-sets-overview-shell .dashboard-overview-copy p {
    font-size: 0.98rem;
  }

  .study-overview-cta {
    width: 100%;
    justify-content: center;
  }

  .study-hero-visual {
    justify-self: center;
  }

  .study-hero-stack {
    width: 140px;
    height: 116px;
  }

  .study-hero-sheet-front {
    right: 24px;
    width: 86px;
    height: 102px;
  }

  .study-hero-sheet-mid {
    width: 100px;
    height: 64px;
  }

  .study-hero-sheet-back {
    width: 92px;
    height: 58px;
  }

  .study-sets-overview-shell .dashboard-overview-stats {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(120px, 1fr);
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

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

  .study-filter-toggle {
    width: fit-content;
  }

  .study-sets-list-head {
    align-items: end;
  }

  .study-sets-head-link {
    min-height: 2.1rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.84rem;
  }

  .study-set-mobile-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main actions"
      "cta cta";
    gap: 0.8rem;
    align-items: start;
    padding: 0.9rem;
    border-radius: 20px;
    overflow: hidden;
    max-width: 100%;
  }

  .study-set-mobile-open {
    grid-area: main;
    min-width: 0;
    align-items: start;
    gap: 0.75rem;
  }

  .study-set-mobile-icon {
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    border-radius: 16px;
    flex: 0 0 3rem;
  }

  .study-set-mobile-body {
    min-width: 0;
    max-width: 100%;
  }

  .study-set-mobile-body h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.28;
    font-size: 1rem;
  }

  .study-set-mobile-body p {
    margin-top: 0.24rem;
    font-size: 0.88rem;
  }

  .study-set-mobile-body small {
    margin-top: 0.22rem;
    font-size: 0.88rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .study-set-mobile-progress {
    margin-top: 0.58rem;
    max-width: 100%;
  }

  .study-set-mobile-actions {
    grid-area: actions;
    gap: 0.55rem;
    align-self: start;
  }

  .study-set-favorite,
  .study-set-more {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
  }

  .study-set-menu-shell {
    display: flex;
    justify-content: center;
    width: 40px;
  }

  .study-set-continue-pill {
    grid-area: cta;
    width: 100%;
    min-height: 3.05rem;
    margin-top: 0.05rem;
    justify-self: stretch;
    align-self: stretch;
    padding: 0.82rem 1rem;
    border-radius: 18px;
  }

  .practice-hero-shell {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .practice-hero-copy h1 {
    max-width: none;
    font-size: 2.15rem;
  }

  .practice-hero-badges {
    justify-items: start;
  }

  .practice-focused-card {
    flex-direction: column;
    align-items: stretch;
  }

  .practice-set-card {
    gap: 0.8rem;
    padding: 0.95rem;
    border-radius: 20px;
  }

  .practice-set-card .set-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 16px;
  }

  .practice-set-copy h3 {
    font-size: 1rem;
    line-height: 1.3;
  }

  .practice-set-copy small {
    font-size: 0.86rem;
  }

  .practice-set-card .study-set-row-actions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .practice-set-card .set-continue,
  .practice-set-card .secondary-button {
    width: 100%;
    min-height: 3rem;
  }
}

.study-set-inline-menu button {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #f2eef9;
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.study-set-inline-menu button:hover {
  background: rgba(183, 99, 255, 0.12);
}

.study-set-inline-menu button.danger {
  color: #ff9ea5;
}

.study-set-inline-menu button.danger:hover {
  background: rgba(255, 107, 122, 0.12);
}

.study-set-favorite.active {
  color: #ffcc61;
  border-color: rgba(255, 204, 97, 0.28);
  background: rgba(255, 204, 97, 0.08);
}

.study-set-skeleton {
  pointer-events: none;
}

.study-set-skeleton-line {
  display: block;
  height: 0.72rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: studySetPulse 1.4s linear infinite;
}

.study-set-skeleton-line + .study-set-skeleton-line {
  margin-top: 0.45rem;
}

.study-set-skeleton-line.wide { width: 82%; }
.study-set-skeleton-line.medium { width: 58%; }
.study-set-skeleton-line.narrow { width: 48%; }

.study-sets-empty-state {
  padding: 1.35rem;
  border-radius: 20px;
}

.study-sets-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  width: 3.8rem;
  height: 3.8rem;
  display: none;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(157, 92, 255, 1), rgba(109, 66, 255, 0.96));
  color: #fff;
  box-shadow:
    0 16px 34px rgba(83, 46, 149, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.study-sets-fab:hover,
.study-sets-fab:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 20px 38px rgba(83, 46, 149, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  filter: saturate(1.06);
}

.study-sets-fab:focus-visible {
  outline: 2px solid rgba(193, 132, 255, 0.85);
  outline-offset: 3px;
}

.study-sets-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: rgba(16, 12, 30, 0.14);
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.14);
}

.study-sets-fab-icon svg {
  width: 1.26rem;
  height: 1.26rem;
  display: block;
}

@keyframes studySetPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.dashboard-overview-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(183, 99, 255, 0.14), rgba(102, 184, 255, 0.05)),
    rgba(15, 13, 24, 0.84);
  padding: 1.05rem 1.1rem;
}

.dashboard-overview-copy {
  display: grid;
  align-content: start;
  gap: 0.68rem;
}

.dashboard-overview-copy span {
  color: #cba7ff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-overview-copy h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3.5vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.dashboard-overview-copy p {
  margin: 0;
  max-width: 34rem;
  color: #d8d0e6;
  line-height: 1.58;
}

.dashboard-overview-copy .button-link {
  justify-self: start;
  margin-top: 0.15rem;
}

.dashboard-overview-stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 180px);
  gap: 0.7rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.dashboard-overview-stats::-webkit-scrollbar,
.dashboard-horizontal-rail::-webkit-scrollbar,
.app-detail-grid::-webkit-scrollbar {
  display: none;
}

.overview-stat-card {
  display: grid;
  gap: 0.24rem;
  min-height: 100%;
  padding: 0.78rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.028);
  scroll-snap-align: start;
}

.overview-stat-card span {
  color: #d7b7ff;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.overview-stat-card strong {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1;
}

.overview-stat-card small {
  color: #bfb7cf;
  font-size: 0.76rem;
  line-height: 1.35;
}

.dashboard-library-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.dashboard-top-focus {
  display: grid;
  gap: 1rem;
}

.dashboard-side-stack {
  display: grid;
  gap: 1rem;
}

.dashboard-focus-card {
  min-height: 100%;
}

.dashboard-quick-stack {
  grid-template-columns: 1fr;
}

.study-greeting {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0.25rem 0.25rem;
}

.study-greeting h1 {
  max-width: none;
  margin: 0.55rem 0 0.35rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.study-greeting p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.study-hint {
  max-width: 260px;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(102, 184, 255, 0.24);
  border-radius: 8px;
  background: rgba(102, 184, 255, 0.08);
  color: #cfe6ff !important;
  font-size: 0.92rem;
}

.study-primary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1rem;
  align-items: center;
  min-height: 240px;
  padding: 1.2rem;
  border: 1px solid rgba(183, 99, 255, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(183, 99, 255, 0.24), rgba(102, 184, 255, 0.08)),
    rgba(15, 13, 24, 0.84);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
}

.study-primary-copy span {
  color: #cba7ff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.study-primary-copy h2 {
  max-width: 620px;
  margin: 0.9rem 0 0.65rem;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.study-primary-copy p {
  max-width: 620px;
  margin: 0 0 1.25rem;
  color: #d8d0e6;
  line-height: 1.65;
}

.study-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
  text-decoration: none;
}

.study-upload-preview,
.study-progress-ring {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 200px;
  min-height: 200px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

.study-upload-preview {
  color: var(--fg);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.study-upload-preview:hover {
  border-color: rgba(183, 99, 255, 0.48);
  background: rgba(183, 99, 255, 0.08);
  transform: translateY(-2px);
}

.study-upload-preview span {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-size: 2rem;
}

.study-upload-preview strong,
.study-upload-preview small {
  display: block;
}

.study-upload-preview small,
.study-progress-ring span {
  margin-top: 0.4rem;
  color: var(--muted);
}

.study-progress-ring {
  border-style: solid;
  border-color: rgba(183, 99, 255, 0.28);
  background:
    radial-gradient(circle, rgba(183, 99, 255, 0.18), transparent 62%),
    rgba(255, 255, 255, 0.045);
}

.study-progress-ring strong {
  font-size: 3rem;
  line-height: 1;
}

.study-quick-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 0.85rem;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.study-quick-actions .quick-action-card {
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 4.8rem;
  padding: 0.9rem 1rem;
  scroll-snap-align: start;
}

.study-quick-actions .quick-action-card strong {
  font-size: 0.98rem;
}

.study-quick-actions .quick-action-card small {
  font-size: 0.84rem;
}

.study-recent-panel .dashboard-section-head h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.set-mini-progress {
  width: min(220px, 100%);
  height: 0.35rem;
  margin-top: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.set-mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.set-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(183, 99, 255, 0.35);
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.12);
  color: var(--fg);
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
}

.study-progress-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.study-progress-panel strong {
  display: block;
  font-size: 2rem;
}

.study-progress-panel p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.control-hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.app-detail-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 220px);
  gap: 0.85rem;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.app-detail-card {
  display: grid;
  gap: 0.55rem;
  scroll-snap-align: start;
}

.app-detail-card strong {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.app-detail-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.plan-popular-mini {
  border-color: rgba(183, 99, 255, 0.45);
  background:
    linear-gradient(135deg, rgba(183, 99, 255, 0.14), rgba(102, 184, 255, 0.06)),
    rgba(15, 13, 24, 0.78);
}

.study-set-large-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.study-set-large-row + .study-set-large-row {
  margin-top: 0.75rem;
}

.study-set-large-row h3 {
  margin: 0;
}

.study-set-large-row p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.settings-list {
  display: grid;
  gap: 0.75rem;
}

.settings-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.settings-list strong {
  display: block;
}

.settings-list p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.settings-hub {
  display: grid;
  gap: 1rem;
}

.settings-preferences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.settings-preferences .dashboard-panel-label {
  grid-column: 1 / -1;
}

.settings-preferences label {
  display: grid;
  gap: 0.45rem;
  color: #efe8fb;
  font-weight: 800;
}

.settings-preferences select {
  min-height: 3rem;
  border: 1px solid rgba(183, 99, 255, 0.18);
  border-radius: 8px;
  padding: 0.85rem 0.9rem;
  background: rgba(12, 10, 18, 0.74);
  color: var(--fg);
  font: inherit;
}

.settings-disabled-toggle {
  opacity: 0.72;
}

.settings-actions {
  align-items: center;
}

.profile-form {
  display: grid;
  gap: 1rem;
}

.profile-form label {
  display: grid;
  gap: 0.45rem;
  color: #d7cdea;
  font-size: 0.9rem;
  font-weight: 800;
}

.profile-form input,
.profile-form select {
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font: inherit;
}

.profile-form input:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.75;
}

.profile-avatar-editor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(183, 99, 255, 0.2);
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.08);
}

.profile-avatar-editor p {
  margin: 0.35rem 0 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.profile-avatar-large {
  display: grid;
  place-items: center;
  width: 6.5rem;
  height: 6.5rem;
  border: 1px solid rgba(183, 99, 255, 0.35);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, var(--primary), var(--primary-2));
  overflow: hidden;
  color: white;
  font-size: 2rem;
  font-weight: 950;
}

.profile-avatar-large.has-avatar {
  color: transparent;
  background: rgba(255, 255, 255, 0.04);
}

.profile-toggle {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.profile-toggle input {
  width: 1.1rem;
  min-height: auto;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.profile-danger-zone {
  display: grid;
  gap: 0.45rem;
  border-color: rgba(255, 95, 134, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 95, 134, 0.08), rgba(20, 14, 26, 0.96)),
    rgba(20, 14, 26, 0.96);
}

.profile-danger-zone p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-logout-button {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid rgba(255, 95, 134, 0.42);
  background: rgba(255, 95, 134, 0.12);
  color: #ff9db5;
}

.profile-logout-button:hover {
  border-color: rgba(255, 95, 134, 0.62);
  background: rgba(255, 95, 134, 0.18);
  color: #ffd4de;
}

.danger-button {
  border: 1px solid rgba(255, 95, 134, 0.36);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: rgba(255, 95, 134, 0.13);
  color: #ffd7e1;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.app-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(7, 5, 12, 0.78);
  backdrop-filter: blur(16px);
}

.app-dialog {
  width: min(420px, 100%);
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border: 1px solid rgba(183, 99, 255, 0.26);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(183, 99, 255, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(35, 27, 52, 0.98), rgba(18, 14, 28, 0.99));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.app-dialog h2 {
  margin: 0.3rem 0 0.35rem;
  font-size: 1.35rem;
  line-height: 1.18;
}

.app-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.app-dialog-field {
  display: grid;
  gap: 0.45rem;
  color: #efe8fb;
  font-weight: 800;
}

.app-dialog-field input {
  min-height: 3rem;
  border: 1px solid rgba(183, 99, 255, 0.24);
  border-radius: 8px;
  padding: 0.85rem 0.9rem;
  background: rgba(12, 10, 18, 0.78);
  color: var(--fg);
  font: inherit;
}

.app-dialog-error {
  color: #ff9ab2;
  font-weight: 700;
}

.app-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.app-toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 220;
  display: grid;
  gap: 0.65rem;
  width: min(360px, calc(100% - 2rem));
  pointer-events: none;
}

.app-toast {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(183, 99, 255, 0.24);
  border-radius: 8px;
  background: rgba(30, 24, 45, 0.96);
  color: var(--fg);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  font-weight: 800;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-toast.error {
  border-color: rgba(255, 95, 134, 0.34);
  color: #ffd7e1;
}

.app-toast.leaving {
  opacity: 0;
  transform: translateY(6px);
}

.profile-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-color: rgba(102, 184, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(102, 184, 255, 0.11), rgba(183, 99, 255, 0.06)),
    rgba(15, 13, 24, 0.78);
}

.profile-plan-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 2rem;
}

.profile-plan-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.blue-upgrade-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #66b8ff, #7c5cff);
  color: white;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.pricing-modal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.24), transparent 36rem),
    rgba(7, 6, 12, 1);
}

.pricing-modal-backdrop {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(4, 3, 8, 0.55);
}

.pricing-modal-shell {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(24, 19, 36, 0.98), rgba(13, 11, 20, 0.98)),
    var(--card);
  padding: 1.5rem;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.55);
}

.pricing-modal-shell .section-head {
  max-width: 760px;
  margin: 0 auto 1.25rem;
  text-align: center;
}

.pricing-modal-shell h1 {
  margin: 0.7rem auto 0.7rem;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.auth-callback-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(151, 100, 255, 0.28), transparent 28rem),
    linear-gradient(180deg, #111529 0%, #090912 100%);
  color: var(--text);
}

.auth-callback-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.auth-callback-card {
  width: min(440px, 100%);
  border: 1px solid rgba(184, 132, 255, 0.24);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(32, 26, 52, 0.96), rgba(12, 11, 20, 0.98)),
    rgba(18, 16, 29, 0.96);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

.auth-callback-logo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 1rem;
  box-shadow: 0 0 0 1px rgba(184, 132, 255, 0.26);
}

.auth-callback-card h1 {
  margin: 0.4rem 0 0.65rem;
  font-size: clamp(1.8rem, 8vw, 2.55rem);
}

.auth-callback-card p {
  margin: 0;
  color: var(--muted);
}

.auth-callback-loader {
  width: 42px;
  height: 42px;
  margin: 1.4rem auto 0;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #a96bff;
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

.auth-callback-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.pricing-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  font-size: 1.8rem;
  line-height: 1;
  text-decoration: none;
}

.pricing-close:hover {
  border-color: var(--primary);
  background: rgba(183, 99, 255, 0.14);
}

.contact-shell {
  width: min(1080px, calc(100% - 2rem));
}

.contact-hero {
  max-width: 760px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.contact-hero h1 {
  margin-bottom: 0.9rem;
}

.contact-hero p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  color: #d7cdea;
  font-size: 0.9rem;
  font-weight: 850;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 11rem;
}

.contact-form input:focus,
.contact-form textarea:focus,
.option-card:focus-within {
  outline: 0;
  border-color: rgba(183, 99, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(183, 99, 255, 0.14);
}

.form-status {
  margin: 0;
  color: #62f0a4;
  font-weight: 800;
  line-height: 1.5;
}

.contact-side h2 {
  margin: 0.7rem 0;
}

.contact-side ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.contact-points {
  display: grid;
  gap: 0.7rem;
}

.contact-points li {
  line-height: 1.55;
}

.contact-side p {
  color: var(--muted);
  line-height: 1.65;
}

.error-text {
  color: var(--danger) !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 4, 10, 0.7);
  backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1a1525;
  padding: 1.4rem;
  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.45);
}

.modal-card h2 {
  margin: 0.5rem 0;
}

.modal-card p {
  color: var(--muted);
  line-height: 1.55;
}

.auth-social {
  display: grid;
  gap: 0.95rem;
  margin-top: 1rem;
}

.auth-google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font-size: 0.98rem;
  font-weight: 800;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.auth-google-button svg {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
}

.auth-google-button:hover:not(:disabled) {
  border-color: rgba(183, 99, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.auth-google-button:disabled {
  opacity: 0.68;
  cursor: wait;
}

.auth-divider {
  position: relative;
  display: grid;
  place-items: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  padding: 0 0.8rem;
  background: #1a1525;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
}

.modal-card form {
  display: grid;
  gap: 0.85rem;
}

.modal-card label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.modal-card input,
.auth-page-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  background: var(--card);
  color: var(--fg);
  font: inherit;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 4.8rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  font-size: 1rem;
  font-weight: 800;
}

.password-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.password-toggle:hover:not(:disabled) {
  background: rgba(183, 99, 255, 0.18);
}

.modal-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.check-label {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 0.55rem !important;
}

.check-label input {
  width: auto;
  margin-top: 0.2rem;
}

.check-label a {
  color: #66b8ff;
}

.auth-remember-wrap {
  margin-top: -0.15rem;
  color: rgba(246, 242, 255, 0.82);
  font-size: 0.92rem;
}

.auth-page-form {
  display: grid;
  gap: 0.9rem;
}

.auth-page-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-weight: 750;
}

.error-text {
  color: var(--danger) !important;
}

.auth-switch {
  margin-top: 0.9rem;
}

.auth-pending {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(183, 99, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(183, 99, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.auth-pending h3 {
  margin: 0;
}

.auth-pending p {
  margin: 0;
}

.auth-pending-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(183, 99, 255, 0.14);
  color: var(--primary);
  font-size: 1.3rem;
}

.auth-pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.auth-note {
  margin-bottom: 0;
  font-size: 0.82rem;
}

.auth-inline-status {
  margin: 0.1rem 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #66b8ff;
}

.auth-inline-status.error-text {
  color: var(--danger);
}

.content-section p,
.faq p {
  color: var(--muted);
  line-height: 1.6;
}

.faq {
  display: grid;
  gap: 0.85rem;
}

.faq details {
  padding: 1rem 1.15rem;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.faq details:hover,
.faq details[open] {
  border-color: rgba(102, 184, 255, 0.5);
  background: rgba(102, 184, 255, 0.08);
}

.faq details:hover {
  transform: translateY(-1px);
}

.faq summary {
  cursor: pointer;
  transition: color 0.18s ease;
}

.faq summary:hover,
.faq details[open] summary {
  color: #66b8ff;
}

.faq p {
  margin-bottom: 0;
}

.features article,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 1.3rem;
}

.features div {
  font-size: 1.55rem;
}

.features h3,
.panel h3 {
  margin: 0.65rem 0 0.35rem;
}

.features p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.results {
  display: grid;
  gap: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.results.result-ready {
  opacity: 1;
  transform: translateY(0);
}

.results-deck {
  display: grid;
  gap: 1rem;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.results-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.panel-head h3 {
  margin: 0;
}

.summary-panel {
  border-color: rgba(102, 184, 255, 0.58);
  background:
    linear-gradient(180deg, rgba(102, 184, 255, 0.14), rgba(29, 24, 41, 0.94)),
    var(--card);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(102, 184, 255, 0.08) inset;
}

.summary-panel .panel-head {
  align-items: flex-start;
}

#summary {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

#summary li {
  margin: 0;
  padding: 1.05rem;
  border: 1px solid rgba(102, 184, 255, 0.28);
  border-radius: 8px;
  background: rgba(102, 184, 255, 0.08);
}

#summary li p {
  margin: 0;
  color: #eef7ff;
  font-size: 1.02rem;
  line-height: 1.7;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(183, 99, 255, 0.14);
}

li {
  margin: 0.65rem 0;
  color: #ddd6eb;
  line-height: 1.55;
}

.cards,
.quiz {
  display: grid;
  gap: 0.8rem;
}

.question {
  position: relative;
  padding: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(141, 98, 255, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(31, 25, 48, 0.95), rgba(19, 16, 30, 0.98)),
    var(--card-2);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.question-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.question-topline span,
.question-topline small {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  font-weight: 850;
}

.question-topline span {
  background: rgba(183, 99, 255, 0.12);
  color: #ddc3ff;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-topline small {
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #b8afc6;
  font-size: 0.78rem;
}

.question strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 1.06rem;
  line-height: 1.5;
}

.question p {
  margin: 0.35rem 0;
  color: var(--muted);
  line-height: 1.5;
}

.options {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.98rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font-weight: 650;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.option span {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(183, 99, 255, 0.18);
  color: var(--primary);
  font-size: 0.82rem;
}

.option:hover:not(:disabled),
.option.selected {
  border-color: var(--primary);
  background: rgba(183, 99, 255, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(41, 25, 77, 0.16);
}

.option.correct {
  border-color: rgba(60, 220, 140, 0.8);
  background: rgba(60, 220, 140, 0.14);
}

.option.correct span {
  background: rgba(60, 220, 140, 0.2);
  color: #62f0a4;
}

.option.wrong {
  border-color: rgba(255, 95, 134, 0.85);
  background: rgba(255, 95, 134, 0.14);
}

.option.wrong span {
  background: rgba(255, 95, 134, 0.18);
  color: #ff7b9c;
}

.mark {
  margin-left: auto;
  font-size: 1.35rem;
}

.check {
  color: #62f0a4;
}

.cross {
  color: #ff7b9c;
}

.submit-quiz {
  justify-self: stretch;
  width: 100%;
  min-height: 3.35rem;
  margin-top: 0.4rem;
}

.submit-quiz:disabled {
  cursor: default;
  opacity: 0.65;
}

.quiz-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  justify-self: stretch;
  border: 1px solid rgba(98, 240, 164, 0.34);
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(84, 214, 138, 0.14), rgba(40, 89, 62, 0.2));
  color: var(--fg);
  font-weight: 850;
}

.quiz-score span {
  color: #62f0a4;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quiz-score strong {
  font-size: 2rem;
  line-height: 1;
}

.quiz-score p {
  margin: 0;
  color: #dfffea;
  font-weight: 700;
  line-height: 1.45;
}

.quiz-score button {
  flex: 0 0 auto;
}

.quiz-intro-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(183, 99, 255, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(141, 98, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(34, 27, 52, 0.96), rgba(18, 15, 28, 0.98));
}

.quiz-intro-card span {
  color: #d7c0ff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiz-intro-card strong {
  font-size: 1.02rem;
}

.quiz-intro-card p {
  margin: 0;
  color: #c5bdd3;
  line-height: 1.55;
}

.retention-hint {
  margin: 0.1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(183, 99, 255, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: #cfc5df;
  font-size: 0.92rem;
  line-height: 1.5;
}

.flashcard {
  min-height: 290px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  cursor: pointer;
  perspective: 1000px;
  outline: none;
}

.flashcard:focus-visible .flashcard-inner {
  box-shadow: 0 0 0 3px rgba(183, 99, 255, 0.45);
}

.flashcard-inner {
  position: relative;
  width: 100%;
  min-height: 290px;
  transition: transform 0.55s ease;
  transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
  min-height: 290px;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(141, 98, 255, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(35, 28, 52, 0.96), rgba(27, 22, 39, 0.96)),
    var(--card-2);
  backface-visibility: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}

.flashcard-face-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.flashcard-back {
  background:
    radial-gradient(circle at bottom left, rgba(96, 141, 255, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(72, 44, 105, 0.96), rgba(35, 27, 55, 0.96)),
    var(--card-2);
  transform: rotateY(180deg);
}

.flashcard-face span {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.flashcard-face em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.85rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #cbc2db;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
}

.flashcard-face strong {
  font-size: 1.14rem;
  line-height: 1.48;
}

.flashcard-face p {
  margin: 0;
  color: #eee8f7;
  font-size: 1.03rem;
  line-height: 1.55;
}

.flashcard-face small {
  color: var(--muted);
}

.single-flashcard {
  width: 100%;
}

.flashcard-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.3rem;
}

.flashcard-controls.mobile-only-controls {
  justify-content: center;
}

.flashcard-mobile-status {
  display: inline-grid;
  justify-items: center;
  gap: 0.15rem;
}

.flashcard-mobile-status strong {
  font-size: 1.1rem;
  color: var(--fg);
}

.flashcard-mobile-status small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.flashcard-controls span {
  min-width: 5.5rem;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.flashcard-pager {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.flashcard-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.flashcard-dot.active {
  width: 1.55rem;
  background: linear-gradient(135deg, #b363ff, #7c5cff);
}

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer strong {
  color: var(--fg);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-logo-avatar {
  width: 2.6rem;
  height: 2.6rem;
}

.brand-link,
.footer-brand strong:not(.brand-name) {
  display: none;
}

.footer p {
  margin: 0.35rem 0 0;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--fg);
}

.muted-text {
  color: var(--muted);
}

.mobile-tabbar {
  display: none;
}

.hidden {
  display: none !important;
}

/* Rounded UI pass */
button,
.button-link,
.secondary-button,
.small-primary,
select,
input,
textarea,
.menu-toggle,
.logo,
.app-nav,
.status,
.notice,
.paywall,
.drop-zone,
.upload-icon,
.controls,
.option-card,
.usage-card article,
.loading-panel-card,
.loading-steps li,
.mini-card,
.demo-option,
.steps-grid article,
.audience-grid article,
.difference-grid article,
.trust-grid article,
.pricing-card,
.faq details,
.admin-stats article,
.admin-table-wrap,
.admin-user-row,
.empty-state,
.saved-card,
.dashboard-sidebar,
.dashboard-panel,
.dashboard-hero-card,
.quick-action-card,
.dashboard-quote,
.dashboard-avatar,
.dashboard-avatar-soft,
.study-primary-card,
.study-upload-preview,
.study-progress-ring,
.dashboard-set-row,
.study-set-large-row,
.set-icon,
.set-progress,
.profile-dropdown,
.profile-avatar-large,
.profile-form,
.profile-plan-card,
.settings-list article,
.modal-card,
.modal-close,
.study-set-picker-item,
.mobile-tabbar,
.mobile-tabbar-item,
.question,
.option,
.quiz-score,
.retention-hint,
.flashcard,
.flashcard-face,
.flashcard-controls button,
.footer-logo {
  border-radius: var(--radius-md);
}

.loading-progress,
.set-mini-progress,
.pill,
.popular-badge,
.plan-label,
.role-pill,
.control-hint,
.controls-file,
.study-hint,
.mobile-tabbar-item span {
  border-radius: var(--radius-sm);
}

.mobile-tabbar,
.controls.controls-modal-open,
.pricing-modal-shell,
.loading-panel-card {
  border-radius: var(--radius-lg);
}

@media (max-width: 1180px) {
  .account-dashboard {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .study-home {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .dashboard-library-layout,
  .dashboard-overview-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-rail {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 0;
  }

  .dashboard-quote,
  .goal-card {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .account-mobile-nav,
  .account-app-nav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    width: 100%;
    max-width: none;
    margin-top: 0;
  }

  .account-dashboard,
  .study-home {
    grid-template-columns: 1fr;
    width: calc(100% - 1rem);
    max-width: none;
    min-height: auto;
    padding: 1rem 0 2rem;
  }

  .dashboard-sidebar {
    display: none;
  }

  .account-mobile-nav .menu-toggle,
  .account-app-nav .menu-toggle {
    display: grid;
    align-content: center;
    grid-column: 1;
    justify-self: start;
  }

  .account-mobile-nav .brand,
  .account-app-nav .account-nav-brand {
    grid-column: 2;
    justify-self: start;
    margin-right: 0;
  }

  .account-mobile-nav .nav-links,
  .account-app-nav .nav-links {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 65;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0.8rem;
    width: min(23rem, calc(100vw - 1.5rem));
    padding: 1.15rem 1rem 1rem;
    border: 1px solid rgba(183, 99, 255, 0.2);
    border-radius: 26px;
    background:
      radial-gradient(circle at top left, rgba(124, 92, 255, 0.28), transparent 32%),
      linear-gradient(180deg, rgba(24, 20, 38, 0.995), rgba(10, 10, 22, 0.99));
    box-shadow:
      0 28px 80px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(183, 99, 255, 0.06) inset;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-20px);
    transition:
      opacity 0.24s ease,
      transform 0.24s ease,
      visibility 0.24s ease;
  }

  .nav-menu-footer {
    margin-top: auto;
    margin-left: 0;
    padding-left: 0;
    padding-top: 1rem;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .account-mobile-nav .nav-links.open,
  .account-app-nav .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  body.mobile-menu-open .account-app-nav .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .account-mobile-nav .nav-links > a,
  .account-mobile-nav .nav-links > button,
  .account-app-nav .nav-links > a,
  .account-app-nav .nav-links > button {
    display: none;
  }

  .profile-menu,
  .profile-menu summary {
    width: 100%;
  }

  .profile-dropdown {
    position: static;
    width: 100%;
    margin-top: 0.45rem;
  }

  .dashboard-topbar {
    min-height: auto;
    padding: 1.2rem 0.5rem 0.4rem;
  }

  .dashboard-hero-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .dashboard-hero-visual {
    min-height: 190px;
  }

  .dashboard-rail {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(183, 99, 255, 0.18), transparent 28rem),
      var(--bg);
  }

  .nav {
    align-items: center;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    width: 100%;
    max-width: none;
    min-height: auto;
    margin-top: 0;
    padding: 0.85rem 1rem;
  }

  .menu-toggle {
    display: grid;
    align-content: center;
  }

  .brand {
    justify-self: center;
    margin-right: 2.6rem;
  }

  .nav-links {
    grid-column: 1 / -1;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(29, 24, 41, 0.92);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a,
  .nav-links button,
  .nav-links .eyebrow,
  .user-chip {
    width: 100%;
    text-align: left;
  }

  .nav-links a,
  .nav-links button {
    padding: 0.72rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
  }

  .user-chip {
    justify-content: flex-start;
  }

  .nav-links .small-primary {
    text-align: center;
  }

  .nav-links .eyebrow {
    padding: 0.35rem 0.8rem 0;
  }

  .nav-greeting,
  .plan-badge {
    padding: 0.55rem 0.8rem;
  }

  .account-dashboard {
    width: calc(100% - 1rem);
    max-width: none;
    padding-top: 0.75rem;
  }

  .dashboard-topbar,
  .dashboard-top-actions,
  .dashboard-quick-actions,
  .dashboard-section-head,
  .dashboard-set-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .dashboard-topbar {
    gap: 1rem;
  }

  .dashboard-top-actions .button-link,
  .quick-action-card {
    width: 100%;
  }

  .dashboard-hero-card,
  .dashboard-panel,
  .quick-action-card,
  .dashboard-quote {
    padding: 1rem;
  }

  .dashboard-hero-copy h2 {
    font-size: 2rem;
  }

  .dashboard-hero-visual {
    display: none;
  }

  .dashboard-stat-list article,
  .quick-action-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .quick-action-card em {
    display: none;
  }

  .dashboard-set-row {
    position: relative;
    padding-left: 3.8rem;
  }

  .dashboard-set-row .set-icon {
    position: absolute;
    left: 0;
    top: 0.85rem;
  }

  .dashboard-set-row .set-progress {
    width: max-content;
  }

  .study-greeting,
  .study-primary-card,
  .study-quick-actions,
  .study-progress-panel,
  .app-detail-grid,
  .study-set-large-row {
    grid-template-columns: 1fr;
  }

  .study-greeting {
    align-items: stretch;
    flex-direction: column;
  }

  .study-primary-card {
    min-height: auto;
  }

  .dashboard-overview-stats {
    grid-template-columns: 1fr 1fr;
  }

  .study-upload-preview,
  .study-progress-ring {
    justify-self: stretch;
    width: 100%;
    min-height: 160px;
  }

  .study-primary-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .study-primary-actions .button-link,
  .study-primary-actions .secondary-link {
    width: 100%;
  }

  .profile-avatar-editor {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-avatar-large {
    justify-self: center;
  }

  .settings-list article {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-plan-card {
    align-items: stretch;
    flex-direction: column;
  }

  .blue-upgrade-button {
    width: 100%;
  }

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

  .steps-grid,
  .audience-grid,
  .difference-grid,
  .trust-grid,
  .pricing-grid,
  .demo-grid,
  .loading-steps,
  .loading-panel-card {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .controls-head,
  .quiz-mode-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .controls-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .quiz-mode-card {
    grid-column: auto;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions,
  .paywall-actions,
  .results-actions,
  .saved-card,
  .section-cta {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2.15rem, 11vw, 3.4rem);
    letter-spacing: -0.03em;
  }

  .shell {
    width: min(100% - 1rem, 920px);
    padding: 2rem 0;
  }

  .intro {
    margin-bottom: 1.4rem;
  }

  .intro p {
    font-size: 1rem;
    line-height: 1.55;
  }

  .content-section,
  .features,
  .saved-sets,
  .admin-panel {
    margin-top: 2.1rem;
  }

  .drop-zone {
    min-height: 210px;
    padding: 1.25rem;
    text-align: center;
  }

  .upload-icon {
    width: 3.7rem;
    height: 3.7rem;
  }

  .feature-showcase {
    min-height: auto;
    padding: 1.1rem;
  }

  .feature-copy {
    max-width: none;
  }

  .feature-art {
    opacity: 0.72;
    transform: scale(0.88);
    transform-origin: bottom right;
  }

  #howItWorksSection,
  #chatgptDifferenceSection {
    display: none;
  }

  #pricing .section-head {
    margin-bottom: 1rem;
  }

  .pricing-grid {
    grid-auto-flow: column;
    grid-auto-columns: minmax(82%, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    gap: 0.9rem;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .pricing-grid::-webkit-scrollbar {
    display: none;
  }

  .pricing-card {
    scroll-snap-align: start;
    min-width: 0;
  }

  .drop-zone,
  .feature-showcase,
  .homepage-extra .panel,
  .homepage-extra .pricing-card,
  .homepage-extra .audience-grid article,
  .homepage-extra .faq details,
  .homepage-extra .section-cta,
  .notice,
  .paywall,
  .usage-card article {
    border-radius: 24px;
  }

  .drop-zone {
    border-color: rgba(183, 99, 255, 0.58);
    background:
      linear-gradient(180deg, rgba(49, 35, 79, 0.98), rgba(23, 18, 37, 0.98)),
      rgba(255, 255, 255, 0.04);
    box-shadow:
      0 20px 64px rgba(0, 0, 0, 0.34),
      0 0 0 1px rgba(183, 99, 255, 0.12) inset;
  }

  .feature-showcase,
  .homepage-extra .panel,
  .homepage-extra .pricing-card,
  .homepage-extra .audience-grid article,
  .homepage-extra .faq details {
    border-color: rgba(183, 99, 255, 0.16);
    background:
      linear-gradient(180deg, rgba(48, 35, 74, 0.98), rgba(24, 19, 36, 0.98)),
      rgba(255, 255, 255, 0.04);
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.22),
      0 0 0 1px rgba(183, 99, 255, 0.06) inset;
  }

  .homepage-extra .pricing-card.featured-plan,
  .homepage-extra .feature-summary,
  .homepage-extra .feature-flashcards,
  .homepage-extra .feature-quiz {
    border-color: rgba(183, 99, 255, 0.28);
  }

  .hero-actions button,
  .feature-cta,
  .pricing-cta,
  .section-cta button {
    border-radius: 999px;
  }

  .panel,
  .features article,
  .question,
  .pricing-card,
  .steps-grid article,
  .audience-grid article,
  .difference-grid article,
  .trust-grid article {
    padding: 1rem;
  }

  .section-head h2 {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
  }

  .section-head {
    margin-bottom: 0.85rem;
  }

  .admin-stats,
  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .admin-user-meta {
    flex-wrap: wrap;
  }

  .section-cta {
    margin-top: 0.85rem;
  }

  .section-cta button {
    width: 100%;
  }

  .usage-card {
    grid-template-columns: 1fr;
  }

  .option {
    align-items: flex-start;
    padding: 0.8rem;
  }

  .flashcard,
  .flashcard-inner,
  .flashcard-face {
    min-height: 300px;
  }

  .flashcard-controls,
  .status-actions,
  .footer,
  .footer-links {
    align-items: stretch;
    flex-direction: column;
  }

  .flashcard-controls button,
  .status-actions button,
  .panel-head button,
  .results-head button,
  .hero-actions button,
  .paywall-actions button,
  .saved-card button,
  .section-cta button {
    width: 100%;
  }

  .footer {
    width: min(100% - 1rem, 920px);
  }
}

/* Mobile polish pass */
@media (max-width: 820px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    min-width: 0;
  }

  .nav,
  .account-app-nav {
    grid-template-columns: 2.45rem minmax(0, 1fr) 2.45rem;
    align-items: center;
    padding: 0.8rem 0.9rem;
    border-radius: 0;
    background:
      radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.1), transparent 20rem),
      linear-gradient(180deg, rgba(18, 15, 28, 0.76), rgba(18, 15, 28, 0.44));
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
  }

  .brand,
  .account-app-nav .account-nav-brand,
  .account-nav-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
    justify-self: center;
    min-width: auto;
    max-width: none;
    margin: 0;
  }

  .brand-link,
  .dashboard-brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-link,
  .account-nav-brand .brand-name {
    display: none;
  }

  .nav .brand-lockup .logo-avatar,
  .account-app-nav .brand-lockup .logo-avatar {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    padding: 0.38rem;
    border: 1px solid rgba(183, 99, 255, 0.24);
    border-radius: 999px;
    background:
      radial-gradient(circle at 30% 28%, rgba(183, 99, 255, 0.16), transparent 62%),
      rgba(255, 255, 255, 0.045);
    box-shadow:
      0 10px 20px rgba(6, 8, 18, 0.28),
      0 0 0 1px rgba(183, 99, 255, 0.07) inset;
  }

  .mobile-drawer-brand.brand-lockup .logo-avatar {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-drawer-brand.brand-lockup .brand-name {
    display: inline-block;
    font-size: 1.7rem;
  }

  .nav .brand-lockup .logo-avatar {
    display: none;
  }

  .nav .brand-lockup .brand-name {
    display: inline-block;
    font-size: 1.5rem;
  }

  .menu-toggle {
    width: 2.45rem;
    height: 2.45rem;
    grid-column: 1;
    justify-self: start;
  }

  .nav-links,
  .account-app-nav .nav-links {
    grid-column: 3;
    justify-self: end;
  }

  .mobile-login-door {
    width: 2.45rem;
    height: 2.45rem;
    display: inline-grid;
    place-items: center;
    padding: 0;
    grid-column: 3;
    justify-self: end;
    border: 1px solid rgba(183, 99, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #f2ebff;
    box-shadow: 0 0 0 1px rgba(183, 99, 255, 0.05) inset;
  }

  .mobile-login-door svg {
    width: 1.15rem;
    height: 1.15rem;
  }

  .mobile-account-menu {
    position: relative;
    z-index: 70;
    display: grid;
    grid-column: 3;
    justify-self: end;
  }

  .mobile-account-trigger {
    width: 2.45rem;
    height: 2.45rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(183, 99, 255, 0.24);
    border-radius: 999px;
    background:
      linear-gradient(135deg, rgba(183, 99, 255, 0.2), rgba(44, 140, 255, 0.1)),
      rgba(255, 255, 255, 0.045);
    color: #f8f3ff;
    box-shadow:
      0 12px 26px rgba(0, 0, 0, 0.22),
      0 0 0 1px rgba(183, 99, 255, 0.08) inset;
    cursor: pointer;
  }

  .mobile-account-avatar {
    width: 2.05rem;
    height: 2.05rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 999px;
    background:
      radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), transparent 28%),
      linear-gradient(135deg, #7c5cff, #2c8cff);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 950;
    line-height: 1;
  }

  .mobile-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .mobile-account-dropdown {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    width: min(15.5rem, calc(100vw - 1.5rem));
    display: grid;
    gap: 0.2rem;
    padding: 0.55rem;
    border: 1px solid rgba(183, 99, 255, 0.2);
    border-radius: 18px;
    background:
      radial-gradient(circle at top right, rgba(124, 92, 255, 0.16), transparent 34%),
      linear-gradient(180deg, rgba(22, 18, 34, 0.98), rgba(10, 9, 17, 0.98));
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.36);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.4rem) scale(0.98);
    transform-origin: top right;
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0.18s ease;
  }

  .mobile-account-menu.open .mobile-account-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .mobile-account-summary {
    min-width: 0;
    padding: 0.62rem 0.7rem 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .mobile-account-summary strong,
  .mobile-account-summary span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-account-summary strong {
    color: #fff;
    font-size: 0.92rem;
    line-height: 1.2;
  }

  .mobile-account-summary span {
    margin-top: 0.15rem;
    color: rgba(236, 229, 248, 0.68);
    font-size: 0.78rem;
  }

  .mobile-account-dropdown a,
  .mobile-account-dropdown button {
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 2.45rem;
    padding: 0.62rem 0.7rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(245, 239, 255, 0.9);
    text-decoration: none;
    text-align: left;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
  }

  .mobile-account-dropdown a:hover,
  .mobile-account-dropdown button:hover {
    background: rgba(255, 255, 255, 0.055);
    color: #fff;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .shell,
  .uploader,
  .results,
  .results-deck,
  .controls,
  .loading-panel-card,
  .study-home,
  .study-home-content,
  .dashboard-layout,
  .dashboard-panel,
  .study-primary-card,
  .study-set-large-row,
  .study-set-card {
    max-width: 100%;
    min-width: 0;
  }

  .account-app-nav .nav-links {
    display: none !important;
  }

  .mobile-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    display: block;
    width: min(82vw, 21rem);
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: -webkit-fill-available;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0 22px 0 0;
    background:
      radial-gradient(circle at top left, rgba(124, 92, 255, 0.14), transparent 28%),
      linear-gradient(180deg, rgba(12, 12, 22, 0.995), rgba(7, 8, 18, 0.995));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: auto;
    color: #f5efff;
    transform: translateX(-108%);
    transition: transform 0.28s ease;
  }

  .mobile-drawer,
  .mobile-drawer * {
    opacity: 1 !important;
    visibility: visible;
    color: inherit;
    -webkit-text-fill-color: currentColor !important;
    text-shadow: none !important;
    font-size: 16px;
    line-height: 1.35;
  }

  .mobile-drawer.open {
    transform: translateX(0);
  }

  .mobile-drawer-sheet {
    display: flex;
    flex-direction: column;
    height: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 100%;
    min-height: -webkit-fill-available;
    padding: 0.78rem 0.72rem max(0.72rem, env(safe-area-inset-bottom));
  }

  .mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
  }

  .mobile-drawer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
  }

  .mobile-drawer-brand img {
    border-radius: 0;
  }

  .mobile-drawer-brand strong:not(.brand-name) {
    display: none;
  }

  .mobile-drawer-close {
    width: auto;
    height: auto;
    display: inline-block;
    place-items: unset;
    padding: 0.1rem 0.2rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
  }

  .mobile-drawer-scroller {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.1rem;
  }

  .mobile-drawer-section {
    display: grid;
    gap: 0.24rem;
    padding: 0.54rem 0 0.64rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .mobile-drawer-section:last-child {
    border-bottom: 0;
  }

  .mobile-drawer-label {
    display: block;
    padding: 0 0.1rem 0.2rem;
    color: rgba(236, 229, 248, 0.52);
    -webkit-text-fill-color: rgba(236, 229, 248, 0.52) !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-drawer-link,
  .mobile-drawer-action {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    width: 100%;
    padding: 0.58rem 0.72rem;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: rgba(245, 239, 255, 0.8);
    -webkit-text-fill-color: #f5efff !important;
    text-decoration: none;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-drawer-action {
    border: 0;
    font: inherit;
  }

  .mobile-drawer-icon {
    display: inline-grid;
    place-items: center;
    width: 1.1rem;
    min-width: 1.1rem;
    color: rgba(193, 132, 255, 0.82);
    -webkit-text-fill-color: rgba(193, 132, 255, 0.82) !important;
    font-size: 0.92rem;
  }

  .mobile-drawer-link.active,
  .mobile-drawer-link:hover,
  .mobile-drawer-action:hover {
    border-color: rgba(183, 99, 255, 0.28);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
  }

  .mobile-drawer-footer {
    display: grid;
    gap: 0.48rem;
    padding-top: 0.58rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .mobile-drawer-user-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.78rem 0.85rem;
    border: 1px solid rgba(183, 99, 255, 0.14);
    border-radius: 16px;
    background:
      radial-gradient(circle at top left, rgba(183, 99, 255, 0.1), transparent 48%),
      linear-gradient(180deg, rgba(39, 29, 64, 0.96), rgba(18, 15, 31, 0.96));
    color: #fff;
    -webkit-text-fill-color: #fff !important;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  }

  .mobile-drawer-user-card .dashboard-avatar {
    flex: 0 0 auto;
    width: 2.55rem;
    height: 2.55rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(183, 99, 255, 0.28), rgba(124, 92, 255, 0.16));
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    border: 1px solid rgba(183, 99, 255, 0.3);
    color: #fff;
  }

  .mobile-drawer-user-card .dashboard-avatar.has-avatar {
    background-color: transparent;
  }

  .mobile-drawer-user-card div {
    min-width: 0;
    flex: 1 1 auto;
  }

  .mobile-drawer-user-card small,
  .mobile-drawer-user-card span {
    display: block;
    color: rgba(236, 229, 248, 0.82);
    font-size: 12px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-drawer-user-card small {
    margin-bottom: 0.12rem;
    color: #d7bcff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .mobile-drawer-user-card strong {
    display: block;
    margin: 0.08rem 0;
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-drawer-user-card em {
    font-style: normal;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.72);
    padding-left: 0.15rem;
  }

  .mobile-drawer-logout {
    justify-self: start;
    padding: 0.1rem 0.15rem 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
  }

  .profile-menu summary {
    justify-content: flex-start;
    min-height: 2.8rem;
  }

  .profile-dropdown {
    box-shadow: none;
  }

  .shell,
  .account-dashboard,
  .study-home,
  .footer {
    width: calc(100% - 1rem);
  }

  .shell {
    padding: 1.2rem 0 6rem;
  }

  .intro {
    margin-bottom: 1.1rem;
    text-align: left;
    padding: 0 0.2rem;
  }

  .pill {
    align-self: flex-start;
  }

  h1,
  .study-greeting h1,
  .study-primary-copy h2,
  .pricing-modal-shell h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .study-greeting {
    gap: 0.85rem;
    padding: 0.75rem 0.15rem 0;
  }

  .study-hint {
    max-width: none;
    width: 100%;
  }

  .study-primary-card,
  .dashboard-panel,
  .profile-form,
  .profile-plan-card,
  .settings-list,
  .settings-preferences,
  .pricing-modal-shell {
    padding: 1rem;
  }

  .settings-preferences {
    grid-template-columns: 1fr;
  }

  .dashboard-overview-stats {
    grid-template-columns: 1fr;
  }

  .study-primary-copy h2 {
    font-size: 2rem;
  }

  .study-primary-copy p,
  .study-greeting p,
  .intro p {
    font-size: 0.98rem;
  }

  .hero-actions {
    justify-content: stretch;
  }

  .hero-actions button,
  .hero-actions a {
    width: 100%;
  }

  .uploader {
    display: grid;
    gap: 1rem;
  }

  .study-upload-preview,
  .study-progress-ring {
    width: 100%;
    min-height: 150px;
  }

  .study-upload-preview span {
    width: 3.4rem;
    height: 3.4rem;
  }

  .study-quick-actions,
  .app-detail-grid,
  .study-progress-panel,
  .pricing-grid,
  .demo-grid,
  .features,
  .usage-card,
  .controls,
  .loading-steps {
    grid-template-columns: 1fr;
  }

  .quick-action-card {
    min-height: auto;
  }

  .dashboard-section-head {
    gap: 0.75rem;
  }

  .dashboard-section-head a,
  .dashboard-section-head button {
    width: 100%;
    justify-content: center;
  }

  .dashboard-set-row,
  .study-set-large-row {
    position: relative;
    grid-template-columns: 1fr;
    padding: 1rem;
    padding-left: 4.1rem;
  }

  .dashboard-set-row .set-icon,
  .study-set-large-row .set-icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
  }

  .set-continue,
  .set-progress {
    width: 100%;
  }

  .set-mini-progress {
    width: 100%;
  }

  .study-set-row-actions,
  .focused-study-set {
    justify-content: stretch;
  }

  .study-set-row-actions > * {
    width: 100%;
  }

  .profile-avatar-editor {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-avatar-large {
    justify-self: center;
    width: 5.5rem;
    height: 5.5rem;
  }

  .profile-form-actions,
  .profile-plan-card,
  .settings-list article,
  .quiz-score,
  .results-actions,
  .status-actions,
  .paywall-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-form-actions button,
  .profile-avatar-editor button,
  .blue-upgrade-button,
  .quiz-score button,
  .status-actions button,
  .paywall-actions button,
  .results-actions button,
  .results-actions a {
    width: 100%;
  }

  .profile-form input,
  .profile-form select,
  select,
  input,
  button,
  .button-link,
  .secondary-button {
    min-width: 0;
  }

  .drop-zone {
    min-height: 250px;
    padding: 1.4rem 1.2rem;
    border-style: solid;
    border-color: rgba(183, 99, 255, 0.42);
    background:
      linear-gradient(180deg, rgba(33, 26, 49, 0.98), rgba(20, 17, 30, 0.98)),
      rgba(255, 255, 255, 0.03);
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.34),
      0 0 0 1px rgba(183, 99, 255, 0.08) inset;
  }

  .drop-zone strong {
    font-size: 1.55rem;
    line-height: 1.18;
  }

  .drop-zone span {
    font-size: 1rem;
  }

  .drop-zone small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    margin-top: 0.2rem;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: rgba(183, 99, 255, 0.12);
  }

  .controls.controls-screen-open {
    width: 100%;
    padding: 1rem;
    border-radius: 24px;
  }

  .controls.controls-modal-open {
    position: fixed;
    inset: 50% auto auto 50%;
    z-index: 120;
    width: min(29rem, calc(100% - 1rem));
    max-height: calc(100dvh - 1.25rem);
    gap: 0.75rem;
    padding: 0.9rem;
    border-radius: 26px;
    transform: translate(-50%, -50%);
    touch-action: auto;
  }

  .controls.controls-modal-open .controls-head {
    padding-bottom: 0.7rem;
  }

  .controls.controls-modal-open .controls-head span {
    font-size: 1.08rem;
  }

  .controls.controls-modal-open .controls-head p {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .controls.controls-modal-open .controls-file {
    padding: 0.78rem 0.86rem;
    font-size: 0.84rem;
  }

  .controls.controls-modal-open .option-card {
    gap: 0.4rem;
    padding: 0.76rem;
    border-radius: 16px;
  }

  .controls.controls-modal-open .option-title {
    font-size: 0.88rem;
  }

  .controls.controls-modal-open .option-copy {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .controls.controls-modal-open select {
    min-height: 3rem;
    padding: 0.72rem 0.8rem;
    font-size: 0.94rem;
  }

  .controls.controls-modal-open .controls-actions {
    padding-top: 0.1rem;
  }

  .controls.controls-modal-open #mobileControlsSubmit,
  .controls.controls-modal-open .controls-close {
    min-height: 3rem;
  }

  .controls.controls-screen-open .controls-head > div {
    min-width: 0;
  }

  .controls.controls-screen-open .controls-head span {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.15rem;
  }

  .controls.controls-screen-open .controls-head p {
    max-width: none;
    font-size: 0.92rem;
  }

  .loading-panel-card {
    grid-template-columns: 1fr;
    text-align: center;
    width: min(26rem, 100%);
    padding: 1.5rem 1.2rem;
  }

  .loader-ring {
    width: 4.8rem;
    height: 4.8rem;
    margin: 0 auto;
  }

  .loading-steps li {
    text-align: left;
  }

  .results {
    gap: 1rem;
  }

  .results-deck {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .results-screen,
  .results-deck .notice {
    min-height: auto;
    scroll-snap-align: none;
    width: 100%;
  }

  .dashboard-overview-shell {
    padding: 1rem;
    border-radius: 22px;
  }

  .dashboard-overview-copy h2 {
    font-size: 1.72rem;
    line-height: 1.08;
  }

  .dashboard-overview-copy p {
    font-size: 0.95rem;
  }

  .dashboard-overview-stats {
    grid-auto-columns: minmax(132px, 148px);
  }

  .study-sets-list-shell {
    padding: 0.95rem;
    border-radius: 22px;
  }

  .study-sets-list-head {
    align-items: flex-end;
    flex-wrap: wrap;
  }

  .study-sets-head-link {
    min-height: 2.1rem;
    padding: 0.5rem 0.78rem;
    font-size: 0.84rem;
  }

  .study-set-mobile-card {
    padding: 0.85rem;
    border-radius: 18px;
  }

  .study-set-mobile-body h3 {
    font-size: 0.96rem;
  }

  .study-set-mobile-body p,
  .study-set-mobile-body small {
    font-size: 0.84rem;
  }

  .study-sets-fab {
    display: grid;
  }

  .retention-hint.results-screen {
    display: flex;
    align-items: center;
    min-height: 9rem;
  }

  .results-head h2 {
    font-size: 1.7rem;
    line-height: 1.08;
  }

  .results-head p {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .panel,
  .summary-panel {
    padding: 1rem;
    border-radius: 18px;
  }

  .summary-panel .panel-head,
  .panel-head,
  .results-head {
    align-items: stretch;
    gap: 0.68rem;
  }

  #summary li {
    padding: 0.9rem;
    border-radius: 16px;
  }

  #summary li p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .question {
    padding: 0.9rem;
    border-radius: 18px;
  }

  .question strong {
    font-size: 1rem;
    line-height: 1.45;
  }

  .option {
    align-items: flex-start;
    gap: 0.62rem;
    padding: 0.78rem;
    font-size: 0.92rem;
    line-height: 1.4;
    white-space: normal;
  }

  .option span {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 10px;
    font-size: 0.76rem;
    margin-top: 0.05rem;
  }

  .mark {
    align-self: center;
    font-size: 1.12rem;
  }

  .flashcard,
  .flashcard-inner,
  .flashcard-face {
    min-height: 270px;
  }

  .flashcard-face {
    justify-content: flex-start;
    padding: 1rem;
    gap: 0.68rem;
    overflow: auto;
  }

  .flashcard-face strong {
    font-size: 1rem;
    line-height: 1.5;
  }

  .flashcard-face p {
    font-size: 0.96rem;
    line-height: 1.58;
  }

  .flashcard-face small {
    font-size: 0.82rem;
  }

  .flashcard-controls {
    width: 100%;
    gap: 0.5rem;
  }

  .flashcard-controls button {
    flex: 1;
  }

  .flashcard-controls.mobile-only-controls button {
    display: none;
  }

  .flashcard {
    touch-action: pan-y;
  }

  .flashcard-face small {
    opacity: 0.92;
  }

  .flashcard-pager {
    display: flex;
  }

  .quiz-score {
    padding: 0.9rem;
    border-radius: 18px;
    gap: 0.65rem;
  }

  .quiz-score strong {
    font-size: 1.55rem;
  }

  .quiz-score p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .retention-hint.results-screen {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.48;
  }

  .pricing-modal-backdrop {
    align-items: start;
    padding: 0.75rem;
  }

  .pricing-modal-shell {
    width: 100%;
    max-height: calc(100vh - 1.5rem);
    padding-top: 3.6rem;
  }

  .pricing-close {
    top: 0.75rem;
    right: 0.75rem;
  }

  .pricing-card {
    padding: 1rem;
  }

  .footer {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .account-dashboard,
  .study-home {
    padding: 0.85rem 0 6.2rem;
  }

  .dashboard-main {
    gap: 1rem;
  }

  .study-greeting,
  .study-primary-card,
  .dashboard-panel {
    background:
      linear-gradient(180deg, rgba(26, 22, 38, 0.96), rgba(16, 13, 25, 0.96)),
      rgba(255, 255, 255, 0.04);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  }

  .study-primary-card {
    gap: 1rem;
    min-height: auto;
  }

  .study-upload-preview {
    border-color: rgba(183, 99, 255, 0.32);
    background:
      linear-gradient(180deg, rgba(183, 99, 255, 0.12), rgba(255, 255, 255, 0.03)),
      rgba(255, 255, 255, 0.03);
  }

  .quick-action-card {
    padding: 1rem;
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(22, 18, 34, 0.96)),
      rgba(255, 255, 255, 0.04);
  }

  .mobile-tabbar {
    position: fixed;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(16, 13, 25, 0.94);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(16px);
  }

  .mobile-tabbar-item {
    display: grid;
    gap: 0.18rem;
    justify-items: center;
    padding: 0.55rem 0.2rem;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
  }

  .mobile-tabbar-item span {
    width: 1.9rem;
    height: 1.9rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-weight: 900;
  }

  .mobile-tabbar-item small {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.01em;
  }

  .mobile-tabbar-item.active {
    color: var(--fg);
    background: rgba(183, 99, 255, 0.1);
  }

  .mobile-tabbar-item.active span {
    background: linear-gradient(135deg, rgba(183, 99, 255, 0.24), rgba(124, 92, 255, 0.3));
    color: white;
  }
}

@media (max-width: 420px) {
  .nav,
  .account-app-nav {
    padding-inline: 0.65rem;
  }

  .brand,
  .account-nav-brand {
    max-width: calc(100vw - 5.8rem);
    gap: 0.5rem;
  }

  .dashboard-brand strong:not(.brand-name),
  .brand-link {
    font-size: 1rem;
  }

  .nav .brand-lockup .logo-avatar,
  .account-app-nav .brand-lockup .logo-avatar {
    width: 2.15rem;
    height: 2.15rem;
    padding: 0.34rem;
  }

  .mobile-drawer-brand.brand-lockup .brand-name {
    font-size: 1.55rem;
  }

  .nav .brand-lockup .brand-name {
    font-size: 1.38rem;
  }

  h1 {
    font-size: 2.2rem;
    line-height: 1.08;
  }

  .study-greeting h1,
  .study-primary-copy h2 {
    font-size: 2rem;
  }

  .pill,
  .mini-label,
  .dashboard-panel-label {
    letter-spacing: 0.08em;
  }

  .dashboard-set-row,
  .study-set-large-row {
    padding-left: 1rem;
  }

  .dashboard-set-row .set-icon,
  .study-set-large-row .set-icon {
    position: static;
    margin-bottom: 0.2rem;
  }

  .profile-menu summary strong {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .option-card {
    padding: 1rem;
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(20, 17, 30, 0.96)),
      rgba(255, 255, 255, 0.03);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  }

  .loading-panel {
    padding: 0.75rem;
  }

  .loading-panel-card {
    width: 100%;
    padding: 1.25rem 1rem;
  }

  .quiz-score {
    align-items: flex-start;
    gap: 0.8rem;
  }
}

@media (max-width: 820px) {
  .contact-shell {
    width: calc(100% - 1rem);
  }

  .contact-hero {
    margin: 0 auto 1rem;
    padding: 0 0.2rem;
    text-align: center;
  }

  .contact-hero h1 {
    margin-bottom: 0.7rem;
    font-size: clamp(2rem, 9vw, 2.55rem);
    line-height: 1.08;
  }

  .contact-hero p {
    font-size: 0.96rem;
    line-height: 1.6;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .contact-form,
  .contact-side {
    padding: 1rem;
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(48, 35, 74, 0.98), rgba(24, 19, 36, 0.98)),
      rgba(255, 255, 255, 0.04);
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.22),
      0 0 0 1px rgba(183, 99, 255, 0.06) inset;
  }

  .contact-form {
    gap: 0.85rem;
  }

  .contact-form label {
    gap: 0.35rem;
    font-size: 0.86rem;
    text-align: left;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 0.78rem 0.82rem;
    border-radius: 14px;
    font-size: 0.95rem;
  }

  .contact-form textarea {
    min-height: 9rem;
  }

  .contact-form button {
    width: 100%;
    min-height: 2.9rem;
    border-radius: 999px;
  }

  .form-status {
    text-align: center;
    font-size: 0.92rem;
  }

  .contact-side {
    text-align: center;
  }

  .contact-side h2 {
    margin: 0.5rem 0 0.7rem;
    font-size: 1.12rem;
  }

  .contact-side ul {
    margin: 0 0 0.85rem;
    padding: 0;
    list-style: none;
  }

  .contact-points li {
    padding: 0.8rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
  }

  .contact-side p {
    margin-bottom: 0;
    font-size: 0.92rem;
    line-height: 1.55;
  }

  #chatgptDifferenceSection {
    display: none !important;
  }

  .intro,
  .section-head,
  .feature-showcase,
  .feature-copy,
  .drop-zone,
  .homepage-extra .panel,
  .homepage-extra .pricing-card,
  .homepage-extra .audience-grid article,
  .homepage-extra .faq details,
  .usage-card article,
  .notice,
  .paywall,
  .footer {
    text-align: center;
  }

  .pill,
  .mini-label,
  .plan-label,
  .popular-badge,
  .drop-zone small,
  .feature-cta,
  .pricing-cta {
    align-self: center;
    justify-self: center;
  }

  .hero-actions,
  .results-actions,
  .paywall-actions,
  .section-cta,
  .footer-links {
    align-items: center;
    justify-content: center;
  }

  .drop-zone {
    min-height: 180px;
    padding: 1rem 0.95rem;
    gap: 0.55rem;
  }

  .upload-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.65rem;
    border-radius: 16px;
  }

  .drop-zone strong {
    font-size: 1.28rem;
    line-height: 1.14;
  }

  .drop-zone span {
    font-size: 0.92rem;
  }

  .drop-zone small {
    font-size: 0.8rem;
    padding: 0.34rem 0.68rem;
  }

  .feature-showcase,
  .homepage-extra .panel,
  .homepage-extra .pricing-card,
  .homepage-extra .audience-grid article,
  .homepage-extra .faq details,
  .notice,
  .paywall,
  .usage-card article {
    border-radius: 18px;
  }

  .feature-showcase {
    min-height: auto;
    gap: 0.75rem;
    padding: 0.9rem;
  }

  .feature-copy h3,
  .panel h3,
  .pricing-card h3,
  .audience-grid h3,
  .faq summary {
    margin-top: 0;
    font-size: 1rem;
  }

  .feature-copy p,
  .homepage-extra .panel p,
  .homepage-extra .pricing-card li,
  .homepage-extra .audience-grid p,
  .faq p {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .feature-art {
    transform: scale(0.72);
  }

  .pricing-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(78%, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    gap: 0.75rem;
    padding: 0 0.2rem 0.35rem;
    scroll-snap-type: x proximity;
    scroll-padding-left: 0.2rem;
    -webkit-overflow-scrolling: touch;
  }

  .pricing-grid::-webkit-scrollbar {
    display: none;
  }

  .demo-grid {
    grid-auto-flow: column;
    grid-auto-columns: minmax(82%, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    gap: 0.75rem;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .demo-grid::-webkit-scrollbar {
    display: none;
  }

  .demo-grid > * {
    scroll-snap-align: start;
    min-width: 0;
  }

  .pricing-card {
    min-height: auto;
    padding: 0.9rem;
    scroll-snap-align: start;
  }

  .pricing-card h3 {
    margin: 0.55rem 0 0.2rem;
    line-height: 1.18;
  }

  .price {
    margin-bottom: 0.45rem !important;
    font-size: 1.45rem;
  }

  .plan-features {
    gap: 0.35rem;
  }

  .plan-features li {
    gap: 0.45rem;
    font-size: 0.84rem;
    line-height: 1.34;
    text-align: left;
  }

  .plan-features span {
    width: 1.05rem;
    height: 1.05rem;
  }

  .pricing-cta,
  .feature-cta,
  .section-cta button,
  .hero-actions button {
    min-height: 2.7rem;
    padding: 0.68rem 0.95rem;
    font-size: 0.9rem;
  }

  .pricing-cta {
    margin-top: 0.8rem;
  }

  .section-head {
    margin-bottom: 0.75rem;
  }

  .section-head h2 {
    font-size: clamp(1.4rem, 7vw, 1.9rem);
  }

  .homepage-extra,
  .content-section,
  .features {
    margin-top: 1.35rem;
  }

  .faq details {
    padding: 0.9rem;
  }

  .faq summary {
    justify-content: center;
  }
}

/* ================================
   STUDLY — Study Sets redesign patch
   Safe override: paste at end of styles.css
================================ */

body[data-page="study-sets"] {
  background:
    radial-gradient(circle at 80% 0%, rgba(124, 92, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 20% 12%, rgba(183, 99, 255, 0.12), transparent 28rem),
    #0b0914;
}

/* Main layout */
body[data-page="study-sets"] .account-dashboard {
  width: min(1480px, 100%);
  gap: 1.2rem;
}

body[data-page="study-sets"] .study-hub-main {
  display: grid;
  gap: 1.1rem;
}

/* Hero */
body[data-page="study-sets"] .study-hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1.2rem;
  align-items: stretch;
  padding: 1.45rem;
  border-radius: 26px;
  border: 1px solid rgba(183, 99, 255, 0.18);
  background:
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(28, 22, 43, 0.96), rgba(14, 11, 23, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

body[data-page="study-sets"] .study-hub-copy h1 {
  margin: 0.55rem 0 0.55rem;
  max-width: 720px;
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

body[data-page="study-sets"] .study-hub-copy p {
  max-width: 560px;
  color: rgba(235, 226, 248, 0.76);
  font-size: 1rem;
  line-height: 1.55;
}

body[data-page="study-sets"] .study-hub-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

body[data-page="study-sets"] .study-overview-cta {
  min-height: 3.05rem;
  padding-inline: 1.15rem;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(124, 92, 255, 0.32);
}

body[data-page="study-sets"] .study-hub-secondary-cta {
  min-height: 3.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

/* Stats */
body[data-page="study-sets"] .study-hub-side {
  min-width: 0;
}

body[data-page="study-sets"] .study-hub-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

body[data-page="study-sets"] .overview-stat-card {
  min-width: 0;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    rgba(21, 17, 32, 0.9);
}

body[data-page="study-sets"] .overview-stat-card span {
  font-size: 0.68rem;
  letter-spacing: 0.11em;
}

body[data-page="study-sets"] .overview-stat-card strong {
  font-size: 1.7rem;
}

/* List panel */
body[data-page="study-sets"] .study-sets-list-shell {
  padding: 1.15rem;
  border-radius: 26px;
  border: 1px solid rgba(183, 99, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(23, 18, 35, 0.96), rgba(13, 10, 21, 0.98));
}

body[data-page="study-sets"] .study-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

body[data-page="study-sets"] .study-search-shell,
body[data-page="study-sets"] .study-filter-toggle {
  min-height: 3.05rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.045);
}

body[data-page="study-sets"] .study-search-shell input {
  font-size: 16px;
}

body[data-page="study-sets"] .study-sets-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

body[data-page="study-sets"] .study-sets-list-head h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

body[data-page="study-sets"] .study-sets-head-link {
  white-space: nowrap;
  color: #d7b9ff;
  font-weight: 850;
  text-decoration: none;
}

/* Cards grid */
body[data-page="study-sets"] .study-sets-mobile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

/* Study card */
body[data-page="study-sets"] .study-set-mobile-card {
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto;
  grid-template-areas:
    "icon body actions"
    "icon body actions"
    "progress progress progress"
    "button button button";
  gap: 0.75rem 0.9rem;
  align-items: start;
  min-width: 0;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  background:
    radial-gradient(circle at top right, rgba(183, 99, 255, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(30, 25, 44, 0.96), rgba(17, 14, 26, 0.98));
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(183, 99, 255, 0.045) inset;
  overflow: hidden;
}

body[data-page="study-sets"] .study-set-mobile-card:hover {
  transform: translateY(-2px);
  border-color: rgba(183, 99, 255, 0.34);
}

body[data-page="study-sets"] .study-set-mobile-icon {
  grid-area: icon;
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #d9c3ff;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(183, 99, 255, 0.34), rgba(124, 92, 255, 0.18));
  border: 1px solid rgba(183, 99, 255, 0.18);
  flex: 0 0 auto;
}

body[data-page="study-sets"] .study-set-mobile-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

body[data-page="study-sets"] .study-set-mobile-body {
  grid-area: body;
  min-width: 0;
}

body[data-page="study-sets"] .study-set-mobile-body h3,
body[data-page="study-sets"] .study-set-mobile-title {
  margin: 0;
  max-width: 100%;
  color: #f8f3ff;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -0.015em;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-page="study-sets"] .study-set-mobile-meta,
body[data-page="study-sets"] .study-set-mobile-date,
body[data-page="study-sets"] .study-set-mobile-body small {
  display: block;
  margin-top: 0.35rem;
  color: rgba(235, 226, 248, 0.62);
  font-size: 0.86rem;
  font-weight: 750;
}

body[data-page="study-sets"] .study-set-mobile-tags,
body[data-page="study-sets"] .study-set-mobile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

body[data-page="study-sets"] .study-set-mobile-tags span,
body[data-page="study-sets"] .study-set-mobile-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(246, 242, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
}

/* Star + menu */
body[data-page="study-sets"] .study-set-mobile-actions {
  grid-area: actions;
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  flex: 0 0 auto;
}

body[data-page="study-sets"] .study-set-favorite,
body[data-page="study-sets"] .study-set-more {
  width: 2.65rem;
  height: 2.65rem;
  min-width: 2.65rem;
  min-height: 2.65rem;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(246, 242, 255, 0.85);
}

body[data-page="study-sets"] .study-set-favorite svg,
body[data-page="study-sets"] .study-set-more svg {
  width: 1.12rem;
  height: 1.12rem;
  display: block;
}

body[data-page="study-sets"] .study-set-favorite.active {
  color: #ffd36b;
  border-color: rgba(255, 211, 107, 0.38);
  background: rgba(255, 211, 107, 0.12);
}

/* Progress */
body[data-page="study-sets"] .study-set-progress,
body[data-page="study-sets"] .set-mini-progress {
  grid-area: progress;
  width: 100%;
  height: 0.42rem;
  margin: 0.15rem 0 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

body[data-page="study-sets"] .study-set-progress span,
body[data-page="study-sets"] .set-mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b763ff, #5ea0ff);
}

/* Continue button */
body[data-page="study-sets"] .study-set-continue-pill {
  grid-area: button;
  width: 100%;
  min-height: 3rem;
  margin-top: 0.1rem;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(183, 99, 255, 0.9), rgba(124, 92, 255, 0.86));
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(124, 92, 255, 0.2);
}

/* Menus */
body[data-page="study-sets"] .study-set-menu-shell {
  position: relative;
}

body[data-page="study-sets"] .study-set-inline-menu {
  right: 0;
  left: auto;
  z-index: 20;
  border-radius: 16px;
}

/* Floating upload */
body[data-page="study-sets"] .study-sets-fab {
  width: 4.2rem;
  height: 4.2rem;
  right: 1.2rem;
  bottom: 1.2rem;
  border-radius: 999px;
  box-shadow:
    0 22px 55px rgba(124, 92, 255, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.13) inset;
}

/* Mobile */
@media (max-width: 900px) {
  body[data-page="study-sets"] .account-dashboard,
  body[data-page="study-sets"] .study-home {
    width: 100%;
    padding: 0.85rem 0.85rem 6rem;
  }

  body[data-page="study-sets"] .study-hub-hero {
    grid-template-columns: 1fr;
    padding: 1.1rem;
    border-radius: 24px;
  }

  body[data-page="study-sets"] .study-hub-copy h1 {
    font-size: clamp(1.9rem, 9.5vw, 3rem);
    line-height: 1.04;
  }

  body[data-page="study-sets"] .study-hub-hero-side {
    display: grid;
    gap: 0.85rem;
  }

  body[data-page="study-sets"] .study-hero-visual {
    display: none;
  }

  body[data-page="study-sets"] .study-hub-stats {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-snap-type: x proximity;
  }

  body[data-page="study-sets"] .overview-stat-card {
    min-width: 9.8rem;
    scroll-snap-align: start;
  }

  body[data-page="study-sets"] .study-sets-list-shell {
    padding: 0.95rem;
    border-radius: 24px;
  }

  body[data-page="study-sets"] .study-toolbar {
    grid-template-columns: 1fr auto;
  }

  body[data-page="study-sets"] .study-filter-toggle {
    width: 3.15rem;
    min-width: 3.15rem;
    padding: 0;
    font-size: 0;
  }

  body[data-page="study-sets"] .study-filter-toggle span {
    margin: 0;
  }

  body[data-page="study-sets"] .study-sets-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-page="study-sets"] .study-sets-mobile-list {
    grid-template-columns: 1fr;
  }

  body[data-page="study-sets"] .study-set-mobile-card {
    grid-template-columns: 3.2rem minmax(0, 1fr) 2.7rem;
    padding: 0.95rem;
    border-radius: 23px;
  }

  body[data-page="study-sets"] .study-set-mobile-body h3,
  body[data-page="study-sets"] .study-set-mobile-title {
    font-size: 1rem;
    line-height: 1.28;
  }

  body[data-page="study-sets"] .study-set-mobile-actions {
    gap: 0.42rem;
  }

  body[data-page="study-sets"] .study-set-favorite,
  body[data-page="study-sets"] .study-set-more {
    width: 2.55rem;
    height: 2.55rem;
    min-width: 2.55rem;
    min-height: 2.55rem;
  }

  body[data-page="study-sets"] .study-set-continue-pill {
    min-height: 2.9rem;
  }
}

@media (max-width: 420px) {
  body[data-page="study-sets"] .study-set-mobile-card {
    grid-template-columns: 2.9rem minmax(0, 1fr) 2.55rem;
    gap: 0.65rem;
  }

  body[data-page="study-sets"] .study-set-mobile-icon {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 16px;
  }

  body[data-page="study-sets"] .study-set-mobile-tags span,
  body[data-page="study-sets"] .study-set-mobile-stats span {
    font-size: 0.74rem;
    padding-inline: 0.48rem;
  }
}

@media (max-width: 900px) {
  body[data-page="study-sets"] .study-sets-mobile-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.9rem !important;
  }

  body[data-page="study-sets"] .study-set-mobile-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px !important;
    grid-template-areas:
      "main actions"
      "cta cta" !important;
    gap: 0.85rem !important;
    align-items: start !important;
    width: 100% !important;
    min-height: auto !important;
    padding: 0.95rem !important;
    border-radius: 22px !important;
    overflow: hidden !important;
  }

  body[data-page="study-sets"] .study-set-mobile-open {
    grid-area: main !important;
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 0.75rem !important;
    align-items: start !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    text-align: left !important;
  }

  body[data-page="study-sets"] .study-set-mobile-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-radius: 16px !important;
  }

  body[data-page="study-sets"] .study-set-mobile-body {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body[data-page="study-sets"] .study-set-mobile-body h3 {
    margin: 0 !important;
    font-size: 1rem !important;
    line-height: 1.28 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;

    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  body[data-page="study-sets"] .study-set-mobile-meta {
    margin-top: 0.45rem !important;
    display: grid !important;
    gap: 0.28rem !important;
    min-width: 0 !important;
  }

  body[data-page="study-sets"] .study-set-mobile-meta p,
  body[data-page="study-sets"] .study-set-mobile-meta small {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    min-width: 0 !important;
    max-width: 100% !important;
    color: rgba(235, 226, 248, 0.68) !important;
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body[data-page="study-sets"] .study-set-mobile-meta svg {
    width: 0.95rem !important;
    height: 0.95rem !important;
    flex: 0 0 auto !important;
  }

  body[data-page="study-sets"] .study-set-mobile-progress-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 0.55rem !important;
    align-items: center !important;
    margin-top: 0.65rem !important;
    width: 100% !important;
  }

  body[data-page="study-sets"] .study-set-mobile-progress {
    width: 100% !important;
    height: 0.38rem !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }

  body[data-page="study-sets"] .study-set-mobile-progress span {
    display: block !important;
    height: 100% !important;
    border-radius: inherit !important;
    background: linear-gradient(90deg, #b763ff, #5ea0ff) !important;
  }

  body[data-page="study-sets"] .study-set-mobile-progress-row strong {
    color: #d7b9ff !important;
    font-size: 0.86rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
  }

  body[data-page="study-sets"] .study-set-mobile-actions {
    grid-area: actions !important;
    display: grid !important;
    gap: 0.5rem !important;
    justify-items: center !important;
    align-items: start !important;
    width: 44px !important;
  }

  body[data-page="study-sets"] .study-set-favorite,
  body[data-page="study-sets"] .study-set-more {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border-radius: 999px !important;
  }

  body[data-page="study-sets"] .study-set-favorite svg,
  body[data-page="study-sets"] .study-set-more svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
  }

  body[data-page="study-sets"] .study-set-menu-shell {
    width: 42px !important;
    display: grid !important;
    place-items: center !important;
  }

  body[data-page="study-sets"] .study-set-continue-pill {
    grid-area: cta !important;
    width: 100% !important;
    min-height: 3rem !important;
    margin: 0 !important;
    border-radius: 18px !important;
  }
}
/* FINAL MOBILE FIX — study card alignment */

@media (max-width: 900px) {
  body[data-page="study-sets"] .study-set-mobile-open {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 0.9rem !important;
    align-items: flex-start !important;
  }

  body[data-page="study-sets"] .study-set-mobile-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin-top: 0.1rem !important;
    border-radius: 14px !important;
  }

  body[data-page="study-sets"] .study-set-mobile-body {
    padding-left: 0 !important;
    min-width: 0 !important;
  }

  body[data-page="study-sets"] .study-set-mobile-body h3 {
    font-size: 1rem !important;
    line-height: 1.25 !important;
    max-width: calc(100% - 0.25rem) !important;
    margin-bottom: 0.45rem !important;
    -webkit-line-clamp: 2 !important;
  }

  body[data-page="study-sets"] .study-set-mobile-meta {
    gap: 0.35rem !important;
  }

  body[data-page="study-sets"] .study-set-mobile-meta p,
  body[data-page="study-sets"] .study-set-mobile-meta small {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
  }

  body[data-page="study-sets"] .study-set-mobile-progress-row {
    margin-top: 0.75rem !important;
  }

  body[data-page="study-sets"] .study-set-mobile-card {
    padding: 1rem !important;
  }
}

@media (max-width: 420px) {
  body[data-page="study-sets"] .study-set-mobile-card {
    grid-template-columns: minmax(0, 1fr) 42px !important;
  }

  body[data-page="study-sets"] .study-set-mobile-open {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 0.75rem !important;
  }

  body[data-page="study-sets"] .study-set-mobile-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  body[data-page="study-sets"] .study-set-mobile-body h3 {
    font-size: 0.95rem !important;
  }

  body[data-page="study-sets"] .study-set-favorite,
  body[data-page="study-sets"] .study-set-more {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
}

/* Pricing polish: mobile-first stack, stronger Student hierarchy, no horizontal overflow. */
.pricing-modal-page,
.pricing-modal-page body {
  overflow-x: hidden;
}

.pricing-head {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.pricing-modal-shell .pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.15rem;
  overflow: visible;
}

.pricing-modal-shell .pricing-card {
  min-width: 0;
  height: 100%;
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.pricing-modal-shell .featured-plan,
.pricing-modal-shell .plan-featured {
  z-index: 1;
  transform: scale(1.03);
  border: 2px solid #b763ff;
  box-shadow: 0 20px 60px rgba(124, 92, 255, 0.4);
}

.pricing-modal-shell .popular-badge {
  margin-bottom: 0.7rem;
  border-radius: 999px;
}

.pricing-modal-shell .pricing-card > p {
  margin: 0.25rem 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.pricing-modal-shell .plan-features {
  gap: 0.62rem;
}

.pricing-modal-shell .plan-features li {
  font-size: 0.94rem;
}

.pricing-modal-shell .pricing-cta {
  width: 100%;
  min-height: 3.15rem;
  margin-top: 1.05rem;
  border-radius: 10px;
  font-size: 0.98rem;
}

.pricing-modal-shell .primary-pricing-cta {
  background: linear-gradient(135deg, #b763ff, #7c5cff 48%, #2c8cff);
  box-shadow: 0 18px 42px rgba(124, 92, 255, 0.34);
}

.pricing-modal-shell .secondary-pricing-cta {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(183, 99, 255, 0.28);
}

.pricing-modal-shell .auth-inline-status.error-text,
.pricing-modal-shell .auth-inline-status.error {
  border: 1px solid rgba(183, 99, 255, 0.24);
  background: rgba(183, 99, 255, 0.1);
  color: #eadcff;
}

@media (max-width: 900px) {
  .pricing-modal-backdrop {
    min-height: 100dvh;
    align-items: flex-start;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-inline: max(0.85rem, env(safe-area-inset-left));
    -webkit-overflow-scrolling: touch;
  }

  .pricing-modal-shell {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding: 1.05rem;
  }

  .pricing-modal-shell .pricing-grid {
    display: grid;
    grid-auto-flow: row !important;
    grid-auto-columns: unset !important;
    grid-template-columns: 1fr !important;
    gap: 16px;
    overflow: visible !important;
    padding: 0;
    scroll-snap-type: none;
  }

  .pricing-modal-shell .pricing-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    scroll-snap-align: unset;
  }

  .pricing-modal-shell .featured-plan,
  .pricing-modal-shell .plan-featured {
    transform: none;
    box-shadow: 0 18px 52px rgba(124, 92, 255, 0.34);
  }

  .pricing-modal-shell .pricing-summary-card {
    margin-top: 0.95rem;
  }
}

@media (max-width: 520px) {
  .onboarding-overlay {
    align-items: end;
    padding: 0.75rem;
  }

  .onboarding-card {
    border-radius: 22px;
    padding: 1rem;
  }

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

  .pricing-head {
    text-align: left;
  }

  .pricing-modal-shell .pricing-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .pricing-modal-shell .pricing-card h3 {
    font-size: 1.35rem;
  }

  .pricing-modal-shell .plan-features li {
    font-size: 0.9rem;
    line-height: 1.38;
  }
}

/* Unified study set creation screen: filename + all settings + one CTA. */

/* Reference-style settings screen */
.settings-page-body {
  background:
    radial-gradient(circle at 15% 0%, rgba(105, 77, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 88% 14%, rgba(37, 110, 255, 0.16), transparent 24rem),
    linear-gradient(135deg, #090d1e 0%, #12152b 44%, #0a0b16 100%);
}

.settings-reference-main {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2.3rem);
}

.settings-reference-hero {
  margin-bottom: 1.35rem;
  padding: 0 0.15rem;
}

.settings-kicker,
.settings-reference-group h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.7rem;
  color: #ad74ff;
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.settings-kicker::before,
.settings-reference-group h2::before {
  content: "›";
  color: #c992ff;
  font-size: 1rem;
  line-height: 1;
}

.settings-reference-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.settings-reference-hero p {
  max-width: 48rem;
  margin: 0.8rem 0 0;
  color: rgba(233, 226, 255, 0.68);
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.55;
}

.settings-reference-stack {
  display: grid;
  gap: 1.35rem;
}

.settings-reference-group {
  display: grid;
  gap: 0.55rem;
}

.settings-reference-card {
  overflow: hidden;
  border: 1px solid rgba(204, 190, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(20, 22, 43, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 20px 60px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.settings-reference-row {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 5.15rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  padding: 0.9rem 1.15rem;
  background: transparent;
  color: #f7f2ff;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.settings-reference-row:last-child {
  border-bottom: 0;
}

.settings-reference-row:hover {
  background: rgba(151, 92, 255, 0.075);
}

.settings-row-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(183, 99, 255, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(151, 72, 255, 0.35), rgba(82, 43, 142, 0.55));
  color: #b86bff;
  font-size: 1.35rem;
  line-height: 1;
}

.settings-row-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-row-copy {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.settings-row-copy strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-row-copy small {
  min-width: 0;
  overflow: hidden;
  color: rgba(232, 225, 255, 0.62);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-row-chevron {
  color: rgba(255, 255, 255, 0.76);
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1;
}

.settings-row-side {
  color: #b86bff;
  font-size: 0.94rem;
  font-weight: 900;
  white-space: nowrap;
}

.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  padding: 3px;
  background: linear-gradient(135deg, #a855ff, #784dff);
  box-shadow: 0 10px 28px rgba(130, 82, 255, 0.32);
}

.settings-toggle span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.settings-logout-card {
  border-color: rgba(255, 99, 132, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 91, 123, 0.13), rgba(139, 47, 89, 0.07)),
    rgba(27, 18, 32, 0.84);
}

.settings-logout-row .settings-row-icon {
  border-color: rgba(255, 99, 132, 0.2);
  background: rgba(255, 99, 132, 0.12);
  color: #ff6f8f;
}

.settings-logout-row .settings-row-copy strong {
  color: #ff748f;
}

.settings-hidden-fields {
  display: none;
}

.settings-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: end center;
  padding: 1rem;
  background:
    radial-gradient(circle at 50% 100%, rgba(148, 84, 255, 0.24), transparent 24rem),
    rgba(4, 6, 15, 0.72);
  backdrop-filter: blur(16px);
}

.settings-sheet {
  position: relative;
  display: grid;
  gap: 1rem;
  width: min(520px, 100%);
  max-height: min(720px, calc(100dvh - 2rem));
  overflow-y: auto;
  border: 1px solid rgba(202, 183, 255, 0.16);
  border-radius: 24px;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 14% 0%, rgba(169, 99, 255, 0.18), transparent 15rem),
    linear-gradient(145deg, rgba(24, 24, 46, 0.98), rgba(11, 12, 27, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.settings-sheet-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.settings-sheet-head {
  padding-right: 2.2rem;
}

.settings-sheet-head h2 {
  margin: 0.35rem 0 0;
  color: #fff;
  font-size: 1.65rem;
}

.settings-sheet-head p,
.settings-sheet-avatar-row p {
  margin: 0.45rem 0 0;
  color: rgba(232, 225, 255, 0.65);
  line-height: 1.45;
}

.settings-sheet-content {
  display: grid;
  gap: 0.95rem;
}

.settings-sheet-avatar-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.95rem;
  border: 1px solid rgba(183, 99, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.settings-sheet-avatar-row .profile-avatar-large {
  width: 5rem;
  height: 5rem;
}

.settings-sheet-field {
  display: grid;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.settings-sheet-field input,
.settings-sheet-field select {
  width: 100%;
  min-height: 3.05rem;
  border: 1px solid rgba(183, 99, 255, 0.2);
  border-radius: 12px;
  padding: 0.82rem 0.9rem;
  background: rgba(8, 9, 21, 0.82);
  color: #fff;
  font: inherit;
}

.settings-sheet-status {
  min-height: 1.2rem;
  margin: 0;
  color: rgba(232, 225, 255, 0.68);
  font-weight: 800;
}

.settings-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (min-width: 721px) {
  .settings-screen {
    align-items: stretch;
  }

  .settings-reference-main {
    padding-top: 3rem;
  }

  .settings-sheet-overlay {
    place-items: center;
  }
}

@media (max-width: 720px) {
  .settings-page-body .account-app-nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background:
      linear-gradient(180deg, rgba(12, 16, 38, 0.92), rgba(12, 16, 38, 0.68)),
      transparent;
  }

  .settings-reference-main {
    padding: 1.55rem 0.35rem 2.5rem;
  }

  .settings-reference-hero {
    margin-bottom: 1.45rem;
    padding: 0 0.35rem;
  }

  .settings-reference-stack {
    gap: 1.45rem;
  }

  .settings-reference-card {
    border-radius: 18px;
  }

  .settings-reference-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    min-height: 4.9rem;
    gap: 0.85rem;
    padding: 0.85rem 0.95rem;
  }

  .settings-row-icon {
    width: 42px;
    height: 42px;
    font-size: 1.18rem;
  }

  .settings-row-copy strong {
    font-size: 1rem;
  }

  .settings-row-copy small {
    font-size: 0.84rem;
  }

  .settings-row-side {
    display: none;
  }

  .settings-sheet-overlay {
    padding: 0.75rem;
    align-items: end;
  }

  .settings-sheet {
    max-height: calc(100dvh - 1.5rem);
    border-radius: 22px;
    padding: 1rem;
  }

  .settings-sheet-avatar-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .settings-sheet-avatar-row .profile-avatar-large {
    justify-self: center;
  }
}
.controls.controls-screen-open {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.controls.controls-screen-open .controls-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.controls.controls-screen-open .controls-file {
  grid-column: 1 / -1;
}

.controls.controls-screen-open .option-card {
  min-width: 0;
}

.controls.controls-screen-open .option-copy {
  display: block;
}

.controls.controls-screen-open .quiz-mode-card {
  grid-column: auto;
}

.controls.controls-screen-open .controls-actions {
  grid-column: 1 / -1;
  display: grid;
}

.controls.controls-screen-open #mobileControlsSubmit {
  width: 100%;
  max-width: none;
}

@media (max-width: 820px) {
  .controls.controls-screen-open {
    grid-template-columns: 1fr;
    gap: 0.72rem;
    padding: 0.95rem;
    border-radius: 22px;
  }

  .controls.controls-screen-open .controls-head {
    gap: 0.75rem;
    padding-bottom: 0.65rem;
  }

  .controls.controls-screen-open .controls-head span {
    font-size: 1.12rem;
  }

  .controls.controls-screen-open .controls-head p {
    font-size: 0.82rem;
  }

  .controls.controls-screen-open .controls-file {
    padding: 0.72rem 0.78rem;
    font-size: 0.82rem;
  }

  .controls.controls-screen-open .option-card {
    padding: 0.78rem;
    border-radius: 16px;
  }

  .controls.controls-screen-open select {
    min-height: 2.95rem;
    font-size: 16px;
  }

  .controls.controls-screen-open .controls-actions {
    padding-top: 0.1rem;
  }

  .controls.controls-screen-open #mobileControlsSubmit {
    max-width: none;
    min-height: 3.15rem;
  }
}

/* MOBILE STUDY SET CARD LAYOUT FIX */
@media (max-width: 900px) {
  body[data-page="study-sets"] .study-set-mobile-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px !important;
    grid-template-areas:
      "main actions"
      "cta cta" !important;
    gap: 0.9rem !important;
    align-items: start !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body[data-page="study-sets"] .study-set-mobile-open {
    grid-area: main !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
  }

  body[data-page="study-sets"] .study-set-mobile-icon {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
  }

  body[data-page="study-sets"] .study-set-mobile-body {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body[data-page="study-sets"] .study-set-mobile-body h3 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    max-width: 100% !important;
    line-height: 1.28 !important;
  }

  body[data-page="study-sets"] .study-set-mobile-meta,
  body[data-page="study-sets"] .study-set-mobile-meta p,
  body[data-page="study-sets"] .study-set-mobile-meta small,
  body[data-page="study-sets"] .study-set-mobile-progress-row,
  body[data-page="study-sets"] .study-set-mobile-progress {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body[data-page="study-sets"] .study-set-mobile-actions {
    grid-area: actions !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 44px !important;
  }

  body[data-page="study-sets"] .study-set-favorite,
  body[data-page="study-sets"] .study-set-more,
  body[data-page="study-sets"] .study-set-menu-shell {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body[data-page="study-sets"] .study-set-continue-pill {
    grid-area: cta !important;
    width: 100% !important;
    min-height: 3rem !important;
  }
}

@media (max-width: 420px) {
  body[data-page="study-sets"] .study-set-mobile-card {
    grid-template-columns: minmax(0, 1fr) 40px !important;
  }

  body[data-page="study-sets"] .study-set-mobile-icon {
    flex-basis: 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  body[data-page="study-sets"] .study-set-mobile-actions,
  body[data-page="study-sets"] .study-set-favorite,
  body[data-page="study-sets"] .study-set-more,
  body[data-page="study-sets"] .study-set-menu-shell {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
}

/* DESKTOP POLISH — library cards + sidebar only */
@media (min-width: 901px) {
  body[data-page="study-sets"] .account-dashboard {
    grid-template-columns: 280px minmax(0, 1fr);
    width: min(1540px, 100%);
    gap: 1.35rem;
    padding-inline: 1.35rem;
  }

  body[data-page="study-sets"] .dashboard-sidebar {
    top: calc(var(--account-nav-height) + 0.75rem);
    min-height: calc(100vh - var(--account-nav-height) - 1.5rem);
    max-height: calc(100vh - var(--account-nav-height) - 1.5rem);
    padding: 1.15rem;
    border-color: rgba(255, 255, 255, 0.09);
    background:
      linear-gradient(180deg, rgba(17, 14, 28, 0.94), rgba(10, 9, 17, 0.98)),
      rgba(15, 13, 24, 0.86);
  }

  body[data-page="study-sets"] .dashboard-menu {
    gap: 0.42rem;
  }

  body[data-page="study-sets"] .dashboard-menu-item {
    min-height: 2.75rem;
    padding: 0.68rem 0.82rem;
    border-radius: 12px;
    font-size: 0.98rem;
  }

  body[data-page="study-sets"] .dashboard-user {
    margin-top: auto;
    padding-top: 0.95rem;
  }

  body[data-page="study-sets"] .dashboard-user-card {
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    gap: 0.72rem;
    padding: 0.78rem;
    border-radius: 16px;
    background:
      linear-gradient(145deg, rgba(42, 28, 74, 0.58), rgba(16, 14, 25, 0.96)),
      rgba(255, 255, 255, 0.025);
  }

  body[data-page="study-sets"] .dashboard-user-card .dashboard-avatar {
    width: 3rem;
    height: 3rem;
  }

  body[data-page="study-sets"] .dashboard-user strong {
    font-size: 0.92rem;
    line-height: 1.18;
  }

  body[data-page="study-sets"] #dashboardUserEmail {
    max-width: 100%;
    font-size: 0.76rem;
  }

  body[data-page="study-sets"] .sidebar-plan-mini {
    max-width: 100%;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  body[data-page="study-sets"] .study-sets-mobile-list {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 1rem;
  }

  body[data-page="study-sets"] .study-set-mobile-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3rem;
    grid-template-areas:
      "main actions"
      "button button";
    gap: 1rem;
    align-items: start;
    min-height: 0;
    padding: 1.1rem;
    border-radius: 22px;
    overflow: visible;
  }

  body[data-page="study-sets"] .study-set-mobile-open {
    grid-area: main;
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
  }

  body[data-page="study-sets"] .study-set-mobile-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 18px;
  }

  body[data-page="study-sets"] .study-set-mobile-icon svg {
    width: 1.65rem;
    height: 1.65rem;
  }

  body[data-page="study-sets"] .study-set-mobile-body {
    min-width: 0;
    display: grid;
    gap: 0.55rem;
  }

  body[data-page="study-sets"] .study-set-mobile-body h3 {
    max-width: 100%;
    font-size: 1.08rem;
    line-height: 1.25;
    -webkit-line-clamp: 2;
  }

  body[data-page="study-sets"] .study-set-mobile-meta {
    display: grid;
    gap: 0.35rem;
    margin: 0;
  }

  body[data-page="study-sets"] .study-set-mobile-meta p,
  body[data-page="study-sets"] .study-set-mobile-meta small {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    min-width: 0;
    color: rgba(235, 226, 248, 0.68);
    font-size: 0.84rem;
    line-height: 1.35;
  }

  body[data-page="study-sets"] .study-set-mobile-meta span {
    display: inline-grid;
    place-items: center;
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
  }

  body[data-page="study-sets"] .study-set-mobile-progress-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    width: 100%;
    margin-top: 0.25rem;
  }

  body[data-page="study-sets"] .study-set-mobile-progress {
    width: 100%;
    min-width: 0;
  }

  body[data-page="study-sets"] .study-set-mobile-actions {
    grid-area: actions;
    display: grid;
    gap: 0.52rem;
    justify-items: center;
    width: 3rem;
  }

  body[data-page="study-sets"] .study-set-favorite,
  body[data-page="study-sets"] .study-set-more,
  body[data-page="study-sets"] .study-set-menu-shell {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  body[data-page="study-sets"] .study-set-favorite,
  body[data-page="study-sets"] .study-set-more {
    display: grid;
    place-items: center;
  }

  body[data-page="study-sets"] .study-set-continue-pill {
    grid-area: button;
    min-height: 3rem;
    margin-top: 0;
    border-radius: 16px;
  }
}
