/* Dagens fem på nett. Fargene er appens (GeoPalette). Mobil først. */

:root {
  --ink: #1a120e;
  --parchment: #f3e9d7;
  --parchment-deep: #e6d6ba;
  --paper: #fbf7ef;
  --card: #fffbf4;
  --night: #0f2533;
  --mist: #1e5a6e;
  --moss: #2a8b6e;
  --gold: #e8b84a;
  --gold-deep: #c99420;
  --guess: #2b9aac;
  --route: #c45c3a;
  --live: #ff5a4d;
  --display: 'Teko', 'Arial Narrow', Impact, sans-serif;
  --text: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --maxw: 560px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--text);
  -webkit-text-size-adjust: 100%;
  font-size: 17px;
  line-height: 1.45;
}
body {
  min-height: 100dvh;
}
button,
input {
  font: inherit;
}
.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}
.mono {
  font-variant-numeric: tabular-nums;
}
.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.ico svg {
  width: 1em;
  height: 1em;
}
.app {
  min-height: 100dvh;
}

/* --- Sider (forside og resultat) ------------------------------------------ */

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 16px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.center-col {
  min-height: 80dvh;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.brand {
  display: flex;
  align-items: center;
}
.brand-name {
  font-size: 30px;
  color: var(--mist);
}
.loading {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--mist);
}
.spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 4px solid var(--parchment-deep);
  border-top-color: var(--gold-deep);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Heltekortet ---------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0b1d2a, var(--night) 55%, #14384a);
  color: #fff;
  border-radius: 26px;
  padding: 20px 20px 22px;
  box-shadow: 0 10px 30px rgba(15, 37, 51, 0.28);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero > * {
  position: relative;
}
.hero-radar {
  position: absolute !important;
  inset: auto -80px -90px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 31%, rgba(255, 255, 255, 0.07) 31.5% 32%, transparent 32.5% 52%, rgba(255, 255, 255, 0.06) 52.5% 53%, transparent 53.5% 73%, rgba(255, 255, 255, 0.05) 73.5% 74%, transparent 74.5%),
    conic-gradient(from 0deg, rgba(232, 184, 74, 0.22), transparent 18%);
  animation: sweep 9s linear infinite;
}
@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}
.live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    transform: scale(1.5);
    opacity: 0.55;
  }
}
.live-next {
  margin-left: auto;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.75);
}
.hero-title {
  font-size: 58px;
  margin: 4px 0 0;
}
.hero-title small {
  font-size: 20px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}
.hero-text {
  font-size: 19px;
  margin: 0;
  max-width: 24em;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  line-height: 1.35;
}
.kinds {
  display: flex;
  gap: 8px;
  margin: 4px 0;
}
.kind {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.6px solid rgba(255, 255, 255, 0.34);
  display: grid;
  place-items: center;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.8);
}
.intro-stats {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
}
.intro-stats strong {
  color: #fff;
}
.hero .btn-primary {
  background: var(--gold);
  color: var(--night);
  margin-top: 6px;
}
.hero .btn-primary:hover:not(:disabled) {
  background: #f0c562;
}

.banner {
  background: var(--card);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 14px 16px;
  line-height: 1.35;
  box-shadow: 0 4px 14px rgba(15, 37, 51, 0.08);
}
.banner-big {
  font-size: 19px;
}
.banner-big strong {
  font-family: var(--display);
  font-size: 30px;
  color: var(--route);
  vertical-align: -2px;
}
.banner-win {
  border-color: var(--moss);
  background: #eef8f3;
}
.banner-old {
  border-color: var(--parchment-deep);
  font-size: 16px;
}

.how h2,
.card h2 {
  font-size: 30px;
  margin: 0 0 8px;
  color: var(--night);
}
.how ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.how li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.how li > div {
  display: grid;
  line-height: 1.3;
}
.how li > div strong {
  font-size: 18px;
}
.how li > div span {
  color: rgba(26, 18, 14, 0.78);
  font-size: 17px;
}
.how-ico {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--night);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 19px;
}
.how-note {
  font-size: 16px;
  color: rgba(26, 18, 14, 0.65);
}

