/* ==========================================================================
   Egernet Albert — styles
   Håndtegnet efterårs-have. Mørk, varm indramning omkring et gyldent spil.
   ========================================================================== */

:root {
  --bark-900: #1b120c;
  --bark-800: #241811;
  --bark-700: #2f2016;
  --bark-600: #3d2a1d;
  --bark-500: #553925;

  --cream: #f6e7cd;
  --cream-dim: #cdb79a;
  --amber: #f0a63c;
  --amber-hi: #ffc96b;
  --amber-lo: #c9761d;
  --rust: #d4552f;
  --leaf: #7fa845;
  --frost: #a9dcf2;

  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .75), 0 4px 14px rgba(0, 0, 0, .4);
  --shadow-sm: 0 6px 18px -6px rgba(0, 0, 0, .6);

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 9px;

  --ui: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--ui);
  color: var(--cream);
  background:
    radial-gradient(1200px 700px at 50% -10%, #4a3320 0%, transparent 60%),
    radial-gradient(900px 600px at 90% 110%, #2a3a2a 0%, transparent 55%),
    linear-gradient(175deg, #241a12 0%, #1a120c 45%, #14100c 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtile "bark"-striber i baggrunden */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .045;
  background-image: repeating-linear-gradient(
    92deg,
    #fff 0 1px, transparent 1px 7px,
    #fff 7px 8px, transparent 8px 19px
  );
  mix-blend-mode: overlay;
}

.sprite-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  display: block;
}
.ico--inline { display: inline-block; vertical-align: -.18em; margin-right: .4em; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vw, 28px);
}

.shell {
  width: 100%;
  max-width: 1120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 108px);
  /* Holder 16:9 også når max-height tager over, så spillets udsnit er stabilt */
  max-width: calc((100vh - 108px) * 16 / 9);
  margin-inline: auto;
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
  background: #0e0b08;
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255, 201, 107, .16),
    0 0 0 8px rgba(60, 40, 26, .55),
    0 0 0 9px rgba(255, 201, 107, .07);
  touch-action: none;
}

canvas#game {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(10px, 1.05vw, 12.5px);
  color: #9b8670;
  padding-inline: 6px;
  letter-spacing: .01em;
}
.foot-keys { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

kbd {
  font: 600 .92em/1 var(--ui);
  color: var(--cream);
  background: linear-gradient(180deg, #4a3524, #33241a);
  border: 1px solid #6a4c33;
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: .38em .55em;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .4);
}
.foot kbd { font-size: .95em; padding: .25em .42em; }

/* --------------------------------------------------------------------------
   HUD
   -------------------------------------------------------------------------- */
.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(8px, 1.5cqw, 18px);
  font-size: clamp(9px, 1.35cqw, 15px);
  container-type: inline-size;
  z-index: 3;
}
.hud[hidden] { display: none; }

.hud-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hud-group { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .42em;
  padding: .38em .72em;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(38, 25, 17, .82), rgba(24, 16, 11, .86));
  border: 1px solid rgba(255, 201, 107, .22);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  line-height: 1;
  white-space: nowrap;
}
.chip .ico { width: 1.35em; height: 1.35em; }
.chip-lbl {
  font-size: .78em;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--cream-dim);
  font-weight: 600;
}
.chip-val {
  font-size: 1.28em;
  font-weight: 800;
  color: var(--amber-hi);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .55);
  min-width: 2ch;
  display: inline-block;
}
.chip-score .chip-val { min-width: 3ch; }

