/* =========================================================
   SPROGMUSEN
   Shared design system + page specific game layouts
   ========================================================= */

:root {
  /* Base */
  --sky: #EAF6FB;
  --ink: #33294F;
  --ink-soft: #6A5F86;
  --accent: #FF8B5E;
  --accent-dark: #E9703C;
  --yellow: #FFD166;

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-cream: #FFFDF7;
  --surface-yellow: #FFF6E4;
  --surface-yellow-soft: #FFFBEA;
  --surface-peach: #FFF1E9;
  --surface-green: #EEF8F1;
  --surface-purple: #F5F1FA;

  /* Semantic */
  --good: #2F9E68;
  --bad: #D95C5C;

  /* Game specific shared tokens */
  --ground: #CFEAD1;
  --ground-dark: #AEDDB6;
  --ring-track: #F1E9DC;
  --card-back: #5C4A9E;

  /* Layout */
  --content-width: 760px;
  --game-width: 480px;
  --reading-width: 560px;
  --nav-width: 1500px;

  /* Shape */
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 22px;
  --radius-xl: 26px;

  /* Shadows */
  --shadow-card: 0 8px 20px -12px rgba(51, 41, 79, .28);
  --shadow-raised: 0 10px 24px -10px rgba(51, 41, 79, .30);
  --shadow-modal: 0 24px 60px -18px rgba(51, 41, 79, .42);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: var(--sky);
  color: var(--ink);
  font-family: "Nunito", sans-serif;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

/* =========================================================
   SITE LAYOUT / NAVIGATION
   ========================================================= */

.site-header {
  width: 100%;
  padding: 12px 20px 0;
  position: relative;
  z-index: 100;
}

.site-header-inner {
  width: 100%;
  max-width: var(--nav-width);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 30px;
  background: rgba(255,255,255,.96);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 28px -18px rgba(51,41,79,.45);
}

.site-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Baloo 2", sans-serif;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.site-brand-icon {
  font-size: 28px;
  line-height: 1;
}

.desktop-nav {
  flex: 1;
  height: 72px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(51,41,79,.035);
}

.nav-link.active {
  color: var(--accent-dark);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
}

.mobile-menu {
  display: none;
  position: relative;
  margin-left: auto;
}

.mobile-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 800;
  user-select: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu summary:hover,
.mobile-menu[open] summary {
  background: var(--surface-purple);
  color: var(--ink);
}

.menu-icon {
  font-size: 20px;
  line-height: 1;
}

.mobile-nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px -14px rgba(51,41,79,.40);
}

.mobile-nav a {
  padding: 11px 12px;
  border-radius: 11px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.mobile-nav a:hover {
  background: var(--surface-purple);
  color: var(--ink);
}

.site-main {
  width: 100%;
  padding: 44px 20px 60px;
}

.page-container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
}

/* =========================================================
   SHARED PAGE / GAME COMPONENTS
   ========================================================= */

