/* =========================================================
   JOURNAL — LIGHT GLASS DESIGN
========================================================= */


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    font-size: 16px;
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        "Segoe UI",
        Inter,
        Helvetica,
        Arial,
        sans-serif;

    color: #202124;

    background:
        radial-gradient(
            circle at 12% 8%,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.75) 18%,
            transparent 42%
        ),
        radial-gradient(
            circle at 88% 18%,
            rgba(220, 224, 229, 0.7),
            transparent 38%
        ),
        radial-gradient(
            circle at 50% 80%,
            rgba(255, 255, 255, 0.9),
            transparent 42%
        ),
        linear-gradient(
            135deg,
            #eef0ef,
            #f7f8f7 45%,
            #eceeec
        );

    -webkit-font-smoothing: antialiased;

    overflow-x: hidden;
}


/* =========================================================
   AMBIENT BACKGROUND
========================================================= */

body::before {
    content: "";

    position: fixed;

    width: 600px;
    height: 600px;

    top: -220px;
    left: -180px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.95),
            rgba(220, 224, 228, 0.35) 45%,
            transparent 70%
        );

    filter: blur(35px);

    pointer-events: none;

    animation:
        liquidFloatOne 18s ease-in-out infinite alternate;

    z-index: -1;
}

body::after {
    content: "";

    position: fixed;

    width: 520px;
    height: 520px;

    right: -180px;
    bottom: -180px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(210, 215, 220, 0.65),
            rgba(245, 246, 246, 0.35) 45%,
            transparent 72%
        );

    filter: blur(45px);

    pointer-events: none;

    animation:
        liquidFloatTwo 22s ease-in-out infinite alternate;

    z-index: -1;
}


@keyframes liquidFloatOne {

    0% {
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }

    50% {
        transform:
            translate3d(90px, 45px, 0)
            scale(1.12);
    }

    100% {
        transform:
            translate3d(30px, 100px, 0)
            scale(0.96);
    }

}


@keyframes liquidFloatTwo {

    0% {
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }

    50% {
        transform:
            translate3d(-70px, -50px, 0)
            scale(1.15);
    }

    100% {
        transform:
            translate3d(-30px, -100px, 0)
            scale(0.95);
    }

}


/* =========================================================
   TOP BAR — GLASS
========================================================= */

.topbar {
    height: 66px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    position: sticky;
    top: 12px;
    z-index: 100;

    width: calc(100% - 24px);

    margin: 12px auto 0;

    border: 1px solid rgba(255, 255, 255, 0.72);

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.58),
            rgba(255, 255, 255, 0.28)
        );

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.85) inset,
        0 -1px 1px rgba(255, 255, 255, 0.25) inset,
        0 8px 30px rgba(40, 45, 50, 0.08),
        0 25px 70px rgba(40, 45, 50, 0.055);

    backdrop-filter:
        blur(28px)
        saturate(180%)
        brightness(1.08);

    -webkit-backdrop-filter:
        blur(28px)
        saturate(180%)
        brightness(1.08);

    isolation: isolate;

    overflow: hidden;

    transition:
        box-shadow 0.4s ease,
        transform 0.4s ease;
}
.topbar::before {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: inherit;

    background:
        linear-gradient(
            115deg,
            rgba(255, 255, 255, 0.5),
            transparent 35%,
            transparent 65%,
            rgba(255, 255, 255, 0.18)
        );

    pointer-events: none;

    z-index: -1;
}


.topbar::after {
    content: "";

    position: absolute;

    top: 0;
    left: 8%;

    width: 84%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.95),
            transparent
        );

    opacity: 0.9;

    pointer-events: none;
}


/* =========================================================
   BRAND
========================================================= */

.brand {
    display: flex;
    align-items: center;

    gap: 11px;

    font-weight: 600;

    text-decoration: none;

    color: inherit;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}


.brand:hover {
    transform: translateY(-1px);
}


.brand:active {
    transform: scale(0.96);
}


.brand-mark {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background:
        linear-gradient(
            145deg,
            #2c2d2f,
            #111214
        );

    color: white;

    font-size: 14px;
    font-weight: 700;

    box-shadow:
        0 5px 13px rgba(20, 20, 20, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.brand:hover .brand-mark {
    transform: rotate(-4deg) scale(1.05);

    box-shadow:
        0 7px 17px rgba(20, 20, 20, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}


.brand-name {
    font-size: 15px;

    letter-spacing: -0.25px;
}

.brand-subtitle {
    margin-left: 2px;

    color: #a4a5a3;

    font-size: 10px;

    font-weight: 400;

    letter-spacing: 0.2px;

    white-space: nowrap;

    opacity: 0.8;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.brand:hover .brand-subtitle {
    opacity: 1;

    transform: translateX(1px);
}


/* =========================================================
   NAVIGATION
========================================================= */

.navigation {
    display: flex;
    align-items: center;

    gap: 4px;

    padding: 4px;

    border:
        1px solid rgba(255, 255, 255, 0.55);

    border-radius: 13px;

    background:
        rgba(255, 255, 255, 0.24);

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.8) inset,
        0 4px 14px rgba(0, 0, 0, 0.035);

    backdrop-filter:
        blur(18px)
        saturate(170%);

    -webkit-backdrop-filter:
        blur(18px)
        saturate(170%);
}


.nav-button {
    border: none;

    background: transparent;

    padding: 8px 16px;

    border-radius: 8px;

    color: #777;

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    position: relative;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}


.nav-button:hover {
    color: #202124;

    transform: translateY(-1px);
}


.nav-button:active {
    transform: scale(0.95);
}


.nav-button.active {
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.78),
            rgba(255, 255, 255, 0.42)
        );

    color: #202124;

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.95) inset,
        0 3px 10px rgba(0, 0, 0, 0.07);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);
}


