/* Gå fisk: grøn filt, store kort og en blå sø. Bord, bjælke, knap og mørk tilstand kommer fra Solitaire.css; bjælke og beskeder fra kabale-kort.css */
:root { --roed: #C63F28; --kul: #1E2421; --guld: #E2B54A; --vand: #2F7FA8; --vand2: #1E5C80; }
body { background: var(--filt), var(--bord); color: var(--creme); font-variant-numeric: tabular-nums; }
button, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; font-family: Poppins, system-ui, sans-serif; }
#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; }
button:focus-visible, select: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; font-size: 14px; padding-left: 8px; padding-right: 8px; }
  #kk-bar select { padding-right: 24px; background-position: right 7px center; }
}
body #kk-bar.sk-taet > select { flex: 1 1 40%; }

#bord { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 6px 8px 8px; box-sizing: border-box; }
.k { display: block; width: var(--cw, 64px); height: calc(var(--cw, 64px) * 1.5); flex: none; overflow: visible; background: none; }
.k .spielkarte { stroke-width: 1; }

/* Computerne øverst: store knapper med navn, kort og stik */
#modst { flex: none; display: flex; gap: 8px; }
.mod { position: relative; flex: 1 1 0; min-width: 0; min-height: 60px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px;
  border: 2px solid rgba(252,247,238,.25); background: rgba(0,0,0,.12); color: var(--creme); text-align: left; cursor: default; }
