/* Lagermand: lageret i varme farver. Skrift, filt og bjælke kommer fra Solitaire.css og kabale-kort.css */
:root {
  --bord: #3D3731;
  --bjaelke: #241F1B;
  --knap: #4A423A;
  --roed: #C63F28;
  --gulv: #DCCBA9;
  --gulv2: #D3C19D;
  --mur: #7A6552;
  --mur2: #65523F;
  --kasse: #C08A45;
  --kasse2: #8E602A;
  --paa: #3F8A5A;
  --paa2: #2B6342;
  --mand: #3E6FA3;
  --c: 44px;
}
html.kabale-mork { --bord: #26221E; --bjaelke: #15120F; --knap: #39322B; --gulv: #B9A988; --gulv2: #B09F7E; }
body { background: var(--filt), var(--bord); color: var(--creme); font-variant-numeric: tabular-nums; }
svg { background: none; width: auto; height: auto; }
button, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

#kk-bar { align-items: center; }
#kk-bar select {
  font: 600 15px/1.2 Poppins, system-ui, sans-serif; min-height: 44px; padding: 0 34px 0 14px; border: 1px solid rgba(252,247,238,.22); border-radius: 8px;
  background: var(--knap) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23FCF7EE' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--creme); cursor: pointer; -webkit-appearance: none; appearance: none;
}
#kk-bar select option { background: #FCF7EE; color: #1E2421; }
#kk-bar button[aria-pressed="true"] { background: var(--creme); color: var(--bjaelke); }
#kk-bar button:focus-visible, #kk-bar select:focus-visible, #spil button:focus-visible, #kk-besked button:focus-visible { outline: 3px solid var(--creme); outline-offset: 2px; }
@media (max-width: 420px) {
  #kk-bar { gap: 6px; padding: 6px; flex-wrap: nowrap; }
  #kk-bar button, #kk-bar select { flex: 1 1 auto; min-width: 0; font-size: 14px; padding-left: 8px; padding-right: 8px; }
  #kk-bar select { padding-right: 24px; background-position: right 8px center; }
}

#spil { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 8px; box-sizing: border-box; }
#info { flex: none; width: 100%; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 8px; min-height: 44px; font: 600 15px/1.3 Poppins, system-ui, sans-serif; }
#banen { flex: none; }
#taeller { flex: 1 1 auto; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
#taeller b { font-weight: 600; }
#spil button {
  font: 600 14px/1.2 Poppins, system-ui, sans-serif; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  color: var(--creme); background: transparent; border: 1px solid rgba(252,247,238,.35); white-space: nowrap;
}
#spil button:disabled { opacity: .45; cursor: default; }
#knapper { flex: none; display: flex; justify-content: center; gap: 8px; }
#knapper button { flex: 0 1 130px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
#knapper svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#tip.vist { background: var(--creme); color: var(--bjaelke); }

#ramme { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; touch-action: none; -webkit-user-select: none; user-select: none; }
#braet { position: relative; display: grid; grid-template-columns: repeat(var(--w), var(--c)); grid-auto-rows: var(--c); border-radius: 6px; }
#braet:focus { outline: none; }
#braet:focus-visible { outline: 3px solid var(--creme); outline-offset: 4px; }
.felt { position: relative; box-sizing: border-box; }
.felt.gulv { background: var(--gulv); box-shadow: inset 0 0 0 .5px rgba(80,60,40,.15); }
.felt.gulv:nth-child(2n) { background: var(--gulv2); }
.felt.mur { background: var(--mur); border-radius: 3px; box-shadow: inset 0 -3px 0 var(--mur2), inset 0 2px 0 rgba(255,255,255,.12); }
.felt.mur::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--mur2); opacity: .55; }
.felt.ude { background: transparent; }
/* Pladsen: en ring med en prik (form, ikke kun farve) */
.felt.plads::before { content: ''; position: absolute; inset: 24%; border: max(2px, calc(var(--c) * .07)) solid var(--roed); border-radius: 50%; box-sizing: border-box; }
.felt.plads::after { content: ''; position: absolute; inset: 44%; background: var(--roed); border-radius: 50%; }
.felt.spor { box-shadow: inset 0 0 0 calc(var(--c) * .36) rgba(62,111,163,.35); }

.brik { position: absolute; left: 0; top: 0; width: var(--c); height: var(--c); transition: transform .11s ease-out; pointer-events: none; }
.kasse > span { position: absolute; inset: 7%; border-radius: 12%; background: var(--kasse); box-shadow: inset 0 0 0 calc(var(--c) * .07) var(--kasse2), 0 2px 3px rgba(0,0,0,.3); }
.kasse > span::before, .kasse > span::after { content: ''; position: absolute; left: 50%; top: 14%; bottom: 14%; width: calc(var(--c) * .07); margin-left: calc(var(--c) * -.035); background: var(--kasse2); transform: rotate(45deg); }
.kasse > span::after { transform: rotate(-45deg); }
.kasse.paa > span { background: var(--paa); box-shadow: inset 0 0 0 calc(var(--c) * .07) var(--paa2), 0 2px 3px rgba(0,0,0,.3); }
.kasse.paa > span::before, .kasse.paa > span::after { display: none; }
.kasse.paa svg { position: absolute; inset: 22%; width: 56%; height: 56%; fill: none; stroke: #FCF7EE; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.kasse.tip > span { outline: 3px solid #F0C463; outline-offset: 1px; }
.pil { position: absolute; width: var(--c); height: var(--c); pointer-events: none; display: flex; align-items: center; justify-content: center; }
.pil svg { width: 60%; height: 60%; fill: #F0C463; stroke: #241F1B; stroke-width: 1.5; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.mand svg { position: absolute; inset: 8%; width: 84%; height: 84%; }
.brik.puf { animation: puf .35s ease-out; }
@keyframes puf { 50% { transform: var(--t) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .brik { transition: none; } .brik.puf { animation: none; } }

#kk-besked { width: max-content; max-width: min(calc(100vw - 32px), 460px); box-sizing: border-box; }
#kk-besked p { margin: 0 0 6px; font-size: 15px; text-align: left; }
#kk-besked .knapper { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
#kk-besked .knapper button { margin: 0; }
#kk-besked button.primaer { background: var(--roed); color: var(--creme); }
#hjaelp { flex: none; min-height: 1.4em; margin: 0; text-align: center; font: 400 15px/1.35 Poppins, system-ui, sans-serif; }
.sk-ugedag { background: var(--bjaelke); }
html.kabale-hk .felt.mur { box-shadow: inset 0 0 0 2px #FCF7EE; }
