:root {
    --morning-sky: linear-gradient(to bottom, #87CEEB, #f4d0c4);
    --afternoon-sky: linear-gradient(to bottom, #0A58CA, #87CEFA);
    --evening-sky: linear-gradient(to bottom, #FF4E50, #F9D423);
    --night-sky: linear-gradient(to bottom, #020c1b, #0a192f, #112240);
    --text-primary: #ffffff;

    /* KESIVERSE EMBLEM THEME ACCENTS */
    --emblem-deep-violet: #19042c;
    --emblem-plum: #2c0b4e;
    --emblem-pink: #ff7eb3;
    --emblem-rose: #f48fb1;
    --emblem-amethyst: #b388ff;
    --emblem-gold: #ffd54f;
    --emblem-cyan: #7ce8ff;
    --emblem-gradient: linear-gradient(135deg, #ff7eb3 0%, #b388ff 55%, #7ce8ff 100%);
    --emblem-surface: linear-gradient(160deg, rgba(28, 10, 48, 0.94) 0%, rgba(15, 18, 38, 0.96) 100%);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
    user-select: none; 
}

html, body {
    font-family: 'Montserrat', sans-serif; 
    color: var(--text-primary);
    overflow: hidden; 
    height: 100vh; 
    height: 100dvh; 
    width: 100vw;
    background: var(--night-sky); 
    transition: background 4s ease-in-out;
    position: fixed;
    inset: 0;
}

/* -------------------------------------
   CLEAN DARK ROYAL PURPLE SPLASH SCREEN
---------------------------------------- */
#splashScreen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #1f0538 0%, #120224 55%, #070010 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}

.splash-subtle-glow {
    position: absolute;
    width: clamp(200px, 65vw, 290px);
    height: clamp(200px, 65vw, 290px);
    background: radial-gradient(circle, rgba(179, 136, 255, 0.14) 0%, rgba(255, 126, 179, 0.06) 50%, transparent 75%);
    filter: blur(35px);
    pointer-events: none;
}

#splashLogo {
    position: relative;
    z-index: 2;
    width: clamp(220px, 78vw, 340px); 
    max-height: 65dvh;
    object-fit: contain;
    height: auto;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.75));
    animation: splashPulse 2.6s infinite ease-in-out;
}

@keyframes splashPulse {
    0% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.04); 
    }
    100% { 
        transform: scale(1); 
    }
}

#splashScreen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* -------------------------------------
   ROYAL KESIVERSE LOGIN SCREEN
---------------------------------------- */
.login-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #22063d 0%, #110221 60%, #06000d 100%);
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(14px, 4vw, 24px);
    overflow-y: auto;
    opacity: 1;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.login-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-ambient-glow {
    position: absolute;
    width: clamp(220px, 70vw, 320px);
    height: clamp(220px, 70vw, 320px);
    background: radial-gradient(circle, rgba(255, 126, 179, 0.14) 0%, rgba(179, 136, 255, 0.1) 50%, transparent 75%);
    filter: blur(40px);
    pointer-events: none;
}

.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 390px;
    max-height: 92dvh;
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(32, 8, 56, 0.88) 0%, rgba(14, 4, 28, 0.94) 100%);
    border: 1px solid rgba(255, 182, 225, 0.28);
    border-radius: 26px;
    padding: clamp(20px, 4dvh, 32px) clamp(18px, 5vw, 26px);
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.login-emblem-img {
    width: clamp(110px, 36vw, 155px);
    max-height: 22dvh;
    object-fit: contain;
    height: auto;
    margin-bottom: 10px;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.65));
}

.login-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.15rem, 4.5vw, 1.45rem);
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(to right, #ffffff, #ffb6e1, #ffd54f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: clamp(0.62rem, 2.5vw, 0.72rem);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--emblem-rose);
    margin-bottom: clamp(16px, 3dvh, 24px);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2dvh, 14px);
}