.foot {
  font-size: 15px;
  color: rgba(26, 18, 14, 0.62);
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.foot p {
  margin: 0;
}
.foot-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.foot a {
  color: var(--mist);
  font-weight: 700;
}
.foot-credit {
  font-size: 14px;
}

/* --- Knapper ------------------------------------------------------------- */

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    background 0.15s,
    transform 0.05s,
    opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) {
  transform: scale(0.985);
}
.btn-primary {
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  background: var(--night);
  color: #fff;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.btn-primary:hover:not(:disabled) {
  background: #17394d;
}
.btn-primary:disabled {
  background: #7d9a95;
  cursor: default;
}
.btn-stopp {
  flex: 1;
  min-height: 54px;
  background: #c62828;
  color: #fff;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.btn-stopp .ico {
  font-size: 26px;
}
.btn-ghost {
  min-width: 52px;
  min-height: 44px;
  padding: 6px 14px;
  background: transparent;
  color: var(--night);
  border: 1.6px solid rgba(15, 37, 51, 0.35);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
}
.btn-round {
  flex: none;
  width: 44px;
  height: 44px;
  background: var(--paper);
  color: var(--night);
  border: 1.6px solid rgba(15, 37, 51, 0.3);
  font-size: 28px;
}
.btn-spool {
  flex: none;
  width: 76px;
  min-height: 54px;
  flex-direction: column;
  gap: 0;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  touch-action: none;
  user-select: none;
}
.btn-spool .ico {
  font-size: 24px;
}
.btn-spool.is-on {
  background: var(--gold);
  color: var(--ink);
}
.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1.6px solid var(--parchment-deep);
  background: #fff;
  color: var(--ink);
}
.input:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}

/* --- Spillskjermen ------------------------------------------------------- */

.game {
  height: 100dvh;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: 0 0 40px rgba(15, 37, 51, 0.2);
}
.hdr {
  flex: none;
  position: relative;
  z-index: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--night), #14384a);
  border-radius: 0 0 22px 22px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 14px;
}
.hdr-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.hdr-row > div:first-child {
  flex: 1;
  min-width: 0;
}
.kicker {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.hdr-km {
  text-align: right;
}
.hdr-km .kicker {
  color: rgba(255, 255, 255, 0.6);
}
.hdr-km-n {
  font-size: 34px;
}
.hdr-close {
  appearance: none;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hdr-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.dots {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.34);
  color: rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  font-size: 14px;
}
.dot-now {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(232, 184, 74, 0.14);
}
.dot-blink {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--night);
}
.dot-treff {
  background: var(--moss);
  border-color: var(--moss);
  color: #fff;
}
.dot-bom {
  background: var(--route);
  border-color: var(--route);
  color: #fff;
}
.prompt {
  margin: 6px 0 0;
  font-size: 38px;
  font-weight: 600;
}

.body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #dfe9ea;
  overflow: hidden;
  margin-top: -22px;
  padding-top: 0;
}
.stage-paper {
  background: var(--parchment);
  overflow-y: auto;
}
.stage-film {
  background: var(--night);
}
.map {
  position: absolute;
  inset: 0;
  background: #dfe9ea;
}
.leaflet-container {
  font: inherit;
}
.map-credit {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 500;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  color: #444;
  pointer-events: none;
}
.chip {
  position: absolute;
  z-index: 500;
  left: 12px;
  top: 34px;
  max-width: calc(100% - 100px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(40, 52, 60, 0.92);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  pointer-events: none;
}
.chip .ico {
  color: var(--gold);
  font-size: 17px;
}
.bar {
  flex: none;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--paper);
}
.bar-host {
  flex: none;
}
.center {
  min-height: 100%;
  display: grid;
  align-content: center;
  padding: 36px 16px 16px;
}