/* =========================================================
   APP
========================================================= */

.app {
    width: min(1050px, calc(100% - 48px));

    margin: 0 auto;

    padding: 52px 0 80px;
}


.view {
    display: none;

    animation:
        viewEnter 0.5s cubic-bezier(.2,.8,.2,1);
}


.view.active {
    display: block;
}


@keyframes viewEnter {

    from {
        opacity: 0;
        transform:
            translateY(12px)
            scale(0.99);
    }

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

}


/* =========================================================
   PAGE HEADER
========================================================= */

.page-header {
    margin-bottom: 28px;

    animation:
        headerEnter 0.55s ease both;
}


@keyframes headerEnter {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

}


.eyebrow {
    margin-bottom: 9px;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1.8px;

    color: #9b9d9d;
}


.page-header h1 {
    font-size: clamp(30px, 4vw, 40px);

    line-height: 1.05;

    letter-spacing: -1.6px;

    font-weight: 600;
}


.subtitle {
    margin-top: 9px;

    color: #888c8c;

    font-size: 13px;
}


/* =========================================================
   CALENDAR CONTAINER — GLASS
========================================================= */

.calendar-container {
    position: relative;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.58),
            rgba(255, 255, 255, 0.24)
        );

    border: 1px solid rgba(255, 255, 255, 0.72);

    border-radius: 20px;

    overflow: hidden;

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.9) inset,
        0 -1px 1px rgba(255, 255, 255, 0.2) inset,
        0 20px 60px rgba(40, 45, 50, 0.075),
        0 5px 18px rgba(40, 45, 50, 0.035);

    backdrop-filter:
        blur(30px)
        saturate(175%)
        brightness(1.08);

    -webkit-backdrop-filter:
        blur(30px)
        saturate(175%)
        brightness(1.08);

    transition:
        transform 0.4s ease,
        box-shadow 0.4s ease;
}


.calendar-container::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.42),
            transparent 35%,
            transparent 70%,
            rgba(255, 255, 255, 0.12)
        );

    pointer-events: none;

    z-index: 5;
}


/* =========================================================
   CALENDAR TOOLBAR
========================================================= */

.calendar-toolbar {
    height: 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 22px;

    border-bottom:
        1px solid rgba(225, 226, 224, 0.8);

    background:
        rgba(255, 255, 255, 0.28);
}


.calendar-toolbar h2 {
    min-width: 190px;

    text-align: center;

    font-size: 16px;

    font-weight: 600;

    letter-spacing: -0.3px;
}


.icon-button {
    width: 35px;
    height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(220, 221, 219, 0.9);

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.72);

    color: #555;

    font-size: 22px;

    cursor: pointer;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.035),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);

    transition:
        background 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}


.icon-button:hover {
    background: white;

    transform: translateY(-2px);

    box-shadow:
        0 7px 15px rgba(0, 0, 0, 0.08);
}


.icon-button:active {
    transform: scale(0.9);
}


/* =========================================================
   WEEKDAYS
========================================================= */

.weekdays {
    display: grid;

    grid-template-columns: repeat(7, 1fr);

    border-bottom:
        1px solid rgba(228, 229, 226, 0.8);

    background:
        rgba(248, 249, 247, 0.55);
}


.weekdays div {
    padding: 10px 8px;

    text-align: right;

    font-size: 10px;

    font-weight: 600;

    color: #9a9b99;

    text-transform: uppercase;

    letter-spacing: 0.8px;
}


/* =========================================================
   CALENDAR GRID
========================================================= */

.calendar-grid {
    display: grid;

    grid-template-columns: repeat(7, 1fr);
}


.calendar-day {
    min-height: 105px;

    padding: 9px;

    border-right:
        1px solid rgba(230, 231, 228, 0.8);

    border-bottom:
        1px solid rgba(230, 231, 228, 0.8);

    cursor: pointer;

    position: relative;

    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.calendar-day:nth-child(7n) {
    border-right: none;
}


.calendar-day:hover {
    background:
        rgba(255, 255, 255, 0.68);

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);

    z-index: 2;
}


.calendar-day:active {
    transform: scale(0.985);
}