.login-input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.login-input {
    margin-bottom: 0 !important;
    background: rgba(8, 2, 18, 0.65) !important;
    border: 1px solid rgba(255, 182, 225, 0.28) !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.login-input:focus {
    border-color: var(--emblem-pink) !important;
    box-shadow: 0 0 12px rgba(255, 126, 179, 0.25);
}

.password-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field-wrapper .login-input {
    padding-right: 46px;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #ffd8ee;
    font-size: 1.05rem;
    cursor: pointer;
    opacity: 0.75;
}

.login-error-msg {
    font-size: 0.8rem;
    color: #ff6b9d;
    background: rgba(255, 78, 136, 0.12);
    border: 1px solid rgba(255, 78, 136, 0.35);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 500;
}

.login-submit-btn {
    width: 100%;
    padding: clamp(11px, 2dvh, 14px) 20px;
    margin-top: 6px;
    font-size: clamp(0.82rem, 3.2vw, 0.92rem);
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 25px;
}

@keyframes loginShake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-8px);
    }
    40%, 80% {
        transform: translateX(8px);
    }
}

.shake-error {
    animation: loginShake 0.4s ease;
}

/* -------------------------------------
   CLOUD SYNC STATUS BADGE
---------------------------------------- */
.cloud-sync-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 182, 225, 0.2);
    font-size: clamp(0.55rem, 2vw, 0.62rem);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 240, 250, 0.85);
}

.sync-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffd54f;
    box-shadow: 0 0 8px #ffd54f;
}

.sync-dot.synced {
    background: #00e676;
    box-shadow: 0 0 8px #00e676;
}

.sync-dot.syncing {
    background: #7ce8ff;
    box-shadow: 0 0 8px #7ce8ff;
    animation: splashPulse 1s infinite ease-in-out;
}

/* -------------------------------------
   BACKGROUND & UNIVERSAL RESPONSIVE CORE LAYOUT
---------------------------------------- */
#environmentCanvas { 
    position: absolute; 
    inset: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 1; 
}

.vignette-overlay { 
    position: absolute; 
    inset: 0; 
    background: radial-gradient(circle at center, transparent 40%, rgba(18, 3, 33, 0.65) 120%); 
    pointer-events: none; 
    z-index: 2; 
}

.ui-layer { 
    position: relative; 
    z-index: 10; 
    height: 100vh; 
    height: 100dvh; 
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    padding-top: calc(env(safe-area-inset-top, 12px) + clamp(48px, 7dvh, 75px)); 
    padding-bottom: calc(env(safe-area-inset-bottom, 12px) + clamp(16px, 4dvh, 42px)); 
    padding-left: clamp(14px, 5vw, 28px); 
    padding-right: clamp(14px, 5vw, 28px); 
    pointer-events: none; 
}

.glass-effect {
    background: linear-gradient(135deg, rgba(255, 126, 179, 0.07), rgba(179, 136, 255, 0.05)); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); 
    border: 1px solid rgba(255, 182, 225, 0.22);
    box-shadow: 0 25px 55px rgba(12, 2, 24, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Strictly inside the home time screen */
.dev-panel { 
    position: absolute; 
    top: calc(env(safe-area-inset-top, 8px) + 8px); 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 12; 
    display: flex; 
    gap: 4px; 
    padding: 4px 8px; 
    border-radius: 20px; 
    pointer-events: auto; 
    max-width: 94vw;
    white-space: nowrap;
    transition: opacity 0.25s ease;
}

.dev-panel button { 
    background: rgba(255, 126, 179, 0.12); 
    border: 1px solid rgba(255, 182, 225, 0.3); 
    color: white; 
    padding: 5px clamp(7px, 2.2vw, 11px); 
    border-radius: 15px; 
    font-size: clamp(0.62rem, 2.3vw, 0.72rem); 
    cursor: pointer; 
}

.floating-time-widget { 
    align-self: center; 
    text-align: center; 
    width: 100%;
    max-width: 380px;
    padding: clamp(14px, 2.5dvh, 22px) clamp(16px, 5vw, 36px); 
    border-radius: clamp(26px, 6vw, 40px); 
    animation: float 6s ease-in-out infinite; 
}

#liveClock { 
    font-family: 'Cinzel', serif; 
    font-size: clamp(2.15rem, 9.5vw, 3.6rem); 
    font-weight: 500; 
    letter-spacing: clamp(2px, 1vw, 4px); 
    text-shadow: 0 4px 22px rgba(255, 126, 179, 0.45); 
    margin-bottom: 4px; 
    white-space: nowrap;
}

