html, body {
    height: 100vh;
}

body {
    font-family: 'Montserrat';
    margin: 0;
}

.noscript {
    display: flex;
    font-size: 2.5rem;
    font-weight: bold;
    justify-content: center;
    border-bottom: 1rem solid black;
    padding: 10px;
}



.container {
    display: flex;
    flex-direction: column;
    margin: auto 0;
}

.art-page-root {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
}
 
.art-canvas-main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 6px;
    box-sizing: border-box;
    margin-top: 20px;
    margin-bottom: 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

h2 {
    font-size: 0.7rem;
    font-weight: 800;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}


.art-workspace {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    padding: 6px;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
    max-height: 100%;
}

.art-center-col {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    gap: 6px;
}

.art-tools-and-canvas {
    flex: 1;
    min-height: 0;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
}
 
.art-toolbox {
    display: grid;
    grid-template-rows: 1.1fr 0.5fr 0.3fr 0.7fr;
    width: 100px;
    flex-shrink: 0;
    background: #f5f5f5;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2px;
    border: 3px solid rgba(0, 200, 255, 0.45);
}
 
.art-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 4px;
    background: #f5f5f5;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}
 
.art-tool-btn {
    width: 100%;
    border-radius: 5px;
    border: 2px solid transparent;
    background: rgba(240,248,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    padding: 3px;
    position: relative;
    box-sizing: border-box;
}
.art-tool-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
.art-tool-btn img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    pointer-events: none;
}
.art-tool-btn:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg,rgba(77,119,255,0.2),rgba(0,200,255,0.15));
    border-color: #4d77ff;
    box-shadow: 0 0 0 2px rgba(77,119,255,0.18);
}
.art-tool-btn:hover {
    background: linear-gradient(135deg,rgba(77,119,255,0.1),rgba(0,200,255,0.08));
    border-color: rgba(0,200,255,0.5);
}
.art-tool-btn--action {
    background: rgba(240,248,255,0.7);
    border: 2px solid transparent;
}
.art-tool-btn--action:hover {
    background: linear-gradient(135deg,rgba(77,119,255,0.1),rgba(0,200,255,0.08));
    border-color: rgba(0,200,255,0.5);
}

.art-color-main-container {
    padding: 4px;
    background: #f5f5f5;
    display: flex;
    box-sizing: border-box;
    overflow: hidden;
}
.art-color-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3px;
    padding: 5px;
    border: 1px solid #e5c0ff;
    border-radius: 3px;
}

.color-button-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    padding: 5px;
    background-color: rgb(255 255 255 / 30%);

    border: 1px solid;
    border-color: #e5c0ff;
    border-radius: 4px;

    grid-column: 1 / -1;
}

.art-color-swatch {
    height: 100%;
    width: 100%;
    display: flex;

    border: 1px solid;
    border-color: #434343;
    border-radius: 2px;
    cursor: pointer;
}

.art-color-swatch:hover {
    transform: scale(1.18);
    border-color: #4d77ff;
    z-index: 1;
    position: relative;
}
.art-color-swatch.active {
    border-color: #4d77ff;
    box-shadow: 0 0 0 2px rgba(77,119,255,0.4);
    transform: scale(1.1);
}

.art-color-palette-container {
    background: #f5f5f5;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    min-height: 0;
}

.art-color-wheel-btn {
    border-radius: 5px;
    border: 1px solid rgba(0,200,255,0.35);
    background: rgba(240,248,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 3px;
    flex-shrink: 0;
    transition: border-color 0.12s;
}
.art-color-wheel-btn:hover { border-color: #4d77ff; }
.art-color-wheel-btn img {
    width: 100%;
    height: 100%;
}
#artColorWheelInput {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}
#artCurrentColorInput {
    width: 50%;
    height: 50px;
    border-radius: 5px;
    border: 1px solid rgba(0,200,255,0.35);
    background: none;
    padding: 2px;
    flex-shrink: 0;
}

.art-slider-container {
    background: #f5f5f5;
    padding: 4px;
    display: flex;
    gap: 3px;
    justify-content: center;
    border-radius: 0 0 6px 6px;
    box-sizing: border-box;
    overflow: hidden;
    min-height: 0;
}
.art-slider-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    background: rgb(255 255 255 / 30%);
    border-radius: 4px;
    justify-content: center;
    min-height: 0;
}
.art-icon-slider {
    opacity: 0.8;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.art-icon-slider-img {
    height: 18px;
    width: auto;
}
.art-slider-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}
.art-slider-vertical {
    position: absolute;
    width: 82px;
    height: 5px;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%) rotate(-90deg);
    transform-origin: center;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right,#88e2fb,#8931f2);
    outline: none;
    border-radius: 12px;
    cursor: pointer;
}
.art-slider-vertical::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid #6b19db;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(107,25,219,0.3);
    transition: all 0.15s ease;
}
.art-slider-vertical::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(107,25,219,0.4);
    border-color: #8e44ff;
}
.art-slider-vertical::-webkit-slider-thumb:active { transform: scale(1.05); }
.art-slider-vertical::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid #6b19db;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(107,25,219,0.3);
}
.art-value-display {
    font-size: 11px;
    font-weight: 600;
    color: #6b19db;
    background: #f5ebff;
    padding: 2px 4px;
    border-radius: 4px;
    text-align: center;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    flex-shrink: 0;
}
 