.calendar-day.empty {
    background:
        rgba(245, 246, 244, 0.25);

    cursor: default;
}


.day-number {
    width: 27px;
    height: 27px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-left: auto;

    border-radius: 50%;

    font-size: 12px;

    color: #666;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


.calendar-day:hover .day-number {
    transform: scale(1.08);

    background:
        rgba(235, 236, 234, 0.8);
}


.calendar-day.today .day-number {
    background:
        linear-gradient(
            145deg,
            #303133,
            #171819
        );

    color: white;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.17);
}


/* =========================================================
   CALENDAR ENTRY
========================================================= */

.calendar-entry {
    margin-top: 10px;

    padding: 7px 8px;

    border-radius: 7px;

    background:
        rgba(235, 236, 234, 0.72);

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    font-size: 11px;

    color: #444;

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}


.calendar-day:hover .calendar-entry {
    transform: translateY(-1px);

    background:
        rgba(225, 226, 224, 0.9);

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.045);
}


.calendar-entry.has-image {
    background:
        rgba(225, 226, 224, 0.85);
}


.calendar-entry-dot {
    width: 5px;
    height: 5px;

    display: inline-block;

    margin-right: 5px;

    border-radius: 50%;

    background: #202124;
}


/* =========================================================
   JOURNAL HEADER
========================================================= */

.journal-header {
    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    margin-bottom: 45px;

    animation:
        headerEnter 0.45s ease both;
}


.back-button {
    justify-self: start;

    border: none;

    background: transparent;

    color: #777;

    font-size: 13px;

    cursor: pointer;

    transition:
        color 0.2s ease,
        transform 0.25s ease;
}


.back-button:hover {
    color: #202124;

    transform: translateX(-3px);
}


.back-button:active {
    transform: translateX(-5px) scale(0.97);
}


.journal-date {
    text-align: center;
}


.journal-date h1 {
    font-size: 25px;

    letter-spacing: -0.8px;

    font-weight: 600;
}


.journal-date p:last-child {
    margin-top: 7px;

    color: #999;

    font-size: 12px;
}


.journal-actions {
    justify-self: end;

    display: flex;
    align-items: center;

    gap: 16px;
}


.save-status {
    font-size: 11px;

    color: #aaa;

    transition:
        opacity 0.3s ease;
}


.danger-button {
    padding: 8px 12px;

    border: 1px solid rgba(225, 226, 223, 0.9);

    border-radius: 9px;

    background:
        rgba(255, 255, 255, 0.65);

    color: #888;

    font-size: 12px;

    cursor: pointer;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.025);

    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}


.danger-button:hover {
    color: #b33;

    border-color: #e1caca;

    background: rgba(255, 250, 250, 0.8);

    transform: translateY(-1px);

    box-shadow:
        0 5px 12px rgba(120, 40, 40, 0.06);
}


.danger-button:active {
    transform: scale(0.95);
}


/* =========================================================
   JOURNAL PAGE — GLASS
========================================================= */

.journal-page {
    position: relative;

    max-width: 780px;

    margin: 0 auto;

    padding: 50px 65px 70px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.64),
            rgba(255, 255, 255, 0.28)
        );

    border:
        1px solid rgba(255, 255, 255, 0.78);

    border-radius: 22px;

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.95) inset,
        0 -1px 1px rgba(255, 255, 255, 0.18) inset,
        0 25px 75px rgba(40, 45, 50, 0.085),
        0 8px 25px rgba(40, 45, 50, 0.04);

    backdrop-filter:
        blur(32px)
        saturate(180%)
        brightness(1.08);

    -webkit-backdrop-filter:
        blur(32px)
        saturate(180%)
        brightness(1.08);

    overflow: hidden;

    animation:
        pageFloatIn 0.55s cubic-bezier(.2,.8,.2,1);
}


.journal-page::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.38),
            transparent 32%,
            transparent 72%,
            rgba(255, 255, 255, 0.1)
        );

    pointer-events: none;
}


@keyframes pageFloatIn {

    from {
        opacity: 0;
        transform:
            translateY(18px)
            scale(0.985);
    }

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

}


.journal-content {
    width: 100%;
}


/* =========================================================
   TITLE
========================================================= */

.entry-title {
    width: 100%;

    margin-bottom: 15px;

    border: none;

    outline: none;

    background: transparent;

    color: #202124;

    font-size: 32px;

    font-weight: 600;

    letter-spacing: -1.2px;

    transition:
        opacity 0.2s ease;
}


.entry-title::placeholder {
    color: #c7c7c3;
}


.entry-title:focus {
    opacity: 0.92;
}


/* =========================================================
   TEXT
========================================================= */

.entry-text {
    width: 100%;

    height: 120px;

    min-height: 120px;

    max-height: 120px;

    resize: none;

    border: none;

    outline: none;

    background: transparent;

    font-family: inherit;

    color: #3b3b3b;

    font-size: 15px;

    line-height: 1.7;

    overflow-y: auto;
}


.entry-text::placeholder {
    color: #b9b9b5;
}


