/* De 7 F'er - Kongskole Design System */
/* Baseret på COLORS.md, AGENTS.md og komponenter fra Nye projekter template */

:root {
  --font-main: 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-digit: 'Fredoka', 'Noto Sans', sans-serif;

  /* Neutrale baggrunde */
  --bg-app: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border-light: #E2E8F0;
  --border-mid: #CBD5E1;

  /* COLORS.md Primær Palette */
  /* Sand */
  --c-sand-1: #FAE5C8;
  --c-sand-2: #F3C689;
  --c-sand-3: #E2A44A;
  --c-sand-4: #B67012;

  /* Grøn */
  --c-green-1: #DEEBD7;
  --c-green-2: #B8D4A8;
  --c-green-3: #8CB973;
  --c-green-4: #5B8543;

  /* Blå */
  --c-blue-1: #CFE0F3;
  --c-blue-2: #97BCE5;
  --c-blue-3: #5893D4;
  --c-blue-4: #29619F;

  /* Gul */
  --c-yellow-1: #FFF5C3;
  --c-yellow-2: #FFE97D;
  --c-yellow-3: #FFDC2D;
  --c-yellow-4: #C8A700;

  /* Rød */
  --c-red-1: #F8CACA;
  --c-red-2: #F18B8B;
  --c-red-3: #E84444;
  --c-red-4: #B21616;

  /* Cyan / Teal */
  --c-teal-1: #CEEFF4;
  --c-teal-2: #94DCE8;
  --c-teal-3: #52C7DA;
  --c-teal-4: #2392A5;

  /* Lilla */
  --c-purple-1: #E6CDF5;
  --c-purple-2: #C893E9;
  --c-purple-3: #A750DC;
  --c-purple-4: #7323A5;

  /* Neutral / Grå */
  --c-neutral-1: #E1E1E1;
  --c-neutral-2: #BEBEBE;
  --c-neutral-3: #969696;
  --c-neutral-4: #646464;

  --shadow-resting: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lifted: 0 16px 24px -4px rgba(0, 0, 0, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--c-sand-1);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overflow-x: hidden;
}

/* TOPBAR NAVIGATION - Erstattes af Kongskole Indstillingsmenu og Hovedmenu */
.app-header {
  display: none !important;
}

/* TOP SPACER TIL FASTFORANKRET TANDHJUL */
.settings-top-spacer {
  width: 100%;
  height: 64px;
  flex-shrink: 0;
  pointer-events: none;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-section {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-blue-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* GLOBAL SVÆRHEDSGRAD I TOPBAR */
.global-level-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-app);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 3px 6px;
}

.level-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-left: 4px;
}

.level-btn-group {
  display: inline-flex;
  gap: 2px;
  background: var(--border-light);
  border-radius: 8px;
  padding: 2px;
}

.global-level-btn {
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 12px;
  min-height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.global-level-btn:hover {
  color: var(--text-main);
}

.global-level-btn.active {
  background: #FFFFFF;
  color: var(--c-blue-4);
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* TRYK-NED KNAP (Fra docs/components/trykknap) */
.tryk-knap {
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 16px;
  min-height: 42px;
  border-radius: 12px;
  border: 2px solid;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}

.tryk-knap:hover {
  transform: translateY(-2px);
}

.tryk-knap:active {
  transform: translateY(3px);
}

.nav-btn {
  background: #FFFFFF;
  border-color: var(--border-mid);
  color: var(--text-main);
  box-shadow: 0 4px 0 var(--border-mid);
}

.nav-btn:hover {
  box-shadow: 0 6px 0 var(--border-mid);
}

.nav-btn:active {
  box-shadow: 0 1px 0 var(--border-mid);
}

.nav-btn.active {
  background: var(--c-blue-1);
  border-color: var(--c-blue-3);
  color: var(--c-blue-4);
  box-shadow: 0 4px 0 var(--c-blue-3);
}

.btn-mute {
  background: var(--c-neutral-1);
  border-color: var(--c-neutral-2);
  color: var(--c-neutral-4);
  box-shadow: 0 4px 0 var(--c-neutral-2);
}

.btn-mute.muted {
  background: var(--c-red-1);
  border-color: var(--c-red-2);
  color: var(--c-red-4);
  box-shadow: 0 4px 0 var(--c-red-2);
}

/* APP MAIN CONTAINER */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 16px 20px 16px;
}

.view-section {
  display: none;
}

.view-section.active {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* =========================================================
   HOVEDMENU (MAINMENU) - Jf. docs/components/hovedmenu
   De 4 faste hvide bokse og striks skyggeregel
   ========================================================= */

.mainmenu-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: calc(100vh - 84px);
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px 16px 16px;
  gap: 20px;
}

/* 1. Spiltitel boks */
.mainmenu-title-card {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 14px 28px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: default;
}

.mainmenu-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0A0A0A;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.2;
}

/* Midtersektion: Venstre og Højre hvide boks */
.mainmenu-grid-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
}

@media (max-width: 860px) {
  .mainmenu-grid-row {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}

/* Kasser med skygge (udelukkende de hvide kasser har skygge) */
.mainmenu-card {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: fit-content;
  border: none;
}

.mainmenu-training-card {
  width: 100%;
  max-width: 480px;
}

.mainmenu-settings-card {
  width: 100%;
  max-width: 440px;
}

.mainmenu-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-sand-4);
  padding: 0 2px;
}

.mainmenu-header-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.mainmenu-card-title {
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-sand-4);
}

