/**
 * Literacy Quiz — pastel UI (no build required)
 */
:root {
  --lit-blue: #b8d4f0;
  --lit-mint: #b8e8d4;
  --lit-coral: #ffb8a8;
  --lit-yellow: #ffe8a8;
  --lit-ink: #1e3a5f;
  --lit-muted: #64748b;
  --lit-accent: #0ea5e9;
  --lit-deep: #4338ca;
}

* { box-sizing: border-box; }

body.lit-body {
  margin: 0;
  font-family: "Noto Sans KR", system-ui, sans-serif;
  background: linear-gradient(180deg, #e0f2fe 0%, #ecfdf5 40%, #fef9c3 100%);
  color: var(--lit-ink);
  min-height: 100vh;
}

.lit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 2px solid var(--lit-blue);
  position: sticky;
  top: 0;
  z-index: 10;
}

.lit-home {
  font-size: 13px;
  font-weight: 800;
  color: var(--lit-accent);
  text-decoration: none;
  flex-shrink: 0;
}

.lit-kicker {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  color: #7c3aed;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lit-header h1 {
  margin: 2px 0 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.lit-level-tag {
  font-size: 11px;
  font-weight: 800;
  background: var(--lit-mint);
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.lit-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 12px 16px;
  position: relative;
  z-index: 20;
}

.lit-nav-lvs {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.lit-nav-mod,
.lit-nav-lv {
  border: 2px solid var(--lit-blue);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
  pointer-events: auto;
  position: relative;
  z-index: 21;
}

.lit-nav-mod.active {
  background: var(--lit-accent);
  color: #fff;
  border-color: var(--lit-accent);
}

.lit-nav-lv.active {
  background: #8b5cf6;
  color: #fff;
  border-color: #8b5cf6;
}

.lit-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 100px;
}

.lit-card {
  background: #fff;
  border-radius: 24px;
  border: 2px solid var(--lit-blue);
  padding: 24px;
  box-shadow: 0 12px 32px rgba(30, 58, 95, 0.08);
}

.lit-card-head h2 {
  margin: 8px 0 6px;
  font-size: 1.25rem;
  font-weight: 900;
}

.lit-card-head p {
  margin: 0 0 16px;
  line-height: 1.55;
  color: var(--lit-muted);
  font-weight: 600;
}

.lit-badge {
  font-size: 11px;
  font-weight: 900;
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 12px;
  border-radius: 999px;
}

.lit-dots {
  display: inline-flex;
  gap: 6px;
  margin-left: 10px;
  vertical-align: middle;
}

.lit-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2e8f0;
}

.lit-dot.done { background: #fbbf24; }
.lit-dot.cur { background: var(--lit-accent); transform: scale(1.2); }

.lit-hint {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--lit-muted);
  margin: 0 0 12px;
}

.lit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.lit-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 12px 8px;
  border: 3px solid var(--lit-blue);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.lit-tile:active { transform: scale(0.97); }

.lit-tile.picked {
  background: var(--lit-mint);
  border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.25);
  transform: scale(1.03);
}

.lit-tile.used { opacity: 0.35; pointer-events: none; }

.lit-emoji { font-size: 2.25rem; line-height: 1.2; }
.lit-lab { font-size: 11px; font-weight: 800; margin-top: 4px; color: var(--lit-muted); }

.lit-sentence {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px;
  margin-bottom: 8px;
  border: 2px solid var(--lit-blue);
  border-radius: 16px;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  min-height: 56px;
}

.lit-sentence.crossed {
  background: rgba(255, 184, 168, 0.45);
  border-color: var(--lit-coral);
  text-decoration: line-through;
  opacity: 0.75;
}

.lit-rule-box {
  background: #ede9fe;
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  margin-bottom: 14px;
}

.lit-rule-label {
  font-size: 10px;
  font-weight: 900;
  color: #6d28d9;
  text-transform: uppercase;
}

.lit-rule-box p {
  margin: 4px 0 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.lit-basket {
  min-height: 100px;
  border: 3px dashed var(--lit-mint);
  border-radius: 16px;
  background: rgba(184, 232, 212, 0.35);
  padding: 12px;
  margin-bottom: 14px;
}

.lit-basket-label {
  font-size: 12px;
  font-weight: 800;
  color: #059669;
  text-align: center;
  margin: 0 0 8px;
}

.lit-basket-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  min-height: 48px;
}

.lit-basket-empty {
  font-size: 13px;
  color: var(--lit-muted);
  align-self: center;
}

.lit-in-basket { min-height: 72px; min-width: 72px; }

