.tab-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.35rem;
    filter: brightness(0.92) saturate(120%);
}

.notebook-header .nav-link.active .tab-icon {
    filter: brightness(0.4);
}

.btn-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0.6);
}

.note-item {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid var(--border-blue-soft);
    border-radius: 16px;
    padding: 0.95rem 1.1rem;
    position: relative;
    font-size: 1.15rem;
    color: var(--text-dark);
    line-height: 1.7;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, background-color 0.2s ease, padding 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}


/* Trash list inside Account or fullscreen modal */
.trash-list,
#trash-notes-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.note-item:not(:last-child)::after { content: none; }

.note-content {
    margin: 0;
    font-weight: normal;
}

.note-content {
    position: relative;
    padding-right: 0;
}

.note-selection-indicator {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(245, 140, 122, 0.08);
    color: var(--action-blue);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    pointer-events: none;
}

.note-selection-indicator i {
    font-size: 1.25rem;
}

.note-item--selection .note-selection-indicator {
    opacity: 1;
    transform: scale(1);
}

.note-item--selection .note-content {
    padding-left: 3.25rem;
}

.note-item:hover,
.note-item:focus-within {
    background: rgba(255, 255, 255, 0.24);
    border-color: var(--border-blue);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Selected state should override hover */
.note-item.note-item--selected,
.note-item.note-item--selected:hover,
.note-item.note-item--selected:focus-within {
    background: rgba(253, 215, 166, 0.24);
    border-color: var(--border-ai);
    box-shadow: 0 0 0 2px rgba(245, 140, 122, 0.28);
    transform: none;
}

.note-item--selected .note-selection-indicator {
    background-color: rgba(245, 140, 122, 0.18);
}

.note-pin-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.35rem;
    margin-left: 0.35rem;
    border-radius: 999px;
    background-color: rgba(245, 140, 122, 0.12);
    color: var(--action-blue);
    font-size: 0.9rem;
}

.note-pin-indicator i {
    font-size: 1rem;
}

.note-text {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    white-space: pre-line;
    line-height: 1.7;
    /* Limit to maximum 3 lines with overflow hidden */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: calc(1.7em * 3); /* 3 lines based on line-height */
}

