.play-school-quiz-panel {
            min-width: 0;
            text-align: left;
        }

        .play-school-quiz-stage {
            display: grid;
            width: 100%;
            min-width: 0;
            place-items: start center;
            margin-top: clamp(0.75rem, 1.4vw, 1.25rem);
        }

        #PrirodaHraCtverce {
            border: 2px solid var(--color-grid-line);
            background:
                linear-gradient(#4a8040 0, #4a8040 18%, #34552a 18%, #34552a 30%, #3b2414 30%, #3b2414 100%),
                radial-gradient(circle at 20% 0, rgba(140,210,140,0.35), transparent 55%),
                radial-gradient(circle at 80% 100%, rgba(60,80,60,0.4), transparent 55%);
            background-blend-mode: overlay, normal, normal;
            box-sizing: border-box;
            width: min(100%, 42rem, calc(100dvh - 13rem));
            aspect-ratio: 1 / 1; /* desktop = čtverec */
            position: relative;
            overflow: hidden;
            color: #eaffe5;
            font-smooth: never;
            -webkit-font-smoothing: none;
            --side-group-size: calc(2 * 1.9rem + 0.18rem); /* 2x2 čtverec */
        }

        #PrirodaHraCtverce .hra-inner {
            position: absolute;
            inset: 0;
            padding: 0.4rem;
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
        }

        /* Horní část = hrací pole */
        #PrirodaHraCtverce .hra-main {
            flex: 1 1 auto;
            min-height: 0;
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }

        /* Cihlová "zeď" okolo hracího pole */
        #PrirodaHraCtverce .hra-field-wrapper {
            flex: 1 1 0;
            border-radius: 0.3rem;
            padding: 0.22rem;
            background:
                repeating-linear-gradient(
                    0deg,
                    #5b2f23 0,
                    #5b2f23 6px,
                    #6b3a28 6px,
                    #6b3a28 12px
                ),
                repeating-linear-gradient(
                    90deg,
                    #5b2f23 0,
                    #5b2f23 18px,
                    #7a4630 18px,
                    #7a4630 36px
                );
            background-size: 24px 12px, 36px 24px;
            background-blend-mode: multiply;
            min-height: 0;
            box-shadow:
                0 0 0 2px rgba(0,0,0,0.75),
                0 0 0 4px rgba(80,45,25,0.9);
        }

        /* Vnitřek hracího pole – zelené pozadí */
        #PrirodaHraCtverce .hra-field {
            position: relative;
            width: 100%;
            height: 100%;
            border-radius: 0.18rem;
            overflow: hidden;
            box-shadow: inset 0 0 0 1px rgba(150,210,150,0.65);
            background:
                radial-gradient(circle at 20% 0, rgba(210,255,210,0.25), transparent 60%),
                radial-gradient(circle at 80% 100%, rgba(80,130,80,0.25), transparent 65%),
                linear-gradient(#274821, #182f16);
        }

        /* Vrstva efektu hrací plochy – generovaná z JS (během odpočtu / hry) */
        #PrirodaHraCtverce .hra-field-effect-layer {
            position: absolute;
            inset: 0;
            pointer-events: none;
            opacity: 0;
            mix-blend-mode: screen;
            z-index: 1;
            transition: opacity 0.6s ease-out;
        }

        /* Pravidla – text v hracím poli, bez rámečku, vycentrovaný blok */
        #PrirodaHraCtverce .hra-rules-overlay {
            position: absolute;
            inset: 6% 10% 12% 10%; /* větší mezera dole od hrany pole */
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            background: none;
            box-shadow: none;
            font-size: 0.8rem;
            line-height: 1.4;
            z-index: 5;
            text-align: left;
        }

        #PrirodaHraCtverce .hra-rules-inner {
            max-width: 26rem;
            margin: 0 auto;
        }

        #PrirodaHraCtverce .hra-rules-title {
            font-weight: 700;
            margin-bottom: 0.35rem;
            text-align: center;
        }

        #PrirodaHraCtverce .hra-rules-list {
            margin: 0;
            padding: 0;
        }

        #PrirodaHraCtverce .hra-rules-item {
            margin-bottom: 0.28rem;
            text-align: left;
        }

        /* Start v pravidlech – jen ikona "▶", bez podtržení, ale s malou animací */
        #PrirodaHraCtverce .hra-rules-start-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 0.15rem;
            margin: 0 0.05rem;
            border-radius: 0.16rem;
            border: 1px solid rgba(234,255,229,0.35);
            background: rgba(0,0,0,0.3);
            color: inherit;
            font: inherit;
            cursor: pointer;
            text-decoration: none;
            transform-origin: center;
            transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.12s ease-out;
        }
        #PrirodaHraCtverce .hra-rules-start-btn:hover {
            transform: scale(1.12);
            background: rgba(0,0,0,0.45);
            box-shadow: 0 0 6px rgba(180,255,200,0.8);
        }

        /* Ovládací panel – 4 skupiny: levá 2x2, vedle 2x4 zvířata, pak Rádio, vpravo monitory */
        #PrirodaHraCtverce .hra-controls-row {
            flex: 0 0 auto;
            min-height: 0;
            display: flex;
            align-items: stretch;
            justify-content: space-between;
            gap: 0.35rem;
            padding: 0.25rem 0.35rem;
            border-radius: 0.25rem;
            background:
                linear-gradient(#3b2819, #1f140b);
            box-shadow:
                0 0 0 2px rgba(0,0,0,0.85),
                0 0 0 4px rgba(90,60,40,0.9);
            flex-wrap: nowrap;
        }

        /* Levá skupina – 2×2 mřížka (Start, Stop, Jen kvíz, Mute) – čtverec */
        #PrirodaHraCtverce .hra-controls-left {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-auto-rows: 1fr;
            gap: 0.18rem;
            align-items: stretch;
            justify-items: stretch;
            flex: 0 0 var(--side-group-size);
            max-width: var(--side-group-size);
        }

        /* Prostřední skupina – 2×4 mřížka zvířat */
        #PrirodaHraCtverce .hra-ctrl-animals-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-auto-rows: 1fr;
            gap: 0.18rem;
            align-items: stretch;
            justify-items: stretch;
            flex: 0 0 calc(4 * 1.9rem + 3 * 0.18rem);
            max-width: calc(4 * 1.9rem + 3 * 0.18rem);
        }

        /* Sloupec pro Rádio mezi tlačítky a monitory */
        #PrirodaHraCtverce .hra-radio-column {
            flex: 1 1 auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Pravá skupina – 3 ukazatele pod sebou, stejná šířka jako levá skupina */
        #PrirodaHraCtverce .hra-ctrl-score {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: center;
            gap: 0.18rem;
            flex: 0 0 var(--side-group-size);
            max-width: var(--side-group-size);
        }

        /* Tlačítka – "slot" styl, hnědé rámečky */
        #PrirodaHraCtverce .ctrl-btn {
            width: 1.9rem;
            aspect-ratio: 1 / 1;
            border-radius: 0.1rem;
            border: 2px solid #5c3a23;
            box-shadow:
                inset 0 0 0 1px #120a05,
                0 0 0 1px #000,
                0 2px 0 0 #000;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            cursor: pointer;
            font-family: inherit;
            font-size: 1.1rem;
            color: #f4ffe9;
            background:
                linear-gradient(#6a4a2f, #2b1b10);
        }

        /* V levé 2x2 mřížce a ve 2x4 mřížce zvířat se tlačítka roztáhnou na buňky = přesný čtverec */
        #PrirodaHraCtverce .hra-controls-left .ctrl-btn,
        #PrirodaHraCtverce .hra-ctrl-animals-grid .ctrl-btn {
            width: 100%;
        }

        #PrirodaHraCtverce .ctrl-btn:hover {
            background: linear-gradient(#8a603d, #382215);
            box-shadow:
                inset 0 0 0 1px #1b0f09,
                0 0 0 1px #000,
                0 0 10px rgba(170,255,170,0.8);
        }

        #PrirodaHraCtverce .ctrl-btn:active {
            box-shadow:
                inset 0 0 0 1px #0b0603,
                0 0 0 1px #000;
            transform: translateY(1px);
        }

        #PrirodaHraCtverce .ctrl-btn:disabled {
            opacity: 0.45;
            cursor: default;
            box-shadow:
                inset 0 0 0 1px #111,
                0 0 0 1px #000;
        }

        /* Počítadla – zvířata, srdíčka, čas – stejné šířky v pravém sloupci */
        #PrirodaHraCtverce .score-display {
            width: 100%;
            padding: 0.1rem 0.35rem;
            border-radius: 0.1rem;
            border: 2px solid #5c3a23;
            box-shadow:
                inset 0 0 0 1px #160b06,
                0 0 0 1px #000;
            background: linear-gradient(#42301f, #1a130c);
            font-size: 0.7rem;
            line-height: 1.1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.18rem;
            white-space: nowrap;
            color: #eaffe5;
        }

        #PrirodaHraCtverce .score-label {
            opacity: 0.9;
        }

        #PrirodaHraCtverce .score-value {
            font-variant-numeric: tabular-nums;
        }

        #PrirodaHraCtverce .score-display.anim-more {
            animation: score-more 0.5s ease-out;
        }
        #PrirodaHraCtverce .score-display.anim-less {
            animation: score-less 0.5s ease-out;
        }
        #PrirodaHraCtverce .score-display.danger {
            border-color: #ff9933;
            box-shadow:
                inset 0 0 0 1px #331000,
                0 0 0 1px #000,
                0 0 8px rgba(255,170,90,0.9);
            color: #ffe5c7;
        }

        @keyframes score-more {
            0%   { transform: scale(1); }
            40%  { transform: scale(1.15); }
            100% { transform: scale(1); }
        }
        @keyframes score-less {
            0%   { transform: scale(1); }
            40%  { transform: scale(1.15); box-shadow: 0 0 8px rgba(160,255,160,0.9); }
            100% { transform: scale(1); }
        }

        /* Rádio – pole mezi tlačítky a monitory, vysoké jako dvě tlačítka */
        #PrirodaHraCtverce .radio-display {
            width: 100%;
            height: calc(2 * 1.9rem + 0.22rem); /* dvě tlačítka nad sebou + mezera */
            padding: 0.2rem 0.3rem;
            border-radius: 0.1rem;
            border: 2px solid #283428;
            box-shadow:
                inset 0 0 0 1px #000,
                0 0 0 1px #000;
            background:
                linear-gradient(#1f2d1d, #121a10);
            font-size: 0.68rem;
            line-height: 1.2;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: space-between;
            text-align: left;
            color: #e3f2df;
            opacity: 1;
            overflow-y: auto;
            overflow-x: hidden;
            white-space: normal;
        }

        /* Rádio – žádné efekty na písmu (čisté informace) */
        #PrirodaHraCtverce .radio-display,
        #PrirodaHraCtverce .radio-display * {
            text-shadow: none;
            -webkit-font-smoothing: antialiased;
            font-smooth: auto;
            letter-spacing: normal;
            filter: none;
        }

        #PrirodaHraCtverce .radio-line {
            width: 100%;
        }

        #PrirodaHraCtverce .radio-question {
            margin-bottom: 0.1rem;
        }

        #PrirodaHraCtverce .radio-answer {
            font-weight: 600;
        }

        /* Spawn / Brána – čtverec s přerušovanou čárou na střed */
        #PrirodaHraCtverce .hra-gate {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 1.4rem;
            height: 1.4rem;
            border-radius: 0.15rem;
            border: 2px dashed #e0b37a;
            background: rgba(0,0,0,0.15);
            box-shadow:
                0 0 0 1px rgba(0,0,0,0.8),
                0 0 6px rgba(255,210,150,0.6);
            visibility: hidden;
            z-index: 2;
        }

        #PrirodaHraCtverce .hra-gate::before {
            content: '';
            position: absolute;
            inset: 25%;
            border-radius: 0.1rem;
            border: 1px solid rgba(255,230,190,0.6);
        }

        #PrirodaHraCtverce .hra-gate.gate-pulse::after {
            content: '';
            position: absolute;
            inset: -4px;
            border-radius: 0.2rem;
            border: 2px solid rgba(255,230,180,0.9);
            opacity: 0;
            animation: gatePulse 0.5s ease-out;
        }

        @keyframes gatePulse {
            0%   { transform: scale(1);   opacity: 1; }
            100% { transform: scale(1.5); opacity: 0; }
        }

        /* Zvířata – kulaté emoji nad polem */
        #PrirodaHraCtverce .hra-square {
            position: absolute;
            width: 30px;
            height: 30px;
            border-radius: 999px;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.35rem;
            cursor: pointer;
            user-select: none;
            text-shadow: 0 0 4px rgba(0,0,0,0.9);
            transition: transform 0.12s ease-out;
            z-index: 10;
        }

        #PrirodaHraCtverce .hra-square:hover {
            transform: translateY(-1px);
        }

        .hra-square.active {
            filter: drop-shadow(0 0 6px rgba(250,255,200,1));
        }

        .hra-square-heart {
            animation: heart-float 5s ease-out forwards;
            cursor: pointer;
        }

        @keyframes heart-float {
            0%   { opacity: 1; transform: translate(0, 0) scale(1); }
            25%  { opacity: 1; transform: translate(-6px, -25px) scale(1.05); }
            50%  { opacity: 1; transform: translate(5px, -55px) scale(1.08); }
            75%  { opacity: 0.9; transform: translate(-3px, -85px) scale(1.02); }
            100% { opacity: 0; transform: translate(2px, -110px) scale(0.9); }
        }

        /* Dvojice – vizuální "mela" / chvění */
        .hra-square.paired {
            animation: paired-shake 0.35s infinite;
        }

        @keyframes paired-shake {
            0%   { transform: translate(0, 0) scale(1); }
            25%  { transform: translate(1px, -1px) scale(1.02); }
            50%  { transform: translate(-1px, 1px) scale(0.98); }
            75%  { transform: translate(1px, 1px) scale(1.02); }
            100% { transform: translate(0, 0) scale(1); }
        }

        /* "mluvení" zvířat – komiksové bubliny ve stylu hry */
        #PrirodaHraCtverce .hra-speech-bubble {
            position: absolute;
            padding: 0.18rem 0.4rem;
            border-radius: 0.16rem;
            background: #273322;
            color: #f8fff5;
            font-size: 0.8rem;
            white-space: nowrap;
            pointer-events: none;
            max-width: 11rem;
            overflow: hidden;
            text-overflow: ellipsis;
            border: 1px solid #3b4a34;
            box-shadow:
                0 0 0 1px #000,
                1px 1px 0 #000;
            letter-spacing: 0;
            text-shadow: none;
            transform: translateX(-50%);
            z-index: 12;
        }

        #PrirodaHraCtverce .hra-speech-bubble::after {
            content: '';
            position: absolute;
            left: 50%;
            bottom: -4px;
            width: 6px;
            height: 6px;
            background: #273322;
            border-right: 1px solid #3b4a34;
            border-bottom: 1px solid #3b4a34;
            box-shadow: 1px 1px 0 #000;
            transform-origin: center;
            transform: translateX(-50%) rotate(45deg);
        }

        /* Kvízové pole – hnědé rámečky */
        #PrirodaHraCtverce .hra-quiz-panel {
            position: absolute;
            inset: 10% 10%;
            border-radius: 0.2rem;
            background:
                linear-gradient(#243421, #141c12);
            border: 2px solid #5c3a23;
            box-shadow:
                inset 0 0 0 1px #000,
                0 0 0 2px #000,
                0 0 18px rgba(160,255,190,0.7);
            padding: 0.4rem 0.45rem;
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            opacity: 0;
            pointer-events: none;
            transform: scale(0.9);
            transition: opacity 0.18s ease-out, transform 0.18s ease-out;
            z-index: 30;
            color: #f1ffe9;
        }

        #PrirodaHraCtverce .hra-quiz-panel.visible {
            opacity: 1;
            pointer-events: auto;
            transform: scale(1);
        }

        #PrirodaHraCtverce .hra-quiz-panel.quiz-only {
            inset: 8% 8%;
        }

        #PrirodaHraCtverce .hra-quiz-panel.quiz-happy {
            animation: quizHappyPulse 4s ease-out;
        }

        #PrirodaHraCtverce .hra-quiz-panel.quiz-sad {
            animation: quizSadPulse 4s ease-out;
        }

        @keyframes quizHappyPulse {
            0%   { box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #000, 0 0 10px rgba(150,255,150,0.6); }
            50%  { box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #000, 0 0 22px rgba(180,255,200,1); }
            100% { box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #000, 0 0 10px rgba(150,255,150,0.6); }
        }

        @keyframes quizSadPulse {
            0%   { box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #000, 0 0 10px rgba(255,130,130,0.6); }
            50%  { box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #000, 0 0 22px rgba(255,170,170,1); }
            100% { box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #000, 0 0 10px rgba(255,130,130,0.6); }
        }

        /* Kvíz – vše zarovnáno na střed, bez otazníku v headeru */
        #PrirodaHraCtverce .hra-quiz-header {
            font-size: 0.85rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            opacity: 0.92;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }

        #PrirodaHraCtverce .hra-quiz-question {
            font-size: 0.9rem;
            min-height: 2.2em;
            text-align: center;
        }

        #PrirodaHraCtverce .hra-quiz-options {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            margin-top: 0.1rem;
            align-items: center;
            text-align: center;
        }

        #PrirodaHraCtverce .hra-option-btn {
            padding: 0.25rem 0.6rem;
            border-radius: 0.1rem;
            border: 2px solid #5c3a23;
            box-shadow:
                inset 0 0 0 1px #000,
                0 0 0 1px #000;
            background: linear-gradient(#333f2c, #191f16);
            font-size: 0.85rem;
            text-align: center;
            cursor: pointer;
            color: #f4ffe9;
            min-width: 80%;
        }

        #PrirodaHraCtverce .hra-option-btn:hover {
            background: linear-gradient(#435438, #1e261d);
        }

        #PrirodaHraCtverce .hra-option-btn.correct {
            border-color: #a4ffb3;
            box-shadow:
                inset 0 0 0 1px #1c3f1f,
                0 0 9px rgba(164,255,179,0.9);
        }

        #PrirodaHraCtverce .hra-option-btn.wrong {
            border-color: #ffb3b3;
            box-shadow:
                inset 0 0 0 1px #3f1c1c,
                0 0 7px rgba(255,150,150,0.9);
            opacity: 0.95;
        }

        /* Velká emoční plocha */
        #PrirodaHraCtverce .hra-quiz-message {
            flex: 1 1 auto;
            margin-top: 0.25rem;
            border-radius: 0.12rem;
            border: 2px solid #283428;
            background: linear-gradient(#141e14, #0c140d);
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 0.25rem 0.3rem;
            font-size: 0.9rem;
        }

        #PrirodaHraCtverce .hra-quiz-message-inner {
            white-space: pre-line;
            line-height: 1.25;
            text-align: center;
        }

        #PrirodaHraCtverce .hra-quiz-panel.quiz-happy .hra-quiz-message {
            border-color: #7cff9c;
            background:
                radial-gradient(circle at 20% 0%, rgba(180,255,200,0.5), transparent 60%),
                linear-gradient(#19331e, #0d1f11);
        }

        #PrirodaHraCtverce .hra-quiz-panel.quiz-sad .hra-quiz-message {
            border-color: #ffb3b3;
            background:
                radial-gradient(circle at 80% 0%, rgba(255,190,190,0.4), transparent 60%),
                linear-gradient(#2b1212, #150707);
        }

        /* Jemná statistika pro režim Jen kvíz – dole v panelu, nenápadná */
        #PrirodaHraCtverce .hra-quizonly-stats {
            flex: 0 0 auto;
            font-size: 0.7rem;
            opacity: 0.85;
            text-align: center;
            margin-top: 0.1rem;
        }

        /* Panel pro výběr profilu (Franta/Mirka/Jindřich/Lendl) */
        #PrirodaHraCtverce .hra-profile-panel {
            position: absolute;
            inset: 6% 8%;
            border-radius: 0.2rem;
            background: linear-gradient(#243421, #141c12);
            border: 2px solid #5c3a23;
            box-shadow:
                inset 0 0 0 1px #000,
                0 0 0 2px #000,
                0 0 18px rgba(160,255,190,0.7);
            padding: 0.5rem 0.55rem;
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            z-index: 35;
            color: #f1ffe9;
            opacity: 0;
            pointer-events: none;
            transform: scale(0.9);
            transition: opacity 0.18s ease-out, transform 0.18s ease-out;
        }

        #PrirodaHraCtverce .hra-profile-panel.visible {
            opacity: 1;
            pointer-events: auto;
            transform: scale(1);
        }

        #PrirodaHraCtverce .hra-profile-panel-inner {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            text-align: center;
        }

        #PrirodaHraCtverce .hra-profile-title {
            font-size: 0.9rem;
            text-align: center;
        }

        #PrirodaHraCtverce .hra-profile-buttons {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            align-items: center;
            justify-content: center;
        }

        #PrirodaHraCtverce .hra-profile-btn {
            padding: 0.25rem 0.6rem;
            border-radius: 0.12rem;
            border: 2px solid #5c3a23;
            box-shadow:
                inset 0 0 0 1px #000,
                0 0 0 1px #000;
            background: linear-gradient(#3a2416, #1b0f08);
            cursor: pointer;
            font-size: 0.8rem;
            color: #ffe6d0;
            text-align: center;
            width: 100%;
            max-width: 14rem;
        }

        #PrirodaHraCtverce .hra-profile-btn:hover {
            background: linear-gradient(#543420, #25130a);
        }

        /* Předzvířátko – minizvíře v menu */
        #PrirodaHraCtverce .hra-profile-animal {
            position: absolute;
            width: 32px;
            height: 32px;
            border-radius: 999px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            cursor: pointer;
            user-select: none;
            text-shadow: 0 0 4px rgba(0,0,0,0.9);
            box-shadow:
                0 0 0 1px #000,
                0 0 8px rgba(220,255,200,0.9);
            background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.25), transparent 55%),
                        linear-gradient(#274821, #182f16);
            z-index: 2;
        }

        /* Overlays – odpočet / výhra / prohra */
        #PrirodaHraCtverce .hra-countdown,
        #PrirodaHraCtverce .hra-gameover,
        #PrirodaHraCtverce .hra-win {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
            z-index: 25;
        }

        #PrirodaHraCtverce .hra-gameover,
        #PrirodaHraCtverce .hra-win {
            z-index: 40;
        }

        #PrirodaHraCtverce .hra-countdown-text {
            font-size: 2.2rem;
            font-weight: 800;
            text-shadow: 0 0 14px rgba(0,0,0,1);
            color: #e6ffe6;
        }

        #PrirodaHraCtverce .hra-gameover-inner,
        #PrirodaHraCtverce .hra-win-inner {
            padding: 0.6rem 0.9rem;
            border-radius: 0.2rem;
            border: 2px solid #5c3a23;
            box-shadow:
                inset 0 0 0 1px #000,
                0 0 0 2px #000;
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            align-items: center;
            pointer-events: auto;
            color: #ffe6e6;
        }

        #PrirodaHraCtverce .hra-gameover-inner {
            background: linear-gradient(#3b1010, #1c0505);
        }

        #PrirodaHraCtverce .hra-win-inner {
            background: linear-gradient(#24401f, #101e0f);
            color: #eaffe5;
        }

        #PrirodaHraCtverce .hra-gameover-title,
        #PrirodaHraCtverce .hra-win-title {
            font-size: 1.1rem;
            font-weight: 700;
            text-shadow: 0 0 6px rgba(0,0,0,1);
        }

        #PrirodaHraCtverce .hra-gameover-title {
            animation: kaboom 0.9s infinite alternate;
        }

        @keyframes kaboom {
            0%   { transform: scale(1);   text-shadow: 0 0 7px rgba(255,40,40,0.9); }
            100% { transform: scale(1.05); text-shadow: 0 0 14px rgba(255,240,240,1); }
        }

        #PrirodaHraCtverce .hra-sub-text {
            font-size: 0.8rem;
            opacity: 0.95;
            text-align: center;
        }

        #PrirodaHraCtverce .hra-win-stats {
            font-size: 0.78rem;
            text-align: left;
            width: 100%;
        }

        #PrirodaHraCtverce .hra-win-summary {
            margin-bottom: 0.2rem;
        }

        #PrirodaHraCtverce .hra-win-details-line {
            display: flex;
            justify-content: space-between;
            gap: 0.4rem;
        }

        #PrirodaHraCtverce .hra-win-details-line span {
            white-space: nowrap;
        }

        #PrirodaHraCtverce .hra-gameover-btn,
        #PrirodaHraCtverce .hra-win-btn {
            margin-top: 0.1rem;
            padding: 0.25rem 0.7rem;
            border-radius: 0.12rem;
            border: 2px solid #5c3a23;
            box-shadow:
                inset 0 0 0 1px #000,
                0 0 0 1px #000;
            background: linear-gradient(#3a2416, #1b0f08);
            cursor: pointer;
            font-size: 0.8rem;
            color: #ffe6d0;
        }

        #PrirodaHraCtverce .hra-gameover-btn:hover,
        #PrirodaHraCtverce .hra-win-btn:hover {
            background: linear-gradient(#543420, #25130a);
        }

        /* Mobilní úpravy – obdélník místo čtverce + nové rozložení ovládacího panelu */
        @media (max-width: 640px) {
            #PrirodaHraCtverce {
                width: 100%;
                aspect-ratio: 3 / 4; /* obdélník pro mobil – celá aplikace */
            }

            #PrirodaHraCtverce .hra-inner {
                padding: 0.3rem;
                gap: 0.25rem;
            }

            #PrirodaHraCtverce .hra-rules-overlay {
                inset: 2% 5%;
                align-items: flex-start;
                overflow-y: auto;
                font-size: clamp(0.58rem, 2.4vw, 0.72rem);
                line-height: 1.22;
                scrollbar-width: thin;
            }

            #PrirodaHraCtverce .hra-rules-title {
                margin-bottom: 0.2rem;
            }

            #PrirodaHraCtverce .hra-rules-item {
                margin-bottom: 0.16rem;
            }

            /* Ovládací panel pod hracím polem:
               1.–2. řádek = tlačítka + měřáky vedle sebe (stejně jako na PC),
               3. a další řádky = Rádio přes celou šířku. */
            #PrirodaHraCtverce .hra-controls-row {
                flex-wrap: wrap;
                align-items: flex-start;
            }

            /* Tlačítka a měřáky drží horní dva řádky v jednom "pruhu" */
            #PrirodaHraCtverce .hra-controls-left,
            #PrirodaHraCtverce .hra-ctrl-animals-grid,
            #PrirodaHraCtverce .hra-ctrl-score {
                order: 1;
            }

            /* Rádio spadne až pod ně a roztáhne se na celou šířku panelu */
            #PrirodaHraCtverce .hra-radio-column {
                order: 2;
                flex: 0 0 100%;
                margin-top: 0.25rem;
            }

            #PrirodaHraCtverce .radio-display {
                width: 100%;
                height: auto;
                min-height: calc(2 * 1.9rem + 0.22rem); /* alespoň výška dvou tlačítek */
                max-height: calc(4 * 1.9rem + 0.66rem);  /* cca 3.–4. řádek textu */
            }

            #PrirodaHraCtverce .ctrl-btn {
                width: 1.9rem;
                font-size: 1rem;
            }

            #PrirodaHraCtverce .score-display {
                font-size: 0.68rem;
                padding-inline: 0.25rem;
            }
        }
