        /* 基础样式重置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        /* 全局样式 */
        body {
            font-family: 'Inter', system-ui, sans-serif;
            background-color: #111827;
            color: #ffffff;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        /* 颜色变量 */
        :root {
            --primary: #3B82F6;
            --primary-dark: #2563EB;
            --secondary: #10B981;
            --secondary-dark: #059669;
            --dark: #1F2937;
            --light: #F3F4F6;
            --water: #445E6A;
            --land: #5E5F35;
            --start: #3B82F6;
            --expansion: #F59E0B;
            --gray-800: #1F2937;
            --gray-700: #374151;
            --gray-600: #4B5563;
            --gray-400: #9CA3AF;
        }
        
        /* 像素艺术样式 */
        .pixel-art {
            image-rendering: pixelated;
            image-rendering: crisp-edges;
        }
        
        /* 按钮样式 */
        .btn-3d {
            position: relative;
            padding: 12px 24px;
            border-radius: 8px;
            font-weight: bold;
            transition: transform 0.15s;
            overflow: hidden;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            color: white;
        }
        
        .btn-3d::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: white;
            opacity: 0.3;
            z-index: 0;
            transform: skewX(-12deg) translateX(-100%);
            transition: transform 0.3s;
        }
        
        .btn-3d:hover::before {
            transform: skewX(-12deg) translateX(100%);
        }
        
        .btn-3d:active {
            transform: translateY(1px);
        }
        
        .btn-primary {
            background-color: var(--primary);
            box-shadow: 0 4px 0 0 var(--primary-dark);
        }
        
        .btn-secondary {
            background-color: var(--secondary);
            box-shadow: 0 4px 0 0 var(--secondary-dark);
        }
        
        /* 动画 */
        @keyframes spin-slow {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }
        
        .animate-spin-slow {
            animation: spin-slow 3s linear infinite;
        }
        
        /* 主内容样式 */
        main {
            flex-grow: 1;
            max-width: 1280px;
            margin: 0 auto;
            padding: 20px 24px 28px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            gap: 32px;
        }
        
        @media (min-width: 768px) {
            main {
                flex-direction: row;
                align-items: flex-start;
            }
        }
        
        .gen-page-toolbar {
            max-width: 1280px;
            margin: 16px auto 0;
            padding: 0 24px;
        }
        
        .gen-page-heading {
            font-size: 32px;
            line-height: 1.2;
            margin-bottom: 8px;
        }
        
        .gen-page-subtitle {
            color: #D1D5DB;
            font-size: 15px;
            max-width: 740px;
        }
        
        /* 地图容器样式 */
        .map-container {
            width: 100%;
            max-width: 600px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        
        .map-wrapper {
            position: relative;
            width: 100%;
            aspect-ratio: 1/1;
            background-color: #1F2937;
            border-radius: 8px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
            overflow: hidden;
            border: 4px solid #374151;
        }
        
        #mapCanvas {
            width: 100%;
            height: 100%;
        }

        #mapCanvas.paint-mode-active {
            cursor: crosshair;
            touch-action: none;
        }
        
        /* 加载覆盖层 */
        #loadingOverlay {
            position: absolute;
            inset: 0;
            background-color: rgba(17, 24, 39, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .hidden {
            display: none !important;
        }
        
        .loading-content {
            text-align: center;
        }
        
        .loading-spinner {
            display: inline-block;
        }
        
        .loading-text {
            margin-top: 16px;
            font-size: 20px;
            font-weight: 600;
        }
        
        /* 图例样式 */
        .map-legend {
            margin-top: 24px;
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            justify-content: center;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            background-color: #1F2937;
            padding: 8px 16px;
            border-radius: 9999px;
            gap: 8px;
        }
        
        .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 9999px;
        }

        .legend-color--spawn {
            background: rgba(59, 130, 246, 0.22);
            border: 2px solid var(--start);
            box-sizing: border-box;
        }

        .gen-guide-entry {
            width: 100%;
            margin-top: 20px;
        }

        .gen-guide-link {
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            padding: 14px 16px;
            border-radius: 10px;
            border: 1px solid rgba(59, 130, 246, 0.35);
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(17, 24, 39, 0.92));
            text-decoration: none;
            color: #e5eefc;
            transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
        }

        .gen-guide-link:hover {
            border-color: rgba(96, 165, 250, 0.62);
            transform: translateY(-1px);
            box-shadow: 0 8px 22px rgba(37, 99, 235, 0.18);
        }

        .gen-guide-icon {
            font-size: 22px;
            line-height: 1;
            flex-shrink: 0;
        }

        .gen-guide-text {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .gen-guide-text strong {
            font-size: 15px;
            color: #f3f7ff;
        }

        .gen-guide-text small {
            font-size: 12px;
            color: #9db3d8;
        }

        .gen-guide-arrow {
            font-size: 18px;
            color: #93c5fd;
            flex-shrink: 0;
        }
        
        /* 控制面板样式 */
        .control-panel {
            width: 100%;
            max-width: 400px;
            background-color: #1F2937;
            border-radius: 8px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
            padding: 24px;
        }
        
        .panel-actions {
            position: sticky;
            top: 14px;
            z-index: 5;
            background: #1F2937;
            border: 1px solid #374151;
            border-radius: 10px;
            padding: 14px;
            margin-bottom: 18px;
        }
        
        .panel-actions-title {
            font-size: 14px;
            font-weight: 600;
            color: #E5E7EB;
            margin-bottom: 10px;
        }

        .mode-switch-row {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 6px;
            margin-bottom: 10px;
        }

        .mode-segment {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .mode-btn {
            border: 1px solid #4B5563;
            background: #111827;
            color: #E5E7EB;
            border-radius: 8px;
            padding: 8px 10px;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .mode-icon {
            font-size: 14px;
            line-height: 1;
        }

        .mode-btn:hover {
            border-color: #6B7280;
            color: #FFFFFF;
        }

        .mode-btn.active {
            color: #FFFFFF;
            font-weight: 600;
        }

        .mode-btn.newbie-active {
            background: #C2410C;
            border-color: #EA580C;
        }

        .mode-btn.expert-active {
            background: #4C1D95;
            border-color: #7C3AED;
        }

        .mode-desc.newbie {
            color: #FDBA74;
        }

        .mode-desc.expert {
            color: #C4B5FD;
        }

        .btn-newbie {
            background-color: #EA580C;
            box-shadow: 0 4px 0 0 #C2410C;
        }

        .btn-expert {
            background-color: #2563EB;
            box-shadow: 0 4px 0 0 #1D4ED8;
        }

        .panel-actions.newbie {
            border-color: #9A3412;
        }

        .panel-actions.expert {
            border-color: #5B21B6;
        }

        .mode-btn.active::before {
            content: '● ';
            font-size: 10px;
            vertical-align: middle;
        }

        .mode-btn.active {
            color: #FFFFFF;
        }

        .mode-desc {
            font-size: 12px;
            color: #9CA3AF;
            min-height: 16px;
        }
        
        .action-buttons {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .action-buttons .btn-3d {
            width: 100%;
        }
        
        .action-status {
            margin-top: 10px;
            font-size: 12px;
            color: #9CA3AF;
            min-height: 18px;
        }

        .gen-download-stats {
            margin-top: 8px;
            font-size: 12px;
            line-height: 1.55;
            color: #8fa6c9;
        }

        .gen-download-stats strong {
            color: #c9daf5;
            font-weight: 600;
        }

        .gen-download-stats.is-hidden {
            display: none;
        }

        .tool-attribution-notice {
            margin-top: 14px;
            padding: 12px 14px;
            border-radius: 8px;
            border: 1px solid rgba(59, 130, 246, 0.28);
            background: rgba(59, 130, 246, 0.08);
        }

        .tool-attribution-text {
            font-size: 12px;
            line-height: 1.65;
            color: #D1D5DB;
        }

        .tool-attribution-text strong {
            color: #F9FAFB;
            font-weight: 700;
        }

        .tool-attribution-text a {
            color: #93C5FD;
            text-decoration: underline;
            text-underline-offset: 2px;
        }

        .tool-attribution-notice .mini-button {
            margin-top: 10px;
        }

        .tool-attribution-sub {
            margin-top: 8px;
            font-size: 11px;
            line-height: 1.55;
            color: #9CA3AF;
        }

        .terrain-tuning-panel {
            margin-top: 12px;
            margin-bottom: 14px;
            padding: 12px 14px;
            border-radius: 10px;
            border: 1px solid rgba(59, 130, 246, 0.24);
            background: rgba(59, 130, 246, 0.06);
        }

        .terrain-tuning-title {
            margin-bottom: 10px;
            font-size: 13px;
            font-weight: 700;
            color: #E5E7EB;
        }

        .terrain-tuning-panel .control-group:last-child {
            margin-bottom: 0;
        }

        .control-hint {
            margin-top: 6px;
            font-size: 11px;
            line-height: 1.5;
            color: #9CA3AF;
        }
        
        .panel-section {
            margin-bottom: 32px;
        }
        
        .panel-title {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .control-group {
            margin-bottom: 16px;
        }

        .control-group.is-disabled,
        .control-checkbox.is-disabled {
            opacity: 0.45;
        }

        .control-group.is-disabled input:disabled,
        .control-group.is-disabled select:disabled,
        .control-group.is-disabled button:disabled,
        .control-checkbox.is-disabled input:disabled {
            cursor: not-allowed;
        }
        
        .advanced-settings {
            margin-top: 12px;
            border: 1px solid #374151;
            border-radius: 10px;
            padding: 10px 12px;
            background: rgba(17, 24, 39, 0.35);
        }
        
        .advanced-settings > summary {
            cursor: pointer;
            font-weight: 600;
            color: #E5E7EB;
            list-style: none;
        }

        .advanced-settings.locked > summary {
            cursor: not-allowed;
            opacity: 0.72;
        }
        
        .advanced-settings > summary::-webkit-details-marker {
            display: none;
        }
        
        .advanced-settings[open] > summary {
            margin-bottom: 10px;
        }
        
        .control-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }
        
        .control-slider {
            width: 100%;
            height: 28px;
            margin: 0;
            background: transparent;
            border-radius: 4px;
            appearance: none;
            -webkit-appearance: none;
            cursor: pointer;
            touch-action: pan-x;
            pointer-events: auto;
        }

        .control-slider:disabled {
            opacity: 0.35;
            cursor: not-allowed;
        }

        .control-slider::-webkit-slider-runnable-track {
            height: 8px;
            border-radius: 999px;
            background: #374151;
        }

        .control-slider::-webkit-slider-thumb {
            appearance: none;
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            margin-top: -6px;
            background-color: var(--primary);
            border-radius: 50%;
            cursor: pointer;
            border: 2px solid #dbeafe;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
        }

        .control-slider::-moz-range-track {
            height: 8px;
            border-radius: 999px;
            background: #374151;
            border: none;
        }

        .control-slider::-moz-range-thumb {
            width: 18px;
            height: 18px;
            background-color: var(--primary);
            border-radius: 50%;
            cursor: pointer;
            border: 2px solid #dbeafe;
        }
        
        .slider-container {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            min-width: 0;
        }

        .terrain-param-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .terrain-param-input {
            width: 72px;
            flex-shrink: 0;
            padding: 8px 10px;
            border-radius: 8px;
            border: 1px solid rgba(59, 130, 246, 0.45);
            background: #141820;
            color: #f3f4f6;
            font-size: 16px;
            font-weight: 700;
            text-align: center;
            -moz-appearance: textfield;
        }

        .terrain-param-input::-webkit-outer-spin-button,
        .terrain-param-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .terrain-param-input:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        html.tg body.ra3-gen-body .terrain-param-input {
            background: #141820 !important;
            border: 1px solid rgba(59, 130, 246, 0.45) !important;
            color: #f3f4f6 !important;
            pointer-events: auto !important;
        }

        .slider-stepper-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .slider-step-btn {
            flex-shrink: 0;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: 1px solid rgba(59, 130, 246, 0.45);
            background: rgba(59, 130, 246, 0.14);
            color: #dbeafe;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
        }

        .slider-step-btn:hover:not(:disabled) {
            background: rgba(59, 130, 246, 0.28);
        }

        .slider-step-btn:disabled {
            opacity: 0.35;
            cursor: not-allowed;
        }
        
        .slider-value {
            width: 28px;
            flex-shrink: 0;
            text-align: center;
            font-weight: 700;
            color: #93c5fd;
        }
        
        .control-select {
            width: 100%;
            background-color: #374151;
            border: 1px solid #4B5563;
            border-radius: 8px;
            padding: 8px 16px;
            color: white;
            font-size: 16px;
        }
        
        .control-input {
            width: 100%;
            background-color: #374151;
            border: 1px solid #4B5563;
            border-radius: 8px;
            padding: 8px 12px;
            color: white;
            font-size: 14px;
        }
        
        .control-row {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        
        .text-button {
            background: transparent;
            border: 1px solid #4B5563;
            color: #D1D5DB;
            border-radius: 8px;
            padding: 8px 10px;
            cursor: pointer;
            white-space: nowrap;
        }
        
        .text-button:hover {
            border-color: #6B7280;
            color: #FFFFFF;
        }
        
        .control-checkbox {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 8px;
        }
        
        .checkbox-input {
            width: 16px;
            height: 16px;
            accent-color: var(--primary);
        }
        
        .apply-button {
            width: 100%;
            margin-top: 8px;
        }
        
        /* 地图信息样式 */
        .map-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 12px;
            font-size: 14px;
        }
        
        .info-label {
            color: #9CA3AF;
        }
        
        .id-line {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        
        .mini-button {
            background: transparent;
            border: 1px solid #4B5563;
            color: #D1D5DB;
            border-radius: 6px;
            padding: 2px 6px;
            font-size: 12px;
            cursor: pointer;
        }
        
        .mini-button:hover {
            color: #FFFFFF;
            border-color: #6B7280;
        }
        
        /* 响应式样式 */
        @media (max-width: 768px) {
            .btn-3d {
                padding: 10px 20px;
                font-size: 14px;
            }
            
            .control-panel {
                padding: 16px;
            }
            
            .map-wrapper {
                max-width: 400px;
            }
            
            .panel-actions {
                position: static;
            }
        }
        
        
        @media (max-width: 480px) {
            main {
                gap: 16px;
            }
            
            .map-legend {
                gap: 8px;
            }
            
            .legend-item {
                padding: 6px 12px;
                font-size: 14px;
            }
        }

html.tg body.ra3-gen-body .gen-page-shell {
    max-width: 1520px;
    margin: 0 auto;
    padding: 0 20px;
}

html.tg body.ra3-gen-body .gen-page-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "head guide";
    gap: 10px 16px;
    align-items: center;
    max-width: none;
    margin: 0;
    padding: 10px 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html.tg body.ra3-gen-body .gen-page-head {
    grid-area: head;
    min-width: 0;
}

html.tg body.ra3-gen-body .gen-page-heading {
    font-size: clamp(20px, 3vw, 28px);
    line-height: 1.25;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

html.tg body.ra3-gen-body .gen-pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.35;
    color: #e0eaff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(124, 58, 237, 0.38));
    border: 1px solid rgba(147, 197, 253, 0.42);
    border-radius: 6px;
    text-transform: uppercase;
    transform: translateY(-1px);
}

html.tg body.ra3-gen-body .gen-page-subtitle {
    margin: 6px 0 0;
    color: #b8cbe8;
    font-size: 14px;
    line-height: 1.55;
    max-width: none;
}

html.tg body.ra3-gen-body .gen-page-note {
    grid-area: note;
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.65;
    color: #9db3d8;
    max-width: 720px;
}

html.tg body.ra3-gen-body .gen-page-note strong {
    color: #dce7fb;
}

html.tg body.ra3-gen-body .gen-guide-link--toolbar {
    grid-area: guide;
    width: auto;
    min-width: 168px;
    padding: 10px 14px;
    align-self: start;
}

html.tg body.ra3-gen-body .gen-guide-link--toolbar .gen-guide-text small {
    display: block;
}

html.tg body.ra3-gen-body main,
html.tg body.ra3-gen-body main.gen-main {
    display: block;
    max-width: 1520px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 20px 32px;
    box-sizing: border-box;
}

html.tg body.ra3-gen-body .gen-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(248px, 288px);
    gap: 16px;
    align-items: start;
}

html.tg body.ra3-gen-body .gen-layout.gen-layout--expert {
    grid-template-columns: minmax(0, 1fr) minmax(248px, 276px) minmax(280px, 324px);
}

html.tg body.ra3-gen-body .gen-preview-col,
html.tg body.ra3-gen-body .gen-actions-col,
html.tg body.ra3-gen-body .gen-params-col {
    min-width: 0;
}

html.tg body.ra3-gen-body .gen-preview-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

html.tg body.ra3-gen-body .gen-preview-col .map-container {
    max-width: none;
    width: 100%;
    height: auto;
    align-items: stretch;
}

html.tg body.ra3-gen-body .gen-preview-col .map-wrapper {
    width: 100%;
    max-height: min(68vh, 620px);
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    border-width: 1px;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .gen-preview-col .map-wrapper {
    max-height: min(calc(100vh - 210px), 560px);
}

html.tg body.ra3-gen-body .preview-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    margin-top: 12px;
}

html.tg body.ra3-gen-body .preview-meta-row .map-legend {
    margin-top: 0;
}

html.tg body.ra3-gen-body .preview-meta-row .preview-display-option {
    margin-top: 0;
}

html.tg body.ra3-gen-body .gen-params-col {
    display: none;
}

html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .gen-params-col {
    display: block;
}

html.tg body.ra3-gen-body .gen-actions-col .control-panel--actions,
html.tg body.ra3-gen-body .gen-params-col .control-panel--params {
    max-width: none;
    width: 100%;
    padding: 14px 16px 16px;
    border-radius: 12px;
    box-sizing: border-box;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

html.tg body.ra3-gen-body .gen-actions-col .control-panel--actions {
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 88px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .gen-params-col .control-panel--params {
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 88px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .gen-params-col .map-params-panel {
    padding-top: 0;
}

html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .tool-attribution-notice {
    margin-top: 8px;
}

html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .tool-attribution-text {
    font-size: 11px;
    line-height: 1.55;
}

html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .tool-attribution-sub {
    display: none;
}

html.tg body.ra3-gen-body .gen-preview-col .map-legend {
    margin-top: 14px;
    justify-content: flex-start;
    gap: 10px;
}

html.tg body.ra3-gen-body .gen-preview-col .preview-display-option {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    user-select: none;
}

html.tg body.ra3-gen-body .gen-preview-col .preview-display-option .checkbox-input {
    margin: 0;
}

.paint-toolbar {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(20, 24, 32, 0.92);
}

.paint-toolbar-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.paint-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    cursor: pointer;
    user-select: none;
}

.paint-mode-toggle .checkbox-input {
    margin: 0;
}

.paint-toolbar-hint {
    font-size: 12px;
    color: #9ca3af;
}

.paint-toolbar-body {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.height-feature-perf-hint {
    margin-top: 4px;
    color: #fbbf24;
    line-height: 1.5;
}

html.tg body.ra3-gen-body .height-feature-perf-hint {
    color: #fcd34d;
}

.preview-rotate-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.55);
}

.preview-rotate-label {
    font-size: 12px;
    font-weight: 600;
    color: #d1d5db;
}

.preview-rotation-display {
    min-width: 36px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #f3f4f6;
}

.preview-rotate-hint {
    flex: 1 1 180px;
    font-size: 11px;
    color: #9ca3af;
}

.preview-rotate-presets {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.preview-angle-btn {
    min-width: 42px;
    padding: 4px 8px;
    font-size: 12px;
}

.preview-angle-btn.active {
    background: rgba(59, 130, 246, 0.35);
    border-color: rgba(96, 165, 250, 0.85);
    color: #fff;
}

.paint-toolbar-body[hidden] {
    display: none !important;
}

.paint-tool-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.paint-tool-row--actions {
    gap: 6px;
}

.paint-row-label {
    min-width: 36px;
    font-size: 12px;
    color: #9ca3af;
}

.paint-mode-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.08);
    color: #d1d5db;
    font-size: 13px;
    cursor: pointer;
}

.paint-mode-btn.active {
    background: rgba(148, 163, 184, 0.28);
    border-color: rgba(203, 213, 225, 0.75);
    color: #fff;
}

.paint-tool-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.1);
    color: #dbeafe;
    font-size: 13px;
    cursor: pointer;
}

.paint-tool-btn.active {
    background: rgba(59, 130, 246, 0.35);
    border-color: rgba(96, 165, 250, 0.8);
    color: #fff;
}

.paint-tool-btn[data-tool="water"].active,
#paintToolWaterBtn.active {
    background: rgba(37, 99, 235, 0.35);
    border-color: rgba(96, 165, 250, 0.85);
}

.paint-tool-btn[data-tool="flat"].active,
#paintToolFlatBtn.active {
    background: rgba(94, 95, 53, 0.55);
    border-color: rgba(158, 160, 90, 0.85);
    color: #f3f4f6;
}

