:root {
  --bg-top: #e2eef9;
  --bg-bottom: #cde2f5;
  --ink: #2b3f5c;
  --card: rgba(255, 255, 255, 0.95);
  --primary: #ff8a24;
  --primary-dark: #f27207;
  --secondary: #48a018;
  --secondary-dark: #3a8010;
  --blue: #2a7fc4;
  --blue-dark: #1e65a0;
  --accent: #f4be32;
  --mint: #8cb443;
  --ok: #5eaf2d;
  --bad: #e65a4a;
  --radius: 20px;
  --shadow: 0 14px 24px rgba(35, 49, 74, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

html {
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  min-height: 100%;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  z-index: -1;
  filter: blur(2px);
}

.bg-shape-a {
  width: 360px;
  height: 360px;
  background: #d7e0ec;
  top: -80px;
  right: -80px;
}

.bg-shape-b {
  width: 300px;
  height: 300px;
  background: #cfd9e6;
  bottom: -70px;
  left: -70px;
}

.site-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.site-header nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.brand {
  font-family: "Baloo 2", sans-serif;
  font-size: 2.4rem;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.8);
}

a {
  color: var(--ink);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.hero {
  background: linear-gradient(180deg, #f7f9fc, #eef2f7);
  border-radius: var(--radius);
  padding: 2.3rem;
  box-shadow: var(--shadow);
  animation: popIn 0.5s ease;
  border: 1px solid #dbe3ef;
}

.hero h1,
h1,
h2 {
  font-family: "Baloo 2", sans-serif;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff9a5, #ffd84d);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cards-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card,
.panel,
.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid #dbe3ef;
}

.compact-panel {
  padding: 0.8rem 1rem;
}

.compact-panel h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.05;
}

.compact-panel p {
  margin: 0.25rem 0 0;
}

.compact-panel .stack-row {
  margin-top: 0.55rem;
  gap: 0.5rem;
}

.compact-panel-meta {
  color: #4c5e78;
  font-size: 0.95rem;
}

.play-header-panel {
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.55rem;
}

.play-header-panel h1 {
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
}

.play-header-panel .compact-panel-meta {
  font-size: 0.85rem;
  margin-top: 0.1rem;
}

.module-grid {
  align-items: stretch;
}

.module-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.module-card-top {
  display: grid;
  gap: 0.4rem;
}

.module-card.is-live {
  background: linear-gradient(160deg, #ffffff, #fff6de 45%, #ebfbff);
}

.module-card.is-coming-soon {
  background: linear-gradient(160deg, #ffffff, #f8f3ff 48%, #eefcff);
  opacity: 0.97;
}

.module-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  box-shadow: inset 0 -3px 0 rgba(68, 195, 255, 0.12);
}

.dashboard-modules {
  margin-top: 1rem;
}

.topo-panel {
  margin-top: 1rem;
}

.auth-card {
  max-width: 460px;
  margin: 2rem auto;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.play-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1rem;
  align-items: start;
}

.mode-switches,
.play-actions,
.choice-area {
  display: grid;
  gap: 0.75rem;
}

.map-style-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.map-style-row label {
  font-size: 0.9rem;
  font-weight: 800;
}

#promptText {
  font-size: 2rem;
  line-height: 1.1;
  margin: 0.35rem 0 0.5rem;
}

.mode-switches {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.5rem;
}

.btn.is-active {
  background: linear-gradient(180deg, #ff8d4d, #ff5fa2);
}

.btn-secondary.is-active,
.btn-blue.is-active {
  background: linear-gradient(180deg, #1a5c9a, #0e3d6b);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.25);
}

.end-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px dashed #d7dee8;
}

.end-feedback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  text-align: center;
}

.end-emoji {
  font-size: 2.8rem;
  line-height: 1;
}

.end-title {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.55rem;
  line-height: 1.15;
  display: block;
}

.end-title--perfect {
  color: #e44087;
}

.end-title--good {
  color: #1aa4e4;
}

.end-title--keep-going {
  color: #e07000;
}

.btn:disabled,
button.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.hidden {
  display: none;
}

.quiz-option {
  font-weight: 800;
}

.type-answer-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.type-answer-input {
  min-width: 0;
}

.stack {
  display: grid;
  gap: 0.75rem;
}

.grid-form {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.lookup-actions {
  display: grid;
  gap: 0.5rem;
}

.lookup-note {
  font-size: 0.95rem;
  font-weight: 700;
}

.lookup-status {
  margin-top: 0.9rem;
  font-weight: 700;
}

.lookup-results {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.candidate-button {
  border: 3px solid #ffffff;
  background: linear-gradient(180deg, #fffdf0, #ffe7f5);
  color: var(--ink);
  border-radius: 18px;
  padding: 0.7rem 0.9rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(98, 79, 168, 0.12);
}

.candidate-button:hover {
  border-color: #ffd84d;
  background: linear-gradient(180deg, #ffffff, #fff2b6);
}

.candidate-button.is-active {
  border-color: #44c3ff;
  background: linear-gradient(180deg, #ffffff, #dff6ff);
  box-shadow: 0 0 0 3px rgba(68, 195, 255, 0.25), 0 10px 18px rgba(98, 79, 168, 0.16);
}

.is-speakable-word {
  cursor: pointer;
}

.word-inline-prompt {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff4a8, #ffc9e7);
  border: 2px solid #ffffff;
  box-shadow: 0 10px 20px rgba(142, 15, 82, 0.18);
}

.word-inline-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6f1a47;
}

.word-inline-value {
  margin: 0.2rem 0 0;
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  line-height: 1.15;
  font-weight: 900;
  color: #8e0f52;
  word-break: break-word;
}

#wordPromptText {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 900;
  color: #8e0f52;
}

#wordDirectionText:empty {
  display: none;
}

.flag-icon {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  vertical-align: middle;
}

.flag-fallback {
  display: inline-flex;
  width: 24px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 2px;
  font-size: 0.75rem;
  background: #ffffff;
}

.tables-number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3.2rem, 1fr));
  gap: 0.5rem;
}

.tables-number-button {
  min-width: 0;
}

.tables-number-grid + .stack-row {
  margin-top: 0.7rem;
}

.tables-grid-wrap {
  display: grid;
  gap: 0.6rem;
}

.tables-grid-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.tables-grid-label {
  font-weight: 800;
}

.tables-grid-input {
  text-align: center;
  font-weight: 800;
}

.tables-review-list {
  display: grid;
  gap: 0.55rem;
}

.tables-review-row {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 2px solid #ffffff;
}

.tables-review-row.is-correct {
  background: linear-gradient(180deg, #e9ffea, #c8f3ce);
  border-color: #77d495;
}

.tables-review-row.is-wrong {
  background: linear-gradient(180deg, #fff0f3, #ffd9e0);
  border-color: #ff8aa5;
}

.stack-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ebedf1;
  padding: 0.6rem 0;
}

.list-actions {
  flex-wrap: nowrap;
  align-items: center;
}

.list-actions .btn,
.list-actions button.btn {
  white-space: nowrap;
}

.share-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.icon-btn {
  min-width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border-radius: 12px;
  font-size: 1.25rem;
  line-height: 1;
}

.icon-pen-glyph {
  display: inline-block;
  font-size: 1.35rem;
  line-height: 1;
  transform: rotate(90deg);
  transform-origin: center;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Arial Unicode MS", sans-serif;
}

.icon-trash-glyph {
  display: inline-block;
  font-size: 1.3rem;
  line-height: 1;
}

.list-reset {
  list-style: none;
  margin: 0;
  padding: 0;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid #cad5e3;
  border-radius: 18px;
  padding: 0.55rem 0.7rem;
  background: #f8fbff;
  box-shadow: inset 0 -2px 0 rgba(124, 143, 168, 0.12);
}

.btn {
  border: none;
  border-radius: 18px;
  background: linear-gradient(180deg, #ff9f3b, var(--primary));
  color: white;
  padding: 0.75rem 1.1rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 0 rgba(199, 104, 24, 0.28);
}

.btn:hover {
  background: linear-gradient(180deg, #ff9328, var(--primary-dark));
}

.btn-secondary {
  background: linear-gradient(180deg, #4a9ee0, var(--blue));
  color: white;
  border: none;
  box-shadow: 0 6px 0 rgba(20, 80, 150, 0.28);
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #3a8ecc, var(--blue-dark));
  color: white;
}

.btn-blue {
  background: linear-gradient(180deg, #4a9ee0, var(--blue));
  color: white;
  border: none;
  box-shadow: 0 6px 0 rgba(20, 80, 150, 0.28);
}

.btn-blue:hover {
  background: linear-gradient(180deg, #3a8ecc, var(--blue-dark));
  color: white;
}

.inline-form {
  display: inline;
}

.admin-badge,
.admin-note {
  display: inline-block;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8d97d, var(--accent));
  padding: 0.3rem 0.65rem;
  font-weight: 800;
}

.btn-danger {
  background: linear-gradient(180deg, #f17867, #de5545);
}

.btn-danger:hover {
  background: #b94739;
}

.site-header nav a {
  color: #304767;
}

.site-header nav a:hover {
  color: #223752;
}

.module-card.is-live,
.module-card.is-coming-soon,
.score-card,
.candidate-button,
.word-inline-prompt,
.tables-review-row,
.item-row,
.lookup-status,
.item-type-choice,
.atlas-legend {
  border-color: #dbe3ef;
}

.btn-small {
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  border-radius: 12px;
}

.error {
  color: var(--bad);
  font-weight: 700;
}

/* Items list - ultra-netjes display */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
  border-radius: 14px;
  border-left: 4px solid var(--secondary);
}

.item-row .pill {
  min-width: 60px;
  text-align: center;
}

.item-name {
  flex: 1;
  font-weight: 600;
  color: var(--ink);
}

.item-row .btn {
  flex-shrink: 0;
}

.item-row-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.item-rename-form {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.item-rename-form.hidden {
  display: none;
}

.item-rename-input {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.55rem;
  border-radius: 12px;
  font-size: 0.95rem;
}

.item-pair-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.28));
}

.word-direction-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.word-drag-scroll {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  -webkit-overflow-scrolling: touch;
}

.word-drag-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  min-width: 32rem;
  touch-action: manipulation;
}

.word-drag-column {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.word-drag-left,
.word-drag-slot,
.word-drag-card {
  min-height: 2.75rem;
  border-radius: 12px;
  padding: 0.5rem 0.65rem;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.word-drag-left {
  background: linear-gradient(180deg, #fffdf0, #ffe7f5);
  border: 2px solid #ffffff;
  font-weight: 700;
}

.word-drag-slot {
  border: 2px dashed #93d9ff;
  background: rgba(255, 255, 255, 0.6);
  justify-content: center;
  height: 2.75rem;
  padding: 0.2rem;
  touch-action: none;
}

.word-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) scale(1.03);
  z-index: 10000;
  pointer-events: none;
  min-height: 2.75rem;
  min-width: 8rem;
  max-width: min(70vw, 16rem);
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  border: 2px solid #ffffff;
  background: linear-gradient(180deg, #dff6ff, #c8ecff);
  box-shadow: 0 14px 24px rgba(36, 50, 77, 0.32);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.word-drag-slot.is-over {
  border-color: #ff5fa2;
  background: rgba(255, 232, 244, 0.9);
  box-shadow: 0 0 0 4px rgba(255, 95, 162, 0.18);
}

.word-drag-slot.is-correct {
  border-color: #21b573;
  background: rgba(199, 248, 225, 0.85);
}

.word-drag-slot.is-wrong {
  border-color: #ff5d73;
  background: rgba(255, 229, 233, 0.88);
}

.word-drag-placeholder {
  color: #637189;
  font-size: 0.9rem;
}

.word-drag-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 2px solid #ffffff;
  background: linear-gradient(180deg, #dff6ff, #c8ecff);
  font-weight: 700;
  cursor: grab;
  justify-content: center;
  transition: box-shadow 0.15s ease, background 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  touch-action: manipulation;
}

.word-drag-card.is-assigned {
  cursor: pointer;
  background: linear-gradient(180deg, #ecffe8, #d7f8cf);
  border-color: #b4e7a6;
}

.word-drag-card.is-correct {
  background: linear-gradient(180deg, #e9ffea, #c8f3ce);
  border-color: #77d495;
}

.word-drag-card.is-wrong {
  background: linear-gradient(180deg, #fff0f3, #ffd9e0);
  border-color: #ff9aaa;
}

.word-drag-card.is-dragging {
  opacity: 0;
  box-shadow: none;
}

.word-drag-card.is-selected {
  border-color: #ff5fa2;
  background: linear-gradient(180deg, #ffe8f4, #ffd4ea);
  box-shadow: inset 0 0 0 2px rgba(255, 95, 162, 0.35);
}

.icon-btn-sm {
  min-width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1;
}

.pill-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #e6fbff);
  font-size: 0.85rem;
  margin-right: 0.35rem;
}

.map-area {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  border: 4px dashed #ffffff;
  background:
    radial-gradient(circle at 15% 20%, #fff8b3 0 18%, transparent 19%),
    radial-gradient(circle at 85% 25%, #ffc0e0 0 15%, transparent 16%),
    radial-gradient(circle at 20% 85%, #a8f0d8 0 14%, transparent 15%),
    radial-gradient(circle at 75% 75%, #ffe0a8 0 16%, transparent 17%),
    linear-gradient(145deg, #e8faff, #fff5eb 50%, #f0fff8);
  cursor: crosshair;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.4);
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

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

.editor-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 500;
}

.editor-form input,
.editor-form textarea,
.editor-form select {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.lookup-actions {
  display: flex;
  gap: 0.5rem;
}

.lookup-status {
  font-size: 0.9rem;
  color: #555;
  padding: 0.5rem;
  background: #f5f5f5;
  border-radius: 6px;
}

.item-type-choice {
  padding: 1rem;
  background: #fffaed;
  border: 2px solid #ffd84d;
  border-radius: 8px;
  margin-top: 0.5rem;
  position: relative;
  z-index: 10;
}

.item-type-choice p {
  margin: 0 0 0.8rem 0;
  font-weight: 500;
  color: #333;
}

.type-choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.type-choice-btn {
  padding: 0.6rem 0.8rem;
  text-align: left;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: #333;
  font-weight: 500;
  font-size: 1rem;
}

.type-choice-btn:hover {
  background: #fff8e6;
  border-color: #ffd84d;
}

.hidden {
  display: none;
}

@media (max-width: 1200px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

.leaflet-map {
  background: #d7eef6;
  overflow: hidden;
  height: clamp(420px, 68vh, 600px);
  border-radius: 12px;
}

.map-legend {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 500;
  min-width: 120px;
  max-width: 170px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.98);
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(20, 32, 56, 0.22);
  padding: 0.45rem 0.55rem;
}

.map-legend-title {
  font-weight: 800;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}

.map-legend-list {
  display: grid;
  gap: 0.2rem;
}

.map-legend-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.leaflet-map .leaflet-control-attribution {
  font-size: 0.7rem;
}

.map-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: white;
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  font-weight: 700;
}

.marker {
  display: inline-block;
  position: relative;
  width: 16px;
  height: 16px;
}

.marker.stad {
  border-radius: 999px;
  background: #ff6f61;
}

.marker.dorp {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ff9f68;
  border: 2px solid #fff6ef;
}

.marker.regio {
  background: #4db6ac;
  transform: rotate(45deg);
}

.marker.rivier {
  width: 20px;
  height: 8px;
  border-radius: 999px;
  background: #1d9bf0;
}

.marker.land {
  border-radius: 3px;
  background: #f7b32b;
}

.marker.good {
  outline: 3px solid var(--ok);
}

.marker.bad {
  outline: 3px solid var(--bad);
}

.candidate-marker {
  border: 4px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 6px rgba(255, 216, 77, 0.28);
}

.candidate-marker.neutral {
  opacity: 0.85;
}

.candidate-marker.focus {
  opacity: 1;
  border-color: #1b2a41;
  box-shadow: 0 0 0 8px rgba(255, 216, 77, 0.45);
}

.candidate-marker.correct {
  opacity: 1;
  border-color: var(--ok);
  box-shadow: 0 0 0 8px rgba(33, 181, 115, 0.28);
}

.candidate-marker.wrong {
  opacity: 1;
  border-color: var(--bad);
  box-shadow: 0 0 0 8px rgba(255, 93, 115, 0.24);
}

.area-pick-symbol {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.8px solid #fff9f0;
  box-shadow: 0 0 0 1.5px rgba(60, 45, 95, 0.28);
  background: #ff5c7a;
}

.area-pick-symbol.stad {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ff5c7a;
}

.area-pick-symbol.dorp {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff9f68;
  border-color: #fff5e8;
}

.area-pick-symbol.rivier,
.area-pick-symbol.meer,
.area-pick-symbol.zee {
  width: 19px;
  height: 9px;
  border-radius: 999px;
  background: #3aa0ff;
  border-color: #eef6ff;
}

.area-pick-symbol.rivier::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  height: 1.4px;
  background: #f7fbff;
  transform: translateY(-50%);
  border-radius: 999px;
}

.area-pick-symbol.zee {
  background: #1565c0;
}

.area-pick-symbol.streek,
.area-pick-symbol.regio,
.area-pick-symbol.provincie {
  width: 15px;
  height: 15px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: #9c6bff;
  border-color: #f5efff;
}

.area-pick-symbol.regio {
  background: #4ddbcf;
}

.area-pick-symbol.provincie {
  background: #2ec4b6;
}

.area-pick-symbol.land {
  width: 16px;
  height: 16px;
  border-radius: 1px;
  background: #ffd84d;
  border-color: #fff8d9;
}

.area-pick-symbol.neutral {
  opacity: 0.9;
}

.area-pick-symbol.focus {
  box-shadow: 0 0 0 4px rgba(246, 198, 88, 0.5);
}

.area-pick-symbol.correct {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 6px rgba(15, 157, 88, 0.95);
  border-color: #e8fff2;
}

.area-pick-symbol.wrong {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 6px rgba(217, 48, 37, 0.95);
  border-color: #ffeceb;
}

.atlas-legend {
  margin-top: 0.8rem;
  padding: 0.8rem;
  border: 2px solid #e3ddcf;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbf8f0, #f3ecde);
}

.atlas-legend h3 {
  margin: 0 0 0.45rem 0;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.atlas-legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.atlas-legend-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #3f3528;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.score-card {
  padding: 1.2rem;
  border-radius: 24px;
  background: linear-gradient(160deg, #ffffff, #fff0f8 55%, #ecfbff);
  border: 4px solid #ffffff;
  box-shadow: var(--shadow);
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8a8, #ffd84d);
  font-family: "Baloo 2", sans-serif;
  font-size: 1.3rem;
  box-shadow: 0 8px 0 rgba(247, 179, 43, 0.24);
}

.confetti-panel {
  background:
    radial-gradient(circle at 10% 20%, #fff7ab 0 8%, transparent 9%),
    radial-gradient(circle at 90% 18%, #ffa7d6 0 7%, transparent 8%),
    radial-gradient(circle at 28% 76%, #8df0c5 0 8%, transparent 9%),
    linear-gradient(140deg, #ffffff, #fff2fb 42%, #ecfbff);
}

@keyframes popIn {
  from {
    transform: scale(0.98);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 0.65rem;
  }

  .site-header nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    padding: 0.35rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
  }

  .site-header nav a,
  .site-header nav .inline-form,
  .site-header nav .admin-badge {
    flex: 0 0 auto;
    font-size: 0.92rem;
    line-height: 1.2;
    font-weight: 800;
  }

  .site-header nav a {
    text-decoration: none;
    padding: 0.38rem 0.62rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
  }

  .site-header nav .btn {
    padding: 0.55rem 0.85rem;
    border-radius: 14px;
    box-shadow: 0 5px 0 rgba(26, 164, 228, 0.22);
  }

  .brand {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
  }

  .two-col,
  .play-layout {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0.65rem;
  }

  .play-layout {
    gap: 0.75rem;
  }

  .play-layout > .card {
    min-width: 0;
  }

  .play-header-panel {
    padding: 0.45rem 0.7rem;
    margin-bottom: 0.45rem;
    border-radius: 18px;
  }

  .play-header-panel h1 {
    font-size: 1.15rem;
  }

  .play-header-panel .compact-panel-meta {
    font-size: 0.78rem;
  }

  .map-area {
    aspect-ratio: auto;
    width: 100%;
    max-width: 100%;
  }

  .leaflet-map {
    height: min(56vh, 420px);
    width: 100%;
    max-width: 100%;
  }

  .leaflet-map .leaflet-container,
  .leaflet-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .row-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    padding: 0.9rem 0;
  }

  .list-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    width: 100%;
    flex-wrap: wrap;
  }

  .list-actions .btn,
  .list-actions button.btn,
  .list-actions .inline-form {
    width: 100%;
  }

  .list-actions .inline-form {
    display: block;
  }

  .list-actions .inline-form button {
    width: 100%;
    min-height: 2.9rem;
  }

  .list-actions .btn,
  .list-actions button.btn {
    min-height: 2.9rem;
  }

  .item-pair-form {
    grid-template-columns: 1fr;
  }

  .word-drag-board {
    grid-template-columns: minmax(9rem, 1fr) minmax(8.4rem, 1fr) minmax(9rem, 1fr);
    min-width: 28.5rem;
  }

  .bg-shape {
    opacity: 0.45;
  }

  .word-play-layout .word-game-card {
    order: 1;
  }

  .word-play-layout .word-settings-card {
    order: 2;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .site-header nav {
    overflow-x: visible;
    white-space: normal;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.3rem;
  }

  .site-header nav .inline-form {
    display: inline-flex;
  }

  .site-header nav a,
  .site-header nav .admin-badge {
    font-size: 0.86rem;
    padding: 0.34rem 0.52rem;
  }

  .site-header nav .btn {
    min-height: 2.2rem;
    padding: 0.42rem 0.62rem;
  }

  .word-drag-scroll {
    overflow-x: hidden;
  }

  .word-drag-board {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr) minmax(0, 1fr);
    gap: 0.35rem;
  }

  .word-drag-left,
  .word-drag-slot,
  .word-drag-card {
    min-height: 2.35rem;
    padding: 0.35rem 0.42rem;
    border-radius: 9px;
    font-size: 0.74rem;
    line-height: 1.15;
    word-break: break-word;
  }

  .word-drag-slot {
    height: 2.35rem;
    padding: 0.14rem;
    border-width: 1.5px;
  }

  .word-drag-placeholder {
    font-size: 0.72rem;
  }
}

/* Leaflet interactive features (clickable shapes) hover state */
.leaflet-interactive {
  cursor: pointer;
}

.leaflet-interactive:hover {
  opacity: 0.8;
  stroke-width: 1.5;
}

.home-mockup {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 24px 38px rgba(35, 49, 74, 0.16);
  overflow: hidden;
  border: 1px solid #e4e7ee;
}

/* ── Hero ──────────────────────────────────────────────────── */
.home-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.2rem;
  padding: 2.4rem 2.4rem 4rem;
  background: linear-gradient(180deg, #fef6ec 0%, #f9e4c4 100%);
  border-radius: 0 0 50% 50% / 0 0 56px 56px;
  position: relative;
  z-index: 1;
}

.home-hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 2.8rem);
  line-height: 1.1;
  color: #1a2e4a;
  font-weight: 900;
}

.home-hero-copy p {
  margin: 0.65rem 0 0;
  color: #3f506a;
  max-width: 36ch;
  font-size: 1.02rem;
}

.home-hero-copy .home-hero-lead {
  font-weight: 700;
  color: #2d4364;
}

.home-hero-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-hero-actions .btn {
  min-width: 160px;
  padding: 0.78rem 2rem;
  border-radius: 24px;
}

.home-hero-art {
  position: relative;
  min-height: 255px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.home-hero-image {
  width: min(100%, 530px);
  height: auto;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 14px 22px rgba(41, 58, 84, 0.22));
}

/* ── Module row ────────────────────────────────────────────── */
.home-module-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.8rem 1.8rem 1.6rem;
  background: #ffffff;
}

.home-module-card {
  padding: 1.2rem 1.1rem 1rem;
  border-radius: 12px;
  border: 1px solid #e0e6ed;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(35, 49, 74, 0.06);
  display: flex;
  flex-direction: column;
}

.home-module-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.6rem;
  display: block;
}

.home-module-card h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #1a2e4a;
  font-weight: 800;
}

.home-module-card p {
  margin: 0.5rem 0 1rem;
  color: #536584;
  flex: 1;
  font-size: 0.97rem;
}

.home-module-card .btn {
  width: 100%;
  border-radius: 10px;
  padding: 0.72rem 1rem;
}

/* Topo = orange */
.home-module-card:nth-child(1) .btn {
  background: linear-gradient(180deg, #ff9a36, #f07000);
  box-shadow: 0 6px 0 rgba(175, 80, 0, 0.25);
}

.home-module-card:nth-child(1) .btn:hover {
  background: linear-gradient(180deg, #ff8820, #d86200);
}

/* Woordjes = red-orange */
.home-module-card:nth-child(2) .btn {
  background: linear-gradient(180deg, #e8703a, #cc4a1e);
  box-shadow: 0 6px 0 rgba(158, 52, 12, 0.25);
}

.home-module-card:nth-child(2) .btn:hover {
  background: linear-gradient(180deg, #d85f28, #b83c10);
}

/* Tafels = green (uses global .btn-secondary) */

/* ── Shared section base ───────────────────────────────────── */
.home-benefits,
.home-steps,
.home-school {
  padding: 2rem 2.2rem;
  background: #ffffff;
}

.home-benefits h2,
.home-steps h2,
.home-school h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  text-align: center;
  color: #1a2e4a;
  font-weight: 800;
}

/* ── Benefits ──────────────────────────────────────────────── */
.home-benefits ul {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.home-benefits li {
  text-align: center;
  color: #3f516f;
  font-weight: 700;
  font-size: 0.93rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-benefits li span {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 1.9rem;
  background: #edf1f6;
  margin-bottom: 0.6rem;
}

/* ── Steps ─────────────────────────────────────────────────── */
.home-steps {
  background: #f8fafd;
}

.home-steps-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.home-steps-grid article {
  border-radius: 12px;
  border: 1px solid #dde5ee;
  background: linear-gradient(180deg, #f8fbff 0 65%, #d4e8f5 66%, #c2dcf0 100%);
  padding: 1.1rem 1rem;
  min-height: 160px;
}

.home-steps-grid h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #1a2e4a;
  font-weight: 800;
}

.home-steps-grid h3 strong {
  color: #2580c8;
}

.home-steps-grid p {
  margin: 0.5rem 0 0;
  color: #566a88;
  font-size: 0.95rem;
}

/* ── School ────────────────────────────────────────────────── */
.home-school {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.2rem;
  align-items: end;
}

.home-school-copy h2 {
  text-align: left;
}

.home-school-copy ul {
  margin: 1rem 0 1.2rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.home-school-copy li {
  color: #3f526f;
  font-size: 1rem;
  font-weight: 600;
}

.home-school-copy li::before {
  content: "●";
  color: #f0a020;
  margin-right: 0.55rem;
}

.home-school-copy .btn {
  background: linear-gradient(180deg, #6ecb32, #48a018);
  box-shadow: 0 6px 0 rgba(46, 116, 10, 0.25);
  min-width: 200px;
  border-radius: 14px;
}

.home-school-copy .btn:hover {
  background: linear-gradient(180deg, #5eba28, #3c8e10);
}

.home-train-art {
  min-height: 220px;
  border-radius: 16px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.5rem;
}

.home-train-image {
  width: 100%;
  max-width: 620px;
  height: auto;
  object-fit: contain;
  object-position: center bottom;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero-art {
    min-height: 220px;
  }

  .home-benefits ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-school {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .home-module-row,
  .home-steps-grid {
    grid-template-columns: 1fr;
  }

  .home-benefits ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero,
  .home-benefits,
  .home-steps,
  .home-school {
    padding: 1rem;
  }

  .home-hero-copy h1 {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .home-module-card h2 {
    font-size: 1.1rem;
  }
}
