.klondike{
  --klondike-felt:#10352e;
  --klondike-edge:#2d5a4d;
  --klondike-gold:#f8d48d;
  --klondike-ink:#192825;
  --klondike-hidden:clamp(7px,1.3vw,12px);
  --klondike-overlap:clamp(22px,3vw,26px);
  --klondike-gap:clamp(3px,1.1vw,9px);
  max-width:570px;
  margin:auto;
  padding:clamp(10px,2.4vw,24px);
  color:#f8f2e3;
  border:1px solid var(--klondike-edge);
  border-radius:21px;
  background:
    radial-gradient(ellipse at 42% 0%,#31715b85,transparent 69%),
    repeating-linear-gradient(45deg,#ffffff06 0 1px,transparent 1px 5px),
    var(--klondike-felt);
  box-shadow:inset 0 0 0 3px #ffffff08,0 12px 30px #102f272b;
}
.klondike-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.65rem;
  margin:0 0 .7rem;
}
.klondike-header>div{display:grid;gap:.22rem}
.klondike-header>div:first-child>strong{
  color:#fff4d8;
  font:700 clamp(1.35rem,4vw,1.95rem)/1 Georgia,serif;
  letter-spacing:-.025em;
}
.klondike-header>div:first-child>span{
  color:#ddede3;
  font-size:.84rem;
}
.klondike-meter{text-align:right;font-size:.95rem;font-variant-numeric:tabular-nums}
.klondike-meter progress{
  display:block;
  width:clamp(56px,17vw,95px);
  height:6px;
  border:0;
  border-radius:9px;
  color:var(--klondike-gold);
  background:#0a2b23;
  appearance:none;
}
.klondike-meter progress::-webkit-progress-bar{background:#0a2b23;border-radius:9px}
.klondike-meter progress::-webkit-progress-value{background:var(--klondike-gold);border-radius:9px}
.klondike-meter progress::-moz-progress-bar{background:var(--klondike-gold);border-radius:9px}
.klondike-piles,.klondike-columns{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  column-gap:var(--klondike-gap);
}
.klondike-piles{
  align-items:start;
  row-gap:6px;
  padding:0 0 12px;
  border-bottom:1px solid #d5efdf30;
}
.klondike-draw-label,.klondike-home-label{font-size:.77rem;line-height:1.15;color:#dceee4}
.klondike-draw-label{grid-column:span 3}
.klondike-home-label{grid-column:span 4}
.klondike-columns{margin-top:12px}
.klondike-column{
  position:relative;
  min-width:0;
  padding-bottom:var(--klondike-column-tail);
}
.klondike-column::before{
  content:"";
  display:block;
  aspect-ratio:3/4;
  min-height:44px;
}
.klondike-column .klondike-slot{position:absolute;inset-inline:0}
.klondike-slot{
  position:relative;
  display:grid;
  place-items:center;
  min-width:0;
  width:100%;
  min-height:44px;
  aspect-ratio:3/4;
  padding:0;
  border:1px solid #b2d8be62;
  border-radius:clamp(4px,1.4vw,9px);
  color:#dfebe2;
  touch-action:manipulation;
  font:700 clamp(.85rem,3.8vw,1.55rem)/1 Georgia,serif;
  box-shadow:inset 0 0 0 1px #ffffff12;
}
.klondike-slot-empty{background:#092f2899;border-style:dashed}
.klondike-card{
  color:var(--klondike-ink);
  background:linear-gradient(152deg,#fffcf2,#e9e1d1);
  border-color:#fff9e6;
  box-shadow:inset 0 0 0 1px #826a4335,0 2px 3px #050f0c65;
}
.klondike-card.is-red{color:#a12940}
.klondike-back{
  color:#fff5de;
  border:1px solid #91b9a2;
  background:repeating-linear-gradient(135deg,#38715d 0 2px,#245345 2px 5px);
  box-shadow:inset 0 0 0 2px #204438,inset 0 0 0 3px #bbd5bb70,0 2px 3px #08130ea0;
}
.klondike-stock span{
  display:grid;
  place-items:center;
  min-width:1.35em;
  min-height:1.35em;
  border-radius:20%;
  background:#16382d;
  font:750 .8em/1 system-ui,sans-serif;
}
.klondike-index{
  position:absolute;
  display:flex;
  align-items:center;
  gap:.14em;
  inset:4px auto auto 4px;
  font:800 clamp(.71rem,2.45vw,1.12rem)/1 system-ui,sans-serif;
}
.klondike-index span{font-size:.85em}
.klondike-pip{
  display:block;
  margin-top:.28em;
  font-size:clamp(.95rem,4.2vw,2.12rem);
}
.klondike-slot.is-selected{
  border-color:#ffce76;
  box-shadow:inset 0 0 0 2px #b87213,0 0 0 2px var(--klondike-gold);
}
.klondike-slot.is-target{border:2px solid #f8d48d}
.klondike-slot.is-hint{border:2px dashed #e2a249;box-shadow:0 0 0 1px #ffedbe}
.klondike button:focus-visible,.klondike summary:focus-visible{
  outline:2px solid var(--klondike-gold);
  outline-offset:2px;
}
.klondike-column button:focus-visible{outline-offset:-3px;outline-color:#975b16}
.klondike-message{
  min-height:2.55em;
  margin:.85rem 0 .3rem;
  color:#fff8e9;
  font-size:.9rem;
  line-height:1.35;
}
.klondike-tools{display:flex;gap:8px;align-items:center}
.klondike-tools button{
  min-height:44px;
  border:1px solid #a7cfb965;
  border-radius:9px;
  background:#092a22b0;
  color:#f9f1dc;
  padding:6px 12px;
  font-size:.88rem;
  font-weight:700;
  touch-action:manipulation;
}
.klondike-tools button:hover:not(:disabled){background:#285648}
.klondike-tools button:disabled{opacity:.55}
.klondike-tools button span{color:var(--klondike-gold);margin-right:.22em}
.klondike-help{margin-top:.7rem;font-size:.85rem;line-height:1.5;color:#e0ede4}
.klondike-help summary{display:list-item;cursor:pointer;min-height:32px}
.klondike-help p{margin:.45rem 0 0}
@media(max-width:370px){
  .klondike{--klondike-gap:3px;padding:8px;border-radius:13px}
  .klondike-index{inset-inline-start:3px;inset-block-start:4px}
}
