/* ════ LANDING VIEW ════ */
#landingView {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

.landing-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.navbar {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero {
    padding: 100px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero p {
    font-size: 18px;
    color: var(--dim);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.btn-hero {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.3);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

.feature-card {
    background: var(--card);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--dim);
    font-size: 14px;
    line-height: 1.6;
}

.landing-footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--dim);
    font-size: 14px;
}

/* ════ AUTH VIEW ════ */
.auth-page-overlay {
    position: fixed;
    inset: 0;
    background: rgba(var(--bg-rgb), 0.7);
    backdrop-filter: blur(10px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

.auth-card {
    background: var(--card);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

#authTitle {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    text-align: center;
}

#authSubtitle {
    font-size: 14px;
    color: var(--dim);
    margin-bottom: 32px;
    text-align: center;
}

.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    color: var(--dim);
    transition: 0.2s;
}

.auth-tab.active {
    background: var(--primary);
    color: #fff;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--dim);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: 0.2s;
}

input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ════ MODALS & SHEETS ════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(40px) brightness(0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    background-size: cover;
    background-position: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    background: var(--bg);
    border-radius: 24px 24px 0 0;
    padding: 20px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

#quickActionsSheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-radius: 24px 24px 0 0;
    padding-bottom: 24px;
    z-index: 2000;
    transition: bottom 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#quickActionsSheet.active {
    bottom: 0;
}

.sheet-handle {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 12px 0;
}

.sheet-content {
    width: 100%;
    padding: 0 24px 24px;
}

.sheet-content h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 700;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.action-item span {
    font-size: 12px;
    color: var(--dim);
    font-weight: 600;
}

.mood-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.mood-picker-overlay.active {
    display: flex;
}

.mood-grid {
    background: var(--card);
    padding: 24px;
    border-radius: 20px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    max-width: 90%;
}

.mood-item {
    font-size: 32px;
    cursor: pointer;
    transition: transform 0.2s;
}

.mood-item:hover {
    transform: scale(1.2);
}

.theme-picker {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.theme-swatch {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.theme-swatch.active {
    border-color: var(--primary);
}

.swatch-mountain {
    background: #0F121C;
    color: var(--primary);
}

.swatch-cozy {
    background: #2D1810;
    color: #D4835C;
}

.swatch-purple {
    background: #1A0F2E;
    color: #9B6DD6;
}

.swatch-forest {
    background: #0F1F14;
    color: #4CAF50;
}

/* ════ THEME SELECTION SCREEN ════ */
#themeSelectionOverlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Ensure content starts at top for scrolling */
    overflow-y: auto;
    padding: env(safe-area-inset-top, 20px) 0 env(safe-area-inset-bottom, 20px);
}

.theme-selection-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
}

.theme-selection-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}


.theme-selection-header .btn-ghost {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    pointer-events: auto !important;
}

.theme-selection-header .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-carousel-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 20px;
}

.theme-carousel {
    width: 300px;
    height: 650px;
    max-height: 70vh;
    /* Scale down on smaller screens */
    border: 12px solid #000;
    border-radius: 45px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: #000;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-preview-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    z-index: 1;
}

/* Phone Notch */
.theme-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 30px;
    background: #000;
    border-radius: 0 0 20px 20px;
    z-index: 100;
}

.theme-carousel-item {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9) translateX(50px);
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.theme-carousel-item.active {
    opacity: 1;
    transform: scale(1) translateX(0);
    pointer-events: auto;
}

.theme-carousel-item.next {
    transform: scale(0.9) translateX(50px);
}

.theme-carousel-item.prev {
    transform: scale(0.9) translateX(-50px);
}

.theme-preview-header {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.7);
}

.theme-preview-image {
    height: 180px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    box-shadow: inset 0 -40px 40px rgba(0, 0, 0, 0.5);
}

.theme-preview-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.8));
}

.theme-preview-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin: 16px 0 auto;
}

.theme-preview-entries {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
}

.theme-preview-entry {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.theme-preview-date {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.theme-preview-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
}

.theme-preview-line::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    font-size: 12px;
    font-weight: 600;
}

.theme-preview-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 24px 24px;
}

.theme-preview-nav i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
}

.theme-preview-fab {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.theme-pagination {
    display: flex;
    gap: 8px;
}

.theme-pagination .dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: 0.3s;
    cursor: pointer;
}

.theme-pagination .dot.active {
    background: #3366FF;
    width: 24px;
    border-radius: 4px;
}