.chip-lives { gap: .28em; padding: .38em .6em; }
.chip-lives .life { width: 1.15em; height: 1.15em; opacity: .95; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.chip-lives .life[data-lost="1"] { opacity: .22; filter: grayscale(1); }

.chip-inv { gap: .3em; font-size: .92em; transition: opacity .18s ease, transform .18s ease; }
.chip-inv b { font-size: 1.05em; color: var(--cream); font-variant-numeric: tabular-nums; min-width: 1ch; }
.chip-inv kbd { font-size: .78em; padding: .18em .34em; opacity: .75; }
.chip-inv[data-empty="true"] { opacity: .34; }
.chip-inv[data-empty="true"] kbd { opacity: .5; }
.chip-inv.bump { animation: bump .3s ease; }

.icon-btn {
  pointer-events: auto;
  display: inline-grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  padding: 0;
  font-size: inherit;
  color: var(--cream-dim);
  background: linear-gradient(180deg, rgba(38, 25, 17, .8), rgba(24, 16, 11, .85));
  border: 1px solid rgba(255, 201, 107, .2);
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s, transform .15s, border-color .15s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.icon-btn .ico { width: 1.2em; height: 1.2em; }
.icon-btn:hover { color: var(--amber-hi); border-color: rgba(255, 201, 107, .5); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0) scale(.95); }

/* Vinterforråd */
.quota {
  display: flex;
  align-items: center;
  gap: .6em;
  padding: .42em .8em;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(38, 25, 17, .82), rgba(24, 16, 11, .88));
  border: 1px solid rgba(255, 201, 107, .22);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.quota-lbl {
  font-size: .78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--cream-dim);
}
.quota .bar {
  position: relative;
  width: clamp(90px, 22cqw, 300px);
  height: .62em;
  border-radius: 999px;
  background: rgba(0, 0, 0, .5);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6);
}
.quota .bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber-lo), var(--amber) 45%, var(--amber-hi));
  box-shadow: 0 0 10px rgba(255, 180, 70, .55);
  transition: width .28s cubic-bezier(.22, .9, .3, 1);
}
.quota .bar i::after {
  content: "";
  position: absolute;
  inset: 0 0 50% 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .45), transparent);
  border-radius: 999px;
}
.quota-num { font-size: .95em; font-weight: 800; color: var(--amber-hi); font-variant-numeric: tabular-nums; }
.quota[data-full="true"] { border-color: rgba(127, 168, 69, .7); }
.quota[data-full="true"] .bar i { background: linear-gradient(90deg, #4f7a2c, var(--leaf), #b6d96a); }

/* Advarsel + banner */
.warn {
  position: absolute;
  left: 50%;
  top: 15%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .5em 1.1em;
  border-radius: 999px;
  font-size: 1.05em;
  font-weight: 800;
  letter-spacing: .04em;
  color: #eaf7ff;
  background: linear-gradient(180deg, rgba(28, 78, 110, .82), rgba(14, 44, 66, .88));
  border: 1px solid rgba(169, 220, 242, .55);
  box-shadow: 0 0 28px rgba(120, 200, 240, .35), var(--shadow-sm);
  animation: warnPulse 1.1s ease-in-out infinite;
}
.warn[hidden] { display: none; }
.warn .ico { width: 1.4em; height: 1.4em; }

.banner {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  font-size: 1.7em;
  font-weight: 900;
  letter-spacing: .02em;
  color: #fff6dd;
  text-shadow: 0 2px 0 #7a4a12, 0 5px 18px rgba(0, 0, 0, .65);
  pointer-events: none;
  animation: bannerIn .5s cubic-bezier(.2, 1.3, .4, 1);
  white-space: nowrap;
}
.banner[hidden] { display: none; }

@keyframes warnPulse {
  0%, 100% { opacity: .82; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.045); }
}
@keyframes bannerIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.28) rotate(-4deg); }
  100% { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Skærme (menu / pause / etape / slut)
   -------------------------------------------------------------------------- */
.screens { position: absolute; inset: 0; z-index: 4; }

.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2.4cqw, 30px);
  container-type: inline-size;
  font-size: clamp(8px, 1.18cqw, 14px);
  animation: screenIn .32s ease both;
}
.screen[hidden] { display: none !important; }
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }

.scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(20, 13, 8, .5), rgba(12, 8, 5, .82)),
    linear-gradient(180deg, rgba(12, 8, 5, .35), rgba(12, 8, 5, .7));
  backdrop-filter: blur(3px) saturate(.85);
  -webkit-backdrop-filter: blur(3px) saturate(.85);
}