/* STRIKS SKYGGEREGEL: Knapper har ingen skygge og ingen outline */
.mainmenu-btn {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.18s ease;
  width: 100%;
  font-family: var(--font-main);
  -webkit-tap-highlight-color: transparent;
}

.mainmenu-btn:hover {
  transform: scale(1.03);
}

.mainmenu-btn:active {
  transform: scale(0.96);
}

/* START knap i Tone 3 */
.mainmenu-btn.btn-start {
  background: var(--c-sand-3);
  color: var(--c-sand-4);
  padding: 10px 16px;
  min-height: 56px;
}

.mainmenu-btn-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mainmenu-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-sand-4);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mainmenu-btn:hover .mainmenu-icon-box {
  transform: scale(1.08);
}

.mainmenu-icon-box svg {
  width: 20px;
  height: 20px;
}

.mainmenu-btn-label {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
  display: inline-block;
  transition: transform 0.2s ease;
}

.mainmenu-btn:hover .mainmenu-btn-label {
  transform: scale(1.03);
  transform-origin: left center;
}

/* Bogstavhop animation */
@keyframes mainmenu-char-hop {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.mainmenu-btn.is-hopping .char {
  display: inline-block;
  animation: mainmenu-char-hop 0.45s ease-in-out;
  animation-delay: calc(var(--char-idx) * 0.035s);
}

/* Knap-wipe animation (Chevron > dækker 100%) */
.mainmenu-btn-wipe {
  position: absolute;
  inset: 0;
  background: var(--c-sand-2);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
}

@keyframes mainmenu-btn-wipe-anim {
  0% {
    opacity: 1;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  100% {
    opacity: 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

.mainmenu-btn.is-wiping .mainmenu-btn-wipe {
  animation: mainmenu-btn-wipe-anim 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Deløvelser (Tone 2, 1 kolonne pr. række) */
.mainmenu-exercises-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}

.mainmenu-btn.btn-exercise {
  background: var(--c-sand-2);
  color: var(--c-sand-4);
  padding: 10px 14px;
  min-height: 48px;
  justify-content: flex-start;
}

.mainmenu-btn.btn-exercise .mainmenu-btn-label {
  font-size: 0.95rem;
  font-weight: 800;
}

/* Lærerstyret / Dyre-Kartotek nederst */
.mainmenu-teacher-row {
  border-top: 2px solid rgba(182, 112, 18, 0.15);
  padding-top: 14px;
  margin-top: 2px;
  width: 100%;
}

.mainmenu-btn.btn-teacher {
  background: var(--c-sand-1);
  color: var(--c-sand-4);
  padding: 10px 16px;
  min-height: 52px;
}

.mainmenu-btn.btn-teacher .mainmenu-icon-box {
  background: var(--c-sand-2);
  color: var(--c-sand-4);
  width: 34px;
  height: 34px;
}

/* Højre boks: Indstillinger sektioner */
.mainmenu-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mainmenu-section.border-top {
  border-top: 2px solid rgba(182, 112, 18, 0.15);
  padding-top: 14px;
}

.mainmenu-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mainmenu-section-label {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-sand-4);
}

.mainmenu-level-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--c-sand-1);
  color: var(--c-sand-4);
}

.mainmenu-level-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mainmenu-sub-btn {
  min-height: 44px;
  border-radius: 14px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--c-sand-1);
  color: var(--c-sand-4);
  transition: transform 0.15s ease, background 0.15s ease;
  user-select: none;
}

.mainmenu-sub-btn:hover {
  transform: translateY(-2px);
}

.mainmenu-sub-btn:active {
  transform: translateY(1px);
}

.mainmenu-sub-btn.active {
  background: var(--c-sand-3);
  color: var(--c-sand-4);
  transform: translateY(-2px);
}

.mainmenu-sub-btn .check-icon {
  width: 16px;
  height: 16px;
  stroke: var(--c-sand-4);
  stroke-width: 3;
  fill: none;
  display: none;
}

.mainmenu-sub-btn.active .check-icon {
  display: block;
}

/* De 7 F'er badges grid */
.mainmenu-f-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 6px;
}

.menu-f-pill {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  user-select: none;
  cursor: default;
}

/* 4. Bundmenu */
.mainmenu-bottom-bar-wrap {
  width: 100%;
  max-width: 960px;
  margin-top: auto;
  padding-top: 16px;
  z-index: 20;
}

.mainmenu-bottom-bar {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 10px 18px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border: none;
}

/* Bundknapper (Vælg spillere & Print) */
.bottom-btn {
  background: var(--c-sand-1);
  color: var(--c-sand-4);
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 16px;
  padding: 8px 16px;
  min-height: 44px;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: transform 0.18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.bottom-btn:hover {
  transform: scale(1.03);
}

.bottom-btn:active {
  transform: scale(0.96);
}

.bottom-btn-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  transition: transform 0.18s ease;
}

.bottom-btn:hover .bottom-btn-icon {
  transform: scale(1.08);
}

.bottom-btn-text {
  white-space: nowrap;
}

.bottom-player-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #E84444;
  color: #FFFFFF;
  font-family: var(--font-digit);
  font-weight: 900;
  font-size: 0.78rem;
  min-width: 22px;
  height: 22px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}

/* Hurtig Spiller Popover */
.mainmenu-player-wrap {
  position: relative;
}

.player-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  background: #FFFFFF;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 50;
  min-width: 130px;
}