.btn-apply-theme {
    width: 100%;
    max-width: 340px;
    background: #D81B60;
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 20px;
}

.btn-apply-theme:active {
    background: #ad144b;
}

/* ════ PRO UPGRADE SCREEN ════ */
#proOverlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    padding: 0 0 env(safe-area-inset-bottom, 60px);
    /* Padding only at bottom, header is sticky */
}

.pro-header-sticky {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 15, 28, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: env(safe-area-inset-top, 0);
    /* Still respect safe areas but no manual bar */
}

/* Status bar removed as per user request */

.pro-nav-bar {
    height: 60px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pro-nav-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.pro-back-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.pro-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pro-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 40px 20px;
}

.pro-header {
    text-align: center;
    margin-bottom: 30px;
}

.pro-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
}

.pro-header p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.pro-features-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.pro-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.pro-feature-text {
    text-align: center;
    margin-bottom: 30px;
}

.pro-feature-text h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.pro-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.pro-dots .dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.pro-dots .dot.active {
    background: #fff;
    width: 12px;
    border-radius: 3px;
}

.pro-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    margin-bottom: 40px;
}

.pro-plan-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 24px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 180px;
}

.pro-plan-card.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: #FFB300;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.pro-plan-card.active::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    border: 2px solid #FFB300;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 179, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 179, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 179, 0, 0);
    }
}

.plan-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #FFB300;
    color: #000;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px;
    border-radius: 18px 18px 0 0;
}

.plan-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.pro-plan-card.active .plan-name {
    color: #fff;
    background: white;
    color: black;
    padding: 4px;
    border-radius: 0 0 8px 8px;
    margin-top: -12px;
    margin-bottom: 16px;
}

.plan-price {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.plan-old-price {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: line-through;
    margin-bottom: 8px;
}

.plan-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

.pro-social-proof {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 40px;
    text-align: center;
}

.proof-item {
    flex: 1;
}

.proof-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    margin-bottom: 4px;
}

.proof-value {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.pro-action-area {
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
}

.btn-pro-action {
    width: 100%;
    background: linear-gradient(135deg, #FF7043, #D81B60);
    color: #fff;
    border: none;
    padding: 20px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(216, 27, 96, 0.3);
    transition: transform 0.2s;
}

.btn-pro-action:active {
    transform: scale(0.98);
}

.trial-caption {
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.pro-footer-links {
    display: flex;
    gap: 12px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
}

.pro-footer-links a {
    color: inherit;
    text-decoration: none;
}

.pro-footer-links .divider {
    opacity: 0.5;
}

/* ════ PREMIUM MINE CARD (APK STYLE) ════ */
.premium-mine-card {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
        url('https://firebasestorage.googleapis.com/v0/b/diary-f39bc.appspot.com/o/wallpapers%2Fmountain_night.jpg?alt=media') center center / cover !important;
    border: none !important;
    padding: 24px !important;
    position: relative;
    overflow: hidden;
    min-height: 220px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}

.mine-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mine-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

.mine-card-share {
    opacity: 0.8;
}

.mine-card-body {
    margin: 20px 0;
}

.mine-card-progress {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.mine-card-stats {
    display: flex;
    flex-direction: column;
}

.mine-card-count {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
}

.mine-card-label {
    font-size: 11px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.mine-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.mine-card-quote {
    font-size: 15px;
    font-style: italic;
    opacity: 0.9;
    max-width: 80%;
}

.mine-card-accent {
    font-size: 60px;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.3));
    transform: translateY(15px);
}

/* ════ PRO LOCK CARDS ════ */
.pro-lock-card {
    text-align: center;
    padding: 30px 20px !important;
}

.pro-lock-card h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
}

.pro-lock-card p {
    font-size: 13px;
    opacity: 0.6;
    margin-bottom: 20px;
}

.btn-pro-get {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
}

/* ════ ADVICE CARD (No idea what to write) ════ */
.advice-card {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
}

.advice-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.advice-text {
    flex: 1;
}

.advice-text h3 {
    font-size: 18px !important;
    color: #fff !important;
    margin-bottom: 8px !important;
}

.advice-text p {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 20px;
    line-height: 1.4;
}

.btn-start {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 10px 32px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.advice-icon {
    font-size: 64px;
    filter: drop-shadow(0 0 20px #fbbf24);
}

/* ════ PREMIUM PROMO TILES ════ */
.promo-tile-premium {
    background: var(--card);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: 0.2s;
}

.promo-tile-premium:active {
    opacity: 0.7;
    transform: scale(0.98);
}

.promo-tile-premium .promo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.promo-tile-premium .promo-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.promo-tile-premium .tag {
    font-size: 9px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.5;
}

.promo-tile-premium .promo-info p {
    margin: 0;
    font-size: 12px;
    color: var(--dim);
}

.promo-tile-premium>i {
    font-size: 14px;
    color: var(--dim);
    margin-left: auto;
}

/* ════ MOOD BAR CHART (APK STYLE) ════ */
.mood-chart-container {
    height: 180px;
    display: flex;
    position: relative;
    padding-left: 20px;
}

.mood-y-axis {
    width: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 10px;
    color: var(--dim);
    padding: 10px 0 35px 0;
    text-align: right;
    padding-right: 10px;
}

.mood-chart-area {
    flex: 1;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 35px;
    /* space for emojis */
}

.mood-grid-lines {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0 0 0;
}

.mood-grid-line {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    width: 100%;
}

.mood-bars {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 10px;
}

.mood-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 24px;
    height: 100%;
    position: relative;
}

.mood-bar {
    width: 12px;
    background: linear-gradient(to top, var(--primary), #60a5fa);
    border-radius: 6px 6px 0 0;
    transition: height 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: absolute;
    bottom: 0;
}

.mood-emoji-label {
    position: absolute;
    bottom: -32px;
    font-size: 18px;
    filter: grayscale(0.2);
}

/* ════ HABIT CHALLENGE CARD ════ */
.habit-challenge-card {
    background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb), 0.8));
    margin: 0 16px 16px;
    padding: 16px 20px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: #fff;
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
    gap: 12px;
}

.habit-challenge-card.challenge-reset {
    background: linear-gradient(135deg, #F97316, #d95f05);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.35);
}

.habit-challenge-card.challenge-complete {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.35);
    animation: completePulse 1.5s ease-in-out 1;
}

@keyframes completePulse {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.03);
    }

    60% {
        transform: scale(0.99);
    }

    100% {
        transform: scale(1);
    }
}

