@font-face {
    font-family: 'Motiva Sans';
    src: url('../../MotivaSansRegular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

* { 
    box-sizing: border-box; 
    font-family: 'Motiva Sans' !important; 
}

body, html {
    margin: 0; padding: 0; height: 100dvh; background: #111; color: #fff;
    overflow: hidden;
}

/* Landscape: Left Taskbar + Multi-Column Overlays */
.dashboard-container {
    display: flex;
    flex-direction: row;
    height: 100dvh;
    width: 100vw;
    padding: 10px;
    gap: 10px;
    background: #111;
    position: relative;
}

@media (orientation: landscape) {
    .dashboard-container.taskbar-right {
        flex-direction: row-reverse;
    }
}

#taskbar {
    width: 60px;
    height: 100%;
    flex-shrink: 0;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 12px 6px;
    z-index: 200;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: width 0.22s ease, padding 0.22s ease, opacity 0.22s ease, border-color 0.22s ease;
    overflow: hidden;
}
#taskbar.taskbar-drag-source {
    opacity: 0.45;
    border: 1px dashed rgba(38, 194, 134, 0.65);
    cursor: grabbing;
}
.taskbar-drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2147483647;
    margin: 0;
    pointer-events: none;
    opacity: 0.6;
    background: rgba(20, 20, 20, 0.94);
    border: 2px solid rgb(38, 194, 134);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(38, 194, 134, 0.45);
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
    transform: translate3d(0px, 0px, 0px);
}
@keyframes taskbarDockBreathe {
    0%, 100% {
        border-color: rgba(38, 194, 134, 0.95);
        background-color: rgba(38, 194, 134, 0.18);
        box-shadow: 0 0 14px rgba(38, 194, 134, 0.45), inset 0 0 0 1px rgba(38, 194, 134, 0.35);
    }
    50% {
        border-color: rgba(255, 255, 255, 0.95);
        background-color: rgba(255, 255, 255, 0.16);
        box-shadow: 0 0 14px rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    }
}
.taskbar-dock-preview {
    position: fixed;
    z-index: 2147483646;
    pointer-events: none;
    border-radius: 10px;
    border: 2px dashed rgba(38, 194, 134, 0.95);
    background: rgba(38, 194, 134, 0.14);
    box-shadow: inset 0 0 0 1px rgba(38, 194, 134, 0.3);
    animation: taskbarDockBreathe 0.7s ease-in-out infinite;
    opacity: 0.72;
    transition: opacity 0.14s ease;
}
.taskbar-dock-preview.is-target {
    border-style: solid;
    opacity: 1;
}
body.is-dragging-taskbar {
    cursor: grabbing !important;
    user-select: none;
    -webkit-user-select: none;
}
body.is-dragging-taskbar .panel iframe {
    pointer-events: none !important;
}
.dashboard-container.taskbar-hidden {
    gap: 0px;
}
.dashboard-container.taskbar-hidden #taskbar {
    width: 0px;
    min-width: 0px;
    padding-left: 0px;
    padding-right: 0px;
    border-color: transparent;
    opacity: 0;
    pointer-events: none;
}
#taskbar-toggle-tab {
    position: fixed;
    left: 65px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 54px;
    background: linear-gradient(180deg, rgba(32, 32, 32, 0.96) 0%, rgba(18, 18, 18, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 210;
    padding: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: left 0.22s ease, right 0.22s ease, top 0.22s ease, bottom 0.22s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
#taskbar-toggle-tab svg {
    width: 14px;
    height: 14px;
    display: block;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#taskbar-toggle-tab:hover {
    background: linear-gradient(180deg, rgba(48, 48, 48, 0.98) 0%, rgba(26, 26, 26, 1) 100%);
    color: #ffffff;
    border-color: rgba(38, 194, 134, 0.65);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(38, 194, 134, 0.2);
}
.dashboard-container.taskbar-hidden #taskbar-toggle-tab {
    left: 14px;
    background: linear-gradient(180deg, rgba(28, 28, 28, 0.95) 0%, rgba(15, 15, 15, 0.98) 100%);
    border-color: rgba(255, 255, 255, 0.26);
}
.dashboard-container.taskbar-hidden #taskbar-toggle-tab:hover {
    border-color: rgba(38, 194, 134, 0.75);
    color: rgb(38, 194, 134);
}