.player-popover-item {
  background: var(--c-sand-1);
  color: var(--c-sand-4);
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.player-popover-item:hover,
.player-popover-item.active {
  background: var(--c-sand-3);
  color: var(--c-sand-4);
}

/* Klassetrin-slider (GradeSlider) */
.mainmenu-grade-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.grade-label {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--c-sand-4);
  letter-spacing: 0.02em;
}

.grade-slider-bar {
  display: inline-flex;
  align-items: center;
  padding: 3px 4px;
  border-radius: 9999px;
  background: rgba(243, 198, 137, 0.6);
  border: 1px solid rgba(182, 112, 18, 0.2);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  gap: 2px;
}

.grade-btn {
  min-width: 34px;
  min-height: 36px;
  border-radius: 9999px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--c-sand-4);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.grade-btn:hover {
  color: #0A0A0A;
}

.grade-btn.active {
  background: var(--c-sand-3);
  color: #0A0A0A;
  border: 1px solid rgba(182, 112, 18, 0.35) !important;
}

/* Mobil Klassetrin Popover */
.grade-mobile-btn {
  display: none;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(182, 112, 18, 0.4);
  background: var(--c-sand-3);
  color: #0A0A0A;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 900;
  cursor: pointer;
  align-items: center;
  gap: 6px;
}

.grade-mobile-popup {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100vw - 32px);
  max-width: 360px;
  background: #FAE5C8;
  border: 1px solid rgba(182, 112, 18, 0.3);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(182, 112, 18, 0.25);
  z-index: 100;
}

.grade-mobile-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.grade-mobile-item {
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(182, 112, 18, 0.2);
  background: rgba(255, 255, 255, 0.85);
  color: var(--c-sand-4);
  font-family: var(--font-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease;
}

.grade-mobile-item.active {
  background: var(--c-sand-3);
  border: 2px solid var(--c-sand-4);
  color: #0A0A0A;
  font-weight: 900;
}

.grade-mobile-item .kl-sub {
  font-size: 9px;
  opacity: 0.75;
}

.grade-mobile-item .kl-num {
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 768px) {
  .grade-slider-bar {
    display: none;
  }
  .grade-mobile-btn {
    display: inline-flex;
  }
}

/* =========================================================
   SIMPEL GRAFIK TILSTAND & DYSLEKSI REGLER
   ========================================================= */

body.graphics-simple .mainmenu-title-card,
body.graphics-simple .mainmenu-card,
body.graphics-simple .mainmenu-bottom-bar,
body.graphics-simple .clean-modal-dialog,
body.graphics-simple .clean-result-card,
body.graphics-simple .g1-stage-box,
body.graphics-simple .g1-clues-box,
body.graphics-simple .g1-guess-box,
body.graphics-simple .poster-sheet {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5) !important;
}

body.graphics-simple * {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.dyslexia-mode {
  font-family: 'OpenDyslexic', var(--font-main) !important;
}

body.dyslexia-mode * {
  font-family: 'OpenDyslexic', var(--font-main);
}

/* =========================================================
   STATUS BAR & CIFFER POINTKASSE (docs/components/point)
   ========================================================= */

.game-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.game-subnav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.subnav-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.subnav-badge {
  background: var(--bg-app);
  border: 1px solid var(--border-mid);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.score-box-mini {
  background: var(--c-sand-1);
  border: 2px solid var(--c-sand-2);
  border-radius: 10px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-box-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--c-sand-4);
  letter-spacing: 0.5px;
}

.score-box-digits {
  background: #FFFFFF;
  border: 1px solid var(--c-sand-3);
  border-radius: 6px;
  padding: 2px 8px;
  display: flex;
  gap: 2px;
  font-family: var(--font-digit);
  font-size: 1.15rem;
  font-weight: 700;
  color: #171717;
  font-variant-numeric: tabular-nums;
}

.score-box-digits .dim {
  color: rgba(28, 25, 23, 0.25);
}

/* =========================================================
   SPIL 1: DYRE-DETEKTIV
   ========================================================= */

.g1-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

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

.g1-stage-box {
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 24px 14px 14px;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 280px;
}

.g1-corner-badge {
  position: absolute;
  top: -14px;
  left: 18px;
  background: #FFFFFF;
  border: 2px solid var(--border-mid);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
  z-index: 2;
  user-select: none;
  white-space: nowrap;
}

body.graphics-simple .g1-corner-badge {
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5) !important;
}

.g1-image-wrap {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  overflow: visible;
}

.g1-image-wrap img {
  width: 100%;
  height: 100%;
  max-height: 250px;
  object-fit: contain;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.g1-image-wrap img.mystery {
  filter: brightness(0) opacity(0.85);
  transform: scale(0.95);
}

.g1-mystery-center-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  border: 3px solid var(--border-mid);
  border-radius: 16px;
  padding: 6px 22px;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 0 rgba(0, 0, 0, 0.06);
  z-index: 10;
  user-select: none;
  white-space: nowrap;
  letter-spacing: 2px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.g1-mystery-center-badge.solved {
  border-color: var(--c-green-3);
  background: var(--c-green-1);
  color: var(--c-green-4);
  font-size: 1.25rem;
  letter-spacing: normal;
  box-shadow: 0 6px 18px rgba(75, 136, 67, 0.25);
}

body.graphics-simple .g1-mystery-center-badge {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5) !important;
}

#g1-btn-listen-name {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.g1-stage-box.hover-target {
  border-color: var(--c-blue-3);
  box-shadow: 0 0 0 3px var(--c-blue-2);
}

.g1-stage-tag {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.g1-revealed-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--c-green-4);
  margin-bottom: 8px;
}