/* Nålen: fast i kartets midte */
.reticle {
  position: absolute;
  z-index: 450;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  font-size: 56px;
  color: var(--guess);
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

/* Markører */
.leaflet-marker-icon.mk {
  display: grid;
  place-items: center;
  background: none;
  border: 0;
}
.mk-train {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--night);
  color: #fff;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  font-size: 22px;
  cursor: grab;
}
.mk-guess {
  font-size: 40px;
  color: var(--guess);
  display: grid;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.mk-blink {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

/* --- Kartknapper og zoom-hint --------------------------------------------- */

.mc {
  position: absolute;
  z-index: 520;
  right: 10px;
  top: 64px;
}
.mc-card {
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  overflow: visible;
  display: flex;
  flex-direction: column;
}
.mc-btn {
  appearance: none;
  position: relative;
  border: 0;
  background: transparent;
  width: 46px;
  height: 46px;
  font-size: 24px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 14px;
}
.mc-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}
.mc-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  opacity: 0;
  pointer-events: none;
  animation: ring 1s ease-in-out forwards;
}
.mc-ring-1::after {
  animation-delay: 0.3s;
}
.mc-ring-2::after {
  animation-delay: 1.3s;
}
@keyframes ring {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}
.mc-hint {
  position: absolute;
  right: 54px;
  top: -66px;
  width: 0;
  height: 0;
  pointer-events: none;
  animation: hint-life 4.4s forwards;
}
@keyframes hint-life {
  0%,
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.mc-note {
  position: absolute;
  right: 108px;
  top: 70px;
  width: 214px;
  padding: 10px 14px 12px;
  border-radius: 14px;
  background: rgba(15, 37, 51, 0.92);
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  display: grid;
  gap: 2px;
  line-height: 1.25;
  opacity: 0;
  animation: note-in 0.3s ease-out forwards;
}
.mc-note strong {
  font-size: 18px;
  font-weight: 800;
}
.mc-note span {
  font-size: 15.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}
@keyframes note-in {
  to {
    opacity: 1;
  }
}
.mc-arrow {
  position: absolute;
  right: 0;
  top: 0;
  width: 110px;
  height: 130px;
}
.mc-arrow svg {
  display: block;
  overflow: visible;
}
.mc-arrow-g {
  animation: arrow-push 0.55s ease-in-out 0.9s 3;
}
.mc-arrow-dark {
  stroke: rgba(15, 37, 51, 0.85);
}
.mc-arrow-path,
.mc-arrow-gold {
  stroke: var(--gold);
}
.mc-arrow svg path:not(.mc-arrow-head) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: arrow-draw 0.7s ease-out 0.15s forwards;
}
.mc-arrow-head {
  opacity: 0;
  animation: arrow-head 0.2s ease-out 0.75s forwards;
}
@keyframes arrow-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes arrow-head {
  to {
    opacity: 1;
  }
}
@keyframes arrow-push {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, 2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-radar,
  .live-dot,
  .mc-arrow-g,
  .mc-ring::after {
    animation: none;
  }
  .mc-arrow svg path:not(.mc-arrow-head) {
    stroke-dashoffset: 0;
    animation: none;
  }
  .mc-arrow-head {
    opacity: 1;
    animation: none;
  }
}

/* --- Glidebryter og skala -------------------------------------------------- */

.card {
  background: var(--card);
  border-radius: 24px;
  padding: 20px 18px 18px;
  box-shadow: 0 6px 18px rgba(15, 37, 51, 0.14);
  display: grid;
  gap: 6px;
}
.card-kicker {
  text-align: center;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(26, 18, 14, 0.5);
}
.kicker-gold {
  color: var(--gold-deep);
}
.big-value {
  font-family: var(--display);
  font-weight: 600;
  font-size: 68px;
  line-height: 1.1;
  text-align: center;
  color: var(--night);
  min-height: 82px;
  display: grid;
  place-items: center;
  overflow-wrap: anywhere;
}
.big-value.is-hint {
  font-size: 34px;
  color: rgba(15, 37, 51, 0.6);
}
.guess-line {
  text-align: center;
  font-weight: 700;
  color: rgba(26, 18, 14, 0.7);
}