.note-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.note-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-type-badge {
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 999px;
    background-color: rgba(245, 140, 122, 0.15);
    color: var(--action-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.note-label-badge {
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 999px;
    background-color: rgba(124, 107, 90, 0.15);
    color: #7c6b5a;
    text-transform: none;
    letter-spacing: 0.02em;
}

.note-status {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: #2e7d32;
    background-color: rgba(46, 125, 50, 0.12);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.note-list-items {
    margin: 0 0 0.5rem 0;
    padding: 0;
    list-style: none;
}

.note-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    transition: all 0.2s ease;
}

.note-list-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
    padding: 2px 4px;
    margin: 0 -4px 0.35rem -4px;
}

/* Compact layout for list items in main notes view - show only first 2 items */
.note-content .note-list-items {
    overflow: hidden;
}

/* Hide all list items after the second one */
.note-content .note-list-items .note-list-item:nth-child(n+3) {
    display: none;
}

.note-content .note-list-item {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.note-content .note-list-marker {
    width: 1rem;
    height: 1rem;
    font-size: 0.7rem;
}

.note-content .note-line-text {
    font-size: 0.9rem;
    line-height: 1.3;
}

.note-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.5rem;
}

.note-line-header {
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.note-header-right {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.note-line-body {
    justify-content: flex-start;
    margin-bottom: 0.25rem;
}

.note-line-body .note-list-marker {
    flex: 0 0 auto;
}

.note-line-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-line-meta {
    justify-content: space-between;
    margin-top: 0.35rem;
}

.trash-note-card,
.lock-note-card {
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1rem;
    box-shadow: 0 12px 26px rgba(61, 45, 23, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trash-note-card .note-line-meta,
.lock-note-card .note-line-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.trash-note-card:hover,
.lock-note-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(61, 45, 23, 0.16);
}

.trash-note-card:focus-visible,
.lock-note-card:focus-visible {
    outline: 3px solid rgba(245, 140, 122, 0.45);
    outline-offset: 4px;
    box-shadow: 0 0 0 2px rgba(245, 140, 122, 0.2);
}

.trash-note-preamble,
.lock-note-preamble {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.trash-note-actions,
.lock-note-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 0.75rem;
}

.trash-note-action-btn,
.lock-note-action-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--action-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

.trash-note-action-btn:hover,
.trash-note-action-btn:focus-visible,
.lock-note-action-btn:hover,
.lock-note-action-btn:focus-visible {
    text-decoration: underline;
}

.trash-note-action-btn-danger,
.lock-note-action-btn-danger {
    color: #c62828;
}

.note-line-right {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.note-list-item.completed .note-list-text {
    text-decoration: line-through;
    color: var(--text-gray);
}

/* Apply same completed style for inputs inside modal rows */
.note-list-item-row.completed .note-list-item-input {
    text-decoration: line-through;
    color: var(--text-gray);
}

.note-list-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    font-size: 0.75rem;
    background-color: rgba(0, 0, 0, 0.08);
    color: var(--text-dark);
    flex: 0 0 auto;
}

.note-list-item.completed .note-list-marker {
    background-color: rgba(46, 125, 50, 0.18);
    color: #2e7d32;
}

/* Mirror marker completed style for modal rows */
.note-list-item-row.completed .note-list-marker {
    background-color: rgba(46, 125, 50, 0.18);
    color: #2e7d32;
}

/* Completed style when marker itself carries state (Notes list first item) */
.note-list-marker.completed {
    background-color: rgba(46, 125, 50, 0.18);
    color: #2e7d32;
}

/* Enhanced completed state styling for main display */
.note-list-item.completed .note-line-text {
    text-decoration: line-through;
    color: var(--text-gray);
    opacity: 0.7;
}

.note-list-text {
    flex: 1;
    color: var(--text-dark);
}

.note-list-reminder {
    font-size: 0.75rem;
    color: var(--btn-ink);
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed var(--border-blue);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    margin-left: 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.note-empty {
    color: var(--text-gray);
    font-style: italic;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.note-timestamp,
.note-duration {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.note-reminder {
    font-size: 0.85rem;
    color: var(--btn-ink);
    background: rgba(255, 236, 186, 0.8);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Specific styling for list item reminders */
.note-reminder-item {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
}

/* Mobile touch scrolling fixes */
html, body {
    margin: 0;
    padding: 0;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    height: 100%;
    overflow: hidden;
}

.tab-content {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.tab-pane {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* Primary scrollable content areas */
#notes-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    height: auto;
    max-height: calc(100vh - 150px);
    scrollbar-width: none;
    padding-bottom: 7rem;
    scroll-padding-bottom: 6rem;
}

#calendar-days {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    height: auto;
    max-height: calc(100vh - 200px);
    scrollbar-width: none;

}

.account-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    height: auto;
    max-height: calc(100vh - 150px);
    scrollbar-width: none;
}

.notes-area {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-top:1rem;
}

.account-area, .calendar-area {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Additional mobile scrolling fixes */
.notes-list, .account-scroll, .calendar-scroll {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Ensure modal content can scroll */
.modal-body, .modal-content {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Fix for any remaining overflow restrictions */
.tab-pane.active {
    overflow: visible !important;
    height: auto !important;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Allow body to scroll naturally on mobile */
    body {
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: manipulation !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    /* Remove height restrictions on mobile - let content determine height */
    .notebook-container {
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        overflow: hidden;
        -webkit-overflow-scrolling: touch !important;
        touch-action: manipulation !important;
    }
    
    /* Make content areas scrollable with proper touch handling */
    .notebook-content {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        /*height: auto !important;*/
        /*min-height: calc(100vh - 100px) !important;*/
        flex: none !important;
        position: relative !important;
    }
    
    /* Ensure tab content can scroll */
    .tab-content {
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        height: auto !important;
    }
    
    /* Tab panes should allow content to flow naturally */
    .tab-pane {
        overflow: auto !important;
        height: auto !important;
        min-height: calc(100vh - 150px) !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Specific scrollable elements - MOST IMPORTANT */
    #notes-list {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        overscroll-behavior: contain !important;
        height: auto !important;
        max-height: calc(100vh - 150px) !important;
        min-height: 200px !important;
        padding-bottom: calc(7rem + env(safe-area-inset-bottom)) !important;
        scroll-padding-bottom: calc(6rem + env(safe-area-inset-bottom)) !important;
    
    }
    
    #calendar-days {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        overscroll-behavior: contain !important;
        height: auto !important;
        max-height: calc(100vh - 200px) !important;
        min-height: 300px !important;
    }
    
    .account-scroll {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        overscroll-behavior: contain !important;
        height: auto !important;
        max-height: calc(100vh - 150px) !important;
        min-height: 400px !important;
    }
    
    /* Parent containers should not restrict these elements */
    .notes-area {
        overflow: visible !important;
        height: auto !important;
        touch-action: pan-y !important;
    }
    
    .account-area {
        overflow: visible !important;
        height: auto !important;
        touch-action: pan-y !important;
    }
    
    .calendar-area {
        overflow: visible !important;
        height: auto !important;
        touch-action: pan-y !important;
    }
}

/* Clickable reminder displays */
.note-reminder-clickable {
    transition: all 0.2s ease;
}

.note-reminder-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

.note-reminder i,
.note-list-reminder i {
    font-size: 0.85rem;
    color: rgba(245, 140, 122, 0.85);
}

.note-reminder .note-reminder-text {
    margin-left: 0.35rem;
    display: inline-block;
}

.note-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    position: absolute;
    top: 0.25rem;
    right: 0;
    pointer-events: none;
}

.note-item:hover .note-actions,
.note-item:focus-within .note-actions {
    opacity: 1;
    pointer-events: auto;
}

.note-actions button {
    background: rgba(255, 255, 255, 0.6);
    border: none;
    color: var(--text-gray);
    font-size: 0.9rem;
    padding: 0.35rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.note-actions .btn-edit:hover {
    background: linear-gradient(140deg, var(--btn-peach) 0%, var(--btn-lavender-soft) 100%);
    color: #ffffff;
}

.note-actions .btn-play:hover {
    background: linear-gradient(140deg, rgba(253, 215, 166, 0.95) 0%, var(--btn-peach) 100%);
    color: var(--btn-ink);
}

.note-actions .btn-delete:hover {
    background-color: var(--accent-red);
    color: #ffffff;
}

.note-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.note-progress-track {
    flex: 1 1 auto;
    height: 6px;
    background: rgba(245, 140, 122, 0.16);
    border-radius: 999px;
    overflow: hidden;
}

.note-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--action-blue-soft) 0%, var(--action-blue) 100%);
    border-radius: inherit;
}

.note-progress-count {
    flex: 0 0 auto;
    font-size: 0.85rem;
    color: var(--text-gray);
    white-space: nowrap;
}

.fab-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--btn-peach-soft) 0%, var(--btn-peach) 45%, var(--btn-lavender-soft) 100%);
    color: var(--btn-ink);
    border: 1px solid var(--border-ai);
    box-shadow: 0 16px 28px rgba(245, 140, 122, 0.28), inset 0 -6px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto;
}

.fab-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 36px rgba(245, 140, 122, 0.36), inset 0 -6px 0 rgba(0, 0, 0, 0.2);
}

.fab-button.recording {
    background: linear-gradient(140deg, #ffb3b3 0%, #ff7a7d 50%, #d26cbb 100%);
    color: #fff;
    border-color: rgba(243, 106, 109, 0.55);
    box-shadow: 0 18px 32px rgba(243, 106, 109, 0.38), inset 0 -6px 0 rgba(0, 0, 0, 0.2);
}

.fab-icon {
    width: 26px;
    height: 26px;
    filter: brightness(10);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
}

.search-bar.listening {
    /* Removed red listening effects */
}

.search-mic-btn,
.filter-btn {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.18) 100%);
    border: 2px solid var(--border-ai);
    padding: 0.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.search-clear-btn {
    background: transparent;
    border: 2px solid transparent;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.search-mic-btn:hover,
.search-mic-btn:focus-visible,
.search-clear-btn:hover,
.search-clear-btn:focus-visible,
.filter-btn:hover,
.filter-btn:focus-visible {
    background: linear-gradient(140deg, var(--btn-peach-soft) 0%, var(--btn-lavender-soft) 100%);
    border-color: var(--border-ai);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(245, 140, 122, 0.22);
    outline: none;
}

/* Selected styles removed - buttons now share the warm border */

.keyboard-icon,
.mic-icon,
.filter-icon {
    width: 26px;
    height: 26px;
    filter: brightness(0) saturate(100%) invert(70%) sepia(54%) saturate(520%) hue-rotate(325deg) brightness(101%) contrast(95%);
    transition: filter 0.2s ease;
}

.search-mic-btn:hover .mic-icon,
.search-mic-btn:focus-visible .mic-icon,
.search-clear-btn:hover i,
.search-clear-btn:focus-visible i,
.filter-btn:hover .filter-icon,
.filter-btn:focus-visible .filter-icon {
    filter: brightness(0) saturate(100%) invert(60%) sepia(41%) saturate(480%) hue-rotate(330deg) brightness(99%) contrast(100%);
}

.snote-filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.72rem;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    font-family: 'Patrick Hand', cursive;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.search-input:focus {
    outline: none;
    box-shadow: none;
}

.search-input::placeholder {
    color: var(--text-gray);
}

.search-mic-btn.listening {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(240, 88, 82, 0.25);
    animation: mic-pulse 1.5s ease-in-out infinite;
}

.search-mic-btn.listening .mic-icon {
    filter: brightness(10);
}

@keyframes mic-pulse {
    0% {
        box-shadow: 0 0 0 3px rgba(240, 88, 82, 0.25);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(240, 88, 82, 0.12);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(240, 88, 82, 0.25);
    }
}

@keyframes listening-bar {
    0% {
        box-shadow: 0 6px 0 rgba(240, 88, 82, 0.2);
    }
    50% {
        box-shadow: 0 6px 0 rgba(240, 88, 82, 0.45);
    }
    100% {
        box-shadow: 0 6px 0 rgba(240, 88, 82, 0.2);
    }
}

/* Search clear button specific styles */
.search-clear-btn {
    color: rgba(0, 0, 0, 0.5);
    font-size: 1rem;
    width: 40px;
    height: 40px;
    padding: 0.4rem;
    margin-right: 0.25rem;
}

.search-clear-btn:hover,
.search-clear-btn:focus-visible {
    background-color: rgba(220, 53, 69, 0.15) !important;
    color: #dc3545 !important;
    transform: translateY(-1px);
}

.search-clear-btn i {
    font-size: 0.9rem;
}

/* Hide clear button when search input is empty */
.search-clear-btn.hidden {
    display: none !important;
}

.brand-name {
    font-size: 2.35rem;
    font-weight: bold;
    color: var(--text-dark);
    margin: 0;
    line-height: 1;
    letter-spacing: 0.05em;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.brand-underline {
    width: 74px;
    height: 4px;
    background-color: var(--accent-red);
    margin: 0.35rem auto 0;
    border-radius: 999px;
}



.modal-content {
    background-color: var(--paper-yellow);
    font-family: 'Patrick Hand', cursive;
    border: none;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    margin: auto;
}

.modal-header {
    border-bottom: 2px solid var(--line-blue);
    background: var(--notebook-brown);
    color: #ffffff;
    border-radius: 20px 20px 0 0;
}


.note-entry-modal {
    background-color: transparent;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
}

.modal-fullscreen .note-entry-modal {
    padding: 0;
    height: 100%;
}

.note-entry-surface {
    width: 100%;
    height: 100%;
    min-height: 60vh;
    margin: 0;
    background-color: var(--paper-yellow);
    background-image: linear-gradient(
        to bottom,
        transparent 0,
        transparent 29px,
        var(--line-blue) 29px,
        var(--line-blue) 30px
    );
    background-size: 100% 30px;
    background-repeat: repeat;
    background-attachment: local;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

/* Ensure fullscreen dialog body stretches to the bottom */
.modal-dialog.modal-fullscreen .note-entry-surface {
    min-height: 100vh;
}

.note-entry-header {
    border-bottom: 2px solid var(--line-blue);
    border-radius: 24px 24px 0 0;
}

/* SNote entry header layout */
.snote-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.snote-header-left,
.snote-header-center,
.snote-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.snote-header-left {
    justify-content: flex-start;
    flex: 0 0 auto;
}

.snote-header-center {
    justify-content: center;
    flex: 1 1 auto;
    position: relative;
}

.snote-header-right {
    justify-content: flex-end;
    flex: 0 0 auto;
}

.note-entry-surface.snote-ai-review-active .snote-header-left,
.note-entry-surface.snote-ai-review-active .snote-header-center {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.snote-label-stack {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.snote-icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.snote-icon-btn:hover,
.snote-icon-btn:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.snote-icon-btn i {
    font-size: 1.25rem;
}

.snote-save-btn {
    border: none;
    border-radius: 999px;
    padding: 0.45rem 1.15rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.1;
    color: var(--btn-ink);
    background: linear-gradient(140deg, var(--btn-peach-soft) 0%, var(--btn-peach) 45%, var(--btn-lavender-soft) 100%);
    box-shadow: 0 8px 18px rgba(245, 140, 122, 0.22);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.snote-save-btn:hover,
.snote-save-btn:focus-visible {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(245, 140, 122, 0.28);
    outline: none;
    color: var(--btn-ink);
}

.snote-save-btn:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px rgba(245, 140, 122, 0.24);
}

.snote-label-select {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.snote-label-select:focus {
    outline: none;
}

/* Label chips group */
.snote-label-chips {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-blue);
    padding: 0.3rem 0;
    border-radius: 16px;
    box-shadow: 0 18px 32px rgba(245, 140, 122, 0.22);
    z-index: 20;
    min-width: 240px;
    max-width: min(320px, calc(100vw - 32px));
    max-height: 220px;
    overflow-y: auto;
}

#snote-label-chips-quick,
#snote-label-chips-list {
    background: rgba(255, 255, 255, 0.16);
}

.snote-label-chips.open { display: flex; }

.snote-label-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 0;
    border: none;
    font-family: 'Patrick Hand', cursive;
    font-size: 1.05rem;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    background: transparent;
    color: var(--label-chip-color, var(--text-dark));
    width: 100%;
    text-align: center;
}

.snote-label-chip:hover,
.snote-label-chip:focus-visible {
    background: rgba(247, 177, 122, 0.12);
    outline: none;
}

/* Selected state should override hover */
.snote-label-chip.selected,
.snote-label-chip.selected:hover,
.snote-label-chip.selected:focus-visible {
    background: transparent;
    color: var(--label-chip-color, var(--text-dark));
}

.snote-label-text {
    flex: 1 1 auto;
    display: block;
    text-align: center;
    font-weight: 600;
}

.snote-label-check {
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
    color: inherit;
}

.snote-label-chip.selected .snote-label-check {
    opacity: 1;
}

/* HSV Color Picker Styles */
.hsv-color-picker {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.hsv-main-area {
    width: 280px;
    height: 200px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: crosshair;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hsv-saturation-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #ffffff, transparent);
    position: relative;
}

.hsv-lightness-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #000000);
    position: relative;
}

.hsv-selector-circle {
    width: 16px;
    height: 16px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.hsv-hue-slider-container {
    width: 280px;
    height: 24px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hsv-hue-slider {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
        #ff0000 0%, 
        #ffff00 16.66%, 
        #00ff00 33.33%, 
        #00ffff 50%, 
        #0000ff 66.66%, 
        #ff00ff 83.33%, 
        #ff0000 100%
    );
    position: relative;
    cursor: pointer;
}

.hsv-hue-handle {
    width: 20px;
    height: 28px;
    background: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.hsv-color-preview-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hsv-color-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #ff0000;
}

.hsv-color-values {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hsv-hex-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 80px;
    text-align: center;
}

.hsv-sliders-values {
    font-size: 13px;
    color: #666;
}

/* HSV Color Picker Responsive */
@media (max-width: 576px) {
    .hsv-main-area,
    .hsv-hue-slider-container {
        width: 240px;
    }
    
    .hsv-main-area {
        height: 160px;
    }
    
    .hsv-color-preview-section {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Trigger pill to open dropdown */
.snote-label-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--action-blue);
    font-size: 1.05rem;
    color: var(--label-trigger-text, var(--text-dark));
    width: 100%;
    background: transparent;
    cursor: pointer;
    user-select: none;
    min-height: 44px;
    font-family: 'Patrick Hand', cursive;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.snote-label-trigger-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
    flex: 1 1 auto;
}

.snote-label-trigger-content i {
    font-size: 1rem;
    color: currentColor;
}

.snote-label-trigger-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    font-weight: 600;
    width: 100%;
    text-align: center;
}

.snote-label-trigger-caret {
    font-size: 0.95rem;
    color: currentColor;
    flex: 0 0 auto;
}

.snote-label-trigger:hover,
.snote-label-trigger:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--btn-peach);
    box-shadow: 0 10px 18px rgba(245, 140, 122, 0.16);
    outline: none;
}

.snote-label-trigger:active {
    transform: translateY(1px);
}

.snote-label-trigger-pill {
    max-width: clamp(160px, 40vw, 228px);
}

.snote-label-trigger-pill .snote-label-trigger-text {
    max-width: 100%;
}

.note-entry-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    position: relative;
    background-color: transparent;
}

.note-entry-body > * {
    position: relative;
    z-index: 1;
}

.snote-bottom-area {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
}

.snote-bottom-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.snote-bottom-row--controls {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    justify-items: center;
    gap: 0.75rem;
}

.snote-add-item-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0 auto;
}

.snote-bottom-label-stack {
    flex: 1 1 200px;
    justify-content: center;
}

.snote-bottom-row--controls .snote-label-stack {
    width: 100%;
}

.snote-bottom-btn {
    padding: 0.45rem 1.15rem;
    border-radius: 999px;
    border: 1px solid var(--border-blue);
    background: transparent;
    color: var(--btn-ink);
    font-weight: 600;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.snote-bottom-btn:hover,
.snote-bottom-btn:focus-visible {
    border-color: var(--border-ai);
    outline: none;
}

.snote-bottom-btn:active {
    border-color: var(--border-ai);
}

.snote-bottom-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.snote-bottom-btn--secondary {
    border-color: var(--action-blue);
}

.snote-bottom-btn--accent {
    border-color: var(--action-blue);
    color: var(--btn-ink);
}

.snote-bottom-btn--accent:hover,
.snote-bottom-btn--accent:focus-visible {
    border-color: var(--btn-peach);
    color: var(--btn-ink);
}

.snote-ai-review-controls {
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
}

.snote-ai-review-controls .snote-bottom-btn {
    padding: 0.4rem 1rem;
}

.snote-ai-review-toggle {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 180px;
}

.snote-bottom-label-stack .snote-label-trigger {
    width: 100%;
    max-width: 240px;
}

.note-entry-surface.snote-ai-review-active .snote-bottom-row--controls {
    display: none;
}

.snote-circle-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-blue);
    background: transparent;
    color: var(--btn-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.snote-circle-btn:hover,
.snote-circle-btn:focus-visible {
    border-color: var(--border-ai);
    background: rgba(245, 140, 122, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.snote-circle-btn:active {
    transform: translateY(1px);
}

.snote-circle-btn i {
    font-size: 1.1rem;
    pointer-events: none;
}

.snote-circle-btn--accent {
    border-color: var(--action-blue);
}

.snote-circle-btn--accent:hover,
.snote-circle-btn--accent:focus-visible {
    border-color: var(--btn-peach);
    background: rgba(247, 177, 122, 0.16);
}

@media (max-width: 720px) {
    .snote-bottom-row--controls {
        grid-template-columns: auto 1fr auto;
    }
}

.note-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.note-title-row .snote-input-title {
    flex: 1;
}

.note-reminder-control {
    display: inline-flex;
    align-items: center;
    position: relative;
    min-width: 0;
    gap: 0.15rem;
    flex-shrink: 0;
}

.note-reminder-summary,
.note-item-reminder-display {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    font-size: 0.78rem;
    color: var(--btn-ink);
    background: rgba(255, 236, 186, 0.95);
    border: 1px solid var(--border-blue-soft);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    white-space: nowrap;
    min-width: 0;
    min-height: 28px;
    line-height: 1.05;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(245, 140, 122, 0.22);
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.note-reminder-summary:active,
.note-item-reminder-display:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(245, 140, 122, 0.18);
}

.note-reminder-summary[hidden],
.note-item-reminder-display[hidden] {
    display: none !important;
}

.note-reminder-summary:hover,
.note-reminder-summary:focus-visible,
.note-item-reminder-display:hover,
.note-item-reminder-display:focus-visible {
    background: rgba(255, 236, 186, 1);
    box-shadow: 0 6px 16px rgba(245, 140, 122, 0.22);
    transform: translateY(-1px);
    outline: none;
}

.note-item-reminder-display {
    flex: 0 0 auto;
}

.note-reminder-date,
.note-reminder-time,
.note-item-reminder-date,
.note-item-reminder-time {
    display: block;
    line-height: 1.1;
}

.note-reminder-trigger {
    background: rgba(255, 255, 255, 0.0);
    border: 1px solid var(--accent-red);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--btn-ink);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.note-reminder-trigger.has-reminder {
    background: rgba(255, 236, 186, 0.95);
    box-shadow: 0 6px 12px rgba(245, 140, 122, 0.18);
}

.note-reminder-trigger:hover,
.note-reminder-trigger:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(245, 140, 122, 0.2);
}

.note-reminder-trigger i {
    font-size: 1.0rem;
}

/* Input group with inline action buttons */
.note-input-group {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.note-input-group .snote-input {
    flex: 1;
    min-width: 0;
}

.note-input-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    padding-top: 0.15rem;
}

/* Content input actions should be at bottom */
#quick-note-content ~ .note-input-actions {
    align-self: flex-end;
    padding-top: 0;
    padding-bottom: 0.15rem;
}

/* Ensure all buttons in input actions have uniform size */
.note-input-actions .snote-voice-toggle,
.note-input-actions .note-reminder-trigger,
.note-input-actions .snote-action-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

.note-input-actions .snote-voice-toggle i,
.note-input-actions .note-reminder-trigger i,
.note-input-actions .snote-action-btn i {
    font-size: 1.0rem !important;
}

#quickNoteModal.ai-review-mode .note-input-actions,
#listNoteModal.ai-review-mode .note-input-actions {
    display: none;
}

#quickNoteModal.ai-review-mode.ai-view-ai .note-input-actions,
#listNoteModal.ai-review-mode.ai-view-ai .note-input-actions {
    display: flex;
}

#quickNoteModal.ai-review-mode.ai-view-ai .note-input-actions .snote-voice-toggle,
#listNoteModal.ai-review-mode.ai-view-ai .note-input-actions .snote-voice-toggle {
    display: none !important;
}