.mod .vifte { position: relative; flex: none; width: 40px; height: 40px; }
.mod .vifte span { position: absolute; top: 2px; width: 24px; height: 36px; border-radius: 3px; background: #B3262E; border: 1.5px solid #FCF7EE; box-sizing: border-box; }
.mod .vifte span:nth-child(1) { left: 0; transform: rotate(-12deg); }
.mod .vifte span:nth-child(2) { left: 8px; }
.mod .vifte span:nth-child(3) { left: 16px; transform: rotate(12deg); }
.mod .tekst { min-width: 0; display: flex; flex-direction: column; }
.mod b { font: 600 16px/1.2 Poppins, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod small { font: 400 14px/1.25 Poppins, system-ui, sans-serif; white-space: nowrap; }
.mod.kan { cursor: pointer; border-color: var(--guld); background: rgba(226,181,74,.12); animation: pulsF 1.2s ease-in-out infinite; }
.mod .spoerg { display: none; margin-left: auto; flex: none; font: 600 14px Poppins, system-ui, sans-serif; color: #1E2421; background: var(--guld); border-radius: 8px; padding: 6px 8px; }
.mod.kan .spoerg { display: block; }
@media (max-width: 480px) { .mod.kan .vifte { display: none; } .mod { padding: 6px 8px; } }
.mod.tip { outline: 3px dashed var(--guld); outline-offset: 2px; }
.mod.tur { border-color: var(--guld); box-shadow: 0 0 0 3px rgba(226,181,74,.35); }
.mod.ude { opacity: .55; }
@keyframes pulsF { 50% { box-shadow: 0 0 0 4px rgba(226,181,74,.25); } }
.boble { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); z-index: 5; max-width: 220px; width: max-content; padding: 8px 12px; border-radius: 14px;
  background: #FCF7EE; color: #1E2421; font: 600 16px/1.3 Poppins, system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0,0,0,.35); pointer-events: none; }
.boble::before { content: ''; position: absolute; left: 50%; top: -8px; margin-left: -8px; border: 8px solid transparent; border-top: 0; border-bottom-color: #FCF7EE; }
.boble[hidden] { display: none; }
#dig-boble { top: auto; bottom: calc(100% + 8px); }
#dig-boble::before { top: auto; bottom: -8px; border-bottom: 0; border-top: 8px solid #FCF7EE; }

/* Midten: søen og det, der sker */
#midt { flex: 1 1 auto; min-height: 56px; display: flex; align-items: center; gap: 12px; }
#soe { position: relative; flex: none; width: var(--soe-b, 150px); height: var(--soe-h, 96px); border-radius: 50%;
  background: radial-gradient(ellipse at 40% 35%, var(--vand), var(--vand2)); box-shadow: inset 0 0 0 3px rgba(252,247,238,.25), 0 4px 10px rgba(0,0,0,.25); }
#soe .bag { position: absolute; width: 22%; height: 46%; border-radius: 3px; background: #B3262E; border: 1.5px solid #FCF7EE; box-sizing: border-box; }
#soe-antal { position: absolute; left: 50%; bottom: -2px; transform: translate(-50%, 50%); font: 600 14px/1 Poppins, system-ui, sans-serif; background: var(--bjaelke); color: var(--creme); border-radius: 10px; padding: 5px 9px; white-space: nowrap; }
#snak { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
#status { margin: 0; font: 600 17px/1.35 Poppins, system-ui, sans-serif; }
#status.taenker::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: prikker 1.2s steps(4) infinite; }
@keyframes prikker { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
#dig { margin: 0; font: 400 14px/1.35 Poppins, system-ui, sans-serif; opacity: .95; }
#mine-stik { display: flex; flex-wrap: wrap; gap: 4px; }
#mine-stik span { font: 600 14px/1 Poppins, system-ui, sans-serif; background: #FCF7EE; color: #1E2421; border-radius: 6px; padding: 6px 7px; border: 2px solid var(--guld); }

/* Knapperne og hånden */
#knapper { flex: none; display: flex; gap: 8px; align-items: center; margin-top: 2px; }
#knapper button { min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid rgba(252,247,238,.22); background: var(--knap); color: var(--creme); font: 600 15px/1.2 Poppins, system-ui, sans-serif; cursor: pointer; }
#knapper button:disabled { opacity: .45; cursor: default; }
#hjaelp { flex: 1 1 auto; font: 400 14px/1.3 Poppins, system-ui, sans-serif; opacity: .9; }
#haand-ramme { position: relative; flex: none; }
#haand { display: flex; justify-content: center; align-items: flex-end; gap: var(--gap, 8px); min-height: calc(var(--cw, 64px) * 1.5 + 14px); padding-top: 14px; }
.gruppe { position: relative; display: flex; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; transition: transform .2s ease-out; }
.gruppe .k + .k { margin-left: calc(var(--cw, 64px) * -0.74); }
.gruppe:disabled { cursor: default; }
.gruppe.valgt { transform: translateY(-12px); }
.gruppe.valgt .spielkarte { stroke: var(--roed); stroke-width: 4; }
.gruppe.tip .spielkarte { stroke: var(--roed); stroke-width: 4; stroke-dasharray: 6 4; }
.gruppe .antal { position: absolute; right: -4px; top: -10px; min-width: 24px; height: 24px; border-radius: 12px; background: var(--roed); color: #fff; font: 600 14px/24px Poppins, system-ui, sans-serif; text-align: center; padding: 0 4px; box-sizing: border-box; }
.gruppe.ny .k:last-child { animation: ny 1s ease-out; }
@keyframes ny { 0% { transform: translateY(-14px); } 100% { transform: none; } }
.gruppe:focus-visible { outline: 3px solid var(--creme); outline-offset: 3px; }

#flyv { position: fixed; inset: 0; pointer-events: none; z-index: 6; }
#flyv .k { position: absolute; left: 0; top: 0; transition: transform var(--flyt, 600ms) ease-in-out, opacity .3s; }
.bagside { fill: #B3262E; stroke: #FCF7EE; stroke-width: 2; }

#kk-besked { width: max-content; max-width: min(calc(100vw - 24px), 460px); box-sizing: border-box; max-height: calc(100% - 24px); overflow-y: auto; }
#kk-besked p { margin: 0 0 6px; font-size: 16px; }
#kk-besked .knapper { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
#kk-besked button.primaer { background: var(--roed); color: var(--creme); }
.regel-tekst p, .regel-tekst li { font-size: 16px; }
.regel-tekst ul { margin: 0 0 8px; padding-left: 20px; }
.regel-tekst h3 { margin: 12px 0 4px; font: 600 16px Poppins, system-ui, sans-serif; }

/* Lav ramme (sidens mobil-iframe): søen og teksten bliver mindre */
@media (max-height: 520px) { #status { font-size: 15px; } .mod { min-height: 52px; } #dig { display: none; } }
@media (prefers-reduced-motion: reduce) { .mod.kan, #status.taenker::after { animation: none; } .gruppe, #flyv .k { transition: none; } .gruppe.ny .k:last-child { animation: none; } }
html.kabale-hk .mod, html.kabale-hk #knapper button { border: 2px solid var(--creme) !important; }
