:root {
    /* DEFAULT THEME (Classic) */
    --bg-image: repeating-linear-gradient(45deg, #6d4c41 0, #6d4c41 1px, #5d4037 0, #5d4037 50%);
    --bg-color: #5d4037;
    --paper-color: #fdfbf7;
    --paper-shadow: rgba(0, 0, 0, 0.2);
    --ink-color: #2c3e50;
    --ink-secondary: #666;
    --accent-color: #c0392b;
    --line-color: #aab7b8;
    --header-font: 'Playfair Display', serif;
    --handwriting-font: 'Caveat', cursive;
    --hover-bg: #e0e0e0;
    --today-bg: rgba(255, 240, 200, 0.5);
    --weekend-bg: rgba(0, 0, 0, 0.03);
    --holiday-bg: rgba(192, 57, 43, 0.05);
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --imported-bg: rgba(26, 115, 232, 0.1);
    --imported-text: #1a73e8;
}

/* THEMES */

/* 2. Éjszakai (Night) */
body.theme-night {
    --bg-image: none;
    --bg-color: #1a1a2e;
    --paper-color: #16213e;
    --ink-color: #e94560;
    --ink-secondary: #aab7b8;
    --paper-shadow: rgba(0, 0, 0, 0.5);
    --accent-color: #ff6b6b;
    --line-color: #0f3460;
    --hover-bg: #1f4068;
    --today-bg: rgba(233, 69, 96, 0.1);
    --weekend-bg: rgba(0, 0, 0, 0.2);
    --holiday-bg: rgba(255, 107, 107, 0.1);
    --imported-bg: rgba(78, 204, 163, 0.1);
    --imported-text: #4ecca3;
    color-scheme: dark;
    /* Fixes native date picker icons */
}

/* 3. Minimál (Minimal) */
body.theme-minimal {
    --bg-image: none;
    --bg-color: #f0f0f0;
    --paper-color: #ffffff;
    --paper-shadow: rgba(0, 0, 0, 0.05);
    --ink-color: #000000;
    --ink-secondary: #444;
    --accent-color: #000000;
    --line-color: #e0e0e0;
    --hover-bg: #f5f5f5;
    --today-bg: #f8f8f8;
    --weekend-bg: #e8e8e8;
    --holiday-bg: #fff0f0;
    --imported-bg: #f0f8ff;
    --imported-text: #000;
}

/* 4. Természet (Nature) */
body.theme-nature {
    --bg-image: linear-gradient(to bottom right, #2d5a27, #1b3a1a);
    --bg-color: #2d5a27;
    --paper-color: #f1f8e9;
    --ink-color: #1b5e20;
    --ink-secondary: #558b2f;
    --accent-color: #d84315;
    --line-color: #c5e1a5;
    --hover-bg: #dcedc8;
    --today-bg: rgba(220, 237, 200, 0.5);
    --weekend-bg: rgba(51, 105, 30, 0.05);
    --holiday-bg: rgba(216, 67, 21, 0.05);
}

/* 5. Óceán (Ocean) */
body.theme-ocean {
    --bg-image: linear-gradient(to bottom, #0288d1, #01579b);
    --bg-color: #0288d1;
    --paper-color: #e1f5fe;
    --ink-color: #01579b;
    --ink-secondary: #0288d1;
    --accent-color: #ff6f00;
    --line-color: #81d4fa;
    --hover-bg: #b3e5fc;
    --today-bg: rgba(129, 212, 250, 0.3);
    --weekend-bg: rgba(1, 87, 155, 0.05);
    --holiday-bg: rgba(255, 111, 0, 0.05);
}

/* 6. Naplemente (Sunset) */
body.theme-sunset {
    --bg-image: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
    --bg-color: #ff9a9e;
    --paper-color: #fff3e0;
    --ink-color: #4a148c;
    --ink-secondary: #7b1fa2;
    --accent-color: #d500f9;
    --line-color: #ffcc80;
    --hover-bg: #ffe0b2;
    --today-bg: rgba(255, 204, 128, 0.3);
    --weekend-bg: rgba(74, 20, 140, 0.05);
}

/* 7. Kávéház (Coffee) */
body.theme-coffee {
    --bg-image: repeating-linear-gradient(0deg, #3e2723, #3e2723 10px, #4e342e 10px, #4e342e 20px);
    --bg-color: #3e2723;
    --paper-color: #efebe9;
    --ink-color: #3e2723;
    --ink-secondary: #5d4037;
    --accent-color: #bf360c;
    --line-color: #d7ccc8;
    --hover-bg: #d7ccc8;
    --today-bg: rgba(215, 204, 200, 0.5);
    --weekend-bg: rgba(62, 39, 35, 0.05);
}

/* 8. Bogyós (Berry) */
body.theme-berry {
    --bg-image: linear-gradient(to right, #8e24aa, #4a148c);
    --bg-color: #8e24aa;
    --paper-color: #f3e5f5;
    --ink-color: #4a148c;
    --ink-secondary: #8e24aa;
    --accent-color: #c2185b;
    --line-color: #e1bee7;
    --hover-bg: #e1bee7;
    --today-bg: rgba(225, 190, 231, 0.5);
    --weekend-bg: rgba(74, 20, 140, 0.05);
}

/* 9. Királyi (Royal) */
body.theme-royal {
    --bg-image: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    --bg-color: #b8860b;
    --paper-color: #fff8e1;
    --ink-color: #800000;
    --ink-secondary: #b71c1c;
    --accent-color: #d50000;
    --line-color: #ffecb3;
    --hover-bg: #ffecb3;
    --today-bg: rgba(255, 215, 0, 0.1);
    --weekend-bg: rgba(128, 0, 0, 0.05);
}

/* 10. Hacker (Terminal) */
body.theme-hacker {
    --bg-image: none;
    --bg-color: #000000;
    --paper-color: #0d0d0d;
    --paper-shadow: rgba(0, 255, 0, 0.2);
    --ink-color: #00ff00;
    --ink-secondary: #008f00;
    --accent-color: #ff00ff;
    --line-color: #003300;
    --header-font: 'Courier New', monospace;
    --handwriting-font: 'Courier New', monospace;
    --hover-bg: #002200;
    --today-bg: rgba(0, 255, 0, 0.1);
    --weekend-bg: rgba(0, 255, 0, 0.02);
    --holiday-bg: rgba(255, 0, 255, 0.1);
    --imported-bg: #001100;
    --imported-bg: #001100;
    --imported-text: #adff2f;
    color-scheme: dark;
}

/* Hacker Theme Specific Fixes */
body.theme-hacker ::-webkit-calendar-picker-indicator {
    /* Force the icon to be black base (color-scheme light) then filter to green */
    filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(118%) contrast(119%);
    cursor: pointer;
}

/* Ensure the input text itself is readable and compatible */
body.theme-hacker .jump-input {
    color-scheme: light;
    /* Forces the browser to render the control as if in light mode (black icon) so filter works */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--header-font);
    /* Simple wood texture effect via gradient */
    background: var(--bg-color);
    background-image: var(--bg-image);
    background-size: 20px 20px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--ink-color);
}

.desk-background {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.calendar-book {
    background-color: var(--paper-color);
    width: 98%;
    max-width: none;
    height: 98vh;
    border-radius: 5px;
    box-shadow:
        1px 1px 0 #e0e0e0,
        2px 2px 0 #e0e0e0,
        3px 3px 0 #e0e0e0,
        10px 10px 30px var(--paper-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding: 2rem;
}

/* Paper texture noise */
.calendar-book::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    z-index: 1;
    border-bottom: 2px solid var(--ink-color);
    padding-bottom: 1rem;
    /* flex-wrap: wrap; Removed to prevent early wrapping on desktop */
    gap: 15px;
}

/* Base Desktop Styles for Right Column */
.header-right-column {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping if space is tight */
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    /* height: 100%; Removed to fix wrap overflow issue */
}

/* Responsive Helper Classes */
@media (max-width: 1200px) {
    .header {
        flex-wrap: wrap;
        justify-content: center;
        /* Center everything */
        gap: 20px;
        /* Add some space between Logo and Date */
    }

    /* Keep Logo and Date on the same line (taking natural width) */
    .logo-container {
        width: auto;
        order: 1;
    }

    .month-display {
        width: auto;
        flex-grow: 0;
        /* STOP growing, just be natural width */
        order: 2;
        margin-bottom: 0;
    }

    .header-right-column {
        width: 100%;
        /* Take full width on new line */
        justify-content: center;
        /* Center the buttons/auth */
        margin-top: 15px;
        order: 3;
        /* Ensure it drops to bottom */
        border-top: 1px dotted rgba(0, 255, 0, 0.2);
        padding-top: 10px;
    }
}

@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    /* Stack everything neatly */
    .logo-container,
    .month-display,
    .header-right-column {
        width: 100%;
        display: flex;
        /* Ensure they are flex containers so justify-content works */
        justify-content: center;
        flex-wrap: wrap;
        margin: 0;
    }

    /* Inside the right column on mobile, center items */
    /* Inside the right column on mobile, center items generally */
    .header-right-column {
        justify-content: center !important;
        /* Allow wrapping so they can sit side-by-side if space permits, or stack if not */
        align-items: center !important;
    }

    .header-actions,
    .header-right {
        justify-content: center;
        width: auto;
        /* Allow natural width */
        margin-bottom: 10px;
    }

    .logo-container {
        margin-bottom: 15px;
    }
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 60%;
    /* Prevent it from pushing the title too much */
}

.month-display {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 5px;
    width: 100%;
}

.date-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-row h1 {
    margin: 0;
    font-size: 2.5rem;
    line-height: 1.2;
}

.title-row p {
    margin: 0;
    font-size: 1.2rem;
    color: var(--ink-secondary);
    font-style: italic;
    opacity: 0.8;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--ink-color);
    padding: 0 10px;
    transition: transform 0.2s, color 0.2s;
    font-family: var(--header-font);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.nav-btn:hover {
    transform: scale(1.2);
    color: var(--accent-color);
}

.jump-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 0.5rem;
}

.jump-btn {
    background: transparent;
    border: 1px solid var(--ink-color);
    color: var(--ink-color);
    font-family: var(--header-font);
    padding: 2px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.jump-btn:hover {
    background-color: var(--ink-color);
    color: white;
}

.jump-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--ink-color);
    font-family: var(--header-font);
    color: var(--ink-color);
    padding: 2px 5px;
    /* Increased from 2px */
    font-size: 0.9rem;
    width: 160px;
    /* Increased from 120px for wider fonts */
    cursor: pointer;
}

.jump-input:focus {
    outline: none;
    border-bottom: 2px solid var(--accent-color);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    z-index: 1;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: 1fr;
    /* Single row fills height in weekly view */
    gap: 1px;
    background-color: var(--line-color);
    /* Creates the grid lines */
    border: 1px solid var(--line-color);
    flex-grow: 1;
    z-index: 1;
}

.day {
    background-color: var(--paper-color);
    min-height: 80px;
    padding: 5px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent content from expanding the cell */
}

/* Header within day cell to hold Nameday (left) and Date (right) */
.day-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
    width: 100%;
}

