:root {
  --bg: #111111;
  --surface: #191919;
  --surface-2: #232323;
  --surface-3: #2d2d2d;
  --surface-4: #3a3a3a;
  --text: #ffffff;
  --text-muted: #b8b8b8;
  --text-dim: #757575;
  --text-sub: #505050;
  --brand: #00a2ff;
  --brand-hover: #2fb6ff;
  --brand-glow: rgba(0, 162, 255, 0.35);
  --green: #00b06b;
  --green-glow: rgba(0, 176, 107, 0.35);
  --gold: #f5c518;
  --gold-dim: #c79e11;
  --red: #ff4d4d;
  --orange: #ff8c42;
  --purple: #8b5cf6;
  --pink: #ff5aa0;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.35);
  --shadow-card: 0 2px 4px rgba(0,0,0,0.45), 0 6px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.55);
  --max-width: 1280px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- top navigation ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 50px;
  padding: 0 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex: none;
}

.search {
  flex: 1;
  max-width: 540px;
  margin: 0 auto;
  position: relative;
}

.search input {
  width: 100%;
  height: 36px;
  padding: 0 0.9rem 0 2.4rem;
  border: 1px solid var(--surface-3);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.search input::placeholder {
  color: var(--text-dim);
}

.search input:focus {
  background: var(--surface-3);
  border-color: var(--surface-4);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.bux {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
}

.bux::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffea8a, var(--gold));
  box-shadow: 0 0 6px rgba(245, 197, 24, 0.45);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 36px;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--surface-3);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease, box-shadow 120ms ease;
}

.btn:hover {
  background: var(--surface-4);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 12px var(--brand-glow);
}

.btn--primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 0 18px var(--brand-glow);
}

.btn--gold {
  background: var(--gold);
  color: #1a1a1a;
}

.btn--gold:hover {
  background: #ffd84d;
}

.btn--green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 12px var(--green-glow);
}

.btn--green:hover {
  background: #00c97d;
}

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: calc(100vh - 50px);
}

.sidebar {
  position: sticky;
  top: 50px;
  height: calc(100vh - 50px);
  background: var(--surface);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 0.9rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.65rem 0.25rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.62rem;
  font-weight: 600;
  transition: background 120ms ease, color 120ms ease;
}

.sidebar a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar a.is-here {
  background: var(--surface-2);
  color: var(--text);
}

.nav-icon {
  width: 24px;
  height: 24px;
  color: currentColor;
}

.main {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 1.5rem 2rem 3rem;
  background: var(--bg);
}

/* ---------- section headings ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0 0.85rem;
}

.section-head h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.section-link {
  color: var(--brand);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.section-link:hover {
  text-decoration: underline;
}

/* ---------- hero banner ---------- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #2d1b4e 0%, #1e1b4b 40%, #0f172a 100%);
  min-height: 300px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.08);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.25), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(0, 162, 255, 0.18), transparent 40%);
  pointer-events: none;
}

.hero-content {
  padding: 2.25rem 2.5rem;
  z-index: 1;
}

.hero h1 {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 0.9rem;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 1.4rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 420px;
}

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

.hero-visual {
  position: relative;
  height: 100%;
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.hero-avatar {
  width: 160px;
  height: 160px;
  position: relative;
  filter: drop-shadow(0 16px 40px rgba(0,0,0,0.6));
}

/* ---------- game cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 1.1rem;
}

.card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 180ms ease;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255,255,255,0.05);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.08);
}

.card-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.card-thumb svg {
  width: 70%;
  height: 70%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity 150ms ease;
}

.card:hover .card-thumb::after {
  opacity: 1;
}

.play-icon {
  position: absolute;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 2;
}

.play-icon svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
  color: #111;
}

.card:hover .play-icon {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 0.75rem 0.9rem 0.85rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-creator {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0 0 0.45rem;
}

.card-stats {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.card-stats span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-stats svg {
  width: 13px;
  height: 13px;
}

/* ---------- badge / flag ---------- */
.flag {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.18rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.flag--beta {
  background: var(--brand);
}

.flag--popular {
  background: var(--gold);
  color: #1a1a1a;
}

.flag--sale {
  background: var(--red);
}

/* ---------- continue row ---------- */
.continue-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.continue-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.7rem;
  text-decoration: none;
  color: var(--text);
  transition: background 120ms ease, transform 120ms ease;
  border: 1px solid rgba(255,255,255,0.05);
}

.continue-card:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}

.continue-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.continue-thumb svg {
  width: 75%;
  height: 75%;
}

.continue-info {
  min-width: 0;
}

