:root {
    --pozadi: #f6f1e7;
    --karta: #fffdf8;
    --text: #2d2a26;
    --tlumeny: #7a7166;
    --akcent: #b5532a;
    --akcent-tmavy: #8e3e1d;
    --zelena: #3d7a4f;
    --zluta: #d9a21b;
    --okraj: #e4dccd;
    --stin: 0 2px 10px rgba(80, 60, 30, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--pozadi); color: var(--text);
       font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; line-height: 1.5; }
a { color: var(--akcent); }
main { max-width: 1000px; margin: 0 auto; padding: 24px 16px 40px; }
h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: normal; font-size: 32px; margin: 0 0 10px; }
h2 { font-family: Georgia, serif; font-weight: normal; }

.lista { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px;
         background: #3b342c; color: #f6f1e7; }
.lista a { color: #f6f1e7; text-decoration: none; }
.lista .logo { font-weight: bold; font-size: 18px; }
.lista nav { display: flex; gap: 16px; align-items: center; }
.lista .kdo { opacity: .8; }
.paticka { text-align: center; color: var(--tlumeny); font-size: 13px; padding: 20px; }

.karta { background: var(--karta); border: 1px solid var(--okraj); border-radius: 14px; padding: 24px; box-shadow: var(--stin); }
.hlaska { background: #fff6d9; border: 1px solid #f0d98a; border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; }
.hlaska.hotovo { background: #e3f2e6; border-color: #a8d3b1; }
.drobne { font-size: 13px; color: var(--tlumeny); }
.napoveda { color: var(--tlumeny); font-size: 14px; }

label { display: block; margin-bottom: 14px; font-weight: 600; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit;
                          border: 1px solid var(--okraj); border-radius: 8px; background: #fff; }
textarea { resize: vertical; }
.tlacitko, button.maly { background: var(--akcent); color: #fff; border: 0; border-radius: 8px; padding: 12px 22px;
                         font: inherit; font-weight: 600; cursor: pointer; }
.tlacitko:hover, button.maly:hover { background: var(--akcent-tmavy); }
button.maly { padding: 6px 12px; font-size: 14px; }
button.maly.zapnuto { background: var(--zelena); }
button.odkaz { background: none; border: 0; padding: 0; color: var(--akcent); text-decoration: underline; cursor: pointer; font: inherit; }

/* Přihlášení */
.prihlaseni { max-width: 460px; margin: 30px auto; }
.tlacitko.google { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; background: #fff; color: var(--text);
                   border: 1px solid var(--okraj); box-shadow: var(--stin); margin: 8px 0 4px; }
.tlacitko.google:hover { background: #f3eee4; }
.neprihlasen td { color: #b0a796; }

/* Přehled */
.postup { position: relative; height: 34px; background: #e9e1d2; border-radius: 17px; overflow: hidden; margin: 16px 0 24px; }
.postup-pruh { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--zelena), #67a676); transition: width .5s; }
.postup span { position: relative; display: block; text-align: center; line-height: 34px; font-weight: 600; }

.hry { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hra-karta { position: relative; display: block; background: var(--karta); border: 1px solid var(--okraj); border-radius: 14px;
             padding: 20px; color: var(--text); text-decoration: none; box-shadow: var(--stin); transition: transform .15s, box-shadow .15s; }
.hra-karta:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(80, 60, 30, .15); }
.hra-karta h2 { margin: 10px 0 6px; font-size: 22px; }
.hra-karta p { margin: 0 0 8px; }
.hra-karta .autori { color: var(--tlumeny); font-size: 14px; font-style: italic; }
.stitek { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
          padding: 3px 9px; border-radius: 20px; background: #efe6d6; color: var(--tlumeny); }
.hra-karta.nove .stitek { background: var(--akcent); color: #fff; }
.hra-karta.rozehrano .stitek { background: var(--zluta); color: #fff; }
.hra-karta.hotovo { opacity: .75; }
.hra-karta.hotovo .stitek { background: var(--zelena); color: #fff; }
.hra-karta.vlastni .stitek { background: #6b5ca5; color: #fff; }

/* Stránka hry */
.stranka-hry main { max-width: 1100px; }
.hra-hlavicka { display: flex; align-items: center; gap: 20px; margin-bottom: 14px; flex-wrap: wrap; }
.hra-hlavicka h1 { margin: 0; }
.hra-hlavicka .autori { margin: 0; color: var(--tlumeny); }
.zpet { text-decoration: none; font-weight: 600; }
.ramecek-hry { border-radius: 14px; overflow: hidden; border: 1px solid var(--okraj); box-shadow: var(--stin); background: #111; }
.ramecek-hry iframe { display: block; width: 100%; height: 82vh; min-height: 560px; border: 0; }
.mimo-dotaznik { text-align: center; margin: 18px 0; color: var(--tlumeny); }
.mimo-dotaznik button { margin-left: 8px; }

.dotaznik { max-width: 680px; margin: 24px auto 0; }
.dotaznik h2 { margin-top: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; margin-bottom: 6px; }
label.volba { display: flex; align-items: center; gap: 8px; font-weight: normal; margin: 4px 0; cursor: pointer; }
label.volba input, .body input { width: auto; margin: 0; display: inline; }
.chyby { background: #fde8e4; border: 1px solid #f0b4a8; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; color: #8e2a1a; }

.hvezdy { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.hvezdy input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hvezdy label { font-size: 38px; color: #d8cfbf; cursor: pointer; margin: 0; line-height: 1; transition: color .1s; }
.hvezdy input:checked ~ label, .hvezdy label:hover, .hvezdy label:hover ~ label { color: var(--zluta); }
.hvezdy input:focus-visible + label { outline: 2px solid var(--akcent); }

.body { display: flex; flex-wrap: wrap; gap: 6px; }
.body label { margin: 0; }
.body input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.body span { display: block; width: 42px; height: 42px; line-height: 42px; text-align: center; border-radius: 8px;
             border: 1px solid var(--okraj); background: #fff; cursor: pointer; font-weight: 600; }
.body input:checked + span { background: var(--akcent); color: #fff; border-color: var(--akcent); }
.body input:focus-visible + span { outline: 2px solid var(--akcent); }

/* Admin */
.zalozky { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.zalozky a { padding: 8px 14px; border-radius: 8px; background: #ebe3d4; text-decoration: none; color: var(--text); }
.zalozky a.aktivni { background: var(--akcent); color: #fff; }
.tabulka-obal { overflow-x: auto; }
.tabulka { width: 100%; border-collapse: collapse; background: var(--karta); border-radius: 10px; overflow: hidden; box-shadow: var(--stin); }
.tabulka th, .tabulka td { padding: 10px 12px; border-bottom: 1px solid var(--okraj); text-align: left; vertical-align: top; }
.tabulka th { background: #efe7d8; font-size: 14px; }
.tabulka form { margin: 0; }
.matice th { font-size: 12px; max-width: 110px; }
.stred { text-align: center !important; }
.ok { color: var(--zelena); font-weight: bold; }
.autor { color: #6b5ca5; font-weight: bold; }
.komentare { margin-bottom: 12px; padding: 14px 20px; }
.komentare summary { cursor: pointer; }
.komentar { border-top: 1px solid var(--okraj); padding: 10px 0; }
.komentar form { margin: 4px 0 0; }
.kody { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.kod-karta { border: 1px dashed #b9ad98; border-radius: 8px; padding: 12px; background: #fff; }
.kod-karta .kod { font-family: 'Courier New', monospace; font-size: 26px; font-weight: bold; letter-spacing: 3px; }
.kod-karta form { margin: 0; }

@media print {
    .lista, .zalozky, .napoveda, .paticka, .netisknout, .hlaska { display: none !important; }
    body { background: #fff; }
    .kod-karta { break-inside: avoid; }
}
@media (max-width: 600px) {
    h1 { font-size: 26px; }
    .ramecek-hry iframe { height: 75vh; min-height: 480px; }
}