#quickNoteModal.ai-review-mode.ai-view-ai .note-input-actions .note-reminder-control,
#listNoteModal.ai-review-mode.ai-view-ai .note-input-actions .note-reminder-control {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

#quickNoteModal.ai-review-mode.ai-view-ai .note-input-actions .note-reminder-control .note-reminder-trigger,
#listNoteModal.ai-review-mode.ai-view-ai .note-input-actions .note-reminder-control .note-reminder-trigger {
    display: none !important;
}

.note-input-actions .note-reminder-trigger-preview {
    display: none;
}

#quickNoteModal.ai-review-mode.ai-view-ai .note-input-actions .note-reminder-trigger-preview,
#listNoteModal.ai-review-mode.ai-view-ai .note-input-actions .note-reminder-trigger-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Voice toggle button inline with input */
.snote-voice-toggle {
    background: rgba(255, 255, 255, 0.0);
    border: 1px solid var(--accent-red);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--btn-ink);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.snote-voice-toggle:hover,
.snote-voice-toggle:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(245, 140, 122, 0.2);
}

.snote-voice-toggle i {
    font-size: 1.0rem;
}

/* Voice toggle active/recording state */
.snote-voice-toggle.is-recording {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(240, 88, 82, 0.25);
    animation: voice-toggle-pulse 1.5s ease-in-out infinite;
}