.art-canvas-and-bar{
    margin-bottom: 5px;
}

.art-canvas-col {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
}
.art-canvas-wrap {
    flex: 1;
    border: 3px solid rgba(0,200,255,0.45);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    align-self: flex-start;
}
.art-canvas-el {
    width: 100%;
    display: block;
}

.art-right-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    overflow: hidden;
}
 
.art-panel-card {
    background: rgba(255,255,255,0.92);
    border: 2px solid rgba(0,200,255,0.25);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.art-panel-card-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.art-panel-card--layers {
    flex-shrink: 0;
}

.art-panel-placeholder {
    background: rgba(240,248,255,0.6);
    border: 1.5px dashed rgba(0,200,255,0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #a0aec0;
    text-align: center;
    padding: 8px 4px;
}

.art-thumbnail-preview {
    width: 100%;
    height: 140px;
    background: #f0f4ff;
    border-radius: 5px;
    border: 1px solid rgba(0,200,255,0.2);
    overflow: hidden;
    position: relative;
}
.art-thumbnail-canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.art-ad-col {
    grid-column: 4;
    grid-row: 1;
    width: 120px;
    margin-left: 6px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-shrink: 0;
}
.art-ad-slot {
    flex-shrink: 0;
    width: 300px;
    height: 250px;
    background: rgba(255,255,255,0.7);
    border: 1.5px dashed rgba(77,119,255,0.25);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #a0aec0;
    font-size: 0.65rem;
    text-align: center;
    padding: 8px;
    box-sizing: border-box;
}
.art-ad-icon { font-size: 1.4rem; opacity: 0.4; }
 
.art-bottom-bar {
    display: flex;
    flex-direction: column;
    width: auto;
    background: #f5f5f5;
    border: 3px solid rgba(0, 200, 255, 0.45);
    border-radius: 10px;
    height: 24%;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.art-bottom-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex: 1;
    height: 55px;
    margin: 7px 10px;
}

.art-bottom-btn {
    padding: 6px 14px;
    background: rgba(255,255,255,0.85);
    border: 2px solid rgba(77,119,255,0.2);
    font-weight: 700;
    font-size: 0.78rem;
    color: #4a5568;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    flex: 1;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.art-bottom-btn:hover {
    background: rgba(77,119,255,0.08);
    border-color: #4d77ff;
}

.art-status-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #2d3748;
    flex: 1;
    height: 50px;
    margin: 7px 10px;
    padding: 0 12px;
    border: 1.5px solid transparent;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.art-status-banner--guest {
    background: rgba(77,119,255,0.08);
    border-color: rgba(77,119,255,0.25);
    color: #3a4a6b;
}
.art-status-banner--new {
    background: rgba(72,187,120,0.1);
    border-color: rgba(72,187,120,0.35);
    color: #276749;
}
.art-status-banner--continuing {
    background: rgba(255,170,0,0.1);
    border-color: rgba(255,170,0,0.4);
    color: #7a4f00;
}
.art-status-banner--drawing {
    background: rgba(77,119,255,0.08);
    border-color: rgba(77,119,255,0.3);
    color: #2d3748;
}
.art-status-banner--tool {
    background: rgba(107,25,219,0.07);
    border-color: rgba(107,25,219,0.25);
    color: #4a2080;
}
.art-status-banner--saved {
    background: rgba(72,187,120,0.12);
    border-color: rgba(72,187,120,0.4);
    color: #276749;
}
.art-status-banner--error {
    background: rgba(229,62,62,0.08);
    border-color: rgba(229,62,62,0.3);
    color: #9b2c2c;
}

.art-status-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.art-save-btn {
    padding: 7px 20px;
    background: linear-gradient(135deg,#4d77ff,#00c8ff);
    color: #fff;
    border: none;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
    font-family: inherit;
    flex-shrink: 0;
    flex: 2;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.art-save-btn:hover { 
    opacity: 0.88; 
}

.art-save-locked {
    font-size: 0.75rem;
    color: #314864;
    padding: 7px 12px;
    background: rgba(240,248,255,0.6);
    border-radius: 8px;
    border: 1.5px solid rgba(0,200,255,0.15);
    white-space: nowrap;
    flex-shrink: 0;
    flex: 2;
    align-content: center;
    text-align: center;
}

.art-panel-card--thumb {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: auto;
}

.art-thumb-row {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: flex-start;
    width: 100%;
}

.art-thumb-wrap {
    position: relative;
    flex: 1;
    aspect-ratio: 16 / 9;
    background: #fff;
    border: 1px solid rgba(0,200,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: default;
}
.art-thumb-canvas {
    display: block;
    width: 100%;
    height: auto;
}
.art-thumb-viewport {
    position: absolute;
    border: 2px solid rgba(77,119,255,0.9);
    border-radius: 2px;
    background: rgba(77,119,255,0.1);
    display: none;
    box-sizing: border-box;
    cursor: grab;
}
.art-thumb-viewport:active {
    cursor: grabbing;
}
.art-thumb-zoom-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.art-thumb-zoom-btn {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 1.5px solid rgba(0,200,255,0.35);
    background: rgba(240,248,255,0.8);
    font-size: 0.85rem;
    font-weight: 700;
    color: #4d77ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.12s;
    flex-shrink: 0;
}
.art-thumb-zoom-btn:hover {
    background: rgba(77,119,255,0.12);
    border-color: #4d77ff;
}
.art-thumb-zoom-label {
    font-size: 0.58rem;
    font-weight: 700;
    color: #4d77ff;
    text-align: center;
}

.art-panel-card--layers {
    flex-shrink: 0;
    overflow: hidden;
    max-height: 140px;
}

.art-layer-opacity-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    margin: 5px;
}
.art-layer-opacity-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: #718096;
    flex-shrink: 0;
}
.art-layer-opacity-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #88e2fb, #8931f2);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    min-width: 0;
    max-width: 100%;
}
.art-layer-opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #6b19db;
    cursor: pointer;
}
.art-layer-opacity-val {
    font-size: 0.62rem;
    font-weight: 700;
    color: #6b19db;
    min-width: 28px;
    text-align: right;
    flex-shrink: 0;
}

.art-layers-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    flex-shrink: 0;
    max-height: 90px;
    padding: 6px;
}
.art-layers-list::-webkit-scrollbar {
    width: 7px;
}

