.modern-top-actions {
    display: none;
}

html.modern-route {
    --bg-color: #181b20;
    --canvas-bg: #dfe3e6;
    --glass-bg: #22262c;
    --glass-border: #3b424b;
    --text-primary: #f5f7f8;
    --text-secondary: #aeb6bf;
    --accent-color: #35d0a0;
    --accent-hover: #27b989;
    --danger-color: #ff6b6b;
    --danger-hover: #e75353;
    --success-color: #35d0a0;
    color-scheme: dark;
}

html.modern-route,
html.modern-route body {
    width: 100%;
    height: 100%;
    background: #181b20;
}

html.modern-route body {
    font-family: Inter, system-ui, sans-serif;
    color: var(--text-primary);
    letter-spacing: 0;
}

html.modern-route button,
html.modern-route input,
html.modern-route select,
html.modern-route textarea {
    letter-spacing: 0;
}

html.modern-route .paint98-chrome,
html.modern-route .paint98-statusbar,
html.modern-route .paint-chrome {
    display: none;
}

html.modern-route .paint-statusbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 24;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    padding: 0 16px 0 66px;
    border-bottom: 1px solid #353b43;
    background: #20242a;
    color: #dce1e5;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
    font-size: 12px;
}

html.modern-route .paint-statusbar::before {
    content: "Dibujo infinito";
    flex: 0 0 auto;
    color: #ffffff;
    font-size: 15px;
    font-weight: 650;
}

html.modern-route .paint-statusbar > span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #3a414a;
    border-radius: 6px;
    color: var(--text-secondary);
    background: #272c33;
    white-space: nowrap;
}

html.modern-route .paint-statusbar > span:first-of-type {
    padding-left: 22px;
    position: relative;
}

html.modern-route .paint-statusbar > span:first-of-type::before {
    content: "";
    position: absolute;
    left: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success-color);
}

html.modern-route .paint-statusbar > span:nth-of-type(3) {
    display: none;
}

html.modern-route #paint98-connected-users {
    margin-left: auto;
    color: #dff9ef;
    border-color: #356354;
    background: #263d36;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

html.modern-route .modern-top-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

html.modern-route .modern-top-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #454d57;
    border-radius: 6px;
    background: #2b3037;
    color: #f1f3f5;
    font: 600 11px Inter, system-ui, sans-serif;
    cursor: pointer;
    text-decoration: none;
}

html.modern-route .modern-theme-switch {
    color: #dff9ef;
    border-color: #356354;
    background: #263d36;
}

html.modern-route .modern-theme-switch:hover {
    color: #ffffff;
    border-color: #43816d;
    background: #315046;
}

html.modern-route .modern-top-action:hover {
    color: #ffffff;
    border-color: #5b6672;
    background: #353b43;
}

html.modern-route .modern-top-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

html.modern-route .menu-toggle {
    top: 9px;
    left: 14px;
    z-index: 26;
    width: 36px;
    height: 36px;
    border: 1px solid #454d57;
    border-radius: 6px;
    background: #2b3037;
    color: #eef1f3;
    box-shadow: none;
    backdrop-filter: none;
}

html.modern-route .menu-toggle:hover {
    border-color: #5c6773;
    background: #353b43;
    transform: none;
}

html.modern-route .floating-tools {
    top: 68px;
    right: auto;
    left: 12px;
    z-index: 17;
    display: grid;
    grid-template-columns: repeat(2, 40px);
    align-content: start;
    gap: 5px;
    width: 96px;
    max-height: calc(100dvh - 146px);
    padding: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #3b424b;
    border-radius: 8px;
    background: #22262c;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: none;
}

html.modern-route .floating-tools::-webkit-scrollbar {
    width: 4px;
}

html.modern-route .floating-tools::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: #56606b;
}

html.modern-route .paint98-floating-only {
    display: grid;
}