.g1-clues-box {
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 24px 18px 18px;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.g1-section-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.g1-buttons-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.f-clue-btn {
  background: var(--btn-bg);
  border: 2px solid var(--btn-border);
  box-shadow: 0 3px 0 var(--btn-border);
  color: var(--btn-dark);
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 50px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
}

.f-clue-btn:hover:not(.revealed) {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--btn-border);
}

.f-clue-btn:active:not(.revealed) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--btn-border);
}

.f-clue-btn.revealed {
  box-shadow: none;
  opacity: 0.85;
}

.f-clue-btn-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.f-clue-btn-name {
  font-size: 0.95rem;
  font-weight: 800;
}

.f-clue-btn-state {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.08);
}

.f-clue-btn.revealed .f-clue-btn-state {
  background: var(--btn-dark);
  color: #FFFFFF;
}

.f-clue-btn-q {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
}

.g1-active-clues-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
  background: transparent;
  border: none;
  padding: 0;
}

.g1-empty-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 16px;
}

.clue-strip {
  background: #FFFFFF;
  border: 2px solid var(--card-border);
  border-left-width: 6px;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.clue-strip-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.clue-strip-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--tag-color);
  text-transform: uppercase;
}

.clue-strip-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.speak-btn,
.btn-lyt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  background: #FFFFFF;
  border: 2px solid var(--border-mid);
  color: var(--text-main);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.speak-btn:hover,
.btn-lyt:hover {
  background: var(--bg-app);
}

.speak-btn:active,
.btn-lyt:active {
  transform: translateY(2px);
  box-shadow: none;
}

.speaker-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.speaker-wave-1,
.speaker-wave-2 {
  transform-origin: center;
}

.speak-btn.is-speaking,
.btn-lyt.is-speaking {
  background: var(--c-blue-1);
  border-color: var(--c-blue-3);
  color: var(--c-blue-4);
}

.speak-btn.is-speaking .speaker-icon,
.btn-lyt.is-speaking .speaker-icon {
  animation: speakerPulse 1.2s ease-in-out infinite;
}

.speak-btn.is-speaking .speaker-wave-1,
.btn-lyt.is-speaking .speaker-wave-1 {
  animation: speakerWave1 0.9s ease-in-out infinite;
}

.speak-btn.is-speaking .speaker-wave-2,
.btn-lyt.is-speaking .speaker-wave-2 {
  animation: speakerWave2 0.9s ease-in-out infinite 0.2s;
}

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

@keyframes speakerWave1 {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes speakerWave2 {
  0%, 100% {
    opacity: 0.15;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

body.graphics-simple .speak-btn.is-speaking .speaker-icon,
body.graphics-simple .btn-lyt.is-speaking .speaker-icon,
body.graphics-simple .speak-btn.is-speaking .speaker-wave-1,
body.graphics-simple .btn-lyt.is-speaking .speaker-wave-1,
body.graphics-simple .speak-btn.is-speaking .speaker-wave-2,
body.graphics-simple .btn-lyt.is-speaking .speaker-wave-2 {
  animation: none !important;
}

body.graphics-simple .speak-btn,
body.graphics-simple .btn-lyt {
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5) !important;
}

.g1-guess-box {
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 24px 18px 18px;
  position: relative;
  overflow: visible;
}

.g1-options-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.animal-option-tile {
  background: #FFFFFF;
  border: 2px solid var(--border-mid);
  border-bottom: 4px solid var(--border-mid);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, box-shadow 0.1s ease;
}

.animal-option-tile:hover {
  transform: translateY(-3px);
  border-color: var(--c-blue-3);
  box-shadow: 0 4px 0 var(--c-blue-3);
}

.animal-option-tile:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--c-blue-3);
}

.option-img-frame {
  width: 85px;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-img-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.option-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.animal-option-tile.is-correct-choice {
  border-color: var(--c-green-3) !important;
  background: var(--c-green-1) !important;
  color: var(--c-green-4) !important;
  box-shadow: 0 4px 0 var(--c-green-3) !important;
  transform: scale(1.03);
}

.g1-feedback-line {
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--c-red-1);
  border: 2px solid var(--c-red-2);
  color: var(--c-red-4);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.g1-dossier-card {
  background: #FFFFFF;
  border: 2px solid var(--c-green-2);
  border-bottom: 5px solid var(--c-green-3);
  border-radius: 18px;
  padding: 22px;
}

.dossier-headline {
  text-align: center;
  margin-bottom: 18px;
}

.dossier-sub {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-green-4);
}

.dossier-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.dossier-item {
  background: var(--item-bg);
  border: 2px solid var(--item-border);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dossier-badge-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--item-dark);
  min-width: 85px;
}

.dossier-item-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
}

/* =========================================================
   SPIL 2: F-SORTERING (ROTERENDE KORT I MIDTEN)
   ========================================================= */

#view-game2 {
  min-height: calc(100vh - 220px);
}

#view-game2.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.g2-gameplay-area {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  padding: 20px 0;
}

.g2-card-container {
  width: 100%;
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  margin-bottom: 20px;
}

.g2-card-inner {
  position: relative;
  width: 100%;
  min-height: 160px;
  transform-style: preserve-3d;
  transition: transform 0.8s ease-in-out;
}

.g2-card-inner.flipped {
  transform: rotateY(1980deg);
}

.g2-card-inner.blurring {
  filter: blur(4px);
  transition: filter 0.2s linear;
}

body.graphics-simple .g2-card-inner.blurring {
  filter: none !important;
}