.art-layers-list::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 5px;
}
 
.art-layers-list::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #88e2fb, #8931f2);
    border-radius: 10px;
}

.art-layers-list::-webkit-scrollbar-thumb:hover {
    background: #888888; 
}

.art-layer-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 4px;
    background: rgba(240,248,255,0.7);
    border-radius: 5px;
    border: 1.5px solid rgba(0,200,255,0.15);
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
    user-select: none;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}
.art-layer-item:hover {
    background: rgba(77,119,255,0.07);
    border-color: rgba(77,119,255,0.3);
}
.art-layer-item--active {
    border-color: #4d77ff !important;
    background: rgba(77,119,255,0.1) !important;
}
.art-layer-item--hidden {
    opacity: 0.5;
}
.art-layer-visibility-check {
    width: 12px;
    height: 12px;
    accent-color: #4d77ff;
    flex-shrink: 0;
    cursor: pointer;
    margin: 0;
}
.art-layer-preview {
    width: 48px;
    height: 27px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
    background: #fff;
    flex-shrink: 0;
    display: block;
    min-width: 48px;
}
.art-layer-name {
    font-size: 0.62rem;
    font-weight: 600;
    color: #4a5568;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.art-layer-opacity-badge {
    font-size: 0.58rem;
    font-weight: 700;
    color: #6b19db;
    background: #f5ebff;
    border-radius: 4px;
    padding: 1px 4px;
    flex-shrink: 0;
}

