/* Shared base styles */
:root {
  --color-text: #111111;
  --color-bg: #ffffff;
  --color-brand: #00247D;
  --color-brand-dark: #001a5a;
  --color-accent: #A51931;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-align: center;
  background: var(--color-bg);
  padding: 2em;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  color: var(--color-text);
}

/* Lightweight loader */
.loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
  opacity: 0.9;
}

.spinner {
  width: 1em;
  height: 1em;
  border: 2px solid rgba(0,0,0,0.15);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

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

h1 {
  color: var(--color-text);
}

.subtitle {
  opacity: 0.9;
}

/* Modern app header */
.app-header {
  margin: 0 auto 0;
  max-width: 920px;
  width: 100%;
  padding-top: calc(env(safe-area-inset-top, 0px) + 0.5em);
}
.app-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
  margin-bottom: 2em;
}
.wn-root { position: absolute; top: 16px; right: 16px; }
.wn-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--color-bg);
  cursor: pointer;
}
.wn-button:hover { background: #f5f7fb; box-shadow: 0 6px 16px rgba(0,0,0,0.08); transform: translateY(-1px); }
.wn-icon { font-size: 18px; line-height: 1; }
.wn-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--color-bg);
}
.wn-popover {
  position: absolute;
  top: 48px;
  right: 0;
  width: min(360px, 90vw);
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.16);
  text-align: left;
  z-index: 1000;
}
.wn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.wn-title { font-weight: 800; }
.wn-close {
  background: transparent;
  border: none;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}