.day-number {
    font-size: 1rem;
    font-weight: bold;
    white-space: nowrap;
}

.nameday {
    font-size: 0.7rem;
    color: var(--ink-color);
    opacity: 0.7;
    font-style: italic;
    font-family: var(--header-font);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 5px;
    margin-top: 2px;
    /* Slight alignment adjustment */
}

.today-btn:hover {
    background: var(--hover-bg);
}

.ui-btn,
.today-btn {
    background: none;
    border: 1px solid var(--ink-color);
    border-radius: 4px;
    padding: 5px 10px;
    /* Slight padding increase */
    font-family: var(--header-font);
    cursor: pointer;
    font-size: 1rem;
    color: var(--ink-color);
    margin-left: 0;
    /* Remove default margin-left, handle via gap in parent */
    transition: background 0.2s;

    /* Ensure icon and text are side-by-side */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Gap between icon and text */
    white-space: nowrap;
    /* Prevent text wrapping */
    height: 36px;
    /* consistent height */
}

/* Ensure icons inside buttons don't push layout weirdly */
.ui-btn svg {
    display: block;
}



.icon-btn {
    width: 36px;
    padding: 0 !important;
}

.theme-select {
    padding: 0 5px;
    border-radius: 4px;
    border: 1px solid var(--ink-color);
    background: transparent;
    color: var(--ink-color);
    font-family: var(--header-font);
    cursor: pointer;
    height: 36px;
    box-sizing: border-box;
    font-size: 1rem;
}