.entry-text:focus {
    outline: none;
}


/* =========================================================
   IMAGE GALLERY
========================================================= */

.image-gallery {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 12px;

    margin-top: 20px;
}


.image-item {
    position: relative;

    overflow: hidden;

    border-radius: 12px;

    background: #eee;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.07);

    animation:
        imageEnter 0.4s cubic-bezier(.2,.8,.2,1);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}


@keyframes imageEnter {

    from {
        opacity: 0;
        transform:
            translateY(10px)
            scale(0.97);
    }

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

}


.image-item:hover {
    transform:
        translateY(-4px)
        scale(1.008);

    box-shadow:
        0 16px 30px rgba(0, 0, 0, 0.11);
}


.image-item img {
    display: block;

    width: 100%;

    height: auto;

    max-height: 500px;

    object-fit: cover;

    transition:
        transform 0.5s cubic-bezier(.2,.8,.2,1);
}


.image-item:hover img {
    transform: scale(1.025);
}


.remove-image {
    position: absolute;

    top: 8px;
    right: 8px;

    width: 27px;
    height: 27px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.88);

    color: #555;

    cursor: pointer;

    opacity: 0;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.12);

    backdrop-filter: blur(10px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


.image-item:hover .remove-image {
    opacity: 1;
}


.remove-image:hover {
    transform: scale(1.1);

    color: #b33;
}


.remove-image:active {
    transform: scale(0.9);
}


/* =========================================================
   IMAGE DROP ZONE
========================================================= */

.image-drop-zone {
    width: 100%;

    height: 120px;

    margin-top: 20px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    border:
        1px dashed rgba(190, 191, 188, 0.8);

    border-radius: 14px;

    text-align: center;

    background:
        rgba(255, 255, 255, 0.22);

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.8) inset;

    backdrop-filter:
        blur(18px)
        saturate(150%);

    -webkit-backdrop-filter:
        blur(18px)
        saturate(150%);

    transition:
        border-color 0.3s ease,
        background 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.image-drop-zone:hover {
    background:
        rgba(255, 255, 255, 0.38);

    border-color:
        rgba(160, 161, 158, 0.9);

    transform:
        translateY(-2px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.05),
        0 1px 1px rgba(255, 255, 255, 0.95) inset;
}


.image-drop-zone.dragover {
    background:
        rgba(255, 255, 255, 0.55);

    border-color:
        rgba(100, 101, 99, 0.9);

    transform:
        scale(1.015);

    box-shadow:
        0 18px 35px rgba(0, 0, 0, 0.08),
        0 1px 1px rgba(255, 255, 255, 1) inset;
}


.drop-icon {
    width: 25px;
    height: 25px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 6px;

    border-radius: 50%;

    background:
        rgba(230, 231, 229, 0.9);

    color: #666;

    font-size: 17px;

    transition:
        transform 0.3s ease,
        background 0.3s ease;
}


.image-drop-zone:hover .drop-icon {
    transform:
        rotate(90deg)
        scale(1.08);

    background:
        rgba(220, 221, 219, 1);
}


.image-drop-zone h3 {
    margin-bottom: 3px;

    font-size: 13px;

    font-weight: 600;
}


.image-drop-zone p {
    margin-bottom: 8px;

    color: #999;

    font-size: 11px;
}


.secondary-button {
    padding: 6px 11px;

    border:
        1px solid #dddcd7;

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.82);

    color: #555;

    font-size: 11px;

    cursor: pointer;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, 0.035);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.secondary-button:hover {
    background: white;

    transform: translateY(-1px);

    box-shadow:
        0 5px 12px rgba(0, 0, 0, 0.07);
}


.secondary-button:active {
    transform: scale(0.95);
}


/* =========================================================
   ARCHIVE
========================================================= */

.archive-toolbar {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 16px;

    min-height: 62px;
}


.search-wrapper {
    width: 300px;

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 9px 12px;

    border:
        1px solid rgba(225, 226, 223, 0.9);

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.7);

    box-shadow:
        0 4px 13px rgba(0, 0, 0, 0.035),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);

    backdrop-filter: blur(15px);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}


.search-wrapper:focus-within {
    border-color: #c7c8c5;

    box-shadow:
        0 7px 18px rgba(0, 0, 0, 0.06);

    transform: translateY(-1px);
}


.search-icon {
    color: #999;
}


.search-wrapper input {
    width: 100%;

    border: none;

    outline: none;

    font-family: inherit;

    font-size: 13px;

    background: transparent;
}


.archive-count {
    color: #999;

    font-size: 12px;
}


/* =========================================================
   ARCHIVE TABLE
========================================================= */

.archive-table {
    width: 100%;

    overflow: hidden;

    border:
        1px solid rgba(255, 255, 255, 0.75);

    border-radius: 19px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.58),
            rgba(255, 255, 255, 0.25)
        );

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.9) inset,
        0 -1px 1px rgba(255, 255, 255, 0.18) inset,
        0 20px 55px rgba(40, 45, 50, 0.065),
        0 4px 14px rgba(40, 45, 50, 0.035);

    backdrop-filter:
        blur(30px)
        saturate(175%)
        brightness(1.08);

    -webkit-backdrop-filter:
        blur(30px)
        saturate(175%)
        brightness(1.08);
}