@keyframes voice-toggle-pulse {
    0% {
        box-shadow: 0 0 0 3px rgba(240, 88, 82, 0.25);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(240, 88, 82, 0.12);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(240, 88, 82, 0.25);
    }
}

/* Action button (clear/remove) - minimal style, no border */
.snote-action-btn {
    background: rgba(0, 0, 0, 0.12);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    opacity: 1;
    transition: transform 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.snote-action-btn:hover,
.snote-action-btn:focus-visible,
.snote-action-btn:active {
    transform: scale(1.05);
}

.snote-action-btn i {
    font-size: 1.0rem;
}

.note-list-item-row .snote-action-btn {
    background: rgba(0, 0, 0, 0.12);
    color: var(--text-gray);
}

.note-list-item-row .snote-action-btn.will-remove {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    opacity: 1;
}

.note-list-item-row .snote-action-btn.will-remove:hover,
.note-list-item-row .snote-action-btn.will-remove:focus-visible,
.note-list-item-row .snote-action-btn.will-remove:active {
    background: rgba(220, 53, 69, 0.25);
    color: #c82333;
    transform: scale(1.05);
}

.note-list-item-row .snote-action-btn.clear-feedback {
    background: rgba(220, 53, 69, 0.22);
    color: #c82333;
    opacity: 1;
}

.note-list-item-row .snote-action-btn.will-remove.clear-feedback {
    background: rgba(220, 53, 69, 0.3);
    color: #c82333;
}

.note-entry-body-quick,
.note-entry-body-list {
    background-color: transparent;
}

/* Transparent inputs on lined paper */
.snote-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-family: 'Patrick Hand', cursive;
    resize: none;
}

.snote-no-touch-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.snote-no-touch-select::selection {
    background: transparent;
}

.snote-no-touch-select::-moz-selection {
    background: transparent;
}

.snote-input:focus {
    outline: none;
    box-shadow: none;
}

.snote-input::placeholder {
    color: var(--text-gray);
}

.snote-input[contenteditable="true"],
.note-list-item-input[contenteditable="true"] {
    outline: none;
    min-height: 1.5rem;
    cursor: text;
}

.snote-input[contenteditable="true"][data-placeholder]:empty::before,
.note-list-item-input[contenteditable="true"][data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: var(--text-gray);
    pointer-events: none;
    opacity: 0.65;
}

.snote-input-title {
    font-size: 1.35rem;
    font-weight: 600;
    padding: 0.25rem 0.1rem;
}

.snote-input-content {
    font-size: 1.1rem;
    line-height: 1.7;
    padding: 0.25rem 0.1rem;
    resize: none;
}

.snote-input-title,
.snote-input-content,
.note-list-item-input {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow: hidden; /* hide textarea scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge legacy */
}

.snote-input-title::-webkit-scrollbar,
.snote-input-content::-webkit-scrollbar,
.note-list-item-input::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

@media (max-width: 767px) {
    .note-entry-surface {
        border-radius: 16px;
    }

    .note-entry-header {
        border-radius: 16px 16px 0 0;
    }
}

.modal-subtitle {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
}

.note-type-body {
    position: relative;
    background-image: linear-gradient(
        to bottom,
        transparent 0,
        transparent 29px,
        var(--line-blue) 29px,
        var(--line-blue) 30px
    );
    background-size: 100% 30px;
    background-repeat: repeat;
    background-attachment: local;
    border-radius: 0 0 20px 20px;
}

.note-type-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .note-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.note-type-card {
    border: 2px solid rgba(245, 140, 122, 0.25);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    background-color: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}

.note-type-card:hover,
.note-type-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--action-blue);
    box-shadow: 0 12px 24px rgba(245, 140, 122, 0.2);
}

.note-type-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(245, 140, 122, 0.25), 0 12px 24px rgba(245, 140, 122, 0.2);
}

.note-type-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.note-type-icon {
    font-size: 2rem;
    color: var(--action-blue);
}

.note-type-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.note-type-description {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.snote-filter-modal .modal-body {
    padding: 1.75rem 2rem;
}

.snote-filter-modal .modal-footer {
    border-top: 1px solid var(--border-blue);
}

.snote-filter-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--btn-ink);
}

.snote-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.snote-filter-group:last-of-type {
    margin-bottom: 0;
}

.snote-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.snote-filter-choice {
    position: relative;
    display: inline-flex;
}

.snote-filter-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.snote-filter-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-blue-soft);
    background: rgba(245, 140, 122, 0.08);
    color: var(--btn-ink);
    font-size: 0.95rem;
    min-width: 72px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.snote-filter-choice:hover .snote-filter-label,
.snote-filter-choice:focus-within .snote-filter-label {
    transform: translateY(-1px);
    border-color: var(--border-blue);
    box-shadow: 0 6px 12px rgba(245, 140, 122, 0.18);
}

.snote-filter-input:checked + .snote-filter-label {
    background: linear-gradient(140deg, var(--btn-peach-soft) 0%, var(--btn-lavender-soft) 100%);
    border-color: var(--border-ai);
    box-shadow: 0 6px 12px rgba(245, 140, 122, 0.22);
    color: var(--btn-ink);
}

.snote-filter-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.snote-filter-footer .btn-primary {
    background: linear-gradient(180deg, var(--btn-peach) 0%, var(--btn-lavender-soft) 100%);
    border-color: var(--border-ai);
    box-shadow: 0 6px 12px rgba(245, 140, 122, 0.3);
}

.snote-filter-footer .btn-primary:hover,
.snote-filter-footer .btn-primary:focus-visible {
    background: linear-gradient(180deg, var(--btn-peach-soft) 0%, var(--btn-lavender) 100%);
}

.input-mode-toggle {
    display: inline-flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.input-mode-toggle .btn {
    border-width: 2px;
}

.input-mode-toggle .btn.active,
.input-mode-toggle .btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(245, 140, 122, 0.2);
}

.mode-hint {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.mode-action-btn {
    margin-bottom: 1rem;
    border-width: 2px;
}

.mode-action-btn i {
    font-size: 1rem;
}

.note-list-items-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Bottom bar dynamic areas */
#snote-add-item-bar,
#quick-ai-bar {
    width: 100%;
    display: flex;
    justify-content: center;
}

