/* ============================================================
   LETTER WHEEL  |  letter-wheel.css
   TheWheelOfName.com  |  Rainbow/alphabet theme, lw- prefix
   ============================================================ */

/* ── CSS VARIABLES ───────────────────────────────────────────── */
:root {
  --lw-primary:   #6366f1;
  --lw-primary-d: #4f46e5;
  --lw-primary-l: #ede9fe;
  --lw-accent:    #f59e0b;
  --lw-accent-l:  #fef3c7;
  --lw-green:     #10b981;
  --lw-red:       #ef4444;
  --lw-bg:        #f8f9ff;
  --lw-white:     #ffffff;
  --lw-g100:      #f1f5f9;
  --lw-g200:      #e2e8f0;
  --lw-g300:      #cbd5e1;
  --lw-g400:      #94a3b8;
  --lw-g600:      #475569;
  --lw-g700:      #334155;
  --lw-g800:      #1e293b;
  --lw-font:      'Nunito','Arial Rounded MT Bold',Arial,sans-serif;
  --lw-r:         14px;
  --lw-shadow:    0 2px 12px rgba(99,102,241,.12);
  --lw-shadow-lg: 0 8px 32px rgba(99,102,241,.18);
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body.lw-page {
  font-family: var(--lw-font);
  background: var(--lw-bg);
  color: var(--lw-g800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ─────────────────────────────────────────────────────── */
.lw-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--lw-white);
  border-bottom: 1px solid var(--lw-g200);
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.lw-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.lw-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--lw-g800);
}
.lw-logo-icon { font-size: 1.6rem; }
.lw-logo-text {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.lw-logo-text span { color: var(--lw-primary); }
.lw-nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.lw-nav-links a {
  padding: .4rem .65rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 700;
  color: var(--lw-g600);
  transition: background .15s, color .15s;
}
.lw-nav-links a:hover, .lw-nav-links a.active {
  background: var(--lw-primary-l);
  color: var(--lw-primary);
}
.lw-nav-drop { position: relative; }
.lw-nav-drop > a { cursor: pointer; }
.lw-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--lw-white);
  border: 1px solid var(--lw-g200);
  border-radius: var(--lw-r);
  box-shadow: var(--lw-shadow-lg);
  min-width: 200px;
  padding: .4rem;
  z-index: 300;
}
.lw-nav-drop:hover .lw-drop-menu { display: block; }
.lw-drop-menu a {
  display: block;
  padding: .4rem .6rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 700;
  color: var(--lw-g600);
  transition: background .15s;
}
.lw-drop-menu a:hover { background: var(--lw-primary-l); color: var(--lw-primary); }

/* ── HERO ─────────────────────────────────────────────────────── */
.lw-hero {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  color: #fff;
  text-align: center;
  padding: 3rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
}
.lw-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='20' fill='none' stroke='rgba(255,255,255,.05)' stroke-width='1'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.lw-hero-alpha {
  font-size: 1.5rem;
  letter-spacing: .18em;
  opacity: .85;
  margin-bottom: .75rem;
}
.lw-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: .6rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.lw-hero-sub {
  font-size: clamp(.95rem, 2vw, 1.15rem);
  opacity: .9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}
.lw-hero-btns {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.lw-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.6rem;
  border-radius: 50px;
  font-family: var(--lw-font);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.lw-hero-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.lw-hero-btn-primary { background: var(--lw-white); color: var(--lw-primary); }
.lw-hero-btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }

/* ── BREADCRUMB ───────────────────────────────────────────────── */
.lw-breadcrumb {
  max-width: 1200px;
  margin: .75rem auto 0;
  padding: 0 1.25rem;
  font-size: .8rem;
  color: var(--lw-g400);
}
.lw-breadcrumb a { color: var(--lw-primary); text-decoration: none; font-weight: 600; }
.lw-breadcrumb a:hover { text-decoration: underline; }
.lw-breadcrumb span { margin: 0 .4rem; }

/* ── MAIN LAYOUT ─────────────────────────────────────────────── */
#lw-main {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
}