.date-container { 
    display: flex; 
    flex-wrap: wrap;
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    font-size: clamp(0.62rem, 2.4vw, 0.75rem); 
    font-weight: 500; 
    letter-spacing: 1.5px; 
    color: rgba(255, 240, 250, 0.95); 
    text-shadow: 0 2px 10px rgba(0,0,0,0.8); 
    text-transform: uppercase; 
}

.divider { 
    font-size: 0.65rem; 
    color: var(--emblem-gold); 
}

.interaction-zone { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: clamp(10px, 2dvh, 15px); 
    text-align: center; 
    width: 100%;
    pointer-events: auto; 
}

.cinematic-quote { 
    font-size: clamp(0.88rem, 3.4vw, 1.05rem); 
    font-weight: 300; 
    font-style: italic; 
    line-height: 1.55; 
    letter-spacing: 0.5px; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.9); 
    max-width: 94%; 
}

.app-menu { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(6px, 2vw, 10px); 
    width: 100%; 
    max-width: 420px;
}

.premium-action-btn {
    padding: clamp(10px, 1.8dvh, 13px) clamp(8px, 2.5vw, 18px); 
    border-radius: 50px; 
    color: white; 
    background: linear-gradient(135deg, rgba(255, 126, 179, 0.18), rgba(179, 136, 255, 0.15)); 
    border: 1px solid rgba(255, 182, 225, 0.35); 
    font-family: 'Montserrat', sans-serif; 
    font-size: clamp(0.65rem, 2.5vw, 0.76rem); 
    font-weight: 600; 
    letter-spacing: 0.8px; 
    text-transform: uppercase; 
    cursor: pointer; 
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(25, 4, 44, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.emblem-btn {
    background: linear-gradient(135deg, rgba(255, 126, 179, 0.4), rgba(179, 136, 255, 0.4));
    border: 1px solid rgba(255, 213, 79, 0.45);
}

.premium-action-btn:active { 
    transform: scale(0.95); 
    background: rgba(255, 126, 179, 0.35); 
}

.premium-action-btn:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

.full-width { 
    width: 100%; 
    margin-top: 10px; 
}

.made-with-love { 
    font-family: 'Cinzel', serif; 
    font-size: clamp(0.58rem, 2.2vw, 0.68rem); 
    letter-spacing: 2.5px; 
    color: #ffd8ee; 
    text-shadow: 0 2px 8px rgba(0,0,0,0.8); 
    text-transform: uppercase; 
    margin-top: 4px; 
}

/* -------------------------------------
   MODALS (ADAPTIVE TO ALL PHONE SIZES)
---------------------------------------- */
.modal { 
    position: fixed; 
    inset: 0; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: calc(env(safe-area-inset-top, 10px) + 10px) clamp(10px, 3vw, 18px) calc(env(safe-area-inset-bottom, 10px) + 10px);
    z-index: 300; 
    pointer-events: auto; 
    opacity: 1; 
    transition: opacity 0.4s ease; 
}

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

.modal-backdrop { 
    position: absolute; 
    inset: 0; 
    background: rgba(14, 2, 28, 0.82); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
}

.glowing-envelope { 
    position: relative; 
    z-index: 2; 
    width: 100%; 
    max-width: 420px; 
    transform: translateY(0); 
    transition: transform 0.4s ease; 
}

.wide-envelope { 
    width: 100%;
    max-width: 500px; 
}

.modal.hidden .glowing-envelope { 
    transform: translateY(30px); 
}

.envelope-glow { 
    position: absolute; 
    inset: -3px; 
    background: var(--emblem-gradient); 
    border-radius: 24px; 
    filter: blur(14px); 
    opacity: 0.65; 
}

.envelope-content { 
    position: relative; 
    background: var(--emblem-surface); 
    backdrop-filter: blur(24px); 
    border: 1px solid rgba(255, 182, 225, 0.28); 
    padding: clamp(16px, 4vw, 25px); 
    border-radius: 22px; 
    text-align: center; 
    max-height: 85dvh; 
    display: flex; 
    flex-direction: column; 
}

.scrollable { 
    overflow-y: auto; 
    overflow-x: hidden; 
    -webkit-overflow-scrolling: touch;
}

.modal-title { 
    font-family: 'Cinzel', serif; 
    font-size: clamp(1.2rem, 5vw, 1.5rem); 
    margin-bottom: 14px; 
    background: linear-gradient(to right, #ffffff, #ffb6e1, #ffd54f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(255, 126, 179, 0.25); 
    flex-shrink: 0; 
}

/* -------------------------------------
   HANDWRITTEN DIARY READER POPUP
---------------------------------------- */
.diary-reader-card {
    text-align: left;
    padding: clamp(16px, 4vw, 22px);
}

.reader-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.reader-date-badge {
    font-size: clamp(0.68rem, 2.5vw, 0.75rem);
    color: var(--emblem-gold);
    background: rgba(255, 213, 79, 0.12);
    border: 1px solid rgba(255, 213, 79, 0.35);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.reader-caption-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.15rem, 4.5vw, 1.4rem);
    color: #ffffff;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 182, 225, 0.2);
    padding-bottom: 10px;
    word-wrap: break-word;
}

.handwriting-paper {
    background: linear-gradient(180deg, rgba(255, 240, 250, 0.06) 0%, rgba(255, 182, 225, 0.03) 100%);
    border: 1px solid rgba(255, 182, 225, 0.25);
    border-radius: 16px;
    padding: clamp(14px, 4vw, 20px);
    min-height: 140px;
    margin-bottom: 18px;
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.4);
    line-height: 1.95;
}

.handwriting-text {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.3rem, 5vw, 1.55rem);
    font-weight: 600;
    color: #ffeef7;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(255, 126, 179, 0.35);
    display: inline;
    word-wrap: break-word;
}

