/* ===== 日记网站样式 — 给眯眯 ===== */
/* 调色：奶油 + 樱粉 + 深褐字 */

:root {
    --bg-cream: #fdf6ee;
    --bg-cream-2: #fbeee3;
    --pink-soft: #f6c9c1;
    --pink-deep: #e89a8e;
    --pink-accent: #d4685a;
    --gold: #c9a376;
    --leaf: #6f8f72;
    --plum: #8c4f66;
    --sky-soft: #dbe9ea;
    --text-main: #4a3a32;
    --text-muted: #8a7a70;
    --text-faint: #b9a99e;
    --shadow-soft: 0 8px 30px rgba(180, 120, 100, 0.12);
    --shadow-card: 0 16px 46px rgba(150, 94, 76, 0.16);
    --shadow-hover: 0 12px 40px rgba(180, 120, 100, 0.22);
    --border-soft: rgba(212, 104, 90, 0.15);
}

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

html, body {
    background: var(--bg-cream);
    color: var(--text-main);
    font-family: "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
    line-height: 1.7;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed; inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.34) 0 1px, transparent 1px 12px),
        linear-gradient(140deg, rgba(111, 143, 114, 0.08), transparent 42%),
        linear-gradient(320deg, rgba(219, 233, 234, 0.3), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.ambient-love-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.ambient-love-layer span {
    position: absolute;
    left: var(--x);
    top: var(--y);
    color: rgba(212, 104, 90, 0.22);
    font-family: "Caveat", cursive;
    font-size: calc(2rem * var(--s));
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 10px 28px rgba(212, 104, 90, 0.12);
    transform: translate3d(0, 0, 0) rotate(-8deg);
    animation: ambientFloat 10s ease-in-out var(--d) infinite;
}
.ambient-love-layer span:nth-child(2n) {
    color: rgba(201, 163, 118, 0.22);
}
@keyframes ambientFloat {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(-8deg); opacity: 0.18; }
    45% { transform: translate3d(10px, -18px, 0) rotate(10deg); opacity: 0.54; }
}

