:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --border-color: #333;
    --header-bg: #1a1a1a;
    --font-family: Helvetica, "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    padding: 0.6rem 1.5rem;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
    box-sizing: border-box;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
}

header p {
    margin: 0 0 0 1.5rem;
    color: #888;
    flex-grow: 1;
    font-size: 0.95rem;
}

main {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 0;
}

.site-footer {
    flex-shrink: 0;
    background: #000;
    color: #999;
    border-top: 1px solid #333;
    padding: 0.5rem 1rem;
    font-size: 12px;
    text-align: center;
}

.site-footer-inner {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
}

.site-footer-link {
    color: #bbb;
    text-decoration: none;
}

.site-footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer-sep {
    color: #555;
    user-select: none;
}

#editor-container {
    width: 440px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
}

.editor-tabs {
    display: flex;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.editor-tabs button {
    flex: 1;
    background: none;
    border: none;
    color: #999;
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
}

.editor-tabs button.active {
    color: #fff;
    border-bottom: 2px solid #0078D4;
    background: #1e1e1e;
}

.tab-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

/* Visual Editor Styles */
.visual-editor {
    padding: 12px;
    color: #d4d4d4;
    font-size: 13px;
}

.editor-section-container {
    margin-bottom: 40px;
}

.editor-section-title {
    margin: 0;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
}

.section-header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    min-height: 28px;
    position: relative;
}

.section-header-top .btn-small {
    position: absolute;
    right: 0;
}

.editor-section {
    margin-bottom: 0;
    background: #252526;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-header h3, .section-header h4 {
    margin: 0;
    border: none;
    padding: 0;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: #aaa;
    font-size: 12px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

input[type="text"], select {
    width: 100%;
    padding: 6px 8px;
    background: #2d2d2d;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 13px;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #0078D4;
}

/* Metro-Farbe: Trigger wie früheres Farbfeld, Palette nur bei Klick */
.metro-color-field {
    position: relative;
}

.metro-color-trigger {
    display: block;
    width: 100%;
    height: 30px;
    padding: 0;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
}

.metro-color-trigger:hover {
    border-color: #666;
}

.metro-color-trigger:focus {
    outline: none;
    border-color: #0078D4;
    box-shadow: 0 0 0 1px #0078D4;
}

.metro-palette-dropdown {
    position: fixed;
    z-index: 5000;
    padding: 6px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    /* top/left setzt metrovizPositionPalette() per JS */
}

.metro-palette {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.metro-palette--compact {
    gap: 3px;
    width: max-content;
}

.metro-swatch {
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.metro-swatch--compact {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

.metro-swatch:hover {
    border-color: rgba(255, 255, 255, 0.65);
}

.metro-swatch--active {
    border-color: #fff;
    box-shadow: 0 0 0 1px #0078D4;
}

.metro-swatch--custom {
    cursor: default;
}

.metro-swatch--custom:hover {
    border-color: rgba(255, 255, 255, 0.35);
}

.card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}

.line-card {
    border-left: 4px solid var(--line-color, #0078D4);
}

.station-card {
    background: #252526;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    position: relative;
}

.station-card::before {
    content: '';
    position: absolute;
    left: -23px; /* Re-adjusted for centering based on visual feedback */
    top: 20px;
    width: 10px;
    height: 10px;
    background: #1e1e1e; /* Back to dark filling to match line background */
    border: 3px solid var(--line-color, #0078D4);
    border-radius: 50%;
    z-index: 5;
}

.stations-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #333;
}

.btn-small {
    background: #333;
    color: #ddd;
    border: 1px solid #444;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.btn-small:hover {
    background: #444;
    color: #fff;
}

.btn-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    color: #ddd;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-icon:not(:disabled):hover {
    background: #444;
}

.btn-danger:not(:disabled):hover {
    background: #d32f2f;
    border-color: #d32f2f;
    color: #fff;
}

#json-editor {
    flex-grow: 1;
    width: 100%;
    border: none;
    resize: none;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #d4d4d4;
    background-color: transparent;
    box-sizing: border-box;
    outline: none;
    line-height: 1.5;
}

#editor-error {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffebee;
    color: #c62828;
    padding: 0.5rem;
    font-size: 12px;
    border-top: 1px solid #ffcdd2;
    z-index: 10;
}

#editor-error.hidden {
    display: none;
}

