
/* ==============================================
   DESKTOP STYLES (Base Styles)
   ============================================== */



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

html {
    background-color: #1e3a8a;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    background-image: url('assets/wallpaper/logicdefault.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #1e3a8a;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    position: relative;
}

/* The legacy in-app menu bar is replaced by the Wopara Group nav pill. */
.header { display: none !important; }

/* Wopara Desktop inherits the account's Appearance theme: the wallpaper becomes
   the theme background colour (per-folder colours + custom wallpaper come from
   Desktop settings in a later pass). */
html.wp-theme-on body {
    background-image: none !important;
    background-color: var(--wp-bg-solid, #0b0f1a) !important;
}
/* When a custom wallpaper is set via Desktop settings, let it override the theme. */
html.wp-theme-on body.wd-custom-wall {
    background-image: var(--wd-wall-img, none) !important;
    background-color: var(--wd-wall-color, var(--wp-bg-solid, #0b0f1a)) !important;
}
html.wp-theme-on body::before {
    background: var(--wp-bg-solid, linear-gradient(135deg, #0b0f1a, #11131c)) !important;
}
html.wp-theme-on body.wd-custom-wall::before {
    background: transparent !important;
}

/* Fallback for browsers that don't support the background image */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #1e40af 100%);
    z-index: -2;
}

/* Terms overlay blurs everything behind it */
#terms-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    z-index: 199999;
    pointer-events: none;
}

.terms-window {
    z-index: 1000000 !important;
    pointer-events: auto !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8) !important;
}

.terms-window * {
    pointer-events: auto !important;
}

.terms-window .window-content {
    border-radius: 24px !important;
    overflow: hidden !important;
}

.terms-window .window-content iframe {
    border-radius: 24px !important;
    overflow: hidden !important;
}

.terms-window:focus-within {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 0 3px rgba(59, 130, 246, 0.5) !important;
    border-color: rgba(59, 130, 246, 0.8) !important;
}

.terms-window iframe:focus {
    outline: none;
}

.logo-user-expanded {
    width: 320px;
}

.logo-signout-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-field {
    margin: 12px 0;
}

.user-field label {
    display: block;
    color: white;
    font-size: 11px;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    color: white;
    font-size: 12px;
    box-sizing: border-box;
    backdrop-filter: blur(15px);
}

.user-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

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

.user-field-row .user-field {
    flex: 1;
}

.purchase-option {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(20px);
}

.purchase-option:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.purchase-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 10px;
    object-fit: cover;
}

.purchase-details {
    flex: 1;
}

.purchase-title {
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.purchase-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    margin-top: 2px;
}

.purchase-price {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-weight: 600;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 8px;
    margin-left: 10px;
}

.payment-section {
    margin: 12px 0;
}

.card-display {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(20px);
}

.card-display:hover {
    background: rgba(255, 255, 255, 0.15);
}

.card-number {
    color: white;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 14px;
    letter-spacing: 1px;
}

.card-edit-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    margin-top: 4px;
}

.card-edit-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
}

.cancel-membership {
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.8);
    border: 1px solid rgba(239, 68, 68, 0.9);
    border-radius: 8px;
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
    backdrop-filter: blur(20px);
}

.cancel-membership:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 200000;
    position: relative;
}

/* Minimized windows indicators */
.minimized-windows {
    position: absolute;
    left: 80px; /* Fixed position next to logo */
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 200001;
    pointer-events: auto;
}

.minimized-indicator {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    max-width: 150px;
}

.minimized-indicator:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.minimized-indicator-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.minimized-indicator-text {
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .minimized-windows {
        left: 70px; /* Adjust for mobile */
    }
    
    .minimized-indicator {
        max-width: 100px;
        padding: 4px 8px;
    }
    
    .minimized-indicator-text {
        font-size: 11px;
    }
}

.directory-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-width: 0;
    transition: all 0.3s ease;
    opacity: 1;
    padding: 8px 20px;
    margin: 0 -20px;
    border-radius: 8px;
}

.directory-nav.hidden {
    opacity: 0;
    width: 0;
    min-width: 0;
    margin: 0;
    pointer-events: none;
    padding: 0;
}

/* Remove this entire rule - no background change on hover */

.directory-path {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 8px 16px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    cursor: default;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: fit-content;
    min-width: 80px;
}

.breadcrumb-segment {
    display: inline;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.breadcrumb-segment:active {
    transform: scale(0.95);
}

/* Remove this entire rule - no transform on hover */

.directory-nav:hover .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.9);
}

.Desktop-home-icon {
    transition: all 0.2s ease;
    transform: translateY(-2px);
}

/* Remove this entire rule - no icon change on hover */

.directory-nav:hover .breadcrumb-segment:first-child {
    color: white !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
    background: transparent;
}

.breadcrumb-segment:hover {
    color: white;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
    background: transparent;
}

.breadcrumb-segment.current-tapped {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    background: transparent;
}