/* Progress bar inside challenge card */
.challenge-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.challenge-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: rgba(255, 255, 255, 0.85);
}

/* ════ ACHIEVEMENT HISTORY (Profile) ════ */
.challenge-inline-progress {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
}

.achievement-month-group {
    margin-bottom: 20px;
}

.achievement-month-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dim);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.achievement-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.achievement-badge-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 88px;
    flex: 1;
    transition: transform 0.2s ease;
    opacity: 0.35;
}

.achievement-badge-card.unlocked {
    opacity: 1;
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.15);
}

.achievement-badge-card.unlocked:hover {
    transform: translateY(-2px);
}

.achievement-badge-emoji {
    font-size: 28px;
    line-height: 1;
}

.achievement-badge-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    line-height: 1.3;
}

.achievement-badge-days {
    font-size: 10px;
    color: var(--primary);
    font-weight: 600;
}

.achievement-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 10px;
}

/* ════ BACKGROUND PICKER OVERLAY ════ */
.bg-picker-sheet {
    width: 100%;
    background: #1C1F26;
    /* Darker bottom sheet background */
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 40px;
    /* Extra padding for bottom */
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.bg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 10px;
    width: 100%;
    max-width: 400px;
    /* Constrain width like APK */
}

.bg-swatch {
    width: 100%;
    aspect-ratio: 1/1.5;
    /* Tall rectangles like APK */
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}

.bg-swatch:hover {
    transform: scale(1.05);
}

.bg-swatch.active {
    border-color: rgba(255, 255, 255, 0.8);
}