.card {
  position: relative;
  width: min(100%, 780px);
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(14px, 2.6cqw, 34px);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 120% at 12% 0%, rgba(255, 201, 107, .1), transparent 55%),
    linear-gradient(170deg, #3b2819 0%, #2b1d13 42%, #231708 100%);
  border: 1px solid rgba(255, 201, 107, .24);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 60px rgba(0, 0, 0, .35);
  animation: cardIn .38s cubic-bezier(.2, 1.1, .35, 1) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 201, 107, .35) transparent;
}
.card::-webkit-scrollbar { width: 8px; }
.card::-webkit-scrollbar-thumb { background: rgba(255, 201, 107, .3); border-radius: 99px; }
.card--sm { width: min(100%, 420px); text-align: center; }
.card--menu { display: flex; flex-direction: column; gap: clamp(10px, 1.8cqw, 20px); }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* Logo */
.logo { text-align: center; }
.logo-kicker {
  display: block;
  font-size: .82em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3em;
  color: var(--leaf);
  margin-bottom: .35em;
  opacity: .9;
}
.logo-title {
  margin: 0;
  font-size: clamp(30px, 6.2cqw, 74px);
  font-weight: 900;
  line-height: .88;
  letter-spacing: -.025em;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  gap: .04em;
  text-shadow:
    0 2px 0 #6d4423,
    0 4px 0 #4d2f18,
    0 8px 22px rgba(0, 0, 0, .6);
}
.logo-title span {
  color: var(--amber);
  font-size: 1.42em;
  letter-spacing: -.03em;
  text-shadow:
    0 2px 0 #8a4c11,
    0 4px 0 #5e330b,
    0 10px 26px rgba(255, 150, 40, .28),
    0 0 44px rgba(255, 170, 60, .22);
  transform: rotate(-1.4deg);
}
.logo-tag {
  margin: .9em auto 0;
  max-width: 46ch;
  font-size: 1.02em;
  line-height: 1.5;
  color: var(--cream-dim);
}

/* Knapper */
.menu-actions { display: flex; gap: .7em; justify-content: center; flex-wrap: wrap; }

.btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .72em 1.35em;
  font: 700 1em/1 var(--ui);
  letter-spacing: .01em;
  color: var(--cream);
  text-decoration: none;
  background: linear-gradient(180deg, #4d3521, #352315);
  border: 1px solid rgba(255, 201, 107, .28);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .14s cubic-bezier(.2, 1.2, .4, 1), box-shadow .14s, border-color .14s, background .14s;
  white-space: nowrap;
}
.btn .ico { width: 1.15em; height: 1.15em; }
.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 201, 107, .6);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn:active { transform: translateY(0) scale(.975); }
.btn:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 3px; }