.art-inline-player {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(255,255,255,0.85);
    padding: 0 8px;
    height: 100%;
    flex-shrink: 0;
}

.art-player-btn {
    width: 28px;
    height: 28px;
    border: 1.5px solid rgba(77,119,255,0.25);
    background: rgba(240,248,255,0.8);
    font-size: 0.75rem;
    color: #4d77ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, border-color 0.12s;
    padding: 0;
    flex-shrink: 0;
    clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
}

.art-player-btn:hover:not(:disabled) {
    background: rgba(77,119,255,0.12);
    border-color: #4d77ff;
}
.art-player-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.art-player-btn--play {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    background: linear-gradient(135deg, #4d77ff, #00c8ff);
    color: #fff;
    border: none;
}
.art-player-btn--play:hover:not(:disabled) {
    opacity: 0.88;
    background: linear-gradient(135deg, #4d77ff, #00c8ff);
}

.art-modal--shortcuts {
    max-width: 380px;
}
.art-shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    margin-bottom: 4px;
}
.art-shortcut-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #4a5568;
}

kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 3px 20px;
    background: #f0f4ff;
    border: 1.5px solid rgba(77,119,255,0.3);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4d77ff;
    flex-shrink: 0;
    white-space: nowrap;
}

.art-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.art-modal {
    width: 100%;
    max-width: 500px;
    max-height: 92dvh;
    overflow-y: auto;

    transition: transform 0.2s ease;
    background: linear-gradient(160deg, #dbeeff 0%, #eef6ff 60%, #d8f0ff 100%);
    border: 2px solid #00c8ff;
    border-radius: 0;
    box-shadow: 0 0 0 1px rgba(0, 200, 255, 0.3), 0 0 40px rgba(0, 200, 255, 0.15), 0 24px 60px rgba(0, 0, 0, 0.4);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    position: relative;
    padding: 20px;
}

.art-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00c8ff, #8100ff, #00c8ff, transparent);
    animation: modal-scanline 3s linear infinite;
    z-index: 1;
}

.art-modal-title {
    display: flex;
    align-items: center;
    padding: 0px 4px 11px;
    border-bottom: 1px solid rgba(0, 200, 255, 0.25);
    position: relative;
    text-align: center;

    font-size: 0.88rem;
    font-weight: 800;
    color: #0a2540;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    gap: 8px;
}

.art-modal-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: linear-gradient(to bottom, #00c8ff, #8100ff);
    border-radius: 2px;
    flex-shrink: 0;
}

.art-modal-field { 
    margin-bottom: 14px; 
}

.art-modal-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4299e1;
    padding: 3px 9px 4px;
}