#list-note-add-item {
    scroll-margin-bottom: 96px;
    scroll-margin-bottom: calc(96px + env(safe-area-inset-bottom));
}

#snote-add-item-bar .snote-btn-magic,
#snote-add-item-bar .snote-btn-add,
#quick-ai-bar .snote-btn-magic,
#quick-ai-bar .snote-btn-add {
    white-space: nowrap;
    flex: 0 0 auto;
    justify-content: center;
}

#quickNoteModal.ai-review-mode #quick-note-newline {
    display: none !important;
}

.snote-btn-add {
    color: var(--btn-ink);
    border: 1px dashed var(--border-ai);
    background: linear-gradient(180deg, var(--btn-paper) 0%, #ffe0a2 100%);
    box-shadow: 0 4px 0 var(--btn-paper-shadow);
    border-radius: 12px;
    padding: 0.4rem 0.85rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.snote-btn-add:hover,
.snote-btn-add:focus-visible {
    background: linear-gradient(180deg, #fff1c7 0%, #ffe6b2 100%);
    border-color: var(--border-ai);
    transform: translateY(-1px);
    box-shadow: 0 6px 0 rgba(61, 45, 23, 0.12);
}

.snote-btn-add:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 rgba(61, 45, 23, 0.12);
}

.snote-btn-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: 0 2px 0 rgba(61, 45, 23, 0.08);
}

/* Mode slider switch in modal headers */
.snote-mode-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 78px;
    height: 34px;
    padding: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--border-blue);
}

.snote-mode-option {
    flex: 1;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    z-index: 2;
    cursor: pointer;
    border-radius: 999px;
    position: relative; /* enable pseudo-element glow */
}

.snote-mode-option i {
    font-size: 1.05rem;
    display: inline-block; /* allow transform */
    will-change: transform;
}

.snote-mode-option.active {
    color: #fff;
}

/* Listening effect for mic icon in modal header */
.snote-mode-option[data-mode="voice"].listening i {
    color: var(--accent-red);
    animation: snote-mic-glow 1.4s ease-in-out infinite;
    z-index: 1;
}

.snote-mode-option[data-mode="voice"].listening::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(240, 88, 82, 0.75), rgba(240, 88, 82, 0.0));
    filter: blur(6px);
    animation: snote-mic-aura 1.4s ease-in-out infinite;
    z-index: 0;
}

@keyframes snote-mic-glow {
    0% {
        text-shadow: 0 0 0 rgba(240, 88, 82, 0.0), 0 0 0 rgba(240, 88, 82, 0.0);
    }
    50% {
        text-shadow: 0 0 8px rgba(240, 88, 82, 0.9), 0 0 16px rgba(240, 88, 82, 0.45);
    }
    100% {
        text-shadow: 0 0 0 rgba(240, 88, 82, 0.0), 0 0 0 rgba(240, 88, 82, 0.0);
    }
}

@keyframes snote-mic-aura {
    0%   { transform: scale(0.9); opacity: 0.4; }
    50%  { transform: scale(1.1); opacity: 0.9; }
    100% { transform: scale(0.9); opacity: 0.4; }
}

.snote-mode-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    bottom: 2px;
    width: calc(50% - 2px);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease;
    z-index: 1;
}

/* Move thumb to the right when voice is active */
.snote-mode-switch .snote-mode-option[data-mode="voice"].active ~ .snote-mode-thumb {
    transform: translateX(100%);
}

/* Subtle hover feedback */
.snote-mode-option:hover,
.snote-mode-option:focus-visible {
    color: #fff;
    outline: none;
}

.note-list-item-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
    width: 100%;
}

.note-list-item-check {
    width: 18px;
    height: 18px;
    accent-color: var(--action-blue);
}

.note-list-item-input {
    flex: 1 1 auto;
    background: transparent;
    border: none;
    padding: 0.35rem 0.1rem;
    font-family: 'Patrick Hand', cursive;
    font-size: 1.05rem;
    color: var(--text-dark);
    min-width: 0;
    resize: none;
}

.note-list-item-input:focus {
    outline: none;
    box-shadow: none;
}

/* Note: .note-list-item-remove removed - now using unified .snote-action-btn */

/* Note: Old .note-item-reminder-trigger removed - now using unified .note-reminder-trigger */
/* Note: Old .note-list-item-remove removed - now using unified .snote-action-btn */

/* All buttons in list item rows have uniform 32x32px size */
.note-list-item-row .snote-voice-toggle,
.note-list-item-row .note-reminder-trigger,
.note-list-item-row .snote-action-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

.note-list-item-row .note-input-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    flex-shrink: 0;
    padding-top: 0;
}

.note-list-item-row .snote-voice-toggle {
    margin-left: auto;
}

.note-list-item-row .snote-voice-toggle i,
.note-list-item-row .note-reminder-trigger i,
.note-list-item-row .snote-action-btn i {
    font-size: 1.0rem;
}

.note-list-item-row.voice-interim .note-list-item-input {
    opacity: 0.8;
}

.recording-hint {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.trash-modal-meta,
.lock-modal-meta {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-right: auto;
}

.trash-modal-actions,
.lock-modal-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.trash-modal-actions .btn-link,
.lock-modal-actions .btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--action-blue);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
}

.snote-trash-list-modal-wrap .modal-dialog,
.snote-lock-list-modal-wrap .modal-dialog {
    margin: 1.5rem auto;
}

.snote-trash-list-modal,
.snote-lock-list-modal {
    background: #fff8e8;
    border-radius: 24px;
    border: none;
    overflow: hidden;
    box-shadow: 0 28px 60px rgba(32, 23, 13, 0.28);
}

.snote-trash-list-header,
.snote-lock-list-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: none;
    padding: 1.25rem 1.5rem 0.75rem;
}

.snote-lock-list-header .snote-header-left,
.snote-lock-list-header .snote-header-center,
.snote-lock-list-header .snote-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.snote-lock-list-header .snote-header-left {
    flex: 0 0 auto;
}

.snote-lock-list-header .snote-header-center {
    flex: 1 1 auto;
    justify-content: center;
}

.snote-lock-list-header .snote-header-right {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 0.75rem;
}

.snote-trash-list-header .snote-icon-btn,
.snote-lock-list-header .snote-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 10px rgba(32, 23, 13, 0.25);
    text-shadow: 0 0 6px rgba(32, 23, 13, 0.45);
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.snote-trash-list-header .snote-icon-btn:hover,
.snote-trash-list-header .snote-icon-btn:focus-visible,
.snote-lock-list-header .snote-icon-btn:hover,
.snote-lock-list-header .snote-icon-btn:focus-visible {
    border-color: rgba(255, 255, 255, 0.85);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(32, 23, 13, 0.35);
}

.snote-trash-list-modal .modal-title,
.snote-lock-list-modal .modal-title {
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
    text-align: center;
}

.snote-trash-list-modal .btn-close,
.snote-lock-list-modal .btn-close {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    padding: 0.45rem;
    margin-left: auto;
}

.snote-trash-list-body,
.snote-lock-list-body {
    padding: 0.5rem 1.5rem 1.75rem;
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.snote-trash-list-body .trash-list,
.snote-lock-list-body .lock-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.snote-trash-list-body .empty-state-trash,
.snote-lock-list-body .empty-state-lock {
    align-self: center;
    text-align: center;
    padding: 2rem 1.5rem;
}

.trash-list-backdrop {
    background-color: rgba(32, 23, 13, 0.65);
    backdrop-filter: blur(6px);
}

.snote-trash-view-modal,
.snote-lock-view-modal {
    background: var(--note-entry-bg);
}

.snote-trash-view-modal .note-entry-surface,
.snote-lock-view-modal .note-entry-surface {
    min-height: 100vh;
}

.snote-trash-header,
.snote-lock-header {
    position: relative;
}

.snote-trash-header .snote-header-center,
.snote-lock-header .snote-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
}

.snote-trash-header .snote-header-right,
.snote-lock-header .snote-header-right {
    justify-content: flex-end;
}

.snote-trash-header .modal-subtitle,
.snote-lock-header .modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-gray);
}

.trash-modal-actions .btn-link span {
    font-size: 0.95rem;
}

.trash-modal-actions .btn-link.text-danger,
.lock-modal-actions .btn-link.text-danger {
    color: #c62828;
}

.trash-modal-actions .btn-link.text-danger:hover,
.trash-modal-actions .btn-link.text-danger:focus-visible,
.lock-modal-actions .btn-link.text-danger:hover,
.lock-modal-actions .btn-link.text-danger:focus-visible {
    color: #b71c1c;
}