.handwriting-cursor {
    display: inline-block;
    font-size: 1.2rem;
    margin-left: 4px;
    animation: quillBounce 0.6s infinite alternate ease-in-out;
}

@keyframes quillBounce {
    from {
        transform: translateY(0) rotate(-10deg);
    }
    to {
        transform: translateY(-5px) rotate(5deg);
    }
}

.reader-images-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease, transform 1s ease;
    margin-top: 10px;
}

.reader-images-section.hidden-reveal {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.reader-photos-label {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--emblem-pink);
    margin-bottom: 10px;
    text-align: center;
}

/* -------------------------------------
   GLOBAL FLOATING 3-DOTS ACTION SHEET
---------------------------------------- */
.action-sheet-box {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 320px;
    background: var(--emblem-surface);
    border: 1px solid rgba(255, 182, 225, 0.4);
    border-radius: 22px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
    animation: popInSheet 0.25s ease;
}

@keyframes popInSheet {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.action-sheet-title {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    color: var(--emblem-gold);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 182, 225, 0.2);
    padding-bottom: 8px;
}

.action-sheet-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sheet-option-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 126, 179, 0.14);
    border: 1px solid rgba(255, 182, 225, 0.3);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sheet-option-btn:active {
    transform: scale(0.97);
    background: rgba(255, 126, 179, 0.3);
}

.sheet-option-btn.danger-btn {
    background: rgba(255, 78, 136, 0.18);
    border-color: rgba(255, 78, 136, 0.45);
    color: #ff8da8;
}

/* -------------------------------------
   SOCIAL MEDIA COMPOSER UI
---------------------------------------- */
.social-composer {
    background: rgba(16, 4, 30, 0.55);
    border: 1px solid rgba(255, 182, 225, 0.22);
    border-radius: 16px;
    padding: clamp(12px, 3.5vw, 16px);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.composer-edit-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, rgba(255, 126, 179, 0.25), rgba(179, 136, 255, 0.25));
    border: 1px solid rgba(255, 213, 79, 0.5);
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: clamp(0.72rem, 2.6vw, 0.8rem);
    font-weight: 600;
    color: var(--emblem-gold);
}