.btn--primary {
  color: #2b1a08;
  background: linear-gradient(180deg, var(--amber-hi), var(--amber) 45%, var(--amber-lo));
  border-color: #ffdf9e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
  box-shadow: 0 10px 26px -10px rgba(255, 160, 40, .8), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(120, 60, 0, .25);
}
.btn--primary:hover { box-shadow: 0 14px 32px -10px rgba(255, 170, 50, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn--lg { font-size: 1.22em; padding: .78em 1.7em; }
.btn--sm { font-size: .9em; padding: .55em 1em; }

.stack { display: flex; flex-direction: column; gap: .55em; margin-top: 1.1em; }
.stack .btn { width: 100%; }

/* Menu-kolonner */
.menu-cols {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(12px, 2.4cqw, 30px);
  align-items: start;
  border-top: 1px solid rgba(255, 201, 107, .16);
  padding-top: clamp(10px, 1.8cqw, 18px);
}
.menu-h {
  margin: 0 0 .7em;
  font-size: .86em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--amber);
  display: flex;
  align-items: center;
}
.keys { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5em; }
.keys li { display: flex; align-items: baseline; gap: .6em; font-size: .95em; color: var(--cream-dim); line-height: 1.4; }
.keys .kbdrow { display: inline-flex; gap: .25em; align-items: center; flex: 0 0 auto; }
.keys .kbdrow i { font-style: normal; font-size: .82em; opacity: .6; padding-inline: .1em; }
.menu-note { margin: .9em 0 0; font-size: .82em; color: #9c886f; line-height: 1.45; }

.scores {
  list-style: none;
  counter-reset: s;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .3em;
}
.scores li {
  counter-increment: s;
  display: flex;
  align-items: baseline;
  gap: .55em;
  padding: .42em .7em;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .24);
  border: 1px solid rgba(255, 201, 107, .1);
  font-size: .94em;
}
.scores li::before {
  content: counter(s);
  font-weight: 800;
  color: var(--amber);
  opacity: .8;
  min-width: 1.4ch;
}
.scores .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cream); }
.scores .sc { font-weight: 800; color: var(--amber-hi); font-variant-numeric: tabular-nums; }
.scores .st { font-size: .82em; color: #9c886f; font-variant-numeric: tabular-nums; }
.scores .empty { color: #8d7a63; font-style: italic; background: none; border: none; padding-left: 0; }
.best { margin-top: .8em; font-size: .92em; color: var(--cream-dim); }
.best b { color: var(--amber-hi); font-size: 1.1em; font-variant-numeric: tabular-nums; }

/* Pause / slut-kort */
.card-title {
  margin: 0;
  font-size: clamp(22px, 3.6cqw, 40px);
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--cream);
  text-shadow: 0 2px 0 #6d4423, 0 6px 18px rgba(0, 0, 0, .5);
}
.card-sub { margin: .5em 0 0; font-size: 1em; color: var(--cream-dim); line-height: 1.5; }

.badge {
  position: absolute;
  top: -.9em;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  padding: .45em 1.1em;
  border-radius: 999px;
  font-size: .88em;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #2b1a08;
  background: linear-gradient(180deg, #ffe08a, var(--amber) 60%, #d98a1c);
  border: 1px solid #fff0c0;
  box-shadow: 0 8px 22px -6px rgba(255, 170, 40, .7);
  white-space: nowrap;
  animation: badgePop .5s cubic-bezier(.2, 1.5, .4, 1) both;
}
.badge[hidden] { display: none; }
@keyframes badgePop { from { opacity: 0; transform: translateX(-50%) scale(.5); } to { opacity: 1; transform: translateX(-50%) rotate(-3deg) scale(1); } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; margin: 1.2em 0 0; }
.stats > div {
  padding: .7em .5em;
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, .26);
  border: 1px solid rgba(255, 201, 107, .12);
}
.stats dt { font-size: .74em; text-transform: uppercase; letter-spacing: .09em; color: #a08b72; font-weight: 700; }
.stats dd { margin: .3em 0 0; font-size: 1.7em; font-weight: 900; color: var(--amber-hi); font-variant-numeric: tabular-nums; line-height: 1; }

.save-row { display: flex; align-items: center; gap: .5em; margin-top: 1em; justify-content: center; flex-wrap: wrap; }
.save-row label { font-size: .86em; color: var(--cream-dim); font-weight: 600; }
.save-row input {
  width: 9.5em;
  padding: .55em .8em;
  font: 700 1em var(--ui);
  color: var(--cream);
  background: rgba(0, 0, 0, .38);
  border: 1px solid rgba(255, 201, 107, .28);
  border-radius: var(--r-sm);
  outline: none;
}
.save-row input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(240, 166, 60, .2); }
.save-row[hidden] { display: none; }

/* Etape-flash */
.screen--flash { pointer-events: none; }
.stage-flash {
  position: relative;
  text-align: center;
  padding: 1.1em 2.2em;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(59, 40, 25, .9), rgba(35, 23, 15, .92));
  border: 1px solid rgba(255, 201, 107, .4);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(255, 170, 60, .25);
  animation: flashIn .5s cubic-bezier(.2, 1.3, .4, 1) both;
}
.stage-flash-k {
  display: block;
  font-size: clamp(20px, 3.6cqw, 42px);
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--amber-hi);
  text-shadow: 0 2px 0 #7a4a12, 0 8px 24px rgba(0, 0, 0, .6);
}
.stage-flash-v { display: block; margin-top: .35em; font-size: 1em; color: var(--cream-dim); }
@keyframes flashIn {
  0% { opacity: 0; transform: scale(.7) translateY(20px); }
  60% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: none; }
}