.bg-swatch-none {
    background-color: #222;
    background-image:
        linear-gradient(45deg, #333 25%, transparent 25%, transparent 75%, #333 75%, #333),
        linear-gradient(45deg, #333 25%, #222 25%, #222 75%, #333 75%, #333);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px;
}

.bg-swatch-none span {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

/* ════ DATE PICKER MODAL (Android Style) ════ */
.dp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 11000;
    backdrop-filter: blur(4px);
}

.dp-overlay.active {
    display: flex;
}

.dp-card {
    background: #1e1e1e;
    width: 320px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.2s ease-out;
}

.dp-header {
    background: #1e1e1e;
    padding: 24px 24px 16px 24px;
    color: #fff;
}

.dp-header-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.dp-header-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dp-selected-date-txt {
    font-size: 32px;
    font-weight: 700;
}

.dp-body {
    padding: 12px 16px 16px 16px;
    background: #1e1e1e;
}

.dp-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 8px;
}

.dp-month-txt {
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dp-nav-btn {
    background: none;
    border: none;
    color: #fff;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.dp-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
}

.dp-weekday {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.dp-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.dp-day:empty {
    cursor: default;
}

.dp-day:not(:empty):hover {
    background: rgba(255, 255, 255, 0.1);
}

.dp-day.selected {
    background: var(--primary) !important;
    color: #fff;
    font-weight: 700;
}

.dp-day.today {
    color: var(--primary);
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.dp-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px 24px;
}

.dp-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.dp-btn:hover {
    background: rgba(74, 144, 226, 0.1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ════ IMAGE PREVIEWS ════ */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

.image-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.3s ease;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.image-delete-btn:hover {
    background: #ff4d4d;
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ════ ENTRY VIEW IMAGES (TILED) ════ */
.entry-view-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 24px;
    width: 100%;
}

.entry-view-image-tile {
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: rgba(255, 255, 255, 0.05);
}

.entry-view-image-tile:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.entry-view-image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ════ LIGHTBOX OVERLAY ════ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-overlay img {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: env(safe-area-inset-top, 20px);
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

/* ════ FONT PICKER SHEET (1:1 APK) ════ */
.font-picker-sheet {
    width: 100%;
    max-width: 100vw;
    background: #1C1F26;
    border-radius: 24px 24px 0 0;
    padding: 0;
    animation: slideUp 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.font-sheet-scroll-area {
    width: 100%;
    max-width: 400px;
    /* APK typical width */
    padding: 0 20px 40px;
    box-sizing: border-box;
}

.font-sheet-header {
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 20px;
    box-sizing: border-box;
}

.font-sheet-header span {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.font-sheet-header i {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.format-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.format-row .divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 12px;
}

.align-group,
.header-group {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.format-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.format-btn:active {
    transform: scale(0.95);
}

.format-btn.active {
    color: var(--primary) !important;
    background: rgba(74, 144, 226, 0.15) !important;
    border-color: rgba(74, 144, 226, 0.3);
}

.color-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px;
    margin-bottom: 24px;
    scrollbar-width: none;
    width: 100%;
}

.color-scroll::-webkit-scrollbar {
    display: none;
}

.color-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.color-dot:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.color-dot:active {
    transform: scale(0.9);
}

.color-dot.active {
    border-color: #fff !important;
    border-width: 3px !important;
    transform: scale(1.25);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.font-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}

.font-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    height: 52px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.font-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.font-btn:active {
    transform: scale(0.98);
}

.font-btn.active {
    background: rgba(74, 144, 226, 0.2) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    transform: scale(1.02);
}

/* ════ FONT FAMILIES ════ */
.font-avenir {
    font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: -0.02em;
}

.font-bradley {
    font-family: 'Dancing Script', cursive;
}

.font-helvetica {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* contenteditable placeholders */
[contenteditable=true]:empty:before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    display: block;
}

/* Apply settings to inputs */
#entryTitle,
#entryContent {
    transition: color 0.3s ease, font-family 0.3s ease, text-align 0.3s ease, font-size 0.3s ease;
}

/* ════ LIST PICKER ════ */
.list-picker-sheet {
    width: 100%;
    max-width: 100vw;
    background: #1C1F26;
    border-radius: 24px 24px 0 0;
    padding: 0;
    animation: slideUp 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.list-sheet-scroll-area {
    width: 100%;
    max-width: 400px;
    /* APK typical width matching Font picker */
    padding: 0 20px 40px;
    box-sizing: border-box;
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
    width: 100%;
}

.list-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    aspect-ratio: 1.1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    padding: 12px;
    box-sizing: border-box;
}

.list-card:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.08);
}

.list-card.active {
    border-color: var(--primary);
    background: rgba(74, 144, 226, 0.1);
}

.list-preview {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.list-preview .marker {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    min-width: 24px;
    text-align: center;
}

.list-preview .lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.list-preview .lines span {
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    width: 100%;
}

.list-preview .lines span:last-child {
    width: 60%;
}

.list-card.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ════ CUSTOM LIST MARKERS ════ */
#entryContent ul.list-star {
    list-style-type: "★  " !important;
    padding-left: 1.5em;
}

#entryContent ul.list-circle {
    list-style-type: circle !important;
    padding-left: 1.5em;
}

#entryContent ul.list-check {
    list-style-type: "✓  " !important;
    padding-left: 1.5em;
}

#entryContent ul.list-diamond {
    list-style-type: "◆  " !important;
    padding-left: 1.5em;
}

#entryContent ul.list-arrow {
    list-style-type: "➔  " !important;
    padding-left: 1.5em;
}

#entryContent ol.list-decimal-paren {
    list-style-type: decimal !important;
    padding-left: 1.5em;
}