.cancel-edit-btn {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 182, 225, 0.35);
    color: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.74rem;
    cursor: pointer;
    flex-shrink: 0;
}

.caption-title-input {
    font-weight: 600;
    border-color: rgba(255, 182, 225, 0.32) !important;
    background: rgba(255, 126, 179, 0.08) !important;
    margin-bottom: 10px;
}

.composer-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.85rem, 3.2vw, 0.92rem);
    line-height: 1.5;
    min-height: 80px;
    resize: none;
    outline: none;
    margin-bottom: 12px;
    user-select: text;
    -webkit-user-select: text;
}

.composer-textarea::placeholder { 
    color: rgba(255, 230, 245, 0.45); 
}

.preview-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px;
    margin-bottom: 12px;
}

.preview-item-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 182, 225, 0.4);
    overflow: visible;
    background: rgba(0, 0, 0, 0.5);
}

.preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
    display: block;
}

.remove-single-pic {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ff4e88;
    color: white;
    border: 2px solid #19042c;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    z-index: 5;
}

/* -------------------------------------
   CUSTOM GLASSMORPHIC @MENTION PICKER
---------------------------------------- */
.custom-mention-wrapper {
    position: relative;
    margin-bottom: 12px;
    text-align: left;
}

.custom-mention-trigger {
    width: 100%;
    background: linear-gradient(90deg, rgba(255, 126, 179, 0.12), rgba(179, 136, 255, 0.12));
    border: 1px solid rgba(255, 182, 225, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    color: #ffd8ee;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.78rem, 2.8vw, 0.84rem);
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.chevron-icon {
    font-size: 0.9rem;
    color: var(--emblem-pink);
}

.custom-mention-dropdown {
    margin-top: 6px;
    background: rgba(22, 6, 40, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 182, 225, 0.35);
    border-radius: 14px;
    max-height: 165px;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.mention-chip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mention-chip-item:hover,
.mention-chip-item:active {
    background: rgba(255, 126, 179, 0.22);
}

.mention-chip-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--emblem-pink);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.mention-chip-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.mention-chip-role {
    font-size: 0.7rem;
    color: var(--emblem-rose);
    margin-left: auto;
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(255, 182, 225, 0.15);
    padding-top: 12px;
}

.icon-btn {
    background: rgba(255, 126, 179, 0.14);
    border: 1px solid rgba(255, 126, 179, 0.35);
    padding: 8px 14px;
    border-radius: 20px;
    color: #ffb6e1;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: clamp(0.78rem, 2.8vw, 0.85rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-btn {
    background: var(--emblem-gradient);
    border: none;
    color: #19042c;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(0.8rem, 2.8vw, 0.88rem);
    padding: 9px 22px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 126, 179, 0.4);
}

.post-btn:disabled { 
    opacity: 0.6; 
    cursor: wait; 
}

/* -------------------------------------
   DIARY SECRET CARDS
---------------------------------------- */
.diary-summary-card {
    background: linear-gradient(135deg, rgba(44, 11, 78, 0.65), rgba(20, 8, 38, 0.85));
    border: 1px solid rgba(255, 182, 225, 0.25);
    border-radius: 16px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.diary-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding-right: 36px;
}

.diary-summary-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.diary-lock-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 126, 179, 0.25), rgba(179, 136, 255, 0.25));
    border: 1px solid rgba(255, 213, 79, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.diary-summary-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 0;
}

.diary-summary-caption {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.95rem, 3.6vw, 1.05rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 3px;
    word-wrap: break-word;
}

.diary-summary-date {
    font-size: 0.7rem;
    color: var(--emblem-rose);
    letter-spacing: 0.5px;
}

.diary-Tap-hint {
    font-size: 0.68rem;
    color: var(--emblem-gold);
    margin-top: 3px;
    font-weight: 500;
}

