/* logicke-hry.sk – spoločný vzhľad
   Farby pochádzajú z dlaždíc Päťky: tyrkysovozelená = písmeno na mieste, jantárová = písmeno inde. */
:root {
  --ink: #1b1e22;
  --muted: #555b63;
  --line: #d9dbde;
  --line-strong: #8d9299;
  --paper: #ffffff;
  --soft: #f3f4f5;
  --key: #e3e5e8;
  --main: #1f7a6a;      --main-ink: #ffffff;   --main-dark: #165e51;
  --accent: #e8a33d;    --accent-ink: #1b1e22;
  --miss: #7b8089;      --miss-ink: #ffffff;
  --bad: #b3261e;
  --wrap: 760px;
  --wide: 1040px;
}
body.contrast { --main: #d95f1e; --main-dark: #b04c16; --accent: #2f78c0; --accent-ink: #fff; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif; font-size: 17px; line-height: 1.55;
  font-variation-settings: "wdth" 100;
}
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--main-dark); }
h1, h2, h3 { font-stretch: 115%; font-variation-settings: "wdth" 115; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 5.2vw, 40px); font-weight: 800; }
h2 { font-size: clamp(22px, 3.6vw, 27px); font-weight: 800; margin-top: 1.6em; }
h3 { font-size: 19px; font-weight: 700; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- hlavička */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .in {
  max-width: var(--wide); margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: baseline; gap: 10px 26px; flex-wrap: wrap;
}
.brand { font-weight: 800; font-size: 22px; text-decoration: none; font-variation-settings: "wdth" 125; font-stretch: 125%; white-space: nowrap; }
.brand span { color: var(--main); }
.site-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 16px; font-weight: 600; }
.site-nav a { text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line-strong); color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--main); }

/* ---- obsah */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: var(--wide); }
.page-intro { padding: 26px 0 6px; }
.page-intro p { font-size: 18px; color: var(--muted); max-width: 640px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.crumbs a { color: var(--muted); }
.text { padding: 10px 0 40px; }
.text h2:first-child { margin-top: .6em; }
.text table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: 16px; }
.text th, .text td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.text td:last-child { white-space: nowrap; }
.faq dt { font-weight: 700; margin-top: 1em; }
.faq dd { margin: .25em 0 0; }

/* ---- zoznam hier na hlavnej stránke */
.games { list-style: none; padding: 0; margin: 10px 0 0; border-top: 1px solid var(--line); }
.games li { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); margin: 0; }
.games .pv { display: block; width: 150px; height: auto; }
.games h2 { margin: 0 0 .25em; font-size: 24px; }
.games h2 a { text-decoration: none; }
.games h2 a:hover { text-decoration: underline; }
.games p { margin: 0 0 .4em; }
.games .go { font-weight: 700; }
.games .meta { color: var(--muted); font-size: 15px; }
@media (max-width: 520px) {
  .games li { grid-template-columns: 92px 1fr; gap: 14px; align-items: start; }
  .games .pv { width: 92px; }
  .games h2 { font-size: 21px; }
}

/* ---- herná plocha */
.game { padding: 6px 0 24px; }
.game-bar {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
  margin: 0 0 12px;
}
.game-bar .grp { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.game-bar label { font-size: 15px; color: var(--muted); }
select {
  font: inherit; font-size: 16px; padding: 7px 30px 7px 10px; border: 1.5px solid var(--ink); border-radius: 6px;
  background: var(--paper) 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' stroke='%231b1e22' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none; color: var(--ink);
}
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; }
.seg button { font: inherit; font-size: 15px; font-weight: 600; padding: 7px 12px; border: 0; background: var(--paper); color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.btn {
  font: inherit; font-size: 16px; font-weight: 700; padding: 10px 16px; border-radius: 6px; cursor: pointer;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); text-decoration: none; display: inline-block; line-height: 1.2;
}
.btn.primary { background: var(--main); border-color: var(--main); color: var(--main-ink); }
.btn.primary:hover { background: var(--main-dark); border-color: var(--main-dark); color: #fff; }
.linkbtn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.status { font-size: 16px; color: var(--muted); }
.status strong { color: var(--ink); }

/* ---- hlášky a dialógy */
.toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px;
  padding: 10px 14px; border-radius: 6px; pointer-events: none; opacity: 0; transition: opacity .15s; white-space: nowrap;
}
.toast.show { opacity: 1; }
dialog {
  border: 0; border-radius: 10px; padding: 22px 22px 18px; width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px); overflow: auto;
  color: var(--ink); background: var(--paper); box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(20,22,26,.45); }
dialog h2 { margin: 0 0 12px; font-size: 22px; }
dialog h2:focus { outline: none; }
dialog h3 { margin: 18px 0 8px; font-size: 16px; }
dialog .close { position: absolute; top: 12px; right: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.stats { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.stats td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.stats td:last-child { text-align: right; font-weight: 800; }
label.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; line-height: 1.4; }
label.opt input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--ink); }
label.opt small { display: block; color: var(--muted); font-size: 14px; }
textarea.copy { width: 100%; height: 120px; margin-top: 10px; font: 15px/1.3 monospace; display: none; }

/* ---- pätička */
.site-foot { border-top: 1px solid var(--line); margin-top: 20px; font-size: 15px; color: var(--muted); }
.site-foot .in { max-width: var(--wide); margin: 0 auto; padding: 22px 16px 34px; display: grid; gap: 8px; }
.site-foot nav { display: flex; gap: 6px 18px; flex-wrap: wrap; color: var(--ink); font-weight: 600; }
.site-foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .site-head, .site-foot, .game-bar, .no-print, .text, .crumbs, .page-intro p { display: none !important; }
  body { font-size: 12pt; }
}