@media (orientation: landscape) {
    .dashboard-container.taskbar-right #taskbar-toggle-tab {
        left: auto;
        right: 65px;
        transform: translate(50%, -50%);
    }
    .dashboard-container.taskbar-right.taskbar-hidden #taskbar-toggle-tab {
        left: auto;
        right: 14px;
    }
    .dashboard-container.taskbar-right .dropdown-overlay,
    .dashboard-container.taskbar-right #feedback-overlay {
        left: auto;
        right: 78px;
    }
}

.taskbar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.taskbar-ctrl-btn {
    background: linear-gradient(180deg, rgba(34, 34, 34, 0.96) 0%, rgba(20, 20, 20, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-family: monospace;
    font-size: 0.95rem;
    cursor: pointer;
    touch-action: none;
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.taskbar-ctrl-btn:hover {
    background: linear-gradient(180deg, rgba(48, 48, 48, 0.98) 0%, rgba(26, 26, 26, 1) 100%);
    color: #ffffff;
    border-color: rgba(38, 194, 134, 0.65);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(38, 194, 134, 0.2);
}
.taskbar-ctrl-btn.active {
    background: rgba(38, 194, 134, 0.18);
    color: rgb(38, 194, 134);
    border-color: rgb(38, 194, 134);
}

.dropdown-overlay {
    position: fixed;
    top: 10px;
    left: 78px;
    background: rgba(10, 10, 10, 0.96);
    border: 1px dashed #666;
    border-radius: 8px;
    padding: 15px;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.65);
    max-height: calc(100dvh - 20px);
    overflow: hidden;
    display: grid;
    z-index: 250;
}
.dropdown-overlay.hidden { display: none !important; }
#menu-overlay { grid-template-columns: repeat(2, 230px); }
#timezone-overlay { top: auto; bottom: 62px; grid-template-columns: minmax(230px, 270px); }
#settings-overlay { top: 120px; grid-template-columns: minmax(250px, 290px); }
#feedback-overlay {
    top: auto;
    bottom: 10px;
    left: 78px;
    width: min(440px, calc(100vw - 92px));
    height: min(545px, calc(100dvh - 20px));
    max-height: calc(100dvh - 20px);
    padding: 0;
    display: block;
    overflow: hidden;
}
#feedback-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    display: block;
}