.archive-table-header {
    display: grid;

    grid-template-columns: 2fr 1fr 1fr;

    min-height: 62px;

    align-items: center;

    padding: 10px 20px;

    border-bottom:
        1px solid rgba(229, 230, 227, 0.8);

    background:
        rgba(248, 249, 247, 0.48);

    color: #999;

    font-size: 10px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.8px;
}


.archive-row {
    display: grid;

    grid-template-columns: 2fr 1fr 1fr;

    align-items: center;

    min-height: 58px;

    padding: 12px 20px;

    border-bottom:
        1px solid rgba(235, 236, 233, 0.8);

    cursor: pointer;

    position: relative;

    transition:
        background 0.25s ease,
        transform 0.25s ease,
        padding-left 0.25s ease;
}


.archive-row:last-child {
    border-bottom: none;
}


.archive-row:hover {
    background:
        rgba(255, 255, 255, 0.68);

    padding-left: 24px;
}


.archive-row:active {
    transform: scale(0.995);
}


.archive-title {
    font-size: 14px;

    font-weight: 500;

    color: #333;
}


.archive-preview {
    margin-top: 4px;

    max-width: 500px;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color: #aaa;

    font-size: 11px;
}


.archive-date,
.archive-updated {
    color: #888;

    font-size: 12px;
}


/* =========================================================
   EMPTY ARCHIVE
========================================================= */

.archive-empty {
    padding: 70px 20px;

    text-align: center;

    color: #aaa;

    font-size: 13px;

    animation:
        emptyFade 0.5s ease;
}


@keyframes emptyFade {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

}


/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width: 8px;
}


::-webkit-scrollbar-track {
    background: transparent;
}


::-webkit-scrollbar-thumb {
    background:
        rgba(140, 140, 140, 0.25);

    border-radius: 20px;
}


::-webkit-scrollbar-thumb:hover {
    background:
        rgba(120, 120, 120, 0.4);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .topbar {
        height: 62px;

        top: 8px;

        width: calc(100% - 16px);

        margin-top: 8px;

        padding: 0 16px;

        border-radius: 15px;
    }


    .brand-name {
        display: none;
    }


    .navigation {
        margin-left: auto;
    }


    .nav-button {
        padding: 8px 13px;
    }


    .app {
        width: calc(100% - 24px);

        padding-top: 40px;
    }


    .calendar-day {
        min-height: 80px;

        padding: 7px;
    }


    .weekdays div {
        padding: 9px 4px;

        font-size: 9px;
    }


    .day-number {
        width: 24px;
        height: 24px;

        font-size: 11px;
    }


    .calendar-entry {
        margin-top: 5px;

        padding: 4px;

        font-size: 9px;
    }


    .journal-header {
        display: flex;

        flex-direction: column;

        gap: 20px;
    }


    .back-button,
    .journal-actions {
        align-self: stretch;

        justify-self: initial;
    }


    .journal-date {
        order: -1;
    }


    .journal-actions {
        justify-content: space-between;
    }


    .journal-page {
        padding: 35px 22px 50px;

        border-radius: 16px;
    }


    .entry-title {
        font-size: 26px;
    }


    .image-gallery {
        grid-template-columns: 1fr;
    }


    .archive-toolbar {
        align-items: stretch;

        flex-direction: column;

        gap: 12px;
    }


    .search-wrapper {
        width: 100%;
    }


    .archive-table-header {
        grid-template-columns: 1fr auto;

        padding: 12px;
    }


    .archive-table-header span:nth-child(3) {
        display: none;
    }


    .archive-row {
        grid-template-columns: 1fr auto;

        padding: 15px 12px;
    }


    .archive-updated {
        display: none;
    }

}


/* =========================================================
   SMALL SCREENS
========================================================= */

@media (max-width: 450px) {

    .calendar-toolbar {
        gap: 10px;
    }


    .calendar-toolbar h2 {
        min-width: 145px;

        font-size: 14px;
    }


    .calendar-day {
        min-height: 67px;
    }


    .calendar-entry {
        display: none;
    }


    .journal-page {
        border-radius: 13px;
    }


    .image-drop-zone {
        height: 120px;
    }

}


/* =========================================================
   REDUCED MOTION ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;
    }

}
/* ============================================================
   DIALED — Premium Liquid Glass System
   ============================================================ */

:root {
    --glass-white: rgba(255, 255, 255, 0.58);
    --glass-white-soft: rgba(255, 255, 255, 0.32);
    --glass-border: rgba(255, 255, 255, 0.72);

    --glass-shadow:
        0 1px 1px rgba(255, 255, 255, 0.9) inset,
        0 18px 55px rgba(40, 45, 50, 0.065),
        0 4px 16px rgba(40, 45, 50, 0.035);

    --glass-blur: blur(28px) saturate(175%);
}