#entryContent ol.list-decimal-paren li::marker {
    content: counter(list-item) ") ";
}

/* Standard Overrides if needed */
#entryContent ul {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

#entryContent ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

/* ════ TAG PICKER BOTTOM SHEET ════ */
.tag-picker-sheet {
    width: 100%;
    max-width: 100%;
    background: #1C1F2A;
    border-radius: 20px 20px 0 0;
    padding: 0 0 env(safe-area-inset-bottom, 20px);
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    max-height: 62vh;
}

.tag-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 16px 24px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tag-tab {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0 20px;
    transition: color 0.2s, font-weight 0.2s;
    user-select: none;
}

.tag-tab.active {
    font-weight: 700;
    color: #fff;
}

.tag-tab-sep {
    color: rgba(255, 255, 255, 0.15);
    font-size: 15px;
    pointer-events: none;
}

.tag-panel {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Input row */
.tag-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 10px 14px;
}

.tag-input-row input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
}

.tag-input-row input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.tag-add-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}

.tag-add-btn:active {
    transform: scale(0.9);
    opacity: 0.8;
}

/* AI Row */
.tag-ai-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 2px 0;
    width: fit-content;
}

.tag-ai-icon {
    color: var(--primary);
    font-size: 13px;
}

.tag-ai-label {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
}

/* AI spinner */
.tag-ai-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: tagSpin 0.7s linear infinite;
    display: inline-block;
}

@keyframes tagSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Chip container */
.tag-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0;
}

/* Individual chip */
.tag-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    user-select: none;
}

.tag-chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.tag-chip .tag-chip-del {
    font-size: 11px;
    opacity: 0.5;
    margin-left: 2px;
    line-height: 1;
    transition: opacity 0.2s;
}

.tag-chip .tag-chip-del:hover {
    opacity: 1;
}

/* Empty state */
.tag-empty-state {
    width: 100%;
    padding: 32px 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    text-align: center;
}

/* ════ TAG UI ENHANCEMENTS (Bottom of Editor/View) ════ */
.editor-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px 24px;
    min-height: 20px;
    margin-top: auto;
    /* Push to bottom of content area */
}

.editor-tag-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    cursor: default;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    user-select: none;
}

.editor-tag-pill:active {
    transform: scale(0.96);
}

.editor-tag-pill .tag-pill-del {
    font-size: 12px;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 2px 4px;
    margin-right: -4px;
}

.editor-tag-pill .tag-pill-del:hover {
    opacity: 1;
}

.view-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px 0 10px;
    font-size: 15px;
    font-weight: 600;
}

.view-tag-item {
    color: var(--primary);
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
}

.view-tag-item:hover {
    opacity: 0.8;
}

/* ════ TAGS TAB VIEW (Drawer Page) ════ */
.tag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tag-row:active {
    background: rgba(255, 255, 255, 0.05);
}

.tag-row-name {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-row-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

#tagsOverlay .diary-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

/* ════ DIARY LOCK VIEW ════ */
.diary-lock-overlay {
    backdrop-filter: blur(40px) brightness(0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
}


.lock-settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 24px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.lock-settings-card {
    background: var(--card);
    border-radius: 16px;
    margin-bottom: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.2s, background 0.2s;
}

.lock-settings-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.05);
}

.lock-settings-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lock-settings-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.lock-settings-desc {
    font-size: 11px;
    color: var(--dim);
    line-height: 1.4;
}

.lock-settings-chevron {
    color: var(--dim);
    font-size: 14px;
    margin-left: 16px;
}

/* -- MODERN TOGGLE SWITCH -- */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.2px solid rgba(255, 255, 255, 0.1);
}

.slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 1.5px;
    background-color: #fff;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked+.slider::before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round::before {
    border-radius: 50%;
}


.lock-settings-content {
    padding-top: 24px;
    width: 100%;
    max-width: 500px;
}