.sl {
  position: relative;
  height: 44px;
  margin: 4px 0 0;
  touch-action: none;
  cursor: pointer;
  outline: none;
  flex: 1;
}
.sl:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 12px;
}
.sl-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 16px;
  height: 12px;
  border-radius: 6px;
  background: var(--parchment-deep);
}
.sl-fill {
  position: absolute;
  left: 0;
  top: 16px;
  height: 12px;
  width: 0;
  border-radius: 6px;
  background: transparent;
}
.sl-thumb {
  position: absolute;
  top: 6px;
  left: 0;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.15s,
    transform 0.15s;
}
.sl.is-set .sl-thumb {
  opacity: 1;
  transform: none;
}
.card .sl-fill {
  background: var(--mist);
}
.card .sl:not(.is-set) .sl-fill {
  background: transparent;
}
.scale-ends {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(26, 18, 14, 0.55);
}
.nudges {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.glid {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 0;
  background: var(--paper);
}
.glid .sl {
  margin: 0;
}
.glid .sl-fill {
  background: var(--gold);
}
.glid .sl-thumb {
  background: var(--night);
  opacity: 1;
  transform: none;
}
.glid .sl:not(.is-set) .sl-thumb {
  left: 0;
}

/* Skalaen etter svaret */
.scale {
  position: relative;
  height: 74px;
  margin: 10px 8px 0;
}
.scale-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 34px;
  height: 6px;
  border-radius: 3px;
  background: var(--parchment-deep);
}
.scale-ok {
  position: absolute;
  top: 31px;
  height: 12px;
  border-radius: 6px;
  background: rgba(42, 139, 110, 0.35);
}
.scale-mark {
  position: absolute;
  top: 0;
  width: 0;
  height: 74px;
}
.scale-mark::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 22px;
  width: 4px;
  height: 46px;
  border-radius: 2px;
  background: var(--c);
}
.scale-mark span {
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  top: 0;
  padding: 1px 10px 2px;
  border-radius: 999px;
  background: var(--c);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.scale-fasit {
  --c: var(--gold-deep);
}
.scale-guess {
  --c: var(--guess);
}

/* --- Film ---------------------------------------------------------------- */

.film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--night);
}
.film-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  z-index: 3;
}
.film-credit {
  position: absolute;
  z-index: 500;
  left: 10px;
  right: 10px;
  bottom: 6px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

/* --- Etter svaret ---------------------------------------------------------- */

.reveal {
  flex: none;
  position: relative;
  z-index: 610;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  margin-top: -20px;
  padding: 16px 16px calc(14px + env(safe-area-inset-bottom));
  display: grid;
  gap: 6px;
  box-shadow: 0 -6px 20px rgba(15, 37, 51, 0.16);
}
.reveal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tier {
  padding: 2px 14px;
  border-radius: 999px;
  color: #fff;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.tier-blink {
  background: var(--gold);
  color: var(--night);
}
.tier-treff {
  background: var(--moss);
}
.tier-bom {
  background: var(--route);
}
.km {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
}
.km-blink {
  color: var(--gold-deep);
}
.km-treff {
  color: var(--moss);
}
.km-bom {
  color: var(--route);
}
.reveal-head {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.05;
  color: var(--night);
}
.reveal-detail {
  font-size: 16px;
  font-weight: 700;
  color: rgba(26, 18, 14, 0.62);
}
.reveal-fact {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 6px;
}

/* --- Resultat ------------------------------------------------------------- */

.hero-final {
  align-items: center;
  text-align: center;
  padding: 22px 18px 24px;
}
.hero-final .kicker {
  color: var(--gold);
}
.final-label {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}
.final-km {
  font-size: 104px;
}
.final-km small {
  font-size: 34px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}
.final-cmp {
  margin: 0;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}
.final-place {
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 17px;
}
.final-place strong {
  color: var(--gold);
}
.final-rounds {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.rchip {
  min-width: 58px;
  padding: 6px 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
}
.rchip .display {
  font-size: 22px;
}
.rchip-blink {
  background: var(--gold);
  color: var(--night);
}
.rchip-treff {
  background: var(--moss);
}
.rchip-bom {
  background: var(--route);
}
.share p {
  margin: 0 0 6px;
  line-height: 1.4;
}
.share .btn-primary {
  margin-top: 4px;
}
.share-note {
  font-size: 16px;
  font-weight: 700;
  color: var(--moss);
  overflow-wrap: anywhere;
  min-height: 1em;
}
.board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.board li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
}
.board li.is-me {
  background: rgba(232, 184, 74, 0.25);
  font-weight: 800;
}
.board-rank {
  width: 24px;
  font-weight: 800;
  color: var(--gold-deep);
}
.board-name {
  flex: 1;
}
.board-km {
  font-size: 24px;
}
.board-note {
  font-size: 14px;
  color: rgba(26, 18, 14, 0.55);
  margin: 8px 0 0;
}
.next-round {
  text-align: center;
  font-weight: 700;
  color: var(--mist);
}

@media (min-width: 700px) {
  .game {
    border-radius: 26px;
    margin: 16px auto;
    height: calc(100dvh - 32px);
    overflow: hidden;
  }
  .page {
    padding-top: 30px;
  }
}

@media (max-width: 380px) {
  .mc-note {
    width: 160px;
  }
  .hero-title {
    font-size: 50px;
  }
  .final-km {
    font-size: 88px;
  }
}

/* --- Servergenererte sider ---------------------------------------------- */

a.btn {
  text-decoration: none;
}
a.btn-primary {
  display: flex;
}
a.hdr-close {
  text-decoration: none;
}
.brand-name {
  text-decoration: none;
}
.loading-inline {
  place-items: center;
}
.share-form {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.share-form .input {
  flex: 1;
}
.share-form .btn-ghost {
  font-size: 18px;
  white-space: nowrap;
}
.share-url {
  font-size: 15px;
  color: rgba(26, 18, 14, 0.7);
  margin-bottom: 4px;
}

/* --- Reklamen for appen ---------------------------------------------------- */

.promo {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px 18px 22px;
  color: #fff;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(232, 184, 74, 0.28), transparent 55%),
    linear-gradient(165deg, #14384a, var(--night) 70%);
  box-shadow: 0 10px 30px rgba(15, 37, 51, 0.28);
  display: grid;
  gap: 14px;
}
.promo-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.promo-logo {
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.promo h2 {
  margin: 0;
  font-size: 44px;
  color: #fff;
}
.promo .kicker {
  color: var(--gold);
}
.promo-lead {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}
.promo-shots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 2px 0;
}
.promo-shots img {
  width: 31%;
  max-width: 150px;
  height: auto;
  border-radius: 16px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.promo-shots img:nth-child(1) {
  transform: translateY(8px) rotate(-3deg);
}
.promo-shots img:nth-child(2) {
  transform: translateY(-6px);
}
.promo-shots img:nth-child(3) {
  transform: translateY(8px) rotate(3deg);
}
.promo-points {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.promo-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
}
.promo-points .ico {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(232, 184, 74, 0.18);
  color: var(--gold);
  font-size: 18px;
}
.promo-points strong {
  color: #fff;
}
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.store {
  flex: 1 1 190px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 20px;
  border-radius: 16px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.1s;
}
.store:hover {
  transform: translateY(-2px);
}
.store:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.store-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.store-ico svg {
  width: 100%;
  height: 100%;
}
.store-text {
  display: grid;
  line-height: 1;
}
.store-text small {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
}
.store-text strong {
  margin-top: 3px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* --- Prøv igjen ------------------------------------------------------------ */

.retry {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}
.btn-retry {
  width: 100%;
  min-height: 52px;
  font-size: 25px;
  background: var(--card);
}
.retry-note {
  margin: 0;
  font-size: 15px;
  color: rgba(26, 18, 14, 0.62);
}

/* --- Utfordringen: gjengen, lenken og navnekortet ------------------------- */

.ch-title {
  font-size: 46px;
  font-weight: 500;
  line-height: 0.95;
  margin: 2px 0 4px;
  text-wrap: balance;
}
.ch-stats {
  display: grid;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}
.ch-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 16px;
}
.ch-stat span {
  color: rgba(255, 255, 255, 0.72);
}
.ch-stat strong {
  text-align: right;
}
.ch-stat small {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}
.ch-note {
  margin: 0;
  font-size: 15px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}
.ch-app {
  margin: 0;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1.5px dashed var(--parchment-deep);
  font-size: 15px;
  color: rgba(26, 18, 14, 0.75);
}
.final-ranks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 380px;
  margin: 2px auto 0;
}
.fr {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 8px 10px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  min-width: 0;
}
.fr span {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  overflow-wrap: anywhere;
  text-align: center;
}
.fr strong {
  font-size: 40px;
  font-weight: 500;
  color: #fff;
}
.fr small {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.fr-group {
  background: var(--gold);
}
.fr-group span,
.fr-group small {
  color: rgba(15, 37, 51, 0.75);
}
.fr-group strong {
  color: var(--night);
}
.group-card .card-kicker {
  text-align: left;
}
.group-lead {
  font-size: 32px;
  margin: 0;
  color: var(--night);
}
.group-sub {
  margin: 0 0 6px;
  font-size: 15px;
  color: rgba(26, 18, 14, 0.6);
}
.group-board li.is-waiting {
  color: rgba(26, 18, 14, 0.55);
}
.group-board .board-km small {
  font-family: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.group-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.group-actions .btn-primary {
  flex: 2;
  width: auto;
}
.group-actions .btn-ghost {
  flex: 1;
  font-size: 19px;
  white-space: nowrap;
}
.new-challenge {
  margin-top: 8px;
  border-top: 1px solid var(--parchment-deep);
  padding-top: 10px;
}
.new-challenge summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--mist);
}
.new-challenge[open] summary {
  margin-bottom: 10px;
}
.challenge-card p {
  margin: 0 0 8px;
  line-height: 1.4;
}
.challenge-card .kicker-gold,
.qr-card .kicker-gold {
  padding: 0;
  text-align: left;
}
.challenge-form,
.name-form {
  display: grid;
  gap: 10px;
}
.field {
  display: grid;
  gap: 4px;
  font-weight: 700;
  font-size: 15px;
}
.ideas,
.name-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.idea {
  appearance: none;
  cursor: pointer;
  border: 1.5px solid var(--parchment-deep);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 15px;
}
.idea:hover,
.idea:focus-visible {
  border-color: var(--gold-deep);
  outline: none;
}
.form-err {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fbe6df;
  color: #8a2f17;
  font-weight: 700;
  font-size: 15px;
}
.name-card {
  border: 2px solid var(--gold);
}
.name-card h2 {
  font-size: 30px;
}
.name-card p {
  margin: 0 0 6px;
}
.name-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.name-check input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--moss);
  flex: none;
}
.name-check small {
  display: block;
  font-weight: 400;
  font-size: 14px;
  color: rgba(26, 18, 14, 0.6);
}
.name-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.name-row .input {
  flex: 1;
  min-width: 0;
}
.name-skip {
  display: flex;
  justify-content: center;
}
.btn-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--mist);
  font-weight: 700;
  text-decoration: underline;
}
.qr-card {
  text-align: center;
  justify-items: center;
}
.qr-card .kicker-gold {
  text-align: center;
}
.qr-title {
  font-size: 46px;
  font-weight: 500;
  margin: 0;
  color: var(--night);
}
.qr-lead,
.qr-note {
  margin: 0;
  max-width: 40ch;
}
.qr-note {
  font-size: 14px;
  color: rgba(26, 18, 14, 0.6);
}
.qr-box {
  width: min(280px, 100%);
  padding: 10px;
  margin: 8px 0;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(15, 37, 51, 0.12);
}
.qr-svg {
  display: block;
  width: 100%;
  height: auto;
}
.qr-link {
  width: 100%;
}
.qr-card .btn-ghost {
  margin-top: 4px;
}

/* Arenalenken /a/<kode> (spec/020) */
.ar-card {
  text-align: center;
  justify-items: center;
}
.ar-card .kicker-gold {
  text-align: center;
}
.ar-host {
  margin: 0;
  font-weight: 700;
  color: rgba(26, 18, 14, 0.65);
}
.ar-title {
  font-size: 46px;
  font-weight: 500;
  margin: 0;
  color: var(--night);
}
.ar-status,
.ar-note {
  margin: 0;
  max-width: 40ch;
}
.ar-note {
  font-size: 14px;
  color: rgba(26, 18, 14, 0.6);
}
.ar-steps {
  margin: 4px 0 0;
  padding-left: 1.4em;
  text-align: left;
  max-width: 40ch;
}
.ar-steps li {
  margin: 4px 0;
}
.ar-code {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.18em;
  padding: 10px 18px 10px 26px;
  margin: 4px 0 8px;
  background: #fff;
  color: var(--night);
  border: 2px dashed var(--gold-deep);
  border-radius: 16px;
}
.ar-more {
  text-align: center;
  margin: 18px 0 0;
}
