@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&family=Quicksand:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;1,400&display=swap');

.vibewave-heart-notes-page {
    --hn-body-a:#18131f;
    --hn-body-b:#0f0b14;
    --hn-panel:rgba(24,18,32,.92);
    --hn-text:#f4eefb;
    --hn-muted:#c4aed7;
    --hn-accent:#d5a3ff;
    --hn-accent-soft:rgba(138,108,194,.16);
    --hn-border:rgba(208,177,255,.22);
    --hn-card-border:rgba(205,173,255,.18);
    --hn-shadow:0 24px 60px rgba(0,0,0,.28), 0 10px 28px rgba(0,0,0,.18);
    --hn-soft-shadow:0 10px 26px rgba(0,0,0,.18);
    font-family:'Quicksand',sans-serif;
}
.vibewave-heart-notes-page.heart-notes-mood-day {
    --hn-body-a:#1c1625;
    --hn-body-b:#120e19;
    --hn-panel:rgba(25,19,34,.92);
}
.vibewave-heart-notes-page.heart-notes-mood-night {
    --hn-body-a:#15111c;
    --hn-body-b:#0d0a12;
    --hn-panel:rgba(20,15,28,.94);
}

.vibewave-heart-notes-page .scrollable-content {
    position:relative;
    display:flex;
    flex-direction:column;
    gap:18px;
    padding-bottom:28px;
}
.vibewave-heart-notes-page .scrollable-content::before {
    content:"✿";
    position:fixed;
    right:-28px;
    bottom:-48px;
    font-family:'Dancing Script',cursive;
    font-size:220px;
    color:rgba(197,167,255,.06);
    transform:rotate(-15deg);
    pointer-events:none;
    z-index:-1;
}
.vibewave-heart-notes-page .sidebar { display:flex !important; }

.hn-page-shell {
    max-width:1300px;
    margin:0 auto;
    background:linear-gradient(180deg, rgba(33,26,45,.96), rgba(20,16,28,.96));
    border:1px solid rgba(206,180,255,.12);
    backdrop-filter:blur(10px);
    border-radius:36px;
    padding:2rem;
    box-shadow:var(--hn-shadow);
    color:var(--hn-text);
}
.hn-hero {
    text-align:center;
    margin-bottom:2.4rem;
    border-bottom:1px solid var(--hn-border);
    padding-bottom:1.8rem;
}
.hn-hero h1 {
    margin:0 0 .45rem;
    font-family:'Dancing Script',cursive;
    font-size:4rem;
    line-height:1;
    color:var(--hn-accent);
    text-shadow:2px 2px 10px rgba(180,60,90,.15);
    letter-spacing:2px;
}
.hn-hero__sub {
    display:inline-block;
    padding:.35rem 1.15rem;
    border-radius:40px;
    background:var(--hn-accent-soft);
    border:1px solid rgba(214,183,255,.16);
    font-family:'Playfair Display',serif;
    font-size:1rem;
    color:var(--hn-muted);
    font-style:italic;
}

.notice.success,
.notice.error {
    margin-bottom:16px;
    border-radius:18px;
    padding:14px 16px;
}

.hn-two-columns {
    display:grid;
    grid-template-columns:minmax(0,2fr) minmax(280px,1fr);
    gap:2rem;
    margin-bottom:2rem;
}
.hn-single-column {
    display:block;
    margin-bottom:2rem;
}
.hn-left-col,
.hn-right-col { display:flex; flex-direction:column; gap:1.8rem; }