.menu-col-nav-group {
    display: none;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.menu-col-nav-btn {
    background: rgba(28, 28, 28, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #aaa;
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 700;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.menu-col-nav-btn:hover:not(:disabled) {
    background: rgba(42, 42, 42, 0.98);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}
.menu-col-nav-btn:disabled {
    background: rgba(20, 20, 20, 0.5);
    border-color: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    pointer-events: none;
}

/* Portrait: Top (default) or Bottom Horizontal Taskbar + Single-Column Overlays */
@media (orientation: portrait) {
    .dashboard-container {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
    }
    .dashboard-container.taskbar-bottom {
        flex-direction: column-reverse;
    }

    #taskbar {
        width: 100%;
        height: 56px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 6px 12px;
        border-radius: 10px;
        transition: height 0.22s ease, padding 0.22s ease, opacity 0.22s ease, border-color 0.22s ease;
    }
    .dashboard-container.taskbar-hidden #taskbar {
        width: 100%;
        height: 0px;
        min-height: 0px;
        padding-top: 0px;
        padding-bottom: 0px;
        border-color: transparent;
        opacity: 0;
        pointer-events: none;
    }
    #taskbar-toggle-tab {
        left: 50%;
        right: auto;
        top: 55px;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: 54px;
        height: 22px;
        border-radius: 8px;
        transition: top 0.22s ease, bottom 0.22s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }
    .dashboard-container.taskbar-hidden #taskbar-toggle-tab {
        left: 50%;
        top: 14px;
        bottom: auto;
    }
    .dashboard-container.taskbar-bottom #taskbar-toggle-tab {
        left: 50%;
        top: auto;
        bottom: 55px;
        transform: translate(-50%, 50%);
    }
    .dashboard-container.taskbar-bottom.taskbar-hidden #taskbar-toggle-tab {
        left: 50%;
        top: auto;
        bottom: 14px;
    }

    .taskbar-group {
        flex-direction: row;
        gap: 10px;
    }

    .taskbar-ctrl-btn {
        width: 40px;
        height: 40px;
    }

    .dropdown-overlay {
        top: 72px;
        bottom: auto;
        left: 8px;
        right: 8px;
        max-height: calc(100dvh - 90px);
        overflow: hidden;
    }
    .dashboard-container.taskbar-bottom .dropdown-overlay {
        top: auto;
        bottom: 72px;
    }

    #menu-overlay {
        grid-template-columns: minmax(200px, 1fr);
    }
    #menu-overlay[data-portrait-col="0"] .assets-col-2 { display: none; }
    #menu-overlay[data-portrait-col="1"] .assets-col-1 { display: none; }
    #menu-overlay .assets-col-2 { border-left: none; padding-left: 0; }
    #menu-overlay .menu-column { max-height: calc(100dvh - 122px); overflow: hidden; }
    .menu-col-nav-group { display: inline-flex; }
    .menu-col-nav-btn { width: 40px; height: 40px; }

    #custom-overlay, #timezone-overlay, #settings-overlay {
        grid-template-columns: minmax(220px, 1fr);
        top: 72px;
        bottom: auto;
        transform: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .dashboard-container.taskbar-bottom #custom-overlay,
    .dashboard-container.taskbar-bottom #timezone-overlay,
    .dashboard-container.taskbar-bottom #settings-overlay {
        top: auto;
        bottom: 72px;
    }
    #feedback-overlay {
        top: 72px;
        bottom: auto;
        left: 8px;
        right: 8px;
        width: auto;
        height: min(540px, calc(100dvh - 90px));
        padding: 0;
    }
    .dashboard-container.taskbar-bottom #feedback-overlay {
        top: auto;
        bottom: 72px;
    }
    .timezone-col, .settings-col { overflow-y: visible !important; max-height: none !important; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .dropdown-overlay { max-height: calc(100dvh - 20px); }
    #menu-overlay .menu-column { max-height: calc(100dvh - 52px); }
    #custom-overlay, #timezone-overlay, #settings-overlay { overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .settings-col, .timezone-col, .custom-col { max-height: calc(100dvh - 72px); }
}

