/* 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); }
@media (max-width: 600px) {
  .site-nav { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 16px; font-size: 15px; margin: 0 -16px; padding: 0 16px 2px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; flex: none; }
}

/* ---- obsah */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: var(--wide); }
.page-intro { padding-top: 26px; padding-bottom: 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-top: 10px; padding-bottom: 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; }
.text table.list td:last-child { white-space: normal; }
.text table.list td { overflow-wrap: anywhere; }
.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; } }

/* Panel „Dnešné hry“ (po dohraní hry a na hlavnej stránke) */
.today { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.today h3 { margin: 0 0 6px; font-size: 17px; }
.today-list { list-style: none; margin: 0; padding: 0; }
.today-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); }
.today-list li > a:first-child { font-weight: 700; color: var(--ink); }
.today-list li.done > a:first-child::before { content: "✓"; color: var(--main); font-weight: 800; margin-right: 7px; }
.today-list .dt { color: var(--muted); font-size: 15px; }
.today-list strong { min-width: 52px; text-align: right; }
.today-list .go { font-weight: 700; min-width: 52px; text-align: right; }
.today-sum { margin: 10px 0 0; font-size: 16px; }
.today-sum strong { font-size: 20px; }
.today .status { margin: 6px 0 0; font-size: 14px; }
.today .actions { margin-top: 10px; }
.today-more { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.home-season { max-width: 560px; margin: 0 0 18px; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--soft); font-size: 17px; }
.home-today { max-width: 560px; margin: 0 0 28px; }
.home-today.today { border-top: 0; padding-top: 0; margin-top: 4px; }
.home-today h2 { font-size: 22px; margin: 0 0 6px; }
.install { margin: 14px 0 0; padding: 10px 12px; background: var(--soft); border-radius: 8px; font-size: 15px; }
.install .btn { margin: 6px 8px 0 0; }
@media (max-width: 420px) { .today-list li { grid-template-columns: 1fr auto; } .today-list .dt { grid-column: 1; grid-row: 2; font-size: 14px; } }