/* ------------------------------------------------------------
   Base glass material
   ------------------------------------------------------------ */

.topbar,
.calendar-container,
.journal-page,
.archive-table,
.navigation {
    isolation: isolate;
}


/* ------------------------------------------------------------
   Glass highlight
   ------------------------------------------------------------ */

.topbar::before,
.calendar-container::before,
.journal-page::before,
.archive-table::before {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: inherit;

    background:
        linear-gradient(
            125deg,
            rgba(255, 255, 255, 0.42) 0%,
            rgba(255, 255, 255, 0.12) 28%,
            transparent 48%,
            transparent 72%,
            rgba(255, 255, 255, 0.14) 100%
        );

    pointer-events: none;

    z-index: 5;

    opacity: 0.8;

    transition:
        opacity 0.4s ease;
}


/* ------------------------------------------------------------
   Glass edge reflection
   ------------------------------------------------------------ */

.topbar::after,
.calendar-container::after,
.journal-page::after,
.archive-table::after {
    content: "";

    position: absolute;

    top: 0;
    left: 7%;

    width: 86%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.95),
            transparent
        );

    opacity: 0.85;

    pointer-events: none;

    z-index: 6;
}


/* ------------------------------------------------------------
   Elevation hierarchy
   ------------------------------------------------------------ */

.topbar {
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.9) inset,
        0 10px 35px rgba(40, 45, 50, 0.075),
        0 30px 80px rgba(40, 45, 50, 0.045);

    backdrop-filter:
        blur(30px)
        saturate(180%);

    -webkit-backdrop-filter:
        blur(30px)
        saturate(180%);
}


.calendar-container {
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.92) inset,
        0 20px 60px rgba(40, 45, 50, 0.07),
        0 5px 18px rgba(40, 45, 50, 0.035);

    backdrop-filter:
        blur(30px)
        saturate(175%);

    -webkit-backdrop-filter:
        blur(30px)
        saturate(175%);
}


.journal-page {
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.95) inset,
        0 25px 75px rgba(40, 45, 50, 0.085),
        0 8px 25px rgba(40, 45, 50, 0.04);

    backdrop-filter:
        blur(34px)
        saturate(180%);

    -webkit-backdrop-filter:
        blur(34px)
        saturate(180%);
}


.archive-table {
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.92) inset,
        0 20px 55px rgba(40, 45, 50, 0.065),
        0 4px 16px rgba(40, 45, 50, 0.035);

    backdrop-filter:
        blur(30px)
        saturate(175%);

    -webkit-backdrop-filter:
        blur(30px)
        saturate(175%);
}


/* ============================================================
   CALENDAR — depth & interaction
   ============================================================ */

.calendar-day {
    position: relative;

    transition:
        transform 0.22s cubic-bezier(.2,.8,.2,1),
        background 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}


/* Subtle glass surface inside each day */

.calendar-day::before {
    content: "";

    position: absolute;

    inset: 4px;

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.035);

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.2s ease;
}


/* Hover elevation */

.calendar-day:hover {
    transform:
        translateY(-2px)
        scale(1.008);

    background:
        rgba(255, 255, 255, 0.34);

    border-color:
        rgba(255, 255, 255, 0.78);

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.8) inset,
        0 8px 20px rgba(40, 45, 50, 0.055);

    z-index: 2;
}


.calendar-day:hover::before {
    opacity: 1;
}


/* Click compression */

.calendar-day:active {
    transform:
        translateY(0)
        scale(0.985);

    transition-duration: 0.08s;
}


/* Today */

.calendar-day.today {
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.95) inset,
        0 0 0 1px rgba(80, 82, 80, 0.18),
        0 8px 22px rgba(40, 45, 50, 0.055);
}


/* Days containing journal entries */

.calendar-day.has-entry {
    background:
        rgba(255, 255, 255, 0.24);

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.85) inset,
        0 4px 14px rgba(40, 45, 50, 0.035);
}


/* ============================================================
   MAGNETIC BUTTON FOUNDATION
   ============================================================ */

button,
.nav-button,
.brand,
.calendar-nav button,
.month-button,
.add-button,
.archive-action {
    will-change:
        transform;

    transition:
        transform 0.22s cubic-bezier(.2,.8,.2,1),
        box-shadow 0.22s ease,
        background 0.22s ease;
}


/* Hover lift */

button:hover,
.nav-button:hover,
.calendar-nav button:hover,
.month-button:hover,
.add-button:hover,
.archive-action:hover {
    transform:
        translateY(-1px);
}


/* Click compression */

button:active,
.nav-button:active,
.calendar-nav button:active,
.month-button:active,
.add-button:active,
.archive-action:active {
    transform:
        scale(0.96);

    transition-duration:
        0.08s;
}


/* ============================================================
   GLASS BUTTONS
   ============================================================ */

