.nkg-portal .nkg-modal[data-nkg-modal="jajka-na-czas"] {
    width: min(100% - 1rem, 61rem, max(26rem, (100dvh - 7rem) * 1.8));
}
.nkg-eggs {
    padding: .55rem;
}
.nkg-eggs-console {
    container-type: inline-size;
    position: relative;
    aspect-ratio: 1440 / 800;
    isolation: isolate;
    user-select: none;
    -webkit-user-select: none;
}
.nkg-eggs-shell {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    pointer-events: none;
}
.nkg-eggs-lcd {
    position: absolute;
    top: 22.5%;
    left: 20.833333%;
    width: 58.333333%;
    height: 62.5%;
    overflow: hidden;
    background: #b6c8b7;
    color: #233524;
    font-family: ui-monospace, monospace;
}
.nkg-eggs-lcd canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}
.nkg-eggs-hud {
    position: absolute;
    inset: 6.4% 0 auto;
    pointer-events: none;
    text-align: center;
    font-size: clamp(10px, 2.82cqw, 28px);
    line-height: 1;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}
.nkg-eggs-hud output {
    position: absolute;
    transform: translateX(-50%);
}
.nkg-eggs-hud [data-egg-score] { left: 16.65%; }
.nkg-eggs-hud [data-egg-best] { left: 50%; }
.nkg-eggs-hud [data-egg-errors] { left: 83.3%; }
.nkg-eggs-goal {
    position: absolute;
    inset: 15.9% 0 auto;
    display: grid;
    justify-items: center;
    gap: .1em;
    pointer-events: none;
    font-size: clamp(7px, 1.36cqw, 14px);
    line-height: 1.04;
    font-weight: 700;
    text-transform: uppercase;
}
.nkg-eggs-goal strong {
    font-size: .92em;
}
.nkg-eggs-overlay {
    position: absolute;
    inset: 14.5% 0 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: clamp(3px, 1.15cqw, 12px);
    padding: .35rem;
    background: #c0d0bee8;
    text-align: center;
    line-height: 1.15;
}
.nkg-eggs-overlay strong { font-size: clamp(11px, 3.2cqw, 34px); }
.nkg-eggs-overlay p {
    max-width: 32ch;
    margin: 0;
    font-size: clamp(9px, 1.65cqw, 15px);
}
.nkg-portal .nkg-eggs-action {
    min-height: 32px;
    padding: .25em .7em;
    border: 0;
    border-radius: 6px;
    background: #253925;
    color: #eef7df;
    font-size: clamp(10px, 1.8cqw, 16px);
    font-weight: 800;
}
.nkg-portal .nkg-eggs-action:enabled:hover {
    background: #334d31;
}
.nkg-portal .nkg-eggs :is(.nkg-eggs-red, .nkg-eggs-switch) {
    position: absolute;
    display: block;
    border: 0;
    padding: 0;
    min-width: 0;
    min-height: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 10px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.nkg-portal .nkg-eggs-red {
    width: max(45px, 10.208333%);
    height: max(44px, 19.125%);
    transform: translate(-50%, -50%);
}
.nkg-eggs-red[data-egg-lane="0"],
.nkg-eggs-red[data-egg-lane="1"] { left: 11.076389%; }
.nkg-eggs-red[data-egg-lane="2"],
.nkg-eggs-red[data-egg-lane="3"] { left: 88.993056%; }
.nkg-eggs-red[data-egg-lane="0"],
.nkg-eggs-red[data-egg-lane="2"] { top: 41.3125%; }
.nkg-eggs-red[data-egg-lane="1"],
.nkg-eggs-red[data-egg-lane="3"] { top: 69.3125%; }
.nkg-eggs-red::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7.708333cqw;
    height: 8.125cqw;
    transform: translate(-50%, -50%);
    background: url("art/pressed.webp") var(--egg-pressed-frame, 0%) center / 400% 100% no-repeat;
    opacity: 0;
}
.nkg-eggs-red[data-egg-lane="1"] { --egg-pressed-frame: 33.333333%; }
.nkg-eggs-red[data-egg-lane="2"] { --egg-pressed-frame: 66.666667%; }
.nkg-eggs-red[data-egg-lane="3"] { --egg-pressed-frame: 100%; }
.nkg-eggs-red:is(:active, [aria-pressed="true"])::after { opacity: 1; }
.nkg-portal .nkg-eggs-switch {
    left: 88.993056%;
    width: max(28px, 9.444444%);
    height: max(15px, 8.625%);
    transform: translateX(-50%);
}
.nkg-eggs-switch[data-egg-start] { top: 25.875%; }
.nkg-eggs-switch[data-egg-sound] { top: 17.25%; }
.nkg-eggs-switch[data-egg-sound]::after {
    position: absolute;
    content: "";
    display: block;
    top: 18%;
    right: 4%;
    width: clamp(3px, .75cqw, 7px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: #405043;
    box-shadow: 0 0 0 1px #344230;
}
.nkg-eggs-switch[data-egg-sound][aria-pressed="true"]::after {
    background: #b8ff65;
    box-shadow: 0 0 3px 1px #73b848;
}
.nkg-eggs-tools {
    display: flex;
    justify-content: center;
    margin-block: .2rem .4rem;
}
.nkg-eggs-tools [data-egg-pause] {
    min-height: 38px;
    padding-block: .25em;
}
@media (max-width: 600px) {
    .nkg-eggs { padding: .2rem; }
}