/* rad tém pexesa so štvorčekmi (pexeso aj pexeso na vytlačenie) */
.px-themes { position: relative; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 6px 6px 10px; margin: 0 -6px 6px; scroll-padding: 0 6px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.px-themes button, .px-themes a { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.px-themes button { flex: 0 0 auto; width: 88px; scroll-snap-align: start; font: inherit; border: 0; padding: 0; background: none;
  color: var(--ink); cursor: pointer; text-align: center; touch-action: manipulation; }
.px-themes .im { display: block; width: 88px; height: 88px; border-radius: 8px; overflow: hidden; background: var(--soft);
  border: 1.5px solid var(--line); }
.px-themes .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.px-themes .im.contain img { object-fit: contain; padding: 12%; background: #fff; }
.px-themes .im.ramik { display: grid; place-items: center; background: #fff; }
.px-themes .im.ramik img { width: 76%; height: auto; aspect-ratio: 4 / 3; object-fit: fill; padding: 0; box-shadow: 0 0 0 1.5px rgba(27, 30, 34, .32); border-radius: 2px; }
.px-themes .nm { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.2; margin-top: 5px; }
.px-themes button[aria-pressed="true"] .im { outline: 3px solid var(--main); outline-offset: 2px; border-color: transparent; }
.px-themes button[aria-pressed="true"] .nm { color: var(--main); }
.px-themes button:hover .im { border-color: var(--line-strong); }
.px-themes.big button, .px-themes.big a, .px-themes.big .im { width: 112px; } .px-themes.big .im { height: 112px; } .px-themes.big .nm { font-size: 15px; }
@media (min-width: 900px) { .px-themes { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 560px) { .px-themes button, .px-themes a, .px-themes .im { width: 76px; } .px-themes .im { height: 76px; } .px-themes .nm { font-size: 12.5px; }
  .px-themes.big button, .px-themes.big a, .px-themes.big .im { width: 96px; } .px-themes.big .im { height: 96px; } }
.px-other { margin: 26px 0 8px; font-weight: 600; }
.px-themes a { flex: 0 0 auto; width: 88px; scroll-snap-align: start; color: var(--ink); text-decoration: none; text-align: center; }
.px-themes a:hover .nm { text-decoration: underline; }

@media print {
  .site-head, .site-foot, .game-bar, .no-print, .text, .crumbs, .page-intro p { display: none !important; }
  body { font-size: 12pt; }
}
.lead { font-size: 18px; color: var(--muted); max-width: 680px; margin: 12px 0 0; }

/* Hádanky */
.hd-page h1 { font-size: clamp(26px, 4.6vw, 38px); margin: 10px 0 6px; }
.hd-intro { font-size: 18px; color: var(--muted); max-width: 680px; margin: 0 0 18px; }
.hd-page h2 { margin: 28px 0 10px; }
.hd-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; max-width: 720px; margin: 0 0 6px; }
.hd-bar .status { margin: 0; }
.hd-list { max-width: 720px; padding-left: 2.1em; margin: 0; }
.hd-list > li { padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.hd-list > li::marker { color: var(--muted); font-weight: 700; }
.hd-q { font-size: 19px; line-height: 1.45; margin: 0 0 6px; }
.hd details summary { cursor: pointer; font-weight: 700; color: var(--main); display: inline-block; padding: 2px 0; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.hd details summary::-webkit-details-marker { display: none; }
.hd details[open] summary { color: var(--muted); font-weight: 600; text-decoration: none; }
.hd-a { margin: 6px 0 2px; }
.hd-a.has-img { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.hd-a img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; display: block; }
.hd-ans { font-size: 21px; font-weight: 800; margin: 0; }
.hd-ans::first-letter { text-transform: uppercase; }
.hd-x { margin: 4px 0 0; color: var(--muted); font-size: 16px; }
.hd-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 16px; }
.hd-rate .btn { padding: 6px 12px; font-size: 15px; }
.hd.ok .hd-mark, .hd.no .hd-mark { font-size: 14px; font-weight: 700; margin-left: 8px; }
.hd.ok .hd-mark { color: var(--main); }
.hd.no .hd-mark { color: var(--muted); }
.hd-one { padding-left: 0; list-style: none; }
.hd-day { max-width: 720px; border: 2px solid var(--main); border-radius: 8px; padding: 2px 18px 12px; margin: 8px 0 6px; }
.hd-day h2 { margin: 14px 0 0; }
.hd-day .hd-list > li { border-bottom: 0; }
.hd-day .status { margin: 0; }
.hd-cats { padding-left: 1.2em; max-width: 720px; font-size: 18px; }
.hd-cats li { margin: 8px 0; }
.hd-key { display: none; }
@media print {
  .site-head, .site-foot, footer, .crumbs, .hd-bar, .hd-day, .text, .hd details, .hd-rate, .hd-mark, .install, .today { display: none !important; }
  .hd-intro { color: #000; }
  .hd-list > li { break-inside: avoid; padding: 8px 0; }
  .hd-key { display: block; break-before: page; }
  .hd-key ol { columns: 2; font-size: 15px; }
}

/* Koniec hry – spoločné pre všetky hry */
.done-bar { max-width: 520px; margin: 10px auto 0; text-align: center; }
.done-bar[hidden] { display: none; }
.db-line { font-size: 19px; margin: 4px 0 12px; }
.db-line strong { color: var(--main); }
.db-word { text-transform: uppercase; letter-spacing: 1px; color: var(--ink) !important; }
.db-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.db-next { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.db-next strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.countdown { margin: 10px 0 0; font-size: 16px; }
.countdown strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.bar { background: var(--miss); color: #fff; font-weight: 600; padding: 2px 7px; text-align: right; min-width: 26px; border-radius: 3px; box-sizing: border-box; }
.bar.now { background: var(--main); }
.hist { display: grid; grid-template-columns: auto 1fr auto; gap: 5px 10px; align-items: center; font-size: 15px; margin: 0 0 8px; }
.hist > span:first-child, .hist > span:nth-child(3n+1) { white-space: nowrap; color: var(--muted); }
.hist .hd-d { font-size: 14px; color: var(--muted); white-space: nowrap; }
.big-result { font-size: 26px; font-weight: 800; margin: 4px 0; }
.big-result small { font-size: 16px; font-weight: 600; color: var(--muted); }

/* Rozcestník omaľovánok */
.om-hub { margin: 26px 0 8px; }
.om-hub h2 { margin: 0 0 4px; }
.om-hub p { margin: 0 0 10px; max-width: 680px; }
.om-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; }
.om-thumbs a { flex: none; width: 96px; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.om-thumbs img { display: block; width: 90px; height: 120px; margin: 0 auto 4px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