.theme-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.ui-btn:hover,
.today-btn:hover {
    background: var(--hover-bg);
}

.day:hover {
    background-color: var(--hover-bg);
}

.day.today {
    background-color: var(--today-bg);
    font-weight: bold;
}

.day-number {
    align-self: flex-end;
    font-size: 1rem;
    margin-bottom: 5px;
}

.day-name {
    display: none;
    /* Hide on desktop grid to save space */
}

.day-note-preview {
    font-family: var(--handwriting-font);
    font-size: 1rem;
    color: var(--ink-secondary);

    /* Flex layout: take remaining space */
    flex-grow: 1;
    width: 100%;
    margin-top: 2px;

    overflow-y: auto;
    text-overflow: clip;
    display: block;
    line-height: 1.2;
    word-break: break-word;
    white-space: pre-wrap;
    pointer-events: auto;
    cursor: pointer;

    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--ink-color) transparent;
}

/* Day Types */
.day.weekend {
    background-color: var(--weekend-bg);
    /* Subtle darkens */
    /* Ensure grid lines are visible even with background */
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    /* Keep shadow static or make var? keep static for now */
}

.day.holiday {
    background-color: var(--holiday-bg);
    /* Lighter red background */
}

.day.holiday .day-number {
    color: var(--accent-color);
    /* Red text */
}

