/* ==========================================================================
   Ny i Dansk – Visuelt Stilark til Modtagerklasser (7–15 år)
   Skandinavisk, venligt, overskueligt og tydeligt farvekodet design
   ========================================================================== */

:root {
  --bg-page: #dff2ef;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-light: #e2e8f0;

  /* Dansk rød & Nordisk blå accenter */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --danish-red: #dc2626;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;

  /* Grammatik- & Artikel-farver */
  --gram-subject-bg: #dbeafe;
  --gram-subject-border: #3b82f6;
  --gram-subject-text: #1e3a8a;

  --gram-verb-bg: #fee2e2;
  --gram-verb-border: #ef4444;
  --gram-verb-text: #991b1b;

  --gram-adjective-bg: #f3e8ff;
  --gram-adjective-border: #a855f7;
  --gram-adjective-text: #581c87;

  --gram-object-bg: #dcfce7;
  --gram-object-border: #22c55e;
  --gram-object-text: #14532d;

  --gram-place-bg: #fef3c7;
  --gram-place-border: #f59e0b;
  --gram-place-text: #78350f;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 14px 34px rgba(37, 99, 235, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  background-image: linear-gradient(155deg, #d8eef8 0%, #ddf3ee 52%, #d6efe4 100%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button,
input,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.18s ease;
}

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

/* Fremhævning når et ord eller en sætning læses op */
.is-speaking-element,
.word-reading-active {
  outline: 3px solid #f59e0b !important;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.25) !important;
  transform: translateY(-2px) scale(1.02);
}

/* ==========================================================================
   HEADER & HOVEDNAVIGATION
   ========================================================================== */
.site-header {
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  border-radius: 14px;
  padding: 0.2rem 0.4rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.brand-area:hover {
  transform: translateY(-1px);
}

.brand-area:hover .brand-titles h1 {
  color: var(--primary);
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}

.brand-world-flags-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-titles h1 {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.15;
}

.brand-titles p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: 16px;
}

.main-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-muted);
  text-decoration: none;
}

.main-nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.6);
}

.main-nav-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-custom-svg {
  width: 34px;
  height: 34px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.12));
}

.header-utilities {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.voice-selector-dropdown {
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
  background: #f0fdf4;
  border: 2px solid #86efac;
  font-weight: 800;
  font-size: 0.86rem;
  color: #166534;
  cursor: pointer;
  max-width: 240px;
}

.voice-selector-dropdown:hover {
  border-color: #16a34a;
}

.btn-slow-speech {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-main);
}

.btn-slow-speech:hover {
  border-color: var(--primary);
}

.btn-slow-speech.active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.progress-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.badge-pill {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}