html.modern-route .floating-tool {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #2a2f36;
    color: #b9c0c8;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

html.modern-route .floating-tool:hover {
    color: #ffffff;
    border-color: #4e5762;
    background: #353b43;
    transform: none;
}

html.modern-route .floating-tool.active,
html.modern-route .floating-tool[aria-pressed="true"] {
    color: #ffffff;
    border-color: #4792f2;
    background: #326fbd;
    box-shadow: none;
}

html.modern-route .floating-tool:disabled {
    opacity: 0.35;
    background: #282c32;
}

html.modern-route .floating-tool svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html.modern-route .toolbar-backdrop {
    top: 54px;
    bottom: 0;
    z-index: 20;
    background: rgba(10, 12, 15, 0.46);
}

html.modern-route .toolbar {
    top: 54px;
    bottom: 64px;
    z-index: 22;
    width: min(334px, calc(100vw - 24px));
    height: auto;
    padding: 14px;
    gap: 12px;
    border: 1px solid #3b424b;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: #20242a;
    box-shadow: 16px 0 38px rgba(0, 0, 0, 0.3);
    backdrop-filter: none;
}

html.modern-route .toolbar-header {
    min-height: 38px;
    padding-bottom: 10px;
    border-bottom: 1px solid #373d45;
}

html.modern-route .app-title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 650;
    text-transform: none;
    letter-spacing: 0;
}

html.modern-route .icon-btn,
html.modern-route .tool-btn,
html.modern-route .tool-select,
html.modern-route .tool-number-input,
html.modern-route .tool-text-input,
html.modern-route .tool-textarea,
html.modern-route .tool-check,
html.modern-route .auth-user {
    border-color: #414852;
    border-radius: 6px;
    background: #292e35;
    color: #edf0f2;
    box-shadow: none;
}

html.modern-route .icon-btn:hover,
html.modern-route .tool-btn:hover {
    border-color: #5a6470;
    background: #343a42;
    transform: none;
}

html.modern-route .icon-btn.active,
html.modern-route .icon-btn[aria-pressed="true"],
html.modern-route .tool-btn.active {
    color: #dff7ff;
    border-color: #4e8ff7;
    background: #244f86;
    box-shadow: none;
}

html.modern-route .tool-group label,
html.modern-route .tool-hint,
html.modern-route .panel-summary,
html.modern-route .app-title + * {
    letter-spacing: 0;
}

html.modern-route .tool-group label {
    color: #aeb6bf;
    font-size: 10px;
    font-weight: 650;
}

html.modern-route .panel-group,
html.modern-route .auth-group {
    padding-bottom: 12px;
    border-bottom-color: #373d45;
}

html.modern-route .panel-summary {
    min-height: 30px;
    color: #d5dae0;
    font-size: 11px;
    text-transform: none;
}

html.modern-route .panel-summary::after {
    color: var(--accent-color);
}

html.modern-route .tool-select option {
    color: #171a1e;
    background: #ffffff;
}

html.modern-route .tool-select:focus,
html.modern-route .tool-number-input:focus,
html.modern-route .tool-text-input:focus,
html.modern-route .tool-textarea:focus {
    border-color: #4e8ff7;
    box-shadow: 0 0 0 2px rgba(78, 143, 247, 0.2);
}

html.modern-route .tool-grid-group {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

html.modern-route .tool-grid-group .tool-btn {
    min-height: 58px;
    padding: 6px 3px;
    gap: 5px;
    font-size: 9px;
    line-height: 1.1;
}

html.modern-route .tool-grid-group .tool-btn svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html.modern-route .tool-grid-group .tool-btn span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.modern-route .tool-btn.danger {
    color: #ff9a9a;
}

html.modern-route .tool-btn.danger:hover {
    color: #ffffff;
    border-color: #a94c4c;
    background: #653434;
}

html.modern-route input[type="range"]::-webkit-slider-runnable-track {
    background: #434b55;
}

html.modern-route input[type="range"]::-webkit-slider-thumb {
    background: var(--accent-color);
    box-shadow: none;
}

html.modern-route .status-indicator {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 9px;
    border-color: #3b424b;
    border-radius: 6px;
    background: #292e35;
    color: #b7bec7;
}

html.modern-route .status-dot.connected {
    box-shadow: none;
}

html.modern-route .canvas-minimap {
    top: 68px;
    right: 12px;
    bottom: 70px;
    z-index: 17;
    align-items: flex-start;
    transform: none;
}

html.modern-route .minimap-toggle,
html.modern-route .minimap-panel {
    border-color: #3b424b;
    border-radius: 8px;
    background: #22262c;
    color: #c7cdd3;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: none;
}

html.modern-route .minimap-toggle:hover {
    color: #ffffff;
    border-color: #5b6570;
    background: #30353c;
    transform: none;
}

html.modern-route .minimap-header {
    color: #bfc6cd;
}

html.modern-route #minimap-position {
    color: var(--accent-color);
}