.continue-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0 0 0.2rem;
}

.continue-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0 0 0.35rem;
}

.continue-bar {
  height: 4px;
  width: 140px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.continue-bar span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
}

/* ---------- footer ---------- */
.foot {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 2rem;
}

/* ---------- auth page ---------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  padding: 1rem;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
}

.auth-box h1 {
  text-align: center;
  margin: 0 0 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: var(--surface-2);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.06);
}

.tab {
  flex: 1;
  text-align: center;
  padding: 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 120ms ease, color 120ms ease;
}

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

.tab.is-on {
  background: var(--surface-3);
  color: var(--text);
}

.field {
  margin-bottom: 0.95rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.field input,
.field select {
  width: 100%;
  height: 42px;
  padding: 0 0.75rem;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ---------- builder page ---------- */
.builder-prompt {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.builder-prompt label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.builder-prompt textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.9rem;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.builder-prompt textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.builder-tools {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
}

.tool-box {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  min-height: 380px;
}

.tool-box h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.tool-box p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.tool-box ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.tool-box li {
  margin-bottom: 0.45rem;
}

.preview-area {
  background: var(--surface-2);
  border: 2px dashed var(--surface-4);
  border-radius: var(--radius-sm);
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  margin-top: 1rem;
  text-align: center;
  padding: 1rem;
}

/* ---------- earn page ---------- */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.subject-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.1rem 0.6rem;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background 120ms ease, transform 120ms ease;
}

.subject-card:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}

.subject-card .emoji {
  font-size: 1.9rem;
}

.subject-card .name {
  font-size: 0.88rem;
  font-weight: 700;
}

.question-box {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 620px;
  margin: 0 auto 1rem;
}

.question-box h2 {
  margin: 0.5rem 0 1.25rem;
  font-size: 1.6rem;
  text-align: center;
}

.difficulty {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--orange);
  color: #fff;
  margin-bottom: 0.6rem;
}

.answers {
  display: grid;
  gap: 0.7rem;
}

.answer-btn {
  text-align: left;
  justify-content: flex-start;
  height: 46px;
  background: var(--surface-2);
  border-color: var(--surface-3);
}

.answer-btn:hover {
  background: var(--surface-3);
}

.reward {
  text-align: center;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- shop page ---------- */
.shop-currency {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.1rem;
}

.item-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
  transition: background 120ms ease, transform 120ms ease;
}

.item-card:hover {
  background: var(--surface-2);
  transform: translateY(-3px);
}

.item-preview {
  width: 88px;
  height: 88px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
}

.item-preview svg {
  width: 60%;
  height: 60%;
}

.item-name {
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0 0 0.2rem;
}

.item-price {
  color: var(--gold);
  font-weight: 800;
  font-size: 0.95rem;
  margin: 0 0 0.9rem;
}

/* ---------- profile page ---------- */
.profile-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.avatar-preview {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid rgba(255,255,255,0.1);
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
}

.avatar-preview svg {
  width: 80%;
  height: 80%;
}

.profile-name {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 0.3rem;
}

.profile-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.75rem;
}

.plan-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 120ms ease;
}

.plan-card:hover {
  transform: translateY(-3px);
}

.plan-card.popular {
  border-color: var(--gold);
}

.plan-card.max {
  border-color: var(--brand);
}

.plan-name {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.55rem;
}

.plan-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  min-height: 3rem;
}

.plan-price {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 1rem;
}

.plan-card ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.plan-card li {
  margin-bottom: 0.4rem;
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 200px; order: -1; }
  .search { max-width: none; }
  .builder-tools { grid-template-columns: 1fr; }
  .profile-card { flex-direction: column; text-align: center; }
}

/* ---------- set maker ---------- */
.maker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.maker-title {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--surface-3);
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 800;
  padding: 0.25rem 0;
  min-width: 260px;
  outline: none;
}

.maker-title:focus {
  border-color: var(--brand);
}

.maker-desc {
  width: 100%;
  min-height: 70px;
  padding: 0.9rem;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
  margin-bottom: 1.25rem;
}

.maker-desc:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.question-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1rem;
  transition: box-shadow 150ms ease;
}

.question-card:focus-within {
  border-color: rgba(0,162,255,0.4);
  box-shadow: 0 0 0 2px var(--brand-glow);
}

.question-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.question-header select {
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
}

.question-title {
  flex: 1;
  min-width: 200px;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.question-title:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-glow);
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.choice-row input[type="text"] {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.choice-row input[type="text"]:focus {
  border-color: var(--brand);
}

.choice-row .drag {
  cursor: grab;
  color: var(--text-dim);
  font-size: 1rem;
  user-select: none;
}

.icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--red);
}