.menu-column, .settings-col, .timezone-col, .custom-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; max-height: calc(100dvh - 52px); width: 100%; }
.settings-col, .timezone-col, .custom-col { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.menu-column.assets-col-2 { border-left: 1px dashed rgba(255, 255, 255, 0.15); padding-left: 12px; }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 0 5px 12px 5px; }
.sidebar-title { font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.4; white-space: nowrap; }
.ticker-list-container, .settings-list-container {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-grow: 1;
    gap: 12px;
    padding: 6px 15px 15px 0px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
.ticker-list-container::-webkit-scrollbar,
.settings-list-container::-webkit-scrollbar {
    width: 5px;
}
.ticker-list-container::-webkit-scrollbar-track,
.settings-list-container::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}
.ticker-list-container::-webkit-scrollbar-thumb,
.settings-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}
.ticker-list-container::-webkit-scrollbar-thumb:hover,
.settings-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.38);
}
.utility-group-wrapper, .setting-card-wrapper { position: relative; margin-top: 4px; display: flex; flex-direction: column; }
.utility-group-title, .setting-card-title {
    position: absolute; top: -7px; left: 12px; font-size: 0.6rem; font-weight: 700;
    color: #ffffff; text-transform: uppercase; letter-spacing: 0.1em;
    background: rgba(10, 10, 10, 0.95); padding: 0 4px; z-index: 2;
}
.utility-group, .setting-card {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 12px;
}
.utility-group { padding: 6px; gap: 2px; }
.ticker-btn {
    background: transparent; border: none; color: #888; text-align: left; padding: 8px 10px;
    font-size: 1rem; font-weight: 500; font-family: inherit; cursor: pointer; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: space-between; white-space: nowrap; border-radius: 4px;
}
.ticker-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.ticker-btn.active { color: #fff; background: rgba(255, 255, 255, 0.12); border-left: 3px solid #fff; padding-left: 7px; }
.setting-item { display: flex; align-items: flex-start; gap: 12px; padding: 6px; cursor: pointer; border-radius: 6px; transition: background 0.2s ease; }
.setting-item:hover { background: rgba(255, 255, 255, 0.03); }
.setting-checkbox {
    width: 22px; height: 22px; border: 2px solid rgba(255, 255, 255, 0.3); border-radius: 4px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s ease;
    background: #151515; color: transparent; font-size: 14px; font-weight: bold;
}
.setting-item.active .setting-checkbox { border-color: rgb(38, 194, 134); background: rgba(38, 194, 134, 0.15); color: rgb(38, 194, 134); }
.setting-info { display: flex; flex-direction: column; gap: 2px; }
.setting-title { font-size: 0.95rem; font-weight: 600; color: #fff; white-space: nowrap; }
.setting-desc { font-size: 0.75rem; color: #888; line-height: 1.3; }
.setting-group { display: flex; flex-direction: column; gap: 4px; padding: 4px 6px; }
.setting-group-title { font-size: 0.85rem; font-weight: 600; color: #ccc; letter-spacing: 0.05em; }
.custom-input-row { display: flex; gap: 6px; align-items: center; }
.custom-ticker-input {
    background: #151515; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 6px;
    color: #fff; padding: 8px 10px; font-size: 0.8rem; font-family: inherit; outline: none; flex: 1 1 0; min-width: 0; height: 38px;
}
.custom-ticker-input:focus { border-color: rgba(255, 255, 255, 0.4); }
.custom-add-btn {
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px;
    color: #fff; font-family: inherit; font-size: 0.8rem; font-weight: 600; height: 38px; padding: 0 12px; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; flex-shrink: 0;
}
.custom-add-btn:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.4); }
#custom-error-msg { font-size: 0.75rem; color: #ff5252; line-height: 1.3; display: none; padding: 2px 0; margin-top: 4px; }
.setting-select {
    background: #151515; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px;
    color: #fff; font-size: 0.85rem; height: 38px; padding: 0 10px; outline: none; cursor: pointer; width: 100%; transition: all 0.2s ease;
}
.setting-select:hover { border-color: rgba(255, 255, 255, 0.4); }
.setting-select option { background: #151515; color: #fff; }

.tf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tf-menu-btn {
    background: #151515; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px;
    color: #999; font-family: inherit; font-size: 0.8rem; font-weight: 600; padding: 7px 0;
    cursor: pointer; transition: all 0.2s ease; text-align: center;
}
.tf-menu-btn:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.tf-menu-btn.active { background: #26a69a; border-color: #26a69a; color: #fff; }

.view-mode-toggle-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    background: #151515;
    padding: 3px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.view-mode-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #888;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 0;
    cursor: pointer;
    text-align: center;
}
.view-mode-btn:hover {
    color: #fff;
}
.view-mode-btn.active {
    background: #26a69a;
    color: #fff;
}

#viewport-wrapper { flex: 1 1 auto; min-width: 0; min-height: 0; height: 100%; position: relative; }
#viewport { width: 100%; height: 100%; display: grid; background: #111; border: 1px dashed #666; gap: 0px; }

.grid-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.grid-2 { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }

.grid-3 { grid-template-columns: 34% 66%; grid-template-rows: 1fr 1fr; }
.grid-3 .panel:nth-child(1) { grid-column: 1; grid-row: span 2; }
.grid-3 .panel:nth-child(2) { grid-column: 2; grid-row: 1; }
.grid-3 .panel:nth-child(3) { grid-column: 2; grid-row: 2; }

.grid-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.grid-5 { grid-template-columns: 33% 34% 33%; grid-template-rows: 1fr 1fr; }
.grid-5 .panel:nth-child(1) { grid-column: 2; grid-row: span 2; }
.grid-5 .panel:nth-child(2) { grid-column: 1; grid-row: 1; }
.grid-5 .panel:nth-child(3) { grid-column: 3; grid-row: 1; }
.grid-5 .panel:nth-child(4) { grid-column: 1; grid-row: 2; }
.grid-5 .panel:nth-child(5) { grid-column: 3; grid-row: 2; }

.grid-6 { grid-template-columns: 33% 34% 33%; grid-template-rows: 1fr 1fr; }

@media (orientation: portrait) {
    .grid-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
    .grid-2 { grid-template-columns: 1fr; grid-template-rows: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; grid-template-rows: repeat(3, 1fr); }
    .grid-3 .panel:nth-child(1), .grid-3 .panel:nth-child(2), .grid-3 .panel:nth-child(3) { grid-column: auto; grid-row: auto; }
    .grid-4 { grid-template-columns: 1fr; grid-template-rows: repeat(4, 1fr); }
    .grid-5 { grid-template-columns: 1fr; grid-template-rows: repeat(5, 1fr); }
    .grid-5 .panel:nth-child(1), .grid-5 .panel:nth-child(2), .grid-5 .panel:nth-child(3), .grid-5 .panel:nth-child(4), .grid-5 .panel:nth-child(5) { grid-column: auto; grid-row: auto; }
    .grid-6 { grid-template-columns: 1fr; grid-template-rows: repeat(6, 1fr); }
}

.panel {
    background: #111;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    border: 1px dashed #666;
    cursor: grab;
    touch-action: none;
}
.panel-drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2147483647;
    margin: 0;
    pointer-events: none;
    opacity: 0.5;
    background: #111;
    border: 2px solid rgb(38, 194, 134);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(38, 194, 134, 0.45);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
    transform: translate3d(0px, 0px, 0px);
}
.panel-drag-ghost img,
.panel-drag-ghost canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
}
.panel-drag-ghost-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #141414;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.panel iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #111;
    pointer-events: auto;
    touch-action: none;
}
.panel-close-btn {
    position: absolute;
    top: 3px;
    right: 3px;
    z-index: 50;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(15, 15, 15, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
    user-select: none;
    -webkit-user-select: none;
}
.panel:hover .panel-close-btn,
.panel.drag-source .panel-close-btn,
.panel.drag-over .panel-close-btn {
    opacity: 1;
    pointer-events: auto;
}
@media (hover: none), (pointer: coarse) {
    .panel-close-btn {
        opacity: 0.72;
        pointer-events: auto;
    }
}
.panel-close-btn:hover {
    background: rgba(220, 53, 69, 0.25);
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.65);
}
.panel-close-btn:active {
    background: rgba(220, 53, 69, 0.4);
    color: #fff;
    border-color: #ff6b6b;
}
.panel-drag-handle {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 50;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(15, 15, 15, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ccc;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1;
    letter-spacing: -2px;
    cursor: grab;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.panel-drag-handle:hover {
    background: rgba(34, 34, 34, 0.96);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}
.panel-drag-handle:active,
.panel.drag-source .panel-drag-handle {
    cursor: grabbing;
    background: rgba(38, 194, 134, 0.22);
    border-color: rgb(38, 194, 134);
    color: rgb(38, 194, 134);
}
.panel.drag-source {
    cursor: grabbing;
    border: 2px dashed rgba(38, 194, 134, 0.55);
    opacity: 0.85;
}
.panel.drag-over {
    border: 2px dashed rgb(38, 194, 134);
    box-shadow: inset 0 0 0 1px rgba(38, 194, 134, 0.35);
}
body.is-swapping-panels {
    cursor: grabbing !important;
    user-select: none;
    -webkit-user-select: none;
}
body.is-swapping-panels .panel iframe {
    pointer-events: none !important;
}
.empty-state { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; color: #444; font-size: 1.2vw; letter-spacing: 0.1em; background: #111; grid-column: 1 / -1; grid-row: 1 / -1; border: none; }
