/* auto-cleaned: duplicate merges + unused selector pruning (conservative) */
:root {
  --ebx: #01689B;
  --ebx-d: #014f73;
  --ring: #cbd5e1;
  --ink: #0f172a;
  --ok: #16a34a;
  --nok: #dc2626;
  --ebx-dark: #014b73;
  --bg-soft: #f0f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  color: #0f172a;
  background: #f6f8fb;
  background-image: url('achtergrond.png'), linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  transform: none !important;
  perspective: none !important;
  overflow: visible !important;
}

#versionTopGlobal {
  width: 100%;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  margin: 10px 0 0;
}

.page {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.active {
  display: flex;
}

.card {
  background: #fff;
  border: 3px solid var(--ebx);
  border-radius: 16px;
  padding: 22px 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  max-width: 700px;
  width: clamp(360px, 84vw, 690px);
  position: relative;
}

.card.zin-card {
  max-width: 840px !important;
  width: clamp(340px, 90vw, 840px);
}

h1 {
  font-size: 26px;
  margin: 0 0 10px 0;
  text-align: center;
}

.champion-title {
  font-size: 44px;
  color: var(--ebx);
  margin: 6px 0 10px 0;
  text-align: center;
}

#woord {
  font-size: clamp(64px, 14vw, 132px);
  font-weight: 800;
  margin: 10px 0 4px 0;
  line-height: 1.05;
  letter-spacing: 1px;
  text-align: center;
}

.subline {
  color: #475569;
  margin-bottom: 6px;
  text-align: center;
}

.btn {
  font-size: 14px;
  margin: 8px;
  padding: 8px 18px;
  border-radius: 8px;
  background-color: var(--ebx);
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color .15s ease;
  user-select: none;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .18);
  background: var(--ebx);
  font-weight: bold;
}

.btn:hover {
  background-color: var(--ebx-d);
  background: var(--ebx-d);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .18);
}

.btn-antwoord {
  font-weight: 900;
  font-size: clamp(18px, 2.4vw, 28px);
  padding: 10px 18px;
  border-radius: 12px;
  min-width: min(36vw, 240px);
  min-height: 56px;
}

.answers {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  justify-items: center;
  margin-top: 6px;
  padding-inline: 22px;
}

input[type=number] {
  font-size: 18px;
  height: 40px;
  padding: 6px 10px;
  text-align: center;
  width: 96px;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
}

.groepen {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  grid-template-columns: 1fr;
}

fieldset.optiegroep {
  border: 2px solid var(--ring);
  border-radius: 12px;
  padding: 10px 12px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
}

fieldset.optiegroep legend {
  padding: 0 6px;
  font-weight: 700;
  font-size: 15px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  flex-wrap: wrap;
}

.inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro {
  max-width: 760px;
  margin: 0 auto 8px;
  text-align: center;
  line-height: 1.5;
  font-size: 15px;
}

.intro p {
  margin: 6px 0;
}

.chip {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  min-width: 70px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.klinker-groepen {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.klinker-col {
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
  padding: 8px;
}

.klinker-col h4 {
  margin: 0;
  font-size: 14px;
  color: #334155;
}

.klinker-col .pair {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0;
}

.iconrow {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.iconbtn {
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
  font-size: 16px;
}

.iconbtn:hover {
  background: #e2e8f0;
}

.quit {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

.quit:hover {
  background: #b91c1c;
}

#toast.show {
  opacity: 1;
}

.result-hero {
  position: relative;
  border: 0;
  padding: 26px 20px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 18%, #fdf2f8 55%, #fef3c7 100%);
  overflow: hidden;
}

.result-hero .shine {
  position: absolute;
  inset: -2px;
  background: radial-gradient(600px 200px at var(--mx, 50%) -10%, rgba(255, 255, 255, .45), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.trophy {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .12);
  margin: 0 auto 8px;
  animation: bob 2.2s ease-in-out infinite;
}

.trophy span {
  font-size: 48px;
}

.cele-title {
  text-align: center;
  font-size: 28px;
  margin: 6px 0 8px;
  color: #0f172a;
}

.cele-msg {
  text-align: center;
  font-size: 22px;
  margin: 2px 0 8px;
}

.pill-wrap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.pill {
  border-radius: 999px;
  padding: 10px 16px;
  background: #0ea5e9;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(14, 165, 233, .35);
  font-size: 18px;
}

.pill.secondary {
  background: #22c55e;
  box-shadow: 0 10px 30px rgba(34, 197, 94, .35);
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: none;
  z-index: 45;
}

#fireworks-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: none;
  z-index: 46;
}

#tapFeedback {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 80;
}

#tapFeedback.show {
  opacity: 1;
}

#tapFeedback .badge {
  font-weight: 900;
  font-size: clamp(64px, 10vw, 96px);
  padding: 16px 28px;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
}

