/* ============================================================
   Izloči vsiljivca
   ============================================================ */

#langs .chip.on { background: var(--mint); box-shadow: 0 5px 0 var(--mint-d); }

/* Brez tega se .board { flex: 1 } nima na kaj razpeti in vse zleze na vrh. */

.board {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 0;
  gap: clamp(6px, 1.6vh, 16px);
}

.ask {
  margin: 0;
  text-align: center;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: clamp(.9rem, 2.5vh, 1.25rem);
}

/* Dve vrsti po dve besedi — največji tapni cilji pri vseh velikostih. */
.options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(8px, 2.2vh, 20px);
  width: 100%;
  max-width: min(100%, 680px);
}

.opt {
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 3px solid rgba(35,48,74,.10);
  border-radius: 18px;
  box-shadow: 0 5px 0 rgba(35,48,74,.13);
  padding: clamp(10px, 2.6vh, 22px) 10px;
  min-height: clamp(56px, 19vh, 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  overflow-wrap: anywhere;
  hyphens: auto;
  transition: transform .12s ease, box-shadow .12s ease,
              background .25s ease, color .25s ease, border-color .25s ease;
}
.opt:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(35,48,74,.13); }

/* Dolge besede pomanjšamo, da nikoli ne razbijejo mreže. */
.opt.len1 { font-size: clamp(.9rem, 3.8vmin, 1.5rem); }
.opt.len2 { font-size: clamp(.8rem, 3.2vmin, 1.25rem); }
.opt.len3 { font-size: clamp(.72rem, 2.7vmin, 1.05rem); }
.opt.len4 { font-size: clamp(.64rem, 2.3vmin, .92rem); }

.opt.right {
  background: var(--mint);
  border-color: var(--mint-d);
  box-shadow: 0 5px 0 var(--mint-d);
  color: #fff;
}
.opt.wrong {
  background: var(--coral);
  border-color: var(--coral-d);
  box-shadow: 0 5px 0 var(--coral-d);
  color: #fff;
  animation: shake .35s ease;
}
/* Ko se zmoti, mu pokažemo tudi pravi odgovor. */
.opt.show {
  border-color: var(--mint-d);
  background: rgba(33,199,168,.16);
}
.opt.dim { opacity: .45; }

.options.locked .opt { pointer-events: none; }

.lives-row { display: flex; align-items: center; gap: 8px; }
.lives-label { font-weight: 600; color: var(--ink-soft); font-size: clamp(.8rem, 2.1vh, 1rem); }
.lives { display: flex; gap: 5px; }
.lives span {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 2px 0 rgba(35,48,74,.15);
  transition: background .3s ease, transform .3s ease;
}
.lives span.gone { background: #D8DEE9; transform: scale(.72); }

.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); }
.message .cat { color: var(--grape-d); }

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

/* Na ležečem telefonu je višine malo: štiri besede v eno vrsto. */
@media (orientation: landscape) and (max-height: 430px) {
  .options { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .opt { min-height: 46px; padding: 8px 6px; border-radius: 14px; }
  .ask { font-size: .82rem; }
}
/* ---------- overlay ---------- */

@media (orientation: landscape) and (max-height: 560px) {
  :root { --chrome: 190px; --board-cap: 340px; }
  .lives span { width: 10px; height: 10px; }
}

/* telefon na boku: ploščice naj bodo široke in nizke, ne visoke */
@media (orientation: landscape) and (max-height: 400px) {
  .grid3, .solved {
    max-width: min(100%, 62vw);
  }
  .tile { aspect-ratio: 2.7; border-radius: 14px; border-width: 3px; }
  .solved-row { padding: 4px 10px; border-radius: 12px; }
  .solved-row .cat { font-size: .8rem; }
  .solved-row .ws { font-size: .68rem; }
  .lives-row { gap: 6px; }
  .lives-label { font-size: .78rem; }
  .lives span { width: 9px; height: 9px; }
  .message { min-height: 1.3em; font-size: .85rem; }
  .board { gap: 5px; }
}
@media (max-width: 480px) {
  :root { --chrome: 290px; --board-cap: 360px; }
}