.g2-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 160px;
  background: #FFFFFF;
  border: none !important;
  outline: none !important;
  border-radius: 20px;
  padding: 26px 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 0 rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.2s ease;
}

.g2-card-face.hover-target {
  box-shadow: 0 0 0 4px var(--c-blue-3), 0 14px 30px rgba(0, 0, 0, 0.16) !important;
}

.g2-card-face-front {
  transform: rotateY(0deg);
}

.g2-card-face-back {
  transform: rotateY(180deg);
}

.sentence-quote {
  font-size: 1.35rem;
  font-weight: 800;
  color: inherit;
  line-height: 1.4;
  flex: 1;
}

.g2-card-cat-tag {
  position: absolute;
  top: -14px;
  left: 24px;
  background: #FFFFFF;
  border: 2px solid currentColor;
  border-radius: 8px;
  padding: 3px 12px;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
  z-index: 2;
  white-space: nowrap;
}

body.graphics-simple .g2-card-face {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5) !important;
}

body.graphics-simple .g2-card-cat-tag {
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5) !important;
}
  text-align: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.target-slot:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 0 var(--slot-border);
}

.target-slot:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--slot-border);
}

.target-slot.hover-target {
  transform: scale(1.05);
  border-style: dashed;
  border-width: 3px;
}

.target-slot-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.target-slot-question {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.9;
  line-height: 1.2;
}


.clean-result-card {
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-bottom: 5px solid var(--c-green-3);
  border-radius: 18px;
  padding: 32px 20px;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.result-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--c-green-4);
  margin-bottom: 6px;
}

.result-score-line {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.result-msg {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* =========================================================
   SPIL 3: DEKONSTRUÉR TEKST (FRI OVERSTREGNINGSTUSCH)
   ========================================================= */

.toggle-switch-wrapper {
  display: inline-flex;
  background: var(--bg-app);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 2px;
  gap: 2px;
}

.mode-btn {
  padding: 4px 12px !important;
  min-height: 32px !important;
  font-size: 0.8rem !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

.mode-btn.active {
  background: #FFFFFF !important;
  border: 1px solid var(--border-mid) !important;
  color: var(--c-blue-4) !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}

.text-picker-bar {
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.picker-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
}

.text-choices-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Værktøjslinje for tuscher & viskelæder */
.highlighter-tools-card {
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tools-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tools-label-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tools-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.active-tool-pill {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--c-sand-1);
  color: var(--c-sand-4);
  border: 1px solid var(--c-sand-3);
}

.tools-utility-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.utility-tool {
  padding: 6px 12px !important;
  min-height: 36px !important;
  font-size: 0.85rem !important;
}

.utility-tool.active {
  background: var(--c-red-1) !important;
  border-color: var(--c-red-3) !important;
  color: var(--c-red-4) !important;
  box-shadow: 0 4px 0 var(--c-red-3) !important;
}

/* 7 F-tusch knapper */
.marker-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.f-marker-btn {
  background: var(--marker-bg);
  border: 2px solid var(--marker-border);
  box-shadow: 0 3px 0 var(--marker-border);
  color: var(--marker-dark);
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 48px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
}

.f-marker-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--marker-border);
}

.f-marker-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--marker-border);
}

.f-marker-btn.active-marker {
  border-width: 3px;
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px var(--text-main);
}

.f-marker-name {
  font-size: 0.95rem;
  font-weight: 800;
}

.f-marker-tag {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.85;
}

/* Frit overstregningsark */
.highlighter-workspace-card {
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 18px;
  padding: 24px;
}

.highlighter-sheet-header {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 4px;
}

