:root {
  --ink: #17182a;
  --muted: #6f7186;
  --line: #e6e7ef;
  --soft: #f5f5fa;
  --paper: #ffffff;
  --violet: #6d4aff;
  --violet-dark: #4d2fd2;
  --violet-soft: #eeeaff;
  --accent: #d9ff65;
  --accent-dark: #bde839;
  --blue: #4378ff;
  --blue-soft: #eaf0ff;
  --mint: #40d6a1;
  --mint-soft: #e5fbf3;
  --orange: #ff9d4d;
  --orange-soft: #fff0e3;
  --coral: #ff6c6c;
  --coral-soft: #ffebeb;
  --pink: #f06ec8;
  --shadow-sm: 0 8px 24px rgba(26, 25, 52, 0.07);
  --shadow: 0 22px 70px rgba(24, 20, 66, 0.13);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --font: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Unbounded", "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #f8f8fc;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body.player-body {
  background: #f4f4fb;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4 {
  margin-top: 0;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.show-mobile {
  display: none !important;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 800;
  text-align: center;
  transition: 0.2s ease;
}

.modal-open { overflow: hidden; }

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-large {
  min-height: 50px;
  padding-inline: 22px;
  border-radius: 13px;
}

.button-small {
  min-height: 36px;
  padding-inline: 14px;
  font-size: 13px;
}

.button-primary {
  color: white;
  background: var(--violet);
  box-shadow: 0 8px 20px rgba(109, 74, 255, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: var(--violet-dark);
  box-shadow: 0 10px 25px rgba(109, 74, 255, 0.28);
}

.button-accent {
  color: #20250d;
  background: var(--accent);
  box-shadow: 0 9px 24px rgba(194, 230, 63, 0.25);
}

.button-accent:hover:not(:disabled) {
  background: var(--accent-dark);
}

.button-secondary {
  color: var(--ink);
  border-color: #dadbe7;
  background: white;
}

.button-secondary:hover:not(:disabled) {
  border-color: #bcbecd;
  background: #fafafe;
}

.button-success {
  color: #117051;
  border-color: #a7e8cf;
  background: #e6fbf3;
}

.button-danger {
  color: white;
  background: #dc4052;
}

.button-danger-soft {
  color: #bb3344;
  border-color: #ffd0d5;
  background: #fff0f2;
}

.button-ghost {
  color: #595c70;
}

.button-ghost-light {
  color: white;
  border-color: rgba(255, 255, 255, 0.24);
}

.button-ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.button-light {
  color: #302372;
  background: white;
}

.full-button {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  font-size: 18px;
  font-weight: 800;
  transition: 0.18s ease;
}

.icon-button:hover:not(:disabled) {
  background: #f0f0f7;
}

.icon-button.bordered {
  border: 1px solid #dedfe8;
  background: white;
}

.danger-hover:hover:not(:disabled) {
  color: #d13346;
  background: #fff0f2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #292246;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-light {
  color: white;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 11px;
  background: var(--violet);
  transform: rotate(-4deg);
  box-shadow: inset 0 -4px 10px rgba(25, 12, 105, 0.2);
}

.brand-light .brand-mark {
  background: var(--accent);
}

.brand-mark i {
  position: absolute;
  bottom: 9px;
  width: 5px;
  border-radius: 4px;
  background: white;
}

.brand-light .brand-mark i {
  background: #3c277f;
}

.brand-mark i:nth-child(1) {
  left: 8px;
  height: 9px;
}

.brand-mark i:nth-child(2) {
  left: 15px;
  height: 15px;
}

.brand-mark i:nth-child(3) {
  left: 22px;
  height: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 18px;
  height: 3px;
  border-radius: 4px;
  background: currentColor;
}

.eyebrow-light {
  color: var(--accent);
}

.loading-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  padding: 24px;
  text-align: center;
}

.loading-screen h1 {
  margin: 20px 0 8px;
  font-size: 24px;
}

.loading-screen p {
  color: var(--muted);
}

.loading-logo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 42px;
}

.loading-logo span {
  width: 8px;
  height: 16px;
  border-radius: 5px;
  background: var(--violet);
  animation: loadBars 0.8s ease-in-out infinite alternate;
}

.loading-logo span:nth-child(2) {
  height: 28px;
  animation-delay: 0.15s;
}

.loading-logo span:nth-child(3) {
  height: 38px;
  animation-delay: 0.3s;
}

@keyframes loadBars {
  to { height: 8px; opacity: 0.5; }
}

/* Landing */
.landing-shell {
  position: relative;
  overflow: hidden;
  min-height: 760px;
  color: white;
  background:
    radial-gradient(circle at 78% 25%, rgba(175, 143, 255, 0.48), transparent 28%),
    radial-gradient(circle at 12% 105%, rgba(85, 231, 190, 0.22), transparent 32%),
    linear-gradient(135deg, #24155e 0%, #5031c6 55%, #6e4aff 100%);
}

.landing-shell::before,
.landing-shell::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  content: "";
}

.landing-shell::before {
  top: -280px;
  right: -120px;
  width: 680px;
  height: 680px;
}

.landing-shell::after {
  bottom: -440px;
  left: -300px;
  width: 790px;
  height: 790px;
}

.landing-nav {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 86px;
}

.landing-nav-links {
  display: flex;
  gap: 34px;
  margin-left: auto;
  margin-right: 42px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 700;
}

.landing-nav-links a:hover {
  color: white;
}

.nav-actions {
  display: flex;
  gap: 9px;
}

.hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(520px, 1.07fr);
  gap: 48px;
  align-items: center;
  min-height: 650px;
  padding: 45px 0 95px;
}

.hero-copy h1 {
  max-width: 660px;
  margin-bottom: 23px;
  font-family: var(--display);
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1.08;
  letter-spacing: -2.5px;
}

.hero-copy h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-copy > p {
  max-width: 610px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 17px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 11px;
  margin-bottom: 30px;
}