/* ── CONTROLS BAR ────────────────────────────────────────────── */
.lw-controls-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  background: var(--lw-white);
  border: 1px solid var(--lw-g200);
  border-radius: var(--lw-r);
  padding: .75rem 1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--lw-shadow);
}
.lw-toggle-group {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.lw-toggle-group > span {
  font-size: .8rem;
  font-weight: 700;
  color: var(--lw-g400);
  white-space: nowrap;
}
.lw-toggle-btn {
  padding: .3rem .7rem;
  border-radius: 8px;
  border: 1.5px solid var(--lw-g300);
  background: var(--lw-white);
  font-family: var(--lw-font);
  font-size: .82rem;
  font-weight: 700;
  color: var(--lw-g600);
  cursor: pointer;
  transition: all .15s;
}
.lw-toggle-btn:hover { border-color: var(--lw-primary); color: var(--lw-primary); }
.lw-toggle-btn.active {
  background: var(--lw-primary);
  border-color: var(--lw-primary);
  color: #fff;
}
.lw-sentence-toggle {
  padding: .35rem .85rem;
  border-radius: 50px;
  border: 1.5px solid var(--lw-g300);
  background: var(--lw-white);
  font-family: var(--lw-font);
  font-size: .82rem;
  font-weight: 700;
  color: var(--lw-g600);
  cursor: pointer;
  transition: all .15s;
}
.lw-sentence-toggle:hover { border-color: var(--lw-primary); color: var(--lw-primary); }
.lw-sentence-toggle.active { background: var(--lw-primary); border-color: var(--lw-primary); color: #fff; }

.lw-kids-toggle, .lw-share-btn {
  margin-left: auto;
  padding: .35rem .85rem;
  border-radius: 50px;
  border: 1.5px solid var(--lw-g300);
  background: var(--lw-white);
  font-family: var(--lw-font);
  font-size: .82rem;
  font-weight: 700;
  color: var(--lw-g600);
  cursor: pointer;
  transition: all .15s;
}
.lw-kids-toggle:hover { border-color: var(--lw-green); color: var(--lw-green); }
.lw-kids-toggle.active { background: var(--lw-green); border-color: var(--lw-green); color: #fff; }
.lw-share-btn { margin-left: 0; }
.lw-share-btn:hover { border-color: var(--lw-primary); color: var(--lw-primary); }
.lw-games-link {
  padding: .35rem .85rem;
  border-radius: 50px;
  border: 1.5px solid var(--lw-g300);
  background: var(--lw-white);
  font-family: var(--lw-font);
  font-size: .82rem;
  font-weight: 700;
  color: var(--lw-g600);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.lw-games-link:hover { border-color: var(--lw-primary); color: var(--lw-primary); text-decoration: none; }

.lw-divider { width: 1px; height: 24px; background: var(--lw-g200); }

/* ── WHEEL + RESULT ROW ──────────────────────────────────────── */
.lw-wheel-result-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

/* ── WHEEL PANEL ─────────────────────────────────────────────── */
.lw-wheel-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.lw-pointer-wrap {
  position: relative;
  display: inline-block;
}
.lw-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  color: var(--lw-primary);
  filter: drop-shadow(0 2px 4px rgba(99,102,241,.4));
  z-index: 2;
  pointer-events: none;
  line-height: 1;
}
#lw-canvas {
  display: block;
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(99,102,241,.22), 0 0 0 6px rgba(99,102,241,.08);
  cursor: pointer;
  transition: box-shadow .2s;
}
#lw-canvas:hover { box-shadow: 0 12px 40px rgba(99,102,241,.30), 0 0 0 8px rgba(99,102,241,.12); }

.lw-spin-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 2.4rem;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, var(--lw-primary), var(--lw-primary-d));
  color: #fff;
  font-family: var(--lw-font);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(99,102,241,.35);
  transition: transform .15s, box-shadow .15s;
  min-width: 200px;
  justify-content: center;
}
.lw-spin-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(99,102,241,.45); }
.lw-spin-btn:active:not(:disabled) { transform: translateY(0); }
.lw-spin-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── RESULT PANEL ────────────────────────────────────────────── */
.lw-result-panel {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lw-pre-spin {
  text-align: center;
  padding: 2rem;
  color: var(--lw-g400);
}
.lw-pre-spin-icon { font-size: 3.5rem; margin-bottom: .75rem; opacity: .5; }
.lw-pre-spin p { font-size: 1rem; font-weight: 600; line-height: 1.5; }

.lw-result-card {
  width: 100%;
  text-align: center;
}
.lw-letter-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1rem 0;
}
.lw-result-sub {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--lw-g400);
}
.lw-letter-big {
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--lw-primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(99,102,241,.25));
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  display: block;
}
.lw-letter-both {
  font-size: 5.5rem;
}
.lw-letter-sound {
  font-size: .9rem;
  font-weight: 700;
  color: var(--lw-g600);
  padding: .25rem .75rem;
  background: var(--lw-primary-l);
  border-radius: 50px;
  display: inline-block;
}
.lw-hear-btn {
  padding: .4rem 1.1rem;
  border-radius: 50px;
  border: 1.5px solid var(--lw-primary);
  background: var(--lw-white);
  color: var(--lw-primary);
  font-family: var(--lw-font);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  margin-top: .25rem;
}
.lw-hear-btn:hover { background: var(--lw-primary); color: #fff; }

/* ── VOCAB SECTION ───────────────────────────────────────────── */
.lw-vocab-section {
  background: var(--lw-white);
  border: 1px solid var(--lw-g200);
  border-radius: var(--lw-r);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--lw-shadow);
}
.lw-vocab-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.lw-vocab-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--lw-g800);
  margin: 0;
}
.lw-vocab-header h2 span { color: var(--lw-primary); }
.lw-vocab-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.lw-vocab-audio-all,
.lw-vocab-print-btn {
  padding: .3rem .8rem;
  border-radius: 50px;
  border: 1.5px solid var(--lw-g300);
  background: var(--lw-white);
  font-family: var(--lw-font);
  font-size: .8rem;
  font-weight: 700;
  color: var(--lw-g600);
  cursor: pointer;
  transition: all .15s;
}
.lw-vocab-audio-all:hover { border-color: var(--lw-primary); color: var(--lw-primary); }
.lw-vocab-print-btn:hover  { border-color: #4a5568; color: #4a5568; }

.lw-vocab-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .75rem;
}
.lw-vocab-card {
  background: var(--lw-g100);
  border: 2px solid var(--lw-g200);
  border-radius: var(--lw-r);
  padding: .75rem .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  position: relative;
}
.lw-vocab-card:hover {
  border-color: var(--lw-primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(99,102,241,.2);
}
.lw-vocab-emoji {
  font-size: 2.8rem;
  line-height: 1;
  transition: transform .2s;
}
.lw-vocab-card:hover .lw-vocab-emoji { transform: scale(1.15); }
.lw-vocab-word {
  font-size: .88rem;
  font-weight: 800;
  color: var(--lw-g800);
  text-align: center;
}
.lw-vocab-audio {
  position: absolute;
  top: .3rem;
  right: .3rem;
  background: none;
  border: none;
  font-size: .7rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
  padding: .2rem;
  line-height: 1;
}
.lw-vocab-card:hover .lw-vocab-audio { opacity: 1; }
.lw-vocab-hint {
  font-size: .72rem;
  color: var(--lw-g400);
  text-align: center;
  display: none;
}

/* ── LETTER CHALLENGE ────────────────────────────────────────── */
.lw-challenge {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--lw-g200);
}
.lw-challenge h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--lw-g800);
  margin-bottom: .4rem;
}
.lw-challenge p {
  font-size: .88rem;
  color: var(--lw-g600);
  margin-bottom: .75rem;
}
.lw-challenge-input {
  display: flex;
  gap: .5rem;
  max-width: 360px;
}
.lw-challenge-input input {
  flex: 1;
  padding: .55rem .9rem;
  border: 1.5px solid var(--lw-g300);
  border-radius: 10px;
  font-family: var(--lw-font);
  font-size: .95rem;
  font-weight: 600;
  color: var(--lw-g800);
  outline: none;
  transition: border-color .15s;
}
.lw-challenge-input input:focus { border-color: var(--lw-primary); }
.lw-challenge-input button {
  padding: .55rem 1rem;
  border-radius: 10px;
  border: none;
  background: var(--lw-primary);
  color: #fff;
  font-family: var(--lw-font);
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s;
}
.lw-challenge-input button:hover { background: var(--lw-primary-d); }
.lw-challenge-result {
  margin-top: .6rem;
  min-height: 1.6rem;
  font-size: .88rem;
  font-weight: 700;
}
.lw-challenge-result.correct { color: var(--lw-green); }
.lw-challenge-result.wrong   { color: var(--lw-red); }