/* ===== 顶部导航 ===== */
.diary-header {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(253, 246, 238, 0.85);
    border-bottom: 1px solid var(--border-soft);
}
.diary-header__inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 32px; flex-wrap: wrap; gap: 16px;
}
.diary-title__main {
    font-size: 1.5rem; font-weight: 700; color: var(--pink-accent);
    letter-spacing: 2px;
}
.diary-title__sub {
    margin-left: 14px; color: var(--text-muted); font-size: 0.95rem;
}
.diary-title__sub em {
    font-style: normal; font-weight: 700; color: var(--pink-deep); font-size: 1.1rem;
}
.diary-nav {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.nav-btn {
    border: none; background: transparent;
    color: var(--text-muted); font-family: inherit;
    padding: 6px 14px; border-radius: 999px; cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.9rem;
}
.nav-btn:hover { background: rgba(246, 201, 193, 0.4); color: var(--pink-accent); }
.nav-btn.active {
    background: var(--pink-accent); color: white;
    box-shadow: 0 4px 12px rgba(212, 104, 90, 0.3);
}

/* ===== 开场页 ===== */
.opening-screen {
    position: fixed; inset: 0; z-index: 100;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.94) 0 80px, transparent 82px),
        radial-gradient(circle at 82% 22%, rgba(246, 201, 193, 0.48) 0 118px, transparent 122px),
        radial-gradient(circle at 66% 84%, rgba(219, 233, 234, 0.62) 0 150px, transparent 154px),
        linear-gradient(135deg, #fff8f2 0%, #fbeee3 52%, #fff6ef 100%);
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    padding: 28px;
    overflow: hidden;
    transition: opacity 0.72s ease, visibility 0.72s ease;
}
.opening-screen::before,
.opening-screen::after {
    content: "";
    position: absolute;
    width: min(74vw, 780px);
    aspect-ratio: 1;
    border: 1px solid rgba(212, 104, 90, 0.12);
    border-radius: 47% 53% 44% 56%;
    pointer-events: none;
}
.opening-screen::before {
    left: -22vw;
    top: -34vh;
    background: rgba(255, 255, 255, 0.24);
    animation: softBlob 16s ease-in-out infinite;
}
.opening-screen::after {
    right: -26vw;
    bottom: -42vh;
    background: rgba(246, 201, 193, 0.18);
    animation: softBlob 18s ease-in-out reverse infinite;
}
.opening-screen.hidden,
.opening-screen--unlocked {
    pointer-events: none;
}
.opening-screen.hidden {
    opacity: 0;
    visibility: hidden;
}
.opening-inner {
    position: relative;
    z-index: 2;
    width: min(92vw, 760px);
    text-align: center;
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid rgba(212, 104, 90, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.82), rgba(255,249,244,0.74)),
        repeating-linear-gradient(90deg, rgba(201, 163, 118, 0.06) 0 1px, transparent 1px 18px);
    box-shadow: 0 28px 80px rgba(150, 94, 76, 0.18);
    backdrop-filter: blur(10px);
}
.opening-title {
    font-family: "Noto Serif SC", serif; font-size: clamp(2.8rem, 7vw, 5.6rem);
    color: var(--text-main); opacity: 0; font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 16px 0 10px;
    text-shadow: 0 10px 30px rgba(150, 94, 76, 0.14);
    animation: fadeUp 1.4s ease 0.4s forwards;
}
.opening-subtitle {
    max-width: 420px;
    margin: 0 auto 22px;
    color: var(--text-muted);
    font-size: 0.98rem;
}
.opening-cameos {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: clamp(12px, 4vw, 32px);
    max-width: 520px;
    margin: 0 auto 8px;
}
.opening-mimi {
    position: relative;
    justify-self: center;
    margin: 0;
    width: clamp(88px, 18vw, 128px);
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 7px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(150, 94, 76, 0.18);
    animation: cameoFloat 4.8s ease-in-out infinite;
}
.opening-mimi--zhongmi {
    animation-delay: 0.8s;
}
.opening-mimi img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    display: block;
}
.opening-mimi figcaption {
    position: absolute;
    left: 50%;
    bottom: -12px;
    transform: translateX(-50%);
    white-space: nowrap;
    color: white;
    background: var(--pink-accent);
    border-radius: 999px;
    padding: 2px 12px 3px;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(212, 104, 90, 0.26);
}
.opening-heartline {
    min-width: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--pink-accent);
    font-family: "Caveat", cursive;
    font-size: 1.7rem;
}
.opening-heartline strong {
    color: var(--text-main);
    font-family: "Noto Serif SC", serif;
    font-size: 1.05rem;
    letter-spacing: 0;
}
.opening-lock-form {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-top: 8px;
}
.opening-lock-form--shake {
    animation: formShake 0.42s ease;
}
.opening-lock {
    position: relative;
    width: 96px;
    height: 118px;
    margin: 4px auto 0;
}
.opening-lock__shackle {
    position: absolute;
    left: 18px;
    top: 0;
    width: 60px;
    height: 58px;
    border: 9px solid var(--gold);
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    transform-origin: 18px 58px;
    transition: transform 0.48s ease, opacity 0.48s ease;
}
.opening-lock__body {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 0;
    height: 76px;
    border-radius: 22px;
    background: linear-gradient(145deg, #e77b70, #b84a42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.42), 0 16px 34px rgba(184, 74, 66, 0.22);
}
.opening-lock__dial {
    position: absolute;
    inset: 13px 15px;
    border-radius: 50%;
    background:
        radial-gradient(circle, #fff8f2 0 20%, transparent 21%),
        conic-gradient(from 18deg, #fff 0 18%, #f6c9c1 18% 34%, #fff 34% 58%, #dbe9ea 58% 72%, #fff 72% 100%);
    border: 5px solid rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 0 0 1px rgba(74, 58, 50, 0.08);
    animation: dialIdle 5s ease-in-out infinite;
    transition: transform 0.64s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.opening-lock__dial span {
    position: absolute;
    color: var(--text-main);
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1;
}
.opening-lock__dial span:nth-child(1) { top: 5px; left: 50%; transform: translateX(-50%); }
.opening-lock__dial span:nth-child(2) { right: 6px; top: 50%; transform: translateY(-50%); }
.opening-lock__dial span:nth-child(3) { left: 8px; bottom: 8px; }
.opening-lock__dial--love {
    display: grid;
    place-items: center;
    animation: none;
}
.opening-lock__dial.opening-lock__dial--love .opening-lock__dial-text {
    position: static;
    inset: auto;
    color: var(--pink-accent);
    font-size: 0.56rem;
    line-height: 1.18;
    letter-spacing: 0.02em;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
    transform: none;
}
.opening-lock__heart {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -46%);
    color: var(--pink-accent);
    font-size: 1.18rem;
    font-weight: 700;
    pointer-events: none;
    opacity: 0.28;
}
.opening-lock--wrong .opening-lock__dial {
    animation: dialWrong 0.64s ease;
}
.opening-lock--unlocked .opening-lock__dial {
    transform: rotate(720deg);
}
.opening-lock--unlocked .opening-lock__shackle {
    transform: rotate(-28deg) translate(-6px, -2px);
}
.opening-password-label {
    color: var(--text-muted);
    font-size: 0.92rem;
}
.opening-password-row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    width: min(100%, 360px);
}
.opening-password-input {
    width: 126px;
    min-height: 46px;
    border: 1.5px solid rgba(212, 104, 90, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-main);
    font: 700 1.15rem/1 "Noto Serif SC", serif;
    text-align: center;
    letter-spacing: 0.14em;
    outline: none;
    box-shadow: inset 0 2px 10px rgba(150, 94, 76, 0.08);
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.opening-password-input:focus {
    border-color: var(--pink-accent);
    box-shadow: 0 0 0 4px rgba(212, 104, 90, 0.12), inset 0 2px 10px rgba(150, 94, 76, 0.08);
}
.opening-enter {
    min-height: 46px;
    margin-top: 0;
    padding: 0 28px;
    border: 2px solid var(--pink-accent); background: var(--pink-accent);
    color: white; font-family: inherit; font-size: 1rem;
    border-radius: 999px; cursor: pointer; opacity: 0;
    font-weight: 700;
    animation: fadeUp 1.2s ease 1.2s forwards;
    transition: all 0.3s ease;
    box-shadow: 0 10px 22px rgba(212, 104, 90, 0.24);
}
.opening-enter:hover {
    background: #bd554c; color: white;
    transform: translateY(-2px); box-shadow: 0 13px 26px rgba(212, 104, 90, 0.32);
}
.opening-message {
    min-height: 1.4em;
    color: var(--text-faint);
    font-size: 0.86rem;
}
.opening-screen--wrong .opening-message {
    color: #b84a42;
}
.opening-garden {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.opening-garden__item {
    position: absolute;
    color: rgba(212, 104, 90, 0.24);
    font-weight: 700;
    animation: petalDrift 8s ease-in-out infinite;
}
.opening-garden__item--one { left: 8%; top: 14%; font-size: 2.2rem; }
.opening-garden__item--two { left: 13%; bottom: 22%; font-size: 1.6rem; animation-delay: 1.2s; }
.opening-garden__item--three { left: 28%; top: 22%; font-size: 1rem; color: rgba(111, 143, 114, 0.34); animation-delay: 2.1s; }
.opening-garden__item--four { right: 17%; top: 18%; font-size: 1.7rem; animation-delay: 0.7s; }
.opening-garden__item--five { right: 10%; bottom: 20%; font-size: 2rem; color: rgba(140, 79, 102, 0.2); animation-delay: 2.9s; }
.opening-garden__item--six { left: 6%; top: 48%; font-size: 0.95rem; color: rgba(74, 58, 50, 0.22); animation-delay: 3.4s; }
.opening-garden__item--seven { right: 6%; top: 54%; font-size: 0.95rem; color: rgba(74, 58, 50, 0.22); animation-delay: 1.7s; }
@keyframes softBlob {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(8deg) scale(1.06); }
}
@keyframes cameoFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}
@keyframes dialIdle {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(16deg); }
}
@keyframes dialWrong {
    0% { transform: rotate(0deg); }
    35% { transform: rotate(-42deg); }
    70% { transform: rotate(36deg); }
    100% { transform: rotate(0deg); }
}
@keyframes formShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(4px); }
}
@keyframes petalDrift {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(-8deg); opacity: 0.42; }
    50% { transform: translate3d(14px, -22px, 0) rotate(12deg); opacity: 0.72; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 主内容 ===== */
.diary-main {
    max-width: 1200px; margin: 0 auto;
    padding: 60px 32px 100px;
}
.diary-intro {
    text-align: center; margin-bottom: 60px;
}
.diary-intro__date {
    font-family: "Caveat", cursive;
    font-size: 1.8rem; color: var(--gold); letter-spacing: 2px;
}
.diary-intro__line {
    font-size: 1.2rem; color: var(--text-main); margin-top: 12px; font-weight: 500;
}
.diary-intro__hint {
    color: var(--text-faint); font-size: 0.9rem; margin-top: 8px; font-style: italic;
}
.diary-editor-tools {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
.editor-btn {
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s ease;
}
.editor-btn:hover {
    border-color: rgba(212, 104, 90, 0.34);
    color: var(--pink-accent);
    transform: translateY(-1px);
}
.editor-btn--primary {
    background: var(--pink-accent);
    color: white;
    border-color: var(--pink-accent);
    box-shadow: 0 8px 18px rgba(212, 104, 90, 0.24);
}
.editor-btn--primary:hover {
    color: white;
    box-shadow: 0 10px 22px rgba(212, 104, 90, 0.32);
}
.editor-btn--ghost {
    background: transparent;
}
.editor-btn--danger {
    color: #b84a42;
    border-color: rgba(184, 74, 66, 0.24);
}
.editor-btn--file {
    position: relative;
    overflow: hidden;
}
.editor-btn--file input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* ===== 卡片网格 ===== */
.diary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
    align-items: stretch;
    gap: 18px;
}
.loading-tip {
    grid-column: 1 / -1; text-align: center;
    color: var(--text-faint); padding: 60px 0;
}

.day-card {
    position: relative; background: white; border-radius: 16px;
    min-height: 386px;
    height: 386px;
    padding: 18px; box-shadow: var(--shadow-soft); cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* + 眯眯日记+ 新增入口卡 */
.day-card--add {
    background: linear-gradient(155deg, #fdf6ee 0%, #fbe9e2 100%);
    border: 2px dashed rgba(212, 104, 90, 0.45);
    box-shadow: none;
    align-items: center;
    justify-content: center;
    padding: 30px 18px;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}
.day-card--add:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 36px rgba(212, 104, 90, 0.18);
    border-color: rgba(212, 104, 90, 0.85);
    background: linear-gradient(155deg, #fff5ec 0%, #fcd9cf 100%);
}
.day-card--add:focus-visible {
    outline: 3px solid rgba(212, 104, 90, 0.55);
    outline-offset: 4px;
}
.day-card__add-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    color: #b85a4d;
    width: 100%;
}
.day-card__add-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6c9c1, #e89a8e);
    color: white;
    font-size: 38px;
    font-weight: 300;
    line-height: 60px;
    text-align: center;
    box-shadow: 0 10px 22px rgba(212, 104, 90, 0.32);
    user-select: none;
}
.day-card__add-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #d4685a;
    letter-spacing: 0.04em;
}
.day-card__add-hint {
    font-size: 0.82rem;
    color: #a87f74;
    letter-spacing: 0.02em;
}