button,
.calendar-nav button,
.month-button,
.add-button,
.archive-action {
    border:
        1px solid rgba(255, 255, 255, 0.58);

    background:
        rgba(255, 255, 255, 0.28);

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.85) inset,
        0 4px 14px rgba(40, 45, 50, 0.035);

    backdrop-filter:
        blur(14px)
        saturate(160%);

    -webkit-backdrop-filter:
        blur(14px)
        saturate(160%);
}


button:hover,
.calendar-nav button:hover,
.month-button:hover,
.add-button:hover,
.archive-action:hover {
    background:
        rgba(255, 255, 255, 0.42);

    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.95) inset,
        0 7px 20px rgba(40, 45, 50, 0.055);
}


/* ============================================================
   NAVIGATION DEPTH
   ============================================================ */

.navigation {
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.85) inset,
        0 5px 16px rgba(40, 45, 50, 0.035);
}


.nav-button {
    position: relative;

    overflow: hidden;
}


.nav-button::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.32),
            transparent 55%
        );

    opacity: 0;

    transition:
        opacity 0.25s ease;

    pointer-events: none;
}


.nav-button:hover::before {
    opacity: 1;
}


/* Active navigation */

.nav-button.active {
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.95) inset,
        0 4px 14px rgba(40, 45, 50, 0.06);
}


/* ============================================================
   MICRO INTERACTION — brand
   ============================================================ */

.brand {
    transition:
        transform 0.3s cubic-bezier(.2,.8,.2,1);
}


.brand:hover {
    transform:
        translateY(-1px);
}


.brand:active {
    transform:
        scale(0.98);
}
/* ============================================================
   DIALED — Responsive / Mobile Layout
   ============================================================ */

/* ------------------------------------------------------------
   TABLET
   ------------------------------------------------------------ */

@media (max-width: 900px) {

    .topbar {
        width: calc(100% - 24px);

        padding: 0 20px;

        height: 62px;
    }


    .app {
        width: min(94%, 760px);

        padding-top: 42px;
        padding-bottom: 60px;
    }


    .page-header h1 {
        font-size: 36px;
    }


    .calendar-day {
        min-height: 92px;

        padding: 8px;
    }


    .journal-page {
        padding: 40px 40px 55px;
    }

}


/* ------------------------------------------------------------
   PHONE
   ------------------------------------------------------------ */