#metroviz-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: #ffffff;
    padding: 0 1.5rem;
    box-sizing: border-box;
    min-width: 0;
}

#metroviz-container svg {
    flex: 1;
    min-height: 0;
}

.metro-relation-path.metro-relation-hover {
    stroke-width: 2.5;
}

.metro-relation-path.relation-path-selected {
    stroke-width: 3.2;
}

.tooltip-note {
    color: #555;
    font-size: 0.85em;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 8px;
    pointer-events: none;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
}

.tooltip.hidden {
    opacity: 0;
    visibility: hidden;
}

.tooltip-desc {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    max-width: 250px;
    color: #555;
}

.tooltip-desc p {
    margin: 0 0 4px 0;
}

.tooltip-desc ul, .tooltip-desc ol {
    margin: 0 0 4px 0;
    padding-left: 20px;
}

.tooltip-desc a {
    color: #0078D4;
}

/* SVG Styles */
.zone-band {
    opacity: 0.1;
}
.zone-label {
    font-weight: bold;
    font-size: 14px;
    fill: #555;
}
.axis-grid line {
    stroke: #e0e0e0;
}
.axis-grid path {
    stroke: none;
}
.axis text {
    fill: #666;
    font-size: 12px;
}
.metro-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.station-circle {
    fill: #fff;
    stroke-width: 2px;
}
.transfer-circle {
    fill: #fff;
    stroke-width: 3px;
}
.terminus-line {
    stroke-width: 3px;
    stroke-linecap: round;
}
.station-label {
    font-size: 12px;
    fill: #333;
}
/* --- Extracted from index.html inline styles --- */

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.controls button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    background: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 58px;
    height: 40px;
}
.controls button svg {
    width: 14px;
    height: 14px;
    margin-bottom: 2px;
    fill: currentColor;
}
.controls button:hover {
    background: #3d3d3d;
    border-color: #666;
    color: #fff;
}
.controls select {
    height: 40px;
    padding: 0 32px 0 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #2d2d2d;
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23e0e0e0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 10px auto;
    max-width: 120px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.controls .lang-select {
    width: 55px;
    min-width: 55px;
    max-width: 55px;
    padding: 0 18px 0 8px;
    background-position: right 6px top 50%;
}
.controls select:hover, .controls select:focus {
    border-color: #666;
    background-color: #3d3d3d;
}
.view-switcher {
    display: flex;
    background: #1e1e1e;
    padding: 3px;
    border-radius: 6px;
    border: 1px solid #444;
    margin: 0 5px;
    gap: 2px;
    height: 40px;
    box-sizing: border-box;
}
.view-switcher button {
    background: transparent;
    border: 1px solid transparent;
    color: #888;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 60px;
    height: 100%;
}
.view-switcher button:hover:not(.active) {
    color: #e0e0e0;
    background: #2d2d2d;
}
.view-switcher button.active {
    background: #3d3d3d;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border: 1px solid #555;
}
.view-switcher button svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    padding: 4px;
    margin-top: 4px;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.dropdown-menu a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-align: left;
    transition: all 0.2s ease;
}
.dropdown-menu a:hover {
    background: #3d3d3d;
    color: #fff;
}
[x-cloak] { display: none !important; }
.app-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.app-modal-backdrop--above {
    z-index: 2100;
}
.app-modal {
    background: #2d2d2d;
    border: 1px solid #555;
    border-radius: 10px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    color: #e0e0e0;
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.app-modal h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}
.app-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.app-modal-close {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}
.app-modal-close:hover { color: #fff; }
.app-modal-message {
    margin: 0 0 1.25rem;
    font-size: 14px;
    line-height: 1.5;
    color: #ccc;
    white-space: pre-wrap;
}
.app-modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid #555;
    background: #1a1a1a;
    color: #e0e0e0;
    font-size: 13px;
}
.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.app-modal-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #3d3d3d;
    color: #e0e0e0;
    font-size: 12px;
    cursor: pointer;
}
.app-modal-actions button:hover {
    background: #4a4a4a;
    border-color: #666;
}
.app-modal-actions button.app-modal-btn-primary {
    background: #0078D4;
    border-color: #0078D4;
    color: #fff;
}
.app-modal-actions button.app-modal-btn-primary:hover {
    background: #1084d8;
    border-color: #1084d8;
}
.import-dropzone {
    border: 2px dashed #666;
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    margin-bottom: 1.25rem;
    transition: border-color 0.15s, background 0.15s;
}
.import-dropzone.import-dropzone-active {
    border-color: #0078D4;
    background: #333;
}
.import-dropzone p { margin: 0; font-size: 13px; color: #bbb; }
.import-url-row {
    display: flex;
    gap: 8px;
    margin-bottom: 0.75rem;
}
.import-url-row input[type="url"] {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #1a1a1a;
    color: #e0e0e0;
    font-size: 13px;
}
.import-url-row button {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #3d3d3d;
    color: #e0e0e0;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.import-url-row button:hover {
    background: #4a4a4a;
    border-color: #666;
}
.import-cors-help {
    font-size: 12px;
    color: #999;
    line-height: 1.55;
    margin: 0;
}

/* --- Extracted from markdown view inline styles --- */
.markdown-body h1 { border-bottom: 2px solid #eaeaea; padding-bottom: 0.3em; margin-top: 0; }
.markdown-body h2 { color: #0078D4; margin-top: 1.5em; border-bottom: 1px solid #eaeaea; padding-bottom: 0.2em; }
.markdown-body h3 { color: #444; margin-top: 1.2em; }
.markdown-body ul { line-height: 1.6; }
.markdown-body li { margin-bottom: 0.3em; }
.markdown-body strong { color: #111; }

/* --- Extracted from style attributes --- */
.flex-center { display: flex; align-items: center; }
.logo-icon { margin-right: 6px; display: block; }
.header-actions { display: flex; align-items: center; justify-content: space-between; flex-grow: 1; margin: 0 0 0 20px; }
.header-left { display: flex; align-items: center; flex-shrink: 0; }
.header-center { display: flex; justify-content: center; flex: 1 1 0%; margin: 0 6px; min-width: 0; }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.action-menu-wrapper { position: relative; flex-shrink: 0; }
.btn-active { background: #3d3d3d !important; border-color: #666 !important; color: #fff !important; }
.d-none { display: none; }
.m-0 { margin: 0; }
.header-divider { border-left: 1px solid #444; height: 32px; margin: 0 5px; }
.pos-relative { position: relative; }
.import-url-label { margin: 0 0 0.35rem; font-size: 13px; color: #ccc; }
.text-ccc { color: #ccc; }
.flex-2 { flex: 2; }
.flex-1 { flex: 1; }
.event-actions { flex: 0; display: flex; align-items: flex-end; }
.zone-header-row, .line-header-row { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.flex-center-gap { display: flex; align-items: center; gap: 8px; }
.zone-color-dot { width: 12px; height: 12px; border-radius: 50%; }
.zone-title, .line-title { color: #e0e0e0; font-size: 13px; }
.zone-actions, .line-actions { display: flex; gap: 4px; align-items: center; }
.btn-icon-sm { width: 24px; height: 24px; font-size: 12px; }
.btn-icon-xs { width: 24px; height: 24px; font-size: 10px; }
.collapse-icon { font-size: 10px; color: #888; margin-left: 8px; width: 12px; text-align: center; }
.zone-content, .line-content { margin-top: 12px; padding-top: 12px; border-top: 1px solid #333; }
.w-100 { width: 100%; }
.station-header-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.flex-grow-1 { flex-grow: 1; }
.checkbox-group { display: flex; align-items: center; gap: 8px; }
.w-auto { width: auto; }
.checkbox-label { margin: 0; cursor: pointer; }
.mt-2 { margin-top: 8px; }
.relation-row { flex-wrap: wrap; align-items: flex-end; gap: 6px; margin-bottom: 6px; }
.relation-kind { flex: 1; min-width: 120px; }
.relation-target { flex: 2; min-width: 140px; }
.relation-note { flex: 2; min-width: 100px; }
.btn-desc-toggle { width: 100%; margin-bottom: 4px; background: transparent; border: 1px dashed #444; color: #888; }
.desc-textarea { width: 100%; padding: 6px 8px; background: #2d2d2d; border: 1px solid #444; color: #fff; border-radius: 4px; resize: vertical; font-family: monospace; font-size: 12px; }
.markdown-container { flex-grow: 1; overflow-y: auto; padding: 2rem; background-color: #f5f5f5; color: #333; font-family: var(--font-family); box-sizing: border-box; min-width: 0; }
.markdown-content { max-width: 900px; margin: 0 auto; background: white; padding: 3rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

/* --- Responsive Menu --- */
.burger-btn {
    display: none !important;
}

.desktop-only {
    display: block;
}

/* Schmale Viewports und Touch-Geräte: gleiches Menü (iOS/Desktop-Simulation weicht ab) */
@media (max-width: 1080px), (hover: none) and (pointer: coarse) {
    .action-buttons-inner:not(.mobile-open) {
        display: none !important;
        visibility: hidden !important;
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip-path: inset(50%) !important;
        pointer-events: none !important;
        opacity: 0 !important;
        border: none !important;
    }

    /* WebKit: native Controls können trotz verstecktem Container sichtbar bleiben */
    .action-buttons-inner:not(.mobile-open) select,
    .action-buttons-inner:not(.mobile-open) button,
    .action-buttons-inner:not(.mobile-open) .export-dropdown-container,
    .action-buttons-inner:not(.mobile-open) .header-divider {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    .action-buttons-inner.mobile-open {
        display: flex !important;
        visibility: visible !important;
        position: absolute;
        top: 60px;
        right: 20px;
        left: auto;
        width: min(320px, calc(100vw - 24px));
        max-width: min(320px, calc(100vw - 24px));
        height: auto !important;
        max-height: min(85vh, calc(100vh - 72px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        clip-path: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        background: #2d2d2d;
        flex-direction: column;
        padding: 10px;
        border-radius: 8px;
        border: 1px solid #444;
        box-shadow: 0 4px 12px rgba(0,0,0,0.5);
        z-index: 2000;
        align-items: stretch;
        box-sizing: border-box;
    }

    .action-buttons-inner.mobile-open select {
        display: block !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .action-buttons-inner.mobile-open button {
        display: flex !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .action-buttons-inner.mobile-open .export-dropdown-container {
        display: block !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .burger-btn {
        display: flex !important;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        box-sizing: border-box;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .action-buttons-inner button {
        flex-direction: row;
        justify-content: flex-start;
        padding: 8px 12px;
        height: auto;
    }
    
    .action-buttons-inner button svg {
        margin-bottom: 0;
        margin-right: 8px;
    }
    
    .action-buttons-inner select,
    .controls .action-buttons-inner .lang-select {
        width: 100%;
        max-width: none;
    }
    
    .export-dropdown-container {
        width: 100%;
    }
    
    .export-dropdown-container > button {
        width: 100%;
    }

    .view-switcher {
        margin: 0 2px;
        gap: 1px;
        flex-shrink: 1;
        min-width: 0;
    }
    .view-switcher button {
        min-width: 44px;
        padding: 4px 6px;
        flex: 1 1 0;
    }
    .view-switcher button span {
        display: none;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.5rem 0.65rem;
    }
    header h1 {
        display: none;
    }
    .logo-icon {
        margin-right: 0;
    }
    .hide-mobile {
        display: none !important;
    }
}
