.kenowrap {
  width: min(100%, 660px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--panel);
}

.keno-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.keno-head .rt { text-align: right; }
.keno-head .label { display: block; margin-bottom: 4px; font-size: 12px; color: var(--faint); }
.keno-head b {
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.keno-head b.good { color: var(--green); }

/* ---------- the grid ---------- */

.kgrid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: clamp(5px, .8vw, 8px);
  width: 100%;
}

.knum {
  aspect-ratio: 1;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  font-size: clamp(13px, 1.9vw, 17px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--panel-2);
  border-bottom: 3px solid #16242E;
  color: var(--muted);
  cursor: pointer;
  transition: transform .1s var(--ease), background .14s var(--ease), color .14s var(--ease);
}
.knum:hover:not([disabled]) { background: var(--panel-3); color: var(--text); transform: translateY(-2px); }
.knum:active:not([disabled]) { transform: translateY(1px); }
.knum[disabled] { cursor: default; }

/* the player's selection */
.knum.pick {
  background: var(--panel-3);
  color: #fff;
  border-bottom-color: var(--green);
}

/* drawn but not picked */
.knum.drawn {
  background: var(--bg);
  color: var(--faint);
  border-bottom-color: var(--line);
  position: relative;
}
.knum.drawn::after {
  content: '';
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  border: 2px solid var(--line-2);
}

/* picked and drawn */
.knum.hit {
  background: var(--green);
  color: #04160B;
  border-bottom-color: #00A800;
  animation: hitpop .3s var(--ease);
}
@keyframes hitpop {
  0%   { transform: scale(.72); }
  60%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}

/* picked, not drawn */
.knum.miss { background: var(--panel-2); color: var(--faint); opacity: .55; }

.keno-foot { font-size: 13px; color: var(--faint); text-align: center; }
.keno-foot.win  { color: var(--green); font-weight: 600; }
.keno-foot.lose { color: var(--muted); }

/* ---------- paytable in the rail ---------- */

.paytable { display: flex; flex-direction: column; gap: 1px; border-radius: var(--r-sm); overflow: hidden; }
.paytable .prow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  background: var(--panel-2);
  font-size: 12.5px;
  color: var(--muted);
}
.paytable .prow b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.paytable .prow.top b { color: var(--green); }
.paytable .prow.landed { background: var(--green-dim); }
.paytable .prow.landed b { color: var(--green); }
.paytable .none { padding: 10px 12px; background: var(--panel-2); font-size: 12.5px; color: var(--faint); }

#play { width: 100%; }
