body {
            font-family: sans-serif; margin: 0; padding: 0;
            display: flex; flex-direction: column; height: 100vh;
            background-color: #f0f4f8; overflow: hidden;
            touch-action: none; 
        }
        
        #container {
            flex-grow: 1; background-color: #ffffff;
            background-repeat: repeat;
            position: relative;
            overflow: hidden;
        }
        
        /* ROZTAŽENÉ SPODNÍ MENU */
        #toolbar {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            box-sizing: border-box;
            background: rgba(30, 41, 59, 0.95);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            padding: 8px 15px;
            display: flex; 
            justify-content: space-between; 
            align-items: center;
            z-index: 9999; 
            box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
            flex-wrap: wrap; 
            gap: 10px;
        }

        .toolbar-group {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0; 
        }
        
        /* Levé plovoucí menu */
        #fab-container {
            position: fixed;
            bottom: 80px; 
            left: 20px;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            gap: 12px;
            background: rgba(255, 255, 255, 0.85);
            padding: 12px;
            border-radius: 40px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.12);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.6);
            transition: all 0.3s;
        }
        
        .fab {
            width: 48px; height: 48px;
            border-radius: 50%;
            background: #ffffff; color: #4a5568; border: none;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08); 
            cursor: pointer; transition: all 0.2s;
            display: flex; align-items: center; justify-content: center;
        }
        
        /* Tlačítko posunu - Žlutá varianta */
        #fab-posun { background: #facc15; color: #1f2937; transition: all 0.2s; }
        #fab-posun:hover { background: #eab308; }
        #fab-posun.active { 
            background: #fde047 !important; 
            color: #111827 !important; 
            box-shadow: 0 0 15px rgba(250, 204, 21, 0.85) !important;
            border: 2px solid #facc15 !important;
            transform: scale(1.1);
        }

        .circle-btn {
            width: 44px; height: 44px; 
            border-radius: 50%;
            background: #334155; 
            color: white; border: 1px solid transparent;
            cursor: pointer; transition: all 0.2s;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }
        
        .circle-btn svg { stroke: currentColor; fill: none; }
        .circle-btn svg.fill-icon { fill: currentColor; stroke: none; }
        
        .fab:hover { transform: scale(1.05); }
        .circle-btn:hover { background: #475569; transform: scale(1.05); }
        
        .fab.active { background: #3b82f6 !important; color: white !important; box-shadow: 0 0 15px rgba(59, 130, 246, 0.5); }
        .circle-btn.active { background: #3b82f6; border-color: #3b82f6; color: white; box-shadow: 0 0 15px rgba(59, 130, 246, 0.5); }
        .circle-btn.active svg { stroke: white; }
        .circle-btn.active svg.fill-icon { fill: white; stroke: none; }
        
        select.tool-btn { 
            appearance: auto; cursor: pointer; outline: none; font-family: inherit; 
            padding: 6px 12px; border-radius: 20px; background: #334155; color: white; border: 1px solid #475569; font-weight: bold;
        }

        .color-picker { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0 15px; }
        .color-swatch {
            width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
            border: 2px solid transparent; 
            transition: all 0.2s ease-out;
            flex-shrink: 0;
        }
        .color-swatch.active { 
            border-color: white; transform: scale(1.3); box-shadow: 0 0 0 2px #3b82f6, 0 0 8px rgba(0,0,0,0.5); z-index: 2;
        }

        /* Nápověda Modal - Pevný scrollbar na obsahu, vycentrováno */
        .modal-overlay {
            position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
            background: rgba(0,0,0,0.6); z-index: 100000;
            display: none; align-items: center; justify-content: center;
            backdrop-filter: blur(3px);
            overflow: hidden;
        }
        .modal-content {
            position: relative; background: white; border-radius: 16px; padding: 30px;
            max-width: 700px; width: 90%; max-height: 85vh; overflow-y: auto; overflow-x: hidden; margin: auto;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3); color: #2d3748; box-sizing: border-box;
        }
        
        .modal-content::-webkit-scrollbar { width: 10px; }
        .modal-content::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 8px; }
        .modal-content::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 5px; }
        .modal-content::-webkit-scrollbar-thumb:hover { background: #a0aec0; }
        
        .modal-content h2 { margin-top: 0; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; padding-right: 30px;}
        .modal-content h3 { color: #3b82f6; margin-bottom: 5px; margin-top: 20px; font-size: 18px; display: flex; align-items: center; gap: 8px;}
        .modal-content ul { margin-top: 8px; padding-left: 20px; line-height: 1.5; font-size: 14px; }
        .modal-content li { margin-bottom: 6px; }
        .inline-icon { display: inline-flex; width: 20px; height: 20px; background: #334155; border-radius: 50%; align-items: center; justify-content: center; vertical-align: middle; margin: 0 4px; color: white;}
        .inline-icon svg { width: 12px; height: 12px; stroke: currentColor; fill: none; }
        .inline-icon svg.fill-icon { fill: currentColor; stroke: none; }
        
        .modal-close-x {
            position: absolute; top: 15px; right: 20px; font-size: 28px; font-weight: bold;
            color: #a0aec0; cursor: pointer; line-height: 1; transition: 0.2s;
        }
        .modal-close-x:hover { color: #e53e3e; }

        .modal-close {
            float: right; cursor: pointer; background: #3b82f6; color: white;
            border: none; padding: 12px 24px; border-radius: 8px; font-weight: bold;
            font-size: 16px; margin-top: 20px; transition: 0.2s;
        }
        .modal-close:hover { background: #2563eb; }

        .lang-switch { margin-bottom: 15px; font-size: 26px; cursor: pointer; text-align: center; }
        .lang-switch span { margin: 0 6px; transition: transform 0.2s; display: inline-block; }
        .lang-switch span:hover { transform: scale(1.2); }

        /* Virtuální klávesnice */
        .vk-key {
            padding: 12px 15px; font-size: 22px; font-weight: bold; background: #ffffff; border: 2px solid #e2e8f0;
            border-radius: 12px; cursor: pointer; color: #1e293b; user-select: none;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05); min-width: 55px; transition: all 0.1s;
        }
        .vk-key:active { transform: scale(0.92); box-shadow: 0 1px 2px rgba(0,0,0,0.1); }

        /* Tlačítko pro menu nastavení na mobilech */
        .mobile-menu-btn { display: none; }

        @media (max-width: 900px) {
            #toolbar { padding: 6px; justify-content: space-around; gap: 8px; }
            .toolbar-group { justify-content: center; }
            .circle-btn { width: 38px; height: 38px; }
            .color-swatch { width: 22px; height: 22px; }
            #fab-container { transform: scale(0.9); transform-origin: bottom left; bottom: 105px; left: 15px; }
            .vk-key { padding: 10px; font-size: 18px; min-width: 40px; }
            
            .mobile-menu-btn { display: flex !important; }
            .right-group {
                display: none !important;
                flex-direction: column !important;
                position: absolute !important;
                bottom: 65px !important;
                right: 15px !important;
                background: rgba(30, 41, 59, 0.95) !important;
                padding: 12px !important;
                border-radius: 12px !important;
                box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
                border: 1px solid rgba(255,255,255,0.2) !important;
                z-index: 10000 !important;
            }
            .right-group.show { display: flex !important; }
        }
        @media (max-width: 600px) {
            #toolbar { justify-content: space-between; }
            .circle-btn { width: 36px; height: 36px; }
            .color-swatch { width: 20px; height: 20px; }
            #fab-container { transform: scale(0.8); bottom: 100px; left: 5px;}
        }