/* -------------------------------------
   3-DOTS (⋮) BUTTON
---------------------------------------- */
.action-menu-wrapper {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 25;
}

.three-dots-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 182, 225, 0.3);
    color: #ffd8ee;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.15rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.three-dots-btn:active {
    background: rgba(255, 126, 179, 0.35);
}

/* -------------------------------------
   PEOPLE TOP ACTIONS & FORMS
---------------------------------------- */
.people-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.input-label { 
    display: block; 
    font-size: 0.72rem; 
    color: var(--emblem-pink); 
    margin-left: 4px; 
    margin-bottom: 5px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-weight: 600; 
    text-align: left;
}

.add-form { 
    margin-top: 20px; 
    border-top: 1px solid rgba(255, 182, 225, 0.18); 
    padding-top: 15px; 
}

/* Stacks cleanly on narrow phones so Date & Time inputs never overflow */
.datetime-group { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px; 
    margin-bottom: 10px; 
}

.datetime-field {
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 0;
}

.pic-upload-container { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 15px; 
    justify-content: center; 
}

.pic-preview { 
    width: 50px; 
    height: 50px; 
    border-radius: 10px; 
    border: 2px solid var(--emblem-pink); 
    object-fit: cover; 
}

.glass-input { 
    width: 100%; 
    background: rgba(12, 3, 24, 0.55); 
    border: 1px solid rgba(255, 182, 225, 0.25); 
    border-radius: 12px; 
    color: white; 
    font-family: 'Montserrat', sans-serif; 
    font-size: clamp(0.84rem, 3vw, 0.9rem); 
    padding: 11px 12px; 
    outline: none; 
    margin-bottom: 10px; 
    color-scheme: dark; 
    user-select: text;
    -webkit-user-select: text;
}

.glass-input::placeholder { 
    color: rgba(255, 230, 245, 0.45); 
}

.textarea-small { 
    height: 80px; 
    resize: none; 
}

/* -------------------------------------
   SLIDERS
---------------------------------------- */
.slider-group { 
    text-align: left; 
    margin-bottom: 12px; 
    font-size: 0.85rem; 
    color: rgba(255,255,255,0.9); 
}

.slider-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
}

.glass-slider { 
    width: 100%; 
    -webkit-appearance: none; 
    height: 8px; 
    border-radius: 4px; 
    outline: none; 
    background: rgba(255,255,255,0.2); 
}

.glass-slider::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    appearance: none; 
    width: 18px; 
    height: 18px; 
    border-radius: 50%; 
    background: white; 
    cursor: pointer; 
    box-shadow: 0 0 5px rgba(0,0,0,0.5); 
}

.love-slider::-webkit-slider-thumb { 
    background: #ff4e88; 
}

.hate-slider::-webkit-slider-thumb { 
    background: #8B0000; 
}

.imp-slider::-webkit-slider-thumb { 
    background: #ffd54f; 
}

/* -------------------------------------
   STANDARD LISTS (PEOPLE & REMINDERS)
---------------------------------------- */
.data-list { 
    display: flex; 
    flex-direction: column; 
    gap: 14px; 
    overflow-y: auto; 
    text-align: left; 
    padding-right: 4px; 
}

.list-item { 
    background: linear-gradient(135deg, rgba(44, 11, 78, 0.5), rgba(18, 8, 34, 0.75)); 
    border: 1px solid rgba(255, 182, 225, 0.22); 
    padding: 14px; 
    border-radius: 14px; 
    position: relative; 
    font-size: 0.85rem; 
    display: flex; 
    flex-direction: column; 
}

.list-item-row { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    width: 100%; 
    padding-right: 35px;
}

.list-item-img { 
    width: 48px; 
    height: 48px; 
    border-radius: 50%; 
    object-fit: cover; 
    flex-shrink: 0; 
    border: 2px solid var(--emblem-pink); 
}

.list-item-content { 
    flex-grow: 1; 
    min-width: 0;
}