.paint-tool-btn[data-tool="hill"].active,
#paintToolHillBtn.active {
    background: rgba(152, 130, 85, 0.55);
    border-color: rgba(184, 158, 100, 0.9);
    color: #fff;
}

.paint-tool-btn[data-tool="peak"].active,
#paintToolPeakBtn.active {
    background: rgba(176, 158, 112, 0.55);
    border-color: rgba(210, 190, 140, 0.9);
    color: #fff;
}

.paint-brush-size {
    min-width: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #f3f4f6;
}

.paint-protect-spawns {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    user-select: none;
}

.paint-protect-spawns .checkbox-input {
    margin: 0;
}

html.tg body.ra3-gen-body .gen-actions-col .panel-actions {
    border-bottom: none;
    padding-bottom: 0;
}

html.tg body.ra3-gen-body .gen-actions-col .preview-info-panel.panel-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    padding-bottom: 0;
}

html.tg body.ra3-gen-body .panel-title--compact {
    font-size: 14px;
    margin-bottom: 8px;
}

html.tg body.ra3-gen-body .panel-title--compact svg {
    display: none;
}

html.tg body.ra3-gen-body .gen-actions-col .preview-info-panel .gen-info-grid {
    grid-template-columns: 1fr;
}

html.tg body.ra3-gen-body .gen-actions-col .map-info {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 6px 8px;
}