.lit-ai-banner {
  background: var(--lit-yellow);
  border: 2px solid #fcd34d;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}

.lit-ai-stmt {
  margin: 8px 0 0;
  font-weight: 800;
  color: #dc2626;
  font-size: 14px;
}

.lit-ai-says {
  font-size: 10px;
  color: var(--lit-muted);
  margin-top: 4px;
}

.lit-ai-el.tapped { border-color: #f87171; background: #fee2e2; }
.lit-ai-el.is-bug { border-color: #f59e0b; background: #fef3c7; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3); }

.lit-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.lit-slot {
  min-width: 88px;
  min-height: 88px;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  padding: 8px;
}

.lit-slot.active {
  border-color: var(--lit-accent);
  background: #e0f2fe;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.2);
}

.lit-slot.filled {
  border-style: solid;
  border-color: #34d399;
  background: var(--lit-mint);
}

.lit-slot-lab { font-size: 10px; font-weight: 800; color: var(--lit-muted); }
.lit-q { font-size: 1.75rem; color: #cbd5e1; }

.lit-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.lit-block {
  padding: 12px 16px;
  border: 2px solid var(--lit-blue);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  min-height: 48px;
  font-family: inherit;
}

.lit-block.used { opacity: 0.3; pointer-events: none; }

.lit-btn-check,
.lit-btn-send,
.lit-btn-next,
.lit-btn-retry,
.lit-btn-lead {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 12px auto 0;
  padding: 16px 24px;
  border: none;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  min-height: 56px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.lit-btn-next { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f; }
.lit-btn-retry { background: var(--lit-blue); color: var(--lit-ink); box-shadow: none; }

.lit-feedback {
  text-align: center;
  font-weight: 900;
  font-size: 1.05rem;
  margin-top: 12px;
  min-height: 1.5em;
}

.lit-feedback.ok { color: #059669; }
.lit-feedback.no { color: #dc2626; }
.lit-feedback.partial { color: #d97706; }

.lit-preview {
  font-size: 14px;
  font-weight: 700;
  background: var(--lit-mint);
  padding: 10px;
  border-radius: 12px;
  margin-top: 8px;
}

.lit-next-wrap.hidden { display: none; }

.lit-guide-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 30;
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  background: #fbbf24;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  font-family: inherit;
  min-height: 48px;
}

.lit-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 58, 95, 0.4);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lit-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.lit-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.lit-drawer.open {
  transform: translateY(0);
  pointer-events: auto;
}

.lit-drawer-handle {
  width: 48px;
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  margin: 0 auto 16px;
}

.lit-drawer h3 { margin: 0 0 12px; font-size: 1.1rem; }
.lit-drawer p { line-height: 1.6; color: var(--lit-muted); font-weight: 600; }

.lit-drawer-expl {
  margin-top: 16px;
  padding: 14px;
  background: #e0f2fe;
  border-radius: 12px;
}

.lit-drawer-close {
  margin-top: 20px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  min-height: 48px;
}

.lit-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(30, 58, 95, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lit-modal {
  background: #fff;
  border-radius: 24px;
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}

.lit-modal-lead {
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}

.lit-modal-star { font-size: 3rem; margin: 0; }
.lit-modal-score { font-size: 2rem; font-weight: 900; color: var(--lit-accent); margin: 8px 0; }
.lit-modal-cta {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  margin: 0 0 16px;
  color: var(--lit-muted);
  text-align: left;
}

.lit-lead-step {
  display: inline-block;
  margin: 12px 0 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lit-lead-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 900;
  color: #1e1b4b;
  text-align: left;
}

.lit-lead-form {
  text-align: left;
}

.lit-lead-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

@media (min-width: 420px) {
  .lit-lead-row {
    grid-template-columns: 1fr 1fr;
  }
}

.lit-email-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--lit-blue);
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  min-height: 48px;
  box-sizing: border-box;
  background: #fff;
}

.lit-age-select {
  appearance: auto;
  cursor: pointer;
}

.lit-btn-lead {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  min-height: 48px;
  width: 100%;
  max-width: none;
  cursor: pointer;
  padding: 12px 14px;
}

.lit-btn-lead:disabled {
  opacity: 0.65;
  cursor: wait;
}

.lit-lead-privacy {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--lit-muted);
  text-align: left;
}

.lit-lead-done {
  margin: 0;
  padding: 16px 8px;
  font-size: 15px;
  font-weight: 800;
  color: #059669;
  text-align: center;
  line-height: 1.5;
}

.lit-lead-done-sub {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--lit-muted);
}

.lit-lead-market {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 0;
  padding: 13px 16px;
  border-radius: 12px;
  background: #fbbf24;
  color: #1e1b4b;
  font-weight: 900;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
}
.lit-lead-market:hover {
  background: #f59e0b;
  color: #1e1b4b;
}

.lit-lead-error {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #dc2626;
}

.lit-modal-skip {
  margin-top: 12px;
  background: none;
  border: none;
  font-weight: 700;
  color: var(--lit-muted);
  cursor: pointer;
  font-family: inherit;
}

.lit-complete { text-align: center; padding: 40px 20px; }
.lit-complete-star { font-size: 4rem; margin: 0; }
.lit-complete-score { font-size: 2.5rem; font-weight: 900; color: var(--lit-accent); }

.lit-empty {
  text-align: center;
  padding: 48px 20px;
  font-weight: 700;
  color: var(--lit-muted);
}

@media (max-width: 400px) {
  .lit-grid { grid-template-columns: repeat(2, 1fr); }
}