.list-item h4 { 
    font-family: 'Cinzel', serif; 
    font-size: clamp(0.98rem, 3.6vw, 1.1rem); 
    margin-bottom: 4px; 
    color: #fff; 
    word-wrap: break-word;
}

.list-item p { 
    color: rgba(255,255,255,0.8); 
    line-height: 1.45; 
    margin-bottom: 3px; 
    word-wrap: break-word;
}

/* -------------------------------------
   INSTAGRAM / FACEBOOK STYLE MEMORY FEED 
---------------------------------------- */
.insta-post { 
    background: linear-gradient(160deg, rgba(28, 8, 48, 0.88), rgba(12, 14, 30, 0.92)); 
    border: 1px solid rgba(255, 182, 225, 0.22); 
    border-radius: 16px; 
    overflow: hidden; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 0 10px 24px rgba(0,0,0,0.45); 
}

.insta-header { 
    display: flex; 
    align-items: center; 
    padding: 14px 48px 14px 15px; 
    border-bottom: 1px solid rgba(255, 182, 225, 0.1); 
}

.insta-avatar { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    object-fit: cover; 
    margin-right: 12px; 
    border: 2px solid var(--emblem-pink); 
    flex-shrink: 0;
}

.insta-user-info { 
    display: flex; 
    flex-direction: column; 
    min-width: 0;
}

.insta-name { 
    font-weight: 600; 
    font-size: clamp(0.84rem, 3vw, 0.92rem); 
    color: #ffd8ee; 
    font-family: 'Montserrat', sans-serif; 
    word-wrap: break-word;
}

.insta-date { 
    font-size: 0.68rem; 
    color: rgba(255, 213, 79, 0.8); 
    margin-top: 2px; 
}

.memory-caption-heading {
    font-family: 'Cinzel', serif;
    font-size: 1.02rem;
    color: #ffffff;
    margin-bottom: 6px;
    font-weight: 700;
}

.feed-image-gallery {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
}

.insta-image { 
    max-height: 360px; 
    width: 100%;
    object-fit: cover; 
    display: block;
    scroll-snap-align: center;
    flex-shrink: 0;
}

.insta-image.multi {
    width: 88%;
    border-radius: 8px;
    margin: 6px 0 6px 6px;
}

.insta-footer { 
    padding: 14px; 
}

.insta-caption { 
    font-size: clamp(0.86rem, 3.1vw, 0.92rem); 
    color: rgba(255,255,255,0.92); 
    line-height: 1.55; 
    word-wrap: break-word;
}

.mention-link { 
    color: var(--emblem-pink); 
    font-weight: 600; 
    cursor: pointer; 
    background: rgba(255, 126, 179, 0.15);
    border: 1px solid rgba(255, 126, 179, 0.35);
    padding: 1px 7px;
    border-radius: 8px;
    text-decoration: none; 
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.86rem;
}

.mention-link:active { 
    background: rgba(255, 126, 179, 0.35);
}

