/* ====== Chủ đề: đêm lãng mạn — tím than, hồng phấn, ánh vàng ====== */
:root {
  --bg-1: #0b0820;
  --bg-2: #1a1037;
  --bg-3: #2b1450;
  --pink: #ff7eb3;
  --pink-2: #ff4f8b;
  --lilac: #b69cff;
  --gold: #ffd58a;
  --text: #f6f0ff;
  --muted: #b9add6;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.14);
  --radius: 20px;
  --shadow: 0 20px 60px rgba(8, 2, 30, 0.55);
  --font: 'Be Vietnam Pro', system-ui, sans-serif;
  --script: 'Dancing Script', cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, #3a1a6b 0%, transparent 60%),
              radial-gradient(1000px 700px at 110% 10%, #5b1747 0%, transparent 55%),
              linear-gradient(160deg, var(--bg-1), var(--bg-2) 50%, var(--bg-3));
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.script { font-family: var(--script); }
.muted { color: var(--muted); }
.error { color: #ff8a8a; min-height: 1.2em; }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow);
}

/* ====== Thanh điều hướng ====== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: linear-gradient(to bottom, rgba(11, 8, 32, .85), rgba(11, 8, 32, 0));
}
.brand { white-space: nowrap; text-decoration: none; font-size: 1.9rem; display: flex; align-items: center; gap: 8px; }
.beat { color: var(--pink); display: inline-block; animation: beat 1.2s infinite; font-size: 1.3rem; }
@keyframes beat { 0%,100% { transform: scale(1);} 15% { transform: scale(1.3);} 30% { transform: scale(1);} 45% { transform: scale(1.18);} }

.nav { display: flex; gap: 4px; padding: 6px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(12px); }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: .9rem; display: flex; gap: 6px; align-items: center; color: var(--muted); transition: .25s; white-space: nowrap; }
.nav a b { font-weight: 500; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav a.active { color: #fff; background: linear-gradient(135deg, var(--pink-2), #a160ff); box-shadow: 0 6px 20px rgba(255, 79, 139, .35); }

@media (max-width: 900px) {
  .nav { position: fixed; bottom: 10px; left: 10px; right: 10px; justify-content: space-around; z-index: 30; padding: 6px 4px; }
  .nav a { flex-direction: column; gap: 2px; padding: 6px 8px; font-size: .68rem; border-radius: 14px; }
  .nav a span { font-size: 1.15rem; }
  .view { padding-bottom: 110px !important; }
}

/* ====== Khung trang ====== */
.view { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 10px clamp(16px, 4vw, 40px) 60px; animation: fadeUp .5s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 18px 0 26px; }
.page-head h1 { font-family: var(--script); font-size: clamp(2.4rem, 5vw, 3.4rem); margin: 0; line-height: 1; background: linear-gradient(90deg, #fff, var(--pink), var(--lilac)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

.btn { font: inherit; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: .2s; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.12); }
.btn.primary { border: none; background: linear-gradient(135deg, var(--pink-2), #a160ff); box-shadow: 0 8px 24px rgba(255, 79, 139, .35); font-weight: 600; }
.btn.danger { color: #ffb3b3; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 6px; border-radius: 10px; }
.icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 3rem; margin-bottom: 10px; }

/* ====== Form ====== */
.form { display: grid; gap: 14px; }
.form h2 { margin: 0 0 4px; font-family: var(--script); font-size: 2rem; }
.form label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input, textarea, select {
  font: inherit; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 11px 14px; outline: none; transition: .2s; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 126, 179, .2); }
textarea { min-height: 120px; resize: vertical; }
select option { background: var(--bg-2); }
input[type="file"] { padding: 9px; }
input[type="checkbox"] { width: auto; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ====== Trang chủ — đếm ngày yêu ====== */
.hero { text-align: center; padding: clamp(24px, 5vw, 50px) 20px; position: relative; overflow: hidden; }
.couple { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 4vw, 40px); }
.person { display: grid; justify-items: center; gap: 10px; }
.avatar { width: clamp(84px, 14vw, 120px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.7); box-shadow: 0 0 0 6px rgba(255, 126, 179, .2), 0 10px 30px rgba(0,0,0,.4); background: linear-gradient(135deg, #ff9ac2, #a58bff); display: grid; place-items: center; font-size: 2.6rem; }
.person .name { font-family: var(--script); font-size: 1.7rem; }
.heart-link { font-size: clamp(2.2rem, 5vw, 3.2rem); animation: beat 1.3s infinite; filter: drop-shadow(0 0 18px rgba(255, 79, 139, .8)); }
.days { margin: 26px 0 6px; font-size: clamp(4rem, 13vw, 8rem); font-weight: 700; line-height: 1; background: linear-gradient(180deg, #fff 20%, #ffb6d3 70%, #ff6ea6); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 40px rgba(255, 110, 166, .25); }
.days-label { font-family: var(--script); font-size: clamp(1.4rem, 3vw, 2rem); color: var(--pink); }
.since { color: var(--muted); margin-top: 6px; }
.clock { display: flex; justify-content: center; gap: clamp(8px, 2vw, 16px); margin-top: 26px; flex-wrap: wrap; }
.clock div { min-width: 78px; padding: 12px 10px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid var(--glass-border); }
.clock b { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.clock span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { padding: 22px; }
.card h3 { margin: 0 0 12px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.milestones { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.milestones li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); }
.milestones li.done { opacity: .55; }
.milestones .when { color: var(--muted); font-size: .85rem; }
.countdown-big { font-size: 2.4rem; font-weight: 700; color: var(--gold); }
.quote { font-family: var(--script); font-size: 1.5rem; line-height: 1.4; color: #ffe3ef; }

/* ====== Kỉ niệm — dòng thời gian ====== */
.timeline { position: relative; padding-left: 0; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--pink), var(--lilac), transparent); transform: translateX(-50%); }
.tl-item { position: relative; width: 50%; padding: 0 36px 34px; }
.tl-item:nth-child(odd) { left: 0; }
.tl-item:nth-child(even) { left: 50%; }
.tl-item::after { content: '♥'; position: absolute; top: 18px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--pink-2), #a160ff); color: #fff; font-size: .9rem; box-shadow: 0 0 0 6px rgba(255, 79, 139, .18); }
.tl-item:nth-child(odd)::after { right: -15px; }
.tl-item:nth-child(even)::after { left: -15px; }
.tl-card { padding: 18px; }
.tl-date { color: var(--pink); font-weight: 600; font-size: .9rem; }
.tl-card h3 { margin: 6px 0 8px; font-size: 1.25rem; }
.tl-card p { margin: 0; color: #e4dbf7; white-space: pre-wrap; line-height: 1.6; }
.tl-meta { display: flex; gap: 12px; color: var(--muted); font-size: .85rem; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.tl-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.tl-photos img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.tl-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 2px; opacity: 0; transition: .2s; }
.tl-card { position: relative; }
.tl-card:hover .tl-actions { opacity: 1; }
@media (max-width: 760px) {
  .timeline::before { left: 14px; }
  .tl-item, .tl-item:nth-child(even) { width: 100%; left: 0; padding: 0 0 26px 44px; }
  .tl-item::after, .tl-item:nth-child(odd)::after, .tl-item:nth-child(even)::after { left: 0; right: auto; }
  .tl-actions { opacity: 1; }
}

/* ====== Album ====== */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.album { cursor: pointer; text-decoration: none; position: relative; }
.album .stack { position: relative; aspect-ratio: 4/5; }
.album .stack > * { position: absolute; inset: 0; border-radius: 18px; }
.album .stack .s1 { transform: rotate(-6deg); background: rgba(255,255,255,.08); border: 1px solid var(--glass-border); }
.album .stack .s2 { transform: rotate(4deg); background: rgba(255,255,255,.12); border: 1px solid var(--glass-border); }
.album .stack .cover { overflow: hidden; background: linear-gradient(135deg, #ff9ac2, #8f7bff); display: grid; place-items: center; font-size: 3rem; box-shadow: var(--shadow); transition: .35s; }
.album .stack .cover img { width: 100%; height: 100%; object-fit: cover; }
.album:hover .cover { transform: translateY(-6px) rotate(-1deg); }
.album h3 { margin: 16px 0 2px; font-size: 1.05rem; }
.album .count { color: var(--muted); font-size: .85rem; }

.masonry { columns: 4 220px; column-gap: 14px; }
.photo { break-inside: avoid; margin-bottom: 14px; position: relative; border-radius: 16px; overflow: hidden; cursor: zoom-in; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.photo img { width: 100%; transition: transform .5s; }
.photo:hover img { transform: scale(1.05); }
.photo .cap { position: absolute; inset: auto 0 0 0; padding: 30px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.7)); font-size: .85rem; opacity: 0; transition: .3s; }
.photo:hover .cap { opacity: 1; }
.photo .del { position: absolute; top: 8px; right: 8px; opacity: 0; background: rgba(0,0,0,.5); color: #fff; }
.photo:hover .del { opacity: 1; }
.dropzone { border: 2px dashed rgba(255,255,255,.25); border-radius: 18px; padding: 26px; text-align: center; color: var(--muted); margin-bottom: 22px; transition: .2s; cursor: pointer; }
.dropzone.over { border-color: var(--pink); background: rgba(255, 126, 179, .08); color: #fff; }

/* ====== Dự định ====== */
.progress { height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 6px 0 22px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink-2), var(--gold)); border-radius: 99px; transition: width .6s; }
.plans { display: grid; gap: 12px; }
.plan { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.plan .check { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--pink); display: grid; place-items: center; cursor: pointer; transition: .2s; background: transparent; color: #fff; }
.plan.done .check { background: linear-gradient(135deg, var(--pink-2), #a160ff); border-color: transparent; }
.plan .body { flex: 1; min-width: 0; }
.plan .title { font-weight: 600; }
.plan.done .title { text-decoration: line-through; opacity: .6; }
.plan .meta { color: var(--muted); font-size: .85rem; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.tag { padding: 2px 10px; border-radius: 99px; background: rgba(182, 156, 255, .18); color: #ddd0ff; font-size: .78rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .btn.active { background: rgba(255, 126, 179, .25); border-color: var(--pink); }

/* ====== Thư tay ====== */
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.envelope { position: relative; aspect-ratio: 3/2; cursor: pointer; perspective: 800px; }
.envelope .env { position: absolute; inset: 0; border-radius: 14px; background: linear-gradient(160deg, #ffe1ec, #f7c1d6); box-shadow: 0 16px 40px rgba(0,0,0,.4); overflow: hidden; transition: transform .35s; }
.envelope:hover .env { transform: translateY(-6px) rotate(-1deg); }
.envelope .flap { position: absolute; left: 0; right: 0; top: 0; height: 60%; background: linear-gradient(160deg, #ffc9dc, #f3a6c4); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.envelope .seal { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff7aa5, #c3124f); display: grid; place-items: center; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.envelope .to { position: absolute; left: 16px; bottom: 12px; right: 16px; color: #7a2a4a; font-family: var(--script); font-size: 1.4rem; display: flex; justify-content: space-between; align-items: end; }
.envelope .to small { font-family: var(--font); font-size: .72rem; opacity: .75; }
.envelope.locked .seal { background: radial-gradient(circle at 35% 35%, #9a8cc2, #4b3a7a); }
.letter-paper { background-color: #fff6ec; color: #4a2b3a; border-radius: 12px; padding: 28px 26px; font-family: var(--script); font-size: 1.45rem; line-height: 1.6; white-space: pre-wrap; box-shadow: inset 0 0 40px rgba(170, 110, 60, .12); background-image: repeating-linear-gradient(transparent, transparent 37px, rgba(200, 120, 140, .18) 38px), linear-gradient(#fffaf3, #fff3e6); animation: unfold .6s ease; }
.letter-paper .sign { text-align: right; margin-top: 18px; }
@keyframes unfold { from { transform: scaleY(.2) translateY(-40px); opacity: 0;} to { transform: none; opacity: 1; } }

/* ====== Phép màu (thẻ trải nghiệm) ====== */
.magic { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.magic-card { position: relative; overflow: hidden; min-height: 300px; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none; transition: .35s; }
.magic-card:hover { transform: translateY(-8px); }
.magic-card .art { position: absolute; inset: 0; z-index: -1; }
.magic-card h3 { margin: 0 0 6px; font-size: 1.5rem; }
.magic-card p { margin: 0; color: #e7defa; }
.magic-card .go { margin-top: 14px; color: var(--gold); font-weight: 600; }
.art.sky { background: radial-gradient(circle at 70% 30%, rgba(180, 150, 255, .45), transparent 40%), radial-gradient(ellipse at 30% 70%, rgba(255, 180, 220, .25), transparent 50%), linear-gradient(160deg, #050418, #1b1146); }
.art.fw { background: radial-gradient(circle at 30% 30%, rgba(255, 120, 170, .55), transparent 30%), radial-gradient(circle at 70% 45%, rgba(255, 210, 120, .45), transparent 28%), radial-gradient(circle at 50% 75%, rgba(140, 170, 255, .4), transparent 30%), #08061a; }
.art.tree { background: radial-gradient(circle at 50% 20%, rgba(255, 220, 120, .55), transparent 18%), conic-gradient(from 180deg at 50% 25%, transparent 160deg, rgba(60, 200, 140, .45) 170deg 190deg, transparent 200deg), linear-gradient(#071a15, #0b0820); }
.art .twinkle { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 80% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 60% 60%, #fff, transparent), radial-gradient(1px 1px at 35% 80%, #fff, transparent), radial-gradient(1px 1px at 90% 70%, #fff, transparent); animation: tw 3s infinite alternate; }
@keyframes tw { from { opacity: .4;} to { opacity: 1; } }

/* ====== Cài đặt ====== */
.settings { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.avatar-pick { display: flex; align-items: center; gap: 12px; }
.avatar-pick .avatar { width: 64px; font-size: 1.6rem; }

/* ====== Modal, lightbox, toast, lock ====== */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5, 2, 20, .6); backdrop-filter: blur(6px); animation: fadeIn .2s; }
.modal-card { width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 26px; position: relative; background: rgba(30, 18, 60, .92); }
.modal-close { position: absolute; top: 12px; right: 12px; background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
@keyframes fadeIn { from { opacity: 0; } }

.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(3, 1, 12, .94); display: grid; place-items: center; animation: fadeIn .2s; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; display: grid; gap: 10px; justify-items: center; }
.lightbox img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox figcaption { color: var(--muted); text-align: center; }
.lb-btn { position: absolute; background: rgba(255,255,255,.08); border: 1px solid var(--glass-border); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; z-index: 2; }
.lb-close { top: 18px; right: 18px; font-size: 1rem; }
.lb-prev { left: 18px; top: 50%; }
.lb-next { right: 18px; top: 50%; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 30px); opacity: 0; z-index: 70; padding: 12px 20px; border-radius: 999px; background: rgba(30, 18, 60, .95); border: 1px solid var(--glass-border); transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.lock { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 30%, #3a1a6b, #0b0820 70%); }
.lock-card { padding: 36px 30px; text-align: center; width: min(380px, 100%); }
.lock-heart { font-size: 3rem; animation: beat 1.3s infinite; }
.lock-card h2 { font-size: 2rem; margin: 8px 0 4px; }
.lock-card form { display: grid; gap: 12px; margin-top: 18px; }
.lock-card input { text-align: center; font-size: 1.4rem; letter-spacing: .4em; }
.lock.shake .lock-card { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-10px);} 75% { transform: translateX(10px);} }

/* ====== Đăng nhập & đồng bộ ====== */
.auth-form { display: grid; gap: 10px; margin-top: 14px; }
.auth-form input { text-align: left; font-size: 1rem; letter-spacing: normal; }
.auth-or { margin: 14px 0 0; color: var(--muted); font-size: .85rem; }
.link { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; margin-top: 14px; font: inherit; font-size: .85rem; }
.link:hover { color: #fff; }
.sync-box { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.05); }
.sync-box .code { font-size: 1.3rem; letter-spacing: .25em; color: var(--gold); }
code { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; font-size: .85em; }

/* ====== Bé mèo ====== */
.cat-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
@media (max-width: 860px) { .cat-layout { grid-template-columns: 1fr; } }
.cat-room { position: relative; overflow: hidden; min-height: 460px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 20px;
  background: linear-gradient(#2a1a4a 0 62%, #3b2547 62% 100%); }
.room-window { position: absolute; top: 26px; left: 26px; width: 120px; height: 100px; border-radius: 10px; border: 6px solid #5a3d6e;
  background: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 60%, #fff, transparent), radial-gradient(1.5px 1.5px at 45% 20%, #fff, transparent), linear-gradient(#0b1033, #1d1650); }
.room-window::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 47%, #5a3d6e 47% 53%, transparent 53%); }
.room-window .moon { position: absolute; right: 14px; top: 12px; width: 22px; height: 22px; border-radius: 50%; box-shadow: -6px 4px 0 0 #fff3c4; }
.speech { position: absolute; top: 26px; right: 22px; left: 170px; padding: 12px 16px; border-radius: 18px 18px 18px 4px; background: #fff; color: #5a2a45; font-size: .95rem; line-height: 1.45; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: fadeUp .5s; }
@media (max-width: 560px) { .speech { left: 22px; top: 140px; } .room-window { width: 90px; height: 80px; } }
.cat-stage { position: relative; width: min(330px, 80%); z-index: 2; cursor: grab; touch-action: none; }
.cushion { width: min(340px, 85%); height: 34px; margin-top: -26px; border-radius: 50%; background: radial-gradient(#ff9ac2, #c45a8a); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.cat-svg { width: 100%; display: block; overflow: visible; }
.cat-svg .cat-body { animation: breathe 3.2s ease-in-out infinite; transform-origin: 150px 280px; }
.cat-svg .cat-head { animation: bob 4s ease-in-out infinite; transform-origin: 150px 190px; }
.cat-svg .cat-tail { animation: wag 1.8s ease-in-out infinite; transform-origin: 212px 240px; }
.cat-svg .cat-eyes { animation: blink 5s infinite; transform-box: fill-box; transform-origin: center; }
.cat-svg.sleep .cat-tail { animation-duration: 6s; }
.cat-svg.sleep .cat-body { animation-duration: 5s; }
.cat-svg.sad .cat-tail { animation: none; transform: rotate(18deg); }
.cat-svg.purr .cat-head { animation: purr .25s ease-in-out infinite; }
.cat-svg .zzz text { fill: #cfd7ff; font: 700 22px 'Be Vietnam Pro', sans-serif; animation: zzz 3s infinite; opacity: 0; }
.cat-svg .zzz text:nth-child(2) { animation-delay: 1s; }
.cat-svg .zzz text:nth-child(3) { animation-delay: 2s; }
.cat-svg .tear { animation: tear 2.4s infinite; }
@keyframes breathe { 50% { transform: scale(1.025, 0.985); } }
@keyframes bob { 50% { transform: rotate(-3deg) translateY(2px); } }
@keyframes wag { 50% { transform: rotate(-14deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes purr { 50% { transform: rotate(4deg); } }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 10px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -24px); } }
@keyframes tear { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(18px); opacity: 0; } }
.float-emoji { position: absolute; bottom: 45%; font-size: 1.8rem; pointer-events: none; animation: floatUp 2s ease-out forwards; z-index: 3; }
@keyframes floatUp { from { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(-160px) scale(1.2); opacity: 0; } }
.envelope-pop { position: absolute; bottom: 70px; right: 20%; font-size: 2.6rem; cursor: pointer; animation: bob 1.4s ease-in-out infinite; z-index: 3; filter: drop-shadow(0 0 12px rgba(255, 126, 179, .9)); }
.cat-panel { display: grid; gap: 20px; align-content: start; }
.stat { display: grid; grid-template-columns: 120px 1fr 36px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: .92rem; }
.stat b { text-align: right; font-variant-numeric: tabular-nums; }
.sbar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.sbar i { display: block; height: 100%; border-radius: 99px; background: var(--c); transition: width .8s; box-shadow: 0 0 12px var(--c); }
.xp { display: grid; gap: 6px; margin: 14px 0 4px; font-size: .85rem; color: var(--muted); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.actions .btn { justify-content: center; }
.today { display: flex; gap: 10px; flex-wrap: wrap; }
.today span { padding: 8px 14px; border-radius: 99px; background: rgba(255,255,255,.06); }
.today span.ok { background: rgba(125, 255, 207, .15); }
.msg-form { display: flex; gap: 8px; margin-top: 14px; }
.cat-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.cat-log li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.04); font-size: .9rem; }
.cat-log small { color: var(--muted); white-space: nowrap; }
.fur-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.fur input { display: none; }
.fur-card { padding: 12px; border-radius: 18px; border: 2px solid transparent; background: rgba(255,255,255,.05); text-align: center; cursor: pointer; transition: .2s; }
.fur-card span { display: block; margin-top: 4px; }
.fur input:checked + .fur-card { border-color: var(--pink); background: rgba(255, 126, 179, .12); transform: translateY(-4px); }

@media (max-width: 900px) { .nav a { padding: 6px 4px; font-size: .6rem; } .nav a span { font-size: 1.05rem; } }

@media (min-width: 901px) and (max-width: 1280px) { .nav a b { display: none; } .nav a { padding: 8px 12px; } .nav a span { font-size: 1.15rem; } }
.letter-paper + .letter-paper { margin-top: 12px; }

/* ====== Xa mà gần ====== */
.section-title { font-family: var(--script); font-size: 2rem; margin: 30px 0 14px; color: #ffe3ef; }
.ldr-clocks { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 24px; }
.ldr-person { display: grid; justify-items: center; text-align: center; gap: 2px; }
.mini-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-size: 1.6rem; background: linear-gradient(135deg, #ff9ac2, #a58bff); border: 2px solid rgba(255,255,255,.6); margin-bottom: 4px; }
.ldr-name { font-family: var(--script); font-size: 1.5rem; }
.ldr-city { color: var(--muted); font-size: .85rem; }
.ldr-time { font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 4px; }
.ldr-date { color: var(--muted); font-size: .82rem; text-transform: capitalize; }
.ldr-wx { margin-top: 6px; font-size: .92rem; }
.ldr-status { font-size: .82rem; color: var(--gold); margin-top: 2px; }
.ldr-dist { display: grid; justify-items: center; gap: 4px; min-width: 130px; text-align: center; }
.ldr-dist b { font-size: 1.15rem; }
.ldr-dist small { color: var(--muted); }
.ldr-dist.together { font-size: 2.4rem; }
.ldr-dist.together b { font-size: 1rem; }
.ldr-line { position: relative; width: 120px; height: 2px; background: repeating-linear-gradient(90deg, var(--pink) 0 6px, transparent 6px 12px); margin: 10px 0; }
.ldr-line .plane { position: absolute; top: -12px; left: 0; animation: fly 4s ease-in-out infinite alternate; }
@keyframes fly { to { left: calc(100% - 20px); } }
@media (max-width: 640px) { .ldr-clocks { grid-template-columns: 1fr 1fr; } .ldr-dist { grid-column: 1 / -1; order: 3; } }
.countdown { display: flex; gap: 8px; }
.countdown div { flex: 1; text-align: center; padding: 8px 4px; border-radius: 12px; background: rgba(255,255,255,.06); }
.countdown b { display: block; font-size: 1.6rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .7rem; color: var(--muted); text-transform: uppercase; }
.ldr-stats { font-size: .88rem; color: #e4dbf7; }
.miss-card { text-align: center; }
.miss-btn { width: 110px; height: 110px; border-radius: 50%; border: none; cursor: pointer; font-size: 3.2rem; margin: 6px auto 4px; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ff9ac2, #ff4f8b 60%, #c3124f); box-shadow: 0 0 0 10px rgba(255, 79, 139, .15), 0 14px 40px rgba(255, 79, 139, .45); animation: beat 1.4s infinite; transition: transform .15s; }
.miss-btn:active { transform: scale(.9); }
.miss-btn.pop { animation: pop .4s; }
@keyframes pop { 50% { transform: scale(1.25); } }
.burst-heart { position: fixed; z-index: 80; pointer-events: none; font-size: 1.2rem; animation: burst .9s ease-out forwards; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
.heart-rain { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.heart-rain span { position: absolute; bottom: -60px; animation: rise linear forwards; filter: drop-shadow(0 0 10px rgba(255, 79, 139, .8)); }
@keyframes rise { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(-115vh) rotate(25deg); opacity: 0; } }
.question { font-weight: 600; line-height: 1.5; margin-bottom: 10px; }
.ans-form { display: grid; gap: 8px; }
.ans-form textarea { min-height: 70px; }
.ans-form .btn { justify-self: end; }
.answer { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); margin-top: 8px; white-space: pre-wrap; font-size: .92rem; }
.answer small { display: block; color: var(--pink); font-weight: 600; margin-bottom: 2px; }
.answer.mine { background: rgba(255, 126, 179, .12); }
.answer.locked { color: var(--muted); }
.q-old { padding: 12px 0; border-bottom: 1px solid var(--glass-border); }
.q-old > small { color: var(--muted); }
.visit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.visit-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); }
.visit-list li.up { background: rgba(255, 213, 138, .12); }
.visit-list small { display: block; color: var(--muted); }
.visit-form { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); display: grid; gap: 10px; }
.loc-who { font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.loc-pick { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.loc-pick input { flex: 1; min-width: 160px; }
.loc-results { flex-basis: 100%; display: grid; gap: 4px; }
.loc-results button { text-align: left; font: inherit; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--glass-border); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.loc-results button:hover { border-color: var(--pink); }
.loc-results small { color: var(--muted); margin-left: 8px; }

/* ====== Thư "Mở khi..." ====== */
.envelope.when .env { background: linear-gradient(160deg, #efe4ff, #cdb8f5); }
.envelope.when .flap { background: linear-gradient(160deg, #dccbff, #b89ef0); }
.envelope.when .to { color: #4b2f7a; }
.envelope.when .seal { background: radial-gradient(circle at 35% 35%, #fff, #f1e6ff); font-size: 1.3rem; }
.envelope.sealed .env { box-shadow: 0 16px 40px rgba(0,0,0,.4), 0 0 24px rgba(182, 156, 255, .55); }
.when-label { position: absolute; left: 14px; right: 14px; top: 8px; text-align: center; color: #4b2f7a; font-weight: 600; font-size: .82rem; z-index: 1; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.when-banner { text-align: center; font-family: var(--script); font-size: 1.7rem; color: #cdb8f5; margin-bottom: 10px; }

/* ====== Hành trình ====== */
.trip-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 12px; margin-bottom: 18px; }
.trip-stats > div { position: relative; overflow: hidden; padding: 14px 16px; border-radius: 16px; }
.trip-stats b { display: block; font-size: 1.6rem; color: var(--gold); }
.trip-stats span { font-size: .82rem; color: var(--muted); }
.trip-stats i { position: absolute; left: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--pink-2), var(--gold)); }
.trip-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); gap: 2px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: .88rem; color: var(--muted); background: none; border: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { color: #fff; background: linear-gradient(135deg, var(--pink-2), #a160ff); }
.trip-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
@media (max-width: 900px) { .trip-layout { grid-template-columns: 1fr; } }
.trip-map { height: 560px; overflow: hidden; padding: 0; }
@media (max-width: 900px) { .trip-map { height: 380px; } }
.trip-list { max-height: 560px; overflow: auto; padding: 8px 12px 14px; }
.trip-list h4 { margin: 14px 4px 8px; color: var(--pink); font-size: .9rem; position: sticky; top: -8px; background: rgba(30, 18, 60, .95); padding: 6px 4px; z-index: 1; }
.trip-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.place { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; cursor: pointer; transition: .2s; }
.place:hover { background: rgba(255,255,255,.07); }
.place.visited { background: rgba(255, 126, 179, .1); }
.place .thumb { width: 42px; height: 42px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: rgba(255,255,255,.06); font-size: 1.2rem; }
.place .thumb img { width: 100%; height: 100%; object-fit: cover; }
.place .info { flex: 1; min-width: 0; }
.place .info b { display: block; font-size: .93rem; }
.place .info small { color: var(--muted); font-size: .78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place .quick { display: flex; gap: 2px; }
.place .quick button { background: none; border: none; cursor: pointer; font-size: .95rem; padding: 4px; border-radius: 8px; opacity: .3; filter: grayscale(1); transition: .15s; }
.place .quick button:hover { opacity: .8; filter: none; }
.place .quick button.on { opacity: 1; filter: none; background: rgba(255,255,255,.1); }
.pin { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; font-size: 15px; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.pin.visited { background: #ff7eb3; } .pin.planned { background: #ffd58a; } .pin.wish { background: #b69cff; }
.pin.none { background: rgba(255,255,255,.45); border: 2px solid rgba(255,255,255,.2); }
.pin.photo { border: 3px solid #ff7eb3; overflow: hidden; box-shadow: 0 0 0 4px rgba(255, 126, 179, .3), 0 6px 18px rgba(0,0,0,.6); }
.pin.photo img { width: 100%; height: 100%; object-fit: cover; }
.leaflet-container { background: #0b0d1a; font-family: var(--font); border-radius: var(--radius); }
.leaflet-tooltip { background: rgba(30, 18, 60, .95); color: #fff; border: 1px solid var(--glass-border); border-radius: 10px; }
.leaflet-tooltip-top::before { border-top-color: rgba(30, 18, 60, .95); }
.leaflet-control-attribution { background: rgba(11, 8, 32, .7) !important; color: var(--muted); font-size: 10px; }
.leaflet-control-attribution a { color: var(--lilac); }
.leaflet-bar a { background: rgba(30, 18, 60, .9); color: #fff; border-color: var(--glass-border); }
.st-seg { display: flex; }
.st-seg button { flex: 1; }
.trip-photos-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.trip-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
.tp { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; }
.tp.cover { border-color: var(--gold); }
.tp img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.tp .icon-btn { position: absolute; top: 2px; background: rgba(0,0,0,.55); color: #fff; padding: 2px 6px; font-size: .8rem; }
.tp [data-cover] { left: 2px; } .tp [data-delph] { right: 2px; }
.tp.cover [data-cover] { color: var(--gold); }
.pwa-setup { margin-top: 6px; }
.pwa-setup summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.pwa-setup[open] { display: grid; gap: 10px; }
.sync-box small { color: var(--muted); display: block; margin-bottom: 4px; }

.trip-map .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(.9) contrast(.9) saturate(.5); }

@media (max-width: 900px) {
  .nav { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; min-width: 52px; }
}

/* ====== Điện thoại: menu dưới, bảng Thêm, kéo để tải lại ====== */
.mnav, .sheet { display: none; }
@media (max-width: 900px) {
  .topbar .nav { display: none; }
  .topbar { justify-content: center; padding-top: max(12px, env(safe-area-inset-top)); }
  .view { padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important; }
  .mnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40;
    padding: 6px; border-radius: 24px; background: rgba(24, 14, 50, .88); border: 1px solid var(--glass-border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
  .mnav a, .mnav button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 7px 2px; border-radius: 18px; text-decoration: none; color: var(--muted); background: none; border: none; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .mnav span { font-size: 1.35rem; line-height: 1; transition: transform .2s; }
  .mnav b { font-size: .66rem; font-weight: 500; }
  .mnav .active { color: #fff; background: linear-gradient(135deg, rgba(255,79,139,.85), rgba(161,96,255,.85)); }
  .mnav .active span { transform: translateY(-2px) scale(1.1); }
  .sheet { display: block; position: fixed; inset: 0; z-index: 45; }
  .sheet.hidden { display: none; }
  .sheet-bg { position: absolute; inset: 0; background: rgba(5, 2, 20, .5); opacity: 0; transition: opacity .25s; }
  .sheet-card { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(28px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: rgba(30, 18, 60, .97); border-top: 1px solid var(--glass-border); transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.9,.3,1); }
  .sheet.open .sheet-bg { opacity: 1; } .sheet.open .sheet-card { transform: none; }
  .sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.3); margin: 0 auto 14px; }
  .sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .sheet-grid a { position: relative; display: grid; justify-items: center; gap: 6px; padding: 14px 4px; border-radius: 18px; background: rgba(255,255,255,.05); text-decoration: none; color: var(--text); }
  .sheet-grid a span { font-size: 1.7rem; } .sheet-grid a b { font-size: .75rem; font-weight: 500; }
  .sheet-grid a.active { background: rgba(255, 126, 179, .2); outline: 1px solid var(--pink); }
  .modal { align-items: end; padding: 0; }
  .modal-card { width: 100%; max-height: 88vh; border-radius: 26px 26px 0 0; padding-bottom: calc(26px + env(safe-area-inset-bottom)); animation: sheetUp .28s cubic-bezier(.2,.9,.3,1); }
  @keyframes sheetUp { from { transform: translateY(40%); opacity: 0; } }
  .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
  html[data-slide=left] .view { animation: slideL .3s ease !important; }
  html[data-slide=right] .view { animation: slideR .3s ease !important; }
  @keyframes slideL { from { transform: translateX(40px); opacity: 0; } }
  @keyframes slideR { from { transform: translateX(-40px); opacity: 0; } }
  input, textarea, select { font-size: 16px; } /* tránh iPhone tự phóng to khi gõ */
}
.dot { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #ff3b5c; color: #fff; font-size: .62rem; font-style: normal; font-weight: 700; display: none; place-items: center; box-shadow: 0 0 0 2px rgba(24, 14, 50, .9); }
.dot.on { display: grid; animation: pop .4s; }
.ptr { position: fixed; top: 6px; left: 50%; z-index: 60; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(30, 18, 60, .95); border: 1px solid var(--glass-border); box-shadow: 0 6px 20px rgba(0,0,0,.4); opacity: 0; transform: translate(-50%, 0); pointer-events: none; font-size: 1.2rem; transition: opacity .2s; }
.ptr.ready { border-color: var(--pink); }
.ptr.spin span { display: inline-block; animation: beat .6s infinite; }
.bio-btn { margin-top: 12px; width: 100%; justify-content: center; }
.bio-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); flex-wrap: wrap; }

/* ====== Giao diện theo dịp + chế độ sáng ====== */
.season-fall { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.season-fall span { position: absolute; top: -40px; animation: seasonFall linear infinite; opacity: .85; filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
@keyframes seasonFall { 0% { transform: translateY(0) rotate(0); } 50% { transform: translate(30px, 55vh) rotate(160deg); } 100% { transform: translate(-10px, 110vh) rotate(320deg); } }
.season-banner { display: flex; align-items: center; gap: 12px; padding: 12px 18px; margin-bottom: 16px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--pink) 30%, transparent), color-mix(in srgb, var(--lilac) 25%, transparent)); border: 1px solid color-mix(in srgb, var(--pink) 50%, transparent); font-weight: 500; animation: fadeUp .6s; }
.season-banner span { font-size: 1.8rem; }
html[data-season=tet] body { background: radial-gradient(1200px 800px at 10% -10%, #7a1622 0%, transparent 60%), radial-gradient(1000px 700px at 110% 10%, #7a4a12 0%, transparent 55%), linear-gradient(160deg, #1c0a10, #2a1012 50%, #3a1a10); background-attachment: fixed; }
html[data-season=noel] body { background: radial-gradient(1200px 800px at 10% -10%, #0f3d2a 0%, transparent 60%), radial-gradient(1000px 700px at 110% 10%, #5a1220 0%, transparent 55%), linear-gradient(160deg, #06140f, #0b1d18 50%, #1a1022); background-attachment: fixed; }
html[data-season=trungthu] body { background: radial-gradient(900px 600px at 85% 5%, rgba(255, 210, 120, .35) 0%, transparent 50%), linear-gradient(160deg, #0d0a24, #1f1438 55%, #3a2140); background-attachment: fixed; }

/* Chế độ sáng (pastel) */
html[data-mode=light] {
  --text: #3b2343; --muted: #7d6a8c; --glass: rgba(255,255,255,.72); --glass-border: rgba(150, 90, 140, .18);
  --shadow: 0 16px 40px rgba(150, 80, 130, .16); --bg-1: #fff7fb; --bg-2: #fdeef6; --bg-3: #f1e8ff;
}
html[data-mode=light] body { background: radial-gradient(1200px 800px at 10% -10%, #ffd9ea 0%, transparent 60%), radial-gradient(1000px 700px at 110% 10%, #e5dbff 0%, transparent 55%), linear-gradient(160deg, #fff7fb, #fdeef6 50%, #f1e8ff); background-attachment: fixed; color: var(--text); }
html[data-mode=light] #bg-canvas { opacity: .55; filter: invert(.1) hue-rotate(300deg); }
html[data-mode=light] .page-head h1, html[data-mode=light] .days { background: linear-gradient(90deg, var(--pink-2), var(--lilac)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-mode=light] .topbar { background: linear-gradient(to bottom, rgba(255, 247, 251, .92), rgba(255, 247, 251, 0)); }
html[data-mode=light] .modal-card, html[data-mode=light] .sheet-card { background: rgba(255, 255, 255, .97); color: var(--text); }
html[data-mode=light] .mnav { background: rgba(255, 255, 255, .92); box-shadow: 0 10px 30px rgba(150, 80, 130, .2); }
html[data-mode=light] input, html[data-mode=light] textarea, html[data-mode=light] select { background: #fff; color: var(--text); }
html[data-mode=light] select option { background: #fff; }
html[data-mode=light] .btn:not(.primary) { color: var(--text); background: rgba(255,255,255,.8); }
html[data-mode=light] .btn.primary, html[data-mode=light] .nav a.active, html[data-mode=light] .mnav .active { color: #fff; }
html[data-mode=light] .clock div, html[data-mode=light] .milestones li, html[data-mode=light] .answer, html[data-mode=light] .countdown div, html[data-mode=light] .place, html[data-mode=light] .kc-item, html[data-mode=light] .kc-quest, html[data-mode=light] .cat-log li, html[data-mode=light] .sheet-grid a { background: rgba(255, 255, 255, .6); }
html[data-mode=light] .quote, html[data-mode=light] .m-note, html[data-mode=light] .section-title { color: var(--pink-2); }
html[data-mode=light] .toast { background: rgba(255,255,255,.97); color: var(--text); }
html[data-mode=light] .kc-dock, html[data-mode=light] .trip-list h4 { background: rgba(255, 255, 255, .92); }
html[data-mode=light] .kc-ring::before { background: #fff; }
html[data-mode=light] .ldr-wx, html[data-mode=light] .ldr-time { color: var(--text); }
.theme-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-swatches button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.theme-swatches button.on { border-color: var(--text); transform: scale(1.1); }

html[data-mode=light] .ldr-stats, html[data-mode=light] .tl-card p, html[data-mode=light] .magic-card p, html[data-mode=light] .game-card p, html[data-mode=light] .question { color: var(--text); }
html[data-mode=light] .magic-card h3, html[data-mode=light] .magic-card p { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
html[data-mode=light] .icon-btn { color: var(--muted); }
html[data-mode=light] .countdown b, html[data-mode=light] .countdown-big, html[data-mode=light] .trip-stats b, html[data-mode=light] .scoreboard span { color: #d9861a; }