/* ── TOAST ───────────────────────────────────────────────────── */
.lw-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--lw-g800);
  color: #fff;
  padding: .65rem 1.4rem;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 700;
  z-index: 9999;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  opacity: 0;
  max-width: 90vw;
  text-align: center;
  white-space: nowrap;
}
.lw-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── CONTENT SECTIONS ────────────────────────────────────────── */
.lw-content {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}
.lw-section {
  background: var(--lw-white);
  border: 1px solid var(--lw-g200);
  border-radius: var(--lw-r);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--lw-shadow);
}
.lw-section h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--lw-g800);
  margin-bottom: .9rem;
  padding-bottom: .55rem;
  border-bottom: 2px solid var(--lw-primary-l);
}
.lw-section p {
  color: var(--lw-g600);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: .75rem;
}
.lw-section p:last-child { margin-bottom: 0; }
.lw-section a { color: var(--lw-primary); font-weight: 700; text-decoration: none; }
.lw-section a:hover { text-decoration: underline; }

.lw-steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: .5rem;
}
.lw-step {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: var(--lw-g100);
  border-radius: 10px;
  padding: .75rem 1rem;
}
.lw-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lw-primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lw-step p { margin: 0; font-size: .88rem; }
.lw-step strong { color: var(--lw-g800); }