/* -------------------------------------
   FULL SCREEN PROFILE MODAL
---------------------------------------- */
.full-profile-container { 
    position: fixed; 
    inset: 0;
    z-index: 2; 
    width: 100%; 
    height: 100dvh; 
    background: radial-gradient(circle at top, #2c0b4e 0%, #110321 60%, #090214 100%); 
    backdrop-filter: blur(20px); 
    overflow-y: auto; 
    padding: calc(env(safe-area-inset-top, 16px) + 32px) clamp(14px, 4vw, 22px) calc(env(safe-area-inset-bottom, 16px) + 30px); 
    text-align: center; 
}

.profile-header { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    margin-bottom: 26px; 
    border-bottom: 1px solid rgba(255, 182, 225, 0.2); 
    padding-bottom: 20px; 
}

.profile-hero-img { 
    width: clamp(95px, 28vw, 120px); 
    height: clamp(95px, 28vw, 120px); 
    border-radius: 50%; 
    object-fit: cover; 
    border: 3px solid var(--emblem-pink); 
    margin-bottom: 14px; 
    box-shadow: 0 10px 30px rgba(255, 126, 179, 0.35); 
}

.profile-header h1 { 
    font-family: 'Cinzel', serif; 
    font-size: clamp(1.6rem, 6.5vw, 2.2rem); 
    margin-bottom: 5px; 
    word-wrap: break-word;
}

.profile-role { 
    font-size: clamp(0.8rem, 3vw, 0.95rem); 
    color: var(--emblem-gold); 
    margin-bottom: 14px; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
}

.profile-stats { 
    display: flex; 
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(12px, 4vw, 20px); 
    font-weight: 600; 
    font-size: clamp(0.8rem, 3vw, 0.92rem);
    background: rgba(255, 126, 179, 0.1); 
    border: 1px solid rgba(255, 182, 225, 0.25);
    padding: 10px 18px; 
    border-radius: 20px; 
    margin-bottom: 14px; 
}

.profile-bio { 
    font-style: italic; 
    color: rgba(255,255,255,0.85); 
    max-width: 88%; 
    line-height: 1.6; 
    font-size: clamp(0.85rem, 3.2vw, 0.95rem);
}

.profile-memories {
    max-width: 500px;
    margin: 0 auto;
}

.profile-memories h3 { 
    font-family: 'Cinzel', serif; 
    font-size: clamp(1.25rem, 5vw, 1.5rem); 
    margin-bottom: 15px; 
    border-bottom: 1px solid rgba(255, 182, 225, 0.3); 
    padding-bottom: 10px; 
    display: inline-block; 
}

/* -------------------------------------
   ALARM RINGING ANIMATION
---------------------------------------- */
.alarm-bell-icon {
    font-size: 3.2rem;
    margin-bottom: 10px;
    display: inline-block;
    animation: bellRing 0.5s infinite alternate ease-in-out;
}

@keyframes bellRing {
    0% {
        transform: rotate(-18deg) scale(1.05);
    }
    100% {
        transform: rotate(18deg) scale(1.05);
    }
}

/* -------------------------------------
   FLOATING WORLD UI (CHATGUM STYLE)
---------------------------------------- */
#floatingContainer { 
    position: absolute; 
    inset: 0; 
    overflow: hidden; 
    background: radial-gradient(circle at center, rgba(44, 11, 78, 0.65), rgba(8, 2, 18, 0.85)); 
    backdrop-filter: blur(8px); 
}

.floating-person { 
    position: absolute; 
    width: 75px; 
    height: 75px; 
    border-radius: 16px; 
    background-size: cover; 
    background-position: center; 
    border: 2px solid var(--emblem-pink); 
    box-shadow: 0 6px 18px rgba(255, 126, 179, 0.35); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    cursor: pointer; 
}

.floating-person:active { 
    transform: scale(0.9); 
}

.floating-name { 
    background: rgba(25, 4, 44, 0.82); 
    width: 100%; 
    text-align: center; 
    color: #ffd8ee; 
    font-size: 0.65rem; 
    padding: 3px 0; 
    font-family: 'Montserrat', sans-serif; 
    font-weight: 600; 
    position: absolute; 
    bottom: 0; 
}

.hidden {
    display: none !important;
}

@keyframes float { 
    0%, 100% { 
        transform: translateY(0); 
    } 
    50% { 
        transform: translateY(-8px); 
    } 
}

/* -------------------------------------
   COMPACT / SHORT SCREEN SAFEGUARDS
---------------------------------------- */
@media (max-height: 680px) {
    .ui-layer {
        padding-top: calc(env(safe-area-inset-top, 6px) + 42px);
        padding-bottom: calc(env(safe-area-inset-bottom, 6px) + 12px);
    }
    .floating-time-widget {
        padding: 10px 20px;
    }
    #liveClock {
        font-size: 2rem;
    }
    .login-emblem-img {
        width: 95px;
    }
}

/* -------------------------------------
   ANTI-WATERMARK / ANTI-BADGE SHIELD
---------------------------------------- */
iframe[title*="Netlify"],
div[class*="netlify"],
a[href*="netlify.com"],
a[href*="tiiny.host"] {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
