/* Agurk: grøn filt som spades og whist. 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; --agurk: #8CC152; }
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; }
button:focus-visible, select:focus-visible { outline: 3px solid var(--creme); outline-offset: 2px; }
@media (max-width: 460px) {
  #kk-bar { gap: 5px; padding: 6px; flex-wrap: nowrap; }
  #kk-bar button, #kk-bar select { flex: 1 1 auto; min-width: 0; font-size: 14px; padding-left: 7px; padding-right: 7px; white-space: nowrap; }
  #kk-bar select { padding-right: 22px; background-position: right 7px center; }
}
body #kk-bar.sk-taet > select { flex: 1 1 40%; }

/* Linjen over bordet: runde, stik og grænsen */
#info { flex: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 12px; padding: 4px 10px; font: 600 14px/1.6 Poppins, system-ui, sans-serif; }
#info span { white-space: nowrap; }
#info .mig { color: #F5D88E; }
#info .sidst { color: #F5D88E; }
@media (max-width: 460px) { #info { padding: 4px 8px; gap: 0 8px; } #info .lang { display: none; } }

#bord { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; }
#bord > #baize { position: absolute; left: 0; top: 0; width: 100%; height: 100%; touch-action: none; }
#baize .kort { transition: transform var(--flyt, 260ms) ease-out, opacity 220ms ease-out; cursor: default; }
#baize .kort.traek { transition: none; }
#baize .kort.lovlig { cursor: pointer; }
#baize .kort.lovlig > rect.spielkarte { stroke: var(--guld); stroke-width: 3; }
#baize .kort .daek { fill: rgba(30,36,33,.32); pointer-events: none; display: none; }
#baize .kort.ulovlig .daek { display: inline; }
#baize .kort.fokus > rect.spielkarte, #baize .kort.tip > rect.spielkarte { stroke: var(--roed); stroke-width: 5; }
#baize .kort.hoej > rect.spielkarte { stroke: var(--guld); stroke-width: 5; }
#baize .kort.hoej { filter: url(#skygge); }
#baize text { pointer-events: none; }
.saede { font: 600 15px Poppins, system-ui, sans-serif; fill: var(--creme); }
.saede.lille { font-weight: 400; }
.saede.tur { fill: var(--guld); text-decoration: underline; }
.saede.ude { fill: #CFE8B0; }
.saede.mig { fill: #F5D88E; }
.saedeboks { fill: rgba(13,21,16,.38); stroke: rgba(252,247,238,.16); stroke-width: 1; }
.saedeboks.ude { fill: rgba(13,21,16,.18); stroke-dasharray: 4 3; }
.turring { fill: none; stroke: var(--guld); stroke-width: 3; animation: pulsS 1.1s ease-in-out infinite; pointer-events: none; }
@keyframes pulsS { 50% { stroke-opacity: .25; } }
.pbund { fill: rgba(252,247,238,.18); }
.pfyld { fill: var(--agurk); }
.pfyld.varm { fill: #F1CF7A; }
.pfyld.hed { fill: #F08A73; }
.stiknavn { font: 600 13px Poppins, system-ui, sans-serif; fill: var(--creme); }
.stiknavn.hoej { fill: var(--guld); }
.hoejskilt rect { fill: var(--guld); }
.hoejskilt text { font: 700 13px Poppins, system-ui, sans-serif; fill: #1E2421; }

#status {
  position: absolute; left: 50%; transform: translateX(-50%); top: var(--status-y, 8px); width: max-content; max-width: calc(100% - 24px); box-sizing: border-box;
  padding: 4px 14px; border-radius: 16px; background: rgba(13,21,16,.6); font: 600 14px/1.35 Poppins, system-ui, sans-serif; text-align: center; pointer-events: none; z-index: 1;
}
#status:empty { display: none; }
#status.sidst { background: rgba(120,40,20,.78); }
#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: '...'; } }

/* Tip og Fortryd lige over hånden */
.rund {
  position: absolute; bottom: var(--over-haand, 140px); min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  font: 600 15px/1.2 Poppins, system-ui, sans-serif; border: 1px solid rgba(252,247,238,.22); background: var(--knap); color: var(--creme); z-index: 2;
}
.rund:disabled { opacity: .45; cursor: default; }
#tip { left: 8px; }
#fortryd { right: 8px; }

#kk-besked { width: max-content; max-width: min(calc(100vw - 24px), 480px); box-sizing: border-box; max-height: calc(100% - 24px); overflow-y: auto; }
#kk-besked p { margin: 0 0 6px; font-size: 15px; }
#kk-besked p.stor { font-size: 17px; font-weight: 600; }
#kk-besked table.res { border-collapse: collapse; font-size: 14px; margin: 6px auto 2px; }
#kk-besked table.res td, #kk-besked table.res th { padding: 2px 7px; text-align: right; }
#kk-besked table.res th:first-child { text-align: left; }
#kk-besked table.res tr:first-child th { font-weight: 400; font-size: 14px; }
#kk-besked td.plus { color: #F4B3A6; font-weight: 600; }
#kk-besked tr.ude td, #kk-besked tr.ude th { opacity: .7; }
#kk-besked tr.mig th { color: #F5D88E; }
#kk-besked .knapper { display: flex; justify-content: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
#kk-besked .knapper button { margin: 0; }
#kk-besked button.primaer { background: var(--roed); color: var(--creme); }
.regel-tekst h3 { margin: 12px 0 4px; font: 600 16px Poppins, system-ui, sans-serif; }
.regel-tekst p, .regel-tekst li { font-size: 15px; }
.regel-tekst ul { margin: 0 0 8px; padding-left: 20px; }

@media (prefers-reduced-motion: reduce) { #baize .kort { transition: none; } .turring { animation: none; } #status.taenker::after { animation: none; content: '...'; } }
html.kabale-hk .rund { border: 2px solid var(--creme) !important; }