/* ── RELATED TOOLS ────────────────────────────────────────────── */
.lw-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}
.lw-related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .9rem .6rem;
  background: var(--lw-g100);
  border: 1.5px solid var(--lw-g200);
  border-radius: var(--lw-r);
  text-decoration: none;
  color: var(--lw-g700);
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
  transition: border-color .15s, transform .15s;
}
.lw-related-card:hover {
  border-color: var(--lw-primary);
  color: var(--lw-primary);
  transform: translateY(-2px);
}
.lw-related-card span:first-child { font-size: 1.5rem; }

/* ── FAQ ─────────────────────────────────────────────────────── */
.lw-faq-list { margin-top: .5rem; }
.lw-faq-item {
  border: 1px solid var(--lw-g200);
  border-radius: 10px;
  margin-bottom: .5rem;
  overflow: hidden;
}
.lw-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .85rem 1.1rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--lw-g800);
  cursor: pointer;
  user-select: none;
  background: var(--lw-white);
  transition: background .15s;
}
.lw-faq-q:hover { background: var(--lw-g100); }
.lw-faq-q::after { content: '＋'; font-size: 1.1rem; color: var(--lw-primary); flex-shrink: 0; }
.lw-faq-item.open .lw-faq-q::after { content: '－'; }
.lw-faq-a {
  display: none;
  padding: .75rem 1.1rem 1rem;
  font-size: .9rem;
  color: var(--lw-g600);
  line-height: 1.7;
  border-top: 1px solid var(--lw-g200);
  background: var(--lw-g100);
}
.lw-faq-a a { color: var(--lw-primary); font-weight: 700; text-decoration: none; }
.lw-faq-a a:hover { text-decoration: underline; }
.lw-faq-item.open .lw-faq-a { display: block; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.lw-footer {
  background: var(--lw-g800);
  color: var(--lw-g300);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .85rem;
  line-height: 1.8;
}
.lw-footer a { color: var(--lw-g300); text-decoration: none; font-weight: 600; transition: color .15s; }
.lw-footer a:hover { color: #fff; }
.lw-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem 1.2rem;
  margin-bottom: .75rem;
}
.lw-footer-copy { opacity: .65; font-size: .78rem; }

/* ── KIDS MODE ────────────────────────────────────────────────── */
#lw-main.lw-kids .lw-letter-big           { font-size: 11rem; }
#lw-main.lw-kids .lw-letter-big.lw-letter-both { font-size: 7rem; }
#lw-main.lw-kids .lw-letter-sound        { font-size: 1.05rem; padding: .35rem 1rem; }
#lw-main.lw-kids .lw-vocab-emoji         { font-size: 4rem; }
#lw-main.lw-kids .lw-vocab-word          { font-size: 1.05rem; }
#lw-main.lw-kids .lw-vocab-card          { padding: 1rem .65rem; }
#lw-main.lw-kids .lw-spin-btn            { font-size: 1.2rem; padding: 1rem 2.8rem; }
#lw-main.lw-kids .lw-vocab-hint          { display: block; }
#lw-main.lw-kids .lw-vocab-header h2     { font-size: 1.5rem; }
#lw-main.lw-kids .lw-challenge h3        { font-size: 1.1rem; }
#lw-main.lw-kids .lw-challenge p         { font-size: 1rem; }
#lw-main.lw-kids .lw-challenge-input input  { font-size: 1.05rem; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .lw-vocab-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 760px) {
  .lw-wheel-result-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .lw-result-panel { width: 100%; }
  .lw-vocab-grid { grid-template-columns: repeat(3, 1fr); }
  .lw-controls-bar { gap: .45rem; }
  .lw-kids-toggle { margin-left: 0; }
}