.app {
  width: 100%;
  max-width: var(--game-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app > header {
  text-align: center;
  padding-top: 4px;
}

.app > header h1 {
  margin: 0;
  color: var(--accent-dark);
  font-family: "Baloo 2", sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .3px;
  transition: color .25s;
}

.subtitle {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.status {
  min-height: 20px;
  margin-top: 6px;
  color: var(--ink);
  font-family: "Baloo 2", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

/* Generic card surface */
.surface-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Shared sound selector */
.sound-grid,
.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sound-grid {
  margin-top: 6px;
}

.sound-btn,
.toggle-btn {
  border: 3px solid transparent;
  border-radius: 20px;
  padding: 18px 10px;
  background: var(--surface);
  box-shadow: 0 8px 18px -8px rgba(51,41,79,.30);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.sound-btn:active,
.toggle-btn:active {
  transform: scale(.95);
}

.sound-letter,
.toggle-letter {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Baloo 2", sans-serif;
  font-size: 30px;
  font-weight: 800;
}

.toggle-letter {
  width: 46px;
  height: 46px;
  font-size: 26px;
}

.sound-letter--wide {
  font-size: 20px;
}

.toggle-letter--wide {
  font-size: 17px;
}

.sound-emoji {
  font-size: 22px;
}

.sound-label,
.toggle-label {
  color: var(--ink);
  font-family: "Baloo 2", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.toggle-label {
  font-size: 14px;
}

/* Shared game toolbar */
.game-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.link-btn {
  border: 0;
  padding: 4px 2px;
  background: none;
  color: var(--ink-soft);
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--ink);
}

/* Shared helper/instruction box */
.instructions {
  margin: 0;
  padding: 9px 12px;
  background: var(--surface-yellow-soft);
  border: 1px solid rgba(255,209,102,.34);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
}

/* Shared action buttons */
button.primary,
.start-btn {
  border: 0;
  border-radius: 16px;
  padding: 13px 26px;
  background: var(--accent);
  color: #fff;
  font-family: "Baloo 2", sans-serif;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}

button.primary:disabled,
.start-btn:disabled {
  background: #DCD6EA;
  color: #A89FC2;
  cursor: default;
}

button.primary:not(:disabled):active,
.start-btn:not(:disabled):active {
  transform: scale(.96);
}

/* Shared mascot animation */
.mascot {
  display: inline-block;
  font-size: 22px;
  transition: transform .3s;
}

.mascot.cheer {
  animation: mascotBounce .5s ease;
}

@keyframes mascotBounce {
  0%,100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-8px) rotate(-8deg); }
  60% { transform: translateY(0) rotate(8deg); }
}

/* Shared feedback */
.feedback {
  min-height: 20px;
  margin: 0;
  text-align: center;
  font-family: "Baloo 2", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.feedback.good { color: var(--good); }
.feedback.bad { color: var(--bad); }

/* =========================================================
   SHARED RESULT / POPUP COMPONENT
   ========================================================= */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51,41,79,.36);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.result-card {
  width: 100%;
  max-width: 340px;
  padding: 24px 24px 22px;
  background: var(--surface-cream);
  border: 2px solid rgba(255,209,102,.42);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  text-align: center;
}

.done-mouse {
  display: block;
  width: auto;
  height: 118px;
  max-width: 100%;
  object-fit: contain;
  margin: -6px auto 2px;
}

.result-emoji {
  font-size: 44px;
  line-height: 1;
}

.result-title {
  margin-top: 6px;
  color: var(--accent-dark);
  font-family: "Baloo 2", sans-serif;
  font-size: 26px;
  font-weight: 800;
}

.result-text {
  margin: 10px 0 18px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.mouse-speech {
  display: inline-block;
  margin: 7px 0 4px;
  padding: 8px 14px;
  background: var(--surface-yellow);
  border: 2px solid var(--yellow);
  border-radius: var(--radius-sm);
  color: var(--accent-dark);
  font-family: "Baloo 2", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.confetti-wrap {
  position: relative;
  height: 0;
  overflow: visible;
}

.confetti-piece {
  position: absolute;
  top: 10px;
  font-size: 20px;
  pointer-events: none;
  animation: confettiFall 1s ease-out forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-60px) rotate(200deg); opacity: 0; }
}

.done-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

/* =========================================================
   SITEWIDE WIDGETS (cookie bar, Buy Me a Coffee)
   ========================================================= */

.cookie-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 20px;
  background: var(--surface-cream);
  border-top: 1px solid rgba(51,41,79,.08);
  box-shadow: var(--shadow-modal);
}

.cookie-bar p {
  margin: 0;
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.cookie-bar a {
  color: var(--accent-dark);
}

.cookie-bar button.primary {
  flex: none;
  padding: 9px 20px;
  font-size: 14px;
}

.support-widget {
  margin-top: 24px;
  text-align: center;
}

/* =========================================================
   FORSIDE
   ========================================================= */

body.page-index .app {
  gap: 18px;
}

body.page-index .app > header {
  padding-top: 10px;
}

body.page-index .app > header h1 {
  color: var(--ink);
  font-size: 30px;
}

body.page-index .hero-mouse {
  display: block;
  width: auto;
  height: 110px;
  margin: 0 auto 6px;
}

body.page-index .subtitle {
  margin-top: 6px;
  font-size: 14.5px;
}

body.page-index .game-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

body.page-index .game-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 3px solid transparent;
  border-radius: 24px;
  box-shadow: 0 10px 22px -10px rgba(51,41,79,.28);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease;
}

body.page-index .game-card:nth-child(2n) {
  background: var(--surface-yellow-soft);
}

body.page-index .game-card:nth-child(3n) {
  background: var(--surface-cream);
}

body.page-index .game-card:active {
  transform: scale(.97);
}

body.page-index .game-icon {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

body.page-index .icon-mouse { background: #FFE7DA; }
body.page-index .icon-cards { background: #EDE6FB; }
body.page-index .icon-listen { background: #FFF3D6; }
body.page-index .icon-train { background: #E4F2ED; }
body.page-index .icon-treasure { background: #FFE9C2; }

body.page-index .game-text {
  flex: 1;
}

body.page-index .game-title {
  margin: 0 0 3px;
  color: var(--ink);
  font-family: "Baloo 2", sans-serif;
  font-size: 19px;
  font-weight: 800;
}

body.page-index .mascot-badge {
  font-size: 15px;
}

body.page-index .game-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

body.page-index .game-arrow {
  flex: none;
  color: var(--ink-soft);
  font-size: 20px;
}

body.page-index footer {
  margin-top: 6px;
  color: var(--ink-soft);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

/* =========================================================
   MUSEPOST
   ========================================================= */

body.page-musepost .app > header h1 {
  font-size: 28px;
}

body.page-musepost .inline-mouse {
  width: auto;
  height: 38px;
  vertical-align: middle;
}

body.page-musepost .progress {
  min-height: 26px;
  margin-top: 8px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

body.page-musepost .dot {
  width: 26px;
  height: 26px;
  border: 2px solid var(--ground-dark);
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform .25s ease;
}

body.page-musepost .dot.filled {
  background: var(--yellow);
  border-color: var(--accent-dark);
  transform: scale(1.08);
}

body.page-musepost .field {
  position: relative;
  width: 100%;
  height: 52vh;
  min-height: 300px;
  max-height: 400px;
  overflow: hidden;
  touch-action: none;
  border: 3px solid #fff;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 15%, #ffffff55 0 40px, transparent 41px),
    repeating-linear-gradient(0deg, var(--ground) 0 34px, var(--ground-dark) 34px 36px);
  box-shadow: 0 10px 24px -8px rgba(51,41,79,.25);
}

body.page-musepost .mouse {
  position: absolute;
  z-index: 5;
  transform: translate(-50%,-50%);
  filter: drop-shadow(0 4px 3px rgba(0,0,0,.25));
  font-size: 34px;
  will-change: left, top;
}

body.page-musepost .mouse.moving {
  animation: mouseBob .35s infinite ease-in-out;
}

@keyframes mouseBob {
  0%,100% { transform: translate(-50%,-50%) rotate(-4deg); }
  50% { transform: translate(-50%,-50%) rotate(4deg); }
}

body.page-musepost .package {
  position: absolute;
  transform: translate(-50%,-50%);
  filter: drop-shadow(0 3px 2px rgba(0,0,0,.2));
  font-size: 28px;
  animation: packageWiggle 1.6s infinite ease-in-out;
}

@keyframes packageWiggle {
  0%,100% { transform: translate(-50%,-50%) rotate(-6deg); }
  50% { transform: translate(-50%,-50%) rotate(6deg); }
}

/* Musepost also uses popup card during each package */
body.page-musepost .prompt-card {
  width: 100%;
  max-width: 340px;
  padding: 28px 24px 22px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  text-align: center;
}

body.page-musepost .card-emoji {
  font-size: 40px;
  line-height: 1;
}

body.page-musepost .card-word-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

body.page-musepost .card-word {
  color: var(--accent-dark);
  font-family: "Baloo 2", sans-serif;
  font-size: 32px;
  font-weight: 800;
}

body.page-musepost .card-prompt {
  margin: 10px 0 18px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

body.page-musepost .timer-ring {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
}

body.page-musepost .timer-ring svg {
  width: 60px;
  height: 60px;
  transform: rotate(-90deg);
}

body.page-musepost .ring-bg {
  fill: none;
  stroke: var(--ring-track);
  stroke-width: 6;
}

body.page-musepost .ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 163.36;
  stroke-dashoffset: 0;
}

body.page-musepost button.ready {
  animation: pulse 1.1s infinite;
}

@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* =========================================================
   VENDESPIL
   ========================================================= */

body.page-vendespil .board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  perspective: 800px;
}

body.page-vendespil .card {
  aspect-ratio: 3 / 4;
  cursor: pointer;
}

body.page-vendespil .card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .45s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
}

body.page-vendespil .card.flipped .card-inner,
body.page-vendespil .card.matched .card-inner {
  transform: rotateY(180deg);
}

body.page-vendespil .card-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  box-shadow: 0 4px 10px -4px rgba(51,41,79,.35);
}

body.page-vendespil .card-back {
  background: linear-gradient(160deg, var(--card-back), var(--accent));
  font-size: 22px;
}

body.page-vendespil .card-front {
  padding: 4px;
  background: var(--surface);
  transform: rotateY(180deg);
  text-align: center;
}

body.page-vendespil .card.matched .card-front {
  background: var(--surface-yellow);
  border: 2px solid var(--yellow);
}

body.page-vendespil .card-front .em {
  font-size: 26px;
  line-height: 1;
}

body.page-vendespil .card-front .lb {
  margin-top: 3px;
  color: var(--ink);
  font-family: "Baloo 2", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
}

/* Mode selector */
body.page-vendespil .mode-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 6px;
}

body.page-vendespil .mode-card {
  min-height: 170px;
  border: 3px solid transparent;
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  background: var(--surface);
  box-shadow: 0 9px 22px -11px rgba(51,41,79,.28);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

body.page-vendespil .mode-card:nth-child(2) {
  background: var(--surface-yellow-soft);
}

body.page-vendespil .mode-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

body.page-vendespil .mode-card:active {
  transform: scale(.97);
}

body.page-vendespil .mode-icon {
  margin-bottom: 3px;
  font-size: 34px;
  line-height: 1;
}

body.page-vendespil .mode-title {
  font-family: "Baloo 2", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

body.page-vendespil .mode-desc {
  max-width: 175px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
}

body.page-vendespil .select-top {
  margin-bottom: 8px;
}

/* Multiplayer status */
body.page-vendespil .versus-panel {
  margin: 4px 0 2px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 8px;
}

body.page-vendespil .player-card {
  min-width: 0;
  padding: 9px 7px;
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: 17px;
  box-shadow: 0 6px 16px -12px rgba(51,41,79,.35);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon name"
    "icon score";
  align-items: center;
  column-gap: 7px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

body.page-vendespil .player-card.child-player {
  background: var(--surface-yellow-soft);
}

body.page-vendespil .player-card.adult-player {
  background: var(--surface-cream);
}

body.page-vendespil .player-card.active {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 9px 20px -12px rgba(51,41,79,.42);
}

body.page-vendespil .player-icon {
  grid-area: icon;
  font-size: 25px;
}

body.page-vendespil .player-name {
  grid-area: name;
  font-family: "Baloo 2", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.05;
}

body.page-vendespil .player-score {
  grid-area: score;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
}

body.page-vendespil .player-score strong {
  color: var(--ink);
  font-size: 14px;
}

body.page-vendespil .turn-indicator {
  min-width: 58px;
  padding: 7px;
  background: var(--surface-yellow);
  border: 1px solid rgba(255,209,102,.55);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

body.page-vendespil .turn-label {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

body.page-vendespil .turn-indicator strong {
  color: var(--accent-dark);
  font-family: "Baloo 2", sans-serif;
  font-size: 12px;
  line-height: 1.1;
}

/* =========================================================
   FIND BILLEDET
   ========================================================= */

body.page-find-billedet .say-banner {
  padding: 16px 14px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 8px 18px -10px rgba(51,41,79,.3);
  text-align: center;
}

body.page-find-billedet .say-label {
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
}

body.page-find-billedet .say-word {
  margin: 0;
  color: var(--accent-dark);
  font-family: "Baloo 2", sans-serif;
  font-size: 30px;
  font-weight: 800;
}

body.page-find-billedet .choices {
  margin-top: 4px;
  display: flex;
  gap: 14px;
}

body.page-find-billedet .choice {
  flex: 1;
  aspect-ratio: 1 / 1;
  border: 4px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 10px 20px -10px rgba(51,41,79,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s;
}

body.page-find-billedet .choice:active {
  transform: scale(.96);
}

body.page-find-billedet .choice.correct {
  border-color: var(--good);
  background: var(--surface-green);
}

body.page-find-billedet .choice.wrong {
  border-color: var(--bad);
  background: #FCEDED;
  animation: shake .3s;
}

body.page-find-billedet .choice.disabled {
  pointer-events: none;
  opacity: .55;
}

body.page-find-billedet .next-row {
  display: flex;
  justify-content: center;
}

/* =========================================================
   ORDTOGET
   ========================================================= */

body.page-ordtoget {
  --accent: #5C4A9E;
  --accent-dark: #463876;
}

body.page-ordtoget .pick-sounds {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.page-ordtoget .toggle-btn.selected {
  border-color: var(--sel-color, var(--accent));
  background: var(--sel-bg, var(--surface-purple));
}

body.page-ordtoget .hint {
  margin: 0;
  color: var(--ink-soft);
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
}

body.page-ordtoget .load-card {
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 18px -10px rgba(51,41,79,.3);
  text-align: center;
}

body.page-ordtoget .load-em {
  font-size: 56px;
  line-height: 1;
}

body.page-ordtoget .load-word {
  margin-top: 6px;
  font-family: "Baloo 2", sans-serif;
  font-size: 22px;
  font-weight: 800;
}

body.page-ordtoget .load-word .first {
  font-size: 26px;
}

body.page-ordtoget .wagons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

body.page-ordtoget .wagon {
  flex: 1;
  min-width: 70px;
  padding: 14px 6px;
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 16px -8px rgba(51,41,79,.35);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform .15s;
}

body.page-ordtoget .wagon:active {
  transform: scale(.95);
}

body.page-ordtoget .wagon .wletter {
  font-family: "Baloo 2", sans-serif;
  font-size: 24px;
  font-weight: 800;
}

body.page-ordtoget .wagon .wletter--wide {
  font-size: 18px;
}

body.page-ordtoget .wagon .wcount {
  padding: 1px 8px;
  background: rgba(255,255,255,.30);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

body.page-ordtoget .wagon.shake {
  animation: shake .3s;
}

body.page-ordtoget .wagon.disabled {
  pointer-events: none;
  opacity: .85;
}

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

/* =========================================================
   SKATTEJAGTEN
   ========================================================= */

body.page-skattejagten .scene-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

body.page-skattejagten .scene-btn {
  border: 3px solid transparent;
  border-radius: 20px;
  padding: 16px 8px;
  background: var(--surface);
  box-shadow: 0 8px 18px -8px rgba(51,41,79,.30);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s ease;
}

body.page-skattejagten .scene-btn:active {
  transform: scale(.95);
}

body.page-skattejagten .scene-emoji {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-peach);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

body.page-skattejagten .scene-label {
  color: var(--ink);
  font-family: "Baloo 2", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

body.page-skattejagten .board {
  padding: 14px;
  background: #FFE9C2;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

body.page-skattejagten .item-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

body.page-skattejagten .item-btn {
  aspect-ratio: 1 / 1;
  border: 3px solid transparent;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 6px 14px -8px rgba(51,41,79,.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s, opacity .2s;
}

body.page-skattejagten .item-btn:active {
  transform: scale(.95);
}

body.page-skattejagten .item-emoji {
  font-size: 28px;
  line-height: 1;
}

body.page-skattejagten .item-word {
  color: var(--ink-soft);
  font-family: "Baloo 2", sans-serif;
  font-size: 11px;
  font-weight: 700;
}

body.page-skattejagten .item-btn.found {
  border-color: var(--good);
  background: var(--surface-green);
  opacity: .65;
  pointer-events: none;
}

body.page-skattejagten .item-btn.found .item-emoji::after {
  content: " ✓";
}

body.page-skattejagten .item-btn.wrong {
  border-color: var(--bad);
  background: #FCEDED;
  animation: shake .3s;
}

/* =========================================================
   TIL FORÆLDRE
   ========================================================= */

body.page-til-foraeldre .app {
  max-width: var(--reading-width);
  gap: 20px;
}

body.page-til-foraeldre .app > header {
  text-align: left;
}

body.page-til-foraeldre .app > header h1 {
  color: var(--ink);
  font-size: 28px;
}

body.page-til-foraeldre .back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

body.page-til-foraeldre .inline-mouse {
  width: auto;
  height: 40px;
  margin-left: 2px;
  vertical-align: middle;
}

body.page-til-foraeldre .lede {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}

body.page-til-foraeldre section {
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid rgba(51,41,79,.045);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

body.page-til-foraeldre section:nth-of-type(2) { background: var(--surface-yellow-soft); }
body.page-til-foraeldre section:nth-of-type(3) { background: var(--surface-cream); }
body.page-til-foraeldre section:nth-of-type(4) { background: var(--surface-green); }
body.page-til-foraeldre section:nth-of-type(5) { background: var(--surface-peach); }
body.page-til-foraeldre section:nth-of-type(6) { background: var(--surface); }

body.page-til-foraeldre h2 {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-family: "Baloo 2", sans-serif;
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.page-til-foraeldre p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.65;
}

body.page-til-foraeldre p:last-child {
  margin-bottom: 0;
}

body.page-til-foraeldre ul,
body.page-til-foraeldre ol {
  margin: 0;
  padding-left: 20px;
}

body.page-til-foraeldre li {
  margin-bottom: 9px;
  font-size: 14.5px;
  line-height: 1.65;
}

body.page-til-foraeldre li:last-child {
  margin-bottom: 0;
}

body.page-til-foraeldre li b {
  color: var(--ink);
}

body.page-til-foraeldre .tip-list {
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.page-til-foraeldre .tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

body.page-til-foraeldre .tip-num {
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--accent-dark);
  font-family: "Baloo 2", sans-serif;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-til-foraeldre .tip p {
  margin: 0;
}

body.page-til-foraeldre .game-item {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

body.page-til-foraeldre .game-item:last-child {
  margin-bottom: 0;
}

body.page-til-foraeldre .game-em {
  flex: none;
  font-size: 24px;
}

body.page-til-foraeldre .game-item b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-family: "Baloo 2", sans-serif;
  font-size: 15px;
}

body.page-til-foraeldre .game-item p {
  margin: 0;
}

body.page-til-foraeldre .note {
  padding: 16px;
  background: var(--surface-yellow);
  border: 2px solid var(--yellow);
  border-radius: 16px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1150px) {
  .desktop-nav { gap: 0; }
  .nav-link {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 13px;
  }
}

@media (max-width: 950px) {
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .site-header-inner { min-height: 62px; }
}

@media (max-width: 600px) {
  .site-header {
    padding: 10px 10px 0;
  }

  .site-header-inner {
    min-height: 58px;
    padding: 0 14px;
    border-radius: 18px;
  }

  .site-brand {
    font-size: 19px;
  }

  .site-brand-icon {
    font-size: 23px;
  }

  .site-main {
    padding: 30px 16px 40px;
  }

  .done-mouse {
    height: 100px;
  }
}

@media (max-width: 520px) {
  body.page-vendespil .mode-screen {
    grid-template-columns: 1fr;
  }

  body.page-vendespil .mode-card {
    min-height: 132px;
  }

  body.page-vendespil .mode-desc {
    max-width: 260px;
  }

  body.page-vendespil .versus-panel {
    gap: 5px;
  }

  body.page-vendespil .player-card {
    padding: 8px 5px;
    column-gap: 5px;
  }

  body.page-vendespil .player-icon {
    font-size: 21px;
  }

  body.page-vendespil .player-name {
    font-size: 12px;
  }

  body.page-vendespil .player-score {
    font-size: 10px;
  }

  body.page-vendespil .turn-indicator {
    min-width: 48px;
    padding: 5px 4px;
  }

  body.page-vendespil .turn-indicator strong {
    font-size: 10.5px;
  }
}