.add-btn {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.save-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.85rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  z-index: 50;
}

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

.set-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}

.set-item h4 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
}

.set-item p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.play-question {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 720px;
  margin: 0 auto 1rem;
}

.play-options {
  display: grid;
  gap: 0.6rem;
}

.play-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.play-option:hover {
  background: var(--surface-3);
}

.play-option.selected {
  border-color: var(--brand);
  background: rgba(0,162,255,0.12);
}

.play-option input {
  accent-color: var(--brand);
}

.result-box {
  max-width: 720px;
  margin: 1rem auto;
  padding: 1.25rem;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 700;
}

.result-box.good { background: rgba(0,176,107,0.15); color: var(--green); }
.result-box.ok { background: rgba(245,197,24,0.15); color: var(--gold); }
.result-box.bad { background: rgba(255,77,77,0.15); color: var(--red); }

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rank-list li {
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem;
  margin-bottom: 0.4rem;
  cursor: grab;
}

.rank-list li.dragging {
  opacity: 0.5;
}

.likert-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.likert-row label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
  min-width: 70px;
}

.likert-row input:checked + span {
  color: var(--brand);
}

.likert-row input {
  accent-color: var(--brand);
}

@media (max-width: 820px) {
  .maker-header { flex-direction: column; align-items: flex-start; }
  .save-bar { justify-content: center; }
}

/* ---------- ClassBlox app-specific styles ---------- */

.card {
  display: block;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
  overflow: visible;
}

.card:hover {
  transform: none;
  box-shadow: var(--shadow-card);
}

.card-body {
  padding: 0.75rem 0 0;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.3rem 0 0;
  line-height: 1.45;
}

.card--center {
  text-align: center;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.card--word {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.logo-big {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.beta-callout {
  background: var(--surface-2);
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.beta-callout strong {
  color: var(--text);
}

.form label {
  display: block;
  margin-bottom: 1rem;
  text-align: left;
}

.form label span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form input,
.form select {
  width: 100%;
  height: 46px;
  padding: 0 0.85rem;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.form input:focus,
.form select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.btn--large {
  height: 46px;
  padding: 0 1.5rem;
  font-size: 1rem;
}

.btn--ghost {
  background: transparent;
  border-color: var(--surface-3);
  color: var(--text-muted);
}

.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

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

@media (max-width: 40rem) {
  .stats-row { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.difficulty-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.5rem;
}

.mode-buttons,
.grade-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.mode-btn,
.grade-pill {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-3);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}

.mode-btn.is-on,
.grade-pill.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.mode-btn.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.options {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.options.is-locked {
  pointer-events: none;
}

.option {
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-3);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.option:hover {
  background: var(--surface-3);
  border-color: var(--surface-4);
}

.option.is-correct {
  background: rgba(0, 176, 107, 0.18);
  border-color: var(--green);
  color: var(--green);
}

.option.is-wrong {
  background: rgba(255, 77, 77, 0.18);
  border-color: var(--red);
  color: var(--red);
}

.option.is-disabled {
  opacity: 0.5;
}

.quiz-feedback {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.quiz-feedback.correct {
  background: rgba(0, 176, 107, 0.12);
  color: var(--green);
}

.quiz-feedback.wrong {
  background: rgba(255, 77, 77, 0.12);
  color: var(--red);
}

.progress-bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 200ms ease;
}

.hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.6rem 0.85rem;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
}

.hud-streak,
.hud-diff,
.hud-bux {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.hud-bux {
  margin-left: auto;
  color: var(--gold);
  background: rgba(245, 197, 24, 0.12);
  border-color: rgba(245, 197, 24, 0.3);
}

.word-title {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.word-part {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.word-def {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.word-example {
  border-left: 3px solid var(--brand);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.extreme-note {
  color: var(--orange);
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}

.spelling-input {
  width: 100%;
  height: 52px;
  padding: 0 1rem;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  outline: none;
  margin-bottom: 1rem;
}

.spelling-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.usage-sentence {
  font-size: 1.1rem;
  color: var(--text);
  margin: 1rem 0;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand);
}

.usage-blank {
  display: inline-block;
  min-width: 7ch;
  border-bottom: 2px solid var(--text-muted);
  text-align: center;
  font-weight: 700;
  color: var(--brand);
}

.severity {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pin-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
}

.pin-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.5rem;
  color: var(--text);
}

.welcome {
  margin-bottom: 1.25rem;
}

.welcome h1 {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
}

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

.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.error {
  color: var(--red);
}