.breadcrumb-segment.current-tapped:hover {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    background: transparent;
}

.directory-nav:hover .breadcrumb-segment.current-tapped:first-child {
    color: white !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
    background: transparent;
}

.breadcrumb-segment:active {
    transform: scale(0.95);
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 4px;
    pointer-events: none;
}

.logo-section {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 200000;
    pointer-events: auto !important;
}

.logo-section:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.logo {
    width: 40px;
    height: 40px;
    background: url('assets/logos/logo.jpg') center/contain;
    background-repeat: no-repeat;
    background-color: transparent;
    border-radius: 8px;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none; /* Add this line */
}

.logo-text.hidden {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
}

.star-button {
    position: absolute;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    min-width: 44px; /* Minimum size */
    width: auto; /* Allow stretching */
}

.search-icon-button.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.search-icon-button.hidden {
    opacity: 0;
    transform: translateX(20px) scale(0.9);
    pointer-events: none;
}

.search-icon-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(0) translateY(-1px) scale(1.05);
}

.search-icon-button:active {
    transform: translateX(0) translateY(0) scale(0.95);
}

.search-icon-button .search-icon {
    width: 20px;
    height: 20px;
    fill: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}



.notes-icon-button.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.notes-icon-button.hidden {
    opacity: 0;
    transform: translateX(20px) scale(0.9);
    pointer-events: none;
}

.notes-icon-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(0) translateY(-1px) scale(1.05);
}

.notes-icon-button:active {
    transform: translateX(0) translateY(0) scale(0.95);
}

#notesIconButton .notes-icon {
    width: 20px;
    height: 20px;
    fill: white !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

#notesIconButton img {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    max-width: none !important;
    max-height: none !important;
}

#notesIconButton {
    overflow: visible !important;
}

/* Search button stays fixed after star */
.search-icon-button {
    position: absolute;
    right: 100px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 6px 16px;  /* Make sure this matches */
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateX(20px) scale(0.9);
    pointer-events: none;
    z-index: 150;
}

/* Dynamic positioning for other buttons */
.notes-icon-button,
.cart-icon-button,
.pals-icon-button {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateX(20px) scale(0.9);
    pointer-events: none;
    z-index: 150;
}

.cart-icon-button.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.cart-icon-button.hidden {
    opacity: 0;
    transform: translateX(20px) scale(0.9);
    pointer-events: none;
}

.cart-icon-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(0) translateY(-1px) scale(1.05);
}

.cart-icon-button:active {
    transform: translateX(0) translateY(0) scale(0.95);
}



.pals-icon-button.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.pals-icon-button.hidden {
    opacity: 0;
    transform: translateX(20px) scale(0.9);
    pointer-events: none;
}

.pals-icon-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(0) translateY(-1px) scale(1.05);
}

.pals-icon-button:active {
    transform: translateX(0) translateY(0) scale(0.95);
}

.star-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.star-icon {
    width: 20px;
    height: 20px;
    fill: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.star-count {
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
/* Desktop drag icons */
#desktop-drag-icons {
    display: none !important;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 80px;
    pointer-events: none;
    z-index: 999999;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#desktop-drag-icons.show {
    opacity: 1;
    transform: scale(1);
}

.desktop-close-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    background: rgba(239, 68, 68, 0.9);
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.desktop-favorites-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    background: rgba(34, 197, 94, 0.9);
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.desktop-favorites-icon.highlight {
    transform: scale(1.2);
    background: rgba(34, 197, 94, 1);
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.4);
}

.desktop-favorites-icon.unsave {
    background: rgba(239, 68, 68, 0.9);
}

.desktop-favorites-icon.unsave.highlight {
    background: rgba(239, 68, 68, 1);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4);
}