html.modern-route .minimap-jump {
    width: 30px;
    height: 30px;
    border: 1px solid #ffffff;
    border-radius: 50%;
    background: #e95858;
    box-shadow: 0 5px 12px rgba(185, 49, 49, 0.32);
}

html.modern-route .minimap-jump:hover {
    background: #d94a4a;
    box-shadow: 0 6px 14px rgba(185, 49, 49, 0.4);
}

html.modern-route .minimap-scroll {
    height: calc(100dvh - 150px);
    min-height: 220px;
    border-color: #505862;
    border-radius: 5px;
    scrollbar-color: #35d0a0 #30353c;
}

html.modern-route .paint98-color-box {
    position: fixed;
    left: 50%;
    bottom: 10px;
    z-index: 19;
    display: grid;
    grid-template-columns: 48px max-content 48px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: min(1020px, calc(100vw - 250px));
    min-height: 50px;
    padding: 7px 9px;
    border: 1px solid #3b424b;
    border-radius: 8px;
    background: #22262c;
    color: #f0f2f4;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    transform: translateX(-50%);
}

html.modern-route .paint98-current-colors {
    position: relative;
    width: 42px;
    height: 34px;
}

html.modern-route .paint98-primary-swatch,
html.modern-route .paint98-secondary-swatch {
    position: absolute;
    width: 28px;
    height: 24px;
    border: 2px solid #e8ecef;
    border-radius: 4px;
    background: #000000;
}

html.modern-route .paint98-primary-swatch {
    left: 0;
    top: 0;
    z-index: 2;
}

html.modern-route .paint98-secondary-swatch {
    right: 0;
    bottom: 0;
    background: #ffffff;
}

html.modern-route .paint98-swatches {
    display: grid;
    grid-template-columns: repeat(14, 18px);
    grid-template-rows: repeat(2, 16px);
    gap: 3px;
}

html.modern-route .paint98-swatch {
    width: 18px;
    height: 16px;
    padding: 0;
    border: 1px solid #68727c;
    border-radius: 3px;
    cursor: pointer;
}

html.modern-route .paint98-swatch:hover,
html.modern-route .paint98-swatch[aria-pressed="true"] {
    outline: 2px solid #ffffff;
    outline-offset: 1px;
}

html.modern-route .paint98-more-color-btn {
    display: grid;
    place-items: center;
    width: 46px;
    height: 34px;
    padding: 2px;
    border: 1px solid #48515b;
    border-radius: 5px;
    background: #2d333a;
    color: #dfe3e7;
    font: 9px Inter, system-ui, sans-serif;
    cursor: pointer;
}

html.modern-route .paint98-more-color-preview {
    display: block;
    width: 28px;
    height: 8px;
    border-radius: 2px;
    background: #000000;
}

html.modern-route .paint98-color-popup {
    position: absolute;
    left: 54px;
    bottom: 57px;
    z-index: 60;
    width: 260px;
    padding: 10px;
    border: 1px solid #49515b;
    border-radius: 8px;
    background: #252a30;
    color: #eef1f3;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
}

html.modern-route .paint98-color-popup[hidden] {
    display: none;
}

html.modern-route .paint98-color-popup-title {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 650;
}

html.modern-route .paint98-spectrum {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    border: 1px solid #65707a;
    border-radius: 5px;
    cursor: crosshair;
}

html.modern-route .paint98-spectrum-cursor {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #000000;
    transform: translate(-50%, -50%);
}

html.modern-route .paint98-hue-slider {
    margin: 12px 0;
}

html.modern-route .paint98-color-popup-row {
    display: grid;
    grid-template-columns: 30px 1fr 58px;
    align-items: center;
    gap: 7px;
}