#fieldset-modus {
  max-width: 720px;
  margin-inline: auto;
}

#fieldset-modus .form-row {
  display: grid;
  grid-template-columns: auto 96px;
  align-items: center;
  gap: 4px;
  margin: 6px 0;
  justify-items: start;
}

#fieldset-modus .form-row label.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  justify-self: start;
}

#fieldset-modus .form-row input[type=number] {
  width: 96px;
  min-width: 0;
  justify-self: start;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  vertical-align: middle;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #e5e7eb;
  transition: 0.25s;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12);
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.switch input:checked+.slider {
  background: var(--ebx);
}

.switch input:checked+.slider:before {
  transform: translateX(30px);
}

.flits-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

#versionTopGlobal span#changelogLink {
  text-decoration: underline;
  cursor: pointer;
  color: #01689B;
}

#flitsSeconden:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #cbd5e1;
}

#fieldset-extra {
  text-align: left;
}

#fieldset-extra .row.extra-row {
  align-items: flex-start;
}

#fieldset-extra .flits-label {
  justify-content: flex-start;
}

#fieldset-extra .secs-group {
  justify-content: flex-start;
}

#fieldset-klinkers {
  max-width: 980px;
  margin: 0 auto;
}

.klinker-col.fullrow {
  grid-column: 1 / -1;
}

.klinker-col.fullrow .pair {
  flex-wrap: wrap;
}

#versionTopGlobal span#feedbackLink {
  text-decoration: underline;
  cursor: pointer;
  color: #01689B;
}

#feedbackTip.show {
  opacity: 1;
}

#Schuifje boven kader .klinker-col {
  position: relative;
  padding-top: 6px;
}

.klinker-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.klinker-toggle {
  margin-left: auto;
}

#Sliders-uitlijning .switch {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  vertical-align: middle;
}

#woord.zin-woord {
  color: #000;
  font-size: clamp(36px, 7vw, 80px);
  line-height: 1.3;
}

#page2 #woord.zin-woord {
  color: #000 !important;
}

.btn.secondary {
  background-color: #475569;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .18);
}

.btn.secondary:hover {
  background-color: #334155;
}

#page3 .reset-top-left {
  position: absolute;
  top: 10px;
  left: 10px;
}

#btnReset {
  display: none;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  color: #01689B !important;
  transition: transform 0.15s ease-in-out;
}

.icon-only {
  background: none;
  border: none;
  color: #01689B;
  border-radius: 12px;
  padding: 6px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.2s;
  box-shadow: none;
  justify-content: center;
}

.icon-only:hover {
  background: var(--ebx);
  color: #fff;
  background-color: white;
  opacity: 0.75;
}

#versionTopGlobal span#resultatenLink {
  text-decoration: underline;
  cursor: pointer;
  color: #01689B;
}

.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.confirm-box {
  background: #fff;
  border: 2px solid #01689B;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 20px;
  max-width: 300px;
  text-align: center;
}