.snote-trash-view-modal .snote-input[readonly],
.snote-lock-view-modal .snote-input[readonly] {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--text-dark);
    cursor: default;
    resize: none;
}

.snote-trash-view-modal .snote-input[readonly]:focus,
.snote-lock-view-modal .snote-input[readonly]:focus {
    outline: none;
    box-shadow: none;
}

.trash-note-body,
.lock-note-body {
    padding-bottom: 1.5rem;
}

.trash-note-view,
.lock-note-view {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.snote-trash-view-modal .note-list-item-row,
.snote-lock-view-modal .note-list-item-row {
    padding: 0.4rem 0;
}

.snote-trash-view-modal .note-list-item-input,
.snote-lock-view-modal .note-list-item-input {
    border: none;
    background: transparent;
    resize: none;
    cursor: default;
}

.snote-trash-view-modal .note-list-item-input[readonly]:focus,
.snote-lock-view-modal .note-list-item-input[readonly]:focus {
    outline: none;
}

.snote-trash-view-modal .note-list-item-check,
.snote-lock-view-modal .note-list-item-check {
    pointer-events: none;
}

.trash-note-audio,
.lock-note-audio {
    border: 1px dashed var(--border-blue);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    background: rgba(255, 250, 236, 0.85);
}

.trash-note-audio-label,
.lock-note-audio-label {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.trash-note-audio-meta,
.lock-note-audio-meta {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.snote-trash-view-footer,
.snote-lock-view-footer {
    border-top: none;
    background: transparent;
    padding-top: 0;
}

.trash-modal-actions .btn-link:hover,
.trash-modal-actions .btn-link:focus-visible,
.lock-modal-actions .btn-link:hover,
.lock-modal-actions .btn-link:focus-visible {
    text-decoration: underline;
}

.trash-note-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.trash-note-list li {
    padding: 0.35rem 0;
    border-bottom: 1px dashed var(--border-blue-soft);
}

.trash-note-list li:last-child {
    border-bottom: none;
}

.trash-note-list li.is-completed {
    color: var(--text-gray);
    text-decoration: line-through;
}

.snote-pin-modal {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 40px rgba(32, 23, 13, 0.25);
}

.snote-pin-modal .modal-header,
.snote-pin-modal .modal-footer {
    border: none;
}

.snote-pin-input {
    text-align: center;
    letter-spacing: 0.35rem;
    font-size: 1.1rem;
}

#pin-prompt-error,
#pin-setup-error {
    min-height: 1rem;
}

.empty-state-lock i {
    color: var(--action-blue);
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.recording-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.snote-contextual-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translate(-50%, 120%);
    background: rgba(255, 248, 232, 0.95);
    color: var(--text-dark);
    padding: 0.75rem 1.75rem;
    border-radius: 1.75rem;
    box-shadow: 0 18px 36px rgba(32, 23, 13, 0.22);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    z-index: 1500;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.snote-contextual-bar.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.snote-contextual-close {
    border: none;
    background: none;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    padding: 0.25rem;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.snote-contextual-close:hover,
.snote-contextual-close:focus-visible {
    color: var(--action-blue);
    background-color: rgba(245, 140, 122, 0.12);
    outline: none;
}

.snote-contextual-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 5rem;
}

.snote-contextual-info span:first-child {
    font-weight: 600;
    font-size: 1.05rem;
}

.snote-contextual-label {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.snote-contextual-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.snote-contextual-action {
    border: none;
    background: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    padding: 0.25rem 0.35rem;
    border-radius: 0.75rem;
    transition: color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.snote-contextual-action i {
    font-size: 1.25rem;
}

.snote-contextual-action:hover,
.snote-contextual-action:focus-visible {
    color: var(--action-blue);
    transform: translateY(-2px);
    background-color: rgba(245, 140, 122, 0.08);
    outline: none;
}

.snote-contextual-action[disabled],
.snote-contextual-action.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.snote-snackbar {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 120%);
    background-color: var(--text-dark);
    color: #fffdf5;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    z-index: 1600;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.snote-snackbar.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.snote-snackbar-message {
    font-size: 0.95rem;
}

.snote-snackbar-action {
    border: none;
    background: none;
    color: #fffdf5;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.75rem;
    transition: background-color 0.2s ease;
}

.snote-snackbar-action:hover,
.snote-snackbar-action:focus-visible {
    background-color: rgba(255, 255, 255, 0.18);
    outline: none;
}

.account-area {
    height: 100%;
    padding: 1.5rem 1.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.account-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    scrollbar-width: none;
}


.account-section {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid var(--border-blue-soft);
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.account-section-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.account-section-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-dark);
}

.account-section-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.account-section-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.account-item {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.account-item-inline {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
}

.account-item-label {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-dark);
    min-width: 120px;
}

.account-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-item-actions {
    display: flex;
    gap: 0.75rem;
}

.account-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.account-field-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.account-input,
.account-select {
    width: calc(100% - 60px);
    border: 1px solid rgba(245, 140, 122, 0.35);
    border-radius: 14px;
    padding: 0.6rem 0.85rem;
    background: transparent;
    font-family: 'Patrick Hand', cursive;
    font-size: 1rem;
    color: var(--text-dark);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-input:hover,
.account-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-blue-soft);
}

.account-input:focus,
.account-select:focus {
    outline: none;
    border-color: var(--action-blue);
    box-shadow: 0 0 0 3px rgba(245, 140, 122, 0.18);
    background: rgba(255, 255, 255, 0.12);
}

.account-select {
    appearance: none;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    /* avoid dropdown stretching too wide on desktop */
    max-width: 320px;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-gray) 50%),
        linear-gradient(135deg, var(--text-gray) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 15px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.account-plan-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(245, 140, 122, 0.08);
    border: 1px solid var(--border-ai);
}

.account-plan-name {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
}

.account-plan-status {
    font-size: 0.85rem;
    color: var(--accent-red);
}

.account-primary-btn,
.account-secondary-btn,
.account-ghost-btn {
    font-family: 'Patrick Hand', cursive;
    font-size: 0.95rem;
    border-radius: 14px;
    border: none;
    padding: 0.55rem 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.account-primary-btn {
    background: linear-gradient(140deg, var(--btn-peach) 0%, var(--btn-lavender-soft) 100%);
    color: var(--btn-ink);
    border: 1px solid var(--border-ai);
    box-shadow: 0 10px 18px rgba(245, 140, 122, 0.22);
}

.account-secondary-btn {
    background: rgba(253, 215, 166, 0.68);
    color: var(--btn-ink);
    border: 1px solid var(--border-ai);
    box-shadow: 0 10px 18px rgba(245, 140, 122, 0.16);
}

.account-secondary-btn[data-i18n="account.logout"] {
    background: linear-gradient(140deg, var(--btn-peach) 0%, var(--btn-lavender-soft) 100%);
    border: 1px solid var(--border-ai);
    box-shadow: 0 10px 18px rgba(245, 140, 122, 0.22);
    color: var(--btn-ink);
}

.account-ghost-btn {
    background: transparent;
    border: 1px dashed var(--border-ai);
    color: var(--btn-ink);
}

.account-ghost-btn#account-pin-reset-btn {
    background: rgba(253, 215, 166, 0.68);
    border: 1px dashed var(--border-ai);
    box-shadow: 0 10px 18px rgba(245, 140, 122, 0.16);
}

.account-primary-btn:hover,
.account-primary-btn:focus-visible,
.account-secondary-btn:hover,
.account-secondary-btn:focus-visible,
.account-ghost-btn:hover,
.account-ghost-btn:focus-visible {
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(245, 140, 122, 0.22);
}

.account-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-ai);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    min-width: 0;
    max-width: 100%;
    width: fit-content;
    box-sizing: border-box;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

.account-toggle-label {
    font-size: 0.95rem;
    color: var(--text-gray);
}

.account-toggle-thumb {
    position: absolute;
    left: 6px;
    top: 4px;
    width: 50%;
    height: calc(100% - 8px);
    border-radius: 999px;
    background: linear-gradient(140deg, var(--btn-peach) 0%, var(--btn-lavender-soft) 100%);
    box-shadow: 0 6px 14px rgba(245, 140, 122, 0.3);
    transition: transform 0.2s ease;
}

.account-toggle-wrapper[data-state="dark"] .account-toggle-thumb {
    transform: translateX(calc(100% - 12px));
}

.account-toggle-wrapper[data-state="dark"] .account-toggle-label:last-child {
    color: var(--accent-red);
}

.account-toggle-wrapper[data-state="light"] .account-toggle-label:first-child {
    color: var(--accent-red);
}

.account-label-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.account-label-editor {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: center;
    padding: 0.25rem 0.25rem;
}