.art-modal-required { color: #e53e3e; }

.art-modal-input,
.art-modal-textarea {
    width: 100%;
    padding: 9px 11px;
    border: 2px solid rgba(77,119,255,0.25);
    border-radius: 2px;
    font-size: 0.88rem;
    font-family: inherit;
    color: #2d3748;
    background: rgba(240,248,255,0.5);
    transition: border-color 0.2s;
    box-sizing: border-box;
    resize: vertical;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.art-modal-input:focus,
.art-modal-textarea:focus {
    outline: none;
    border-color: #4d77ff;
    background: #fff;
}

.art-modal-hint {
    display: block;
    font-size: 0.73rem;
    margin-top: 3px;
        color: #303030;
}

.art-modal-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.art-modal-radio-label { 
    cursor: pointer; 
    justify-self: center;
    align-content: center;
}

.art-modal-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.art-modal-radio-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 35px;
    background: rgba(0, 0, 0, 0.04);
    border: 1.5px solid rgba(0, 200, 255, 0.3);
    color: #4a5568;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    text-decoration: none;
    text-align: center;
}

.art-modal-radio-label:has(input:checked) .art-modal-radio-card {
    border-color: #4d77ff;
    background: rgb(38 230 241 / 31%);
    box-shadow: 0 0 0 3px rgba(77,119,255,0.12);
}

.art-modal-radio-title { 
    font-size: 0.82rem; 
    font-weight: 700; 
    color: #303030; 
}

.art-modal-radio-desc  { font-size: 0.7rem; color: #718096; line-height: 1.3; }

.art-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.art-modal-cancel {
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    background: rgba(0, 0, 0, 0.04);
    border: 1.5px solid rgba(0, 200, 255, 0.3);
    color: #4a5568;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
    text-decoration: none;
    text-align: center;
    justify-content: center;
}

.art-modal-cancel:hover { 
    background: rgba(0, 200, 255, 0.08);
    border-color: #00c8ff;
    color: #2b6cb0;
}

.art-modal-confirm {
    flex: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    background: rgba(0, 200, 255, 0.12);
    border: 1.5px solid #00c8ff;
    color: #0a2540 !important;
    font-size: 0.8rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.2s;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
    text-decoration: none;
    text-align: center;
    box-shadow: 0 0 12px rgba(0, 200, 255, 0.2);
    justify-content: center;
}

.art-modal-confirm:hover { 
    background: #00c8ff;
    color: #0a0e1a;
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.45);
    transform: translateY(-1px);
}

.art-modal-confirm:disabled { opacity: 0.5; cursor: default; }
.art-modal-feedback {
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
}
.art-modal-feedback--success {
    background: rgba(72,187,120,0.12);
    color: #276749;
    border: 1.5px solid rgba(72,187,120,0.35);
}
.art-modal-feedback--error {
    background: rgba(229,62,62,0.08);
    color: #9b2c2c;
    border: 1.5px solid rgba(229,62,62,0.25);
}

.art-modal-confirm--danger {
    background: linear-gradient(135deg, #e53e3e, #fc8181) !important;
}

.art-mobile-dropdown-btn {
    display: none;
}

.art-mobile-only,
.art-slider-mobile-container {
    display: none;
}

#art-tools-dropdown-content,
#art-sliders-dropdown-content {
    display: block;
}

#art-mobile-tools-dropdown-btn,
#art-mobile-sliders-dropdown-btn,
.art-tool-container-mobile,
.art-slider-mobile-container {
    display: none;
}

#art-mobile-tools-dropdown-btn,
.art-slider-mobile-container {
    display: none;
}

#art-tools-dropdown-content {
    display: contents;
}

#art-sliders-dropdown-content {
    display: flex;
}