.confirm-box p {
  font-size: 15px;
  color: #333;
  margin-bottom: 20px;
}

.confirm-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.confirm-buttons button {
  background: #01689B;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  margin: 8px;
}

.confirm-buttons button:hover {
  background: #014d73;
}

#btnAgain {
  position: relative;
  background-color: #01689B;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
  transition: all 0.2s ease-in-out;
  text-transform: none;
  overflow: visible;
}

#btnAgain:hover {
  background-color: #0284c7;
  transform: scale(1.03);
}

#btnAgain::after {
  content: '🐝';
  position: absolute;
  top: 6px;
  left: calc(100% + 6px);
  font-size: 20px;
  opacity: 0;
  animation: bijtjeVliegtAan 1.8s ease-out forwards, bijtjeZoemtRechts 3s ease-in-out 1.8s infinite;
}

#btnReset:hover {
  color: #01689B !important;
  transform: scale(1.1);
  background: transparent !important;
  box-shadow: none !important;
}

#btnReset::after {
  content: none !important;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #01689B;
  color: #fff;
  font-size: 13px;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
  display: none !important;
}

#btnReset::before {
  content: none !important;
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-color: #01689B transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  display: none !important;
}

#btnReset:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

#btnReset:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

#btnReset:hover svg {
  stroke: currentColor !important;
  transform: scale(1.08);
  transition: all 0.2s ease;
}

.icon-only[data-tooltip] {
  position: relative;
}

.icon-only[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #01689B;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.icon-only[data-tooltip]:hover::after {
  opacity: 1;
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #016;
}

.icon-only svg {
  pointer-events: none;
  transition: transform .15s ease;
}

.icon-only:hover svg {
  transform: scale(1.1);
}

.icon-only:active {
  transform: translateY(2px);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  border-radius: 10px;
  border: 2px solid #01689B;
  padding: 20px 25px;
  width: 320px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  font-size: 15px;
}

.modal-buttons {
  margin-top: 18px;
  display: flex;
  justify-content: space-around;
}

.ebx-btn {
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

.ebx-btn-primary {
  background: #01689B;
  color: white;
}

.ebx-btn-primary:hover {
  background: #015b89;
}

.ebx-btn-secondary {
  background: #f2f2f2;
  color: #333;
}

.ebx-btn-secondary:hover {
  background: #e0e0e0;
}

.anker-tabel {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 15px;
}

.anker-tabel th {
  text-align: center;
  color: #0369a1;
  font-weight: 600;
  border-bottom: 2px solid #cbd5e1;
  padding-bottom: 6px;
}

.anker-tabel td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.toggle-segment {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
}

.toggle-segment input {
  display: none;
}

.toggle-segment label {
  padding: 5px 7px;
  font-size: 12px;
  cursor: pointer;
  background-color: #f8fafc;
  color: var(--ebx);
  border-right: 1px solid #cbd5e1;
  transition: background-color 0.2s, color 0.2s;
  user-select: none;
}

.toggle-segment label:last-child {
  border-right: none;
}

.toggle-segment input:checked+label {
  background-color: var(--ebx);
  color: white;
}

.toggle-segment label:hover {
  background-color: #e2e8f0;
}

.anker-tabel input[type="radio"][name="anker"] {
  accent-color: var(--ebx);
  transform: scale(1.1);
  margin-right: 6px;
  cursor: pointer;
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: auto;
}

.tip {
  font-size: 14px;
  color: #64748b;
  margin-top: 8px;
}

.anker-tabel th:first-child {
  text-align: left;
  padding-left: 10px;
  width: 45%;
}

.anker-tabel th:last-child {
  text-align: left;
  padding-left: 62px;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
}

.popup-card {
  background: #fff;
  border-radius: 16px;
  border: 3px solid var(--ebx);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  width: clamp(320px, 80vw, 640px);
  padding: 20px;
  animation: fadeInPopup 0.2s ease-out forwards;
  max-height: 80vh;
  overflow-y: auto;
  text-align: left;
  position: fixed !important;
  margin: 0 auto;
}

#mijnHerkansjesLink {
  text-decoration: underline;
  cursor: pointer;
  color: #01689B;
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid var(--ebx);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  max-width: 480px;
  width: 100vw;
  text-align: center;
  height: 100vh;
  align-items: center;
  justify-content: center;
}