.sheet-instruction {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Papirflade med canvas i bunden og tekst foran */
.highlighter-paper-surface {
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 8px 12px;
  min-height: 340px;
  touch-action: none; /* Forhindrer scroll ved berøring */
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
  overflow: hidden;
}

.highlighter-canvas-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Sammenhængende tekstlag */
.highlighter-text-content {
  position: relative;
  z-index: 2;
  pointer-events: none;
  display: block;
}

.deconstruct-flowing-paragraph {
  margin: 0;
  padding: 4px;
  display: block;
  line-height: 2.85;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: 0.1px;
  text-align: left;
}

.deconstruct-sentence-inline {
  display: inline;
  padding: 2px 1px;
  border-radius: 4px;
  margin: 0;
  position: relative;
  transition: background-color 0.2s ease, border-bottom 0.2s ease, box-shadow 0.2s ease;
  border-bottom: 3px solid transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Facit tilstand direkte på teksten */
.facit-active .deconstruct-sentence-inline {
  background-color: var(--facit-bg) !important;
  border-bottom: 3px solid var(--facit-border) !important;
  padding: 2px 4px;
  pointer-events: auto !important;
  cursor: pointer;
}

.facit-badge-inline {
  display: none;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  margin: 0 4px;
  background: var(--facit-border);
  color: var(--facit-dark);
  text-transform: uppercase;
  vertical-align: middle;
  pointer-events: auto !important;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.facit-active .facit-badge-inline {
  display: inline-flex !important;
  align-items: center;
}

.facit-active .facit-badge-inline:hover {
  transform: scale(1.05);
}

/* Tjek svar: Visuel feedback direkte i teksten */
.val-checked .deconstruct-sentence-inline.val-correct {
  border-bottom: 3px solid var(--c-green-3) !important;
  background-color: rgba(222, 235, 215, 0.55);
  padding: 2px 4px;
}

.val-checked .deconstruct-sentence-inline.val-wrong {
  border-bottom: 3px dashed var(--c-red-3) !important;
  background-color: rgba(248, 202, 202, 0.55);
  padding: 2px 4px;
  pointer-events: auto !important;
  cursor: pointer;
}

.val-checked .deconstruct-sentence-inline.val-missing {
  border-bottom: 3px dotted var(--c-yellow-3) !important;
  background-color: rgba(255, 245, 195, 0.55);
  padding: 2px 4px;
  pointer-events: auto !important;
  cursor: pointer;
}

.val-inline-badge {
  display: none !important;
}

.val-checked .val-inline-badge {
  display: none !important;
}

.val-inline-badge:hover {
  transform: translateY(-1px);
}

.val-inline-badge:active {
  transform: translateY(1px);
}

.val-inline-badge.badge-ok {
  background: var(--c-green-2);
  color: var(--c-green-4);
  border-color: var(--c-green-3);
  cursor: default;
}

.val-inline-badge.badge-wrong {
  background: var(--c-red-2);
  color: var(--c-red-4);
  border-color: var(--c-red-3);
  box-shadow: 0 2px 0 var(--c-red-3);
}

.val-inline-badge.badge-missing {
  background: var(--c-yellow-2);
  color: var(--c-yellow-4);
  border-color: var(--c-yellow-3);
  box-shadow: 0 2px 0 var(--c-yellow-3);
}

/* SMART IN-TEXT STATUSLINJE (Lige over teksten) */
.sheet-inline-status {
  margin-top: 12px;
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-bottom: 3px solid var(--c-blue-3);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: var(--shadow-resting);
  animation: valSlideDown 0.2s ease-out;
}

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

.sheet-status-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sheet-status-badge {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--c-blue-1);
  border: 1px solid var(--c-blue-3);
  color: var(--c-blue-4);
}

.sheet-status-badge.all-correct {
  background: var(--c-green-1);
  border-color: var(--c-green-3);
  color: var(--c-green-4);
}

.sheet-status-msg {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.sheet-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* SMART POP-OVER TALEBOBLE DIREKTE VED SÆTNINGEN */
.sentence-tip-bubble {
  position: absolute;
  z-index: 30;
  max-width: 320px;
  width: calc(100% - 32px);
  background: #FFFFFF;
  border: 2px solid var(--c-blue-3);
  border-bottom: 4px solid var(--c-blue-4);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-lifted);
  pointer-events: auto !important;
  animation: bubblePop 0.18s ease-out;
}

@keyframes bubblePop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.tip-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tip-category-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  background: var(--tip-cat-bg, var(--c-sand-1));
  border: 1px solid var(--tip-cat-border, var(--c-sand-3));
  color: var(--tip-cat-dark, var(--c-sand-4));
}

.tip-question-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.tip-close-btn {
  background: var(--bg-app);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-main);
}

.tip-close-btn:hover {
  background: var(--border-light);
}

.tip-body-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 12px;
}

.tip-bubble-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-check-action {
  background: var(--c-blue-1) !important;
  border-color: var(--c-blue-3) !important;
  color: var(--c-blue-4) !important;
  box-shadow: 0 4px 0 var(--c-blue-3) !important;
  font-weight: 800 !important;
}

.btn-check-action:hover {
  box-shadow: 0 6px 0 var(--c-blue-3) !important;
}

.btn-check-action:active {
  box-shadow: 0 1px 0 var(--c-blue-3) !important;
}