@media only screen and (orientation: portrait), (max-aspect-ratio: 4/3) {
    * {
        box-sizing: border-box !important;
    }
    body {
        overflow-x: hidden;
    }

    .container, .art-canvas-main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
        padding: 0 !important;
    }

    .art-workspace {
        flex-direction: column !important;
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 5px !important;
        gap: 8px !important;
        overflow: visible !important;
        max-height: none !important;
    }

    .art-center-col {
        flex-direction: column !important;
        display: flex !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .art-tools-and-canvas {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
    }

    .art-canvas-wrap {
        width: 100%;
        aspect-ratio: 16 / 9;
        align-self: stretch !important;
    }
    .art-canvas-el {
        width: 100%;
        height: 100%;
    }

    .art-toolbox {
        display: flex;
        width: 100%;
        position: relative !important;
        overflow: visible !important;
        justify-content: space-between;
        gap: 2px;
    }

    .art-mobile-dropdown-btn {
        display: flex;
        position: relative;
    }

    .art-tool-container-mobile {
        display: flex;
        position: relative;
        
        flex: 1 1 15%;
        min-width: 0;
    }

    #art-mobile-tools-dropdown-btn {
        display: flex;
        width: 100%;
        padding: 5px 1px 5px 2px;
        background-color: #ffffff;
        align-content: center;
        text-align: center;
        cursor: pointer;
        justify-content: center;
        border-radius: 0px 0px 0px 4px;
        border: 1px solid #e5c0ff;
        margin: 4px 0px;
        border-radius: 4px;
    }

    .art-slider-mobile-container {
        display: flex;
        position: relative;
        width: 12%;
        flex-shrink: 0;
        min-width: 0;
    }

    #art-mobile-sliders-dropdown-btn {
        display: flex;
        width: 100%;
        padding: 5px 2px 5px 1px;
        background-color: #ffffff;
        align-content: center;
        text-align: center;
        cursor: pointer;
        justify-content: center;
        border: 1px solid #e5c0ff;
        margin: 4px 0px;
        border-radius: 4px;
    }

    .art-tools-mobile,
    .art-sliders-mobile {
        border: none;
        border-radius: 4px;
        object-fit: contain;
    }

    .art-tool-container-mobile:not(#art-tools-dropdown-content),
    .art-slider-container:not(#art-sliders-dropdown-content) {
        display: none;
    }

    #art-tools-dropdown-content,
    #art-sliders-dropdown-content {
        display: none;
        z-index: 1;
    }

    #art-tools-dropdown-content.show {
        display: block;
        position: absolute;
        bottom: 78px;
        left: 0;
        max-width: calc(100vw - 10px);
        background: #9c9eff42;
        padding: 5px 6px;
        border-radius: 4px;
        box-sizing: border-box;
    }

    #art-tools-dropdown-content.show .art-tools-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
        width: 100%;
    }

    #art-sliders-dropdown-content.show {
        display: flex;
        flex-direction: column !important;
        position: absolute;
        bottom: 78px;
        left: 0;
        width: fit-content;
        min-width: 260px;
        max-width: calc(100vw - 20px);
        background: #9c9eff42;
        border-radius: 4px;
        padding: 10px;
        gap: 10px;
        box-sizing: border-box;
    }

    #art-sliders-dropdown-content.show .art-slider-group {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        gap: 10px;
        height: auto;
        border: 1px solid #e5c0ff;
        padding: 5px 10px;
        border-radius: 4px;
        background: #ffffff;
    }
    
    #art-sliders-dropdown-content.show .art-icon-slider-img {
        height: 20px;
        width: auto;
    }
    
    #art-sliders-dropdown-content.show .art-slider-wrapper {
        flex: 1;
        height: auto;
        min-height: 0;
        position: relative;
        display: block;
        bottom: 3px;
    }
    
    #art-sliders-dropdown-content.show .art-slider-vertical {
        position: static;
        width: 100%;
        height: 5px;
        transform: none !important;
        top: auto;
        left: auto;
    }

    #art-sliders-dropdown-content.show .art-value-display {
        font-size: 12px;
        padding: 2px 5px;
        min-width: 30px;
        text-align: center;
    }
    

    .art-color-container {
        padding: 5px;
        background: #ffffff;
        display: flex;
        width: 45%;
        flex-shrink: 0;
        min-width: 0;
        border: initial;
        overflow: hidden;
    }

    .color-button-container {
        display: grid;
        grid-template-columns: repeat(9, minmax(0, 1fr)) !important; 
        gap: 3px;
        padding: 5px;
        background-color: rgb(255 255 255 / 30%);
        border: 1px solid;
        border-color: #e5c0ff;
        border-radius: 4px;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .art-color-palette-container {
        display: flex;
        background: #ffffff;
        align-items: center;
        width: 28%;
        border-radius: 0px 0px 4px 0px;
        flex-shrink: 0;
        min-width: 0;
        box-sizing: border-box;
    }

    .art-tools-mobile,
    .art-sliders-mobile {
        max-width: 100%;
        height: auto;
        border: none;
        border-radius: 4px;
        object-fit: contain;
    }

    .art-color-palette-container > div {
        flex: 1;
        display: flex;
        height: 50px;
    }

    #artCurrentColorInput {
        border: 1px solid white;
        width: 50%;
        height: 50px;
    }

    .art-color-wheel-btn {
        border: 1px solid white;
        background: linear-gradient(305deg, rgb(110 95 193 / 11%) 0, 30%, #ffffff 75%);
        width: 50%;
        height: 50px;
        border: 1px solid;
        border-color: #e8c5ff;
        border-radius: 4px;
        cursor: pointer;

        width: 100% !important;
        height: 100% !important;
    }

    .art-bottom-bar {
        height: auto !important;
        clip-path: none !important;
        border-radius: 10px !important;
        padding: 5px 0;
    }

    .art-bottom-actions {
        /* flex-wrap: wrap !important; */
        justify-content: center !important;
        height: auto !important;
        gap: 5px !important;
        margin: 7px 7px !important;
    }

    .art-btn-text {
        display: none !important;
    }

    .art-save-btn .art-btn-text,
    .art-save-locked .art-btn-text {
        display: inline !important;
        margin-left: 3px;
    }

    .art-bottom-btn, .art-save-btn, .art-save-locked {
        flex: none;
        padding: 5px 10px;
    }

    .art-bottom-btn, .art-save-btn, .art-save-locked, .art-inline-player {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        display: flex;
        justify-content: center;
        align-items: center;
        clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
    }

    .art-save-btn, .art-save-locked {
        flex: 3 1 150px !important; 
    }
    
    .art-status-banner {
        margin: 2px 0px !important;
        border-radius: 8px !important;
        height: 32px !important;
        padding: 6px 6px !important;
        border: 3px solid rgba(0, 200, 255, 0.45) !important;
        background: #ffffff !important;
    }

    .art-right-panel {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex-direction: initial !important;
        gap: 2px !important;
    }

    .art-panel-card {
        width: 50% !important;
    }

    .art-panel-card--layers {
        max-height: initial !important;
    }

    .art-layers-list {
        max-height: initial !important;
    }

    .art-thumb-row {
        flex-direction: row !important;
    }
    .art-thumb-wrap {
        flex: 1 !important;
    }

    .art-modal-radio-group {
        grid-template-columns: initial !important;
    }

    .art-ad-slot {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 50px !important;
        border-radius: 0 !important;
        border: 1.5px dashed rgba(77, 119, 255, 0.25) !important;
        z-index: 50 !important;
        background: #ffffff !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
    }
}