.holiday-name {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: left;
    margin-top: 2px;
    margin-bottom: 2px;
}

/* Header within day cell to hold Nameday (left) and Date (right) */
.day-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
    /* Reduced from 5px to avoid gap perception */
    width: 100%;
}

/* Webkit scrollbar styling */

/* Custom Day Types */
.day.custom-workday {
    background-color: var(--paper-color) !important;
    border: 2px solid var(--accent-color);
    /* Highlight that it is overridden */
}



.day.custom-workday .day-name::after {
    content: " 💼";
    font-size: 0.8rem;
}

.day.custom-holiday {
    background-color: var(--holiday-bg) !important;
}

.day.custom-holiday .day-name::after {
    content: " 🛌";
    font-size: 0.8rem;
}

/* Shared Scrollbar Styling */
.styled-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--ink-color) transparent;
}

.styled-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.styled-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(44, 62, 80, 0.3);
    border-radius: 3px;
    border: none;
}

.styled-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}



/* Actually, deeper refactor: applying these rules to the specific classes is safer without touching HTML classes everywhere yet. 
   But for Privacy Content we need a class. */

.day-note-preview::-webkit-scrollbar-thumb,
.note-area::-webkit-scrollbar-thumb,
#privacyContent::-webkit-scrollbar-thumb {
    background-color: rgba(44, 62, 80, 0.3);
    border-radius: 3px;
    border: none;
}

.day-note-preview,
.note-area,
#privacyContent {
    scrollbar-width: thin;
    scrollbar-color: var(--ink-color) transparent;
}

.day.empty {
    background-color: transparent;
    cursor: default;
    opacity: 0.5;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* Increased z-index to be securely on top */
}

/* Specific fix for privacy modal to ensure it isn't overridden */
#privacyModal {
    display: none;
    /* Default hidden */
}

#privacyModal:not(.hidden) {
    display: flex !important;
    /* Force flex when shown */
}

#privacyModal .modal-content {
    max-width: 800px;
    /* Wider for text */
    max-height: 80vh;
    /* Prevent overflowing screen */
    text-align: left;
    /* Ensure text is readable */
}

.hidden {
    display: none;
}

.modal-content {
    background-color: var(--paper-color);
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    border-radius: 2px;
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

#modalDate {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line-color);
}



.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.color-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.1s;
}

.color-btn:hover {
    transform: scale(1.2);
}

.note-area {
    width: 100%;
    height: 150px;
    margin-bottom: 1rem;
    border: none;
    background: transparent;
    font-family: var(--handwriting-font);
    font-size: 1.5rem;
    resize: none;
    background-image: repeating-linear-gradient(transparent, transparent 31px, var(--line-color) 31px, var(--line-color) 32px);
    background-attachment: local;
    line-height: 32px;
    padding: 0 5px;
    outline: none;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
}

.action-btn {
    padding: 10px 20px;
    background-color: var(--ink-color);
    color: white;
    border: none;
    cursor: pointer;
    font-family: var(--header-font);
    font-size: 1rem;
}

