/* --- Base Styles --- */
/* Basic Reset & Body */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; /* Establish base font size */ }
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    margin: 0;
    transition: margin-right 0.3s ease-in-out; /* For sidebar push effect */
}
h2, h3, h4 { margin-bottom: 0.8em; color: #444; font-weight: 600; }
ul { list-style: none; padding-left: 0; }
li { margin-bottom: 0.5em; }
button, input, textarea, label { font-family: inherit; font-size: inherit; }
a { color: #007bff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Utility Classes */
.error-message { color: #dc3545; font-style: italic; }
.empty-view-message, .empty-column-placeholder { color: #6c757d; font-style: italic; padding: 10px; text-align: center; }


/* --- Top Navigation --- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 10px;
}
.tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto; /* Allow tabs to scroll if they don't fit */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #ced4da #f8f9fa; /* Firefox */
    padding-bottom: 5px; /* Space for scrollbar */
}
/* Webkit scrollbar styles */
.tabs::-webkit-scrollbar { height: 5px; }
.tabs::-webkit-scrollbar-track { background: #f8f9fa; }
.tabs::-webkit-scrollbar-thumb { background-color: #ced4da; border-radius: 10px; border: 1px solid #f8f9fa; }

.tabs button.tab-link {
    padding: 10px 15px;
    margin-right: 5px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1rem; /* Use rem for scalability */
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    color: #495057;
}
.tabs button.tab-link:hover { color: #0056b3; }
.tabs button.tab-link.active { border-bottom-color: #007bff; color: #007bff; font-weight: 600; }

.controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.btn {
    padding: 0.5rem 0.9rem; /* Use rem */
    cursor: pointer;
    border: 1px solid #ced4da;
    background-color: #f1f3f5;
    border-radius: 4px;
    font-size: 0.9rem; /* Use rem */
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.5; /* Ensure consistent height */
}
.btn:hover { background-color: #e9ecef; border-color: #adb5bd; }
.btn:focus-visible { outline: 2px solid #007bff; outline-offset: 2px; } /* Accessibility */
.btn-secondary { background-color: #007bff; color: white; border-color: #007bff; }
.btn-secondary:hover { background-color: #0056b3; border-color: #004085; }
.btn:disabled { background-color: #e9ecef; border-color: #ced4da; color: #6c757d; cursor: not-allowed; opacity: 0.7; }
.mode-switch { display: flex; align-items: center; font-size: 0.9rem; border: 1px solid #ced4da; border-radius: 4px; overflow: hidden; }
.mode-switch label { padding: 0.5rem 0.6rem; cursor: pointer; background-color: #f8f9fa; transition: background-color 0.3s ease; user-select: none; }
.mode-switch label:has(input:checked) { background-color: #cfe2ff; color: #052c65; }
.mode-switch input[type="radio"] { display: none; }

/* --- Profile Menu Dropdown --- */
.profile-menu-container { position: relative; }
.profile-dropdown { display: none; position: absolute; right: 0; top: 100%; background-color: white; border: 1px solid #dee2e6; border-radius: 4px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); min-width: 160px; z-index: 110; margin-top: 5px; }
.profile-dropdown a { display: block; padding: 10px 15px; color: #333; text-decoration: none; font-size: 0.9rem; }
.profile-dropdown a:hover { background-color: #f8f9fa; }
.profile-menu-container:hover .profile-dropdown,
.profile-menu-btn:focus + .profile-dropdown, /* Show on focus */
.profile-dropdown:focus-within { display: block; } /* Keep open if interacting within */
.profile-menu-btn i { margin-left: 5px; transition: transform 0.2s; display: inline-block; /* Prevents spacing issues */ }
.profile-menu-container:hover .profile-menu-btn i { transform: rotate(180deg); }

/* --- Main Content Area & Tabs --- */
.main-container { display: flex; }
main { padding: 20px; flex-grow: 1; transition: margin-right 0.3s ease-in-out; } /* For sidebar push */
.tab-content { display: none; padding: 20px; background-color: #fff; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-top: 15px; }
.tab-content.active { display: block; animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Tools Section --- */
.tools-section { margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.tools-scroll { overflow-x: auto; padding-bottom: 10px; }
.tools-container { display: flex; gap: 15px; padding-top: 5px; min-width: min-content; /* Help with horizontal scroll */ }
.tool-card {
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column; /* Stack icon and text */
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #eaf2ff;
    color: #333;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    border: 1px solid #cce0ff;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0; /* Prevent shrinking when container scrolls */
}
.tool-card:hover { background-color: #dcebff; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

/* --- Main View Area & Switcher --- */
.main-view-area { margin-top: 20px; }
.view-switcher { margin-bottom: 20px; text-align: right; }
.view-switcher .view-btn { background: #f8f9fa; border: 1px solid #ced4da; padding: 8px 12px; margin-left: 5px; cursor: pointer; border-radius: 4px; font-size: 1.1rem; line-height: 1; color: #555; transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.view-switcher .view-btn:hover { background: #e9ecef; }
.view-switcher .view-btn.active { background: #007bff; color: white; border-color: #0056b3; }
.view-switcher .view-btn:focus-visible { outline: 2px solid #007bff; outline-offset: 1px; }

/* --- View Base Styles --- */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.5s ease-in-out; }

/* --- View 1: Columns --- */
.view-columns.active { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; /* Align columns top */ }
.view-columns .column {
    flex: 1 1 250px; /* Base width 250px, allow growth/shrink */
    min-width: 220px;
    background-color: #fdfdff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.view-columns .column h4 { border-bottom: 1px solid #e9ecef; padding-bottom: 8px; margin-bottom: 12px; font-size: 1.05rem; color: #495057; }
.view-columns .column ul { padding-left: 0; min-height: 50px; border: 1px dashed transparent; transition: border-color 0.2s, background-color 0.2s; border-radius: 3px; padding: 5px; }
.view-columns .column ul.drag-over { border-color: #90caf9; background-color: #e3f2fd; }
.view-columns .column li {
    background-color: #fff;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
    word-break: break-word; /* Break long words */
    overflow-wrap: anywhere; /* Ensure long non-breaking strings wrap */
}
.view-columns .column li:hover { box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.view-columns .column li.dragging { opacity: 0.5; background: #dcedff; box-shadow: 0 4px 8px rgba(0,0,0,0.2); cursor: grabbing; }
.view-columns .column li .item-text { flex-grow: 1; margin-right: 10px; }

/* --- View 2: Cards --- UPDATED */
.view-cards.active { display: flex; flex-wrap: wrap; gap: 20px; /* Increased gap */ }
.item-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 18px 20px; /* Increased padding */
    border-radius: 6px; /* Slightly more rounded */
    font-size: 1.05rem; /* Increased font size */
    flex: 1 1 280px; /* Base width 280px, more prominent */
    min-width: 250px; /* Minimum width */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.07); /* Slightly more shadow */
    transition: box-shadow 0.2s ease;
}
.item-card:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.item-card-content { flex-grow: 1; margin-right: 15px; overflow-wrap: break-word; word-break: break-word; }
.item-card span.category-label { font-weight: 600; color: #555; margin-right: 8px; display: block; margin-bottom: 4px; font-size: 0.9em; } /* Make label clearer */
.item-card span.item-text { color: #212529; }

/* --- View 3: Slideshow --- UPDATED */
.slideshow-container {
    position: relative;
    background-color: #f8f9fa; /* Base background */
    min-height: 200px; /* Increased height */
    text-align: center;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #eee;
    display: flex; /* Use flex for centering */
    align-items: center;
    justify-content: center;
}
.slideshow-container .slide {
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 60px; /* Padding inside slide, leaves space for nav */
    min-height: 150px;
    position: absolute; /* Position slides absolutely within container */
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    color: #fff; /* Default text color, override per theme */
    opacity: 0; /* Start invisible for transition */
    transition: opacity 0.6s ease-in-out;
}
.slideshow-container .slide.active {
    display: flex; /* Shown when active */
    opacity: 1; /* Fade in */
    z-index: 1; /* Ensure active is on top */
}
/* Slide Content Wrapper */
.slide-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* Enhance text readability */
    background-color: rgba(0, 0, 0, 0.3); /* Slight overlay for contrast */
    padding: 20px;
    border-radius: 5px;
    max-width: 80%;
}
.slideshow-container .slide span.category-label {
    font-weight: 400; /* Lighter weight for label */
    display: block;
    font-size: 0.9em;
    margin-bottom: 8px;
    text-transform: uppercase;
    opacity: 0.9;
}
.slideshow-container .slide span.item-text {
    font-size: 1.4em; /* Larger text for prominence */
    font-weight: 700; /* Bold text */
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: break-word;
}
/* Slide Controls */
.slide-controls {
    position: absolute;
    top: 10px; right: 10px;
    display: flex; gap: 8px;
    visibility: hidden; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 5px 8px;
    border-radius: 4px;
    z-index: 5;
}
.slideshow-container .slide.active:hover .slide-controls {
    visibility: visible; /* Show on hover of active slide */
    opacity: 1;
}
.slide-controls button { background: none; border: none; color: #fff; font-size: 1rem; opacity: 0.8; }
.slide-controls button:hover { opacity: 1; }

/* Slide Navigation */
.slideshow-container .slide-nav {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px 12px;
    margin-top: -25px;
    color: #fff;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 0 4px 4px 0; /* Rounded on one side */
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    z-index: 10; /* Above slides */
}
.slideshow-container .slide-nav.next { right: 0; border-radius: 4px 0 0 4px; }
.slideshow-container .slide-nav.prev { left: 0; border-radius: 0 4px 4px 0; }
.slideshow-container .slide-nav:hover { background-color: rgba(0, 0, 0, 0.5); }

/* -- Slide Themes -- */
/* Theme 1: Abstract Blue */
.slide.slide-theme-1 {
    background-image: url('https://images.unsplash.com/photo-1557682257-2f9c37a3a5f3?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1000&q=80'); /* Example gradient */
    font-family: 'Lato', sans-serif;
    color: #fff;
}
/* Theme 2: Nature */
.slide.slide-theme-2 {
    background-image: url('https://images.unsplash.com/photo-1470252649378-9c29740c9fa8?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1000&q=80'); /* Example nature scene */
    font-family: 'Merriweather', serif;
    color: #fff;
}
/* Theme 3: Geometric Dark */
.slide.slide-theme-3 {
    background-image: url('https://images.unsplash.com/photo-1507608616759-54f48f0af0ee?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1000&q=80'); /* Example geometric */
    font-family: 'Roboto Slab', serif;
    color: #fff;
}
/* Theme 4: Minimal Light */
.slide.slide-theme-4 {
    background-image: url('https://images.unsplash.com/photo-1536566482680-fca31930a0bd?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1000&q=80'); /* Example light texture */
    font-family: 'Lato', sans-serif;
    color: #333; /* Darker text for light background */
}
.slide.slide-theme-4 .slide-content-wrapper { background-color: rgba(255, 255, 255, 0.5); text-shadow: none; }
.slide.slide-theme-4 .slide-nav { color: #555; background-color: rgba(255, 255, 255, 0.5); }
.slide.slide-theme-4 .slide-nav:hover { background-color: rgba(255, 255, 255, 0.8); }
.slide.slide-theme-4 .slide-controls button { color: #333; }

/* --- View 4: Table --- */
.view-table.active { display: block; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 15px; border: 1px solid #dee2e6; border-radius: 4px; overflow: hidden; font-size: 0.95rem; }
.data-table th, .data-table td { border-bottom: 1px solid #dee2e6; padding: 12px 15px; text-align: left; vertical-align: middle; }
.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    position: sticky; top: 0; /* Sticky header - requires container overflow */
    z-index: 1;
    white-space: nowrap;
}
.data-table td { background-color: #fff; }
.data-table tbody tr:nth-child(even) td { background-color: #fdfdff; }
.data-table tbody tr:hover td { background-color: #f1f3f5; }
.data-table td.item-text { white-space: normal; overflow-wrap: break-word; word-break: break-word; min-width: 150px; }
.data-table th[data-sortable] { cursor: pointer; user-select: none; }
.data-table th[data-sortable]:hover { background-color: #e9ecef; }
.data-table th .sort-icon { display: inline-block; width: 1em; text-align: center; margin-left: 5px; opacity: 0.4; transition: opacity 0.2s ease; color: #6c757d; }
.data-table th[data-sort-dir] .sort-icon { opacity: 1; color: #007bff; }
/* Icon content set by JS */
.data-table td:last-child { width: 90px; text-align: right; white-space: nowrap; }

/* --- Item Controls (Edit/Delete) --- */
.item-controls { display: flex; gap: 10px; margin-left: 10px; align-items: center; }
.item-controls button { background: none; border: none; color: #6c757d; cursor: pointer; font-size: 1rem; padding: 3px; line-height: 1; transition: color 0.2s ease; }
.item-controls button:hover { color: #007bff; }
.item-controls .delete-btn:hover { color: #dc3545; }
.item-controls button i { pointer-events: none; display: block; } /* Ensure icon doesn't block clicks */

/* --- Draggable items base style --- */
[draggable="true"] { user-select: none; }

/* --- Modals --- */
.modal {
    display: none;
    position: fixed; z-index: 1050; /* High z-index */
    left: 0; top: 0; width: 100%; height: 100%;
    overflow-x: hidden; overflow-y: auto; /* Allow modal scroll if content overflows */
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); /* Safari */
}
.modal.show { display: flex; align-items: center; justify-content: center; animation: fadeIn 0.3s ease-out; }
.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 550px;
    position: relative;
    margin: 1.75rem auto; /* Allows scrolling */
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal .close-btn {
    position: absolute; top: 10px; right: 15px;
    color: #aaa; font-size: 30px; font-weight: bold;
    cursor: pointer; line-height: 1; padding: 5px;
    background: none; border: none;
}
.modal .close-btn:hover, .modal .close-btn:focus { color: #333; text-decoration: none; }
.modal h3 { margin-top: 0; margin-bottom: 25px; font-size: 1.3rem; }
.modal input[type="text"], .modal textarea { width: 100%; padding: 12px; margin-bottom: 20px; border: 1px solid #ced4da; border-radius: 4px; font-size: 1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.modal input[type="text"]:focus, .modal textarea:focus { border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); }
.modal textarea { resize: vertical; min-height: 80px; }
.modal-actions { text-align: right; margin-top: 15px; display: flex; justify-content: flex-end; gap: 10px; }

/* Prevent body scroll when modal is open */
body.modal-open { overflow: hidden; padding-right: var(--scrollbar-width, 0px); /* Compensate for scrollbar */ }

/* --- Guided Mode Sidebar --- */
#guided-sidebar {
    position: fixed;
    right: 0; top: 0;
    padding-top: 70px; /* Adjust based on final nav height */
    height: 100%; width: 300px; /* Wider */
    background-color: #f8f9fa;
    border-left: 1px solid #dee2e6;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 95; /* Below modals, above main */
    padding: 20px; padding-top: 80px; /* Ensure content below header */
    overflow-y: auto;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
}
#guided-sidebar.show { transform: translateX(0); }
#guided-sidebar h3 { margin-bottom: 20px; font-size: 1.15rem; color: #495057; }
#guided-sidebar ul { list-style: none; padding: 0; }
#guided-sidebar li { background-color: #fff; border: 1px solid #eee; padding: 12px 15px; margin-bottom: 10px; border-radius: 4px; cursor: pointer; font-size: 0.95rem; transition: background-color 0.2s, box-shadow 0.2s ease; }
#guided-sidebar li:hover { background-color: #e9ecef; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
#close-sidebar-btn { position: absolute; top: 70px; /* Align with content start */ right: 15px; background: none; border: none; font-size: 26px; color: #6c757d; cursor: pointer; line-height: 1; padding: 5px; }
#close-sidebar-btn:hover { color: #343a40; }

/* Sidebar State Body Classes */
body.sidebar-open-push main { margin-right: 300px; /* Push main content */ }
/* body.sidebar-open-overlay {} (No push, sidebar overlays) */


/* --- Responsiveness Adjustments --- */

/* Medium Screens (Tablets, larger phones: <= 992px) */
@media (max-width: 992px) {
    body.sidebar-open-push main { margin-right: 0; /* Don't push on medium screens */ }
    body.sidebar-open-overlay #guided-sidebar { box-shadow: -3px 0 6px rgba(0,0,0,0.15); } /* Overlay shadow */
    #guided-sidebar { z-index: 1010; /* Ensure sidebar is above sticky nav when overlaying */ }

    .view-columns .column { flex-basis: calc(50% - 10px); /* Two columns */ min-width: 200px; }
    .item-card { flex-basis: calc(50% - 10px); /* Two columns */ min-width: 200px; }
}

/* Small Screens (Phones: <= 768px) */
@media (max-width: 768px) {
    html { font-size: 15px; /* Adjust base font size slightly */ }
    .top-nav {
        flex-direction: column;
        align-items: stretch; /* Stretch items */
        padding: 10px 15px;
        position: relative; /* Allow content to scroll under */
    }
    .tabs { width: 100%; padding-bottom: 8px; } /* Ensure full width */
    .controls { margin-top: 10px; width: 100%; justify-content: space-between; } /* Space out controls */
    .profile-menu-container { /* Ensure profile doesn't cause overflow */ }

    main { padding: 15px; }
    .tab-content { padding: 15px; }

    .tools-container { gap: 10px; justify-content: flex-start; /* Align left */ }
    .tool-card { width: 120px; height: 120px; font-size: 0.9rem; }

    .view-columns .column { flex-basis: calc(50% - 8px); min-width: 180px; } /* Adjust column basis */
    .item-card { flex-basis: calc(50% - 8px); min-width: 180px; } /* Adjust card basis */

    .modal-content { width: 95%; padding: 20px; }
    .modal h3 { font-size: 1.2rem; }

    #guided-sidebar { width: 280px; max-width: 85%; } /* Sidebar width adjustment */
    #close-sidebar-btn { top: 15px; right: 15px; font-size: 28px; padding: 8px; } /* Easier to hit */

    .slideshow-container { padding: 40px 10px; min-height: 180px; }
    .slideshow-container .slide { padding: 20px 45px; } /* Adjust slide padding */
    .slideshow-container .slide span.item-text { font-size: 1.2em; }
    .slideshow-container .slide-nav { padding: 12px 8px; font-size: 20px; margin-top: -20px; }
    .slide-controls { top: 5px; right: 5px; }

    .data-table { font-size: 0.9rem; }
    .data-table th, .data-table td { padding: 10px 8px; }
    .data-table td:last-child { width: 80px; } /* Adjust actions column width */
}

/* Extra Small Screens (Smaller Phones: <= 480px) */
@media (max-width: 480px) {
    html { font-size: 14px; }
    .controls { flex-direction: column; align-items: stretch; gap: 8px; } /* Stack controls */
    .mode-switch label { flex-grow: 1; text-align: center; } /* Make mode buttons equal width */

    .btn { padding: 0.5rem 0.8rem; }
    .tool-card { width: 100px; height: 100px; font-size: 0.85rem; }

    .view-columns .column { flex-basis: 100%; } /* Single column */
    .item-card { flex-basis: 100%; } /* Single column */

    .modal-content { max-width: 96%; }
    .modal-actions { flex-direction: column; align-items: stretch; } /* Stack modal buttons */
    .modal-actions button { width: 100%; margin-left: 0; }

    .view-switcher { text-align: center; margin-bottom: 15px; } /* Center view buttons */
    .view-switcher .view-btn { margin: 2px; }

    .slideshow-container .slide span.item-text { font-size: 1.1em; }
}