.popup-content h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--ebx);
}

.btnReset {
  background-color: white;
  color: var(--ebx);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btnReset:hover {
  background-color: var(--ebx);
  color: white;
}

.popup-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  width: 92%;
  max-width: 800px;
  max-height: 80vh;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  animation: popupFade 0.18s ease-out;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

.popup-title {
  margin: 0 0 12px 0;
  font-size: 1.3em;
  font-weight: 600;
  color: #0f172a;
}

.popup-scroll {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
}

.popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

.popup-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  background-color: var(--ebx, #01689B);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.popup-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.popup-table tr:nth-child(even) td {
  background-color: #f8fafc;
}

.popup-table tr:hover td {
  background-color: #e0f2fe;
}

.popup-buttons {
  margin-top: 16px;
  text-align: right;
}

.btnPopup {
  background-color: var(--ebx, #01689B);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.95em;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btnPopup:hover {
  background-color: #025b87;
}

html {
  transform: none !important;
  perspective: none !important;
  overflow: visible !important;
}

#zinnetjesPopup {
  position: fixed !important;
  transform: none !important;
  left: 50% !important;
  top: 50% !important;
  translate: -50% -50% !important;
}

#zinnetjesPopup .popup-content {
  position: fixed !important;
  transform: none !important;
  left: 50% !important;
  top: 50% !important;
  translate: -50% -50% !important;
}

#functiewoordjesPopup {
  position: fixed;
  transform: none;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
}

#functiewoordjesPopup .popup-content {
  position: fixed;
  transform: none;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
}

.form-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.popup-feedback .form-row label {
  flex: 0 0 80px;
  font-weight: bold;
  text-align: right;
  margin-top: 4px;
}

.form-row input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  resize: vertical;
}

.form-row textarea {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  resize: vertical;
  min-height: 15em;
}

.popup-card h3 {
  margin-top: 0;
  color: var(--ebx);
  text-align: center;
}

.popup-content .chip {
  margin: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.popup-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  opacity: 0.9;
  z-index: 200;
  /* 🔥 hoger dan titel */
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.popup-close:hover {
  font-weight: bold;
}

#woordenPopup {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#woordenPopup .popup-card {
  background: #fff;
  border: 3px solid var(--ebx);
  border-radius: 16px;
  padding: 20px;
  width: clamp(320px, 80vw, 640px);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-align: left;
  position: relative;
}

#woordenPopup .card {
  width: clamp(280px, 55vw, 480px);
  padding: 14px 16px;
  border-radius: 12px;
}

.woordenTabel {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  margin-top: 6px;
  table-layout: fixed;
}

.woordenTabel td {
  padding: 3px 6px;
  vertical-align: top;
  width: 33%;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.woordenTabel td:last-child {
  border-right: none;
}

.woordenTabel tr:last-child td {
  border-bottom: none;
}

.woordenTabel td span {
  display: inline-block;
  margin: 1px 0;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.9rem;
  background: rgba(1, 104, 155, 0.08);
  transition: background 0.25s ease, transform 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.woordenTabel td span:hover {
  background: rgba(1, 104, 155, 0.35);
  transform: scale(1.05);
  cursor: pointer;
}

tr[data-anker] .modusBtn.active {
  font-size: 0.85rem;
  padding: 4px 10px;
}

tr[data-anker] button.modusBtn.active {
  font-size: 0.85rem;
  padding: 4px 10px;
}

#confirmOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, .45);
  pointer-events: auto;
}

#functiewoordjesPopup .popup-content.popup-functiewoordjes {
  position: relative !important;
  left: 50 !important;
  top: auto !important;
  inset: auto !important;
  transform: none !important;
  translate: none !important;
  display: grid !important;
  grid-template-rows: auto 1fr auto !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: min(100%, 100%) !important;
  max-height: 85vh !important;
  padding: 16px 18px !important;
  box-sizing: border-box !important;
}