@media (max-width: 500px) {
  .lw-vocab-grid { grid-template-columns: repeat(2, 1fr); }
  .lw-letter-big { font-size: 6rem; }
  #lw-main.lw-kids .lw-letter-big { font-size: 8rem; }
  .lw-spin-btn { min-width: 170px; font-size: .95rem; }
  .lw-nav-links a:not(.lw-logo) { font-size: .78rem; padding: .35rem .45rem; }
  .lw-challenge-input { flex-direction: column; }
}

/* ── STATIC A–Z GUIDE ───────────────────────────────────────── */
.lw-az-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .9rem;
  padding-bottom: .55rem;
  border-bottom: 2px solid var(--lw-primary-l);
}
/* override default .lw-section h2 border since container carries it */
.lw-az-header h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.lw-az-actions {
  display: flex;
  gap: .4rem;
  flex-shrink: 0;
}
.lw-az-action-btn {
  padding: .35rem .85rem;
  border-radius: 50px;
  border: 1.5px solid var(--lw-g300);
  background: var(--lw-white);
  font-family: var(--lw-font);
  font-size: .8rem;
  font-weight: 700;
  color: var(--lw-g600);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
  line-height: 1;
}
.lw-az-action-btn:hover {
  border-color: var(--lw-primary);
  color: var(--lw-primary);
  background: var(--lw-primary-l);
}
.lw-az-action-btn.speaking {
  border-color: #e53e3e;
  color: #e53e3e;
  background: #fff5f5;
}
.lw-az-intro {
  font-size: .95rem;
  color: var(--lw-g600);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.lw-az-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .6rem;
}
.lw-az-letter-block {
  background: var(--lw-g100);
  border: 1.5px solid var(--lw-g200);
  border-radius: 12px;
  padding: .7rem .55rem;
  text-align: center;
  transition: border-color .15s, transform .15s;
}
.lw-az-letter-block:hover {
  border-color: var(--lw-primary);
  transform: translateY(-2px);
}
.lw-az-ltr {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--lw-primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  display: block;
  margin-bottom: .1rem;
}
.lw-az-sound {
  font-size: .62rem;
  color: var(--lw-g500);
  font-weight: 700;
  margin-bottom: .45rem;
  display: block;
}
.lw-az-words {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .18rem;
}
.lw-az-words li {
  font-size: .77rem;
  color: var(--lw-g700);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .22rem;
  text-align: left;
}
.lw-az-emoji { font-size: .92rem; flex-shrink: 0; }

