/* ============================================================
   Emoji sudoku
   ============================================================ */

#levels .chip.on { background: var(--grape); box-shadow: 0 5px 0 var(--grape-d); }
#kinds .chip.on  { background: var(--mint);  box-shadow: 0 5px 0 var(--mint-d); }
#levels .chip, #kinds .chip { font-size: 1.5rem; padding: 4px 18px; }

#game { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.board-holder {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 0;
  gap: clamp(8px, 2vh, 18px);
}

/* Kvadratna plošča: širino omeji višina zaslona, višino pa dajo
   kvadratni otroci — isti vzorec kot pri tris/ in four/. */
.sboard {
  --chrome: 290px;
  width: 100%;
  max-width: min(100%, calc(100vh  - var(--chrome)), 420px);
  max-width: min(100%, calc(100dvh - var(--chrome)), 420px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;                       /* razmik MED kvadratki 2x2 */
  background: rgba(35,48,74,.14);
  padding: 10px;
  border-radius: 22px;
  box-shadow: 0 8px 0 rgba(35,48,74,.10);
}

/* Kvadratek 2x2 — svoje ozadje, da se jasno loči od sosednjih. */
.box {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  background: rgba(255,255,255,.55);
  padding: 4px;
  border-radius: 14px;
}

.cell {
  aspect-ratio: 1;
  border: 0;
  background: #fff;
  border-radius: 9px;
  font-size: clamp(1.1rem, 7vmin, 2.4rem);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}

.cell.given { background: #EEF1F7; cursor: default; }
.cell.sel   { background: #FFF3CF; box-shadow: inset 0 0 0 3px var(--sun-d); transform: scale(1.04); }
.cell.just  { animation: pop .4s ease; }
.cell.nope  { animation: shake .35s ease; background: #FFEDED; }
.sboard.locked .cell { pointer-events: none; }

/* Sličice, med katerimi otrok izbira */
.palette {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 2vw, 16px);
}
.pick {
  --size: clamp(48px, min(13vw, 11vh), 84px);
  width: var(--size);
  height: var(--size);
  border: 3px solid rgba(35,48,74,.10);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 5px 0 rgba(35,48,74,.13);
  font-size: calc(var(--size) * .55);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, opacity .2s ease;
}
.pick:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(35,48,74,.13); }
.pick.done { opacity: .35; }          /* sličica je že povsod postavljena */
.palette.locked .pick { pointer-events: none; }

.message {
  text-align: center;
  min-height: 1.8em;
  font-size: clamp(.95rem, 2.6vh, 1.3rem);
  font-weight: 600;
  color: var(--ink-soft);
}
.message.good { color: var(--mint-d); }
.message.bad  { color: var(--coral-d); }

.score-chip.current .val { color: var(--grape-d); }

@media (orientation: landscape) and (max-height: 560px) {
  .sboard { --chrome: 190px; gap: 7px; padding: 7px; border-radius: 16px; }
  .box { gap: 3px; padding: 3px; border-radius: 10px; }
  .cell { border-radius: 7px; }
  .board-holder { gap: 8px; }
}
@media (orientation: landscape) and (max-height: 430px) {
  .sboard { --chrome: 180px; gap: 5px; padding: 5px; border-radius: 12px; }
  .box { gap: 3px; padding: 3px; border-radius: 8px; }
  .board-holder { gap: 4px; }
  .pick { --size: clamp(30px, 11vh, 46px); border-radius: 10px; }
  .message { font-size: .78rem; min-height: 1.1em; }
}