#zinnetjesPopup .popup-content.popup-zinnetjes {
  position: relative !important;
  left: 50 !important;
  top: auto !important;
  inset: auto !important;
  transform: none !important;
  translate: none !important;
  display: grid !important;
  grid-template-rows: auto 1fr auto !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: min(100%, 100%) !important;
  max-height: 85vh !important;
  padding: 16px 18px !important;
  box-sizing: border-box !important;
}

#functiewoordjesPopup .popup-content.popup-functiewoordjes * {
  float: none !important;
  position: static !important;
  max-width: 100% !important;
}

#zinnetjesPopup .popup-content.popup-zinnetjes * {
  float: none !important;
  position: static !important;
  max-width: 100% !important;
}

#functiewoordjesPopup .popup-title {
  grid-row: 1 !important;
  margin: 0 0 8px 0 !important;
  color: var(--ebx);
}

#zinnetjesPopup .popup-title {
  grid-row: 1 !important;
  margin: 0 0 8px 0 !important;
  color: var(--ebx);
}

#functiewoordjesPopup .popup-scroll {
  grid-row: 2 !important;
  overflow: auto !important;
  min-height: 0 !important;
  -webkit-overflow-scrolling: touch;
}

#zinnetjesPopup .popup-scroll {
  grid-row: 2 !important;
  overflow: auto !important;
  min-height: 0 !important;
  -webkit-overflow-scrolling: touch;
}

#functiewoordjesPopup .popup-table {
  width: 100% !important;
  table-layout: fixed;
  border-collapse: collapse !important;
}

#zinnetjesPopup .popup-table {
  width: 100% !important;
  table-layout: fixed;
  border-collapse: collapse !important;
}

#functiewoordjesPopup .popup-buttons {
  grid-row: 3 !important;
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 4px !important;
}

#zinnetjesPopup .popup-buttons {
  grid-row: 3 !important;
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 4px !important;
}

#functiewoordjesPopup .popup-table thead th {
  position: sticky !important;
  top: 0 !important;
  background: #01689B !important;
  color: #fff !important;
  z-index: 1 !important;
}

#zinnetjesPopup .popup-table thead th {
  position: sticky !important;
  top: 0 !important;
  background: #01689B !important;
  color: #fff !important;
  z-index: 1 !important;
}

#functiewoordjesPopup .popup-table th:first-child {
  width: 44px;
  min-width: 36px;
  max-width: 56px;
  text-align: center;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 8px;
}

#functiewoordjesPopup .popup-table td:first-child {
  width: 44px;
  min-width: 36px;
  max-width: 56px;
  text-align: center;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 8px;
}

#zinnetjesPopup .popup-table th:first-child {
  width: 44px;
  min-width: 36px;
  max-width: 56px;
  text-align: center;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 8px;
}

#zinnetjesPopup .popup-table td:first-child {
  width: 44px;
  min-width: 36px;
  max-width: 56px;
  text-align: center;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 8px;
}

#functiewoordjesPopup .popup-table th:nth-child(2) {
  width: auto;
}

#functiewoordjesPopup .popup-table td:nth-child(2) {
  width: auto;
}

#zinnetjesPopup .popup-table th:nth-child(2) {
  width: auto;
}

#zinnetjesPopup .popup-table td:nth-child(2) {
  width: auto;
}

.anker-tabel td.anker-naam {
  cursor: pointer;
  position: relative;
  transition: background 120ms ease, color 120ms ease;
  border-radius: 8px;
}