/* inline color input is hidden but used to trigger native picker */
.account-color-inline {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.account-label-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.account-label-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-ai);
    background: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.account-label-dot-inner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.account-pin-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.account-input-pin {
    max-width: 180px;
    text-align: center;
    letter-spacing: normal;
}

.account-pin-actions {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.account-pin-actions .account-primary-btn,
.account-pin-actions .account-ghost-btn {
    white-space: nowrap;
}

.account-switch {
    position: relative;
    display: inline-flex;
    width: 56px;
    height: 32px;
}

.account-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.account-switch-track {
    position: absolute;
    inset: 0;
    background: rgba(149, 182, 220, 0.35);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.account-switch-track::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.account-switch-input:checked + .account-switch-track {
    background: rgba(245, 140, 122, 0.65);
}

.account-switch-input:checked + .account-switch-track::after {
    transform: translateX(24px);
}

.account-switch-input:focus-visible + .account-switch-track {
    box-shadow: 0 0 0 3px rgba(245, 140, 122, 0.22);
}

.account-item-notification {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.account-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
}

.account-notification-title {
    font-weight: 600;
    font-size: 1rem;
}

.account-notification-status {
    font-weight: 600;
    text-align: right;
    align-self: flex-end;
}

.account-notification-hint {
    text-align: right;
    align-self: flex-end;
}

.help-notification-toggle {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.help-notification-status {
    font-weight: 600;
}

.account-color-modal {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    border: 1px solid var(--border-ai-soft);
    font-family: 'Patrick Hand', cursive;
}

.account-color-modal .modal-header {
    border-bottom: 1px solid var(--border-ai-soft);
}

.account-color-modal .modal-footer {
    border-top: 1px solid var(--border-ai-soft);
}

.account-color-picker {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.account-color-preview {
    width: 100%;
    height: 56px;
    border-radius: 14px;
    background: rgba(245, 140, 122, 0.18);
    margin-bottom: 1rem;
    border: 1px solid rgba(245, 140, 122, 0.3);
}

.account-color-hint {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Hue slider */
.account-hue-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        #ff0000 0%,
        #ff7f00 16%,
        #ffff00 32%,
        #00ff00 48%,
        #00ffff 64%,
        #0000ff 80%,
        #8b00ff 100%
    );
    outline: none;
    border: 1px solid var(--border-ai);
}

.account-hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-ai);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.account-hue-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-ai);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.recording-icon {
    width: 52px;
    height: 52px;
    filter: brightness(0) saturate(100%) invert(33%) sepia(72%) saturate(2088%) hue-rotate(343deg) brightness(94%) contrast(92%);
    animation: pulse 1.5s infinite;
}

.recording-timer {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--text-dark);
}

/* Magic (AI rewrite) button */
.snote-btn-magic {
    background: linear-gradient(140deg, var(--btn-peach-soft) 0%, var(--btn-peach) 45%, var(--btn-lavender-soft) 100%);
    color: var(--btn-ink);
    border: 1px solid var(--border-ai);
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(245, 140, 122, 0.22);
    padding: 0.4rem 0.8rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.snote-btn-magic:hover,
.snote-btn-magic:focus-visible {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(245, 140, 122, 0.28);
    color: var(--btn-ink);
}

.snote-btn-magic:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px rgba(245, 140, 122, 0.24);
}

.snote-btn-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}

/* AI Processing Overlay */
.snote-ai-overlay[hidden] { display: none; }
.snote-ai-overlay {
    position: fixed;
    inset: 0;
    background: rgba(244, 220, 184, 0.55); /* paper tint */
    -webkit-backdrop-filter: blur(3px) saturate(110%);
    backdrop-filter: blur(3px) saturate(110%);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snote-ai-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    padding: 18px 20px;
    text-align: center;
    min-width: 260px;
}

.snote-ai-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
}

.snote-ai-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.snote-ai-subtitle {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.snote-ai-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(0,0,0,0.08);
    border-top-color: var(--action-blue);
    border-right-color: var(--btn-lavender);
    animation: spin 0.9s linear infinite;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* AI review toggle styles */
.snote-ai-toggle {
    border-radius: 14px;
}

.snote-ai-toggle .btn {
    border-width: 2px;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.snote-ai-toggle .snote-btn-original {
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

.snote-ai-toggle .snote-btn-ai {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

.snote-btn-original {
    color: var(--btn-ink);
    border: 1px dashed var(--border-ai);
    background: linear-gradient(180deg, var(--btn-paper) 0%, #ffe0a2 100%);
    box-shadow: 0 4px 0 var(--btn-paper-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border 0.15s ease, filter 0.2s ease;
}

.btn-check:checked + .snote-btn-original {
    color: var(--btn-ink);
    border: 1px solid var(--border-ai);
    background: linear-gradient(140deg, var(--btn-peach-soft) 0%, var(--btn-peach) 45%, var(--btn-lavender-soft) 100%);
    box-shadow: 0 8px 18px rgba(245, 140, 122, 0.22);
}

.snote-btn-original:hover,
.snote-btn-original:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 0 var(--btn-paper-shadow);
}

.btn-check:checked + .snote-btn-original:hover,
.btn-check:checked + .snote-btn-original:focus-visible {
    filter: brightness(1.03);
    box-shadow: 0 12px 22px rgba(245, 140, 122, 0.28);
}

.snote-btn-original:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 var(--btn-paper-shadow);
}

.btn-check:checked + .snote-btn-original:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px rgba(245, 140, 122, 0.24);
}

.snote-btn-ai {
    color: var(--btn-ink);
    border: 1px dashed var(--border-ai);
    background: linear-gradient(180deg, var(--btn-paper) 0%, #ffe0a2 100%);
    box-shadow: 0 4px 0 var(--btn-paper-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border 0.15s ease, filter 0.2s ease;
}

.btn-check:checked + .snote-btn-ai {
    color: var(--btn-ink);
    border: 1px solid var(--border-ai);
    background: linear-gradient(140deg, var(--btn-peach-soft) 0%, var(--btn-peach) 45%, var(--btn-lavender-soft) 100%);
    box-shadow: 0 8px 18px rgba(245, 140, 122, 0.22);
}

.snote-btn-ai:hover,
.snote-btn-ai:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 0 var(--btn-paper-shadow);
}

.btn-check:checked + .snote-btn-ai:hover,
.btn-check:checked + .snote-btn-ai:focus-visible {
    filter: brightness(1.03);
    box-shadow: 0 12px 22px rgba(245, 140, 122, 0.28);
}

.snote-btn-ai:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 var(--btn-paper-shadow);
}

.btn-check:checked + .snote-btn-ai:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px rgba(245, 140, 122, 0.24);
}

.snote-toggle-icon {
    width: 16px;
    height: 16px;
    vertical-align: -2px;
}

.snote-btn-choose {
    color: var(--btn-ink);
    border: 1px dashed var(--border-ai);
    background: linear-gradient(180deg, var(--btn-paper) 0%, #ffe0a2 100%);
    box-shadow: 0 4px 0 var(--btn-paper-shadow);
    border-radius: 14px;
    padding: 0.35rem 0.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.snote-btn-choose:hover,
.snote-btn-choose:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 0 var(--btn-paper-shadow);
    background: linear-gradient(180deg, #ffe0a2 0%, var(--btn-paper) 100%);
    border-color: var(--border-ai);
    color: var(--btn-ink);
}

.snote-btn-choose:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 var(--btn-paper-shadow);
}

.empty-state {
    text-align: center;
    color: var(--text-gray);
    padding: 2rem 1rem;
    font-size: 1.1rem;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

.empty-state-trash,
.empty-state-lock {
    background: rgba(255, 255, 255, 0.65);
    border-radius: 16px;
    box-shadow: inset 0 0 0 2px rgba(245, 140, 122, 0.12);
}

.empty-state-trash i {
    color: var(--accent-red);
}

.empty-state-lock {
    color: var(--text-dark);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}

body.reminder-picker-open {
    overflow: hidden;
}

.reminder-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    padding: 1rem;
}

.reminder-picker-backdrop[hidden] {
    display: none !important;
}

.reminder-picker-dialog {
    background: rgba(255, 248, 226, 0.97);
    border: 1px solid var(--border-ai);
    border-radius: 18px;
    box-shadow: 0 24px 48px rgba(245, 140, 122, 0.25);
    max-width: 540px;
    width: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reminder-picker-header h2 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--btn-ink);
    text-align: center;
}

.reminder-picker-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    color: var(--text-gray);
    text-align: center;
}

.reminder-picker-body {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 0.75rem;
}

.reminder-wheel-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: stretch;
}

.reminder-wheel-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-align: center;
}

