/* Forbind farverne: mørkt bræt, så rørenes farver lyser. Skrift, filt og bjælke kommer fra Solitaire.css og kabale-kort.css */
:root {
  --bord: #22262F;
  --bjaelke: #15181E;
  --knap: #343A46;
  --roed: #C63F28;
  --felt: #2C313C;
  --streg: rgba(252,247,238,.12);
}
html.kabale-mork { --bord: #16191F; --bjaelke: #0D0F12; --knap: #2A2F38; --felt: #20242C; }
body { background: var(--filt), var(--bord); color: var(--creme); font-variant-numeric: tabular-nums; }
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: 10px; min-height: 44px; font: 400 15px/1.3 Poppins, system-ui, sans-serif; }
#info b { font-weight: 600; }
#status { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tid { white-space: nowrap; 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; }

#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 { display: block; border-radius: 10px; background: var(--felt); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
#braet:focus { outline: none; }
#braet:not([viewBox]) { visibility: hidden; }
#braet:focus-visible { outline: 3px solid var(--creme); outline-offset: 4px; }
#braet .gitter { stroke: var(--streg); stroke-width: .03; }
#braet .fyld { opacity: .22; }
#braet .roer { fill: none; stroke-linecap: round; stroke-linejoin: round; }
#braet .ende text { font: 700 1px Poppins, system-ui, sans-serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
#braet .lille { font: 600 1px Poppins, system-ui, sans-serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; opacity: .9; }
#braet .markoer { fill: none; stroke: #FCF7EE; stroke-width: .07; stroke-dasharray: .16 .1; }
#braet .holder { stroke-dasharray: none; stroke-width: .09; }
#braet .tip { animation: blink 1.2s ease-in-out 2; }
@keyframes blink { 50% { opacity: .35; } }
#braet .ende.faerdig circle { filter: drop-shadow(0 0 .08px #fff); }
#braet.vundet { animation: vind .6s ease-out; }
@keyframes vind { 40% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { #braet .tip, #braet.vundet { 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); }