.anker-tabel tbody tr:hover td {
  background: #f2f8fc;
}

.anker-tabel tbody tr:hover td.anker-naam {
  background: #eaf4fb;
}

.anker-tabel td.anker-naam:hover {
  color: #01689B;
  text-decoration-thickness: 2px;
}

.anker-tabel td.anker-naam:hover * {
  color: #01689B;
  text-decoration-thickness: 2px;
}

.anker-tabel td.anker-naam:focus {
  outline: 2px solid #01689B;
  outline-offset: 2px;
}

.anker-tabel td.anker-naam:focus-visible {
  outline: 2px solid #01689B;
  outline-offset: 2px;
}

.anker-tabel td.anker-naam:active {
  background: #e2f0f8;
}

.anker-tabel td.anker-naam::after {
  content: '›';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) translateX(-2px);
  opacity: 0;
  transition: opacity 120ms, transform 120ms;
  color: #01689B;
  pointer-events: none;
  font-weight: 600;
}

.anker-tabel td.anker-naam:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.tooltip-bubble {
  position: absolute;
  background: #01689B;
  color: #fff;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
}

.tooltip-bubble.show {
  opacity: 1;
}

.btnResultGrafiek {
  background: none;
  border: none;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #01689B;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btnResultGrafiek:hover {
  background-color: rgba(1, 104, 155, 0.08);
  transform: scale(1.05);
}

.tooltip-floating {
  position: absolute;
  background: #01689B;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  font-size: 13px;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  animation: fadeInTooltip 0.15s ease forwards;
}

.tooltip-floating::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #01689B transparent transparent transparent;
}

#woordenPopup .turf {
  color: #999;
  float: right;
  opacity: 0.6;
  font-size: 12px;
  font-weight: normal;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

#woordenPopup .woord {
  display: inline-block;
  font-size: 15px;
  color: #111;
}

.aantal-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #0f172a;
}

.aantal-toggle .toggle-label {
  font-weight: 500;
}

.aantal-toggle.onderaan {
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  margin-top: 5px;
  padding: 12px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.switch input:checked+.slider {
  background: var(--ebx);
}

.switch input:checked+.slider:before {
  transform: translateX(22px);
}

.intro p:first-of-type {
  margin-bottom: 1.0em;
}

@media (min-width:720px) {
  .answers {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

}

@keyframes bob {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }

}

@media (min-width: 720px) {
  .klinker-groepen {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .klinker-groepen .klinker-col:nth-child(odd) {
    flex: 1.6;
  }

  .klinker-groepen .klinker-col:nth-child(even) {
    flex: 1;
  }

  .klinker-groepen .klinker-col {
    flex: 1;
    min-width: 200px;
  }

}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}

@keyframes bijtjeVliegtAan {
  0% {
    transform: translateX(90px) rotate(0deg);
    opacity: 0;
  }

  40% {
    opacity: 1;
  }

  90% {
    transform: translateX(-4px) rotate(10deg);
  }

  100% {
    transform: translateX(0px) rotate(0deg);
    opacity: 1;
  }

}

@keyframes bijtjeZoemtRechts {
  0% {
    transform: translate(0px, 0px) rotate(0deg);
  }

  25% {
    transform: translate(2px, -2px) rotate(8deg);
  }

  50% {
    transform: translate(-1px, 1px) rotate(-8deg);
  }

  75% {
    transform: translate(1px, -1px) rotate(5deg);
  }

  100% {
    transform: translate(0px, 0px) rotate(0deg);
  }

}

@keyframes popupIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }

}

@keyframes fadeInPopup {
  from {
    opacity: 0;
    transform: translate(-50%, -48%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

}

@keyframes popupFade {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }

}

@media (max-width: 700px) {
  #woordenPopup .card {
    width: 90vw;
  }

  .woordenTabel td {
    width: 50%;
  }

}