.day-card__mood {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 4px 11px 4px 5px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: var(--bg-cream);
    color: var(--text-muted);
    font-size: 0.78rem;
    border: 1px solid rgba(212, 104, 90, 0.12);
}
.mimi-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    background: var(--pink-soft);
    color: white;
    font-weight: 700;
}
.mimi-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mimi-icon--mark {
    background: linear-gradient(135deg, var(--pink-deep), var(--gold));
    font-size: 0.8rem;
}
.day-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--pink-soft), var(--gold));
    transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
}
.day-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.day-card:hover::before { transform: scaleX(1); }

.day-card__image {
    width: calc(100% + 48px);
    height: 180px;
    object-fit: cover;
    display: block;
    margin: -24px -24px 18px;
    background: var(--bg-cream-2);
}

.day-card__gallery {
    position: relative;
    width: calc(100% + 36px);
    height: 150px;
    margin: -18px -18px 14px;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 5px;
    background: var(--bg-cream-2);
    overflow: hidden;
}
.day-card__gallery img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    background: white;
}
.day-card__gallery--single img,
.day-card__gallery--single img:first-of-type {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}
.day-card__image-count {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 1;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(74, 58, 50, 0.72);
    color: white;
    font-size: 0.74rem;
    line-height: 1;
}

.day-card__header {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px; padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-soft);
}
.day-card__num {
    font-family: "Caveat", cursive;
    font-size: 1.55rem; color: var(--pink-accent); font-weight: 700; line-height: 1;
}
.day-card__date {
    color: var(--text-muted); font-size: 0.78rem;
    white-space: nowrap;
}
.day-card__weekday {
    color: var(--text-faint); font-size: 0.78rem; margin-left: 6px;
}
.day-card__title {
    font-size: 1rem; font-weight: 700; color: var(--text-main);
    margin-bottom: 10px; line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.day-card__chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    margin: 0 0 10px;
    overflow: hidden;
}
.day-card__chips span {
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(246, 201, 193, 0.22);
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.4;
}
.day-card__events {
    color: var(--text-main); font-size: 0.92rem; line-height: 1.7;
}
.day-card__events li {
    list-style: none; padding-left: 18px; position: relative; margin-bottom: 4px;
}
.day-card__events li::before {
    content: "·"; position: absolute; left: 4px; top: 0;
    color: var(--pink-accent); font-weight: bold; font-size: 1.5rem; line-height: 1;
}
.day-card__quote {
    margin: 14px 0 8px; padding: 12px 14px;
    background: var(--bg-cream-2); border-left: 3px solid var(--pink-soft);
    border-radius: 6px; font-size: 0.88rem; color: var(--text-main);
    font-style: italic;
}
.day-card__quote::before { content: "「"; color: var(--pink-accent); }
.day-card__quote::after { content: "」"; color: var(--pink-accent); }
.day-card__text {
    color: var(--text-main);
    font-size: 0.86rem;
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.day-card__text p {
    margin-bottom: 0;
}
.day-card__quote-preview {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(253, 246, 238, 0.86);
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.day-card__footer {
    margin-top: 14px; padding-top: 12px;
    border-top: 1px dashed var(--border-soft);
    display: flex; align-items: center; gap: 12px;
    font-size: 0.78rem; color: var(--text-faint);
}
.day-card__badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px;
    background: var(--bg-cream-2); color: var(--text-muted);
}
.day-card__badge--special { background: var(--pink-soft); color: white; }

.day-card__actions {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.day-card__source {
    color: var(--text-faint);
    font-size: 0.72rem;
    line-height: 1.4;
}
.day-card__edit {
    border: none;
    background: rgba(253, 246, 238, 0.94);
    color: var(--text-muted);
    border-radius: 999px;
    min-height: 30px;
    padding: 0 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}
.day-card__edit:hover {
    background: var(--pink-accent);
    color: white;
}

/* 空状态卡片 */
.day-card--empty {
    background: transparent; border: 2px dashed var(--border-soft);
    box-shadow: none; cursor: default;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-faint); font-size: 0.85rem; min-height: 180px;
    text-align: center;
}
.day-card--empty:hover { transform: none; box-shadow: none; }
.day-card--empty::before { display: none; }

/* ===== 卡片详情弹窗 ===== */
.card-modal {
    position: fixed; inset: 0; z-index: 200;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.card-modal.active { display: flex; }
.card-modal__overlay {
    position: absolute; inset: 0;
    background: rgba(74, 58, 50, 0.55); backdrop-filter: blur(4px);
    cursor: pointer;
}
.card-modal__panel {
    position: relative; background: white; border-radius: 22px;
    max-width: 720px; width: 100%; max-height: 86vh; overflow-y: auto;
    padding: 40px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
    from { transform: scale(0.92) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
.card-modal__close {
    position: absolute; top: 16px; right: 20px;
    border: none; background: transparent; font-size: 1.8rem;
    color: var(--text-faint); cursor: pointer; line-height: 1;
    transition: color 0.2s ease;
}
.card-modal__close:hover { color: var(--pink-accent); }

/* 详情内容样式 */
.modal-day-num {
    font-family: "Caveat", cursive; font-size: 3rem;
    color: var(--pink-accent); margin-bottom: 4px; line-height: 1;
}
.modal-day-date {
    color: var(--text-muted); font-size: 1rem; margin-bottom: 24px;
    padding-bottom: 16px; border-bottom: 2px solid var(--bg-cream-2);
}
.modal-section { margin-top: 24px; }
.modal-section__title {
    font-size: 1rem; font-weight: 700; color: var(--pink-accent); margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.modal-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}
.modal-identity {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 8px 12px 8px 8px;
    border-radius: 999px;
    background: var(--bg-cream);
    border: 1px solid var(--border-soft);
}
.modal-identity strong {
    display: block;
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.2;
}
.modal-identity span {
    display: block;
    color: var(--text-faint);
    font-size: 0.76rem;
    line-height: 1.3;
}
.modal-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 18px 0 24px;
}
.modal-image-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: var(--bg-cream-2);
    border: 1px solid var(--border-soft);
}
.modal-body-text p {
    margin-bottom: 12px;
    color: var(--text-main);
    font-size: 0.98rem;
}
.modal-event-list {
    display: grid;
    gap: 8px;
    padding: 0;
}
.modal-event-list li {
    list-style: none;
    padding: 10px 13px;
    border-radius: 12px;
    background: var(--bg-cream);
    color: var(--text-main);
    border: 1px solid rgba(212, 104, 90, 0.1);
}
.modal-quotes { display: flex; flex-direction: column; gap: 10px; }
.chat-bubble {
    max-width: 80%; padding: 10px 14px; border-radius: 16px;
    font-size: 0.95rem; line-height: 1.6;
}
.chat-bubble span {
    display: block;
    margin-bottom: 2px;
    color: var(--text-faint);
    font-size: 0.72rem;
}
.chat-bubble--me {
    align-self: flex-end; background: var(--pink-accent); color: white;
    border-bottom-right-radius: 4px;
}
.chat-bubble--me span { color: rgba(255, 255, 255, 0.72); }
.chat-bubble--he {
    align-self: flex-start; background: var(--bg-cream-2); color: var(--text-main);
    border-bottom-left-radius: 4px;
}
.diary-editor-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.editor-form__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-cream-2);
}
.editor-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 700;
}
.editor-field input,
.editor-field textarea {
    width: 100%;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--bg-cream);
    color: var(--text-main);
    font: inherit;
    font-weight: 400;
    padding: 11px 13px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.editor-field textarea {
    resize: vertical;
    min-height: 96px;
}
.editor-field input:focus,
.editor-field textarea:focus {
    border-color: rgba(212, 104, 90, 0.38);
    box-shadow: 0 0 0 3px rgba(212, 104, 90, 0.08);
}
.editor-images-value {
    display: none;
}
.editor-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
}
.editor-images-empty {
    padding: 12px 0;
    color: var(--text-faint);
    font-size: 0.9rem;
    font-weight: 400;
}
.editor-image-card {
    position: relative;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
}
.editor-image-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1.24;
    object-fit: cover;
    background: var(--bg-cream-2);
}
.editor-image-card__tools {
    position: absolute;
    inset: auto 5px 5px 5px;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    pointer-events: none;
}
.editor-image-card__tools button {
    min-width: 32px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--pink-accent);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(82, 56, 48, 0.12);
    cursor: pointer;
    pointer-events: auto;
}
.editor-image-card__tools button[data-remove] {
    min-width: 26px;
    background: rgba(184, 74, 66, 0.9);
    color: #fff;
}
.editor-image-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px dashed rgba(212, 104, 90, 0.38);
    border-radius: 12px;
    background: rgba(255, 244, 241, 0.48);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
}
.editor-image-dropzone:focus {
    border-color: rgba(212, 104, 90, 0.62);
    box-shadow: 0 0 0 3px rgba(212, 104, 90, 0.08);
}
.editor-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.editor-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}
.diary-notice {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 12px);
    opacity: 0;
    z-index: 300;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.diary-notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