.desktop-close-icon.highlight {
    transform: scale(1.2);
    background: rgba(239, 68, 68, 1);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4);
}
.desktop {
    padding-top: 80px;
    padding-bottom: 0px;
    padding-left: 0px;
    padding-right: 0px;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.folder {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    transition: transform 0.1s ease;
    user-select: none;
    width: 160px;
    height: 200px;
    min-width: 160px;
    min-height: 200px;
    max-width: 100vw;
    max-height: 100vh;
    padding: 0;
    margin: 0;
}

.folder:hover {
    transform: scale(1.05);
}

.folder[data-app="true"]:hover {
    transform: scale(1.08);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.folder.dragging {
    z-index: 1000;
    transform: scale(1.1);
    transition: none;
}

.folder-icon {
    width: clamp(60px, 12vw, 160px);
    height: clamp(60px, 12vw, 160px);
    background: url('assets/file/blackfile.png') center/contain;
    background-repeat: no-repeat;
    background-color: transparent;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.folder[data-app="true"] .folder-icon {
    background: url('assets/file/blackfile.png') center/contain;
    background-repeat: no-repeat;
    position: relative;
}

.folder[data-app="true"] .folder-icon::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background-image: url('assets/system/openapp.png');
    background-size: 24px 24px;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.15);
}

.folder-name {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    backdrop-filter: blur(5px);
}

/* Verified badge for built-in OS folders/files (cannot be renamed/deleted). */
.wd-verified {
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-left: 4px;
    vertical-align: -0.12em;
    flex: 0 0 auto;
}
.folder-name.wd-renaming .wd-verified { display: none; }
/* Inline rename field shown when a user-created folder's name is clicked. */
.folder-name-input {
    font: inherit;
    color: #fff;
    text-align: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 4px 8px;
    outline: none;
    width: 7em;
    max-width: 140px;
}

.window {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    min-height: 300px;
    max-width: 90vw;
    max-height: 85vh;
    z-index: 500;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    will-change: transform, left, top;
    backface-visibility: hidden;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
}

/* Titlebar with familiar controls; it is also the drag handle. */
.wd-titlebar {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 10px;
    cursor: grab;
    background: rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    user-select: none;
}
.wd-titlebar:active { cursor: grabbing; }
.wd-tb-group { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.wd-tb-right { flex-direction: row-reverse; position: relative; } /* RTL: snap-right sits at the far right */
/* Folder actions: an inline row on desktop, a chevron dropdown on mobile (below). */
.wd-tb-acts { display: flex; flex-direction: row-reverse; align-items: center; gap: 6px; }
.wd-tb-more { display: none; }
.wd-tb-title {
    flex: 0 1 auto; min-width: 0; text-align: center; cursor: text;
    font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.92);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px;
}
.wd-tb-rename {
    flex: 1 1 auto; min-width: 0; margin: 0 6px; text-align: center;
    font-size: 13px; font-weight: 600; color: #fff;
    background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px; padding: 4px 8px; outline: none;
}
.wd-tb-btn {
    width: 26px; height: 26px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 8px; background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85); cursor: pointer; padding: 0; transition: background 0.15s ease, color 0.15s ease;
}
.wd-tb-btn svg { width: 15px; height: 15px; display: block; }
.wd-tb-btn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
/* macOS traffic lights: red close, amber minimize, green maximize on hover */
.wd-tb-btn.wd-close:hover { background: #ff5f57; color: #2a0000; }
.wd-tb-btn.wd-min:hover { background: #febc2e; color: #5a3a00; }
.wd-tb-btn.wd-max:hover { background: #28c840; color: #00330d; }
.wd-tb-btn.wd-del:hover { background: #ff453a; color: #fff; }

/* Content fills the area under the titlebar (override the legacy inline height). */
.window > .window-content { flex: 1 1 auto; min-height: 0; height: auto !important; }

.window.maximized {
    left: 0 !important; top: 60px !important;
    width: 100vw !important; height: calc(100vh - 60px) !important;
    max-width: none !important; max-height: none !important; border-radius: 0;
}

/* ---- Wopara Desktop product finder (folder contents) ---- */
.wd-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 12px 16px 6px; }
.wd-crumb { border: none; background: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
    color: rgba(255, 255, 255, 0.7); padding: 4px 6px; border-radius: 7px; }
.wd-crumb:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.wd-crumb:last-child { color: #fff; }
.wd-crumb-sep { color: rgba(255, 255, 255, 0.4); font-size: 13px; }
.wd-finder { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; padding: 12px 16px 20px; }
.wd-fitem { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px;
    border: none; background: rgba(255, 255, 255, 0.06); border-radius: 16px; cursor: pointer; color: #fff;
    font: inherit; transition: background 0.15s ease, transform 0.12s ease; }
.wd-fitem:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }
/* Finder icons mirror the desktop. A folder inside a folder is the same themed,
   masked folder shape the desktop draws (folder colour, defaulting to the theme
   accent), and an app is a flat accent squircle carrying the Servant send glyph.
   Colour always comes from the theme, never a hardcoded gradient. */
.wd-ficon { width: 52px; height: 52px; position: relative; }
.wd-ficon-folder,
.wd-ficon-section {
    background-color: var(--wd-folder-color, var(--wp-accent, #4aa3ff));
    -webkit-mask: url('assets/file/blackfile.png') center/contain no-repeat;
            mask: url('assets/file/blackfile.png') center/contain no-repeat;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}
/* Section folders are structure placeholders: same shape, dialled back. */
.wd-ficon-section { opacity: 0.6; }
.wd-ficon-app {
    border-radius: 13px;
    background: var(--wp-accent, #4aa3ff);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 3px 6px rgba(0, 0, 0, 0.3);
}
/* The Servant send glyph, inked with the on-accent colour so it stays legible on
   the accent tile and reads distinctly from the folder shape. */
.wd-ficon-app::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--wp-on-accent, #fff);
    -webkit-mask: url('/images/send.png') center / 24px 24px no-repeat;
            mask: url('/images/send.png') center / 24px 24px no-repeat;
}
.wd-fname { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.92); }
.wd-empty { padding: 36px 24px; text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 14px; line-height: 1.5; }

/* Desktop folder icons follow the Desktop folder colour (default: theme accent),
   recolouring the file glyph via a mask; optional folder emoji overlays it. */
#desktop .folder .folder-icon {
    position: relative;
    background-image: none;
    background-color: var(--wd-folder-color, var(--wp-accent, #4aa3ff));
    -webkit-mask: url('assets/file/blackfile.png') center/contain no-repeat;
            mask: url('assets/file/blackfile.png') center/contain no-repeat;
}
/* Emoji overlays the folder (a sibling of the masked icon, so it isn't clipped). */
.wd-folder-emoji {
    position: absolute; left: 0; right: 0; top: 0; bottom: 34px;
    display: flex; align-items: center; justify-content: center;
    font-size: 56px; line-height: 1; pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.window.resizing {
    transition: none !important;
    /* Live backdrop blur is re-sampled every frame while the window changes size;
       suspend it during the drag so resizing stays at full framerate. */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.window.dragging {
    transition: none;
    z-index: 9999;
    will-change: transform;
    transform-origin: 0 0;
    /* Same reason as .resizing: a 25px backdrop blur behind a moving window is the
       dominant per-frame cost, so drop it while dragging. */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Dropping the blur above leaves only the window's 15% white film, so a window
   being moved or resized turned see-through (its titlebar most of all, where the
   dark film over nothing reads as a hole). Stand a solid pane in for the frosted
   one while the drag lasts: identical weight on screen, none of the per-frame
   blur cost. Window chrome is white-on-dark, so the pane is dark in every theme. */
.window.dragging,
.window.resizing {
    background: rgba(18, 21, 29, 0.96);
}

.window.snapped-left {
    left: 0px !important;
    top: 60px !important;
    width: 50vw !important;
    height: calc(100vh - 60px) !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0px;
}

.window.snapped-right {
    left: 50vw !important;
    top: 60px !important;
    width: 50vw !important;
    height: calc(100vh - 60px) !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0px;
}

.window.snapped-top {
    left: 0px !important;
    top: 60px !important;
    width: 100vw !important;
    height: calc(50vh - 30px) !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0px;
}

.window.snapped-bottom {
    left: 0px !important;
    top: 50vh !important;
    width: 100vw !important;
    height: 50vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0px;
}

.window.snapped-top-left {
    left: 0px !important;
    top: 60px !important;
    width: 50vw !important;
    height: calc(50vh - 30px) !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0px;
}

.window.snapped-top-right {
    left: 50vw !important;
    top: 60px !important;
    width: 50vw !important;
    height: calc(50vh - 30px) !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0px;
}

.window.snapped-bottom-left {
    left: 0px !important;
    top: 50vh !important;
    width: 50vw !important;
    height: 50vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0px;
}

.window.snapped-bottom-right {
    left: 50vw !important;
    top: 50vh !important;
    width: 50vw !important;
    height: 50vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0px;
}

.window.active {
    opacity: 1;
    transform: scale(1);
}

.window.maximized {
    top: 60px !important;
    left: 0px !important;
    width: 100vw !important;
    height: calc(100vh - 60px) !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0px;
}

.window-content {
    padding: 0;
    height: 100%;
    margin-top: 0;
    overflow: auto;
    will-change: scroll-position;
    backface-visibility: hidden;
    cursor: default;
    display: flex;
    flex-direction: column;
    position: relative;
}

.window-content .folder-item,
.window-content button,
.window-content input,
.window-content a {
    cursor: pointer;
}

.window.dragging .window-content {
    pointer-events: none;
    will-change: transform;
}

.window.dragging,
.window.dragging * {
    cursor: grabbing !important;
}

.window-content * {
    color: inherit;
}

.folder-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.folder-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.folder-item-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-item-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Finder folder glyph: the same themed (folder-colour / accent) masked folder
   shape the desktop uses, so finder views match the desktop instead of a flat
   blue icon. */
.folder-item-icon .wd-fi {
    width: 30px;
    height: 30px;
    background-color: var(--wd-folder-color, var(--wp-accent, #4aa3ff));
    -webkit-mask: url('assets/file/blackfile.png') center/contain no-repeat;
            mask: url('assets/file/blackfile.png') center/contain no-repeat;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.wd-folder-search {
    position: sticky;
    top: 0;
    z-index: 5;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 10px 14px;
    border: 1px solid var(--wp-border, rgba(255,255,255,0.18));
    border-radius: 12px;
    background: var(--wp-surface, rgba(255,255,255,0.08));
    color: var(--wp-text-solid, #fff);
    font: inherit;
    font-size: 0.95rem;
    outline: none;
}
.wd-folder-search:focus { border-color: var(--wp-accent, #4aa3ff); }

.folder-item-name {
    color: white !important;
}

.folder-item-subtitle {
    color: rgba(255,255,255,0.8) !important;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.back-button:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.phone-overlay-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 0;
}

.phone-overlay-wrapper.show {
    opacity: 1;
}

.phone-iframe {
    width: 100vw;
    height: 100vh;
    border: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.phone-overlay-wrapper.show .phone-iframe {
    opacity: 1;
}

/* Saved Overlay Styles */
.saved-overlay-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 4000;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding-top: 90px;
    padding-right: 20px;
}


@media (max-width: 768px) {
    .saved-overlay-wrapper {
        justify-content: center;
        align-items: center;
        padding: 0;
        background: rgba(0, 0, 0, 0.9);
    }
}

.saved-overlay-wrapper.show {
    opacity: 1;
}

.saved-grid {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 24px;
    width: 400px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.saved-item {
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .saved-grid {
        width: 100vw;
        height: 100vh;
        max-height: none;
        border-radius: 0;
        padding: 20px;
        overflow-y: scroll;
        position: relative;
    }
}

.saved-overlay-wrapper.show .saved-grid {
    transform: scale(1);
}

.saved-grid::-webkit-scrollbar {
    width: 8px;
}

.saved-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.saved-grid::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}

.saved-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-content: start;
    width: 100%;
    box-sizing: border-box;
}

.saved-item {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.saved-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.saved-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    padding: 40px 20px;
}

.recent-item {
    border: 2px solid rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
}

.saved-directory-item {
    border: 2px solid rgba(255, 215, 0, 0.4);
    background: rgba(255, 215, 0, 0.1);
}

.saved-header {
    color: white;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 24px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.saved-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.saved-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.saved-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.saved-item-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
}

.saved-item-name {
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    word-break: break-word;
}

.saved-item-path {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    word-break: break-word;
}

.saved-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    padding: 40px 20px;
}

.window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.08s ease;
    border-radius: 24px;
}

.window.tint-white::before {
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

.window.tint-black::before {
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.window.tint-red::before {
    background: rgba(255, 0, 0, 0.25);
    opacity: 1;
}

.window.tint-green::before {
    background: rgba(0, 255, 0, 0.2);
    opacity: 1;
}

.window.tint-gold::before {
    background: rgba(255, 215, 0, 0.25);
    opacity: 1;
}

/* Notes Interface Styles */
.notes-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    position: relative;
}

.notes-canvas-container.no-drag {
    pointer-events: auto;
}

.notes-canvas-container.no-drag * {
    pointer-events: auto;
}

.notes-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 20px;
}

.notes-canvas-container {
    flex: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notes-canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.notes-toolbar {
    display: flex;
    gap: 12px;
    padding: 20px 24px 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    flex-wrap: wrap;
    justify-content: center;
}

.notes-tool-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    min-width: 80px;
    justify-content: center;
}

.notes-tool-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.notes-tool-btn.active {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.6);
    color: #60a5fa;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.notes-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.notes-tab {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notes-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.notes-tab.active {
    color: white;
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.notes-text-area {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    color: #374151;
    padding: 20px;
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.notes-text-area::placeholder {
    color: #9ca3af;
}

.notes-text-area[readonly] {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #374151 !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    user-select: text;
    cursor: text;
    padding: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.notes-icon {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    background-image: url('assets/blob/notesicon.png');
    background-size: px 48px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.notes-icon.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.notes-icon:hover {
    transform: scale(1.1);
}

/* Logo Dropdown Overlay */
.logo-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 150000;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding-top: 90px;
    padding-left: 20px;
}

.logo-dropdown.active {
    opacity: 1;
    visibility: visible;
}

.logo-dropdown-content {
    width: 280px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.logo-dropdown.active .logo-dropdown-content {
    transform: scale(1);
}

.logo-dropdown-section {
    margin-bottom: 16px;
}

.logo-dropdown-section:last-child {
    margin-bottom: 0;
}

.logo-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(20px);
}

.logo-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.logo-dropdown-text {
    color: white;
    font-weight: 500;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.logo-user-info {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(20px);
}

.logo-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.logo-user-details {
    flex-grow: 1;
}

.logo-user-name {
    color: white;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.logo-user-email {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Google Sign-in button styling in dropdown */
#logo-google-auth-slot {
    display: flex;
    justify-content: center;
}

#logo-google-auth-slot .g_id_signin {
    margin: 0 !important;
    transform: scale(0.9);
}

.window-drag-bar:active {
    cursor: grabbing;
}

.window.dragging .window-drag-bar {
    height: 100%;
    cursor: grabbing;
}

.window.dragging .window-content {
    pointer-events: none;
}

/* ==============================================
   MOBILE STYLES
   ============================================== */

@media (max-width: 768px) {
    body {
        font-size: 14px;
        overflow-x: hidden;
        background-attachment: scroll;
    }
    
    /* Hide directory navigation on mobile */
    .directory-nav {
        display: none !important;
    }
    
    /* Hide logo text on mobile */
    .logo-text {
        display: none;
    }
    
    /* Adjust folder sizes for mobile */
 .folder {
        width: 80px !important;
        height: 110px !important;
        min-width: 80px !important;
        min-height: 110px !important;
        max-width: 80px !important;
        max-height: 110px !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden;
    }

    .folder-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 4px;
    }
    
    .folder-name {
        margin: 0;
        padding: 4px 8px;
        max-width: 80px;
        word-wrap: break-word;
        text-align: center;
        font-size: 12px;
    }
   /* Touch controls */
.folder {
    touch-action: manipulation;
}
    
    .window {
        touch-action: manipulation;
        min-width: 300px;
        min-height: 250px;
        max-width: 95vw;
        max-height: 85vh;
    }

    /* Fullscreen windows must clear the floating nav pill, which sits below the
       device safe-area (notch / Dynamic Island) on mobile. Without this the
       titlebar slides up under the pill and its buttons can't be tapped (the
       pill sits on top at z-index 6000). */
    .window.maximized {
        top: calc(env(safe-area-inset-top, 0px) + 58px) !important;
        height: calc(100vh - env(safe-area-inset-top, 0px) - 58px) !important;
        height: calc(100dvh - env(safe-area-inset-top, 0px) - 58px) !important;
    }

    .window-content {
        touch-action: auto;
        /* Momentum scrolling for window/iframe content on iOS. */
        -webkit-overflow-scrolling: touch;
    }

    /* Bigger titlebar controls so close/minimise/maximise are comfortable touch
       targets (26px is below the ~44px guideline and easy to mis-tap). */
    .wd-titlebar { height: 46px; }
    .wd-tb-btn { width: 34px; height: 34px; }
    .wd-tb-btn svg { width: 18px; height: 18px; }
    .wd-tb-group { gap: 8px; }

    /* No room for four folder actions on a phone titlebar: they fold into the
       chevron and drop down beneath it. */
    .wd-tb-more { display: flex; }
    .wd-tb-acts {
        position: absolute; top: calc(100% + 6px); right: 0; z-index: 20;
        flex-direction: column; gap: 6px; padding: 6px;
        background: rgba(22, 26, 34, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 14px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
        opacity: 0; transform: translateY(-6px) scale(0.96);
        pointer-events: none; visibility: hidden;
        transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    }
    .wd-tb-right.more-open .wd-tb-acts {
        opacity: 1; transform: none; pointer-events: auto; visibility: visible;
    }
    .wd-tb-right.more-open .wd-tb-more { background: rgba(255, 255, 255, 0.22); color: #fff; }
    .wd-tb-right.more-open .wd-tb-more svg { transform: rotate(180deg); }
    .wd-tb-more svg { transition: transform 0.16s ease; }

    .folder-item,
    .breadcrumb-segment,
    .logo-section,
    .star-button,
    button,
    input,
    textarea,
    .notes-tool-btn,
    .notes-tab {
        touch-action: manipulation;
    }
    
    /* Ensure inputs work on mobile */
    input, textarea {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
        -webkit-touch-callout: default;
    }

    
    .search-icon-button .search-icon {
    width: 18px;
    height: 18px;
}
    
    /* Compact notes icon on mobile */
    .notes-icon-button {
    right: 130px;
    padding: 8px 16px;
    gap: 8px;
}
    
    .notes-icon-button .notes-icon {
    width: 18px;
    height: 18px;
    fill: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
    
    /* Phone overlay adjustments */
    .phone-iframe {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .phone-overlay-wrapper {
        justify-content: center;
        align-items: center;
        padding: 0;
    }
    /* Mobile screen-level drag icons */
#mobile-drag-icons {
    display: none !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    pointer-events: none;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px 20px 40px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-drag-icons.show {
    opacity: 1;
    transform: translateY(0);
}

.mobile-trash-icon,
.mobile-favorites-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.mobile-trash-icon {
    background: rgba(239, 68, 68, 0.9);
}

.mobile-favorites-icon {
    background: rgba(34, 197, 94, 0.9);
}

.mobile-favorites-icon.unsave {
    background: rgba(239, 68, 68, 0.9);
}

.mobile-favorites-icon.unsave.highlight {
    background: rgba(239, 68, 68, 1);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4);
}
.mobile-trash-icon.highlight,
.mobile-favorites-icon.highlight {
    transform: scale(1.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.mobile-trash-icon.highlight {
    background: rgba(239, 68, 68, 1);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4);
}

.mobile-favorites-icon.highlight {
    background: rgba(34, 197, 94, 1);
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.4);
}



/* Hide on fullscreen windows */
.window.maximized .mobile-window-icons {
    display: none;
}
.folder {
        position: fixed !important;
    }
    
    .desktop {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    body {
        padding: 0 !important;
        margin: 0 !important;
    }

}
/* ==============================================
   Smaller mobile
   ============================================== */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    .folder {
    width: 70px;
    height: 100px;
}

.folder-icon {
    width: 70px;
    height: 70px;
}
    
    .folder-name {
        font-size: 12px;
    }
    
    .header {
        height: 50px;
    }
    
.desktop {
    padding: 0px !important;
}
    
    .window {
        min-width: 280px;
        max-width: 98vw;
        max-height: 90vh;
    }
    
    /* Better touch targets */
    .folder-item {
        padding: 16px;
        min-height: 60px;
    }
    
    .breadcrumb-segment {
        padding: 8px 12px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Ensure inputs work on mobile */
    input, textarea {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
        -webkit-touch-callout: default;
    }
    
    /* The window uses .wd-titlebar (a flex sibling) as its drag handle now; the old
       .window-drag-handle/.window-drag-indicator elements are gone. The leftover
       margin-top:45px + height:calc(100% - 45px) here pushed the app content down,
       leaving a dead grey band under the titlebar — removed so content fills flush. */

    .search-icon-button .search-icon {
    width: 16px;
    height: 16px;
}
    
    .notes-icon-button {
    right: 120px;
    padding: 8px 16px;
    gap: 8px;
}
    
    .notes-icon-button .notes-icon {
    width: 16px;
    height: 16px;
    fill: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
}



/* Mobile Blob Search Button (Desktop Hidden) */
.mobile-blob-search-button {
    position: absolute;
    right: 100px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateX(20px) scale(0.9);
    pointer-events: none;
    z-index: 150;
}

.mobile-blob-search-button.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.mobile-blob-search-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(0) translateY(-1px) scale(1.05);
}

.mobile-blob-search-button:active {
    transform: translateX(0) translateY(0) scale(0.95);
}

.mobile-blob-search-button .search-icon {
    width: 20px;
    height: 20px;
    fill: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}



@media (min-width: 769px) {
    .mobile-blob-search-button {
        display: none !important;
    }
}

/* Desktop-specific adjustments for phone overlay */
@media (min-width: 769px) {
    .phone-overlay-wrapper {
        justify-content: flex-end;
        align-items: flex-start;
        padding-top: 90px;
        padding-right: 20px;
    }
}
/* iOS-style shaking animation for saved items */
@keyframes shake {
    0% { transform: translateX(0px) rotate(0deg); }
    10% { transform: translateX(-2px) rotate(-1deg); }
    20% { transform: translateX(2px) rotate(1deg); }
    30% { transform: translateX(-2px) rotate(0deg); }
    40% { transform: translateX(2px) rotate(1deg); }
    50% { transform: translateX(-2px) rotate(-1deg); }
    60% { transform: translateX(2px) rotate(0deg); }
    70% { transform: translateX(-2px) rotate(-1deg); }
    80% { transform: translateX(2px) rotate(1deg); }
    90% { transform: translateX(-2px) rotate(0deg); }
    100% { transform: translateX(0px) rotate(0deg); }
}

.saved-item.editing {
    animation: shake 0.6s infinite;
    position: relative;
}

.saved-item-delete {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    z-index: 10;
}

.saved-item.editing .saved-item-delete {
    opacity: 1;
    transform: scale(1);
}

.saved-item-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ===== Wallpaper picker grid (settings panel) ===== */
.wd-wall-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 2px 6px 6px;
}
.wd-wall-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 12px 6px;
    border: none;
    background: rgba(255,255,255,.05);
    border-radius: 14px;
    color: #fff;
    font: inherit;
    cursor: pointer;
    transition: background .15s ease;
}
.wd-wall-swatch:hover {
    background: rgba(255,255,255,.09);
}
.wd-wall-swatch.on {
    background: rgba(255,255,255,.12);
    box-shadow: inset 0 0 0 1.5px var(--wp-accent, #0a84ff);
}
.wd-wall-dot {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.wd-wall-img {
    background-size: cover;
    background-position: center;
}
.wd-wall-upload-dot {
    border: 1.5px dashed rgba(255,255,255,.35);
    box-shadow: none;
    background-size: cover;
    background-position: center;
}
.wd-wall-upload-icon {
    width: 20px;
    height: 20px;
    color: rgba(255,255,255,.6);
}
.wd-wall-custom-dot {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.wd-wall-tick {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
    border-radius: 50%;
}
.wd-wall-tick svg {
    width: 20px;
    height: 20px;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}
.wd-wall-name {
    font-size: .78rem;
    color: rgba(255,255,255,.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ===== Protected viewer for purchased Museum products ===== */
.wd-pv{ position:relative; height:100%; background:#06080e; overflow:auto; user-select:none; }
.wd-pv img,.wd-pv iframe{ width:100%; height:100%; display:block; border:0; object-fit:contain; -webkit-user-drag:none; }
.wd-pv.blurred > *:not(.wd-pv-wm){ filter:blur(22px); }
.wd-pv-wm{ position:absolute; inset:0; pointer-events:none; display:flex; flex-wrap:wrap; gap:60px 80px;
  align-content:center; justify-content:center; transform:rotate(-24deg) scale(1.4); opacity:.16; font-weight:700; font-size:14px; color:#fff; }

/* Drag shield: covers iframes during a window/resize drag so they don't swallow
   mousemove and freeze the drag. Transparent + only present while dragging. */
#wd-drag-shield{ position:fixed; inset:0; z-index:2147483647; display:none; background:transparent; cursor:grabbing; }

/* Embed mode (/Desktop/?embed=<id>): a read-only view of the embed owner's
   unlocked folders on someone else's website. No folder creation. */
html.wd-embed .folder[data-folder="NewFolderPlaceholder"]{ display:none; }

/* Embed header: Wopara brand bar across the top of /Desktop/?embed=<id>.
   60px tall, the exact offset maximized windows already leave at the top. */
html.wd-embed .wd-embed-bar{ position:fixed; top:0; left:0; right:0; height:60px; z-index:99999;
    display:flex; align-items:center; gap:16px; padding:0 18px; box-sizing:border-box;
    background:rgba(8,10,16,.78); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
    border-bottom:1px solid rgba(255,255,255,.08); }
.wd-embed-bar .web-brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color:#fff;
    font-family:'Syne','DM Sans',sans-serif; font-weight:700; font-size:15px; letter-spacing:.01em; white-space:nowrap; }
.wd-embed-bar .web-brand img{ width:26px; height:26px; border-radius:8px; }
/* Left-aligned beside the brand: the pill's floating capsule owns top-center. */
.wd-embed-bar .web-title{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    color:rgba(255,255,255,.6); font-size:13.5px; }
.wd-embed-bar .web-open{ color:#fff; text-decoration:none; font-size:13.5px; font-weight:600; white-space:nowrap;
    padding:9px 16px; border-radius:999px; background:var(--accent, var(--wp-accent, #0a84ff)); }
/* Wallpaper/look settings for the VISITOR, right beside the way out. */
.wd-embed-bar .web-look{ width:38px; height:38px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
    border:1px solid rgba(255,255,255,.16); border-radius:999px; background:rgba(255,255,255,.08); color:#fff; cursor:pointer;
    transition:background .2s; }
.wd-embed-bar .web-look:hover{ background:rgba(255,255,255,.16); }
.wd-embed-bar .web-look svg{ width:18px; height:18px; }

/* Licensable folders: locked until the visitor redeems an activation code. */
html.wd-embed .wd-locked-folder{ cursor:pointer; }
html.wd-embed .wd-locked-folder .folder-icon{ position:relative; filter:grayscale(.45) drop-shadow(0 4px 8px rgba(0,0,0,.3)); opacity:.9; }
html.wd-embed .wd-locked-folder .wd-lock{ position:absolute; right:8%; bottom:6%; width:34%; max-width:44px; aspect-ratio:1/1;
    display:flex; align-items:center; justify-content:center; border-radius:50%;
    background:rgba(8,10,16,.85); border:1px solid rgba(255,255,255,.25); color:#fff;
    box-shadow:0 2px 10px rgba(0,0,0,.4); }
html.wd-embed .wd-locked-folder .wd-lock svg{ width:52%; height:52%; }

/* Redeem window: one code field, one door. */
.wd-redeem{ display:flex; flex-direction:column; align-items:center; gap:14px; padding:26px 24px; text-align:center; }
.wd-redeem .wd-redeem-glyph{ width:52px; height:52px; display:flex; align-items:center; justify-content:center;
    border-radius:50%; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); color:rgba(255,255,255,.85); }
.wd-redeem .wd-redeem-glyph svg{ width:24px; height:24px; }
.wd-redeem .wd-redeem-lease{ color:rgba(255,255,255,.65); font-size:13.5px; }
.wd-redeem .wd-redeem-code{ width:100%; max-width:330px; height:50px; padding:0 16px; box-sizing:border-box; text-align:center;
    font-family:'JetBrains Mono',monospace; font-size:15px; letter-spacing:.12em; text-transform:uppercase;
    color:#fff; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.2); border-radius:12px; outline:none; }
.wd-redeem .wd-redeem-code:focus{ border-color:var(--accent, var(--wp-accent, #0a84ff)); }
.wd-redeem .wd-redeem-go{ width:100%; max-width:330px; height:50px; border:none; border-radius:12px; cursor:pointer;
    font-size:15px; font-weight:600; color:#fff; background:var(--accent, var(--wp-accent, #0a84ff)); }
.wd-redeem .wd-redeem-go:disabled{ opacity:.6; cursor:default; }
.wd-redeem .wd-redeem-state{ min-height:20px; font-size:13px; }

/* Look window: the wallpaper pickers inside a desktop window. */
.wd-embed-look{ padding:16px 18px 26px; }
.wd-embed-look .wd-look-signin{ display:block; width:100%; height:50px; margin:2px 0 16px; border:none; border-radius:12px;
    cursor:pointer; font-size:14.5px; font-weight:600; color:#fff; background:var(--accent, var(--wp-accent, #0a84ff)); }
