*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#17130f;color:white;font-family:Arial,sans-serif}body{display:grid;place-items:center;overscroll-behavior:none}#game{position:relative;width:min(100vw,200vh);width:min(100vw,200dvh);aspect-ratio:2/1;container-type:inline-size;isolation:isolate;user-select:none;touch-action:none}.layer,#eggs,#controls{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.layer{object-fit:contain}.layer[hidden]{display:none}.paw{position:absolute;border:0;background:transparent;padding:0;cursor:pointer;pointer-events:auto;touch-action:none;border-radius:50%}.paw:focus-visible{outline:3px solid white}.pressed{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.egg{position:absolute;object-fit:contain;pointer-events:none;transform:translate(-50%,-50%)}

/* =========================================================
   HUD – SCORE, LIVES A REVERSED
   ========================================================= */

#hud {
    position: absolute;
    left: 24%;
    right: 24%;
    top: 19%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.65cqw;
    font-weight: bold;
    text-shadow: 0 1px 2px #000;
    pointer-events: none;
}

/* Společné pozadí nápisů */
#hud > span {
    background: rgba(25, 16, 8, 0.45);
    height: 2.5cqw;
    padding: 0 0.3cqw;
    border-radius: 0.5cqw;
    white-space: nowrap;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4cqw;
    line-height: 1;
}

/* Společná velikost SCORE a LIVES */
#hud > span:first-child,
#hud > span:last-child {
    width: 14cqw;
    flex-shrink: 0;
    box-sizing: border-box;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* SCORE */
#hud > span:first-child {
    color: #ffda80;
}

/* LIVES */
#hud > span:last-child {
    color: #ffffff;
}

/* REVERSED */
#reverse {
    color: #ff6666;
}

/* Skrytí neaktivního upozornění MOUSEY */
#hud > span[hidden],
#reverse:empty {
    display: none;
}

* #overlay{position:absolute;left:28%;right:28%;top:29%;bottom:22%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;background:#20150de8;border:2px solid #ffc76c;border-radius:1.5cqw;padding:1cqw;font-size:1.5cqw}#overlay[hidden]{display:none}h1{font-size:3cqw;margin:0}p{line-height:1.5;margin:1cqw 0}#start,#start-top{font-size:2cqw;font-weight:bold;background:#ffb744;color:#482509;border:0;border-radius:.7cqw;padding:.7cqw 2.5cqw;cursor:pointer}#rotate{display:none;text-align:center;padding:2rem}@media (orientation:portrait) and (pointer:coarse){#game{display:none}#rotate{display:block}}

#overlay p{margin:.65cqw 0}#start:focus-visible,#start-top:focus-visible{outline:2px solid white;outline-offset:2px}

/* Scrollable final results, including touch scrolling on mobile. */
#game{touch-action:auto}#overlay.results{justify-content:flex-start;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#ffc76c #49311d}#overlay.results>*{flex-shrink:0}#stats{width:100%;max-width:36cqw;text-align:left;margin:0 0 1cqw;font-size:1.55cqw}#stats[hidden]{display:none}#stats>div{display:flex;justify-content:space-between;gap:1cqw;padding:.35cqw .5cqw;border-bottom:1px solid #ffffff20}#overlay.results #message{font-size:2cqw;font-weight:bold;color:#ffca70}#overlay.results #start{margin-bottom:.5cqw}

/* =========================================================
   GAME OVER – ZAOBLENÝ POSUVNÍK
   ========================================================= */

#overlay.results {
    scrollbar-width: auto;
    scrollbar-color: auto;
}

#overlay.results::-webkit-scrollbar {
    width: 0.6cqw;
}

#overlay.results::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 1.5cqw;
    margin-bottom: 1.5cqw;
}

#overlay.results::-webkit-scrollbar-thumb {
    background: #ffc76c;
    border-radius: 1cqw;
    border: 2px solid transparent;
    background-clip: padding-box;
}

#overlay.results::-webkit-scrollbar-thumb:hover {
    background-color: #ffb744;
}