.diary-notice--error {
    color: #b84a42;
}

/* ===== 页脚 ===== */
.diary-footer {
    text-align: center; margin-top: 80px; padding-top: 40px;
    border-top: 1px dashed var(--border-soft);
}
.diary-footer__sig {
    font-family: "Caveat", cursive; font-size: 1.6rem;
    color: var(--pink-accent); margin-bottom: 8px;
}
.diary-footer__hint {
    color: var(--text-faint); font-size: 0.85rem; font-style: italic;
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    .diary-header__inner { padding: 12px 16px; }
    .diary-title__main { font-size: 1.2rem; }
    .diary-main { padding: 40px 16px 80px; }
    .diary-grid { grid-template-columns: 1fr; gap: 16px; }
    .opening-screen {
        padding: 18px;
        align-items: flex-start;
        overflow-y: auto;
    }
    .opening-inner {
        margin-top: 18px;
        width: 100%;
        padding: 24px 18px 26px;
    }
    .opening-title {
        font-size: 2.6rem;
        letter-spacing: 0;
    }
    .opening-cameos {
        grid-template-columns: 1fr auto 1fr;
        gap: 8px;
    }
    .opening-mimi {
        width: 82px;
    }
    .opening-heartline {
        min-width: 64px;
        font-size: 1.35rem;
        gap: 5px;
    }
    .opening-password-row {
        flex-direction: column;
        align-items: stretch;
        max-width: 260px;
    }
    .opening-password-input {
        width: 100%;
    }
    .opening-enter {
        width: 100%;
    }
    .opening-garden__item--six,
    .opening-garden__item--seven {
        display: none;
    }
    .card-modal__panel { padding: 28px 20px; }
    .modal-day-num { font-size: 2.4rem; }
    .diary-editor-tools {
        align-items: stretch;
        flex-direction: column;
    }
    .editor-form__head,
    .editor-form__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .editor-form__actions .editor-btn {
        width: 100%;
    }
}