.sheet-bottom-bar {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.legend-reminder {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================================================
   SPIL 4: KONSTRUÉR TEKST (BYG DIN FAGTEKST)
   ========================================================= */

.construct-workspace {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 20px;
}

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

.construct-step-panel {
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.construct-step-header {
  background: var(--step-bg, var(--c-sand-1));
  border: 2px solid var(--step-border, var(--c-sand-3));
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.construct-cat-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--step-dark, var(--c-sand-4));
}

.construct-cat-question {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--step-dark, var(--c-sand-4));
  opacity: 0.9;
}

.construct-choice-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.construct-choice-blocks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.construct-choice-item {
  background: #FFFFFF;
  border: 2px solid var(--border-mid);
  border-bottom: 3px solid var(--border-mid);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  line-height: 1.35;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}

.construct-choice-item:hover {
  border-color: var(--c-blue-3);
  transform: translateY(-2px);
  background: #F8FAFC;
}

.construct-choice-item.selected {
  background: var(--c-blue-1);
  border-color: var(--c-blue-3);
  border-bottom-color: var(--c-blue-4);
  color: var(--c-blue-4);
}

.construct-textarea {
  width: 100%;
  min-height: 75px;
  border: 2px solid var(--border-mid);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  resize: vertical;
  margin-bottom: 16px;
}

.construct-textarea:focus {
  outline: none;
  border-color: var(--c-blue-3);
}

.construct-nav-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* LEVENDE PLAKAT / A4 FORHÅNDSVISNING */
.construct-poster-preview {
  background: #FFFFFF;
  border: 2px solid var(--border-mid);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-resting);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.poster-sheet-header {
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poster-title-input {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
  border: none;
  border-bottom: 2px dashed var(--border-mid);
  padding: 4px 6px;
  width: 100%;
  font-family: var(--font-main);
}

.poster-title-input:focus {
  outline: none;
  border-bottom-style: solid;
  border-color: var(--c-blue-3);
}

.poster-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.poster-author-input {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  padding: 6px 10px;
  flex: 1;
  max-width: 320px;
  font-family: var(--font-main);
}

.poster-class-tag {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.poster-sheet-body {
  display: flex;
  gap: 18px;
}

@media (max-width: 650px) {
  .poster-sheet-body {
    flex-direction: column;
  }
}

.poster-img-frame {
  width: 150px;
  height: 150px;
  background: var(--bg-app);
  border: 2px solid var(--border-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.poster-img-frame img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.poster-sections-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poster-f-slot {
  background: var(--slot-bg);
  border: 2px solid var(--slot-border);
  border-left-width: 6px;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.poster-f-slot.empty {
  opacity: 0.5;
  border-style: dashed;
}

.poster-f-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--slot-dark);
  text-transform: uppercase;
}

.poster-f-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.poster-sheet-footer {
  border-top: 2px solid var(--border-light);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.poster-brand-footer {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
}

/* =========================================================
   DYRE-KARTOTEK (SIMPEL GRID)
   ========================================================= */

.kartotek-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.kartotek-card {
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-bottom: 4px solid var(--border-mid);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.kartotek-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-green-3);
}

.kartotek-thumb {
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.kartotek-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.kartotek-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

/* MODAL TIL DYREPROFIL */
.clean-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.clean-modal-backdrop.active {
  display: flex;
}

.clean-modal-dialog {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 750px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 2px solid var(--border-mid);
}

.clean-modal-header {
  padding: 16px 20px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clean-modal-title {
  font-size: 1.5rem;
  font-weight: 800;
}

.clean-modal-close {
  background: var(--bg-app);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
}

.clean-modal-body {
  padding: 20px;
}

.clean-modal-top {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.clean-modal-top img {
  width: 140px;
  height: 140px;
  object-fit: contain;
}

.clean-modal-facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Fysisk svævende klon ved træk (PlacerBrikker stil) */
.floating-drag-clone {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border-radius: 14px;
  background: #FFFFFF;
  border: 2px solid var(--c-blue-3);
  border-bottom: 4px solid var(--c-blue-4);
  box-shadow: var(--shadow-lifted);
  padding: 16px 20px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
  transform: scale(1.05);
  transform-origin: center top;
}

/* =========================================================
   DE 7 F'ER BUNDBAR & INSTRUKTIONSKASSE (DOCK)
   ========================================================= */

/* Plads til bundbaren når et spil er aktivt */
body.has-f-dock .view-section.active {
  padding-bottom: 185px !important;
}

/* Fast forankret container i bunden */
.f-dock-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  padding: 0 16px 14px 16px;
  background: linear-gradient(180deg, rgba(250, 229, 200, 0) 0%, rgba(250, 229, 200, 0.92) 28%, rgba(250, 229, 200, 0.98) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 1. Instruktionskasse over baren */
.f-dock-instruction-box {
  pointer-events: auto;
  max-width: fit-content;
  margin: 0 auto 8px auto;
  background: #FFFFFF;
  border-radius: 9999px;
  padding: 6px 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1.5px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
  -webkit-user-select: none;
}

.f-dock-instruction-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
}

.f-dock-instruction-text {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--c-neutral-4);
  text-align: center;
}

/* 2. Den lange hvide bar med de 7 F'er samt eventuelle side-værktøjer */
.f-dock-row-wrapper {
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  max-width: 1140px;
  width: 100%;
}

.f-dock-bar {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  max-width: 980px;
  width: 100%;
  padding: 12px 14px 10px 14px;
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.1);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  overflow: visible;
}

.g3-tools-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 10px 14px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.1);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  min-width: 220px;
  width: 220px;
  align-items: stretch;
  justify-content: center;
}

.g3-eraser-btn {
  width: 100%;
  min-height: 44px;
  padding: 6px 12px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  background: var(--c-neutral-1);
  border: 2px solid var(--c-neutral-2);
  color: var(--c-neutral-4);
  box-shadow: 0 3px 0 var(--c-neutral-2);
}

.g3-eraser-btn.is-active-tool {
  background: var(--c-sand-2);
  border-color: var(--c-sand-3);
  color: var(--c-sand-4);
  box-shadow: 0 3px 0 var(--c-sand-3);
}

.g3-tools-subrow {
  display: flex;
  gap: 6px;
  width: 100%;
}

.g3-subtool-btn {
  flex: 1;
  min-height: 38px;
  padding: 4px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
}

body.graphics-simple .g3-tools-box {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5) !important;
}

.g3-title-box {
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 14px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: max-content;
  margin-bottom: 12px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.04);
}

.g3-title-box .sheet-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

body.graphics-simple .g3-title-box {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5) !important;
}

.placer-brik-placeholder {
  border: 2px dashed var(--border-mid);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.02);
  pointer-events: none;
}

/* Enkelt F-kolonne */
.f-dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1 1 0px;
  min-width: 90px;
  max-width: 125px;
  overflow: visible;
}

/* 3D-kort wrapper jf. docs/components/roterendekort */
.f-bar-btn {
  width: 100%;
  min-width: 88px;
  height: 52px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  position: relative;
  perspective: 1000px;
  transition: transform 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D-roterende indre beholder (5,5 omgange / 1980deg) */
.f-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  transform-style: preserve-3d;
  transition: transform 0.8s ease-in-out;
  pointer-events: none;
}

.f-bar-btn.flipped .f-card-inner {
  transform: rotateY(1980deg);
}

/* For- og bagside med backface-visibility: hidden */
.f-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--btn-bg);
  border: none !important;
  color: var(--btn-text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  transition: box-shadow 0.25s ease, filter 0.2s linear;
}