html.tg body.ra3-gen-body .panel-actions {
    position: static;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    padding: 0 0 14px;
    margin-bottom: 0;
}

html.tg body.ra3-gen-body .panel-section {
    margin-bottom: 0;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html.tg body.ra3-gen-body .panel-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

html.tg body.ra3-gen-body .panel-title {
    font-size: 15px;
    margin-bottom: 10px;
}

html.tg body.ra3-gen-body .panel-title svg {
    width: 18px;
    height: 18px;
}

html.tg body.ra3-gen-body .panel-params-hint {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(234, 88, 12, 0.1);
    border: 1px solid rgba(234, 88, 12, 0.28);
    color: #fdba74;
    font-size: 12px;
    line-height: 1.55;
}

html.tg body.ra3-gen-body .panel-params-hint.is-hidden {
    display: none;
}

html.tg body.ra3-gen-body .map-params-panel[hidden] {
    display: none !important;
}

html.tg body.ra3-gen-body .control-slider {
    position: relative;
    z-index: 2;
    height: 28px;
    background: transparent !important;
    pointer-events: auto !important;
    touch-action: pan-x !important;
}

html.tg body.ra3-gen-body .control-slider::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18) !important;
}

html.tg body.ra3-gen-body .control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -6px;
    background: linear-gradient(180deg, #4da3ff, var(--tg-brand)) !important;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

html.tg body.ra3-gen-body .gen-info-grid {
    display: grid;
    gap: 8px;
}

html.tg body.ra3-gen-body .map-container .preview-info-panel.panel-section {
    margin-top: 12px;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(17, 24, 39, 0.72);
}

html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .control-hint {
    font-size: 11px;
    line-height: 1.45;
    margin-top: 4px;
}

html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .terrain-tuning-title,
html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .panel-actions-title {
    font-size: 13px;
}

html.tg body.ra3-gen-body .map-info {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin-bottom: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html.tg body.ra3-gen-body .fairness-value-wrap {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

html.tg body.ra3-gen-body .fairness-detail {
    color: #9db3d8;
    font-size: 11px;
    line-height: 1.35;
}

html.tg body.ra3-gen-body .gen-export-hint {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.65;
    color: #9db3d8;
}

html.tg body.ra3-gen-body .gen-export-hint strong {
    color: #dce7fb;
}

html.tg body.ra3-gen-body .gen-download-stats {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.55;
    color: #8fa6c9;
}

html.tg body.ra3-gen-body .gen-download-stats strong {
    color: #c9daf5;
    font-weight: 600;
}

html.tg body.ra3-gen-body .gen-download-stats.is-hidden {
    display: none;
}

html.tg body.ra3-gen-body .btn-tertiary {
    background-color: #374151;
    box-shadow: 0 4px 0 0 #1F2937;
}

html.tg body.ra3-gen-body .btn-3d:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 1100px) {
    html.tg body.ra3-gen-body .gen-page-toolbar {
        grid-template-columns: 1fr;
        grid-template-areas:
            "head"
            "guide";
    }

    html.tg body.ra3-gen-body .gen-guide-link--toolbar {
        width: 100%;
    }

    html.tg body.ra3-gen-body .gen-layout,
    html.tg body.ra3-gen-body .gen-layout.gen-layout--expert {
        grid-template-columns: 1fr;
    }

    html.tg body.ra3-gen-body .gen-actions-col .control-panel--actions,
    html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .gen-params-col .control-panel--params {
        position: static;
        max-height: none;
    }

    html.tg body.ra3-gen-body .gen-preview-col .map-wrapper,
    html.tg body.ra3-gen-body .gen-layout.gen-layout--expert .gen-preview-col .map-wrapper {
        max-height: min(56vw, 480px);
    }

    html.tg body.ra3-gen-body .gen-preview-col .map-legend {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    html.tg body.ra3-gen-body main.gen-main {
        padding: 12px 14px 32px;
    }

    html.tg body.ra3-gen-body .gen-actions-col .control-panel--actions {
        padding: 14px;
    }
}
