/*
 * Hvor er hun? – utseende.
 *
 * Grunnlaget er plomme og bringebær fra designprofilen. I tillegg har byen
 * egne farger: hvert sted har sin, mennene er marineblå og like, og hver
 * kvinne har sin egen jakkefarge (står i innhold.js). Gult er lyset som
 * tennes når teamet oppdager noen. Spillet har ett utseende, uansett om
 * enheten står i lys eller mørk modus.
 */

@font-face {
  font-family: 'Fraunces';
  src: url('fonter/fraunces.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('fonter/karla.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonter/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  /* Fra profilen */
  --blekk: #2E2238;
  --plomme: #3A2A48;
  --papir: #F7F2F7;
  --bringebaer: #C2335F;
  --bringebaer-lys: #F49AB8;

  /* Utenfor profilen */
  --natt: #241A2E;
  --sol: #FFC44D;
  --vest: #1D2E52;
  --team: #DCE8FB;

  /* Byens farger. Kikkerten bytter dem ut med grått lenger ned. */
  --golf: #1F7A55;
  --golf-fairway: #2F9C6E;
  --golf-sand: #F2D48C;
  --flagg: #FFC44D;
  --scene: #4B2F7D;
  --scene-gulv: #2E2238;
  --scene-kant: #C2335F;
  --scene-stol: #6A49A6;
  --lyskaster: #FFC44D;
  --kontor: #2757A8;
  --kontor-pult: #4D7FD6;
  --rom: #DCE8FB;
  --kafe: #C97A16;
  --kafe-disk: #7A4609;
  --kafe-bord: #FBE3B5;

  --bg: var(--blekk);
  --tekst: var(--papir);
  --flate: var(--plomme);
  --kant: color-mix(in srgb, var(--papir) 24%, var(--blekk));
  --dempet: color-mix(in srgb, var(--papir) 74%, var(--blekk));

  --titler: 'Fraunces', Georgia, serif;
  --brod: 'Karla', system-ui, sans-serif;
  --tall: 'Bricolage Grotesque', 'Karla', system-ui, sans-serif;
  --sprett: cubic-bezier(0.34, 1.45, 0.5, 1);
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--natt);
  color: var(--tekst);
  font-family: var(--brod);
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

.skjult {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Rammen ---------- */

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow: hidden;
  background: var(--bg);
}

/* ---------- Måleren ---------- */

.maler {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 8px;
  flex: none;
}

.maler-tall {
  font-family: var(--tall);
  font-weight: 800;
  font-size: 60px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  min-width: 2.2ch;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transform-origin: left center;
  transition: color 0.3s;
}
.maler-tegn { font-size: 26px; font-weight: 700; }
.maler-tall.dunk { animation: dunk 0.45s var(--sprett); }
@keyframes dunk {
  0% { transform: scale(1); }
  40% { transform: scale(1.14) rotate(-2deg); }
  100% { transform: scale(1); }
}
.maler.nadd .maler-tall { color: var(--sol); }

.maler-side { flex: 1; min-width: 0; }

.maler-stolpe {
  position: relative;
  height: 18px;
  margin: 16px 0 6px;
  border-radius: 9px;
  background: var(--plomme);
}
.maler-fyll {
  height: 100%;
  width: 0;
  border-radius: 9px;
  background: var(--bringebaer);
  transition: width 0.5s var(--sprett), background-color 0.3s;
}
.maler.nadd .maler-fyll { background: var(--sol); }
.maler-strek {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--papir);
}
.maler-strek span {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: 1px;
  font-family: var(--tall);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.maler-mangler { font-weight: 700; font-size: 15px; line-height: 1.25; }
.maler-antall { font-size: 13px; color: var(--dempet); }

/* ---------- Rolf ---------- */

.rolf {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 0 16px 8px;
  min-height: 60px;
  flex: none;
}
.rolf-figur { width: 46px; height: 53px; flex: none; }
.rolf-slips { fill: var(--bringebaer); }
.rolf-haar { fill: #8C8794; stroke: var(--blekk); stroke-width: 2; stroke-linejoin: round; }
.rolf-oye { fill: var(--blekk); }
.rolf-munn { fill: none; stroke: var(--blekk); stroke-width: 2; stroke-linecap: round; }
.rolf-boble {
  flex: 1;
  padding: 9px 14px;
  border-radius: 16px 16px 16px 4px;
  background: var(--papir);
  color: var(--blekk);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  min-height: 40px;
  transform-origin: left bottom;
}
.rolf-boble.ny { animation: boble 0.3s var(--sprett); }
@keyframes boble {
  from { transform: scale(0.92); }
  to { transform: none; }
}

/* ---------- Byen ---------- */

.by {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 0 8px;
}
.kart {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.flis, .pynt { transition: fill 0.4s ease, opacity 0.4s ease; }
.sted-golf { fill: var(--golf); }
.sted-scene { fill: var(--scene); }
.sted-kontor { fill: var(--kontor); }
.sted-kafe { fill: var(--kafe); }
.golf-fairway { fill: var(--golf-fairway); }
.golf-sand { fill: var(--golf-sand); }
.blekk { fill: var(--blekk); }
.blekk-strek { fill: none; stroke: var(--blekk); stroke-width: 2; }
.flagg { fill: var(--flagg); stroke: var(--blekk); stroke-width: 1.5; stroke-linejoin: round; }
.lyskaster { fill: var(--lyskaster); opacity: 0.22; }
.kart.foredrag .lyskaster { opacity: 0.85; }
.scene-gulv { fill: var(--scene-gulv); }
.scene-kant { fill: var(--scene-kant); }
.kart.foredrag .scene-kant { fill: var(--sol); }
.scene-stol { fill: var(--scene-stol); }
.kontor-pult { fill: var(--kontor-pult); }
.rom { fill: var(--rom); stroke: var(--blekk); stroke-width: 2; stroke-dasharray: 5 4; }
.kafe-disk { fill: var(--kafe-disk); }
.kafe-bord { fill: var(--kafe-bord); stroke: var(--kafe-disk); stroke-width: 1.5; }
.team-stripe {
  fill: var(--team);
  stroke: var(--blekk);
  stroke-width: 2;
  stroke-dasharray: 5 4;
}

.sted-navn {
  font-family: var(--brod);
  font-weight: 800;
  font-size: 11px;
  fill: var(--papir);
  transition: opacity 0.3s;
}
.sted-navn-kaffebaren,
.sted-navn-styrerommet,
.sted-navn-teamet { fill: var(--blekk); }
.sted-navn-teamet.borte { opacity: 0; }

/* Figurene */

.strek { stroke: var(--blekk); stroke-width: 2; stroke-linejoin: round; }
.strek-tynn { stroke: var(--blekk); stroke-width: 1.6; stroke-linejoin: round; }
.strek-tykk { stroke: var(--blekk); stroke-width: 2.5; stroke-linejoin: round; }

.figur {
  transition: transform 0.8s ease-in-out, opacity 0.5s ease;
}
.mann { pointer-events: none; }
.skygge { fill: var(--blekk); opacity: 0.28; }
.mann-vest { fill: var(--vest); }
.mann-skjorte { fill: #fff; }
.mann-som { fill: none; stroke: #5E73A3; stroke-width: 1.2; }
.mann-hode { fill: var(--papir); }
.mann-haar { fill: var(--blekk); }
.mann-kikkert { fill: var(--blekk); }
.mann-glass { fill: var(--sol); }

.kvinne {
  cursor: pointer;
  outline: none;
  transition-timing-function: var(--sprett), ease;
}
.kvinne .treff { fill: transparent; }
.kvinne .kropp { transition: transform 0.15s; }
.kvinne.usynlig:hover .kropp,
.kvinne.usynlig:active .kropp { transform: translateY(-2px); }
.kvinne .ring {
  fill: none;
  stroke: var(--papir);
  stroke-width: 1.6;
  stroke-dasharray: 3 3.2;
  opacity: 0.9;
}
.kvinne.synlig .ring,
.kvinne.ansatt .ring {
  stroke: var(--sol);
  stroke-width: 2.2;
  stroke-dasharray: none;
  opacity: 1;
}
.kvinne.valgt .ring,
.kvinne:focus-visible .ring {
  stroke: var(--papir);
  stroke-width: 3.5;
  stroke-dasharray: none;
  opacity: 1;
}
.kvinne:focus-visible .treff { stroke: var(--papir); stroke-width: 1.5; stroke-dasharray: 3 3; }

.kvinne .merke { display: none; }
.kvinne.synlig .merke { display: block; }
.merke-bunn { fill: var(--sol); stroke: var(--blekk); stroke-width: 1.6; }
.merke-tall {
  font-family: var(--tall);
  font-weight: 800;
  font-size: 9px;
  fill: var(--blekk);
  text-anchor: middle;
}

.bro-linje {
  stroke: var(--sol);
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: tegn 0.4s ease-out forwards;
}
.bro-linje.fast { stroke-width: 3; }
@keyframes tegn { to { stroke-dashoffset: 0; } }

.puls {
  fill: none;
  stroke: var(--sol);
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  animation: puls 0.6s ease-out forwards;
}
@keyframes puls {
  from { transform: scale(0.4); opacity: 1; }
  to { transform: scale(2.6); opacity: 0; }
}
.konfetti {
  transform-box: fill-box;
  transform-origin: center;
  animation: sprut 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes sprut {
  from { transform: translate(0, 0) rotate(0); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}

/* Søknadsbunken: ett ark per søknad. De fra kvinner har bringebærfarge. */
.soknader-bunn { fill: var(--papir); stroke: var(--blekk); stroke-width: 2.5; }
.soknad {
  fill: #B4AEBC;
  transform-box: fill-box;
  transform-origin: center;
  animation: ark 0.22s ease-out both;
}
.soknad.fra-kvinne { fill: var(--bringebaer); }
@keyframes ark {
  from { transform: translateY(-10px) scale(0.4); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.soknader-tekst {
  font-family: var(--tall);
  font-weight: 700;
  font-size: 15px;
  fill: var(--blekk);
  text-anchor: middle;
}

/* Kikkerten: byen slik teamet ser den. Grå, og uten dem de ikke kjenner. */

.kart.kikkert {
  --golf: #3A3A41;
  --golf-fairway: #4A4A52;
  --golf-sand: #77767D;
  --flagg: #6A6970;
  --scene: #2C2B32;
  --scene-gulv: #1F1E24;
  --scene-kant: #45444C;
  --scene-stol: #45444C;
  --lyskaster: #77767D;
  --kontor: #333239;
  --kontor-pult: #4B4A52;
  --rom: #8C8B93;
  --kafe: #56555D;
  --kafe-disk: #3C3B42;
  --kafe-bord: #8A8991;
}
.kikkert-flate {
  fill: var(--natt);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.kart.kikkert .kikkert-flate { opacity: 0.85; }
.kart.kikkert .kvinne.usynlig { opacity: 0; pointer-events: none; }
.kart.kikkert .sted-navn-kaffebaren { fill: var(--papir); }

.kikkert-tekst {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--papir);
  color: var(--blekk);
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.app.kikkert-pa .kikkert-tekst { opacity: 1; }

/* ---------- Handlingslinjen ---------- */

.linje {
  flex: none;
  padding: 6px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.app[data-fase='start'] .linje { visibility: hidden; }

.beskjed {
  min-height: 20px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--dempet);
  text-align: center;
}
.beskjed.viktig { color: var(--sol); font-weight: 700; }

.linje-rad {
  display: flex;
  align-items: center;
  gap: 8px;
}
.linje-status {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.runde { font-family: var(--tall); font-weight: 700; font-size: 15px; }
.handlinger { font-size: 13px; color: var(--dempet); }

.knapp {
  appearance: none;
  -webkit-appearance: none;
  min-height: 48px;
  padding: 8px 16px;
  border-radius: 14px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.knapp:focus-visible,
.kort-lukk:focus-visible,
.bro:focus-visible {
  outline: 3px solid var(--sol);
  outline-offset: 2px;
}
.knapp:disabled { cursor: default; opacity: 0.45; }

.knapp-hoved { background: var(--bringebaer); border-color: var(--bringebaer); color: var(--papir); }
.knapp-rolig { background: transparent; border-color: var(--papir); }
.knapp-rolig.pa { background: var(--papir); color: var(--blekk); }
/* Knappene nederst får plass ved siden av hverandre på en smal skjerm. */
.linje-rad .knapp { padding: 6px 12px; }
#kikkert-knapp { max-width: 104px; }
.knapp-hoved.venter { background: transparent; border-color: var(--kant); }
.knapp-stor { width: 100%; min-height: 54px; font-size: 18px; }

.rolf-forslag {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: var(--plomme);
  border-color: var(--kant);
  border-style: dashed;
  font-weight: 400;
}
.rolf-forslag-merke {
  grid-column: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--dempet);
}
.rolf-forslag-tittel { grid-column: 1; font-weight: 800; }
.rolf-forslag-pris {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 12px;
  color: var(--dempet);
  text-align: right;
  max-width: 9ch;
}

/* ---------- Kortet ---------- */

.kort {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  max-height: 78%;
  overflow-y: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--plomme);
  box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.45);
  animation: opp 0.28s var(--sprett);
}
@keyframes opp {
  from { transform: translateY(28px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.kort-topp { display: flex; align-items: center; gap: 12px; }
.brikke {
  flex: none;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--plomme);
  overflow: hidden;
  display: grid;
  place-items: end center;
}
.brikke .portrett { width: 42px; height: 74px; margin-bottom: -24px; }
.brikke-golfbanen { background: var(--golf); }
.brikke-konferansescenen { background: var(--scene); }
.brikke-kontorlandskapet { background: var(--kontor); }
.brikke-kaffebaren { background: var(--kafe); }
.kort-hvem { flex: 1; min-width: 0; }
.kort-lukk {
  flex: none;
  align-self: flex-start;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 2px solid var(--kant);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.kort-navn {
  font-family: var(--titler);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.12;
  outline: none;
}
.kort-rolle { font-weight: 700; color: var(--bringebaer-lys); margin-top: 2px; line-height: 1.25; }
.kort-cv { margin-top: 12px; }
.kort-cv li {
  position: relative;
  padding-left: 16px;
  margin-top: 3px;
}
.kort-cv li::before {
  content: '';
  position: absolute;
  left: 2px; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sol);
}
.kort-derfor {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--blekk);
  border-left: 4px dashed var(--kant);
}
.kort-derfor h3 { font-size: 12px; font-weight: 700; color: var(--dempet); }
.kort-kjenner { margin-top: 10px; font-size: 14px; color: var(--dempet); }
.kort-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--sol);
  color: var(--blekk);
  font-weight: 700;
}
.kort-broer { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

.bro {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 2px solid var(--bringebaer);
  background: var(--bringebaer);
  color: var(--papir);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s;
}
.bro:active:not(:disabled) { transform: scale(0.98); }
.bro strong { display: block; font-size: 16px; font-weight: 800; }
.bro span { display: block; font-size: 14px; line-height: 1.3; }
.bro:disabled {
  cursor: default;
  background: transparent;
  border-color: var(--kant);
  border-style: dashed;
  color: var(--dempet);
}

/* ---------- Startskjermen ---------- */

.ark {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 6;
  padding: 22px 20px calc(18px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--plomme);
  box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.45);
}
.ark h1 {
  font-family: var(--titler);
  font-weight: 600;
  font-size: 54px;
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.ark p { margin-top: 10px; }
.ark .knapp { margin-top: 16px; }
.oppdiktet { margin-top: 12px; font-size: 13px; color: var(--dempet); text-align: center; }

/* ---------- Sluttskjermen ---------- */

.slutt {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background: var(--blekk);
  animation: opp 0.35s ease-out;
}
.slutt-inni { padding: 28px 20px calc(24px + env(safe-area-inset-bottom)); }
.slutt h1 {
  font-family: var(--titler);
  font-weight: 600;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  outline: none;
}
.slutt-ingress {
  margin-top: 12px;
  font-family: var(--tall);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
  color: var(--sol);
}
/* Tittelen spilleren får, som et lite merke under ingressen. */
.slutt-tittelmerke {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--sol);
  color: var(--blekk);
  font-family: var(--tall);
  font-weight: 700;
  font-size: 17px;
  transform: rotate(-2deg);
}
.slutt h2 {
  margin-top: 26px;
  font-family: var(--titler);
  font-weight: 600;
  font-size: 22px;
}
.slutt-liste li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--plomme);
}
.slutt-liste .brikke { width: 48px; height: 48px; }
.slutt-liste .brikke .portrett { width: 33px; height: 58px; margin-bottom: -19px; }
.slutt-liste div { flex: 1; min-width: 0; }
#slutt-ikke-sett li { background: transparent; border: 2px dashed var(--kant); }
/* De som aldri ble sett, står på grått, slik teamet så byen. */
#slutt-ikke-sett .brikke { background: #56555D; }
.slutt-liste strong { display: block; }
.slutt-liste .rolle { display: block; font-size: 14px; color: var(--dempet); }
.slutt-liste .hvordan { display: block; font-size: 14px; margin-top: 2px; }
.slutt-sporsmal {
  margin-top: 28px;
  padding: 18px;
  border-radius: 16px;
  background: var(--papir);
  color: var(--blekk);
  font-family: var(--titler);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
}
/* Resultatkortet */
.slutt-kort { margin-top: 20px; }
.slutt-kort img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
  border-radius: 18px;
  border: 2px solid var(--kant);
}
.slutt-kort .slutt-knapper { margin-top: 12px; }
.knapp-lenke {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}
.knapp-lenke[hidden] { display: none; }

/* Unnskyldningsbingoen */
.slutt-bingo-tekst { margin-top: 6px; font-size: 15px; color: var(--dempet); }
.bingo {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.bingo li {
  aspect-ratio: 1.25;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 12px;
  border: 2px dashed var(--kant);
  font-family: var(--tall);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  text-align: center;
  color: var(--dempet);
}
.bingo li.krysset {
  border: 2px solid var(--sol);
  background: var(--sol);
  color: var(--blekk);
  font-size: 14px;
}

.slutt-fakta-ingress { margin-top: 6px; font-weight: 700; }
.slutt-fakta li { margin-top: 12px; font-size: 15px; }
.slutt-fakta a { color: var(--bringebaer-lys); }
.slutt-fakta .navn { display: block; font-weight: 800; }
.slutt-fakta .kilde { display: block; font-size: 13px; color: var(--dempet); }
.slutt-knapper { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.slutt-del-svar { min-height: 20px; margin-top: 8px; font-size: 14px; text-align: center; }
.slutt-del-tekst {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--kant);
  background: var(--plomme);
  color: inherit;
  font: inherit;
  font-size: 14px;
}

/* ---------- Bred skjerm ---------- */

@media (min-width: 900px) {
  .app { max-width: 900px; padding-right: 384px; }
  .kort {
    left: auto;
    right: 12px;
    top: 16px;
    bottom: auto;
    width: 360px;
    max-height: calc(100% - 32px);
    border-radius: 22px;
    box-shadow: none;
  }
  .ark {
    left: auto;
    right: 12px;
    top: 50%;
    bottom: auto;
    width: 360px;
    transform: translateY(-50%);
    border-radius: 24px;
    box-shadow: none;
  }
  .slutt-inni { max-width: 620px; margin: 0 auto; }
  .slutt-knapper { flex-direction: row; }
  .slutt-knapper > * { flex: 1; }
  .bingo { max-width: 420px; }
}

/* ---------- Lav skjerm ---------- */

@media (max-height: 640px) {
  .maler-tall { font-size: 44px; }
  .maler-tegn { font-size: 20px; }
  .maler-stolpe { margin-top: 14px; }
  .rolf { min-height: 46px; }
  .rolf-figur { width: 34px; height: 39px; }
  .ark h1 { font-size: 38px; }
}

/* ---------- Redusert bevegelse ---------- */

@media (prefers-reduced-motion: reduce) {
  .figur, .flis, .pynt, .maler-fyll, .maler-tall, .kikkert-flate, .kikkert-tekst,
  .kvinne .kropp, .bro { transition: none !important; }
  .kort, .slutt, .maler-tall.dunk, .rolf-boble.ny { animation: none; }
  .bro-linje { animation: none; stroke-dashoffset: 0; }
  .soknad { animation: none; }
}
