.keep-page > h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
}
.keep-input-area { 
    margin-bottom: 24px; 
    background-color: var(--surface-container-high); 
    padding: 16px; 
    border-radius: var(--md-sys-shape-corner-l); 
    box-shadow: var(--md-sys-elevation-level1); 
}
.keep-input-area textarea { 
    width: 100%; 
    min-height: 80px; 
    resize: vertical;
    margin-bottom: 12px;
    font-size: 16px; 
    padding: 12px; /* Adjusted padding */
    background-color: var(--surface-bright); /* Brighter for input */
}
.keep-input-area textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary); /* Slightly larger focus ring */
}

.keep-color-tags { 
    margin-bottom: 16px; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
}
.keep-color-tags .color-tag { 
    width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    cursor: pointer; 
    border: 2px solid transparent; 
    box-shadow: var(--md-sys-elevation-level0); 
    transition: transform 0.1s ease-out, border-color 0.1s ease, box-shadow var(--md-sys-motion-duration-xs) ease; 
}
.keep-color-tags .color-tag:hover { 
    transform: scale(1.1); 
    box-shadow: var(--md-sys-elevation-level1);
}
.keep-color-tags .color-tag.selected { 
    border-color: var(--primary); 
    transform: scale(1.1); 
    box-shadow: var(--md-sys-elevation-level2); 
}
.keep-color-tags .color-tag:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

#notesGrid { 
    display: grid; 
    /* Masonry-like effect (CSS Subgrid or JS needed for true masonry) */
    /* Using simple grid for now */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
    gap: 16px; 
    flex-grow: 1; 
    padding-bottom: 16px; 
}
.note-card { 
    background-color: var(--surface-container); 
    padding: 16px; 
    border-radius: var(--md-sys-shape-corner-m); 
    box-shadow: var(--md-sys-elevation-level1); 
    word-wrap: break-word; 
    cursor: grab; 
    transition: box-shadow var(--md-sys-motion-duration-s) var(--md-sys-motion-easing-standard), 
                transform var(--md-sys-motion-duration-s) var(--md-sys-motion-easing-standard); 
    display:flex; 
    flex-direction: column;
    border: 1px solid var(--outline); /* Subtle border */
}
.note-card:hover { 
    box-shadow: var(--md-sys-elevation-level2); 
}
.note-card.dragging { 
    opacity: 0.7; 
    transform: scale(1.02) rotate(1deg); 
    box-shadow: var(--md-sys-elevation-level4); 
    cursor: grabbing;
}
.note-content { 
    flex-grow:1; 
    min-height: 50px; 
    white-space: pre-wrap; 
    color: var(--on-surface); 
    margin-bottom: 12px; 
    font-size: var(--md-sys-typescale-body-large-size);
    line-height: var(--md-sys-typescale-body-large-line-height);
}
/* Markdown content styling within note */
.note-content p:first-child { margin-top: 0; }
.note-content p:last-child { margin-bottom: 0; }
.note-content ul, .note-content ol { margin-left: 1.2em; padding-left: 0.5em; margin-bottom: 0.5em;}
.note-content li { margin-bottom: 0.2em;}
.note-content pre {
    background-color: var(--surface-container-lowest);
    padding: 8px;
    border-radius: var(--md-sys-shape-corner-xs);
    overflow-x: auto;
    font-size: 0.9em;
}
.note-content code {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--surface-container-low);
    padding: 0.1em 0.3em;
    border-radius: var(--md-sys-shape-corner-xs);
}
.note-content blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 10px;
    margin-left: 0;
    color: var(--on-surface-variant);
}

.note-actions { 
    margin-top: auto; 
    text-align: right; 
    padding-top: 8px;
}
.empty-state-message {
    grid-column: 1 / -1; /* Span all columns */
    text-align: center;
    color: var(--on-surface-variant);
    padding: 32px;
    font-size: var(--md-sys-typescale-title-large-size);
}