.learned-pill {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.star-pill {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

@keyframes starPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.star-bounce {
  animation: starPop 0.4s ease;
}

/* ==========================================================================
   VELKOMST-BJÆLKE
   ========================================================================== */
.welcome-strip {
  background: linear-gradient(90deg, #eff6ff 0%, #f0fdf4 100%);
  border-bottom: 1px solid #dbeafe;
}

.welcome-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.welcome-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.96rem;
}

.welcome-wave {
  background: #ffffff;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-weight: 800;
  color: var(--primary);
  border: 1px solid #bfdbfe;
}

.btn-welcome-listen {
  background: #ffffff;
  color: var(--primary);
  border: 2px solid #93c5fd;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
}

.btn-welcome-listen:hover {
  background: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   HOVEDCONTAINER & SEKTIONER
   ========================================================================== */
.main-container {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  flex: 1;
}

.main-workspace-section {
  display: none;
  animation: fadeIn 0.25s ease;
}

.main-workspace-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-intro-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.section-intro-row h2 {
  font-size: 1.75rem;
  font-weight: 900;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.02rem;
  font-weight: 600;
}

/* Artikel-legende */
.article-legend {
  display: flex;
  gap: 0.85rem;
  background: #ffffff;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot-en { background: #2563eb; }
.dot-et { background: #16a34a; }
.dot-verb { background: #dc2626; }
.dot-adj { background: #eab308; }

/* ==========================================================================
   SEKTION 1: ORDFORRÅD – AKTIVITETER (STORE) & KATEGORIER (MINDRE)
   ========================================================================== */
.vocab-mode-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.vocab-mode-tabs.is-overview {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1.4rem;
  gap: 1.25rem;
}

.vocab-mode-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.25rem 1rem;
  border-radius: 22px;
  background: #ffffff;
  border: 3px solid #cbd5e1;
  font-weight: 900;
  font-size: 1.14rem;
  color: var(--text-main);
  text-align: center;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: all 0.18s ease;
}

.vocab-mode-tabs.is-overview .vocab-mode-tab {
  padding: 1.85rem 1.15rem;
  min-height: 210px;
}

.vocab-tab-icon {
  font-size: 2.15rem;
  line-height: 1;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  width: 82px;
  height: 82px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.vocab-mode-tabs.is-overview .vocab-tab-icon {
  width: 102px;
  height: 102px;
  border-radius: 24px;
}

.vocab-tab-svg {
  width: 88%;
  height: 88%;
  display: block;
}

.vocab-mode-tab:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.vocab-mode-tab:hover .vocab-tab-icon {
  transform: scale(1.06);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.vocab-mode-tab.active {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
  transform: translateY(-2px);
}

.vocab-mode-tab.active .vocab-tab-icon {
  background: #ffffff;
  border-color: #93c5fd;
}

.category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  margin-bottom: 1.4rem;
}

.category-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.category-pill:hover {
  border-color: var(--cat-color, var(--primary));
  color: var(--text-main);
  transform: translateY(-1px);
}

.category-pill.active {
  background: var(--cat-bg, #eff6ff);
  border-color: var(--cat-color, var(--primary));
  color: var(--cat-color, var(--primary));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cat-icon {
  font-size: 1.05rem;
}

.vocab-mode-panel {
  display: none;
}

.vocab-mode-panel.active {
  display: block;
}

/* --- 1A: ORDKORT (FLASHCARDS) --- */
.vocab-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 1.15rem;
}

.vocab-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-light);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.vocab-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.vocab-card.is-learned {
  border-color: #86efac;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.vocab-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.article-type-pill {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.badge-en {
  background: var(--gram-subject-bg);
  color: var(--gram-subject-text);
  border: 1px solid #93c5fd;
}

.badge-et {
  background: var(--gram-object-bg);
  color: var(--gram-object-text);
  border: 1px solid #86efac;
}

.badge-verb {
  background: var(--gram-verb-bg);
  color: var(--gram-verb-text);
  border: 1px solid #fca5a5;
}

.badge-adj {
  background: var(--gram-place-bg);
  color: var(--gram-place-text);
  border: 1px solid #fde047;
}

.btn-mark-learned {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
}

.btn-mark-learned.active {
  background: #fef08a;
  color: #854d0e;
}

.vocab-visual-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 0.5rem 0.25rem;
  border-radius: 14px;
}

.vocab-visual-btn:hover .vocab-emoji-circle {
  transform: scale(1.06);
}

.vocab-emoji-circle {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  transition: transform 0.2s ease;
}

.vocab-big-emoji {
  font-size: 3.7rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vocab-big-emoji svg {
  width: 82px;
  height: 82px;
}

.listen-opt-emoji svg {
  width: 88px;
  height: 88px;
}

.pair-big-emoji svg,
.mem-emoji svg,
.spell-big-emoji svg {
  width: 68px;
  height: 68px;
}

.vocab-word-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.word-article-tag {
  font-size: 1rem;
  font-weight: 900;
  padding: 0.15rem 0.55rem;
  border-radius: 8px;
}

.word-main-text {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
}

.word-speaker-icon {
  font-size: 1.15rem;
  opacity: 0.8;
}

.vocab-forms-text {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

.vocab-card-sentence {
  border-top: 1px dashed var(--border-light);
  padding-top: 0.65rem;
}

.btn-speak-sentence {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-speak-sentence:hover {
  background: var(--primary-soft);
  border-color: #93c5fd;
}

.sentence-audio-icon {
  white-space: nowrap;
}

/* --- ØVELSES-SCENER (LYT, MATCH, STAV) --- */
.exercise-stage-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-light);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.quiz-header-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.quiz-streak-pill {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
}

.btn-big-listen-prompt {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 900;
  padding: 0.95rem 1.85rem;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
}

.btn-big-listen-prompt:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.listen-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
  max-width: 960px;
  margin: 0 auto 1.25rem;
}

.listen-option-card {
  background: #f8fafc;
  border: 3px solid var(--border-light);
  border-radius: 20px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.listen-option-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.listen-opt-emoji {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.listen-opt-reveal {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.listen-option-card.correct-choice {
  background: #dcfce7;
  border-color: #16a34a;
}

.listen-option-card.wrong-choice {
  background: #fee2e2;
  border-color: #ef4444;
}

.feedback-success {
  background: #dcfce7;
  border: 2px solid #22c55e;
  color: #14532d;
  padding: 1rem 1.35rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 1rem;
}

.feedback-retry {
  background: #fff7ed;
  border: 2px solid #f97316;
  color: #7c2d12;
  padding: 0.9rem 1.25rem;
  border-radius: 14px;
  font-weight: 700;
  margin-top: 1rem;
  text-align: center;
}

.btn-next-question {
  background: #15803d;
  color: #ffffff;
  font-weight: 900;
  padding: 0.65rem 1.3rem;
  border-radius: 12px;
  font-size: 1rem;
}

.btn-next-question:hover {
  background: #166534;
}

/* --- 1C: MATCH & VENDESPIL --- */
.match-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.match-mode-switch {
  display: flex;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 0.3rem;
  border-radius: 12px;
}

.submode-btn {
  padding: 0.55rem 1rem;
  border-radius: 9px;
  font-weight: 800;
  color: var(--text-muted);
}

.submode-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-new-round {
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  font-weight: 800;
}

.btn-new-round:hover {
  background: #e2e8f0;
}

.game-instruction {
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.pairs-board {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1.5rem;
}

.pairs-column h4 {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.pair-word-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  background: #f8fafc;
  border: 2px solid var(--border-light);
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: left;
}

.pair-word-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.pair-word-card.matched {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}

.pair-check {
  margin-left: auto;
  font-weight: 900;
}

.pairs-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 0.85rem;
}

.pair-image-card {
  background: #f8fafc;
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pair-image-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.pair-image-card.matched {
  background: #dcfce7;
  border-color: #22c55e;
}

.pair-big-emoji {
  font-size: 3.2rem;
}

.pair-matched-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: #15803d;
}

.pair-matched-placeholder {
  font-size: 0.9rem;
  color: #94a3b8;
  font-weight: 800;
}

/* Memory / Vendespil */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem;
}

.memory-card {
  height: 135px;
  perspective: 800px;
}

.memory-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 16px;
  transition: transform 0.35s ease;
  transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.memory-card-front {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 2rem;
  border: 2px solid #1e40af;
}

.memory-card-front small {
  font-size: 0.85rem;
  font-weight: 800;
  opacity: 0.9;
}

.memory-card-back {
  background: #ffffff;
  border: 3px solid var(--primary);
  transform: rotateY(180deg);
}

.memory-card.matched .memory-card-back {
  background: #dcfce7;
  border-color: #16a34a;
}

.mem-emoji {
  font-size: 3.2rem;
}

.mem-word {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-main);
}

/* --- 1C-3: ORDAUTOMAT (FODR AUTOMAT -> TRÆK I HÅNDTAG -> SÆT SEDDEL PÅ HYLDE) --- */
.automat-theme-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
}

.automat-theme-label {
  font-weight: 900;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.automat-theme-pill {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: var(--text-main);
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.automat-theme-pill:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.automat-theme-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.automat-status-banner {
  background: linear-gradient(90deg, #eff6ff 0%, #f0fdf4 100%);
  border: 2px solid #93c5fd;
  color: #1e3a8a;
  font-weight: 800;
  font-size: 0.98rem;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  margin-bottom: 1.1rem;
  text-align: center;
}

.automat-workspace-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 980px) {
  .automat-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.automat-zone,
.automat-shelves-zone {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
}

.automat-zone-title {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-main);
  margin: 0 0 0.9rem 0;
  text-align: center;
}

.automat-surround-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex: 1;
}

@media (max-width: 640px) {
  .automat-surround-layout {
    flex-direction: column;
  }
  .automat-side-tokens {
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.automat-side-tokens {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.automat-feeder-token {
  width: 92px;
  min-height: 92px;
  background: #ffffff;
  border: 2.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 0.45rem 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.automat-feeder-token:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.03);
  border-color: #f59e0b;
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.18);
}

.automat-feeder-token.is-fed {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

.automat-feeder-token.is-done {
  opacity: 0.42;
  background: #f1f5f9;
  border-style: dashed;
  cursor: default;
}

.feeder-token-illustration {
  font-size: 2.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feeder-token-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  background: #f1f5f9;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  white-space: nowrap;
}

.automat-feeder-token.is-fed .feeder-token-tag {
  background: #2563eb;
  color: #ffffff;
}

/* Selve Ordautomaten + Håndtag */
.automat-machine-WithLever {
  display: flex;
  align-items: center;
  position: relative;
}

.automat-machine-body {
  width: 268px;
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border: 4px solid #0f172a;
  border-radius: 26px;
  padding: 0.85rem;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.automat-machine-body.drag-over {
  outline: 3px dashed #facc15;
  transform: scale(1.02);
}

.automat-top-cap {
  background: #0f172a;
  border-radius: 14px;
  padding: 0.4rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid #475569;
}

.automat-lights {
  font-size: 0.72rem;
  letter-spacing: 2px;
}

.automat-brand-title {
  color: #fde047;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.automat-feed-slot {
  background: #1e293b;
  border: 2.5px dashed #64748b;
  border-radius: 14px;
  padding: 0.5rem 0.65rem;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.automat-feed-slot.has-fed-item {
  background: #eff6ff;
  border: 2.5px solid #38bdf8;
}

.fed-empty-hint {
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.fed-preview-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
}

.fed-preview-emoji {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.automat-window-screen {
  background: radial-gradient(circle, #f0f9ff 0%, #dbeafe 100%);
  border: 4px solid #0284c7;
  border-radius: 18px;
  height: 112px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 4px 10px rgba(2, 132, 199, 0.18);
}

.automat-gears-decor {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.95rem;
  opacity: 0.55;
}

.automat-window-big-icon {
  font-size: 3.7rem;
  line-height: 1;
  animation: popBounce 0.28s ease-out;
}

.automat-window-question {
  font-size: 3rem;
  font-weight: 900;
  color: #93c5fd;
}

/* Seddel-sprække nederst i automaten */
.automat-ticket-chute {
  background: #0f172a;
  border: 2.5px solid #475569;
  border-radius: 16px;
  padding: 0.65rem 0.6rem;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.chute-slot-lip {
  width: 82%;
  height: 6px;
  background: #020617;
  border-radius: 999px;
  border-bottom: 1.5px solid #64748b;
  margin-bottom: 0.45rem;
}

.automat-no-ticket {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.automat-dispensed-ticket {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 2.5px solid #f59e0b;
  border-radius: 12px;
  padding: 0.45rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: grab;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
  animation: ticketSlideOut 0.32s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes ticketSlideOut {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ticket-hole {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #0f172a;
  border: 1.5px solid #d97706;
  flex-shrink: 0;
}

.ticket-word-text {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
}

.ticket-speak-btn {
  background: #ffffff;
  border: 1.5px solid #f59e0b;
  border-radius: 8px;
  padding: 0.15rem 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Det røde håndtag på højre side af automaten */
.automat-lever-btn {
  width: 54px;
  height: 150px;
  background: transparent;
  border: none;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  margin-left: -4px;
}

.lever-base-mount {
  position: absolute;
  left: 0;
  top: 58px;
  width: 18px;
  height: 36px;
  background: #64748b;
  border: 3px solid #0f172a;
  border-left: none;
  border-radius: 0 10px 10px 0;
}

.lever-shaft {
  width: 10px;
  height: 72px;
  background: linear-gradient(90deg, #cbd5e1, #94a3b8);
  border: 2.5px solid #0f172a;
  border-radius: 999px;
  margin-top: 20px;
  transform-origin: bottom center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lever-knob {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f87171 0%, #dc2626 65%, #991b1b 100%);
  border: 3px solid #450a0a;
  box-shadow: 0 5px 12px rgba(220, 38, 38, 0.4);
  position: absolute;
  top: 2px;
  z-index: 2;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.automat-lever-btn:hover:not(:disabled) .lever-knob {
  transform: scale(1.1);
}

.automat-lever-btn:active .lever-knob,
.automat-lever-btn.is-pulled .lever-knob {
  transform: translateY(58px) scale(1.05);
}

.automat-lever-btn:active .lever-shaft,
.automat-lever-btn.is-pulled .lever-shaft {
  transform: scaleY(0.45) translateY(38px);
}

.lever-label {
  margin-top: auto;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  border: 1.5px solid #991b1b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Hylderne med ting på højre side */
.automat-shelves-cabinet {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 4px solid #b45309;
  border-radius: 20px;
  padding: 1rem 0.9rem 0.85rem;
  box-shadow: inset 0 4px 12px rgba(180, 83, 9, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 1.15rem;
  flex: 1;
}

.automat-shelf-row {
  display: flex;
  flex-direction: column;
}

.shelf-items-flex {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  padding: 0 0.25rem;
  align-items: end;
}

.shelf-wood-plank {
  height: 16px;
  background: linear-gradient(180deg, #d97706 0%, #92400e 100%);
  border: 2px solid #78350f;
  border-radius: 6px;
  box-shadow: 0 5px 10px rgba(120, 53, 15, 0.28);
  margin-top: -2px;
}

.shelf-object-slot {
  background: rgba(255, 255, 255, 0.78);
  border: 2px dashed #d97706;
  border-radius: 14px 14px 4px 4px;
  padding: 0.5rem 0.35rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.shelf-object-slot.awaiting-ticket:hover,
.shelf-object-slot.drag-over {
  background: #ffffff;
  border-color: #2563eb;
  border-style: solid;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.16);
}

.shelf-object-slot.is-labeled {
  background: #ecfdf5;
  border: 2.5px solid #16a34a;
}

.shelf-object-slot.wrong-shake {
  border-color: #dc2626;
  background: #fef2f2;
}

.shelf-object-figure {
  font-size: 2.8rem;
  line-height: 1;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shelf-ticket-holder {
  width: 100%;
  background: #ffffff;
  border: 1.5px dashed #94a3b8;
  border-radius: 8px;
  padding: 0.25rem 0.35rem;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.shelf-ticket-holder.filled {
  background: #fef9c3;
  border: 1.5px solid #ca8a04;
}

.shelf-ticket-placeholder {
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
  white-space: nowrap;
}

.shelf-ticket-word {
  font-size: 0.84rem;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
}

.shelf-ticket-audio {
  font-size: 0.72rem;
  font-weight: 900;
  color: #15803d;
  white-space: nowrap;
}

/* --- 1D: STAVEVÆRKSTED --- */
.spell-card {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.spell-top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hint-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  cursor: pointer;
}

.spell-visual-focus {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.spell-big-emoji {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.btn-speak-spell-word {
  background: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.35rem;
  border-radius: 12px;
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.spell-sentence-clue {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 600;
}

.spell-slots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  width: 100%;
  margin: 0.5rem 0;
}

.spell-article-prefix {
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  font-size: 1.35rem;
  font-weight: 900;
  margin-right: 0.3rem;
  flex-shrink: 0;
}

.spell-letter-slot {
  flex: 0 1 54px;
  width: 54px;
  min-width: 32px;
  height: 62px;
  border-radius: 12px;
  border: 3px dashed #94a3b8;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 900;
}

.spell-letter-slot.filled {
  border-style: solid;
  border-color: var(--primary);
  background: #eff6ff;
  color: #1e3a8a;
}

.ghost-char {
  color: #cbd5e1;
}

.spell-space-slot {
  width: 24px;
}

.spell-pool-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.spell-tile-btn {
  width: 54px;
  height: 58px;
  border-radius: 12px;
  background: #1e293b;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 900;
  box-shadow: 0 4px 0 #0f172a;
}

.spell-tile-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--primary);
}

.spell-tile-btn.used {
  opacity: 0.2;
  transform: scale(0.92);
}

/* ==========================================================================
   SEKTION 2: SÆTNINGSMASKINEN
   ========================================================================== */
.sentence-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.sentence-mode-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.25rem 1rem;
  border-radius: 20px;
  background: #ffffff;
  border: 3px solid #cbd5e1;
  font-weight: 900;
  font-size: 1.14rem;
  color: var(--text-main);
  text-align: center;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: all 0.18s ease;
}

.sentence-mode-tab:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.sentence-mode-tab:hover .vocab-tab-icon {
  transform: scale(1.06);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.sentence-mode-tab.active {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
  transform: translateY(-2px);
}

.sentence-mode-tab.active .vocab-tab-icon {
  background: #ffffff;
  border-color: #93c5fd;
}

.sentence-mode-panel {
  display: none;
}

.sentence-mode-panel.active {
  display: block;
}

.sentence-builder-board {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-light);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.75rem;
}

.sentence-board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.1rem;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 1.25rem;
}

.formatted-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  color: var(--text-muted);
}

.formatted-sentence-box h3 {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-main);
}

.sentence-audio-buttons {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-primary-speak {
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.05rem;
  padding: 0.8rem 1.4rem;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary-speak:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-secondary-speak {
  background: #eff6ff;
  color: var(--primary);
  border: 2px solid #93c5fd;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.8rem 1.2rem;
  border-radius: 14px;
}

.btn-secondary-speak:hover {
  background: #dbeafe;
}

/* Sætningsbåndet hvor ord-vognene ligger og kan trækkes / rykkes rundt */
.sentence-train-strip {
  min-height: 148px;
  background: #f8fafc;
  border: 3px dashed #cbd5e1;
  border-radius: 18px;
  padding: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.empty-sentence-placeholder {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 1.5rem;
}

.sentence-train-car {
  border-radius: 16px;
  border: 3px solid transparent;
  padding: 0.55rem 0.75rem;
  min-width: 135px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  cursor: grab;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.sentence-train-car:active {
  cursor: grabbing;
}

.sentence-train-car.dragging {
  opacity: 0.45;
  transform: scale(0.96);
}

.sentence-train-car.drag-over {
  outline: 3px dashed var(--primary);
}

.sentence-train-car.drag-merge-target {
  outline: 3px solid #a855f7;
  box-shadow: 0 0 0 6px rgba(168, 85, 247, 0.22), var(--shadow-md);
  transform: scale(1.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sentence-train-car.drag-merge-target::after {
  content: attr(data-merge-preview);
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: #7e22ce;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(88, 28, 135, 0.35);
  pointer-events: none;
  z-index: 5;
}

.gram-subject {
  background: var(--gram-subject-bg);
  border-color: var(--gram-subject-border);
  color: var(--gram-subject-text);
}

.gram-verb {
  background: var(--gram-verb-bg);
  border-color: var(--gram-verb-border);
  color: var(--gram-verb-text);
}

.gram-adjective {
  background: var(--gram-adjective-bg);
  border-color: var(--gram-adjective-border);
  color: var(--gram-adjective-text);
}

.gram-object {
  background: var(--gram-object-bg);
  border-color: var(--gram-object-border);
  color: var(--gram-object-text);
}

.gram-place {
  background: var(--gram-place-bg);
  border-color: var(--gram-place-border);
  color: var(--gram-place-text);
}

.car-position-badge {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0.75;
}

.car-word-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: inherit;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
}

.car-text-merged {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: wrap;
}

.merged-adj-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  background: var(--gram-adjective-bg);
  border: 2px solid var(--gram-adjective-border);
  color: var(--gram-adjective-text);
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 1px 3px rgba(88, 28, 135, 0.12);
}

.merged-adj-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.merged-adj-unmerge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.12rem;
  border-radius: 50%;
  background: rgba(88, 28, 135, 0.14);
  color: var(--gram-adjective-text);
  font-size: 0.68rem;
  line-height: 1;
  cursor: pointer;
}

.merged-adj-unmerge:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-car-merge-hint {
  background: linear-gradient(135deg, #9333ea, #16a34a);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.24rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  transition: transform 0.12s ease;
}

.btn-car-merge-hint:hover {
  transform: scale(1.04);
}

.car-icon {
  font-size: 2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.car-word-main:hover {
  background: rgba(255, 255, 255, 0.55);
}

.car-speaker {
  font-size: 0.9rem;
  opacity: 0.7;
}

.car-move-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.35rem;
}

.btn-car-move,
.btn-car-remove {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 7px;
  padding: 0.2rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 900;
  color: inherit;
}

.btn-car-move:hover:not(:disabled),
.btn-car-remove:hover {
  background: #ffffff;
}

.grammar-tip-banner {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.tip-great {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.tip-tip {
  background: #fffbeb;
  border: 1px solid #fde047;
  color: #92400e;
}

.tip-neutral {
  background: #f1f5f9;
  color: var(--text-muted);
}

.sentence-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.btn-tool {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-main);
}

.btn-tool:hover {
  background: #e2e8f0;
}

.btn-tool-save {
  background: #fef9c3;
  border-color: #facc15;
  color: #854d0e;
}

.btn-tool-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* Farvekodede ordkasser */
.word-banks-wrapper {
  margin-bottom: 1.75rem;
}

.word-banks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.custom-word-form {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.custom-word-form input,
.custom-word-form select {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 2px solid var(--border-light);
  font-weight: 700;
}

.btn-add-custom {
  background: #1e293b;
  color: #ffffff;
  font-weight: 800;
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
}

.word-banks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0.9rem;
}

.word-bank-column {
  border-radius: 18px;
  padding: 1rem;
  border: 2px solid transparent;
}

.word-bank-header {
  margin-bottom: 0.75rem;
}

.word-bank-header h4 {
  font-size: 1.08rem;
  font-weight: 900;
}

.word-bank-header p {
  font-size: 0.82rem;
  opacity: 0.85;
  font-weight: 700;
}

.word-bank-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.bank-word-chip {
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid currentColor;
  padding: 0.4rem 0.75rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.98rem;
}

.chip-emoji {
  font-size: 2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bank-word-chip:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.chip-add-plus {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-left: 0.15rem;
}

/* Gemte sætninger */
.saved-sentences-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-light);
  padding: 1.25rem;
}

.saved-sentences-panel h3 {
  margin-bottom: 0.85rem;
  font-size: 1.15rem;
}

.saved-sentences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.65rem;
}

.saved-sentence-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.4rem 0.65rem;
}

.btn-saved-listen {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.98rem;
  text-align: left;
  flex: 1;
  padding: 0.35rem;
}

/* Guidede sætninger */
.guided-card {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.guided-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guided-step-badge {
  background: #eff6ff;
  color: var(--primary);
  font-weight: 900;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.guided-prompt-box {
  background: #f8fafc;
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.guided-emoji-scene {
  font-size: 3.4rem;
  background: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 16px;
  border: 2px solid var(--border-light);
}

.guided-support-hint {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-weight: 700;
}

.guided-drop-zone {
  min-height: 96px;
  background: #f8fafc;
  border: 3px dashed #94a3b8;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.guided-placeholder {
  color: #94a3b8;
  font-weight: 700;
}

.guided-placed-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  border: 2px solid currentColor;
  gap: 0.25rem;
}

.guided-chip-main {
  font-size: 1.1rem;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.guided-chip-arrows {
  display: flex;
  gap: 0.35rem;
}

.guided-chip-arrows button {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.75);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
}

.guided-word-pool {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-height: 54px;
}

.guided-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn-secondary-action {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-weight: 800;
}

.btn-primary-check {
  background: var(--success);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.05rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
}

/* ==========================================================================
   SEKTION 3: VERDENSKORT & MIT PORTRÆT
   ========================================================================== */
.worldmap-layout {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.worldmap-visual-card,
.selected-country-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-light);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.worldmap-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.continent-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.map-zoom-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-main);
}

.map-zoom-btn:hover {
  border-color: var(--primary);
  background: #ffffff;
}

.map-zoom-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.map-click-instruction {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e40af;
  background: #eff6ff;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
}

.world-map-canvas {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #93c5fd;
  box-shadow: inset 0 2px 8px rgba(2, 132, 199, 0.1);
}

.interactive-world-svg {
  width: 100%;
  height: auto;
  display: block;
}

.real-atlas-svg {
  cursor: crosshair;
}

.geo-country-path {
  transition: filter 0.15s ease;
}

.geo-country-path:hover {
  filter: brightness(0.92);
}

.user-placed-dot,
.dk-fixed-marker {
  pointer-events: none;
}

.pin-pulse-ring {
  animation: pulseRing 1.8s infinite;
}

@keyframes pulseRing {
  0% { opacity: 0.85; }
  50% { opacity: 0.25; }
  100% { opacity: 0.85; }
}

/* Panel til at skrive landets navn ved siden af kortet */
.place-dot-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid #f1f5f9;
}

.pin-badge-icon {
  font-size: 2.2rem;
  background: #fef2f2;
  border: 2px solid #fecaca;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.place-dot-header h3 {
  font-size: 1.35rem;
  font-weight: 900;
}

.place-dot-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 700;
}

.map-country-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.clicked-country-suggestion {
  margin-top: 0.45rem;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: #166534;
}

.btn-apply-country-name {
  background: #16a34a;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
}

.btn-apply-country-name:hover {
  background: #15803d;
}

.language-add-row {
  margin-top: 0.15rem;
}

.quick-languages-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.quick-lang-pill {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  transition: all 0.15s ease;
}

.quick-lang-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eff6ff;
}

.quick-lang-pill.active {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e3a8a;
}

.map-sentence-preview {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.98rem;
  color: #1e3a8a;
}

.btn-use-in-portrait {
  width: 100%;
  background: #1e293b;
  color: #ffffff;
  padding: 0.8rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.98rem;
}

.btn-use-in-portrait:hover {
  background: #0f172a;
}

/* --- MIT PORTRÆT BUILDER --- */
.portrait-builder-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-light);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.portrait-section-header {
  margin-bottom: 1.35rem;
}

.portrait-section-header h3 {
  font-size: 1.5rem;
  font-weight: 900;
}

.portrait-builder-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.portrait-controls-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.control-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.input-field label {
  font-weight: 800;
  font-size: 0.92rem;
}

.input-field input,
.input-field select {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 2px solid var(--border-light);
  font-size: 1rem;
  font-weight: 700;
}

.avatar-customizer-box {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid #dbeafe;
  border-radius: 20px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: inset 0 1px 0 #ffffff;
}

.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e2e8f0;
}

.studio-header h4 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
}

.studio-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 700;
}

.btn-randomize-avatar {
  background: linear-gradient(135deg, #6366f1 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.btn-randomize-avatar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.studio-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.studio-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-muted);
  display: block;
}

.swatch-row,
.pill-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.color-swatch {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.16), 0 0 0 1px #cbd5e1;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.color-swatch:hover {
  transform: scale(1.12);
}

.color-swatch.active {
  transform: scale(1.18);
  box-shadow: 0 0 0 3px var(--primary), 0 4px 10px rgba(37, 99, 235, 0.28);
}

.studio-pills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.studio-choice-pill {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 11px;
  padding: 0.45rem 0.5rem;
  font-size: 0.86rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--text-main);
}

.studio-choice-pill:hover {
  border-color: #93c5fd;
  background: #ffffff;
}

.studio-choice-pill.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.studio-hair-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.studio-hair-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.5rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.studio-hair-btn:hover {
  border-color: #93c5fd;
  background: #ffffff;
  transform: translateY(-1px);
}

.studio-hair-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.sh-icon {
  font-size: 1.35rem;
  line-height: 1.1;
}

.sh-svg-preview {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sh-svg-preview svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sh-label {
  font-size: 0.78rem;
}

.mini-pill-btn {
  padding: 0.38rem 0.72rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  font-size: 0.83rem;
  font-weight: 800;
  color: var(--text-main);
}

.mini-pill-btn:hover {
  border-color: var(--primary);
  background: #ffffff;
}

.mini-pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
}

.visual-selector-block h4 {
  margin-bottom: 0.5rem;
  font-size: 0.98rem;
}

.visual-choices-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.visual-choice-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 2px solid var(--border-light);
  font-weight: 800;
  font-size: 0.9rem;
}

.visual-choice-btn .vc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.visual-choice-btn .vc-icon svg {
  width: 30px;
  height: 30px;
  display: block;
}

.visual-choice-btn.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.custom-choice-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.55rem;
  align-items: center;
}

.custom-choice-form input {
  flex: 1;
  padding: 0.5rem 0.85rem;
  border-radius: 11px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.custom-choice-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.btn-add-custom-choice {
  padding: 0.5rem 0.95rem;
  border-radius: 11px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.btn-add-custom-choice:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.custom-extra-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.custom-extra-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  color: #1e3a8a;
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 800;
}

.btn-remove-extra-chip {
  background: rgba(30, 58, 138, 0.12);
  color: #1e3a8a;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
}

.btn-remove-extra-chip:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Det færdige portrætkort */
.portrait-preview-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 3px solid #93c5fd;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 90px;
}

.portrait-card-badge {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  width: fit-content;
  margin: 0 auto 1rem;
}

.portrait-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.15rem;
}

.avatar-frame {
  width: 178px;
  height: 178px;
  position: relative;
  margin-bottom: 0.65rem;
  filter: drop-shadow(0 8px 18px rgba(37, 99, 235, 0.14));
}

.portrait-avatar-svg {
  width: 100%;
  height: 100%;
}

.avatar-flag-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 2rem;
  background: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 2.5px solid var(--border-light);
}

.avatar-name-banner {
  text-align: center;
}

.avatar-name-banner h4 {
  font-size: 1.45rem;
  font-weight: 900;
}

.avatar-name-banner span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 700;
}

.portrait-sentences-header {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.portrait-native-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  color: #1e40af;
  font-size: 0.8rem;
  font-weight: 800;
}

.portrait-native-toggle-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
}

.portrait-sentences-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.portrait-sentence-line {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  font-size: 0.96rem;
  font-weight: 800;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portrait-sentence-line:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.ps-main-danish-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.15rem 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}

.ps-main-danish-btn:hover {
  background: var(--primary-soft);
}

.ps-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.ps-text-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.ps-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.ps-native-subtext {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0369a1;
  background: #f0f9ff;
  border-left: 3px solid #38bdf8;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  line-height: 1.3;
}

.ps-audio {
  font-size: 0.82rem;
  font-weight: 800;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.22rem 0.45rem;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ps-native-audio-btn {
  background: linear-gradient(135deg, #ecfeff 0%, #e0f2fe 100%);
  color: #0c4a6e;
  border: 1.5px solid #7dd3fc;
  border-radius: 9px;
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.12s ease, background 0.12s ease;
}

.ps-native-audio-btn:hover {
  background: #bae6fd;
  transform: translateY(-1px);
}

.btn-full-width {
  width: 100%;
  margin-bottom: 0.65rem;
}

.btn-native-speak {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1.5px solid #0284c7;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 900;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-native-speak:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3);
}

.portrait-secondary-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.btn-save-wall {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  padding: 0.65rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
}

.btn-print-card {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid #cbd5e1;
  padding: 0.65rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
}

/* Klassens Væg */
.class-wall-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-light);
  padding: 1.5rem;
}

.class-wall-header {
  margin-bottom: 1.2rem;
}

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

.wall-portrait-card {
  background: #f8fafc;
  border: 2px solid var(--border-light);
  border-radius: 18px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.wall-card-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.wall-avatar-wrap {
  width: 68px;
  height: 68px;
  position: relative;
  flex-shrink: 0;
}

.wall-flag {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #ffffff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.wall-person-meta h4 {
  font-size: 1.15rem;
  font-weight: 900;
}

.wall-origin,
.wall-lang {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 700;
}

.wall-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.wall-tag {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.wall-tag-lang {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.wall-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.btn-wall-listen {
  flex: 1 1 120px;
  background: var(--primary);
  color: #ffffff;
  padding: 0.55rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.84rem;
}

.btn-wall-listen-native {
  flex: 1 1 120px;
  background: #0284c7;
  color: #ffffff;
  padding: 0.55rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.84rem;
}

.btn-wall-delete {
  background: #f1f5f9;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
}

/* ==========================================================================
   SAMTALE (SMS / MESSENGER-TALEBOBLER MED VISUEL STØTTE & OPLÆSNING)
   ========================================================================== */
.conv-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.conv-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  padding: 0.75rem 1rem;
  border-radius: 16px;
}

.conv-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 260px;
}

.conv-selector-label {
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--text-main);
  white-space: nowrap;
}

.conv-topic-select {
  flex: 1;
  min-width: 220px;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
}

.conv-topic-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.conv-nav-btns {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.sms-phone-frame {
  background: #f1f5f9;
  border: 2.5px solid #cbd5e1;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
}

.sms-partner-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.sms-partner-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sms-partner-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #93c5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.sms-partner-avatar svg {
  width: 46px;
  height: 46px;
}

.sms-partner-name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sms-partner-meta h4 {
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
}

.sms-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
  display: inline-block;
}

.sms-partner-meta p {
  font-size: 0.86rem;
  color: #dbeafe;
  font-weight: 700;
  margin: 0.1rem 0 0;
}

.btn-sms-read-all {
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  transition: all 0.15s ease;
}

.btn-sms-read-all:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.sms-chat-thread {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  max-height: 430px;
  overflow-y: auto;
  background: radial-gradient(circle at top left, #f8fafc 0%, #eef2f6 100%);
}

.sms-row {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  max-width: 82%;
  animation: smsPopIn 0.22s ease-out;
}

@keyframes smsPopIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sms-row-bot {
  align-self: flex-start;
}

.sms-row-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.sms-mini-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  overflow: hidden;
  flex-shrink: 0;
}

.sms-mini-avatar svg {
  width: 34px;
  height: 34px;
}

.sms-bubble {
  padding: 0.8rem 1.05rem;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.07);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sms-bubble-bot {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #dbe3ee;
  border-bottom-left-radius: 6px;
}

.sms-bubble-user {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-bottom-right-radius: 6px;
}

.sms-bubble-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.sms-visual-support {
  font-size: 1.45rem;
  line-height: 1.1;
  background: rgba(148, 163, 184, 0.14);
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
}

.sms-bubble-user .sms-visual-support {
  background: rgba(255, 255, 255, 0.2);
}

.sms-sender-tag {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.sms-bubble-text {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.4;
  margin: 0;
}

.sms-bubble-speak-btn {
  align-self: flex-start;
  margin-top: 0.15rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1.5px solid #bfdbfe;
  border-radius: 999px;
  padding: 0.22rem 0.68rem;
  font-size: 0.8rem;
  font-weight: 800;
  transition: all 0.15s ease;
}

.sms-bubble-speak-btn:hover {
  background: #dbeafe;
  transform: scale(1.04);
}

.sms-bubble-user .sms-bubble-speak-btn {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.sms-bubble-user .sms-bubble-speak-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.sms-typing-bubble {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
}

.sms-typing-label {
  font-size: 0.86rem;
  font-weight: 800;
  color: #475569;
}

.sms-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sms-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  animation: smsDotPulse 1.2s infinite ease-in-out;
}

.sms-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.sms-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes smsDotPulse {
  0%, 80%, 100% {
    transform: scale(0.65);
    opacity: 0.45;
  }
  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.sms-reply-composer {
  background: #ffffff;
  border-top: 2px solid #e2e8f0;
  padding: 1.1rem 1.25rem;
}

.conv-options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.conv-options-title {
  font-weight: 900;
  font-size: 0.95rem;
  color: #1e293b;
}

.conv-turn-counter {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1.5px solid #bfdbfe;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.conv-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.conv-option-card {
  background: #f8fafc;
  border: 2.5px solid #cbd5e1;
  border-radius: 18px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.55rem;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
}

.conv-option-card:hover,
.conv-option-card:focus-visible {
  background: #eff6ff;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.14);
  outline: none;
}

.conv-option-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.conv-option-visual {
  font-size: 1.6rem;
  line-height: 1.1;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  padding: 0.25rem 0.55rem;
  border-radius: 12px;
}

.conv-option-listen-btn {
  background: #ffffff;
  color: #1d4ed8;
  border: 1.5px solid #93c5fd;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  transition: all 0.15s ease;
}

.conv-option-listen-btn:hover {
  background: #dbeafe;
  transform: scale(1.05);
}

.conv-option-text {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.38;
  margin: 0;
}

.conv-option-send-hint {
  font-size: 0.78rem;
  font-weight: 800;
  color: #2563eb;
  align-self: flex-end;
}

.conv-waiting-box {
  text-align: center;
  padding: 1rem;
  color: #475569;
  font-weight: 800;
  font-size: 0.98rem;
  background: #f8fafc;
  border-radius: 14px;
  border: 1.5px dashed #cbd5e1;
}

.conv-complete-banner {
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 18px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.conv-complete-badge {
  display: inline-block;
  background: #16a34a;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.conv-complete-text p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #14532d;
}

.conv-complete-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   FORSIDE: 4 KVADRATISKE BLOKKE SAT OP I EN KVADRAT (2x2)
   ========================================================================== */
body.on-home-screen .main-nav {
  display: none;
}

.home-quad-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.5rem 2.5rem;
}

.home-quad-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  width: 100%;
  max-width: 660px;
}

.home-quad-card {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border: 3px solid #cbd5e1;
  border-radius: 28px;
  padding: 1.6rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.home-quad-card:hover,
.home-quad-card:focus-visible {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.16);
  outline: none;
}

.quad-ordforraad {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}
.quad-ordforraad:hover {
  border-color: #2563eb;
}

.quad-saetning {
  border-color: #d8b4fe;
  background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}
.quad-saetning:hover {
  border-color: #9333ea;
}

.quad-verdenskort {
  border-color: #86efac;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}
.quad-verdenskort:hover {
  border-color: #16a34a;
}

.quad-gaet {
  border-color: #fde047;
  background: linear-gradient(180deg, #ffffff 0%, #fefce8 100%);
}
.quad-gaet:hover {
  border-color: #eab308;
}

.quad-speak-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  transition: all 0.15s ease;
  z-index: 2;
}

.quad-speak-btn:hover {
  background: #eff6ff;
  border-color: var(--primary);
  transform: scale(1.08);
}

.quad-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.08));
}

.quad-custom-svg {
  width: 112px;
  height: 112px;
  transition: transform 0.2s ease;
}

.home-quad-card:hover .quad-custom-svg {
  transform: scale(1.06);
}

.quad-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.quad-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.quad-badges span {
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid #cbd5e1;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #334155;
}

/* ==========================================================================
   SEKTION 2D: SÆTNINGSLABYRINT (BOGSTAVER, BLANKE FELTER & PUNKTUM)
   ========================================================================== */
.maze-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.maze-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid #e2e8f0;
}

.maze-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 320px;
}

.maze-top-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.maze-prompt-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 2px solid #bfdbfe;
  border-radius: 18px;
  padding: 1rem 1.25rem;
}

.maze-word-visuals {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.maze-word-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.05rem;
  border: 2px solid transparent;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease;
}

.maze-word-badge:hover {
  transform: translateY(-2px);
}

.maze-word-tiny-speaker {
  font-size: 0.85rem;
  opacity: 0.75;
}

.maze-writing-strip-box {
  background: #ffffff;
  border: 2.5px solid #cbd5e1;
  border-radius: 18px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.03);
}

.maze-writing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.maze-writing-label {
  font-weight: 800;
  font-size: 0.98rem;
  color: #334155;
}

.maze-progress-counter {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 900;
  font-size: 0.88rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.maze-sentence-slots-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  row-gap: 0.65rem;
}

.maze-word-slot-group {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
}

.maze-progress-slot {
  width: 34px;
  height: 42px;
  border-radius: 9px;
  border: 2px dashed #94a3b8;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  transition: all 0.18s ease;
}

/* Blankt mellemrumsfelt på skrivelinjen */
.maze-progress-slot.slot-space {
  width: 28px;
  height: 42px;
  background: #fffbeb;
  border: 2px dashed #f59e0b;
  margin: 0 0.2rem;
}

.slot-blank-ghost,
.slot-blank-marker {
  width: 16px;
  height: 6px;
  border: 2px solid #cbd5e1;
  border-top: none;
  border-radius: 0 0 4px 4px;
  margin-top: 14px;
}

.slot-blank-marker {
  border-color: #15803d;
}

/* Punktum-felt på skrivelinjen */
.maze-progress-slot.slot-period {
  width: 32px;
  background: #fef3c7;
  border-color: #d97706;
}

.maze-progress-slot.filled {
  border-style: solid;
  border-color: #16a34a;
  background: #dcfce7;
  color: #14532d;
}

.maze-progress-slot.next-target {
  border-style: solid;
  border-color: #2563eb;
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
  transform: scale(1.06);
}

.slot-ghost-char {
  color: #cbd5e1;
}

.maze-step-guide {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  color: #1e3a8a;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.maze-step-guide.maze-step-space {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.maze-step-guide.maze-step-period {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #78350f;
}

.maze-step-guide.maze-step-done {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.inline-blank-demo {
  display: inline-block;
  width: 24px;
  height: 20px;
  vertical-align: middle;
  background: #ffffff;
  border: 2px dashed #d97706;
  border-radius: 5px;
  margin: 0 0.2rem;
}

.inline-period-demo,
.inline-letter-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 0.35rem;
  background: #ffffff;
  border: 2px solid #2563eb;
  border-radius: 6px;
  font-weight: 900;
  color: #1e3a8a;
  margin: 0 0.15rem;
}

/* Selve Labyrint-brættet */
.maze-board-wrapper {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  padding: 1.25rem;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  user-select: none;
  touch-action: manipulation;
}

.maze-grid-board {
  display: grid;
  gap: 10px;
  max-width: 780px;
  margin: 0 auto;
}

.maze-cell {
  position: relative;
  height: 62px;
  border-radius: 14px;
  background: #f8fafc;
  border: 3px solid #cbd5e1;
  color: #1e293b;
  font-size: 1.55rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  z-index: 1;
}

.maze-cell:hover {
  transform: scale(1.04);
  border-color: #60a5fa;
}

/* Blanke felter i labyrinten (viser mellemrum) */
.maze-cell.maze-cell-space {
  background: #fffef7;
  border-style: dashed;
  border-color: #cbd5e1;
}

.maze-blank-field-box {
  width: 62%;
  height: 54%;
  border-radius: 7px;
  border: 2px dashed #cbd5e1;
  background: rgba(241, 245, 249, 0.7);
  position: relative;
}

.maze-blank-field-box::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 20%;
  right: 20%;
  height: 4px;
  border: 2px solid #94a3b8;
  border-top: none;
  border-radius: 0 0 3px 3px;
}

/* Punktum-felt i labyrinten */
.maze-cell.maze-cell-period {
  background: #fffbeb;
  border-color: #f59e0b;
}

.maze-cell.maze-cell-period .maze-cell-char {
  font-size: 2.2rem;
  line-height: 1;
  transform: translateY(-3px);
}

/* Nabofelter man kan gå til lige nu */
.maze-cell.reachable-neighbor {
  border-color: #60a5fa;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.28);
}

/* Besøgte felter på stien gennem labyrinten */
.maze-cell.visited {
  background: #22c55e;
  border-style: solid;
  border-color: #15803d;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.maze-cell.visited .maze-blank-field-box {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.85);
}

.maze-cell.visited .maze-blank-field-box::after {
  border-color: #ffffff;
}

/* Nuværende felt (forrest på stien) */
.maze-cell.current-head {
  background: #2563eb;
  border-color: #fde047;
  color: #ffffff;
  transform: scale(1.06);
  box-shadow: 0 0 0 4px rgba(253, 224, 71, 0.55), 0 8px 18px rgba(37, 99, 235, 0.45);
  z-index: 3;
}

/* Forbindelses-broer mellem besøgte felter i labyrinten */
.maze-cell.conn-right::after,
.maze-cell.conn-down::before {
  content: '';
  position: absolute;
  background: #16a34a;
  z-index: -1;
  pointer-events: none;
}

.maze-cell.conn-right::after {
  width: 18px;
  height: 16px;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
}

.maze-cell.conn-down::before {
  width: 16px;
  height: 18px;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}

/* Start- og Mål-mærkater */
.maze-corner-badge {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.badge-start {
  background: #facc15;
  color: #0f172a;
  border: 1.5px solid #ca8a04;
}

.badge-goal {
  background: #ef4444;
  color: #ffffff;
  border: 1.5px solid #b91c1c;
}

/* Hint-blink og fejl-ryst */
.maze-cell.hint-flash {
  animation: mazeHintPulse 0.9s infinite alternate;
  border-color: #facc15 !important;
  background: #fef9c3 !important;
  color: #0f172a !important;
}

@keyframes mazeHintPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.5);
  }
  100% {
    transform: scale(1.08);
    box-shadow: 0 0 0 7px rgba(250, 204, 21, 0.85);
  }
}

.maze-cell.wrong-shake {
  animation: mazeWrongShake 0.35s ease;
  border-color: #ef4444 !important;
  background: #fee2e2 !important;
}

@keyframes mazeWrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.maze-actions-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.maze-legend-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.maze-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: #334155;
  background: #f1f5f9;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.legend-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  border-radius: 6px;
  font-weight: 900;
}

.swatch-blank {
  background: #ffffff;
  border: 2px dashed #94a3b8;
}

.swatch-period {
  background: #fffbeb;
  border: 2px solid #f59e0b;
  color: #0f172a;
  font-size: 1.15rem;
  line-height: 1;
}

.maze-action-btns,
.maze-complete-btns {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.maze-complete-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   SEKTION 1E: ORDLABYRINT (3 MULIGHEDER UNDER ORDFORRÅD)
   ========================================================================== */
.vmaze-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.vmaze-subheader {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.vmaze-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.vmaze-prompt-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.4rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 2.5px solid #bfdbfe;
}

.vmaze-written-target {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: #ffffff;
  border: 3px solid #2563eb;
  border-radius: 18px;
  padding: 0.75rem 1.6rem;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.vmaze-written-word {
  font-size: 1.9rem;
  font-weight: 900;
  color: #0f172a;
}

.vmaze-image-target {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  border: 3px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.vmaze-target-emoji {
  font-size: 4.2rem;
  line-height: 1;
}

.vmaze-grid-board {
  display: grid;
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
}

.maze-cell.vmaze-cell {
  height: auto;
  min-height: 132px;
  padding: 0.75rem 0.6rem;
  flex-direction: column;
  gap: 0.45rem;
  border-radius: 18px;
}

.vmaze-cell-img {
  width: 66px;
  height: 66px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vmaze-cell-emoji {
  font-size: 2.6rem;
  line-height: 1;
}

.vmaze-cell-word {
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.2;
}

.vmaze-cell-audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 2px solid #93c5fd;
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

.vmaze-cell-audio-btn:hover {
  background: #dbeafe;
  transform: scale(1.06);
}

.maze-cell.vmaze-cell.visited .vmaze-cell-audio-btn,
.maze-cell.vmaze-cell.current-head .vmaze-cell-audio-btn {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.7);
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVT DESIGN & UDSKRIFT (PLAKAT)
   ========================================================================== */
@media (max-width: 960px) {
  .vocab-mode-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .sentence-mode-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .conv-options-grid {
    grid-template-columns: 1fr;
  }
  .sms-row {
    max-width: 92%;
  }
  .worldmap-layout,
  .portrait-builder-grid,
  .pairs-board {
    grid-template-columns: 1fr;
  }

  .portrait-preview-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .control-group-row {
    grid-template-columns: 1fr;
  }

  .header-inner {
    justify-content: center;
  }

  .formatted-sentence-box h3 {
    font-size: 1.35rem;
  }
}

.print-only-watermark {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0mm;
  }

  html,
  body {
    margin: 0 !important;
    padding: 14mm 16mm !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-only-watermark {
    display: block !important;
    position: fixed !important;
    bottom: 10mm !important;
    right: 14mm !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    letter-spacing: 0.02em !important;
  }

  .site-header,
  .welcome-strip,
  .section-intro-row,
  .worldmap-layout,
  .portrait-section-header,
  .portrait-controls-card,
  .portrait-sentences-header,
  .ps-audio,
  .portrait-card-actions,
  .class-wall-section,
  .site-footer {
    display: none !important;
  }

  .main-container,
  .portrait-builder-wrapper,
  .portrait-builder-grid {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .portrait-preview-card {
    position: static !important;
    border: 3px solid #1e3a8a !important;
    border-radius: 24px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    max-width: 620px !important;
    margin: 0.5cm auto !important;
    padding: 2rem 2.25rem !important;
  }

  .portrait-card-badge {
    font-size: 0.95rem !important;
    padding: 0.35rem 1.1rem !important;
    margin-bottom: 1.2rem !important;
    border: 1.5px solid #93c5fd !important;
  }

  .avatar-frame {
    width: 210px !important;
    height: 210px !important;
    margin-bottom: 0.85rem !important;
    filter: none !important;
  }

  .avatar-flag-badge {
    display: none !important;
  }

  .avatar-name-banner h4 {
    font-size: 1.85rem !important;
    margin-bottom: 0.2rem !important;
    color: #0f172a !important;
  }

  .avatar-name-banner span {
    font-size: 1.05rem !important;
    color: #334155 !important;
  }

  .portrait-sentences-stack {
    gap: 0.25rem !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
  }

  .portrait-sentence-line {
    border: none !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0.7rem 0.25rem !important;
    font-size: 1.15rem !important;
    gap: 0.8rem !important;
  }

  .portrait-sentence-line:last-child {
    border-bottom: none !important;
  }

  .ps-icon {
    font-size: 1.4rem !important;
  }
}

/* ==========================================================================
   HANDLING (ANIMERET PIGE OMGIVET AF 12 BASIS-ORD FOR HANDLING)
   ========================================================================== */
.action-words-arena {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(300px, 1fr) minmax(210px, 260px);
  gap: 1.35rem;
  align-items: center;
  padding: 0.75rem 0.5rem;
}

.action-words-col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.action-word-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.95rem;
  border-radius: 18px;
  background: #ffffff;
  border: 2.5px solid #cbd5e1;
  text-align: left;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: all 0.18s ease;
}

.action-word-btn:hover {
  border-color: var(--act-color, #2563eb);
  background: var(--act-bg, #eff6ff);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.action-word-btn.active {
  background: var(--act-bg, #eff6ff);
  border-color: var(--act-color, #2563eb);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), 0 8px 20px rgba(15, 23, 42, 0.1);
  transform: scale(1.03);
}

.aw-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--act-bg, #eff6ff);
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-word-btn.active .aw-icon {
  background: #ffffff;
  border-color: var(--act-color, #2563eb);
}

.aw-texts {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.aw-main {
  font-size: 1.08rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.15;
}

.aw-sub {
  font-size: 0.82rem;
  font-weight: 800;
  color: #64748b;
}

.aw-speaker {
  font-size: 1.1rem;
  opacity: 0.75;
  flex-shrink: 0;
}

.action-word-btn:hover .aw-speaker,
.action-word-btn.active .aw-speaker {
  opacity: 1;
  transform: scale(1.12);
}

/* Midter-scene med den animerede pige */
.action-center-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.action-girl-stage {
  width: 100%;
  max-width: 370px;
  aspect-ratio: 320 / 340;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #f0f9ff 68%, #e0f2fe 100%);
  border: 3px solid #bae6fd;
  border-radius: 32px;
  box-shadow: inset 0 4px 18px rgba(255, 255, 255, 0.9), 0 12px 30px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.action-girl-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Sætnings- og bøjningskort under pigen */
.action-sentence-card {
  width: 100%;
  max-width: 420px;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 20px;
  padding: 0.85rem 1.15rem;
  text-align: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.asc-forms {
  font-size: 0.86rem;
  font-weight: 800;
  color: #475569;
  margin-bottom: 0.45rem;
}

.asc-speak-sentence-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  width: 100%;
  padding: 0.55rem 0.95rem;
  border-radius: 14px;
  background: #ffffff;
  border: 2px solid #93c5fd;
  font-size: 1.08rem;
  font-weight: 900;
  color: #1e3a8a;
}

.asc-speak-sentence-btn:hover {
  background: #eff6ff;
  border-color: #2563eb;
}

.asc-audio-pill {
  font-size: 0.82rem;
  font-weight: 800;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
}

.asc-prompt {
  font-size: 1rem;
  font-weight: 800;
  color: #334155;
  padding: 0.25rem 0;
}

/* ==========================================================================
   SVG LED-OPDELING & BEVÆGELSES-ANIMATIONER FOR PIGEN
   ========================================================================== */
.action-girl-svg .ag-character,
.action-girl-svg .ag-body-bounce,
.action-girl-svg .ag-torso,
.action-girl-svg .ag-head-group,
.action-girl-svg .ag-ponytail,
.action-girl-svg .ag-arm-left,
.action-girl-svg .ag-forearm-left,
.action-girl-svg .ag-arm-right,
.action-girl-svg .ag-forearm-right,
.action-girl-svg .ag-leg-left,
.action-girl-svg .ag-calf-left,
.action-girl-svg .ag-leg-right,
.action-girl-svg .ag-calf-right,
.action-girl-svg .ag-ground-shadow,
.action-girl-svg .ag-mouth-round,
.action-girl-svg .ag-eyes-open {
  transform-box: view-box;
}

.action-girl-svg .ag-character { transform-origin: 160px 290px; }
.action-girl-svg .ag-body-bounce { transform-origin: 160px 185px; }
.action-girl-svg .ag-torso { transform-origin: 160px 190px; }
.action-girl-svg .ag-head-group { transform-origin: 160px 108px; }
.action-girl-svg .ag-ponytail { transform-origin: 190px 65px; }
.action-girl-svg .ag-arm-left { transform-origin: 135px 124px; }
.action-girl-svg .ag-forearm-left { transform-origin: 118px 158px; }
.action-girl-svg .ag-arm-right { transform-origin: 185px 124px; }
.action-girl-svg .ag-forearm-right { transform-origin: 202px 158px; }
.action-girl-svg .ag-leg-left { transform-origin: 145px 194px; }
.action-girl-svg .ag-calf-left { transform-origin: 143px 244px; }
.action-girl-svg .ag-leg-right { transform-origin: 175px 194px; }
.action-girl-svg .ag-calf-right { transform-origin: 177px 244px; }
.action-girl-svg .ag-ground-shadow { transform-origin: 160px 304px; }
.action-girl-svg .ag-mouth-round { transform-origin: 160px 91px; }

/* Skjul rekvisitter og sove-øjne/rund mund som standard */
.action-girl-svg .ag-prop,
.action-girl-svg .ag-eyes-sleep,
.action-girl-svg .ag-mouth-round {
  display: none;
}

/* Rolig vejrtrækning når ingen handling er valgt (idle) */
.action-girl-stage[data-action="idle"] .ag-body-bounce {
  animation: agIdleBreathe 2.6s ease-in-out infinite;
}
.action-girl-stage[data-action="idle"] .ag-ponytail {
  animation: agPonytailIdle 2.6s ease-in-out infinite;
}

@keyframes agIdleBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes agPonytailIdle {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(5deg); }
}

/* 1. AT HOPPE */
.action-girl-stage[data-action="hoppe"] .ag-prop-jump { display: block; }
.action-girl-stage[data-action="hoppe"] .ag-body-bounce {
  animation: agJumpBody 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="hoppe"] .ag-ground-shadow {
  animation: agJumpShadow 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="hoppe"] .ag-arm-left {
  animation: agJumpArmL 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="hoppe"] .ag-arm-right {
  animation: agJumpArmR 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="hoppe"] .ag-leg-left {
  animation: agJumpLegL 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="hoppe"] .ag-leg-right {
  animation: agJumpLegR 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="hoppe"] .ag-ponytail {
  animation: agJumpPonytail 0.95s ease-in-out infinite;
}

@keyframes agJumpBody {
  0%, 100% { transform: translateY(8px) scaleY(0.96); }
  45% { transform: translateY(-46px) scaleY(1.03); }
}
@keyframes agJumpShadow {
  0%, 100% { transform: scale(1.08); opacity: 0.34; }
  45% { transform: scale(0.58); opacity: 0.14; }
}
@keyframes agJumpArmL {
  0%, 100% { transform: rotate(-12deg); }
  45% { transform: rotate(105deg); }
}
@keyframes agJumpArmR {
  0%, 100% { transform: rotate(12deg); }
  45% { transform: rotate(-105deg); }
}
@keyframes agJumpLegL {
  0%, 100% { transform: rotate(8deg); }
  45% { transform: rotate(22deg); }
}
@keyframes agJumpLegR {
  0%, 100% { transform: rotate(-8deg); }
  45% { transform: rotate(-22deg); }
}
@keyframes agJumpPonytail {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(28deg); }
}

/* 2. AT LØBE (Begge fødder peger samme vej mod højre) */
.action-girl-stage[data-action="loebe"] .ag-prop-speed { display: block; }
.action-girl-stage[data-action="loebe"] .ag-shoe-left {
  transform-box: view-box;
  transform-origin: 141px 292px;
  transform: scaleX(-1);
}
.action-girl-stage[data-action="loebe"] .ag-ponytail {
  transform-origin: 160px 65px;
  animation: agRunPonytailSide 0.48s ease-in-out infinite;
}
.action-girl-stage[data-action="loebe"] .ag-body-bounce {
  animation: agRunBody 0.48s ease-in-out infinite;
}
.action-girl-stage[data-action="loebe"] .ag-leg-left {
  animation: agRunLegL 0.48s ease-in-out infinite;
}
.action-girl-stage[data-action="loebe"] .ag-calf-left {
  animation: agRunCalfL 0.48s ease-in-out infinite;
}
.action-girl-stage[data-action="loebe"] .ag-leg-right {
  animation: agRunLegR 0.48s ease-in-out infinite;
}
.action-girl-stage[data-action="loebe"] .ag-calf-right {
  animation: agRunCalfR 0.48s ease-in-out infinite;
}
.action-girl-stage[data-action="loebe"] .ag-arm-left {
  animation: agRunArmL 0.48s ease-in-out infinite;
}
.action-girl-stage[data-action="loebe"] .ag-forearm-left {
  transform: rotate(-55deg);
}
.action-girl-stage[data-action="loebe"] .ag-arm-right {
  animation: agRunArmR 0.48s ease-in-out infinite;
}
.action-girl-stage[data-action="loebe"] .ag-forearm-right {
  transform: rotate(-55deg);
}

@keyframes agRunBody {
  0%, 100% { transform: translateY(-10px) rotate(6deg); }
  25%, 75% { transform: translateY(4px) rotate(6deg); }
  50% { transform: translateY(-10px) rotate(6deg); }
}
@keyframes agRunLegL {
  0%, 100% { transform: translateX(12px) rotate(-42deg); }
  50% { transform: translateX(12px) rotate(38deg); }
}
@keyframes agRunCalfL {
  0%, 100% { transform: rotate(20deg); }
  50% { transform: rotate(55deg); }
}
@keyframes agRunLegR {
  0%, 100% { transform: translateX(-10px) rotate(38deg); }
  50% { transform: translateX(-10px) rotate(-42deg); }
}
@keyframes agRunCalfR {
  0%, 100% { transform: rotate(55deg); }
  50% { transform: rotate(20deg); }
}
@keyframes agRunArmL {
  0%, 100% { transform: rotate(45deg); }
  50% { transform: rotate(-45deg); }
}
@keyframes agRunArmR {
  0%, 100% { transform: rotate(-45deg); }
  50% { transform: rotate(45deg); }
}
@keyframes agRunPonytailSide {
  0%, 100% { transform: scaleX(-1) rotate(8deg); }
  50% { transform: scaleX(-1) rotate(24deg); }
}

/* 3. AT GÅ (Går fremad i én retning mod højre med begge fødder samme vej) */
.action-girl-stage[data-action="gaa"] .ag-shoe-left {
  transform-box: view-box;
  transform-origin: 141px 292px;
  transform: scaleX(-1);
}
.action-girl-stage[data-action="gaa"] .ag-character {
  animation: agWalkAcross 3.2s linear infinite;
}
.action-girl-stage[data-action="gaa"] .ag-ground-shadow {
  animation: agWalkAcrossShadow 3.2s linear infinite;
}
.action-girl-stage[data-action="gaa"] .ag-eyes-open {
  transform: translateX(4px);
}
.action-girl-stage[data-action="gaa"] .ag-ponytail {
  transform-origin: 160px 65px;
  animation: agWalkPonytailSide 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="gaa"] .ag-body-bounce {
  animation: agWalkBody 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="gaa"] .ag-leg-left {
  animation: agWalkLegL 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="gaa"] .ag-calf-left {
  animation: agWalkCalfL 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="gaa"] .ag-leg-right {
  animation: agWalkLegR 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="gaa"] .ag-calf-right {
  animation: agWalkCalfR 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="gaa"] .ag-arm-left {
  animation: agWalkArmL 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="gaa"] .ag-forearm-left {
  transform: rotate(-28deg);
}
.action-girl-stage[data-action="gaa"] .ag-arm-right {
  animation: agWalkArmR 0.95s ease-in-out infinite;
}
.action-girl-stage[data-action="gaa"] .ag-forearm-right {
  transform: rotate(-28deg);
}

@keyframes agWalkAcross {
  0% { transform: translateX(-38px); }
  50% { transform: translateX(38px); }
  50.01% { transform: translateX(-38px); }
  100% { transform: translateX(38px); }
}
@keyframes agWalkAcrossShadow {
  0% { transform: translateX(-38px); }
  50% { transform: translateX(38px); }
  50.01% { transform: translateX(-38px); }
  100% { transform: translateX(38px); }
}
@keyframes agWalkBody {
  0%, 50%, 100% { transform: translateY(-3px) rotate(2deg); }
  25%, 75% { transform: translateY(2px) rotate(2deg); }
}
@keyframes agWalkLegL {
  0%, 100% { transform: translateX(13px) rotate(-26deg); }
  50% { transform: translateX(13px) rotate(24deg); }
}
@keyframes agWalkCalfL {
  0%, 100% { transform: rotate(4deg); }
  25% { transform: rotate(28deg); }
  50% { transform: rotate(8deg); }
}
@keyframes agWalkLegR {
  0%, 100% { transform: translateX(-11px) rotate(24deg); }
  50% { transform: translateX(-11px) rotate(-26deg); }
}
@keyframes agWalkCalfR {
  0%, 100% { transform: rotate(8deg); }
  50% { transform: rotate(4deg); }
  75% { transform: rotate(28deg); }
}
@keyframes agWalkArmL {
  0%, 100% { transform: translateX(10px) rotate(24deg); }
  50% { transform: translateX(10px) rotate(-24deg); }
}
@keyframes agWalkArmR {
  0%, 100% { transform: translateX(-8px) rotate(-24deg); }
  50% { transform: translateX(-8px) rotate(24deg); }
}
@keyframes agWalkPonytailSide {
  0%, 100% { transform: scaleX(-1) rotate(2deg); }
  50% { transform: scaleX(-1) rotate(12deg); }
}

/* 4. AT VINKE */
.action-girl-stage[data-action="vinke"] .ag-prop-wave { display: block; }
.action-girl-stage[data-action="vinke"] .ag-arm-right {
  transform: rotate(-115deg);
}
.action-girl-stage[data-action="vinke"] .ag-forearm-right {
  animation: agWaveForearm 0.55s ease-in-out infinite;
}
.action-girl-stage[data-action="vinke"] .ag-head-group {
  animation: agWaveHead 1.1s ease-in-out infinite;
}
.action-girl-stage[data-action="vinke"] .ag-ponytail {
  animation: agWavePonytail 1.1s ease-in-out infinite;
}

@keyframes agWaveForearm {
  0%, 100% { transform: rotate(-28deg); }
  50% { transform: rotate(26deg); }
}
@keyframes agWaveHead {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(4deg); }
}
@keyframes agWavePonytail {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(12deg); }
}

/* 5. AT KLAPPE */
.action-girl-stage[data-action="klappe"] .ag-prop-clap {
  display: block;
  animation: agClapSparkle 0.48s ease-in-out infinite;
  transform-box: view-box;
  transform-origin: 160px 150px;
}
.action-girl-stage[data-action="klappe"] .ag-arm-left {
  animation: agClapArmL 0.48s ease-in-out infinite;
}
.action-girl-stage[data-action="klappe"] .ag-forearm-left {
  transform: rotate(-108deg);
}
.action-girl-stage[data-action="klappe"] .ag-arm-right {
  animation: agClapArmR 0.48s ease-in-out infinite;
}
.action-girl-stage[data-action="klappe"] .ag-forearm-right {
  transform: rotate(108deg);
}
.action-girl-stage[data-action="klappe"] .ag-body-bounce {
  animation: agClapBounce 0.48s ease-in-out infinite;
}

@keyframes agClapArmL {
  0%, 100% { transform: rotate(6deg); }
  50% { transform: rotate(-22deg); }
}
@keyframes agClapArmR {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(22deg); }
}
@keyframes agClapSparkle {
  0%, 35%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes agClapBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 6. AT DANSE */
.action-girl-stage[data-action="danse"] .ag-prop-music { display: block; }
.action-girl-stage[data-action="danse"] .music-note-1,
.action-girl-stage[data-action="danse"] .music-note-2 {
  transform-box: view-box;
  transform-origin: 160px 90px;
  animation: agMusicFloat 0.9s ease-in-out infinite alternate;
}
.action-girl-stage[data-action="danse"] .ag-body-bounce {
  animation: agDanceBody 0.85s ease-in-out infinite;
}
.action-girl-stage[data-action="danse"] .ag-arm-left {
  animation: agDanceArmL 0.85s ease-in-out infinite;
}
.action-girl-stage[data-action="danse"] .ag-arm-right {
  animation: agDanceArmR 0.85s ease-in-out infinite;
}
.action-girl-stage[data-action="danse"] .ag-leg-left {
  animation: agDanceLegL 0.85s ease-in-out infinite;
}
.action-girl-stage[data-action="danse"] .ag-leg-right {
  animation: agDanceLegR 0.85s ease-in-out infinite;
}
.action-girl-stage[data-action="danse"] .ag-ponytail {
  animation: agDancePonytail 0.85s ease-in-out infinite;
}

@keyframes agDanceBody {
  0%, 100% { transform: translateX(-10px) translateY(-4px) rotate(-6deg); }
  25%, 75% { transform: translateX(0px) translateY(6px) rotate(0deg); }
  50% { transform: translateX(10px) translateY(-4px) rotate(6deg); }
}
@keyframes agDanceArmL {
  0%, 100% { transform: rotate(95deg); }
  50% { transform: rotate(25deg); }
}
@keyframes agDanceArmR {
  0%, 100% { transform: rotate(-25deg); }
  50% { transform: rotate(-95deg); }
}
@keyframes agDanceLegL {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(-8deg); }
}
@keyframes agDanceLegR {
  0%, 100% { transform: rotate(8deg); }
  50% { transform: rotate(-18deg); }
}
@keyframes agDancePonytail {
  0%, 100% { transform: rotate(-12deg); }
  50% { transform: rotate(26deg); }
}
@keyframes agMusicFloat {
  0% { transform: translateY(4px); }
  100% { transform: translateY(-8px); }
}

/* 7. AT SIDDE */
.action-girl-stage[data-action="sidde"] .ag-prop-chair { display: block; }
.action-girl-stage[data-action="sidde"] .ag-body-bounce {
  animation: agSitDown 2.2s ease-in-out infinite;
}
.action-girl-stage[data-action="sidde"] .ag-leg-left {
  animation: agSitLegL 2.2s ease-in-out infinite;
}
.action-girl-stage[data-action="sidde"] .ag-calf-left {
  animation: agSitCalfL 2.2s ease-in-out infinite;
}
.action-girl-stage[data-action="sidde"] .ag-leg-right {
  animation: agSitLegR 2.2s ease-in-out infinite;
}
.action-girl-stage[data-action="sidde"] .ag-calf-right {
  animation: agSitCalfR 2.2s ease-in-out infinite;
}
.action-girl-stage[data-action="sidde"] .ag-arm-left {
  animation: agSitArmL 2.2s ease-in-out infinite;
}
.action-girl-stage[data-action="sidde"] .ag-arm-right {
  animation: agSitArmR 2.2s ease-in-out infinite;
}

@keyframes agSitDown {
  0%, 100% { transform: translateY(0px); }
  25%, 80% { transform: translateY(34px); }
}
@keyframes agSitLegL {
  0%, 100% { transform: rotate(0deg); }
  25%, 80% { transform: rotate(-58deg); }
}
@keyframes agSitCalfL {
  0%, 100% { transform: rotate(0deg); }
  25%, 80% { transform: rotate(58deg); }
}
@keyframes agSitLegR {
  0%, 100% { transform: rotate(0deg); }
  25%, 80% { transform: rotate(-48deg); }
}
@keyframes agSitCalfR {
  0%, 100% { transform: rotate(0deg); }
  25%, 80% { transform: rotate(48deg); }
}
@keyframes agSitArmL {
  0%, 100% { transform: rotate(0deg); }
  25%, 80% { transform: rotate(-20deg); }
}
@keyframes agSitArmR {
  0%, 100% { transform: rotate(0deg); }
  25%, 80% { transform: rotate(20deg); }
}

/* 8. AT SOVE (Pigen lægger sig vandret ned på sengen med hovedet på puden) */
.action-girl-stage[data-action="sove"] .ag-prop-bed { display: block; }
.action-girl-stage[data-action="sove"] .ag-ground-shadow {
  transform: scaleX(1.7) scaleY(0.8);
}
.action-girl-stage[data-action="sove"] .ag-character {
  transform-origin: 160px 195px;
  transform: translate(12px, 14px) rotate(-90deg) scale(0.86);
  animation: none;
}
.action-girl-stage[data-action="sove"] .ag-body-bounce {
  animation: none;
}
.action-girl-stage[data-action="sove"] .ag-eyes-open { display: none; }
.action-girl-stage[data-action="sove"] .ag-eyes-sleep { display: block; }
.action-girl-stage[data-action="sove"] .ag-mouth-smile { display: none; }
.action-girl-stage[data-action="sove"] .ag-mouth-round {
  display: block;
  animation: agSleepBreathMouth 2.6s ease-in-out infinite;
}
.action-girl-stage[data-action="sove"] .ag-prop-zzz { display: block; }
.action-girl-stage[data-action="sove"] .zzz-1,
.action-girl-stage[data-action="sove"] .zzz-2,
.action-girl-stage[data-action="sove"] .zzz-3 {
  animation: agZzzFloat 2.2s ease-in-out infinite;
}
.action-girl-stage[data-action="sove"] .ag-ponytail {
  transform: rotate(35deg);
}
.action-girl-stage[data-action="sove"] .ag-arm-left {
  transform: rotate(-32deg);
}
.action-girl-stage[data-action="sove"] .ag-forearm-left {
  transform: rotate(-95deg);
}
.action-girl-stage[data-action="sove"] .ag-arm-right {
  transform: rotate(28deg);
}
.action-girl-stage[data-action="sove"] .ag-forearm-right {
  transform: rotate(95deg);
}

@keyframes agSleepBreathMouth {
  0%, 100% { transform: scale(0.75); }
  50% { transform: scale(1.1); }
}
@keyframes agZzzFloat {
  0% { opacity: 0.25; transform: translateY(6px); }
  50% { opacity: 1; transform: translateY(-6px); }
  100% { opacity: 0.25; transform: translateY(6px); }
}

/* 9. AT SPISE (Fører æblet helt op til munden) */
.action-girl-stage[data-action="spise"] .ag-prop-apple { display: block; }
.action-girl-stage[data-action="spise"] .ag-arm-right {
  animation: agEatArmR 1.35s ease-in-out infinite;
}
.action-girl-stage[data-action="spise"] .ag-forearm-right {
  animation: agEatForearmR 1.35s ease-in-out infinite;
}
.action-girl-stage[data-action="spise"] .ag-mouth-smile { display: none; }
.action-girl-stage[data-action="spise"] .ag-mouth-round {
  display: block;
  animation: agEatChew 0.45s ease-in-out infinite;
}
.action-girl-stage[data-action="spise"] .ag-head-group {
  animation: agEatHead 1.35s ease-in-out infinite;
}

@keyframes agEatArmR {
  0%, 100% { transform: rotate(-45deg); }
  35%, 78% { transform: rotate(-115deg); }
}
@keyframes agEatForearmR {
  0%, 100% { transform: rotate(-75deg); }
  35%, 78% { transform: rotate(-125deg); }
}
@keyframes agEatChew {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1.3); }
}
@keyframes agEatHead {
  0%, 100% { transform: rotate(0deg) translateY(0px); }
  35%, 78% { transform: rotate(4deg) translateY(2px); }
}

/* 10. AT DRIKKE (Holder vandglasset naturligt og fører det op til munden) */
.action-girl-stage[data-action="drikke"] .ag-prop-cup { display: block; }
.action-girl-stage[data-action="drikke"] .ag-arm-right {
  animation: agDrinkArmR 1.5s ease-in-out infinite;
}
.action-girl-stage[data-action="drikke"] .ag-forearm-right {
  animation: agDrinkForearmR 1.5s ease-in-out infinite;
}
.action-girl-stage[data-action="drikke"] .ag-head-group {
  animation: agDrinkHead 1.5s ease-in-out infinite;
}
.action-girl-stage[data-action="drikke"] .ag-mouth-smile { display: none; }
.action-girl-stage[data-action="drikke"] .ag-mouth-round { display: block; }

@keyframes agDrinkArmR {
  0%, 100% { transform: translate(-14px, 4px) rotate(-48deg); }
  35%, 78% { transform: translate(-14px, 4px) rotate(-65deg); }
}
@keyframes agDrinkForearmR {
  0%, 100% { transform: rotate(-144deg); }
  35%, 78% { transform: rotate(-145deg); }
}
@keyframes agDrinkHead {
  0%, 100% { transform: rotate(0deg); }
  35%, 78% { transform: rotate(-4deg) translateY(1px); }
}

/* 11. AT LÆSE (Holder bogen op foran sig med hænderne på hver sin sidekant og kigger ned i bogen) */
.action-girl-stage[data-action="laese"] .ag-prop-book,
.action-girl-stage[data-action="laese"] .ag-prop-eyelids {
  display: block;
}
.action-girl-stage[data-action="laese"] .ag-arm-left {
  transform: rotate(22deg);
}
.action-girl-stage[data-action="laese"] .ag-forearm-left {
  transform: rotate(-112deg);
}
.action-girl-stage[data-action="laese"] .ag-arm-right {
  transform: rotate(-22deg);
}
.action-girl-stage[data-action="laese"] .ag-forearm-right {
  transform: rotate(112deg);
}
.action-girl-stage[data-action="laese"] .ag-head-group {
  animation: agReadHead 2.2s ease-in-out infinite;
}
.action-girl-stage[data-action="laese"] .ag-pupils {
  transform-box: view-box;
  animation: agReadEyes 2.2s ease-in-out infinite;
}

@keyframes agReadHead {
  0%, 100% { transform: translateY(3px) rotate(-2deg); }
  50% { transform: translateY(3px) rotate(2deg); }
}
@keyframes agReadEyes {
  0%, 100% { transform: translate(-2px, 3px); }
  50% { transform: translate(2px, 3px); }
}

/* 12. AT KASTE (Albuen holdes roligt ude til siden, mens underarmen og hånden kaster bolden fremad) */
.action-girl-stage[data-action="kaste"] .ag-prop-ball-hand {
  display: block;
  animation: agThrowBallInHand 1.45s ease-in-out infinite;
}
.action-girl-stage[data-action="kaste"] .ag-prop-ball { display: block; }
.action-girl-stage[data-action="kaste"] .thrown-ball {
  transform-box: view-box;
  transform-origin: 263px 122px;
  animation: agThrowBallArc 1.45s linear infinite;
}
.action-girl-stage[data-action="kaste"] .ag-arm-right {
  animation: agThrowArmR 1.45s ease-in-out infinite;
}
.action-girl-stage[data-action="kaste"] .ag-forearm-right {
  animation: agThrowForearmR 1.45s ease-in-out infinite;
}
.action-girl-stage[data-action="kaste"] .ag-arm-left {
  animation: agThrowArmL 1.45s ease-in-out infinite;
}
.action-girl-stage[data-action="kaste"] .ag-ponytail {
  animation: agThrowPonytail 1.45s ease-in-out infinite;
}

@keyframes agThrowArmR {
  0%, 100% { transform: rotate(-48deg); }
  24% { transform: rotate(-56deg); }
  44% { transform: rotate(-60deg); }
  65% { transform: rotate(-52deg); }
}
@keyframes agThrowForearmR {
  0%, 100% { transform: rotate(-82deg); }
  24% { transform: rotate(-104deg); }
  44% { transform: rotate(-12deg); }
  65% { transform: rotate(8deg); }
}
@keyframes agThrowArmL {
  0%, 100% { transform: rotate(10deg); }
  24% { transform: rotate(18deg); }
  44% { transform: rotate(-6deg); }
}
@keyframes agThrowPonytail {
  0%, 100% { transform: rotate(0deg); }
  24% { transform: rotate(-6deg); }
  48% { transform: rotate(14deg); }
}
@keyframes agThrowBallInHand {
  0%, 43.9% { opacity: 1; }
  44%, 100% { opacity: 0; }
}
@keyframes agThrowBallArc {
  0%, 43.9% { transform: translate(0, 0) scale(1); opacity: 0; }
  44% { transform: translate(0, 0) scale(1); opacity: 1; }
  60% { transform: translate(24px, -18px) scale(0.96); opacity: 1; }
  76% { transform: translate(44px, -2px) scale(0.92); opacity: 1; }
  92% { transform: translate(56px, 34px) scale(0.86); opacity: 0; }
  100% { transform: translate(56px, 34px) scale(0.86); opacity: 0; }
}

@media (max-width: 960px) {
  .vocab-mode-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
  .vocab-mode-tabs.is-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  .action-words-arena {
    grid-template-columns: 1fr;
  }
  .action-center-stage {
    order: -1;
  }
  .action-words-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}