.f-bar-btn:hover .f-card-face {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18), 0 3px 6px rgba(0, 0, 0, 0.1);
}

.f-card-back {
  transform: rotateY(180deg);
}

/* Tekst på kortet (kun F-ordet jf. instruks) */
.f-btn-title {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  transition: filter 0.2s linear;
  pointer-events: none;
}

/* Motion-blur under spin jf. docs/components/roterendekort */
.f-card-inner,
.f-card-face,
.f-btn-title {
  transition: filter 0.2s linear;
}

.f-bar-btn.blurring .f-card-inner,
.f-bar-btn.blurring .f-card-face,
.f-bar-btn.blurring .f-btn-title {
  filter: blur(4px);
}

.f-btn-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 10;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--c-neutral-4);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

/* Forklaring under knappen (ikke på selve knappen!) */
.f-btn-desc {
  font-size: 0.68rem;
  line-height: 1.18;
  color: #4A4A4A;
  font-weight: 600;
  text-align: center;
  max-width: 110px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  letter-spacing: -0.01em;
  padding: 0 2px;
}

/* 7 F-knap farver jf. COLORS.md */
.f-btn-form {
  --btn-bg: #FAE5C8;
  --btn-border: #E2A44A;
  --btn-text: #B67012;
}

.f-btn-farve {
  --btn-bg: #DEEBD7;
  --btn-border: #8CB973;
  --btn-text: #5B8543;
}

.f-btn-findested {
  --btn-bg: #CFE0F3;
  --btn-border: #5893D4;
  --btn-text: #29619F;
}

.f-btn-formering {
  --btn-bg: #FFF5C3;
  --btn-border: #FFDC2D;
  --btn-text: #C8A700;
}

.f-btn-foede {
  --btn-bg: #F8CACA;
  --btn-border: #E84444;
  --btn-text: #B21616;
}

.f-btn-fjender {
  --btn-bg: #CEEFF4;
  --btn-border: #52C7DA;
  --btn-text: #2392A5;
}

.f-btn-forsvar {
  --btn-bg: #E6CDF5;
  --btn-border: #A750DC;
  --btn-text: #7323A5;
}

/* Aktive tilstande på knappen */
.f-bar-btn.is-active-f .f-card-face {
  border: none !important;
  box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px var(--btn-border), 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

.f-bar-btn.is-revealed-f {
  opacity: 0.9;
}

.f-bar-btn.hover-target .f-card-face {
  border: none !important;
  box-shadow: 0 0 0 4px #FFFFFF, 0 0 0 6px var(--btn-border), 0 8px 18px rgba(0, 0, 0, 0.22) !important;
  filter: brightness(1.08);
}

/* Animation ved korrekt svar */
@keyframes fSuccessBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) translateY(-8px); }
}
.f-bar-btn.is-correct-pulse {
  animation: fSuccessBounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Animation ved forkert svar */
@keyframes fErrorWiggle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(-3deg); }
  75% { transform: translateX(5px) rotate(3deg); }
}
.f-bar-btn.is-error-shake {
  animation: fErrorWiggle 0.35s ease-in-out !important;
}

/* Forenklet visning til svage enheder (.graphics-simple) */
.graphics-simple .f-dock-container {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #FAE5C8 !important;
}

.graphics-simple .f-dock-instruction-box,
.graphics-simple .f-dock-bar {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5) !important;
  border: 2px solid #000000 !important;
}

.graphics-simple .f-card-face {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5) !important;
}

.graphics-simple .f-bar-btn {
  transform: none !important;
  transition: none !important;
}

.graphics-simple .f-bar-btn.blurring .f-card-inner,
.graphics-simple .f-bar-btn.blurring .f-card-face,
.graphics-simple .f-bar-btn.blurring .f-btn-title {
  filter: none !important;
}

/* Skjul redundante spil-elementer når F-baren overtager */
#view-game1 .g1-buttons-row {
  display: none !important;
}

#view-game2 .sorting-grid {
  display: none !important;
}

#view-game3 .marker-buttons-grid {
  display: none !important;
}

/* Mobil- og tablet-optimering */
@media (max-width: 768px) {
  body.has-f-dock .view-section.active {
    padding-bottom: 215px !important;
  }

  .f-dock-container {
    padding: 0 8px 10px 8px;
  }

  .f-dock-instruction-box {
    padding: 6px 12px;
    margin-bottom: 8px;
  }

  .f-dock-instruction-text {
    font-size: 0.8rem;
  }

  .f-dock-bar {
    justify-content: flex-start;
    padding: 10px 8px 6px 8px;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .f-dock-bar::-webkit-scrollbar {
    display: none;
  }

  .f-dock-item {
    min-width: 82px;
  }

  .f-bar-btn {
    min-width: 80px;
    height: 48px;
  }

  .f-btn-title {
    font-size: 0.85rem;
  }

  .f-btn-desc {
    font-size: 0.63rem;
    max-width: 90px;
  }
}

/* =========================================================
   PRINT REGLER (@media print)
   ========================================================= */

@media print {
  body {
    background: #FFFFFF !important;
  }

  .no-print,
  .app-header,
  .game-subnav,
  .construct-step-panel {
    display: none !important;
  }

  .app-main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .construct-workspace {
    display: block !important;
  }

  .construct-poster-preview {
    border: 2px solid #000000 !important;
    box-shadow: none !important;
    padding: 20mm !important;
    border-radius: 0 !important;
    page-break-after: avoid !important;
  }

  .poster-img-frame img {
    filter: grayscale(1) contrast(1.2) !important;
  }
}