/* Full-size artwork layers and hit areas matching the PNG bounds. */
.utility-art{z-index:5}
.utility-button{position:absolute;z-index:6;border:0;padding:0;background:transparent;cursor:pointer;touch-action:manipulation;border-radius:.5cqw}
.utility-button:focus-visible{outline:2px solid white;outline-offset:2px}
#fullscreen{left:16.4036%;top:88.9515%;width:9.582%;height:7.1026%}
#sound{left:73.788%;top:89.0643%;width:9.582%;height:6.8771%}
/* Fullscreen uses the page root so the game retains its centered 2:1 layout. */
html:fullscreen,html:-webkit-full-screen{background:#17130f}

/* =========================================================
   MOBIL – VYPNUTÍ ZVÝRAZNĚNÍ PŘI DOTYKU
   ========================================================= */

* {
    -webkit-tap-highlight-color: transparent;
}

/* Keep the expanded rules readable inside the original display. */
#overlay:not(.results){overflow-y:auto;justify-content:safe center;touch-action:pan-y;font-size:1.35cqw}
#overlay:not(.results)>*{flex-shrink:0}
#overlay:not(.results) p{line-height:1.25;margin:.45cqw 0}

/* PAUSE / END – artwork hit areas and dialogs */
#pause{left:86.81%;top:5.07%;width:7.05%;height:6.09%}
#end{left:6.14%;top:5.19%;width:7.11%;height:6.09%}
.utility-button:disabled{cursor:default}
.game-dialog{position:absolute;z-index:4;left:28%;right:28%;top:29%;bottom:22%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;background:#20150df2;border:2px solid #ffc76c;border-radius:1.5cqw;padding:1cqw;font-size:1.5cqw;gap:1cqw}
.game-dialog[hidden]{display:none}
.game-dialog p{margin:0;line-height:1.3}
.game-dialog button{font-size:2cqw;font-weight:bold;background:#ffb744;color:#482509;border:0;border-radius:.7cqw;padding:.7cqw 2.5cqw;cursor:pointer;touch-action:manipulation}
.game-dialog button:focus-visible{outline:2px solid white;outline-offset:2px}
.dialog-actions{display:flex;gap:1.5cqw}
#end-no{background:#626262;color:white}
#result-links{margin-top:1cqw;font-size:1.3cqw}#result-links a{color:#ffd58b}#result-links .site-copyright{font-size:1cqw;padding:1cqw 0;opacity:.7}#save-status:empty{display:none}#save-status{font-size:1.2cqw}
#result-links .qf-menu{margin:.5cqw auto;gap:.4cqw;font-size:1.15cqw}#result-links .qf-menu a{min-height:0;padding:.4cqw .65cqw}#result-links[hidden]{display:none}

/* Account information inside the start and results display only. */
#overlay .qf-account { font-size:1.35cqw; margin:.35cqw 0; gap:.4cqw .65cqw; width:100%; flex-shrink:0; }
#overlay .qf-account a, #overlay .qf-account button { font-size:inherit; padding:.35cqw .7cqw; border-radius:.4cqw; touch-action:manipulation; }
#played-account { color:#ffcf91; font-weight:bold; font-size:1.45cqw; overflow-wrap:anywhere; }
#played-account[hidden] { display:none; }

/* Results show the identity captured at game start, not a duplicate account label. */
#overlay.results [data-account-status] { display:none; }
#overlay.results .qf-account:has([data-account-login][hidden]):has([data-account-logout][hidden]) { display:none; }

#start-top[hidden]{display:none}
#start-top{margin:.35cqw 0 .65cqw}
#start:disabled,#start-top:disabled{opacity:.55;cursor:default}

/* Identical compact navigation above and below the result statistics. */
#overlay.results > .qf-account { display:none; }
#result-menu-top { width:100%; flex-shrink:0; }
#result-menu-top[hidden] { display:none; }
#result-menu-top .qf-menu, #result-links .qf-menu { margin:.5cqw auto; gap:.4cqw; font-size:1.15cqw; }
#result-menu-top .qf-menu a, #result-menu-top .qf-menu button,
#result-links .qf-menu a, #result-links .qf-menu button { min-height:0; padding:.4cqw .65cqw; border-radius:.4cqw; color:#f9f0e8; }