/* Demo-tag */
.screen--demo { place-items: start stretch; padding: 0; pointer-events: none; }
.demo-tag {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: .8em;
  margin: clamp(8px, 1.5cqw, 16px);
  padding: .5em .7em .5em 1em;
  align-self: start;
  border-radius: 999px;
  font-size: clamp(9px, 1.15cqw, 13px);
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(38, 25, 17, .85), rgba(24, 16, 11, .9));
  border: 1px solid rgba(255, 201, 107, .28);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.demo-tag .dot {
  width: .62em; height: .62em; border-radius: 50%;
  background: var(--rust);
  box-shadow: 0 0 0 0 rgba(212, 85, 47, .6);
  animation: rec 1.6s ease-out infinite;
  flex: 0 0 auto;
}
@keyframes rec {
  0% { box-shadow: 0 0 0 0 rgba(212, 85, 47, .55); }
  70% { box-shadow: 0 0 0 .7em rgba(212, 85, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 85, 47, 0); }
}

/* --------------------------------------------------------------------------
   Touch-knapper
   -------------------------------------------------------------------------- */
.touch {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: clamp(10px, 2cqw, 24px);
  pointer-events: none;
  z-index: 5;
  container-type: inline-size;
}
.touch[hidden] { display: none; }
.touch-left, .touch-right { display: flex; align-items: flex-end; gap: clamp(8px, 1.6cqw, 18px); pointer-events: none; }
.touch-right { align-items: flex-end; }

.tbtn {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: clamp(48px, 11cqw, 96px);
  height: clamp(48px, 11cqw, 96px);
  padding: 0;
  color: var(--cream);
  background: radial-gradient(circle at 50% 32%, rgba(80, 56, 36, .8), rgba(30, 20, 13, .78));
  border: 1px solid rgba(255, 201, 107, .34);
  border-radius: 50%;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .12);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform .08s ease, background .12s ease;
}
.tbtn svg { width: 46%; height: 46%; }
.tbtn .ico { width: 52%; height: 52%; }
.tbtn--sm { width: clamp(40px, 8.4cqw, 72px); height: clamp(40px, 8.4cqw, 72px); opacity: .9; }
.tbtn--jump {
  width: clamp(58px, 13.5cqw, 118px);
  height: clamp(58px, 13.5cqw, 118px);
  color: #2b1a08;
  background: radial-gradient(circle at 50% 30%, var(--amber-hi), var(--amber) 55%, var(--amber-lo));
  border-color: #ffdf9e;
}
.tbtn[data-held="true"] { transform: scale(.9); background: radial-gradient(circle at 50% 32%, rgba(255, 201, 107, .5), rgba(120, 80, 40, .8)); }
.tbtn--jump[data-held="true"] { background: radial-gradient(circle at 50% 30%, #fff0c2, var(--amber-hi) 60%, var(--amber)); }

/* --------------------------------------------------------------------------
   Responsivt
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .menu-cols { grid-template-columns: 1fr; gap: 14px; }
  .foot { justify-content: center; text-align: center; }
  .foot-keys { display: none; }
  .stage { border-radius: 16px; max-height: none; }
  .page { padding: 6px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .logo-tag, .menu-note { display: none; }
  .card { padding: 12px 18px; }
}

/* Tilgængelighed: respektér reduceret bevægelse i UI-krom */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