.hn-memory-card {
    background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    border-radius:32px;
    padding:1.5rem 1.8rem;
    box-shadow:var(--hn-soft-shadow);
    border:1px solid var(--hn-card-border);
    backdrop-filter:blur(4px);
    transition:transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.hn-memory-card:hover {
    transform:translateY(-5px);
    box-shadow:0 18px 30px rgba(110,50,70,.12);
    background:linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.05));
}
.hn-memory-card h3 {
    margin:0 0 .75rem;
    font-family:'Playfair Display',serif;
    font-size:1.5rem;
    line-height:1.28;
    color:#f3d7ff;
    font-weight:600;
}
.hn-excerpt-wrap {
    border-left:2px solid rgba(214,183,255,.42);
    padding:1rem 0 0 1rem;
}
.hn-excerpt {
    font-size:.96rem;
    line-height:1.68;
    color:rgba(244,238,251,.86);
}
.hn-card-footer-row {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:1rem;
    margin-top:.95rem;
    flex-wrap:wrap;
}
.hn-btn-readmore {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 12px;
    border-radius:30px;
    background:rgba(214,183,255,.12);
    color:#e5d0ff;
    text-decoration:none;
    font-size:.84rem;
    font-weight:700;
    white-space:nowrap;
}
.hn-btn-readmore:hover { background:rgba(214,183,255,.18); color:#ffffff; }
.hn-card-info {
    display:flex;
    flex-wrap:wrap;
    gap:1rem;
    font-size:.8rem;
    color:rgba(212,190,235,.78);
}

.hn-envelope-card {
    display:block;
    text-decoration:none;
    background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
    border:1px dashed rgba(214,183,255,.28);
    border-radius:28px;
    padding:1.3rem 1.4rem;
    box-shadow:0 5px 12px rgba(0,0,0,.02);
    transition:background .2s ease, border-color .2s ease, transform .2s ease;
}
.hn-envelope-card:hover {
    background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
    border-color:rgba(214,183,255,.42);
    transform:translateY(-2px);
}
.hn-envelope-card__title {
    font-family:'Playfair Display',serif;
    font-size:1.2rem;
    line-height:1.35;
    color:#f3d7ff;
    margin-bottom:.55rem;
}
.hn-envelope-card__snippet {
    font-size:.82rem;
    color:rgba(244,238,251,.70);
    line-height:1.5;
    margin:.45rem 0;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
.hn-envelope-card__meta {
    display:flex;
    justify-content:space-between;
    gap:.6rem;
    margin-top:.65rem;
    padding-top:.55rem;
    border-top:1px dotted rgba(214,183,255,.22);
    font-size:.72rem;
    color:rgba(212,190,235,.62);
}


.hn-envelope-card--empty {
    color:rgba(244,238,251,.68);
    text-align:center;
}

.hn-footer-actions {
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:1.2rem;
    margin-top:.8rem;
    padding-top:1.2rem;
    border-top:2px dotted #f3cddf;
}
.hn-pagination {
    display:flex;
    flex-wrap:wrap;
    gap:.5rem;
    align-items:center;
}
.hn-page-btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:40px;
    padding:.45rem .9rem;
    border-radius:40px;
    border:1px solid #e7bfd0;
    background:#fff4f7;
    color:#aa5879;
    text-decoration:none;
    font-size:.85rem;
    font-weight:700;
}
.hn-page-btn.is-active {
    background:#d9a3bb;
    border-color:#bc7a97;
    color:#2c1420;
}
.hn-page-btn.is-static { cursor:default; }
.hn-btn-write {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    border:none;
    padding:.72rem 1.6rem;
    border-radius:50px;
    background:linear-gradient(135deg,#f5cddf,#f0b7cf);
    color:#411f2e;
    font-size:.95rem;
    font-weight:700;
    cursor:pointer;
    box-shadow:0 4px 10px rgba(0,0,0,.08);
}

.hn-letter-card {
    background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    border-radius:36px;
    padding:1.8rem 1.9rem;
    border:1px solid var(--hn-card-border);
    backdrop-filter:blur(4px);
    box-shadow:var(--hn-soft-shadow);
}
.hn-letter-card__top,
.hn-letter-card__nav {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:1rem;
    flex-wrap:wrap;
}
.hn-letter-card__author,
.hn-letter-card__date {
    font-size:.84rem;
    color:rgba(212,190,235,.78);
}
.hn-letter-card h2 {
    margin:.85rem 0 1rem;
    font-family:'Playfair Display',serif;
    font-size:2rem;
    color:#f3d7ff;
}
.hn-letter-card__content {
    font-size:1rem;
    line-height:1.9;
    color:rgba(244,238,251,.92);
    white-space:normal;
}
.hn-letter-card__nav { margin-top:1.4rem; }
.hn-letter-card__pager { display:flex; flex-wrap:wrap; gap:.7rem; }
.hn-pill-link {
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:.58rem 1rem;
    border-radius:30px;
    background:#fff1f5;
    color:#aa4465;
    text-decoration:none;
    font-size:.86rem;
    font-weight:700;
}

.hn-modal {
    position:fixed;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:1200;
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease;
}
.hn-modal[hidden] { display:none; }
.hn-modal.is-open { opacity:1; pointer-events:auto; }
.hn-modal__backdrop {
    position:absolute;
    inset:0;
    background:rgba(45,20,30,.7);
    backdrop-filter:blur(5px);
}
.hn-modal__dialog {
    position:relative;
    z-index:1;
    width:min(92vw, 560px);
    border-radius:48px;
    padding:2rem;
    background:#fffbf8;
    border:1px solid #ffdbeb;
    box-shadow:0 25px 40px rgba(0,0,0,.3);
}
.hn-modal__dialog h3 {
    margin:0 0 1rem;
    font-family:'Dancing Script',cursive;
    font-size:1.95rem;
    color:#be6d8c;
}
.hn-modal__close {
    position:absolute;
    right:18px;
    top:16px;
    border:none;
    background:none;
    font-size:28px;
    line-height:1;
    color:#c286a0;
    cursor:pointer;
}
.hn-compose-form { display:flex; flex-direction:column; gap:.8rem; }
.hn-compose-form input,
.hn-compose-form textarea {
    width:100%;
    padding:12px 16px;
    border-radius:28px;
    border:1px solid #f5cadb;
    background:#fffafc;
    color:#4a2a35;
    font:inherit;
    outline:none;
}
.hn-compose-form textarea { border-radius:24px; resize:vertical; }
.hn-compose-form__toggle {
    display:flex;
    align-items:center;
    gap:8px;
    color:#8f5f74;
    font-size:.9rem;
}
.hn-compose-form__actions {
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:.4rem;
}
.hn-compose-form__ghost,
.hn-compose-form__submit {
    border:none;
    border-radius:30px;
    padding:.65rem 1.2rem;
    font-weight:700;
    cursor:pointer;
}
.hn-compose-form__ghost { background:#f5e2ea; color:#3d2530; }
.hn-compose-form__submit { background:#e0a9c0; color:#fff; }

@media (max-width: 1100px) {
    .hn-page-shell { border-radius:32px; }
    .hn-two-columns { grid-template-columns:1fr; }
}
@media (max-width: 800px) {
    .hn-page-shell { padding:1.25rem; }
    .hn-hero h1 { font-size:2.7rem; }
    .hn-card-footer-row { align-items:flex-start; }
}


/* Right rail: Lời trái tim as full-width romantic letter preview */
.xt-heart-notes-rail {
    position: relative;
    width: 100%;
    background:
        radial-gradient(circle at top right, rgba(162, 118, 255, 0.10), transparent 36%),
        linear-gradient(180deg, rgba(20, 16, 32, 0.96), rgba(16, 13, 26, 0.98));
    border: 1px solid rgba(138, 108, 196, 0.28);
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.22);
    overflow: hidden;
}
.xt-heart-notes-rail::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: .20;
    pointer-events: none;
}
.xt-heart-notes-rail__header {
    position: relative;
    padding: 18px 18px 12px;
    border-bottom: 1px solid rgba(138, 108, 196, 0.20);
}
.xt-heart-notes-rail__titlewrap {
    display: block;
}
.xt-heart-notes-rail__eyebrow {
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(217, 205, 255, 0.70);
    margin-bottom: 8px;
}
.xt-heart-notes-rail__icon { display:none; }
.xt-heart-notes-rail__header h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.05;
    color: #f7f2ff;
    font-family: 'Dancing Script', 'Playfair Display', serif;
    font-weight: 700;
}
.xt-heart-notes-rail__list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}
.xt-heart-note-preview--link {
    position: relative;
    display: block;
    width: 100%;
    text-decoration: none;
    padding: 18px 18px 16px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(42, 34, 61, 0.96), rgba(31, 26, 48, 0.94));
    border: 1px solid rgba(143, 120, 190, 0.24);
    box-shadow: 0 14px 24px rgba(8, 6, 16, 0.28), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    overflow: hidden;
}
.xt-heart-note-preview--link:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(8, 6, 16, 0.34), inset 0 1px 0 rgba(255,255,255,0.06);
    border-color: rgba(171, 141, 226, 0.42);
}
.xt-heart-note-preview__paper {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent 34%),
        radial-gradient(circle at top left, rgba(144, 117, 194, 0.20), transparent 30%);
    pointer-events: none;
}
.xt-heart-note-preview--link::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(120, 98, 171, 0.92), rgba(255,255,255,0.10));
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    opacity: .92;
}
.xt-heart-note-preview--link::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 56px;
    border-top: 1px solid rgba(145, 122, 194, 0.48);
    border-right: 1px solid rgba(145, 122, 194, 0.48);
    border-top-right-radius: 24px;
    pointer-events: none;
}
.xt-heart-note-preview--link.is-primary {
    padding: 24px 22px 20px;
    background: linear-gradient(180deg, rgba(46, 37, 68, 0.98), rgba(35, 29, 54, 0.96));
}
.xt-heart-note-preview--link:not(.is-primary) {
    padding: 15px 16px 14px;
    border-radius: 21px;
}
.xt-heart-note-preview--link:not(.is-primary)::before,
.xt-heart-note-preview--link:not(.is-primary)::after {
    width: 46px;
    height: 46px;
}
.xt-heart-note-preview__meta,
.xt-heart-note-preview__title,
.xt-heart-note-preview__content,
.xt-heart-note-preview__more {
    position: relative;
    z-index: 1;
}
.xt-heart-note-preview__meta {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom: 10px;
    font-size:11px;
    color: #c6b8de;
}
.xt-heart-note-preview__author {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}
.xt-heart-note-preview__date {
    flex: 0 0 auto;
    color: #9f92bf;
}
.xt-heart-note-preview__title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.42;
    color: #f4ecff;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}