.hero-proof {
  display: flex;
  gap: 20px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-proof span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-proof b {
  color: white;
  font-size: 18px;
}

.hero-visual {
  position: relative;
  min-height: 520px;
  perspective: 1200px;
}

.builder-window {
  position: absolute;
  top: 45px;
  left: 0;
  width: 650px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  background: #fafafe;
  box-shadow: 0 40px 100px rgba(18, 7, 67, 0.45);
  color: var(--ink);
  transform: rotateY(-5deg) rotateZ(1.2deg);
}

.builder-top {
  display: flex;
  align-items: center;
  gap: 13px;
  height: 47px;
  padding: 0 15px;
  border-bottom: 1px solid #e4e4ec;
  background: white;
  font-size: 10px;
  font-weight: 700;
}

.builder-top > span {
  flex: 1;
}

.builder-top > b {
  color: #299a71;
  font-size: 9px;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0767d;
}

.window-dots i:nth-child(2) { background: #f5bf5f; }
.window-dots i:nth-child(3) { background: #68cf8d; }

.builder-body {
  display: grid;
  grid-template-columns: 62px 1fr 160px;
  min-height: 365px;
}

.builder-body aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  padding-top: 22px;
  border-right: 1px solid #e5e5ed;
  background: white;
}

.mini-brand {
  width: 25px;
  height: 25px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--violet);
}

.builder-body aside i {
  width: 26px;
  height: 7px;
  border-radius: 6px;
  background: #e7e7ee;
}

.builder-body aside i.active {
  height: 26px;
  background: var(--violet-soft);
}

.builder-canvas {
  margin: 23px 17px;
  padding: 22px;
  border: 1px solid #e3e4ec;
  border-radius: 15px;
  background: white;
  box-shadow: 0 8px 20px rgba(28, 24, 66, 0.05);
}

.canvas-label {
  display: flex;
  justify-content: space-between;
  color: var(--violet);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.canvas-label span {
  color: var(--muted);
}

.builder-canvas h3 {
  margin: 14px 0 20px;
  font-size: 14px;
  line-height: 1.45;
}

.match-preview {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 9px;
}

.match-preview span {
  padding: 10px;
  border: 1px solid #e0e1ea;
  border-radius: 8px;
}

.match-preview i {
  height: 1px;
  background: var(--violet);
}

.builder-canvas button {
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 9px;
  font-weight: 800;
}

.builder-help {
  padding: 26px 18px;
  border-left: 1px solid #e5e5ed;
  background: #f3f0ff;
}

.builder-help > span {
  display: inline-block;
  margin-bottom: 40px;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--violet);
  background: white;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.builder-help strong {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
}

.builder-help p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.help-progress {
  display: flex;
  gap: 5px;
  margin-top: 35px;
}

.help-progress i {
  width: 14px;
  height: 3px;
  border-radius: 3px;
  background: #d4cdef;
}

.help-progress i.active {
  width: 27px;
  background: var(--violet);
}

.floating-pill {
  position: absolute;
  z-index: 3;
  padding: 10px 14px;
  border-radius: 11px;
  background: white;
  box-shadow: var(--shadow);
  color: #433584;
  font-size: 11px;
  font-weight: 800;
}

.pill-one {
  top: 16px;
  right: -25px;
  transform: rotate(4deg);
}

.pill-two {
  bottom: 58px;
  left: -30px;
  color: #9f5620;
  transform: rotate(-5deg);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.orbit-one {
  top: -8px;
  right: -50px;
  width: 380px;
  height: 380px;
}

.orbit-two {
  right: 60px;
  bottom: -20px;
  width: 180px;
  height: 180px;
}

.landing-main {
  background: white;
}

.feature-section {
  padding: 105px 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 42px;
}

.section-heading h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -1.5px;
}

.section-heading > p {
  max-width: 370px;
  margin-bottom: 4px;
  color: var(--muted);
  line-height: 1.7;
}

.section-heading.centered {
  justify-content: center;
  text-align: center;
}

.feature-bento {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.feature-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 30px;
  border: 1px solid #e6e6ef;
  border-radius: var(--radius);
  background: #fbfbfe;
}

.feature-card small {
  display: block;
  margin: 16px 0 7px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-card h3 {
  max-width: 470px;
  margin-bottom: 11px;
  font-size: 24px;
  line-height: 1.25;
}

.feature-card p {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.feature-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--violet);
  font-size: 18px;
  font-weight: 800;
}

.icon-mint { color: #126a4e; background: var(--mint-soft); }
.icon-orange { color: #9c5019; background: var(--orange-soft); }
.icon-blue { color: #3159c9; background: var(--blue-soft); }

.violet-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  color: white;
  border: 0;
  background: linear-gradient(135deg, #5033ca, #7b58ff);
}

.violet-card .feature-icon {
  color: #3a286e;
  background: var(--accent);
}

.violet-card small { color: var(--accent); }
.violet-card p { color: rgba(255,255,255,.72); }

.type-cloud {
  position: absolute;
  right: -14px;
  bottom: 24px;
  display: flex;
  width: 300px;
  flex-wrap: wrap;
  gap: 7px;
  transform: rotate(-3deg);
}

.type-cloud i {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.feature-wide {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 420px;
  align-items: center;
  min-height: 265px;
  background: linear-gradient(110deg, #f6f8ff, #eef2ff);
}

.paper-stack {
  position: relative;
  height: 210px;
}

.paper-stack > i,
.paper-stack > div {
  position: absolute;
  top: 15px;
  right: 40px;
  width: 210px;
  height: 260px;
  padding: 25px;
  border-radius: 10px;
  background: white;
  box-shadow: 0 16px 40px rgba(35, 42, 94, 0.13);
  transform: rotate(8deg);
}

.paper-stack > i:first-child { right: 95px; background: #dfe6ff; transform: rotate(-8deg); }
.paper-stack > i:nth-child(2) { right: 70px; background: #f8edff; transform: rotate(-1deg); }

.paper-stack > div b {
  display: block;
  margin-bottom: 22px;
  color: #292f55;
  font-family: var(--display);
  font-size: 15px;
}

.paper-stack > div span {
  display: block;
  height: 7px;
  margin-bottom: 10px;
  border-radius: 5px;
  background: #e9eaf2;
}

.paper-stack > div span:nth-child(3) { width: 75%; }
.paper-stack > div em { display: block; margin-top: 24px; color: #6d4aff; font-style: normal; font-weight: 800; letter-spacing: 8px; }

.steps-section {
  padding: 100px 0 120px;
  background: #f6f5fb;
}

.steps-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 55px;
}

.steps-grid::before {
  position: absolute;
  top: 49px;
  left: 18%;
  right: 18%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #c9c2e4 0 8px, transparent 8px 15px);
  content: "";
}

.steps-grid article {
  position: relative;
  text-align: center;
}

.steps-grid article > span {
  position: absolute;
  top: 0;
  right: 16%;
  color: #d9d7e5;
  font-family: var(--display);
  font-size: 42px;
}

.step-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  place-items: center;
  border: 10px solid #f6f5fb;
  border-radius: 50%;
  color: white;
  background: var(--violet);
  font-size: 30px;
}

.steps-grid article:nth-child(2) .step-icon { color: #185c47; background: var(--mint); }
.steps-grid article:nth-child(3) .step-icon { color: #4a351a; background: var(--accent); }
.steps-grid h3 { margin-bottom: 9px; font-size: 21px; }
.steps-grid p { max-width: 290px; margin: auto; color: var(--muted); font-size: 14px; line-height: 1.65; }

.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  margin-top: 100px;
  margin-bottom: 100px;
  padding: 60px;
  border-radius: 30px;
  color: white;
  background:
    radial-gradient(circle at 90% 10%, rgba(161, 132, 255, .5), transparent 28%),
    linear-gradient(135deg, #25145e, #5335cd);
  box-shadow: var(--shadow);
}

.final-cta h2 {
  max-width: 700px;
  margin-bottom: 12px;
  font-family: var(--display);
  font-size: 36px;
  line-height: 1.2;
}

.final-cta p { margin: 0; color: rgba(255,255,255,.7); }

.landing-footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  background: white;
}

.landing-footer .container {
  display: flex;
  align-items: center;
  gap: 25px;
}

.landing-footer p { margin: 0; color: var(--muted); font-size: 13px; }
.landing-footer > .container > span { margin-left: auto; color: #9799a9; font-size: 12px; }

/* App shell and dashboard */
.app-shell {
  min-height: 100vh;
  background: #f7f7fb;
}

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 250px;
  flex-direction: column;
  padding: 25px 18px 18px;
  border-right: 1px solid #e6e6ee;
  background: white;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 29px;
}

.nav-close {
  display: none;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-nav button,
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 47px;
  padding: 0 13px;
  border-radius: 12px;
  color: #686a7d;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.side-nav button span,
.side-nav a span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  font-size: 18px;
}

.side-nav button:hover,
.side-nav button.active,
.side-nav a:hover,
.side-nav a.active {
  color: var(--violet);
  background: var(--violet-soft);
}

.sidebar-guide {
  margin-top: auto;
  margin-bottom: 17px;
  padding: 17px;
  border: 1px solid #e5e1f7;
  border-radius: 15px;
  background: linear-gradient(145deg, #f7f4ff, #eeebff);
}

.sidebar-guide > span {
  display: grid;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 9px;
  color: white;
  background: var(--violet);
  font-weight: 800;
}

.sidebar-guide strong { display: block; margin-bottom: 5px; font-size: 12px; }
.sidebar-guide p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.profile-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px;
  border-radius: 12px;
  background: #fafafe;
  text-align: left;
}

.profile-chip > span:first-child,
.avatar-small {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: linear-gradient(135deg, var(--violet), #9b7cff);
  font-size: 13px;
  font-weight: 800;
}

.profile-chip > span:nth-child(2) { min-width: 0; flex: 1; }
.profile-chip b,
.profile-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-chip b { font-size: 11px; }
.profile-chip small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.profile-chip i { color: #8c8e9d; font-style: normal; }

.app-main {
  min-height: 100vh;
  margin-left: 250px;
}

.mobile-appbar {
  display: none;
}

.nav-scrim {
  display: none;
}

.page-pad {
  padding: 42px clamp(28px, 4vw, 62px) 70px;
}

.dashboard-heading,
.results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.dashboard-heading h1,
.results-heading h1 {
  margin-bottom: 6px;
  font-size: 32px;
  letter-spacing: -1px;
}

.dashboard-heading p,
.results-heading p { margin: 0; color: var(--muted); font-size: 13px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 37px;
}

.stats-grid article {
  display: grid;
  grid-template-columns: 47px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 18px;
  border: 1px solid #e7e7ef;
  border-radius: 16px;
  background: white;
  box-shadow: 0 5px 15px rgba(25, 24, 55, 0.03);
}

.stat-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 13px;
  font-size: 20px;
  font-weight: 800;
}

.stat-violet { color: var(--violet); background: var(--violet-soft); }
.stat-green { color: #19875f; background: var(--mint-soft); }
.stat-blue { color: #3563d5; background: var(--blue-soft); }
.stat-orange { color: #a95a1f; background: var(--orange-soft); }

.stats-grid small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; }
.stats-grid strong { display: block; margin-top: 2px; font-size: 26px; line-height: 1; }
.stats-grid sup { font-size: 13px; }
.stats-grid em { grid-column: 2; margin-top: -10px; color: #a1a2b0; font-size: 9px; font-style: normal; }

.library-section {
  padding: 27px;
  border: 1px solid #e6e6ef;
  border-radius: var(--radius);
  background: white;
}

.library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

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

.library-heading h2 { margin: 0; font-size: 20px; }
.library-heading > div:first-child > span { padding: 4px 8px; border-radius: 8px; color: var(--muted); background: #f2f2f7; font-size: 10px; font-weight: 800; }
.library-tools { display: flex; gap: 10px; }

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #dedfe8;
  border-radius: 10px;
  background: white;
}

.search-field:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.search-field span { color: #888a9a; font-size: 19px; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 11px; }

.filter-tabs {
  display: flex;
  padding: 3px;
  border-radius: 10px;
  background: #f1f1f6;
}

.filter-tabs button {
  padding: 0 12px;
  border-radius: 8px;
  color: #747688;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.filter-tabs button.active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(20, 20, 40, .08); }

.test-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.test-card {
  overflow: hidden;
  border: 1px solid #e4e5ed;
  border-radius: 16px;
  background: white;
  transition: .22s ease;
}

.test-card:hover { transform: translateY(-3px); border-color: #d1c9f5; box-shadow: var(--shadow-sm); }

.test-cover {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 95px;
  padding: 15px;
}

.test-cover > span {
  position: relative;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.cover-violet { color: white; background: linear-gradient(135deg, #5636d6, #8667ff); }
.cover-blue { color: white; background: linear-gradient(135deg, #2f63e5, #5c8bff); }
.cover-mint { color: #164d3b; background: linear-gradient(135deg, #65e0b4, #a0f4ce); }
.cover-orange { color: #6e3b13; background: linear-gradient(135deg, #ff9a45, #ffc06e); }
.cover-coral { color: white; background: linear-gradient(135deg, #f55b70, #ff8b81); }

.cover-grid { position: absolute; inset: 0; opacity: .22; transform: rotate(15deg) scale(1.3); }
.cover-grid i { position: absolute; border: 1px solid currentColor; border-radius: 50%; }
.cover-grid i:nth-child(1) { width: 120px; height: 120px; top: -70px; right: 10px; }
.cover-grid i:nth-child(2) { width: 70px; height: 70px; bottom: -25px; right: 95px; }
.cover-grid i:nth-child(3) { width: 24px; height: 24px; top: 18px; right: 35px; }
.cover-grid i:nth-child(4) { width: 160px; height: 1px; top: 55px; right: -20px; border-radius: 0; }

.status {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  color: #5c5f70;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.status i { width: 5px; height: 5px; border-radius: 50%; background: #a1a2af; }
.status-published { color: #197555; }
.status-published i { background: #2abd83; }
.status-draft { color: #786d45; }
.status-draft i { background: #dda93c; }

.test-card-body { padding: 17px; }
.test-meta { display: flex; align-items: center; gap: 6px; color: var(--violet); font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.test-meta i { width: 3px; height: 3px; border-radius: 50%; background: #c5c5ce; }
.test-card h3 { display: -webkit-box; overflow: hidden; min-height: 42px; margin: 8px 0 6px; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.test-card-body > p { display: -webkit-box; overflow: hidden; min-height: 42px; margin-bottom: 13px; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.test-card-stats { display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 11px 0; border-top: 1px solid #eeeef3; color: #9293a2; font-size: 8px; }
.test-card-stats b { color: #56586b; }
.test-card-stats span:last-child { margin-left: auto; }
.test-card-actions { display: flex; gap: 6px; padding-top: 3px; }
.test-card-actions .button { flex: 1; }
.test-card-actions .icon-button { width: 35px; height: 35px; font-size: 14px; }

.new-test-card {
  display: flex;
  min-height: 285px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #cfcfe0;
  border-radius: 16px;
  background: #fbfbfe;
  transition: .2s ease;
}

.new-test-card:hover { border-color: var(--violet); background: var(--violet-soft); transform: translateY(-2px); }
.new-test-card > span { display: grid; width: 48px; height: 48px; margin-bottom: 13px; place-items: center; border-radius: 15px; color: var(--violet); background: white; box-shadow: var(--shadow-sm); font-size: 23px; }
.new-test-card strong { margin-bottom: 4px; font-size: 14px; }
.new-test-card small { color: var(--muted); font-size: 9px; }

.empty-state,
.no-results {
  padding: 70px 20px;
  text-align: center;
}

.empty-state > span { display: grid; width: 60px; height: 60px; margin: 0 auto 16px; place-items: center; border-radius: 18px; color: var(--violet); background: var(--violet-soft); font-size: 26px; }
.empty-state h3 { margin-bottom: 5px; }
.empty-state p { color: var(--muted); font-size: 12px; }

.toast-root {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: flex;
  max-width: 380px;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid #e3e3eb;
  border-radius: 13px;
  background: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: .23s ease;
}

.toast.is-visible { opacity: 1; transform: none; }
.toast > span { display: grid; flex: 0 0 auto; width: 25px; height: 25px; place-items: center; border-radius: 8px; color: white; background: #30b981; font-weight: 800; }
.toast p { margin: 0; font-size: 11px; font-weight: 700; line-height: 1.4; }
.toast-error > span { background: #dd4052; }
.toast-info > span { background: var(--blue); }

/* Editor */
.editor-shell {
  min-height: 100vh;
  background: #f5f5fa;
}

.editor-topbar {
  position: sticky;
  z-index: 25;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 9px 24px;
  border-bottom: 1px solid #e3e3eb;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(15px);
}

.editor-top-left,
.editor-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-top-left {
  min-width: 0;
}

.topbar-divider {
  width: 1px;
  height: 27px;
  margin-inline: 5px;
  background: #dedee7;
}

.editor-title-wrap {
  display: flex;
  min-width: 190px;
  flex-direction: column;
}

.editor-title-input {
  width: min(28vw, 390px);
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.save-status {
  margin-top: 2px;
  color: #459276;
  font-size: 8px;
  font-weight: 700;
}

.save-status.is-dirty { color: #9e7938; }
.save-status.save-error { color: #cc3d4f; }

.editor-top-actions .button {
  min-height: 39px;
  padding-inline: 13px;
  font-size: 11px;
}

.editor-tabs {
  position: sticky;
  z-index: 20;
  top: 68px;
  display: flex;
  justify-content: center;
  gap: 5px;
  min-height: 50px;
  border-bottom: 1px solid #e4e4ec;
  background: rgba(255,255,255,.96);
}

.editor-tabs button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 130px;
  justify-content: center;
  color: #77798b;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.editor-tabs button::after {
  position: absolute;
  right: 16px;
  bottom: -1px;
  left: 16px;
  height: 3px;
  border-radius: 4px 4px 0 0;
  background: transparent;
  content: "";
}

.editor-tabs button.active { color: var(--violet); }
.editor-tabs button.active::after { background: var(--violet); }

.editor-layout {
  display: grid;
  width: min(1220px, calc(100% - 40px));
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 20px;
  align-items: start;
  margin: 28px auto 60px;
}

.editor-canvas {
  min-width: 0;
}

.card,
.question-editor,
.settings-card,
.analytics-card,
.attempts-card {
  border: 1px solid #e2e3eb;
  border-radius: 16px;
  background: white;
  box-shadow: 0 5px 18px rgba(31, 28, 65, .035);
}

.test-basics {
  padding: 22px;
}

.card-heading,
.questions-heading,
.settings-card-head,
.analytics-head,
.attempts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.card-heading > div,
.questions-heading > div,
.settings-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-heading h2,
.questions-heading h2 {
  margin: 0 0 3px;
  font-size: 16px;
}

.card-heading p,
.questions-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.step-badge {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 12px;
  font-weight: 800;
}

.readiness-pill {
  padding: 7px 10px;
  border-radius: 9px;
  color: #8f6828;
  background: #fff5da;
  font-size: 8px;
  font-weight: 800;
}

.readiness-pill.ready {
  color: #167653;
  background: var(--mint-soft);
}

.basics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.span-two { grid-column: 1 / -1; }

.field-label {
  display: block;
}

.field-label > span,
.share-link > span,
.matching-labels span,
.right-items-editor > span {
  display: block;
  margin-bottom: 7px;
  color: #515365;
  font-size: 9px;
  font-weight: 800;
}

.field-label > span b { color: #e14858; }
.field-label > span em { color: #9a9ba8; font-size: 8px; font-style: normal; font-weight: 600; }

.field-label input,
.field-label textarea,
.field-label select,
.accepted-answer input,
.option-edit-row > input,
.matching-row input,
.right-items-editor input,
.order-edit-row input,
.time-limit input,
.share-link input,
.player-text-answer,
.player-matching select,
.preview-matching select {
  min-width: 0;
  width: 100%;
  border: 1px solid #dbdce6;
  border-radius: 10px;
  outline: 0;
  background: white;
  font-size: 11px;
  transition: .18s ease;
}

.field-label input,
.field-label select,
.accepted-answer input,
.option-edit-row > input,
.matching-row input,
.right-items-editor input,
.order-edit-row input,
.share-link input {
  height: 40px;
  padding: 0 12px;
}

.field-label textarea {
  min-height: 62px;
  padding: 11px 12px;
  line-height: 1.5;
  resize: vertical;
}

.field-label input:focus,
.field-label textarea:focus,
.field-label select:focus,
.accepted-answer input:focus,
.option-edit-row > input:focus,
.matching-row input:focus,
.right-items-editor input:focus,
.order-edit-row input:focus,
.share-link input:focus,
.player-text-answer:focus,
.player-matching select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-soft);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #7c7e8f;
  content: "⌄";
  pointer-events: none;
  transform: translateY(-58%);
}

.select-wrap select {
  appearance: none;
  padding-right: 30px;
}

.questions-heading {
  margin: 24px 4px 14px;
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.question-editor {
  overflow: hidden;
}

.question-incomplete {
  border-color: #efc99f;
}

.question-editor-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 7px 12px;
  border-bottom: 1px solid #e7e7ee;
  background: #fafafe;
}

.question-number {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  color: #5e6071;
  background: white;
  box-shadow: 0 2px 7px rgba(25,25,50,.08);
  font-size: 10px;
  font-weight: 800;
}

.question-kind,
.player-question-meta > div:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 8px;
  font-weight: 800;
}

.kind-violet { color: #5a3bd1; background: var(--violet-soft); }
.kind-blue { color: #315dc7; background: var(--blue-soft); }
.kind-mint { color: #197557; background: var(--mint-soft); }
.kind-orange { color: #9c531d; background: var(--orange-soft); }
.kind-pink { color: #a9408a; background: #fdeaf8; }
.kind-indigo { color: #4e4cbd; background: #ececff; }
.kind-yellow { color: #80691b; background: #fff8d9; }
.kind-coral { color: #b54450; background: var(--coral-soft); }

.question-head-spacer { flex: 1; }

.points-field {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6f7182;
  font-size: 8px;
  font-weight: 700;
}

.points-field input {
  width: 54px;
  height: 29px;
  border: 1px solid #dcdde6;
  border-radius: 8px;
  outline: 0;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
}

.question-editor-head .icon-button {
  width: 29px;
  height: 29px;
  font-size: 12px;
}

.question-editor-body {
  padding: 20px;
}

.question-editor-body > .field-label textarea {
  font-size: 13px;
  font-weight: 700;
}

.question-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 20px;
  margin-top: 16px;
}

.field-label.compact {
  margin-bottom: 13px;
}

.question-image-editor {
  min-width: 0;
}

.image-drop {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px dashed #c9cad7;
  border-radius: 12px;
  background: #fafafe;
  cursor: pointer;
  text-align: center;
}

.image-drop:hover { border-color: var(--violet); background: var(--violet-soft); }
.image-drop > span { margin-bottom: 7px; color: var(--violet); font-size: 25px; }
.image-drop strong { margin-bottom: 4px; font-size: 10px; }
.image-drop small { color: var(--muted); font-size: 7px; line-height: 1.5; }

.question-image-editor.has-image {
  overflow: hidden;
  border: 1px solid #dedfe8;
  border-radius: 12px;
}

.question-image-editor.has-image > img {
  width: 100%;
  height: 125px;
  object-fit: cover;
}

.image-actions {
  display: flex;
  gap: 5px;
  padding: 7px;
}

.image-actions .button { flex: 1; padding-inline: 7px; font-size: 8px; }

.editor-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.option-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.correct-control {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.correct-control input {
  position: absolute;
  opacity: 0;
}

.correct-control span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1.5px solid #c7c9d4;
  border-radius: 50%;
  color: transparent;
  font-size: 11px;
  font-weight: 800;
}

.correct-control input[type="checkbox"] + span { border-radius: 6px; }
.correct-control input:checked + span { color: white; border-color: var(--mint); background: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }

.option-letter {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  color: #686a7b;
  background: #f1f1f6;
  font-size: 9px;
  font-weight: 800;
}

.option-edit-row > input { flex: 1; }
.option-edit-row .icon-button { width: 29px; height: 29px; }

.image-option-row {
  align-items: stretch;
  min-height: 55px;
}

.image-option-row .correct-control { margin-top: 17px; }
.image-option-row > input { height: 55px; }

.option-thumb {
  position: relative;
  overflow: hidden;
  display: grid;
  flex: 0 0 auto;
  width: 65px;
  height: 55px;
  place-items: center;
  border: 1px solid #dddde6;
  border-radius: 9px;
  color: #aaa;
  background: #f7f7fb;
}

.option-thumb img { width: 100%; height: 100%; object-fit: cover; }
.option-thumb label { position: absolute; right: 4px; bottom: 4px; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 6px; color: white; background: var(--violet); cursor: pointer; font-size: 12px; font-weight: 800; }

.inline-add {
  margin-top: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 9px;
  font-weight: 800;
}

.field-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 10px 0 0;
  color: #7b7d8e;
  font-size: 8px;
  line-height: 1.5;
}

.field-hint.no-margin { margin: 0 0 11px; }
.field-hint span,
.accepted-answer p span,
.player-hint span {
  display: inline-grid;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 8px;
  font-weight: 800;
}

.accepted-answer {
  padding: 13px;
  border: 1px solid #e0def0;
  border-radius: 11px;
  background: #faf9ff;
}

.accepted-answer label > span { display: block; margin-bottom: 7px; color: #55576a; font-size: 9px; font-weight: 800; }
.accepted-answer p { display: flex; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }

.true-false-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tf-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid #dddde7;
  border-radius: 11px;
  cursor: pointer;
}

.tf-choice:has(input:checked) { border-color: var(--mint); background: var(--mint-soft); }
.tf-choice input { position: absolute; opacity: 0; }
.tf-choice span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: #666; background: #f0f0f5; font-weight: 800; }
.tf-choice:has(input:checked) span { color: white; background: var(--mint); }
.tf-choice strong { font-size: 9px; line-height: 1.35; }

.matching-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  padding-left: 29px;
}

.matching-row {
  display: grid;
  grid-template-columns: 21px 1fr 22px 1fr 28px;
  gap: 6px;
  align-items: center;
  margin-bottom: 7px;
}

.drag-dot { color: #aaa; font-size: 10px; }
.match-arrow { color: var(--violet); text-align: center; font-size: 14px; }
.matching-row select { width: 100%; height: 40px; padding: 0 25px 0 10px; border: 1px solid #dbdce6; border-radius: 10px; appearance: none; outline: 0; background: white; font-size: 9px; }
.matching-row .icon-button { width: 27px; height: 27px; }

.right-items-editor {
  margin: 12px 0;
  padding: 12px;
  border-radius: 11px;
  background: #f7f7fb;
}

.right-items-editor label { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.right-items-editor label b { display: grid; flex: 0 0 auto; width: 22px; height: 22px; place-items: center; border-radius: 6px; color: #55576a; background: white; font-size: 8px; }
.right-items-editor input { height: 34px; font-size: 9px; }

.ordering-editor { display: flex; flex-direction: column; gap: 7px; }
.order-edit-row { display: flex; align-items: center; gap: 7px; }
.order-number { display: grid; flex: 0 0 auto; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: white; background: var(--violet); font-size: 9px; font-weight: 800; }
.order-edit-row input { flex: 1; }
.tiny-movers { display: flex; flex-direction: column; gap: 2px; }
.tiny-movers button { display: grid; width: 22px; height: 18px; place-items: center; border-radius: 5px; color: #6d6f80; background: #f0f0f5; font-size: 8px; }
.order-edit-row .icon-button { width: 27px; height: 27px; }

.explanation-field {
  margin-top: 13px;
  border-top: 1px dashed #dedfe7;
}

.explanation-field summary {
  padding: 11px 0 0;
  color: var(--violet);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  list-style: none;
}

.explanation-field textarea { width: 100%; min-height: 55px; margin-top: 8px; padding: 9px; border: 1px solid #dedfe7; border-radius: 9px; outline: 0; font-size: 9px; resize: vertical; }

.add-question-wide,
.empty-question-state {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 15px;
  padding: 16px;
  border: 1.5px dashed #c9cad8;
  border-radius: 14px;
  color: #5f6174;
  background: rgba(255,255,255,.5);
}

.add-question-wide:hover,
.empty-question-state:hover { color: var(--violet); border-color: var(--violet); background: var(--violet-soft); }
.add-question-wide > span { font-size: 19px; }
.add-question-wide strong { font-size: 11px; }
.add-question-wide small { color: #9091a0; font-size: 8px; }

.empty-question-state {
  min-height: 260px;
  flex-direction: column;
  text-align: center;
}

.empty-question-state > span { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 16px; color: var(--violet); background: white; box-shadow: var(--shadow-sm); font-size: 24px; }
.empty-question-state h3 { margin: 5px 0 0; font-size: 16px; }
.empty-question-state p { max-width: 450px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.empty-question-state b { font-size: 10px; }

.editor-guide {
  position: sticky;
  top: 138px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.guide-card,
.checklist-card {
  padding: 18px;
  border: 1px solid #e0d9ff;
  border-radius: 15px;
  background: linear-gradient(145deg, #f8f5ff, #eeeaff);
}

.guide-icon { display: grid; width: 34px; height: 34px; margin-bottom: 25px; place-items: center; border-radius: 11px; color: #36256e; background: var(--accent); font-size: 15px; }
.guide-card h3,
.checklist-card h3 { margin-bottom: 7px; font-size: 12px; }
.guide-card p { color: var(--muted); font-size: 9px; line-height: 1.6; }
.guide-card button { padding: 0; color: var(--violet); background: transparent; font-size: 9px; font-weight: 800; }

.checklist-card { border-color: #e3e3eb; background: white; }
.checklist-card p { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: #77798a; font-size: 9px; }
.checklist-card p span { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid #d8d9e2; border-radius: 6px; font-size: 9px; }
.checklist-card p.done { color: #256f56; }
.checklist-card p.done span { color: white; border-color: var(--mint); background: var(--mint); }

.editor-footer {
  display: flex;
  justify-content: space-between;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid #e2e2ea;
  color: #9899a7;
  font-size: 8px;
}
.editor-footer p { margin: 0; }

/* Settings */
.editor-narrow {
  width: min(780px, calc(100% - 40px));
  margin: 36px auto 70px;
}

.page-section-heading {
  margin-bottom: 25px;
}

.page-section-heading h2,
.preview-toolbar h2 { margin-bottom: 7px; font-size: 27px; }
.page-section-heading p,
.preview-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }

.settings-card {
  margin-bottom: 14px;
  padding: 21px;
}

.settings-card-head {
  justify-content: flex-start;
  margin-bottom: 15px;
}

.settings-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 800;
}

.settings-icon.violet { color: var(--violet); background: var(--violet-soft); }
.settings-icon.blue { color: var(--blue); background: var(--blue-soft); }
.settings-icon.mint { color: #187154; background: var(--mint-soft); }
.settings-card-head h3 { margin: 0 0 3px; font-size: 14px; }
.settings-card-head p { margin: 0; color: var(--muted); font-size: 9px; }

.time-limit {
  max-width: 310px;
  margin: 10px 0 17px;
}
.time-limit > div { display: flex; align-items: center; }
.time-limit input { width: 95px; height: 40px; border-radius: 10px 0 0 10px; }
.time-limit b { display: flex; height: 40px; align-items: center; padding: 0 12px; border: 1px solid #dbdce6; border-left: 0; border-radius: 0 10px 10px 0; color: var(--muted); background: #f7f7fa; font-size: 9px; }
.time-limit small { display: block; margin-top: 5px; color: #999aa9; font-size: 8px; }

.setting-row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 58px;
  border-top: 1px solid #eeeef3;
  cursor: pointer;
}
.setting-row > span { flex: 1; }
.setting-row strong,
.setting-row small { display: block; }
.setting-row strong { margin-bottom: 3px; font-size: 10px; }
.setting-row small { color: var(--muted); font-size: 8px; }
.setting-row input { position: absolute; opacity: 0; }
.setting-row > i,
.answer-key-toggle > i { position: relative; width: 40px; height: 23px; border-radius: 20px; background: #d9dae3; transition: .2s; }
.setting-row > i::after,
.answer-key-toggle > i::after { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.16); content: ""; transition: .2s; }
.setting-row input:checked + i,
.answer-key-toggle input:checked + i { background: var(--violet); }
.setting-row input:checked + i::after,
.answer-key-toggle input:checked + i::after { transform: translateX(17px); }

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 13px;
  padding: 12px;
  border-radius: 11px;
  color: #326854;
  background: var(--mint-soft);
}
.privacy-note p { margin: 0; font-size: 8px; line-height: 1.55; }

.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-color: #f0d8dc; }
.danger-zone h3 { margin-bottom: 4px; font-size: 13px; }
.danger-zone p { margin: 0; color: var(--muted); font-size: 9px; }

/* Editor preview */
.preview-page {
  width: min(1000px, calc(100% - 40px));
  margin: 35px auto 70px;
}

.preview-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 20px;
}

.device-switch {
  display: flex;
  padding: 3px;
  border-radius: 10px;
  background: #e9e9f0;
}
.device-switch button { padding: 8px 10px; border-radius: 8px; color: #77798a; background: transparent; font-size: 8px; font-weight: 800; }
.device-switch button.active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.preview-frame {
  overflow: hidden;
  width: 100%;
  margin-inline: auto;
  border: 1px solid #d9dae4;
  border-radius: 20px;
  background: #f7f7fb;
  box-shadow: var(--shadow);
  transition: width .22s ease;
}

.preview-frame.preview-tablet { width: min(760px, 100%); }
.preview-frame.preview-phone { width: min(390px, 100%); }
.preview-frame.preview-phone .preview-test-head { grid-template-columns: 1fr; gap: 18px; padding: 25px 20px; }
.preview-frame.preview-phone .preview-test-head aside { justify-self: start; }
.preview-frame.preview-phone .preview-questions { margin: 15px 10px; }
.preview-frame.preview-phone .preview-question { padding: 18px 15px; }
.preview-frame.preview-phone .preview-options { grid-template-columns: 1fr; }
.preview-frame.preview-phone .preview-matching label { grid-template-columns: 1fr; gap: 5px; }

.preview-browser {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 13px;
  border-bottom: 1px solid #e0e1e9;
  background: white;
}
.preview-browser i { width: 7px; height: 7px; border-radius: 50%; background: #f17b80; }
.preview-browser i:nth-child(2) { background: #f3bf58; }
.preview-browser i:nth-child(3) { background: #5dcb84; }
.preview-browser span { min-width: 240px; margin-left: 10px; padding: 5px 12px; border-radius: 7px; color: #9a9ba8; background: #f2f2f6; font-size: 7px; }

.preview-test-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 34px 45px;
}
.preview-test-head > div > span { font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.preview-test-head h1 { margin: 8px 0 7px; font-size: 26px; }
.preview-test-head p { max-width: 600px; margin: 0; opacity: .75; font-size: 10px; line-height: 1.5; }
.preview-test-head aside { text-align: center; }
.preview-test-head aside strong { display: block; font-size: 27px; }
.preview-test-head aside span { font-size: 8px; text-transform: uppercase; }

.preview-questions {
  display: flex;
  flex-direction: column;
  gap: 13px;
  max-width: 750px;
  margin: 25px auto;
}
.preview-question { padding: 22px; border: 1px solid #e2e3eb; border-radius: 15px; background: white; }
.preview-question-meta { display: flex; justify-content: space-between; color: var(--violet); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.preview-question h3 { margin: 12px 0; font-size: 15px; }
.preview-question > p { color: var(--muted); font-size: 9px; }
.preview-options { pointer-events: none; }
.preview-matching { display: flex; flex-direction: column; gap: 7px; }
.preview-matching label { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; font-size: 9px; }
.preview-matching select { height: 37px; padding: 0 10px; }
.preview-ordering { display: flex; flex-direction: column; gap: 6px; }
.preview-ordering > div { display: flex; align-items: center; gap: 9px; padding: 9px; border: 1px solid #dddde7; border-radius: 9px; }
.preview-ordering b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: white; background: var(--violet); font-size: 8px; }
.preview-ordering p { margin: 0; font-size: 9px; }
.preview-empty { padding: 100px 20px; text-align: center; }
.preview-empty > span { display: grid; width: 55px; height: 55px; margin: auto; place-items: center; border-radius: 16px; color: var(--violet); background: var(--violet-soft); font-size: 22px; }
.preview-empty h3 { margin: 14px 0; }

/* Results */
.back-link {
  margin-bottom: 19px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}
.back-link:hover { color: var(--violet); }
.results-heading { align-items: flex-end; }
.results-actions { display: flex; gap: 8px; }

.results-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 15px;
}
.results-stats article { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px solid #e4e5ed; border-radius: 15px; background: white; }
.results-stats article > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--violet); background: var(--violet-soft); font-size: 16px; }
.results-stats article:nth-child(2) > span { color: #3462d2; background: var(--blue-soft); }
.results-stats article:nth-child(3) > span { color: #99641f; background: #fff5d9; }
.results-stats article:nth-child(4) > span { color: #197455; background: var(--mint-soft); }
.results-stats small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 8px; }
.results-stats strong { font-size: 20px; }
.results-stats sup { font-size: 10px; }

.analytics-grid {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 14px;
  margin-bottom: 14px;
}
.analytics-grid.lower-grid { grid-template-columns: 1.2fr .8fr; }
.analytics-card { padding: 21px; }
.analytics-head { align-items: flex-start; }
.analytics-head h2 { margin-bottom: 4px; font-size: 14px; }
.analytics-head p { margin: 0; color: var(--muted); font-size: 8px; }
.analytics-head > span { padding: 5px 8px; border-radius: 7px; color: var(--muted); background: #f1f1f6; font-size: 8px; font-weight: 800; }
.analytics-head .spark { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; color: #3d2c73; background: var(--accent); font-size: 14px; }

.bar-chart {
  display: grid;
  height: 180px;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: end;
  margin-top: 15px;
  padding: 15px 20px 0;
  border-bottom: 1px solid #e6e6ee;
  background: repeating-linear-gradient(0deg, transparent 0 39px, #f0f0f4 40px);
}
.bar-column { display: grid; height: 100%; grid-template-rows: 18px 1fr 25px; text-align: center; }
.bar-count { font-size: 9px; font-weight: 800; }
.bar-track { position: relative; display: flex; align-items: flex-end; justify-content: center; }
.bar-track i { width: 55%; min-height: 2px; border-radius: 7px 7px 0 0; background: var(--violet); }
.bar-track .bar-red { background: #f06a78; }
.bar-track .bar-orange { background: var(--orange); }
.bar-track .bar-blue { background: var(--blue); }
.bar-track .bar-green { background: var(--mint); }
.bar-column > b { align-self: end; padding-bottom: 8px; color: #757789; font-size: 8px; }

.insight-score { display: flex; flex-direction: column; align-items: center; padding: 18px 4px 0; text-align: center; }
.insight-score > i { display: grid; width: 105px; height: 105px; margin-bottom: 13px; place-items: center; border-radius: 50%; background: conic-gradient(var(--violet) calc(var(--score) * 1%), #e9e8f0 0); font-style: normal; }
.insight-score > i::before { position: absolute; width: 78px; height: 78px; border-radius: 50%; background: white; content: ""; }
.insight-score > i b { position: relative; font-size: 21px; }
.insight-score strong { display: block; margin-bottom: 5px; font-size: 10px; }
.insight-score p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; }

.hard-list { margin-top: 14px; }
.hard-list > div { display: flex; align-items: center; gap: 9px; min-height: 52px; border-top: 1px solid #efeff4; }
.hard-list > div > span { display: grid; flex: 0 0 auto; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: var(--violet); background: var(--violet-soft); font-size: 9px; font-weight: 800; }
.hard-list p { min-width: 0; flex: 1; margin: 0; }
.hard-list strong,
.hard-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hard-list strong { margin-bottom: 3px; font-size: 9px; }
.hard-list small { color: var(--muted); font-size: 7px; }
.hard-list > div > i { padding: 5px 8px; border-radius: 7px; font-size: 8px; font-style: normal; font-weight: 800; }
.success-low { color: #ba3d4c; background: var(--coral-soft); }
.success-medium { color: #9a591e; background: var(--orange-soft); }
.success-good { color: #3761c5; background: var(--blue-soft); }
.success-excellent { color: #1c7758; background: var(--mint-soft); }

.class-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.class-chips span { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid #e1e2e9; border-radius: 10px; background: #fafafe; }
.class-chips b { font-size: 9px; }
.class-chips i { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 6px; color: var(--violet); background: var(--violet-soft); font-size: 8px; font-style: normal; font-weight: 800; }
.mini-empty { padding: 30px 10px; text-align: center; }
.mini-empty span { display: grid; width: 40px; height: 40px; margin: auto; place-items: center; border-radius: 12px; color: var(--violet); background: var(--violet-soft); }
.mini-empty p { margin: 10px 0 0; color: var(--muted); font-size: 8px; }

.attempts-card { overflow: hidden; padding: 0; }
.attempts-head { padding: 18px 20px; }
.attempts-head h2 { margin-bottom: 3px; font-size: 14px; }
.attempts-head p { margin: 0; color: var(--muted); font-size: 8px; }
.compact-search { min-width: 190px; height: 36px; }
.table-wrap { overflow-x: auto; }
.attempts-table { width: 100%; border-collapse: collapse; }
.attempts-table th { padding: 10px 16px; color: #8a8c9c; background: #f8f8fb; font-size: 7px; font-weight: 800; text-align: left; text-transform: uppercase; }
.attempts-table td { padding: 11px 16px; border-top: 1px solid #eeeef3; color: #616375; font-size: 9px; }
.attempts-table td:first-child { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.student-avatar { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: white; background: linear-gradient(135deg, #6d4aff, #9a80ff); font-size: 9px; font-weight: 800; }
.score-badge { padding: 5px 8px; border-radius: 7px; font-weight: 800; }
.score-excellent { color: #1d7658; background: var(--mint-soft); }
.score-good { color: #335fc8; background: var(--blue-soft); }
.score-medium { color: #98551d; background: var(--orange-soft); }
.score-low { color: #b43d4b; background: var(--coral-soft); }
.attempts-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 19px; border-top: 1px solid #ececf2; color: #8a8c9b; font-size: 8px; }
.text-danger { padding: 0; color: #c33e4d; background: transparent; font-size: 8px; font-weight: 800; }

.no-results { min-height: 430px; border: 1px solid #e3e3eb; border-radius: 18px; background: white; }
.no-results-art { position: relative; display: grid; width: 95px; height: 95px; margin: auto; place-items: center; border-radius: 28px; color: var(--violet); background: var(--violet-soft); font-size: 33px; }
.no-results-art i { position: absolute; width: 18px; height: 18px; border-radius: 6px; background: var(--accent); }
.no-results-art i:first-of-type { top: -5px; right: 5px; transform: rotate(18deg); }
.no-results-art i:last-child { bottom: 2px; left: -7px; width: 12px; height: 12px; background: var(--mint); }
.no-results h2 { margin: 22px 0 8px; font-size: 21px; }
.no-results p { max-width: 500px; margin: 0 auto 22px; color: var(--muted); font-size: 11px; line-height: 1.6; }

/* Student player */
.player-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 62px;
  border-bottom: 1px solid #e1e2ea;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
}
.player-header-inner { display: flex; align-items: center; width: min(1080px, calc(100% - 32px)); min-height: 62px; margin: auto; }
.player-test-name { min-width: 0; margin-left: 25px; padding-left: 25px; border-left: 1px solid #dedfe7; }
.player-test-name span,
.player-test-name strong { display: block; overflow: hidden; max-width: 480px; text-overflow: ellipsis; white-space: nowrap; }
.player-test-name span { color: var(--violet); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.player-test-name strong { margin-top: 2px; font-size: 10px; }
.player-header-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.player-timer { display: flex; align-items: center; gap: 7px; min-width: 80px; height: 38px; padding: 0 11px; border-radius: 10px; color: #864c1d; background: var(--orange-soft); }
.player-timer b { font-size: 11px; }

.player-intro {
  min-height: calc(100vh - 62px);
  padding: 55px 20px 35px;
  background:
    radial-gradient(circle at 15% 15%, rgba(109,74,255,.08), transparent 25%),
    radial-gradient(circle at 90% 85%, rgba(64,214,161,.1), transparent 25%),
    #f6f6fb;
}
.player-intro-card { display: grid; overflow: hidden; width: min(940px, 100%); grid-template-columns: 1.05fr .95fr; margin: auto; border: 1px solid #dddde7; border-radius: 26px; background: white; box-shadow: var(--shadow); }
.intro-cover { position: relative; overflow: hidden; display: flex; min-height: 500px; flex-direction: column; justify-content: center; padding: 48px; }
.intro-cover > span { align-self: flex-start; padding: 6px 9px; border: 1px solid currentColor; border-radius: 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.intro-cover h1 { position: relative; z-index: 1; margin: 20px 0 12px; font-family: var(--display); font-size: 34px; line-height: 1.2; }
.intro-cover > p { position: relative; z-index: 1; max-width: 440px; margin-bottom: 30px; opacity: .76; font-size: 12px; line-height: 1.7; }
.intro-facts { position: relative; z-index: 1; display: flex; gap: 22px; }
.intro-facts span { font-size: 8px; font-weight: 700; text-transform: uppercase; }
.intro-facts b { display: block; margin-bottom: 3px; font-size: 19px; }
.intro-pattern { position: absolute; inset: 0; opacity: .22; }
.intro-pattern i { position: absolute; border: 1px solid currentColor; border-radius: 50%; }
.intro-pattern i:first-child { top: -140px; right: -120px; width: 390px; height: 390px; }
.intro-pattern i:nth-child(2) { right: 70px; bottom: -60px; width: 180px; height: 180px; }
.intro-pattern i:nth-child(3) { top: 90px; right: 80px; width: 50px; height: 50px; background: currentColor; }

.student-form { display: flex; flex-direction: column; justify-content: center; padding: 48px; }
.intro-step { display: inline-block; margin-bottom: 9px; color: var(--violet); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.student-form h2 { margin-bottom: 7px; font-size: 24px; }
.student-form > div > p { margin-bottom: 24px; color: var(--muted); font-size: 10px; }
.student-form .field-label { margin-bottom: 14px; }
.student-form .field-label input { height: 46px; font-size: 12px; }
.honesty-check,
.terms-check { display: flex; align-items: flex-start; gap: 8px; margin: 5px 0 18px; color: #67697b; font-size: 8px; line-height: 1.45; }
.honesty-check input,
.terms-check input { accent-color: var(--violet); }
.player-credit { margin: 20px 0 0; color: #9697a5; font-size: 8px; text-align: center; }

.player-main { width: min(930px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 55px; }
.player-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 18px; }
.player-progress-row > div { display: flex; flex: 1; align-items: center; gap: 12px; }
.player-progress-row span { white-space: nowrap; color: #767889; font-size: 8px; }
.player-progress { overflow: hidden; flex: 1; height: 5px; border-radius: 5px; background: #dddde6; }
.player-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), #997dff); transition: width .25s; }
.player-progress-row > button { padding: 0; color: var(--violet); background: transparent; font-size: 9px; font-weight: 800; }

.player-question-card { padding: clamp(24px, 5vw, 46px); border: 1px solid #dedfe8; border-radius: 23px; background: white; box-shadow: 0 14px 45px rgba(30, 27, 70, .08); }
.player-question-meta { display: flex; align-items: center; justify-content: space-between; }
.player-question-meta > b { color: #77798a; font-size: 9px; }
.player-question-card > h2 { max-width: 780px; margin: 24px 0 8px; font-size: clamp(20px, 3vw, 29px); line-height: 1.35; }
.player-question-description { margin-bottom: 22px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.player-question-image { max-height: 360px; margin: 20px auto; border-radius: 15px; object-fit: contain; }

.player-options { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 27px; }
.player-option { position: relative; display: flex; min-height: 66px; align-items: center; gap: 13px; padding: 12px 15px; border: 1.5px solid #dddde7; border-radius: 14px; background: #fff; cursor: pointer; transition: .16s ease; }
.player-option:hover { border-color: #b8acf0; background: #fbfaff; transform: translateY(-1px); }
.player-option.selected { border-color: var(--violet); background: var(--violet-soft); box-shadow: 0 0 0 3px rgba(109,74,255,.08); }
.player-option input { position: absolute; opacity: 0; }
.choice-mark { display: grid; flex: 0 0 auto; width: 33px; height: 33px; place-items: center; border: 1px solid #d5d6df; border-radius: 10px; color: #77798b; background: #f6f6fa; font-size: 10px; font-weight: 800; }
.player-option.selected .choice-mark { color: white; border-color: var(--violet); background: var(--violet); }
.player-option strong { font-size: 11px; line-height: 1.4; }
.player-image-options { grid-template-columns: repeat(3, 1fr); }
.image-player-option { flex-direction: column; align-items: stretch; }
.image-player-option img { width: 100%; height: 130px; border-radius: 9px; object-fit: cover; }
.image-player-option .choice-mark { position: absolute; z-index: 2; top: 19px; left: 19px; background: rgba(255,255,255,.9); }
.image-player-option.selected .choice-mark { background: var(--violet); }
.tf-player { grid-template-columns: 1fr 1fr; }

.player-text-wrap { display: block; margin-top: 27px; }
.player-text-wrap > span { display: block; margin-bottom: 8px; color: #666879; font-size: 9px; font-weight: 800; }
.player-text-answer { height: 57px; padding: 0 16px; font-size: 13px; }

.player-matching { display: flex; flex-direction: column; gap: 9px; margin-top: 25px; }
.player-matching label { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; align-items: center; }
.player-matching label > span { display: flex; align-items: center; gap: 10px; min-height: 49px; padding: 9px 12px; border: 1px solid #e0e1e8; border-radius: 11px; font-size: 10px; font-weight: 700; }
.player-matching label > span b { display: grid; flex: 0 0 auto; width: 26px; height: 26px; place-items: center; border-radius: 8px; color: var(--violet); background: var(--violet-soft); font-size: 9px; }
.player-matching select { height: 49px; padding: 0 30px 0 12px; appearance: none; }

.player-ordering { display: flex; flex-direction: column; gap: 8px; margin-top: 25px; }
.player-ordering > div { display: flex; align-items: center; gap: 10px; min-height: 53px; padding: 7px 10px; border: 1px solid #dedfe7; border-radius: 12px; background: #fff; }
.order-grip { color: #aaa; }
.player-ordering > div > b { display: grid; flex: 0 0 auto; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: white; background: var(--violet); font-size: 9px; }
.player-ordering p { flex: 1; margin: 0; font-size: 10px; font-weight: 700; }
.player-ordering > div > div { display: flex; gap: 4px; }
.player-ordering button { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: #636576; background: #f0f0f5; }
.player-hint { display: flex; align-items: center; gap: 7px; margin: 10px 0 0; color: var(--muted); font-size: 8px; }

.all-questions { display: flex; flex-direction: column; gap: 16px; }
.player-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.question-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.question-dots button { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; color: #7b7d8e; background: white; font-size: 8px; font-weight: 800; }
.question-dots button.done { color: #1d7858; background: var(--mint-soft); }
.question-dots button.active { color: white; background: var(--violet); box-shadow: 0 5px 15px rgba(109,74,255,.25); }

.submit-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-content: center; background: rgba(247,247,251,.92); text-align: center; backdrop-filter: blur(5px); }
.submit-overlay h2 { margin-top: 18px; font-size: 18px; }

.result-finish { position: relative; overflow: hidden; min-height: calc(100vh - 62px); padding: 45px 20px; background: radial-gradient(circle at 50% 0, #eee9ff, transparent 45%), #f6f6fb; }
.result-card { position: relative; z-index: 2; width: min(610px, 100%); margin: auto; padding: 40px; border: 1px solid #dedfe8; border-radius: 26px; background: white; box-shadow: var(--shadow); text-align: center; }
.finish-check { display: grid; width: 52px; height: 52px; margin: 0 auto 18px; place-items: center; border-radius: 17px; color: #165f47; background: var(--accent); font-size: 23px; font-weight: 800; transform: rotate(-4deg); }
.result-card h1 { margin-bottom: 8px; font-family: var(--display); font-size: 27px; }
.result-card > p { margin-bottom: 21px; color: var(--muted); font-size: 11px; }
.result-ring { display: grid; width: 170px; height: 170px; margin: 0 auto 20px; place-items: center; border-radius: 50%; background: conic-gradient(var(--violet) calc(var(--score) * 1%), #e7e6ee 0); }
.result-ring::before { position: absolute; width: 137px; height: 137px; border-radius: 50%; background: white; content: ""; }
.result-ring > div { position: relative; }
.result-ring strong,
.result-ring span { display: block; }
.result-ring strong { font-size: 39px; }
.result-ring span { color: var(--muted); font-size: 8px; }
.result-details { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 23px; padding: 14px 0; border-top: 1px solid #eeeef3; border-bottom: 1px solid #eeeef3; }
.result-details span { color: var(--muted); font-size: 8px; }
.result-details b { display: block; margin-bottom: 3px; color: var(--ink); font-size: 14px; }
.result-card > small { display: block; margin-top: 12px; color: #999aa8; font-size: 7px; }
.hidden-result-art { display: grid; width: 130px; height: 130px; margin: 15px auto 24px; place-items: center; border-radius: 50%; background: var(--violet-soft); font-size: 39px; }
.confetti i { position: absolute; width: 11px; height: 25px; border-radius: 4px; background: var(--accent); transform: rotate(20deg); }
.confetti i:nth-child(1) { top: 13%; left: 18%; }
.confetti i:nth-child(2) { top: 24%; right: 17%; background: var(--violet); transform: rotate(-30deg); }
.confetti i:nth-child(3) { bottom: 20%; left: 15%; background: var(--mint); transform: rotate(65deg); }
.confetti i:nth-child(4) { right: 22%; bottom: 13%; background: var(--orange); }
.confetti i:nth-child(5) { top: 50%; left: 7%; width: 17px; height: 17px; border-radius: 50%; background: var(--pink); }
.confetti i:nth-child(6) { top: 9%; right: 38%; width: 15px; height: 15px; border-radius: 50%; background: var(--blue); }

.player-error { display: flex; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }
.player-error > .brand { position: absolute; top: 25px; left: 30px; }
.player-error > div > span { display: grid; width: 64px; height: 64px; margin: auto; place-items: center; border-radius: 20px; color: #c13b4c; background: var(--coral-soft); font-size: 26px; font-weight: 800; }
.player-error h1 { margin: 20px 0 8px; }
.player-error p { max-width: 500px; margin: 0 auto 20px; color: var(--muted); }
.player-error > small { margin-top: 25px; color: #999; }

/* Modals */
.modal-backdrop {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 24px;
  background: rgba(20, 18, 43, .58);
  backdrop-filter: blur(6px);
  animation: fadeIn .18s ease;
}

@keyframes fadeIn { from { opacity: 0; } }

.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 22px;
  background: white;
  box-shadow: 0 30px 100px rgba(13, 9, 45, .38);
  animation: modalUp .23s ease;
}

@keyframes modalUp { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 21px;
}
.modal-head h2 { margin: 5px 0 6px; font-size: 22px; }
.modal-head p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.modal-kicker { color: var(--violet); font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.success-kicker { color: #187454; }
.modal-close { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #747687; background: #f0f0f5; font-size: 18px; }
.modal-close:hover { color: var(--ink); background: #e7e7ee; }

.auth-modal { width: min(820px, 100%); padding: 0; overflow: hidden; }
.auth-modal-grid { display: grid; grid-template-columns: .8fr 1.2fr; min-height: 560px; }
.auth-modal-grid > aside { display: flex; flex-direction: column; justify-content: space-between; padding: 31px; color: white; background: radial-gradient(circle at 90% 12%, rgba(180,150,255,.55), transparent 25%), linear-gradient(145deg, #2b176b, #5f40db); }
.auth-modal-grid > aside h2 { margin: 25px 0 10px; font-family: var(--display); font-size: 21px; line-height: 1.35; }
.auth-modal-grid > aside p { margin: 0; color: rgba(255,255,255,.7); font-size: 10px; line-height: 1.65; }
.auth-modal-grid > aside small { color: rgba(255,255,255,.55); font-size: 8px; }
.auth-art { position: relative; display: grid; width: 150px; height: 120px; margin: 50px auto 20px; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 38px 18px 32px 20px; background: rgba(255,255,255,.1); transform: rotate(-4deg); }
.auth-art b { display: grid; width: 55px; height: 55px; place-items: center; border-radius: 18px; color: #39276d; background: var(--accent); font-size: 26px; }
.auth-art i { position: absolute; width: 18px; height: 18px; border-radius: 5px; background: var(--mint); }
.auth-art i:first-child { top: -7px; left: 20px; }
.auth-art i:nth-child(2) { right: -7px; bottom: 17px; background: var(--orange); }
.auth-form-side { position: relative; padding: 34px 45px; }
.auth-form-side > .modal-close { position: absolute; top: 18px; right: 18px; }
.auth-tabs { display: inline-flex; margin-bottom: 22px; padding: 3px; border-radius: 10px; background: #f0f0f5; }
.auth-tabs button { padding: 7px 12px; border-radius: 8px; color: #7a7c8c; background: transparent; font-size: 8px; font-weight: 800; }
.auth-tabs button.active { color: var(--ink); background: white; box-shadow: 0 2px 7px rgba(0,0,0,.08); }
.auth-form-side h2 { margin-bottom: 6px; font-size: 22px; }
.auth-form-side > p { margin-bottom: 20px; color: var(--muted); font-size: 9px; }
.auth-form-side form .field-label { margin-bottom: 12px; }
.auth-form-side form .field-label input { height: 44px; }
.password-wrap { position: relative; }
.password-wrap button { position: absolute; top: 50%; right: 5px; width: 36px; height: 34px; border-radius: 8px; color: #888a99; background: transparent; transform: translateY(-50%); }
.password-wrap input { padding-right: 42px; }
.forgot-link { float: right; margin: -5px 0 13px; padding: 0; color: var(--violet); background: transparent; font-size: 8px; font-weight: 800; }
.question-type-modal { width: min(760px, 100%); }
.question-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.type-card { display: grid; grid-template-columns: 40px 1fr 18px; gap: 11px; align-items: center; min-height: 76px; padding: 12px; border: 1px solid #e0e1e9; border-radius: 13px; background: white; text-align: left; transition: .16s; }
.type-card:hover { border-color: #bcb0f0; background: #fbfaff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.type-card > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; font-size: 14px; font-weight: 800; }
.type-card strong { display: block; margin-bottom: 3px; font-size: 10px; }
.type-card p { margin: 0; color: var(--muted); font-size: 7px; line-height: 1.45; }
.type-card > i { color: #a1a2b0; font-style: normal; }
.type-violet > span { color: #5a3bd1; background: var(--violet-soft); }
.type-blue > span { color: #315dc7; background: var(--blue-soft); }
.type-mint > span { color: #197557; background: var(--mint-soft); }
.type-orange > span { color: #9c531d; background: var(--orange-soft); }
.type-pink > span { color: #a9408a; background: #fdeaf8; }
.type-indigo > span { color: #4e4cbd; background: #ececff; }
.type-yellow > span { color: #80691b; background: #fff8d9; }
.type-coral > span { color: #b54450; background: var(--coral-soft); }
.modal-tip { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px; border-radius: 11px; background: #f3f0ff; }
.modal-tip > span { color: var(--violet); }
.modal-tip p { margin: 0; color: #69657d; font-size: 8px; line-height: 1.55; }

.share-preview { overflow: hidden; padding: 22px; border-radius: 15px; }
.share-preview > span { font-size: 8px; font-weight: 800; text-transform: uppercase; }
.share-preview h3 { margin: 9px 0 5px; font-size: 20px; }
.share-preview p { margin: 0; opacity: .72; font-size: 8px; }
.share-link { display: block; margin-top: 18px; }
.share-link > div { display: flex; gap: 6px; }
.share-link input { min-width: 0; flex: 1; color: #696b7d; background: #f8f8fb; font-size: 9px; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.share-note { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #eeeef3; color: #4f7968; font-size: 8px; }

.export-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.export-options > button { display: flex; flex-direction: column; align-items: flex-start; min-height: 170px; padding: 17px; border: 1px solid #e0e0e9; border-radius: 14px; background: white; text-align: left; transition: .18s; }
.export-options > button:hover { border-color: #bdb2ef; background: #fbfaff; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.export-icon { display: grid; width: 40px; height: 40px; margin-bottom: 18px; place-items: center; border-radius: 11px; color: white; font-size: 12px; font-weight: 800; }
.word-icon { background: #3975d6; }
.pdf-icon { background: #e0525f; font-size: 8px; }
.export-options strong { display: block; margin-bottom: 5px; font-size: 11px; }
.export-options p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.export-options > button > i { align-self: flex-end; margin-top: auto; color: var(--violet); font-style: normal; }
.answer-key-toggle { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 13px; border: 1px solid #e1e2e9; border-radius: 12px; cursor: pointer; }
.answer-key-toggle input { position: absolute; opacity: 0; }
.answer-key-toggle > span { flex: 1; }
.answer-key-toggle strong,
.answer-key-toggle small { display: block; }
.answer-key-toggle strong { margin-bottom: 3px; font-size: 9px; }
.answer-key-toggle small { color: var(--muted); font-size: 7px; }
.export-preview { display: flex; justify-content: center; gap: 8px; margin-top: 13px; color: #9293a1; font-size: 7px; }
.export-preview i { width: 3px; height: 3px; border-radius: 50%; background: #bbbcc7; }

.tour-modal { width: min(750px, 100%); padding: 0; overflow: hidden; }
.tour-layout { display: grid; grid-template-columns: 215px 1fr; min-height: 470px; }
.tour-layout > aside { padding: 27px 22px; color: white; background: radial-gradient(circle at 20% 80%, rgba(113,229,188,.2), transparent 25%), linear-gradient(160deg, #24145e, #5334ce); }
.tour-brand { color: var(--accent); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.tour-map { display: flex; flex-direction: column; gap: 22px; margin-top: 48px; }
.tour-map > div { position: relative; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.48); font-size: 8px; font-weight: 700; }
.tour-map > div:not(:last-child)::after { position: absolute; top: 24px; left: 11px; width: 1px; height: 20px; background: rgba(255,255,255,.18); content: ""; }
.tour-map i { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; font-size: 8px; font-style: normal; }
.tour-map .active { color: white; }
.tour-map .active i { color: #37236d; border-color: var(--accent); background: var(--accent); }
.tour-map .done { color: rgba(255,255,255,.72); }
.tour-map .done i { color: #164e3d; border-color: var(--mint); background: var(--mint); }
.tour-layout > main { position: relative; display: flex; flex-direction: column; padding: 38px; }
.tour-layout main > .modal-close { position: absolute; top: 18px; right: 18px; }
.tour-big-icon { display: grid; width: 55px; height: 55px; margin-bottom: 22px; place-items: center; border-radius: 17px; color: #3c286f; background: var(--accent); font-size: 23px; transform: rotate(-4deg); }
.tour-layout main > small { color: var(--violet); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.tour-layout main h2 { margin: 7px 0 10px; font-size: 23px; }
.tour-layout main > p { color: var(--muted); font-size: 10px; line-height: 1.7; }
.tour-hint { display: flex; gap: 9px; margin-top: 8px; padding: 12px; border-radius: 11px; background: var(--violet-soft); }
.tour-hint > span { display: grid; flex: 0 0 auto; width: 20px; height: 20px; place-items: center; border-radius: 7px; color: white; background: var(--violet); font-size: 8px; }
.tour-hint p { margin: 0; color: #625a78; font-size: 8px; line-height: 1.55; }
.tour-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.tour-controls > div { display: flex; gap: 4px; }
.tour-controls > div i { width: 7px; height: 4px; border-radius: 4px; background: #d7d6df; }
.tour-controls > div i.active { width: 20px; background: var(--violet); }

.profile-form { display: grid; grid-template-columns: 90px 1fr; gap: 13px; }
.profile-avatar-large { display: grid; width: 76px; height: 76px; grid-row: span 2; place-items: center; border-radius: 22px; color: white; background: linear-gradient(135deg, var(--violet), #a289ff); font-size: 25px; font-weight: 800; }
.profile-form .full-button { grid-column: 1 / -1; }
.review-modal { width: min(670px, 100%); }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 420px; overflow-y: auto; }
.review-grid > button { display: grid; grid-template-columns: 32px 1fr 15px; gap: 9px; align-items: center; min-height: 61px; padding: 9px; border: 1px solid #e1e2e9; border-radius: 11px; background: white; text-align: left; }
.review-grid > button:hover { border-color: #bcb1ed; background: #fbfaff; }
.review-grid > button > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: #77798a; background: #f0f0f5; font-size: 9px; font-weight: 800; }
.review-grid > button.answered > span { color: #176f52; background: var(--mint-soft); }
.review-grid strong,
.review-grid p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-grid strong { margin-bottom: 3px; font-size: 9px; }
.review-grid p { margin: 0; color: var(--muted); font-size: 7px; }
.review-grid i { color: #aaa; font-style: normal; }
.review-footer { display: flex; align-items: center; gap: 15px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eeeef3; color: var(--muted); font-size: 8px; }
.review-footer span { display: flex; align-items: center; gap: 5px; }
.review-footer span i { width: 7px; height: 7px; border-radius: 50%; background: #cccdd6; }
.review-footer span i.answered-dot { background: var(--mint); }
.review-footer .button { margin-left: auto; }

.compact-head { margin-bottom: 12px; }
.compact-head h2 { font-size: 17px; }
.action-list { display: flex; flex-direction: column; gap: 5px; }
.action-list > button { display: grid; grid-template-columns: 38px 1fr 15px; gap: 10px; align-items: center; min-height: 58px; padding: 9px; border-radius: 11px; background: transparent; text-align: left; }
.action-list > button:hover { background: #f7f7fb; }
.action-list > button > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: var(--violet); background: var(--violet-soft); font-size: 14px; }
.action-list strong,
.action-list small { display: block; }
.action-list strong { margin-bottom: 3px; font-size: 10px; }
.action-list small { color: var(--muted); font-size: 7px; }
.action-list > button > i { color: #aaa; font-style: normal; }
.action-list > button.danger { color: #b53847; }
.action-list > button.danger > span { color: #b53847; background: var(--coral-soft); }

.confirm-modal { width: min(420px, 100%); }
.confirm-modal-content { text-align: center; }
.confirm-icon { display: grid; width: 56px; height: 56px; margin: 0 auto 17px; place-items: center; border-radius: 18px; color: #695228; background: #fff2cf; font-size: 22px; font-weight: 800; transform: rotate(-4deg); }
.confirm-icon.danger { color: #b23645; background: var(--coral-soft); }
.confirm-modal h2 { margin-bottom: 8px; font-size: 20px; }
.confirm-modal p { margin-bottom: 20px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.confirm-modal-content > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Responsive */
@media (max-width: 1180px) {
  .hero { grid-template-columns: .9fr 1.1fr; gap: 25px; }
  .builder-window { width: 590px; transform: scale(.92) rotateY(-5deg) rotateZ(1deg); transform-origin: left center; }
  .test-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .editor-guide { display: none; }
  .editor-layout { grid-template-columns: 1fr; max-width: 930px; }
  .editor-top-actions .button-ghost { display: none; }
}

@media (max-width: 1024px) {
  .landing-nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 60px; text-align: center; }
  .hero-copy h1,
  .hero-copy > p { margin-left: auto; margin-right: auto; }
  .hero-actions,
  .hero-proof { justify-content: center; }
  .hero-visual { width: min(680px, 100%); margin: auto; }
  .builder-window { left: 50%; width: 650px; transform: translateX(-50%) rotateZ(1deg); }
  .landing-shell { min-height: 1230px; }
  .feature-section { padding-top: 80px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .feature-bento { grid-template-columns: 1fr 1fr; }
  .feature-large { grid-column: 1 / -1; }
  .feature-wide { grid-template-columns: 1fr 330px; }
  .final-cta { padding: 45px; }
  .final-cta h2 { font-size: 29px; }

  .sidebar { width: 225px; }
  .app-main { margin-left: 225px; }
  .page-pad { padding-inline: 25px; }
  .library-heading { align-items: flex-start; flex-direction: column; }
  .library-tools { width: 100%; }
  .search-field { flex: 1; }
  .results-stats { grid-template-columns: 1fr 1fr; }
  .analytics-grid,
  .analytics-grid.lower-grid { grid-template-columns: 1fr; }

  .hide-mobile { display: none !important; }
  .show-mobile { display: inline-grid !important; }
  .editor-topbar .brand,
  .topbar-divider { display: none; }
  .editor-title-input { width: min(38vw, 320px); }
}

@media (max-width: 780px) {
  .container { width: min(100% - 28px, 1180px); }
  .landing-nav { height: 72px; }
  .landing-nav .nav-actions .button:first-child { display: none; }
  .landing-nav .button { min-height: 38px; padding-inline: 12px; font-size: 11px; }
  .hero { min-height: auto; padding: 55px 0 75px; }
  .hero-copy h1 { font-size: 39px; letter-spacing: -1.7px; }
  .hero-copy > p { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 390px; margin-inline: auto; }
  .hero-proof { flex-wrap: wrap; }
  .hero-visual { min-height: 430px; }
  .builder-window { width: 610px; transform: translateX(-50%) scale(.75) rotateZ(1deg); transform-origin: top center; }
  .landing-shell { min-height: 1090px; }
  .floating-pill { display: none; }
  .section-heading h2 { font-size: 31px; }
  .feature-section { padding: 70px 0; }
  .feature-bento { grid-template-columns: 1fr; }
  .feature-card,
  .feature-large,
  .feature-wide { grid-column: auto; min-height: auto; }
  .violet-card { display: block; min-height: 350px; }
  .type-cloud { right: 20px; }
  .feature-wide { display: block; min-height: 470px; }
  .paper-stack { margin-top: 20px; }
  .steps-section { padding: 70px 0 80px; }
  .steps-grid { grid-template-columns: 1fr; gap: 45px; }
  .steps-grid::before { top: 50px; bottom: 50px; left: 50%; width: 2px; height: auto; background: repeating-linear-gradient(0deg, #c9c2e4 0 8px, transparent 8px 15px); }
  .steps-grid article { background: #f6f5fb; }
  .steps-grid article > span { right: calc(50% - 75px); }
  .final-cta { align-items: flex-start; flex-direction: column; gap: 25px; margin-block: 70px; padding: 34px 28px; }
  .final-cta h2 { font-size: 26px; }
  .landing-footer .container { align-items: flex-start; flex-direction: column; gap: 10px; }
  .landing-footer > .container > span { margin-left: 0; }

  .sidebar { z-index: 70; width: min(300px, 86vw); transform: translateX(-105%); transition: transform .22s ease; }
  .nav-open .sidebar { transform: none; }
  .nav-close { display: grid; }
  .nav-scrim { position: fixed; z-index: 60; inset: 0; background: rgba(20,18,43,.45); }
  .nav-open .nav-scrim { display: block; }
  .app-main { margin-left: 0; }
  .mobile-appbar { position: sticky; z-index: 25; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 8px 15px; border-bottom: 1px solid #e3e3eb; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
  .mobile-appbar .brand { font-size: 15px; }
  .mobile-appbar .brand-mark { width: 30px; height: 30px; }
  .page-pad { padding: 27px 16px 55px; }
  .dashboard-heading,
  .results-heading { align-items: stretch; flex-direction: column; }
  .dashboard-heading .button-large { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stats-grid article { min-height: 96px; padding: 12px; }
  .stats-grid em { display: none; }
  .library-section { padding: 17px; }
  .library-tools { flex-direction: column; }
  .search-field { width: 100%; }
  .filter-tabs { min-height: 40px; }
  .filter-tabs button { flex: 1; }
  .test-grid { grid-template-columns: 1fr; }
  .new-test-card { min-height: 180px; }
  .editor-topbar { gap: 8px; padding: 8px 10px; }
  .editor-top-left { flex: 1; }
  .editor-title-wrap { min-width: 0; flex: 1; }
  .editor-title-input { width: 100%; }
  .editor-top-actions .button { min-width: 40px; padding-inline: 10px; font-size: 0; }
  .editor-top-actions .button::first-letter { font-size: 12px; }
  .editor-top-actions .button-primary { font-size: 0; }
  .editor-top-actions .button-primary::after { content: "✓"; font-size: 12px; }
  .editor-top-actions [data-action="share-current"]::after { content: "↗"; font-size: 12px; }
  .editor-top-actions .button-accent,
  .editor-top-actions .button-success { display: none; }
  .editor-tabs { top: 64px; overflow-x: auto; justify-content: flex-start; padding-inline: 10px; }
  .editor-tabs button { min-width: 120px; }
  .editor-layout { width: calc(100% - 20px); margin-top: 15px; }
  .test-basics { padding: 16px; }
  .basics-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .readiness-pill { display: none; }
  .questions-heading { align-items: flex-end; }
  .questions-heading .button { padding-inline: 10px; font-size: 9px; }
  .question-editor-head { flex-wrap: wrap; }
  .question-head-spacer { flex-basis: 20px; }
  .points-field { margin-left: auto; }
  .question-editor-body { padding: 15px; }
  .question-body-grid { grid-template-columns: 1fr; }
  .question-image-editor { grid-row: 1; }
  .image-drop { min-height: 110px; }
  .matching-labels { display: none; }
  .matching-row { grid-template-columns: 1fr 20px 1fr 25px; }
  .matching-row .drag-dot { display: none; }
  .add-question-wide { align-items: flex-start; flex-direction: column; }
  .editor-narrow,
  .preview-page { width: calc(100% - 20px); margin-top: 22px; }
  .settings-card { padding: 16px; }
  .danger-zone { align-items: flex-start; flex-direction: column; }
  .preview-toolbar { align-items: flex-start; flex-direction: column; }
  .device-switch { display: none; }
  .preview-test-head { padding: 25px 20px; }
  .preview-questions { margin: 15px 10px; }
  .preview-frame { border-radius: 14px; }

  .results-actions { flex-direction: column; }
  .results-stats { grid-template-columns: 1fr 1fr; }
  .analytics-card { padding: 16px; }
  .bar-chart { gap: 7px; padding-inline: 5px; }
  .attempts-head { align-items: stretch; flex-direction: column; }
  .compact-search { width: 100%; }
  .attempts-table { min-width: 690px; }

  .player-header-inner { width: calc(100% - 22px); }
  .player-header .brand > span:last-child { display: none; }
  .player-test-name { margin-left: 12px; padding-left: 12px; }
  .player-test-name span,
  .player-test-name strong { max-width: 200px; }
  .player-intro { padding: 22px 10px; }
  .player-intro-card { grid-template-columns: 1fr; border-radius: 18px; }
  .intro-cover { min-height: 300px; padding: 30px; }
  .intro-cover h1 { font-size: 27px; }
  .student-form { padding: 30px; }
  .player-main { width: calc(100% - 20px); padding-top: 17px; }
  .player-question-card { padding: 23px 17px; border-radius: 17px; }
  .player-options,
  .player-image-options { grid-template-columns: 1fr; }
  .image-player-option img { height: 190px; }
  .player-matching label { grid-template-columns: 1fr; gap: 5px; }
  .player-navigation { flex-wrap: wrap; }
  .player-navigation > .button { flex: 1; min-width: 130px; }
  .question-dots { width: 100%; order: -1; }
  .result-card { padding: 30px 18px; }

  .modal-backdrop { align-items: end; padding: 10px; }
  .modal { width: 100%; max-height: calc(100vh - 20px); border-radius: 20px 20px 14px 14px; }
  .auth-modal-grid { grid-template-columns: 1fr; }
  .auth-modal-grid > aside { display: none; }
  .auth-form-side { padding: 34px 25px 25px; }
  .question-type-grid { grid-template-columns: 1fr; }
  .tour-layout { grid-template-columns: 1fr; }
  .tour-layout > aside { display: none; }
  .tour-layout > main { min-height: 480px; padding: 32px 24px; }
  .review-grid { grid-template-columns: 1fr; }
  .review-footer { align-items: flex-start; flex-wrap: wrap; }
  .review-footer .button { width: 100%; margin-left: 0; }
}

@media (max-width: 480px) {
  .button { white-space: normal; line-height: 1.25; }
  .hero-copy h1 { font-size: 33px; }
  .hero-proof { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-visual { min-height: 350px; }
  .builder-window { transform: translateX(-50%) scale(.61) rotateZ(1deg); }
  .landing-shell { min-height: 1000px; }
  .feature-card { padding: 23px; }
  .feature-card h3 { font-size: 21px; }
  .violet-card { min-height: 390px; }
  .type-cloud { right: -25px; width: 260px; }
  .paper-stack { transform: scale(.8); transform-origin: top center; }
  .feature-wide { min-height: 430px; }
  .final-cta h2 { font-size: 22px; }

  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid article { grid-template-columns: 45px 1fr auto; }
  .stats-grid em { display: block; grid-column: auto; margin: 0; }
  .library-section { padding: 13px; border-radius: 15px; }
  .filter-tabs button { padding-inline: 6px; font-size: 8px; }
  .test-card-actions .button { font-size: 11px; }

  .editor-top-actions .show-mobile { display: grid !important; }
  .editor-tabs button { min-width: 108px; font-size: 9px; }
  .question-editor-head .question-kind { max-width: calc(100% - 48px); order: 2; overflow-wrap: anywhere; }
  .question-head-spacer { display: none; }
  .points-field { order: 3; }
  .question-editor-head .icon-button { order: 4; }
  .question-editor-head { gap: 7px; }
  .true-false-editor { grid-template-columns: 1fr; }
  .matching-row { grid-template-columns: 1fr 18px 1fr; }
  .matching-row .icon-button { grid-column: 3; }
  .image-option-row { flex-wrap: wrap; }
  .image-option-row > input { flex-basis: calc(100% - 40px); }
  .order-edit-row { flex-wrap: wrap; }
  .order-edit-row input { min-width: 0; }
  .editor-footer { width: calc(100% - 20px); }

  .results-stats { grid-template-columns: 1fr; }
  .results-stats article { padding: 13px; }
  .result-details { grid-template-columns: 1fr; gap: 12px; }
  .player-progress-row > div { align-items: flex-start; flex-direction: column; gap: 6px; }
  .player-progress { width: 100%; }
  .player-progress-row > button { white-space: nowrap; }
  .player-question-card > h2 { font-size: 19px; }
  .player-option { min-height: 58px; }
  .intro-facts { gap: 15px; }
  .intro-cover { padding: 25px; }
  .student-form { padding: 25px; }
  .player-test-name strong { max-width: 130px; }
  .player-timer { min-width: auto; }
  .player-navigation > .button { min-width: 0; padding-inline: 10px; font-size: 10px; }

  .modal { padding: 19px; }
  .modal-head h2 { font-size: 19px; }
  .share-actions,
  .export-options { grid-template-columns: 1fr; }
  .export-options > button { min-height: 135px; }
  .profile-form { grid-template-columns: 1fr; }
  .profile-avatar-large { grid-row: auto; margin: auto; }
  .profile-form .full-button { grid-column: auto; }
  .confirm-modal-content > div { grid-template-columns: 1fr; }
  .tour-controls .button { padding-inline: 10px; font-size: 9px; }
}

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

@media print {
  .sidebar,
  .mobile-appbar,
  .editor-topbar,
  .editor-tabs,
  .toast-root,
  #modal-root { display: none !important; }
}