/* ===== 月份导航：阅读 / 导出按钮 ===== */
.nav-btn--read,
.nav-btn--export {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 8px;
    min-height: 34px;
    padding: 7px 16px 7px 14px;
    border: 1px solid rgba(212, 104, 90, 0.58);
    color: var(--pink-accent);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 244, 241, 0.48));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62), 0 3px 10px rgba(212, 104, 90, 0.08);
    font-weight: 700;
    letter-spacing: 0;
}
.nav-btn--read {
    margin-left: 10px;
}
.nav-btn--read .nav-btn__icon,
.nav-btn--export .nav-btn__icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.25s ease;
}
.nav-btn--read:hover,
.nav-btn--export:hover {
    background: var(--pink-accent);
    color: white;
    border-color: var(--pink-accent);
    box-shadow: 0 6px 16px rgba(212, 104, 90, 0.26);
    transform: translateY(-1px);
}
.nav-btn--read:hover .nav-btn__icon {
    transform: rotate(-4deg) translateY(-1px);
}
.nav-btn--export:hover .nav-btn__icon {
    transform: translateY(-1px);
}
.nav-btn--read.active {
    background: linear-gradient(135deg, var(--pink-accent), #e68376);
    color: white;
    border-color: var(--pink-accent);
    box-shadow: 0 6px 18px rgba(212, 104, 90, 0.28);
}

/* ===== 阅读模式 ===== */
.diary-grid--book-mode {
    display: block;
    max-width: 920px;
    margin: 0 auto;
}
.book-reader {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    grid-template-areas:
        "prev page next"
        ". indicator ."
        ". progress .";
    align-items: center;
    gap: 18px;
}
.book-page-wrap {
    grid-area: page;
    min-width: 0;
    perspective: 1400px;
}
.book-page {
    min-height: 620px;
    background: rgba(255, 253, 248, 0.94);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    padding: 44px 50px;
    overflow: hidden;
    transition: transform 0.22s ease, opacity 0.22s ease;
}
.book-page--leaving-left,
.book-page--entering-left {
    transform: translateX(-18px) rotateY(4deg);
    opacity: 0.2;
}
.book-page--leaving-right,
.book-page--entering-right {
    transform: translateX(18px) rotateY(-4deg);
    opacity: 0.2;
}
.book-nav {
    width: 52px;
    height: 52px;
    border: 1px solid var(--border-soft);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.86);
    color: var(--pink-accent);
    font-size: 2rem;
    line-height: 1;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.book-nav:hover:not(:disabled) {
    background: var(--pink-accent);
    color: white;
    transform: translateY(-2px);
}
.book-nav:disabled {
    opacity: 0.32;
    cursor: default;
}
.book-nav--prev { grid-area: prev; }
.book-nav--next { grid-area: next; }
.book-indicator {
    grid-area: indicator;
    justify-self: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
.book-indicator span {
    color: var(--pink-accent);
    font-weight: 700;
}
.book-indicator em {
    margin-left: 8px;
    color: var(--text-faint);
    font-style: normal;
}
.book-progress {
    grid-area: progress;
    height: 4px;
    width: min(520px, 100%);
    justify-self: center;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(212, 104, 90, 0.12);
}
.book-progress__fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pink-accent), var(--gold));
    transition: width 0.24s ease;
}
.book-page__head {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px dashed rgba(212, 104, 90, 0.22);
}
.book-page__day {
    font-family: "Caveat", cursive;
    color: var(--pink-accent);
    font-size: 2.4rem;
    line-height: 1;
}
.book-page__date {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 4px;
}
.book-page__title {
    color: var(--text-main);
    font-size: 1.8rem;
    line-height: 1.35;
    margin-top: 12px;
}
.book-page__images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 22px;
}
.book-page__images img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-cream-2);
}
.book-page__events {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
}
.book-page__event {
    border-left: 3px solid var(--pink-soft);
    padding: 8px 12px;
    background: rgba(253, 246, 238, 0.72);
    color: var(--text-main);
    border-radius: 0 8px 8px 0;
}
.book-page__body p {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 12px;
}
.book-page__quotes {
    margin-top: 22px;
}
.book-page__foot {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .book-reader {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 10px;
    }
    .book-nav {
        width: 42px;
        height: 42px;
        font-size: 1.55rem;
    }
    .book-page {
        min-height: 560px;
        padding: 34px 28px;
    }
    .book-page__images {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .nav-btn--read,
    .nav-btn--export {
        margin-left: 0;
    }
    .book-reader {
        display: block;
    }
    .book-page {
        min-height: auto;
        padding: 28px 20px;
    }
    .book-nav {
        position: fixed;
        top: 50%;
        z-index: 20;
        background: rgba(255, 255, 255, 0.92);
    }
    .book-nav--prev {
        left: 8px;
    }
    .book-nav--next {
        right: 8px;
    }
    .book-indicator {
        margin-top: 18px;
        display: flex;
        justify-content: center;
    }
    .book-progress {
        margin: 10px auto 0;
    }
    .book-page__title {
        font-size: 1.45rem;
    }
    .book-page__images {
        grid-template-columns: 1fr 1fr;
    }
}
