:root {
  --zaklad: 22px;
  --pozadi: #fbf6ef;
  --karta: #ffffff;
  --text: #2a2321;
  --slabe: #5c524d;
  --hlavni: #8a2d4a;
  --hlavni-tmave: #6e2039;
  --zelena: #2e6b4b;
  --cervena: #a3261f;
  --zluta: #fdf0d5;
  --okraj: #e6dccf;
  --stin: 0 2px 12px rgba(90, 40, 50, .08);
  --jemne: #f8ecef;
}
* { box-sizing: border-box; }
html { font-size: var(--zaklad); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--pozadi); color: var(--text);
  font-family: "Atkinson Hyperlegible", Verdana, "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
}
.obal { max-width: 900px; margin: 0 auto; padding: 16px 16px 120px; }
h1 { color: #4a1b2b; font-size: 2rem; margin: .2em 0 .3em; line-height: 1.15; }
h2 { font-size: 1.55rem; margin: 0 0 .5em; line-height: 1.2; }
h3 { font-size: 1.2rem; margin: .2em 0 .3em; }
p { margin: .4em 0; }
a { color: var(--hlavni); }
.slabe { color: var(--slabe); }
.mensi { font-size: .85rem; }
.skryte { display: none !important; }

/* Hlavička */
.hlava { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.logo { font-weight: 800; font-size: 1.1rem; color: var(--hlavni); letter-spacing: .03em; text-decoration: none; }

/* Karty */
.karta { background: var(--karta); border: 1px solid var(--okraj); border-radius: 18px; padding: 18px 20px; margin: 14px 0; box-shadow: var(--stin); }
.karta.zvyraznena { background: var(--zluta); border-color: #ecd29a; }
.velke-datum { font-size: 2.1rem; font-weight: 800; line-height: 1.15; }
.velky-cas { font-size: 3rem; font-weight: 800; letter-spacing: .02em; }
.radek { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.mezera { flex: 1; }

/* Dlaždice */
.dlazdice { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 18px 0; }
@media (min-width: 700px) { .dlazdice { grid-template-columns: repeat(3, 1fr); } }
.dlazdice button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 140px; padding: 14px 8px; border-radius: 22px; border: 2px solid rgba(42, 35, 33, .08);
  background: #fff; color: var(--text); font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; text-align: center;
  box-shadow: var(--stin);
}
.dlazdice button .ikona { font-size: 2.6rem; line-height: 1; }
.dlazdice button:active { transform: scale(.97); filter: brightness(.96); }
.dlazdice button:hover { filter: brightness(.98); }
.dlazdice button:nth-child(1) { background: #e5eff8; }
.dlazdice button:nth-child(2) { background: #e3f1e8; }
.dlazdice button:nth-child(3) { background: #fbe8ee; }
.dlazdice button:nth-child(4) { background: #f1eaf7; }
.dlazdice button:nth-child(5) { background: #fdf0d8; }
.dlazdice button:nth-child(6) { background: #e2f1f2; }
.dlazdice button:nth-child(7) { background: #e3f1e8; }
.dlazdice button:nth-child(8) { background: #f1eaf7; }
.dlazdice button:nth-child(9) { background: #fbe8ee; }
.dlazdice button:nth-child(10) { background: #fde8e2; }

/* Tlačítka a formuláře */
button, .tlacitko {
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
  min-height: 60px; padding: 12px 22px; border-radius: 14px; border: 3px solid var(--hlavni);
  background: var(--hlavni); color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button:hover, .tlacitko:hover { background: var(--hlavni-tmave); }
button.druhe, .tlacitko.druhe { background: #fff; color: var(--hlavni); }
button.druhe:hover { background: var(--jemne); }
button.zelene { background: var(--zelena); border-color: var(--zelena); }
button.cervene { background: #fff; color: var(--cervena); border-color: var(--cervena); }
button.male { min-height: 48px; padding: 6px 14px; font-size: .9rem; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 4px solid #f2a900; outline-offset: 2px; }
.zpet { margin: 4px 0 10px; background: #fff; color: var(--hlavni); }

label { display: block; font-weight: 700; margin: 14px 0 6px; }
input, select, textarea {
  font: inherit; width: 100%; min-height: 60px; padding: 10px 14px; border: 2px solid #a89d94; border-radius: 12px; background: #fff; color: var(--text);
}
.dvojice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trojice { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.tlacitka { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.tlacitka > * { flex: 1 1 200px; }

/* Seznamy */
.polozka { border-top: 1px solid var(--okraj); padding: 14px 0; }
.polozka:first-child { border-top: 0; }
.stitek { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; }
.stitek.zeleny { background: #dff0e5; color: #1d5236; }
.stitek.modry { background: #e3edf7; color: #1f4e7a; }
.stitek.sedy { background: #ece7de; color: #4d4840; }

/* Počasí */
.pocasi-dnes { display: flex; align-items: center; gap: 16px; }
.pocasi-dnes .ikona { font-size: 4rem; line-height: 1; }
.teplota { font-size: 2.4rem; font-weight: 800; }
.tyden { display: grid; gap: 8px; }
.den-pocasi { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--okraj); }
.den-pocasi .ikona { font-size: 2.2rem; }

/* Léky */
.lek { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--okraj); }
.lek:first-child { border-top: 0; }
.lek .cas { font-size: 1.4rem; font-weight: 800; min-width: 90px; }
.lek.vzato .nazev { text-decoration: line-through; color: var(--slabe); }

/* Upozornění na lék */
.prekryv { position: fixed; inset: 0; background: rgba(20, 15, 5, .75); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.prekryv .okno { background: #fff; border-radius: 22px; padding: 26px; max-width: 560px; width: 100%; text-align: center; border: 5px solid var(--zelena); }
.prekryv .okno .ikona { font-size: 4rem; }

/* Hry */
.pexeso { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); }
.pexeso button { aspect-ratio: 1; min-height: 0; padding: 0; font-size: 2.6rem; background: var(--hlavni); border-radius: 14px; }
.pexeso button.otocena, .pexeso button.nalezena { background: #fff; }
.pexeso button.nalezena { border-color: var(--zelena); opacity: .7; }

.osmi { display: grid; gap: 3px; user-select: none; touch-action: none; margin: 0 auto; max-width: 620px; }
.osmi div { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--okraj); border-radius: 6px; font-weight: 800; font-size: clamp(16px, 5vw, 30px); cursor: pointer; }
.osmi div.vybrane { background: #ffe08a; border-color: #d4a000; }
.osmi div.nalezene { background: #cfeed7; border-color: var(--zelena); }
.osmi-slova { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0; font-weight: 700; font-size: 1.05rem; }
.osmi-slova span.ok { text-decoration: line-through; color: var(--zelena); }

.slova-vyber { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .slova-vyber { grid-template-columns: repeat(4, 1fr); } }
.slova-vyber button { background: #fff; color: var(--text); }
.slova-vyber button.zvolene { background: #ffe08a; border-color: #d4a000; }
.slova-vyber button.spravne { background: #cfeed7; border-color: var(--zelena); }
.slova-vyber button.spatne { background: #f8d7d4; border-color: var(--cervena); }
.ukazka-slov { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; font-size: 1.6rem; font-weight: 800; text-align: center; }
.ukazka-slov div { background: #fff; border: 2px solid var(--okraj); border-radius: 12px; padding: 14px 6px; }

.cisla-ukazka { font-size: 3.4rem; font-weight: 800; text-align: center; letter-spacing: .15em; padding: 20px 0; }

.zprava { padding: 14px 18px; border-radius: 14px; background: #f0f4f9; border: 1px solid #c9d8e8; margin: 12px 0; }
.zprava.chyba { background: #fcebea; border-color: #e5b3ae; }
.zprava.ok { background: #e8f3ec; border-color: #b5d6c1; }

.nacitani { padding: 20px 0; font-weight: 700; color: var(--slabe); }

/* Spodní lišta */
.lista { position: fixed; left: 0; right: 0; bottom: 0; background: #fffdfa; border-top: 1px solid var(--okraj); box-shadow: 0 -2px 12px rgba(90, 40, 50, .06); display: flex; justify-content: center; padding: 8px env(safe-area-inset-right) calc(8px + env(safe-area-inset-bottom)) env(safe-area-inset-left); z-index: 20; }
.lista button { flex: 1; max-width: 300px; margin: 0 6px; min-height: 64px; font-size: 1.05rem; }

@media (max-width: 420px) {
  .velke-datum { font-size: 1.7rem; }
  h1 { font-size: 1.7rem; }
  .karta { padding: 14px 14px; }
  .dvojice { grid-template-columns: 1fr; }
}
@media print { .lista, .zpet, button { display: none !important; } }