.xt-heart-note-preview--link:not(.is-primary) .xt-heart-note-preview__title {
    font-size: 15px;
    margin-bottom: 6px;
}
.xt-heart-note-preview__content {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 13px;
    line-height: 1.86;
    color: #d7cde8;
}
.xt-heart-note-preview--link.is-primary .xt-heart-note-preview__content {
    -webkit-line-clamp: 5;
    font-size: 13.5px;
}
.xt-heart-note-preview--link:not(.is-primary) .xt-heart-note-preview__content {
    -webkit-line-clamp: 2;
    font-size: 12.5px;
    line-height: 1.72;
}
.xt-heart-note-preview__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(132, 108, 187, 0.22);
    color: #efe7ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.xt-heart-note-preview--link:not(.is-primary) .xt-heart-note-preview__more {
    margin-top: 9px;
    padding: 6px 10px;
    font-size: 10.5px;
}
.xt-heart-note-preview__more::after {
    content: "→";
    font-size: 13px;
}
.xt-heart-notes-empty {
    position: relative;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(42, 34, 61, 0.96), rgba(31, 26, 48, 0.94));
    color: #d7cde8;
    font-size: 13px;
    line-height: 1.7;
    border: 1px dashed rgba(145, 122, 194, 0.50);
}
.xt-heart-notes-rail__footer {
    position: relative;
    padding: 0 16px 16px;
}
.xt-heart-notes-rail__cta {
    display:flex;
    width: 100%;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-height: 48px;
    border-radius: 18px;
    text-decoration:none;
    background: linear-gradient(135deg, rgba(196, 144, 183, 0.96), rgba(164, 116, 162, 0.95));
    color: #2e1830;
    font-size: 13px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 18px rgba(21, 14, 33, 0.22);
}
.xt-heart-notes-rail__cta i {
    font-size: 14px;
    transform: rotate(-10deg);
}
.xt-heart-notes-rail__cta span {
    position: relative;
    top: 1px;
}
.xt-heart-notes-rail__cta:hover {
    filter: brightness(1.03);
}
@media (max-width: 1200px) {
    .xt-heart-notes-rail__header h3 { font-size: 22px; }
}