@media (max-width: 600px) {
  #functiewoordjesPopup .popup-table th:first-child {
    width: 36px;
    min-width: 32px;
    padding-left: 6px;
    padding-right: 6px;
  }

  #functiewoordjesPopup .popup-table td:first-child {
    width: 36px;
    min-width: 32px;
    padding-left: 6px;
    padding-right: 6px;
  }

  #zinnetjesPopup .popup-table th:first-child {
    width: 36px;
    min-width: 32px;
    padding-left: 6px;
    padding-right: 6px;
  }

  #zinnetjesPopup .popup-table td:first-child {
    width: 36px;
    min-width: 32px;
    padding-left: 6px;
    padding-right: 6px;
  }

}

@keyframes fadeInTooltip {
  from {
    opacity: 0;
    transform: translateY(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

/* === FORCE TOP OVERLAYS (veilig zonder layout kapot te maken) === */
#testPopup,
#confirmOverlay {
  position: fixed !important;
  z-index: 2147483647 !important;
  /* hoogste stacking */
  isolation: isolate !important;
}

#testPopup .popup-content,
#confirmOverlay .confirmBox {
  position: relative !important;
  z-index: 2147483646 !important;
}

/* Begin hover over de ankers sectie  */
.anker-tabel td.anker-naam {
  position: relative;
  cursor: pointer;
  user-select: none;
  background-color: #fff;
  border-left: 3px solid transparent;
  border-radius: 0 !important;
  transform: translateZ(0);
  will-change: background-color, border-left-color;
  transition:
    background-color 0.3s ease-out,
    border-left-color 0.3s ease-out;
}

/* Hover */
.anker-tabel td.anker-naam:hover {
  background-color: #f0f7ff;
  border-left-color: #01689B;
}

/* › Bekijk hint */
.anker-tabel td.anker-naam::after {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  font-size: 0.85rem;
  color: #01689B;
  opacity: 0;
  pointer-events: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition:
    opacity 0.3s ease-out 0.05s,
    transform 0.3s ease-out 0.05s,
    color 0.3s ease-out;
}

/* 📱 Mobiel: toon dun EBX-blauw vergrootglas bij hover/focus (niet bij 'Anker Start') */
/* === Vergrootglas bij hover/focus === */
.anker-tabel td.anker-naam::after {
  content: '';
}

/* 📱 Mobiel (tot 640px) */
@media (max-width: 640px) {

  .anker-tabel td.anker-naam:not(.no-icon):hover::after,
  .anker-tabel td.anker-naam:not(.no-icon):focus::after {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="%2301689B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>');
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
}

/* 💻 Desktop (>640px) */
@media (min-width: 641px) {

  .anker-tabel td.anker-naam:not(.no-icon):hover::after,
  .anker-tabel td.anker-naam:not(.no-icon):focus::after {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="%2301689B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>');
    position: absolute;
    right: 6px;
    /* iets dichter bij tekst */
    top: 52%;
    /* iets hoger gecentreerd */
    transform: translateY(-50%);
    opacity: 0.85;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
}

.anker-tabel td.anker-naam:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Focus & Selected */
.anker-tabel td.anker-naam:focus,
.anker-tabel td.anker-naam.selected {
  outline: none;
  background-color: #fffbe6;
  border-left-color: #f0c200;
}

/* Einde hover over de ankers sectie  */

/* ================================
   🎓 Stijl voor oefentype 'Lezen'
   ================================ */

/* Basis tabelstijl */
#fieldset-lezen .anker-tabel {
  width: 100%;
  border-collapse: collapse;
}

/* Eerste kolom: links uitlijnen */
#fieldset-lezen .anker-tabel th:first-child,
#fieldset-lezen .anker-tabel td:first-child {
  width: 85%;
  text-align: left;
  padding: 6px 8px;
}

/* Tweede kolom: 'Actie' gecentreerd */
#fieldset-lezen .anker-tabel th:last-child,
#fieldset-lezen .anker-tabel td:last-child {
  width: 15%;
  text-align: center;
  vertical-align: middle;
  padding: 6px 8px;
}