.reminder-wheel {
    --reminder-wheel-row-height: 2.35rem;
    position: relative;
    width: 100%;
    min-height: calc(var(--reminder-wheel-row-height) * 5 + 0.5rem);
    border-radius: 14px;
    border: 1px solid var(--border-blue);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    padding: 0.35rem 0.25rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.reminder-wheel::before {
    content: '';
    position: absolute;
    left: 12%;
    right: 12%;
    top: 50%;
    height: calc(var(--reminder-wheel-row-height) - 0.2rem);
    transform: translateY(-50%);
    border-radius: 12px;
    background: rgba(245, 140, 122, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.reminder-wheel:focus-visible {
    outline: none;
    border-color: var(--border-blue-bold);
    box-shadow: 0 0 0 3px rgba(245, 140, 122, 0.25);
}

.reminder-wheel-option {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Patrick Hand', cursive;
    font-size: 1.05rem;
    line-height: 1;
    color: rgba(245, 140, 122, 0.7);
    min-height: var(--reminder-wheel-row-height);
    transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease, font-size 0.18s ease;
    opacity: 0.55;
    cursor: pointer;
}

.reminder-wheel-option[data-offset="-2"],
.reminder-wheel-option[data-offset="2"] {
    opacity: 0.3;
    font-size: 0.95rem;
}

.reminder-wheel-option[data-offset="-1"],
.reminder-wheel-option[data-offset="1"] {
    opacity: 0.45;
    font-size: 1rem;
}

.reminder-wheel-option.is-active {
    font-size: 1.4rem;
    color: var(--btn-ink);
    opacity: 1;
}

.reminder-wheel-option:focus,
.reminder-wheel-option:focus-visible {
    outline: none;
}

.reminder-picker-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.reminder-picker-actions .btn {
    flex: 1;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-family: 'Patrick Hand', cursive;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.reminder-picker-clear {
    background: rgba(245, 140, 122, 0.12);
    color: var(--btn-ink);
    border: 1px solid var(--border-blue);
}

.reminder-picker-ok {
    background: linear-gradient(140deg, var(--action-blue-soft) 0%, var(--action-blue) 100%);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(245, 140, 122, 0.25);
}

.reminder-picker-actions .btn:hover,
.reminder-picker-actions .btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(245, 140, 122, 0.28);
}

@media (max-width: 520px) {
    .reminder-picker-dialog {
        padding: 1.2rem;
        max-width: min(420px, 100%);
    }

    .reminder-picker-body {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .reminder-wheel {
        --reminder-wheel-row-height: 2rem;
        padding: 0.28rem 0.18rem;
    }

    .reminder-wheel::before {
        left: 8%;
        right: 8%;
    }

    .reminder-wheel-option {
        font-size: 0.95rem;
    }

    .reminder-wheel-option.is-active {
        font-size: 1.2rem;
    }

    .note-list-item-row {
        gap: 0.3rem;
    }

    /* Note: .note-list-item-remove responsive styles removed - using unified .snote-action-btn */
}

@media (max-width: 380px) {
    .reminder-picker-dialog {
        padding: 1rem;
    }

    .reminder-picker-body {
        gap: 0.35rem;
    }

    .reminder-wheel {
        --reminder-wheel-row-height: 1.8rem;
        padding: 0.25rem 0.18rem;
    }

    .reminder-wheel-option {
        font-size: 0.9rem;
    }

    .reminder-wheel-option.is-active {
        font-size: 1.1rem;
    }

    .note-list-item-row {
        gap: 0.25rem;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.reminder-wheel.is-dragging::before {
    background: rgba(245, 140, 122, 0.3);
}

.reminder-wheel.is-dragging .reminder-wheel-option.is-active {
    text-shadow: 0 0 6px rgba(245, 140, 122, 0.35);
}
.reminder-wheel.is-dragging {
    cursor: grabbing;
}

/* Calendar Panel */
.calendar-area {
    padding: 1rem 1.25rem 2.25rem;
    height: 100%;
}

.calendar-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
}

.calendar-days {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    overflow-y: auto;
    padding-right: 0.25rem;
    padding-bottom: 120px; /* keep last day visible above sticky controls */
}

.calendar-day-row {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 16px;
    border: 1px solid var(--border-blue-soft);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.calendar-day-row.has-notes {
    background: rgba(255, 255, 255, 0.14);
}

.calendar-day-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.2rem;
    padding-top: 0.25rem;
    padding-right: 0.5rem;
    border-right: 2px dashed rgba(209, 167, 244, 0.35);
}

.calendar-dow {
    color: var(--accent-red);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.calendar-date {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.calendar-day-right {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.calendar-day-notes {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    align-items: flex-start;
}

.calendar-empty {
    color: var(--text-gray);
    font-style: italic;
}

.calendar-note-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    box-sizing: border-box;
    align-self: flex-start;
}
.calendar-note-pill.hidden { display: none; }
.calendar-note-pill { cursor: pointer; }
.calendar-note-pill:focus-visible { outline: 2px dashed var(--action-blue); border-radius: 10px; }

.calendar-pill-text {
    display: block;
    padding: 0.3rem 0.75rem;
    border-radius: 10px;
    font-size: 1rem;
    max-width: 100%;
    box-sizing: border-box;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-more-btn {
    align-self: flex-start;
    background: transparent;
    color: var(--accent-red);
    border: none;
    padding: 0;
    font-size: 0.95rem;
    cursor: pointer;
}

.calendar-sticky { /* wrapper fixed at bottom of screen */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--paper-yellow);
    padding-top: 0.35rem;
    padding-bottom: calc(0.35rem + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.calendar-toggle-row {
    margin-top: 0.25rem;
    flex: 0 0 auto;
}

.calendar-toggle-row .form-check {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* push text+switch to the right side */
    padding-left: 0;
    width: 100%;
    gap: 0.5rem;
}

.calendar-toggle-row .form-check-input {
    float: none;
    margin-left: 0.5rem;
    width: 56px;
    height: 32px;
    appearance: none;
    position: relative;
    background: rgba(149, 182, 220, 0.35);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.calendar-toggle-row .form-check-input::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.calendar-toggle-row .form-check-input:checked {
    background: rgba(245, 140, 122, 0.65);
}

.calendar-toggle-row .form-check-input:checked::after {
    transform: translateX(24px);
}

.calendar-toggle-row .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(245, 140, 122, 0.22);
    outline: none;
}

/* Help Modal Toggle - Same styling as calendar toggle */
.help-modal-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 0;
    gap: 0.5rem;
}

.help-modal-toggle .form-check-input {
    position: relative;
    float: none;
    margin-left: 0.5rem;
    width: 56px;
    height: 32px;
    appearance: none;
    background: rgba(149, 182, 220, 0.35);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.help-modal-toggle .form-check-input::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.help-modal-toggle .form-check-input:checked {
    background: rgba(245, 140, 122, 0.65);
}

.help-modal-toggle .form-check-input:checked::after {
    transform: translateX(24px);
}

.help-modal-toggle .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(245, 140, 122, 0.22);
    outline: none;
}

.calendar-pickers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    flex: 0 0 auto;
    background: var(--paper-yellow);
    padding-bottom: env(safe-area-inset-bottom);
    padding-top: 0.35rem;
}

.calendar-picker {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
}

.calendar-picker-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    border: 1px solid var(--border-blue-soft);
    border-radius: 12px;
    background: transparent;
    color: var(--text-dark);
    font-family: 'Patrick Hand', cursive;
    font-size: 1.05rem;
    padding: 0.4rem 0.75rem;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.calendar-picker-trigger:hover,
.calendar-picker-trigger:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--border-blue);
    box-shadow: 0 10px 18px rgba(245, 140, 122, 0.16);
    outline: none;
}

.calendar-picker-trigger i {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.calendar-picker-value {
    font-weight: 600;
}

.calendar-picker-menu {
    max-height: 220px;
    overflow-y: auto;
    padding: 0.3rem 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-blue);
    min-width: 100%;
}

#calendar-month-menu,
#calendar-year-menu,
#snote-account-lang-menu,
#snote-account-voice-menu {
    background: rgba(255, 255, 255, 0.6);
}

.calendar-picker-menu .dropdown-item {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.05rem;
    color: var(--text-dark);
    padding: 0.35rem 0.85rem;
}

.calendar-picker-menu .dropdown-item.active,
.calendar-picker-menu .dropdown-item:active {
    background: linear-gradient(140deg, var(--btn-peach-soft) 0%, rgba(226, 211, 255, 0.85) 100%);
    color: var(--btn-ink);
}

.calendar-empty-state {
    text-align: center;
    color: var(--text-gray);
    font-style: italic;
    padding: 2rem 0;
}

/* Voice Stream Loading States */
.voice-connecting {
    position: relative;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Button connecting state */
button.connecting {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

button.connecting::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