html.modern-route .paint98-spectrum-preview {
    width: 28px;
    height: 28px;
    border: 1px solid #6a747f;
    border-radius: 4px;
    background: #000000;
}

html.modern-route .paint98-hex-input,
html.modern-route .paint98-color-close-btn {
    min-width: 0;
    height: 30px;
    border: 1px solid #4b545e;
    border-radius: 5px;
    background: #30363e;
    color: #ffffff;
    font: 11px Inter, system-ui, sans-serif;
}

html.modern-route .paint98-hex-input {
    padding: 4px 7px;
    text-transform: uppercase;
}

html.modern-route .paint98-color-close-btn {
    cursor: pointer;
}

html.modern-route .drawing-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    height: 34px;
    padding-left: 10px;
    border-left: 1px solid #424952;
    color: #e8ebee;
    font: 10px Inter, system-ui, sans-serif;
}

html.modern-route .drawing-controls[hidden],
html.modern-route .drawing-controls [hidden] {
    display: none;
}

html.modern-route .drawing-controls-preview {
    width: 30px;
    border-color: #4b545e;
    border-radius: 5px;
    background: #353b43;
}

html.modern-route .drawing-controls-heading {
    flex-basis: 82px;
}

html.modern-route .drawing-controls-label {
    color: #aeb6bf;
}

html.modern-route .drawing-controls button,
html.modern-route .drawing-controls input[type="number"] {
    height: 30px;
    border: 1px solid #4b545e;
    border-radius: 5px;
    background: #30363e;
    color: #ffffff;
    box-shadow: none;
}

html.modern-route .drawing-controls button {
    display: grid;
    place-items: center;
    width: 30px;
    cursor: pointer;
}

html.modern-route .drawing-controls input[type="number"] {
    width: 48px;
    padding: 3px;
    text-align: center;
}

html.modern-route .drawing-controls input[type="range"] {
    width: 96px;
}

html.modern-route .drawing-controls-hardness {
    flex-basis: 105px;
    width: 105px;
}

html.modern-route .brush-context-panel,
html.modern-route .image-placement-tools,
html.modern-route .text-placement-tools {
    border-color: #48515a;
    border-radius: 8px;
    background: #252a30;
    color: #f0f2f4;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
}

html.modern-route .viewer-bar,
html.modern-route .viewer-export-dialog {
    border-color: #48515a;
    border-radius: 8px;
    background: #252a30;
    color: #eef1f3;
}

html.modern-route .viewer-bar button,
html.modern-route .viewer-export-dialog button,
html.modern-route .viewer-export-dialog a,
html.modern-route .viewer-export-dialog input,
html.modern-route .viewer-export-dialog select {
    border-color: #4b545e;
    border-radius: 5px;
    background: #30363e;
    color: #ffffff;
}

html.modern-route #viewer-status,
html.modern-route .viewer-export-dialog p {
    color: #b6bec6;
}

@media (max-width: 1180px) {
    html.modern-route .paint-statusbar > span:nth-of-type(2) {
        display: none;
    }

    html.modern-route .paint98-color-box {
        width: min(770px, calc(100vw - 240px));
    }

    html.modern-route .drawing-controls-preview,
    html.modern-route .drawing-controls #drawing-size-range,
    html.modern-route .drawing-controls-hardness {
        display: none;
    }
}

@media (max-width: 900px) {
    html.modern-route .paint98-color-box {
        right: 118px;
        left: 112px;
        width: auto;
        overflow-x: auto;
        transform: none;
    }

    html.modern-route .drawing-controls {
        display: none;
    }
}

html.mobile-canvas.modern-route .paint-statusbar,
html.mobile-canvas.modern-route .modern-top-actions,
html.mobile-canvas.modern-route .paint98-color-box,
html.mobile-canvas.modern-route .toolbar,
html.mobile-canvas.modern-route .toolbar-backdrop,
html.mobile-canvas.modern-route .menu-toggle,
html.mobile-canvas.modern-route .floating-tools,
html.mobile-canvas.modern-route .canvas-minimap {
    display: none !important;
}

html.mobile-canvas.modern-route body .canvas-scroll {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