@media (max-width: 650px) {

    /* =========================
       TOP BAR
    ========================== */

    .topbar {
        width: calc(100% - 16px);

        height: auto;
        min-height: 58px;

        padding: 9px 12px;

        top: 8px;

        margin-top: 8px;

        border-radius: 16px;

        gap: 10px;
    }


    /* Brand */

    .brand {
        min-width: 0;

        gap: 7px;
    }


    .brand-mark {
        width: 30px;
        height: 30px;

        min-width: 30px;

        font-size: 15px;
    }


    .brand-name {
        font-size: 15px;

        letter-spacing: -0.4px;

        white-space: nowrap;
    }


    .brand-subtitle {
        display: none;
    }


    /* Navigation */

    .navigation {
        gap: 2px;

        padding: 3px;

        border-radius: 11px;
    }


    .nav-button {
        padding: 7px 9px;

        font-size: 11px;

        white-space: nowrap;
    }


    /* =========================
       MAIN APP
    ========================== */

    .app {
        width: calc(100% - 24px);

        padding-top: 32px;
        padding-bottom: 45px;
    }


    /* =========================
       PAGE HEADERS
    ========================== */

    .page-header {
        margin-bottom: 20px;
    }


    .page-header h1 {
        font-size: 30px;

        letter-spacing: -1.2px;
    }


    .subtitle {
        margin-top: 7px;

        font-size: 12px;
    }


    .eyebrow {
        font-size: 9px;

        letter-spacing: 1.2px;
    }


    /* =========================
       CALENDAR
    ========================== */

    .calendar-container {
        border-radius: 16px;
    }


    .calendar-toolbar {
        height: 54px;

        padding: 0 10px;
    }


    .calendar-toolbar h2 {
        font-size: 16px;

        letter-spacing: -0.4px;
    }


    .icon-button {
        width: 34px;
        height: 34px;

        font-size: 20px;
    }


    .weekdays div {
        padding: 8px 2px;

        font-size: 9px;
    }


    .calendar-grid {
        width: 100%;
    }


    .calendar-day {
        min-height: 68px;

        padding: 6px;

        border-radius: 8px;
    }


    .calendar-day-number {
        font-size: 11px;
    }


    /* Prevent long journal titles
       from destroying the calendar */

    .calendar-day-title {
        max-width: 100%;

        overflow: hidden;

        text-overflow: ellipsis;

        white-space: nowrap;

        font-size: 9px;
    }


    /* =========================
       JOURNAL HEADER
    ========================== */

    .journal-header {
        display: grid;

        grid-template-columns: 1fr auto;

        gap: 14px;

        margin-bottom: 20px;
    }


    .back-button {
        grid-column: 1 / -1;

        justify-self: start;
    }


    .journal-date {
        min-width: 0;
    }


    .journal-date h1 {
        font-size: 25px;

        line-height: 1.1;

        letter-spacing: -1px;
    }


    .journal-actions {
        align-self: end;

        display: flex;

        gap: 6px;
    }


    .save-status {
        font-size: 10px;
    }


    .danger-button {
        padding: 7px 10px;

        font-size: 10px;
    }


    /* =========================
       JOURNAL PAGE
    ========================== */

    .journal-page {
        padding: 26px 18px 35px;

        border-radius: 16px;
    }


    .journal-content {
        width: 100%;
    }


    .entry-title {
        width: 100%;

        font-size: 24px;

        line-height: 1.15;
    }


    .entry-text {
        width: 100%;

        min-height: 100px;

        height: 100px;

        font-size: 14px;

        line-height: 1.6;

        padding: 11px;
    }


    /* =========================
       IMAGE GALLERY
    ========================== */

    .image-gallery {
        width: 100%;

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;
    }


    .image-gallery img {
        width: 100%;

        height: auto;

        max-height: 180px;

        object-fit: cover;

        border-radius: 10px;
    }


    /* =========================
       IMAGE DROP AREA
    ========================== */

    .image-drop-zone {
        width: 100%;

        height: 100px;

        margin-top: 12px;

        padding: 10px;

        border-radius: 12px;
    }


    .drop-icon {
        font-size: 18px;
    }


    .image-drop-zone h3 {
        margin: 2px 0;

        font-size: 12px;
    }


    .image-drop-zone p {
        margin: 2px 0 7px;

        font-size: 9px;
    }


    .secondary-button {
        padding: 6px 9px;

        font-size: 10px;
    }


    /* =========================
       ARCHIVE
    ========================== */

    .archive-toolbar {
        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 9px;

        margin-bottom: 12px;
    }


    .search-wrapper {
        width: 100%;
    }


    .archive-count {
        align-self: flex-start;

        font-size: 10px;
    }


    .archive-table {
        border-radius: 14px;

        overflow-x: auto;
    }


    .archive-table-header,
    .archive-row {
        min-width: 500px;

        grid-template-columns:
            2fr 1fr 1fr;
    }


    .archive-table-header {
        min-height: 48px;

        padding: 8px 12px;

        font-size: 9px;
    }


    .archive-row {
        min-height: 52px;

        padding: 9px 12px;

        font-size: 10px;
    }


    /* =========================
       BUTTONS
    ========================== */

    button {
        -webkit-tap-highlight-color:
            transparent;
    }


    /* Magnetic movement should
       not happen on touch devices */

    .nav-button:hover,
    .calendar-day:hover,
    button:hover {
        transform: none;
    }


    .calendar-day:active {
        transform:
            scale(0.97);
    }


    button:active,
    .nav-button:active {
        transform:
            scale(0.96);
    }

}


/* ------------------------------------------------------------
   VERY SMALL PHONES
   ------------------------------------------------------------ */

@media (max-width: 390px) {

    .topbar {
        padding-left: 9px;
        padding-right: 9px;
    }


    .brand-name {
        font-size: 14px;
    }


    .brand-mark {
        width: 27px;
        height: 27px;

        min-width: 27px;

        font-size: 13px;
    }


    .nav-button {
        padding:
            6px 7px;

        font-size: 10px;
    }


    .app {
        width: calc(100% - 18px);
    }


    .page-header h1 {
        font-size: 27px;
    }


    .calendar-day {
        min-height: 61px;

        padding: 4px;
    }


    .calendar-day-number {
        font-size: 10px;
    }


    .weekdays div {
        font-size: 8px;
    }


    .journal-page {
        padding-left: 14px;
        padding-right: 14px;
    }


    .entry-title {
        font-size: 21px;
    }


    .entry-text {
        font-size: 13px;
    }

}


/* ------------------------------------------------------------
   TOUCH DEVICES
   ------------------------------------------------------------ */

@media (hover: none) and (pointer: coarse) {

    /* Remove desktop hover physics */

    .calendar-day:hover {
        transform: none;

        box-shadow: none;
    }


    button:hover {
        transform: none;
    }


    /* Give touch interactions
       a cleaner pressed state */

    .calendar-day:active {
        background:
            rgba(255, 255, 255, 0.42);

        transform:
            scale(0.975);
    }


    button:active,
    .nav-button:active {
        transform:
            scale(0.95);
    }


    /* Make touch targets comfortable */

    .icon-button {
        min-width: 40px;
        min-height: 40px;
    }


    .back-button {
        min-height: 40px;
    }

}


/* ------------------------------------------------------------
   LANDSCAPE PHONES
   ------------------------------------------------------------ */

@media (max-width: 900px) and (orientation: landscape) {

    .topbar {
        min-height: 54px;
    }


    .app {
        padding-top: 28px;
    }


    .calendar-day {
        min-height: 72px;
    }


    .journal-page {
        max-width: 760px;

        margin-left: auto;
        margin-right: auto;
    }

}