.trash-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        height: auto;
        padding-bottom: 20px;
    }

    .controls-left,
    .controls-right {
        width: 100%;
        justify-content: center;
        flex-direction: column;
        /* Stack the groups */
        align-items: center;
        /* Center groups */
        gap: 5px;
    }

    .header-buttons-row {
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: nowrap;
        /* FORCE single line */
        gap: 3px;
        width: 100%;
    }

    .controls-left .import-btn {
        margin: 0;
        /* Reset desktop margin */
        font-size: 0.75rem;
        /* Still small but readable */
        padding: 4px 6px;
        flex: 0 1 auto;
        /* Allow shrink */
        white-space: nowrap;
        /* Prevent text wrap inside button */
        letter-spacing: -0.5px;
        /* Squeeze text slightly */
    }

    /* Target the theme selector wrapper */
    .controls-left>div:last-child {
        margin: 0;
        display: flex;
        align-items: center;
    }

    .controls-left {
        order: 2;
        /* Put controls below title if needed, or keep order */
    }

    .header-title {
        text-align: center;
        margin-bottom: 5px;
    }

    .title-row h1 {
        font-size: 1.5rem;
    }

    .title-row p {
        font-size: 0.75rem;
    }

    .calendar-book {
        width: 100%;
        height: 100vh;
        /* Full screen on mobile */
        border-radius: 0;
        padding: 1rem;
        overflow-y: auto;
        /* Allow scrolling the whole book */
    }

    .weekdays {
        display: none;
        /* Hide standard headers in list view */
    }

    .calendar-grid {
        display: flex;
        flex-direction: column;
        border: none;
        gap: 10px;
        /* Space between days */
        background-color: transparent;
    }

    .day {
        min-height: auto;
        border: 1px solid var(--line-color);
        border-radius: 4px;
        padding: 15px;
        overflow: visible;
        /* Allow content to dictate size */
    }

    /* Mobile: Stack header layout */
    .day-header {
        flex-direction: column-reverse;
        /* Note: Nameday is first in DOM. Column-reverse puts Date (2nd child) on TOP, Nameday (1st child) on BOTTOM. */
        align-items: flex-start;
        gap: 2px;
    }

    .day-number {
        font-size: 1.1rem;
        /* Slightly larger for readability */
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--line-color);
        padding-bottom: 2px;
        margin-bottom: 2px;
    }

    .nameday {
        font-size: 0.8rem;
        white-space: normal;
        /* Allow wrapping on mobile */
        overflow: visible;
        margin-top: 2px;
        padding-right: 0;
    }

    .day-name {
        display: inline;
        /* Ensure it stays with number */
        margin-left: 5px;
        text-transform: uppercase;
        font-size: 0.9rem;
    }

    .imported-event {
        font-size: 0.75rem;
        color: var(--imported-text);
        /* Google Blue-ish */
        background: var(--imported-bg);
        border-left: 2px solid var(--imported-text);
        padding: 2px 4px;
        margin-top: 2px;
        margin-bottom: 2px;
        border-radius: 2px;
        cursor: default;
        /* Read-only indication */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-family: var(--body-font);
    }

    /* Reset the absolute positioning for notes on mobile */
    .day-note-preview {
        position: static;
        /* Back to normal flow */
        max-height: none;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        /* Show all text */
        overflow: visible;
        margin-top: 5px;
        font-size: 1.1rem;
        /* Slightly larger for readability */
        pointer-events: auto;
        /* Allow text selection if needed, click still bubbles */
    }

    /* Hide empty days to clean up the list */
    .day.empty {
        display: none;
    }
}

/* Toast Notification (High Visibility) */
.toast {
    position: fixed;
    top: 20px;
    /* Top center */
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    /* Start slightly above */
    background-color: var(--paper-color);
    color: var(--ink-color);
    padding: 15px 30px;
    border-radius: 50px;
    /* Pill shape */
    font-family: var(--header-font);
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--ink-color);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease-out;
    z-index: 99999;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Version Display */
.version-display {
    position: fixed;
    bottom: 10px;
    right: 15px;
    font-size: 0.9rem;
    color: var(--ink-color);
    opacity: 0.5;
    font-family: var(--header-font);
    pointer-events: none;
    z-index: 1000;
}