@media only screen and (max-width: 1024px) and (orientation: landscape) {
    * {
        box-sizing: border-box !important;
    }
    body {
        overflow-x: hidden;
    }

    .container, .art-canvas-main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
        padding: 0 !important;
    }

    .art-workspace {
        flex-direction: column !important;
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 20px !important;
        gap: 8px !important;
        overflow: visible !important;
        max-height: none !important;
    }

    .art-center-col {
        flex-direction: column !important;
        display: flex !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .art-tools-and-canvas {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
    }

    .art-canvas-wrap {
        width: 100%;
        aspect-ratio: 16 / 9;
        align-self: stretch !important;
    }
    .art-canvas-el {
        width: 100%;
        height: 100%;
    }

    .art-toolbox {
        display: flex;
        width: 100%;
        position: relative !important;
        overflow: visible !important;
        justify-content: space-between;
        gap: 2px;
    }

    .art-mobile-dropdown-btn {
        display: flex;
        position: relative;
    }

    .art-tool-container-mobile {
        display: flex;
        position: relative;
        
        flex: 1 1 15%;
        min-width: 0;
    }

    #art-mobile-tools-dropdown-btn {
        display: flex;
        width: 100%;
        padding: 5px;
        background-color: #ffffff;
        align-content: center;
        text-align: center;
        cursor: pointer;
        justify-content: center;
        border-radius: 0px 0px 0px 4px;
        border: 1px solid #e5c0ff;
        margin: 4px 0px;
        border-radius: 4px;
    }

    .art-slider-mobile-container {
        display: flex;
        position: relative;
        width: 12%;
        flex-shrink: 0;
        min-width: 0;
    }

    #art-mobile-sliders-dropdown-btn {
        display: flex;
        width: 100%;
        padding: 5px;
        background-color: #ffffff;
        align-content: center;
        text-align: center;
        cursor: pointer;
        justify-content: center;
        border: 1px solid #e5c0ff;
        margin: 4px 0px;
        border-radius: 4px;
    }

    .art-tools-mobile,
    .art-sliders-mobile {
        border: none;
        border-radius: 4px;
        object-fit: contain;
    }

    .art-tool-container-mobile:not(#art-tools-dropdown-content),
    .art-slider-container:not(#art-sliders-dropdown-content) {
        display: none;
    }

    #art-tools-dropdown-content,
    #art-sliders-dropdown-content {
        display: none;
        z-index: 1;
    }

    #art-tools-dropdown-content.show {
        display: block;
        position: absolute;
        bottom: 80px;
        left: 0;
        max-width: calc(100vw - 10px);
        background: #9c9eff42;
        padding: 5px 6px;
        border-radius: 4px;
        box-sizing: border-box;
    }

    #art-tools-dropdown-content.show .art-tools-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
        width: 100%;
    }

    #art-sliders-dropdown-content.show {
        display: flex;
        flex-direction: column !important;
        position: absolute;
        bottom: 80px;
        left: 0;
        width: fit-content;
        min-width: 260px;
        max-width: calc(100vw - 20px);
        background: #9c9eff42;
        border-radius: 4px;
        padding: 10px;
        gap: 10px;
        box-sizing: border-box;
    }

    #art-sliders-dropdown-content.show .art-slider-group {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        gap: 10px;
        height: auto;
        border: 1px solid #e5c0ff;
        padding: 5px 10px;
        border-radius: 4px;
        background: #ffffff;
    }
    
    #art-sliders-dropdown-content.show .art-icon-slider-img {
        height: 20px;
        width: auto;
    }
    
    #art-sliders-dropdown-content.show .art-slider-wrapper {
        flex: 1;
        height: auto;
        min-height: 0;
        position: relative;
        display: block;
        bottom: 3px;
    }
    
    #art-sliders-dropdown-content.show .art-slider-vertical {
        position: static;
        width: 100%;
        height: 5px;
        transform: none !important;
        top: auto;
        left: auto;
    }

    #art-sliders-dropdown-content.show .art-value-display {
        font-size: 12px;
        padding: 2px 5px;
        min-width: 30px;
        text-align: center;
    }

    .art-color-container {
        padding: 5px;
        background: #ffffff;
        display: flex;
        width: 45%;
        flex-shrink: 0;
        min-width: 0;
        border: initial;
        overflow: hidden;
    }

    .color-button-container {
        display: grid;
        grid-template-columns: repeat(9, minmax(0, 1fr)) !important; 
        gap: 3px;
        padding: 5px;
        background-color: rgb(255 255 255 / 30%);
        border: 1px solid;
        border-color: #e5c0ff;
        border-radius: 4px;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .art-color-palette-container {
        display: flex;
        background: #ffffff;
        align-items: center;
        width: 28%;
        border-radius: 0px 0px 4px 0px;
        flex-shrink: 0;
        min-width: 0;
        box-sizing: border-box;
    }

    .art-tools-mobile,
    .art-sliders-mobile {
        max-width: 100%;
        height: auto;
        border: none;
        border-radius: 4px;
        object-fit: contain;
    }

    .art-color-palette-container > div {
        flex: 1;
        display: flex;
        height: 50px;
    }

    #artCurrentColorInput {
        border: 1px solid white;
        width: 50%;
        height: 50px;
    }

    .art-color-wheel-btn {
        border: 1px solid white;
        background: linear-gradient(305deg, rgb(110 95 193 / 11%) 0, 30%, #ffffff 75%);
        width: 50%;
        height: 50px;
        border: 1px solid;
        border-color: #e8c5ff;
        border-radius: 4px;
        cursor: pointer;

        width: 100% !important;
        height: 100% !important;
    }

    .art-bottom-bar {
        height: auto !important;
        clip-path: none !important;
        border-radius: 10px !important;
        padding: 5px 0;
    }

    .art-bottom-actions {
        flex-wrap: wrap !important;
        justify-content: center !important;
        height: auto !important;
        gap: 5px !important;
        margin: 7px 7px !important;
    }

    .art-btn-text {
        display: none !important;
    }

    .art-save-btn .art-btn-text,
    .art-save-locked .art-btn-text {
        display: inline !important;
    }

    .art-bottom-btn, .art-save-btn, .art-save-locked {
        flex: none;
        padding: 5px 10px;
    }

    .art-bottom-btn, .art-save-btn, .art-save-locked, .art-inline-player {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        display: flex;
        justify-content: center;
        align-items: center;
        clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
    }

    .art-save-btn, .art-save-locked {
        flex: 3 1 150px !important; 
    }
    
    .art-status-banner {
        margin: 2px 0px !important;
        border-radius: 8px !important;
        height: 32px !important;
        padding: 6px 6px !important;
        border: 3px solid rgba(0, 200, 255, 0.45) !important;
        background: #ffffff !important;
    }

    .art-right-panel {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex-direction: initial !important;
        gap: 2px !important;
    }

    .art-panel-card {
        width: 50% !important;
    }

    .art-panel-card--layers {
        max-height: initial !important;
    }

    .art-layers-list {
        max-height: initial !important;
    }

    .art-thumb-row {
        flex-direction: row !important;
    }
    .art-thumb-wrap {
        flex: 1 !important;
    }

    .art-ad-slot {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 50px !important;
        border-radius: 0 !important;
        border: 1.5px dashed rgba(77, 119, 255, 0.25) !important;
        z-index: 50 !important;
        background: #ffffff !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
    }
}