.wn-close:hover { background: #f5f7fb; }
.wn-content { max-height: 320px; overflow: auto; padding: 8px 12px; }
.wn-content .loading { padding: 8px 0; }
.wn-list { list-style: none; margin: 0; padding: 0; }
.wn-item { padding: 8px 4px; display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.wn-item + .wn-item { border-top: 1px dashed rgba(0,0,0,0.06); }
.wn-item a { text-decoration: none; color: var(--color-text); font-weight: 700; }
.wn-item a:hover { color: var(--color-brand); }
.wn-item .meta { font-size: 12px; opacity: 0.7; }
.wn-footer { padding: 8px 12px 12px; border-top: 1px solid rgba(0,0,0,0.06); text-align: right; }
.wn-footer .chip { font-size: 0.9em; padding: 0.4em 0.8em; }

@media (max-width: 480px) {
  .wn-root { top: 12px; right: 12px; }
  .wn-button { width: 36px; height: 36px; }
  .wn-popover { top: 44px; }
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
}
.brand-logo {
  height: clamp(96px, 20vw, 176px);
  width: auto;
  display: block;
  object-fit: contain;
}
.brand-text {
  display: grid;
  line-height: 1.1;
  text-align: center;
}
.brand-title {
  margin: 0;
  color: var(--color-text);
  font-weight: 800;
  font-size: clamp(1.9em, 3.8vw, 2.4em);
  letter-spacing: 0.2px;
}
.brand-subtitle {
  margin: 0;
  font-size: clamp(0.9em, 2vw, 1.05em);
  opacity: 0.9;
}

.app-header {
  margin-top: 1.2em;
}
@media (max-width: 480px) {
  .app-bar { padding: 0.65em 0.8em; }
  .brand-logo { height: 176px; }
}

/* Accessibility utility */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Hero header */
.hero { margin: 0 auto 2.5em; max-width: 780px; }
.hero .subtitle { margin-bottom: 1.5em; }

.options {
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin: 0 auto;
}

/* Ensure a consistent minimum answer button width across all quizzes (using vowels as default) */
body.quiz-page .options button { min-width: 240px; }

button {
  padding: 1em;
  font-size: 1.2em;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f7f7f7;
  color: var(--color-text);
  border-radius: 12px;
  transition: all 0.2s ease;
  font-weight: 500;
  backdrop-filter: none;
}

/* Answer feedback animations */
@keyframes correctPulse {
  0% { transform: scale(1); background-color: #f7f7f7; box-shadow: 0 0 0 rgba(0,0,0,0); }
  20% { transform: scale(1.04); background-color: #d4edda; box-shadow: 0 8px 18px rgba(40,167,69,0.25); }
  50% { transform: scale(1.02); background-color: #c3e6cb; }
  100% { transform: scale(1); background-color: #f7f7f7; box-shadow: 0 0 0 rgba(0,0,0,0); }
}

@keyframes wrongShake {
  0% { transform: translateX(0); }
  15% { transform: translateX(-6px) rotate(-1deg); }
  30% { transform: translateX(6px) rotate(1deg); }
  45% { transform: translateX(-5px) rotate(-1deg); }
  60% { transform: translateX(5px) rotate(1deg); }
  75% { transform: translateX(-3px) rotate(-0.5deg); }
  90% { transform: translateX(3px) rotate(0.5deg); }
  100% { transform: translateX(0); }
}

button.answer-correct {
  animation: correctPulse 500ms ease;
  background-color: #d4edda !important;
  border-color: rgba(40,167,69,0.6) !important;
  box-shadow: 0 8px 18px rgba(40,167,69,0.25);
}

button.answer-wrong {
  animation: wrongShake 500ms ease;
  background-color: #f8d7da !important;
  border-color: rgba(220,53,69,0.6) !important;
}

button.answer-wrong:hover {
  background-color: #f8d7da !important;
  border-color: rgba(220,53,69,0.6) !important;
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(220,53,69,0.25);
}

button:hover {
  background: #efefef;
  color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

button:active {
  transform: translateY(0);
}

.options:focus {
  outline: none;
}

#feedback {
  margin-top: 1em;
  font-size: 1.3em;
  font-weight: bold;
  min-height: 1.5em;
  color: var(--color-text);
}

#nextBtn {
  margin-top: 2em;
  padding: 0.8em 2em;
  font-size: 1.1em;
  display: none;
  background: var(--color-brand);
  color: var(--color-bg);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  transition: all 0.2s ease;
}

#nextBtn:hover {
  background: var(--color-brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.stats {
  font-size: 0.9em;
  color: rgba(17, 17, 17, 0.7);
}

/* Larger star visuals for completion rating */
.star-rating {
  font-size: 1.4em;
  line-height: 1;
  margin-top: 0.25em;
}

/* Stars appended inside stats line on quiz page */
body.quiz-page .stats {
  line-height: 1.4;
}

/* Shared example card styling */
.example {
  margin-top: 0.5em;
  font-size: 0.78em;
  font-weight: 600;
  background: #f5f7fb;
  border: 1px solid rgba(0, 36, 125, 0.2);
  display: inline-block;
  padding: 0.5em 0.7em;
  border-radius: 10px;
}

.example .label {
  display: inline-block;
  opacity: 0.95;
  font-size: 0.9em;
  padding: 0.1em 0.45em;
  margin-right: 0.45em;
  border-radius: 6px;
  background: rgba(0, 36, 125, 0.9);
  color: white;
}

.example .text {
  display: block;
  margin-top: 0.35em;
  font-weight: 600;
}

.footer {
  margin-top: 2em;
  text-align: center;
}

.back-btn, .coffee-btn {
  color: var(--color-brand);
  text-decoration: none;
  padding: 0.8em 1.5em;
  border-radius: 25px;
  background: var(--color-bg);
  border: 1px solid rgba(0, 36, 125, 0.35);
  transition: all 0.2s ease;
  font-size: 1em;
  font-weight: 600;
  backdrop-filter: none;
  display: inline-block;
}
.coffee-btn { margin-left: 1em; }

.back-btn:hover, .coffee-btn:hover {
  background: #f7faff;
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0,0,0,0.08);
}

/* Page-specific overrides using body classes */

/* Shared quiz-page utilities and deduped rules */
/* Base quiz defaults via CSS variables */
body.quiz-page {
  --symbol-font-size: 4.6em;
  --symbol-margin: 0.6em 0 0.6em 0;
  --symbol-font-weight: 800;
  --symbol-color: var(--color-text);
  --symbol-text-shadow: none;
  --symbol-line-height: 1.2;
  --options-max-width: 620px;
}
body.quiz-page #symbol {
  font-size: var(--symbol-font-size);
  margin: var(--symbol-margin);
  font-weight: var(--symbol-font-weight);
  color: var(--symbol-color);
  text-shadow: var(--symbol-text-shadow);
  line-height: var(--symbol-line-height);
}
body.quiz-page .options { max-width: var(--options-max-width); }

body.quiz-page h1 { margin-bottom: 0.2em; }
body.quiz-page #symbol .secondary {
  display: block;
  font-size: 0.38em;
  opacity: 0.95;
  margin-top: 0.15em;
  font-weight: 600;
}
body.quiz-page #symbol .emoji-line {
  font-size: 0.9em;
  opacity: 0.95;
  margin-bottom: 0.1em;
}

/* Consolidated options widths via variables */
body.numbers-quiz,
body.classifiers-quiz { --options-max-width: 600px; }
body.color-quiz { --options-max-width: 500px; }
body.vowel-quiz,
body.consonant-quiz { --options-max-width: 300px; }

/* Home (index) */
body.home h1 {
  margin-bottom: 1em;
  font-size: 2.5em;
}

body.home .subtitle {
  font-size: 1.2em;
  margin-bottom: 3em;
}

body.home .brand-text .subtitle {
  margin-bottom: 0;
}

body.home .quiz-container {
  display: flex;
  justify-content: center;
  gap: 2em;
  flex-wrap: wrap;
  margin-bottom: 2em;
}

body.home .quiz-card {
  background: var(--color-bg);
  backdrop-filter: none;
  border-radius: 16px;
  padding: 2em;
  min-width: 300px;
  max-width: 400px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  cursor: pointer;
}

body.home .quiz-card:hover {
  transform: translateY(-4px);
  background: var(--color-bg);
  box-shadow: 0 16px 32px rgba(0,0,0,0.08);
}

body.home .quiz-card h2 {
  margin: 0 0 1em 0;
  font-size: 1.8em;
  color: var(--color-text);
}

body.home .quiz-card p {
  margin: 0 0 0 0;
  opacity: 0.9;
  line-height: 1.6;
}

body.home .quiz-card .features {
  text-align: left;
  margin-bottom: 1.5em;
}

/* Larger stars on quiz cards */
body.home .quiz-card .star-rating {
  font-size: 3em;
}

body.home .quiz-card .features li {
  margin-bottom: 0.5em;
  opacity: 0.9;
}

.start-btn {
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  padding: 1em 2em;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  background: #8f1328;
}

body.home .footer {
  margin-top: 3em;
  opacity: 0.7;
  font-size: 0.9em;
}

/* Socials */
body.home .socials {
  text-align: center;
  margin: 0 0 0 0;
  padding: 1em;
}

body.home .socials h2 {
  margin: 0 0 0.8em 0;
  font-size: 1.2em;
  color: var(--color-text);
}

body.home .socials .avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 0.8em;
}

body.home .socials .social-links {
  display: flex;
  gap: 0.8em;
  justify-content: center;
  flex-wrap: wrap;
}

body.home .socials a.chip {
  text-decoration: none;
  color: var(--color-text);
}

.today-card {
  display: inline-block;
  padding: 0;
  margin: 0 0 0.5em 0;
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.today-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1em;
}

.sep {
  width: 1px;
  height: 64px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
  transition: background 200ms ease;
}

.today-heading {
  font-size: 0.7em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.25em;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.today-icon { font-size: 0.9em; line-height: 1; }
.today-label { vertical-align: middle; }

.today-thai {
  font-size: clamp(1.1em, 3.5vw, 1.5em);
  font-weight: 800;
  line-height: 1.15;
}

.today-phonetic {
  font-size: clamp(0.8em, 2vw, 0.95em);
  opacity: 0.95;
  font-weight: 600;
}

.today-section {
  margin: 0.2em 0;
}

@media (max-width: 560px) {
  .today-grid { grid-template-columns: 1fr; gap: 0.6em; }
  .sep { display: none; }
  .today-card { width: 100%; padding: 0; display: block; }
}

/* Player card */
.player-card {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 0.8em;
  text-align: left;
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 1em 1.2em;
  position: relative;
  overflow: hidden;
}

/* Player card is enabled (overlay removed) */

.player-top {
  display: flex;
  align-items: center;
  gap: 0.9em;
}

.player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.player-identity { display: grid; gap: 0.15em; }
.player-name {
  font-weight: 800;
  font-size: 1.15em;
  color: var(--color-text);
  transition: color 0.2s ease;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.player-name:hover {
  color: var(--color-accent);
}

.player-name::after {
  content: ' ✏️';
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 0.8em;
}

.player-name:hover::after {
  opacity: 0.7;
}

.player-name-edit {
  font-weight: 800;
  font-size: 1.15em;
  color: var(--color-text);
  background: transparent;
  border: 2px solid var(--color-accent);
  border-radius: 6px;
  padding: 2px 6px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.player-name-edit:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}
.player-level {
  font-weight: 700;
  font-size: 0.95em;
  color: var(--color-brand);
}

.player-xp { margin-top: 0.6em; }
.xp-labels {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.4em;
}
.xp-title { font-weight: 800; letter-spacing: 0.02em; }
.xp-value { font-weight: 600; opacity: 0.9; }

.xp-bar {
  position: relative;
  height: 10px;
  background: #f5f7fb;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, #8f1328 100%);
  border-radius: 9999px 0 0 9999px;
  transition: width 300ms ease;
}

.player-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8em;
  margin-top: 0.8em;
}

.metric {
  background: #f7f7f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 0.6em 0.8em;
  text-align: center;
}
.metric-label {
  font-size: 0.72em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.2em;
  font-weight: 700;
}
.metric-value {
  font-size: 1.05em;
  font-weight: 800;
  color: var(--color-text);
}

.player-today {
  margin-top: 0.8em;
  background: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 0.6em 0.7em;
  text-align: center;
}

.pt-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 0.6em;
}

.pt-col { min-width: 0; text-align: center; }
.pt-sep {
  width: 1px;
  height: 28px;
  background: rgba(0,0,0,0.1);
}
.pt-thai {
  font-size: clamp(1em, 3vw, 1.25em);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
}
.pt-phonetic {
  font-size: clamp(0.75em, 2vw, 0.9em);
  opacity: 0.9;
}

@media (max-width: 560px) {
  .player-card { 
    padding: 0.9em 1em; 
    margin: 0 auto 0.8em;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
  }
  
  /* Overlay styles removed */
  .player-avatar { width: 52px; height: 52px; }
  .player-metrics { 
    gap: 0.6em; 
    grid-template-columns: repeat(3, 1fr);
  }
  .metric {
    padding: 0.5em 0.6em;
    min-width: 0;
  }
  .metric-label {
    font-size: 0.68em;
  }
  .metric-value {
    font-size: 1em;
  }
  .xp-labels {
    gap: 0.5em;
  }
  .xp-value {
    font-size: 0.9em;
  }

  .player-today { padding: 0.55em 0.6em; }
  .pt-grid { grid-template-columns: 1fr auto 1fr; gap: 0.4em; }
  .pt-sep { display: block; }
}

/* Consonant quiz */
body.consonant-quiz h1 {
  margin-bottom: 0.5em;
}

body.consonant-quiz { --symbol-font-size: 10em; --symbol-margin: 0 0 0.3em 0; --symbol-font-weight: bold; }




button .emoji {
  font-size: 1.5em;
  margin-right: 0.3em;
}

.middle-class {
  border-color: #27ae60 !important;
  background-color: #27ae60 !important;
  color: white !important;
}

.middle-class:hover {
  background-color: #229954 !important;
  color: white !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(39, 174, 96, 0.3);
}

.high-class {
  border-color: #f39c12 !important;
  background-color: #f39c12 !important;
  color: white !important;
}

.high-class:hover {
  background-color: #e67e22 !important;
  color: white !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(243, 156, 18, 0.3);
}

.low-class {
  border-color: #3498db !important;
  background-color: #3498db !important;
  color: white !important;
}

.low-class:hover {
  background-color: #2980b9 !important;
  color: white !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.legend {
  display: flex;
  justify-content: center;
  gap: 1.5em;
  margin-bottom: 0.5em;
  font-size: 0.9em;
  color: var(--color-text);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.3em;
}

.legend-color {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  display: inline-block;
}

.legend-color.middle-class { background-color: #27ae60; }
.legend-color.high-class { background-color: #f39c12; }
.legend-color.low-class { background-color: #3498db; }

/* Consonant legend chips styled like answer buttons */
.legend-chips { gap: 0.8em; flex-wrap: wrap; margin-top: 0.6em; }
.class-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35em 0.7em;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95em;
  border: 2px solid transparent;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.class-chip.middle-class:hover,
.class-chip.high-class:hover,
.class-chip.low-class:hover {
  transform: none;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

/* Color quiz */
body.color-quiz { --symbol-font-size: 4.5em; --symbol-text-shadow: 0 1px 1px rgba(0,0,0,0.6), 0 0 4px rgba(0,0,0,0.45); }

/* Numbers quiz */
.pro-tip { margin-top: 1.2em; font-size: 0.95em; opacity: 0.95; }
.pro-tip small { opacity: 0.9; }

/* Time quiz */
body.time-quiz { --symbol-font-size: 4.2em; }
body.time-quiz #symbol .tertiary {
  display: block;
  font-size: 0.34em;
  opacity: 0.92;
  margin-top: 0.10em;
  font-weight: 600;
}

/* Family quiz */
body.family-quiz { --symbol-font-size: 4.2em; }

/* Classifiers quiz (styled like Numbers quiz) */

/* Vowel quiz */
body.vowel-quiz { --symbol-font-size: 8em; --symbol-margin: 0 0 0.3em 0; --symbol-font-weight: bold; }

.vowel-note {
  margin-top: 0.25em;
  margin-bottom: 0.9em;
  font-size: 0.95em;
  color: rgba(17,17,17,0.75);
}
/* Light placeholder base for vowels (ko kai) */
/* Removed wrapper for shaping compatibility */
body.vowel-quiz .options { min-width: 240px; }

/* Questions quiz */
body.questions-quiz { --symbol-font-size: 4.2em; }
/* removed per shared .example */

/* Jobs quiz (styled like Questions/Rooms quiz) */
body.jobs-quiz { --symbol-font-size: 4.6em; }

/* Rooms quiz (styled like Questions quiz) */
body.rooms-quiz { --symbol-font-size: 4.2em; }
/* removed per shared .example */

/* Classifiers quiz example styling (mirrors Questions quiz) */
/* removed per shared .example */

/* Foods quiz (styled like Questions/Rooms quiz) */
body.foods-quiz { --symbol-font-size: 4.6em; }
/* removed per shared .example */
body.questions-quiz .correct-line {
  display: block;
  margin-bottom: 0.35em;
}

/* Filters */
.filters {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  max-width: 760px;
  margin: 0 auto 1.5em;
}

#search-input {
  padding: 0.9em 1em;
  font-size: 1em;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: all 0.2s ease;
  backdrop-filter: none;
}

#search-input::placeholder { color: rgba(17,17,17,0.5); }
#search-input:focus {
  border-color: rgba(0, 36, 125, 0.5);
  background: #f5f7fb;
}

.chip-group {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  justify-content: center;
}

.chip {
  padding: 0.5em 0.9em;
  font-size: 0.95em;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: none;
}

.chip:hover { background: #f5f7fb; transform: translateY(-1px); }
.chip.active { background: rgba(0, 36, 125, 0.08); border-color: rgba(0, 36, 125, 0.5); color: var(--color-brand); }

.empty {
  opacity: 0.9;
  background: #f5f7fb;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 1em 1.2em;
}

/* Responsive */
@media (max-width: 768px) {
  body.home { padding: 1em; }
  body.home h1 { font-size: 2em; }
  body.home .quiz-container {
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
  }
  body.home .quiz-card {
    min-width: 280px;
    padding: 1.5em;
  }
  body.home .socials {
    padding: 0.8em;
    margin: 0;
  }
  body.home .socials .social-links {
    gap: 0.6em;
  }
}

@media (max-width: 600px) {
  body { padding: 0.8em; }
  body.color-quiz { --symbol-font-size: 3.4em; }
  body.numbers-quiz { --symbol-font-size: 3.6em; }
  body.classifiers-quiz { --symbol-font-size: 3.6em; }
  body.consonant-quiz { --symbol-font-size: 7em; --symbol-margin: 0.6em 0 0.6em 0; }
  button { font-size: 1.05em; padding: 0.8em; }
  .pro-tip { display: none; }

  body.consonant-quiz h1 { font-size: 1.5em; margin-bottom: 0.3em; }
  body.consonant-quiz .legend { gap: 1em; margin-bottom: 0.3em; font-size: 0.8em; flex-wrap: wrap; justify-content: center; }
  body.consonant-quiz .options { gap: 0.8em; }
  body.consonant-quiz button { font-size: 1em; padding: 0.7em; min-height: 3em; }
  body.consonant-quiz button .emoji { font-size: 1.3em; }
  body.consonant-quiz #feedback { font-size: 1.2em; margin-top: 0.8em; }
  body.consonant-quiz #nextBtn { margin-top: 1.5em; padding: 0.7em 1.5em; }
  body.consonant-quiz .stats { font-size: 0.8em; }

  
  body.rooms-quiz { --symbol-font-size: 3.6em; }
  body.jobs-quiz { --symbol-font-size: 3.6em; }
  
  body.home .socials {
    padding: 0.6em;
    margin: 0 0 0 0;
  }
  body.home .socials .social-links {
    gap: 0.5em;
  }
  body.home .socials .chip {
    font-size: 0.9em;
    padding: 0.4em 0.8em;
  }
}

@media (max-width: 400px) {
  body.consonant-quiz { --symbol-font-size: 6em; }
  body.consonant-quiz .legend { flex-direction: column; gap: 0.5em; }
  body.consonant-quiz button { font-size: 0.9em; padding: 0.6em; }
  
  .player-card { 
    padding: 0.8em 0.8em; 
    margin: 0 auto 0.8em;
    width: 100%;
  }
  .player-metrics { 
    gap: 0.4em; 
  }
  .metric {
    padding: 0.4em 0.5em;
  }
  .metric-label {
    font-size: 0.65em;
  }
  .metric-value {
    font-size: 0.95em;
  }
  
  body.home .socials {
    padding: 0.5em;
    margin: 0 0 0 0;
  }
  body.home .socials .social-links {
    gap: 0.4em;
  }
  body.home .socials .chip {
    font-size: 0.85em;
    padding: 0.35em 0.7em;
  }
}