/* Cel-positionering voor pseudo-elementen (lijn & bolletje) */
#fieldset-lezen .anker-tabel td {
  position: relative;
}

/* Knopstijl voor vergrootglas */
#fieldset-lezen .anker-tabel td:last-child button.btnReset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f5f5f5;
  border: 1px solid #d0d7de;
  color: #01689B;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#fieldset-lezen .anker-tabel td:last-child button.btnReset:hover {
  background: #e0f2fe;
  border-color: #01689B;
}

/* Kolomkop 'Actie' visueel sterker */
#fieldset-lezen .anker-tabel th:last-child {
  font-weight: 600;
  color: #01689B;
}

/* Klikbare rijen */
#fieldset-lezen .anker-tabel tr {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Hovereffect */
#fieldset-lezen .anker-tabel tr:hover {
  background-color: #e6f3fb;
}

/* Geselecteerde rij (blijft blauw) */
#fieldset-lezen .anker-tabel tr.selected {
  background-color: #d1e8ff !important;
  transition: background-color 0.2s ease;
}

/* Blauwe lijn links — geen verschuiving meer */
#fieldset-lezen .anker-tabel tr.selected td:first-child::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: #01689B;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

/* Bolletje links van de tekst */
#fieldset-lezen .anker-tabel td:first-child {
  padding-left: 24px;
}

/* Alleen tonen bij geselecteerde rij */
#fieldset-lezen .anker-tabel tr.selected td:first-child::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background-color: #01689B;
  border-radius: 50%;
  opacity: 0.8;
  box-shadow: 0 0 4px rgba(1, 104, 155, 0.4);
}

/* Verberg radiobuttons */
#fieldset-lezen input[type="radio"] {
  display: none;
}

/* --- Normale blauwe lijn bij selectie --- */
#fieldset-lezen .anker-tabel tr.selected td:first-child::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: #01689B;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  transition: background-color 0.15s ease;
}

/* --- Tijdelijk geel accent tijdens klik (mousedown) --- */
#fieldset-lezen .anker-tabel tr.selected:active td:first-child::after {
  background-color: #f4b400;
  /* EBX-geel */
}

/* --- Baseline: alle rijen zonder lijntje standaard --- */
#fieldset-lezen .anker-tabel tr td:first-child::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  transition: background-color 0.25s ease;
}

/* --- Normaal geselecteerde rij: blauw lijntje --- */
#fieldset-lezen .anker-tabel tr.selected td:first-child::after {
  background-color: #01689B;
}

/* --- Tijdens klikken (mousedown): geel accent met animatie --- */
#fieldset-lezen .anker-tabel tr:active td:first-child::after {
  background-color: #f4b400;
  animation: yellowFlash 0.4s ease-out;
}

/* --- Keyframes voor gele flash --- */
@keyframes yellowFlash {
  0% {
    background-color: #f4b400;
  }

  70% {
    background-color: #f4b400;
  }

  100% {
    background-color: #01689B;
  }
}

/* Elk klankblok (letter of klankcombi) */
.klankblok {
  display: inline-block;

  font-size: clamp(64px, 14vw, 132px);
  font-weight: 800;
  margin: 10px 0 4px 0;
  line-height: 1.05;
  letter-spacing: 1px;
  text-align: center;

  transition: transform 0.25s ease, color 0.25s ease;
}

/* kleur */
.klank-klinker {
  color: #ef4444;
  /* rood */
}

.klank-medeklinker {
  color: #0f172a;
  /* bijna zwart / donkerblauw */
}

/* POP animatie */
@keyframes emphasize {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.25);
  }

  100% {
    transform: scale(1);
  }
}

:root {
  --ebx: #01689b;
  --ebx-d: #005a87;
}