/* Phonics alignment section */
.lw-phonics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem;
  margin-top: .85rem;
}
.lw-phonics-card {
  background: var(--lw-g100);
  border: 1.5px solid var(--lw-g200);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.lw-phonics-card h3 {
  font-size: .95rem;
  font-weight: 800;
  color: var(--lw-primary);
  margin-bottom: .4rem;
}
.lw-phonics-card p {
  font-size: .85rem;
  color: var(--lw-g600);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 1000px) {
  .lw-az-grid { grid-template-columns: repeat(5, 1fr); }
  .lw-phonics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .lw-az-header { flex-direction: column; align-items: flex-start; }
  .lw-az-actions { width: 100%; }
  .lw-az-action-btn { flex: 1; text-align: center; }
}
@media (max-width: 760px) {
  .lw-az-grid { grid-template-columns: repeat(4, 1fr); }
  .lw-phonics-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .lw-az-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── TYPE BADGE ──────────────────────────────────────────────── */
.lw-type-badge {
  display: inline-block;
  padding: .22rem .7rem;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 700;
  font-family: var(--lw-font);
  margin-top: .35rem;
  letter-spacing: .02em;
  line-height: 1.4;
}
.lw-type-vowel     { background: #ebf4ff; color: #2b6cb0; border: 1.5px solid #bee3f8; }
.lw-type-consonant { background: #fff3e0; color: #c05621; border: 1.5px solid #fbd38d; }

/* ── LEARN INFO ───────────────────────────────────────────────── */
.lw-learn-info {
  background: var(--lw-primary-l);
  border-left: 3px solid var(--lw-primary);
  border-radius: 6px;
  padding: .6rem 1rem;
  font-size: .88rem;
  color: var(--lw-g700);
  margin-bottom: 1rem;
  line-height: 1.55;
}
.lw-learn-info strong { color: var(--lw-primary-dark, var(--lw-primary)); }

/* ── VOWELS & CONSONANTS SECTION ─────────────────────────────── */
.lw-vc-section p { line-height: 1.65; color: var(--lw-g700); margin-bottom: .9rem; }
.lw-vc-section h3 { font-size: 1rem; color: var(--lw-g800); margin: 1.1rem 0 .5rem; }
.lw-vc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 1rem 0 1.4rem;
}
.lw-vc-card {
  background: var(--lw-white);
  border: 1.5px solid var(--lw-g200);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
}
.lw-vc-card h3 { margin: 0 0 .45rem; font-size: 1rem; color: var(--lw-g800); }
.lw-vc-card p  { font-size: .88rem; color: var(--lw-g600); line-height: 1.58; margin: 0; }
.lw-vc-letters {
  display: flex;
  flex-wrap: wrap;
  gap: .32rem;
  margin: .6rem 0 0;
}
.lw-vc-letter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 7px;
  font-weight: 800;
  font-size: 1.05rem;
  font-family: var(--lw-font);
}
.lw-vc-letter-chip.vowel     { background: #ebf4ff; color: #2b6cb0; border: 1.5px solid #bee3f8; }
.lw-vc-letter-chip.consonant { background: #fff3e0; color: #c05621; border: 1.5px solid #fbd38d; }
@media (max-width: 580px) {
  .lw-vc-grid { grid-template-columns: 1fr; }
}

/* ── PRINT — full page ───────────────────────────────────────── */
@@media print {
  .lw-nav, .lw-hero, .lw-controls-bar, .lw-spin-btn, .lw-footer,
  .lw-hear-btn, .lw-vocab-audio, .lw-vocab-audio-all,
  .lw-challenge, .lw-related-grid, .lw-az-actions,
  .lw-phonics-card button { display: none !important; }
  .lw-letter-big { -webkit-text-fill-color: var(--lw-primary); }

  /* ── PRINT — A–Z section only (triggered by body.lw-print-az) ── */
  body.lw-print-az > *:not(.lw-content) { display: none !important; }
  body.lw-print-az .lw-content > *:not(#lw-az-guide) { display: none !important; }
  body.lw-print-az #lw-az-guide { display: block !important; }
  body.lw-print-az .lw-az-actions { display: none !important; }
  body.lw-print-az .lw-az-header h2 { font-size: 1.4rem; margin-bottom: .6rem; }
  body.lw-print-az .lw-az-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: .4rem;
  }
  body.lw-print-az .lw-az-ltr { font-size: 1.4rem; -webkit-text-fill-color: var(--lw-primary); }
}

/* ── ACCESSIBILITY ───────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
*:focus-visible {
  outline: 3px solid var(--lw-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
