/* ===== Giao diện (skin): đổi bằng thuộc tính data-skin trên thẻ <html> ===== */
:root, [data-skin="hong"] {
  /* Hồng ấm: hồng đào, mơ chín, kem sữa — dịu dàng, yêu thương */
  --bg: #FFF6F3; --surface: #FFFFFF; --surface-2: #FDEDEA; --ink: #3A2830; --muted: #7D6670; --line: #F2DEDA;
  --primary: #D2546E; --primary-ink: #FFFFFF; --primary-soft: #FCE3E7; --primary-deep: #A93A53;
  --accent: #F0A05A; --accent-soft: #FDEBD9; --accent-ink: #8A4A12;
  --c3: #8C7BC9; --c3-soft: #EDE8FA; --c4: #5FA88A; --c4-soft: #E2F2EA;
  --hero: #D2546E; --hero-ink: #FFFFFF; --hero-sub: #FFE3E8; --hero-deco: rgba(255,255,255,.14);
  --font-head: 'Lora', Georgia, serif; --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --radius: 24px; --shadow: 0 1px 2px rgba(120, 40, 60, .05), 0 8px 24px rgba(120, 40, 60, .08);
}
[data-skin="nang"] {
  /* Nắng chiều: đất nung, xanh xô thơm, cát — hiện đại, ấm cúng */
  --bg: #FAF5EE; --surface: #FFFFFF; --surface-2: #F3EADF; --ink: #2E2621; --muted: #75685E; --line: #ECE1D3;
  --primary: #C4553B; --primary-ink: #FFFFFF; --primary-soft: #F8E2DA; --primary-deep: #9C3F2A;
  --accent: #5F8B67; --accent-soft: #E3EEE3; --accent-ink: #2F5A38;
  --c3: #D9A13B; --c3-soft: #FAEED3; --c4: #4F7CA6; --c4-soft: #E2ECF5;
  --hero: #2E2621; --hero-ink: #FFF7EE; --hero-sub: #E9D9C6; --hero-deco: rgba(244, 160, 110, .22);
  --font-head: 'Be Vietnam Pro', system-ui, sans-serif; --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --radius: 22px; --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 10px 26px rgba(60, 40, 20, .08);
}
[data-skin="vuon"] {
  /* Vườn nhà: xanh lá đậm, vàng mù tạt, cát nhạt — tươi mát, bình yên */
  --bg: #F4F1E8; --surface: #FFFFFF; --surface-2: #E9EFE6; --ink: #1F2D27; --muted: #5F6F66; --line: #E1E6DA;
  --primary: #2F6B5A; --primary-ink: #FFFFFF; --primary-soft: #DDEDE6; --primary-deep: #1F4D40;
  --accent: #E2A532; --accent-soft: #FBEFD2; --accent-ink: #7A5410;
  --c3: #C9654C; --c3-soft: #F8E3DC; --c4: #6E7FBF; --c4-soft: #E6E9F7;
  --hero: #2F6B5A; --hero-ink: #FFFFFF; --hero-sub: #D4EBE1; --hero-deco: rgba(226, 165, 50, .25);
  --font-head: 'Noto Serif', Georgia, serif; --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --radius: 26px; --shadow: 0 1px 2px rgba(20, 50, 40, .05), 0 8px 24px rgba(20, 50, 40, .08);
}
[data-skin="truyenthong"] {
  /* Truyền thống: đỏ trầm, vàng, kem — bản đầu tiên */
  --bg: #FBF5EA; --surface: #FFFFFF; --surface-2: #F3E6CF; --ink: #3B2618; --muted: #6B5444; --line: #EADFCB;
  --primary: #9E2B25; --primary-ink: #FFFFFF; --primary-soft: #F6E1DE; --primary-deep: #7A1F1A;
  --accent: #C8962E; --accent-soft: #F7E8C6; --accent-ink: #6E4E0E;
  --c3: #5B4790; --c3-soft: #E6E0F0; --c4: #3F6B3A; --c4-soft: #E3EDE0;
  --hero: #9E2B25; --hero-ink: #FFFFFF; --hero-sub: #FBE7C4; --hero-deco: rgba(244, 213, 141, .2);
  --font-head: 'Noto Serif', Georgia, serif; --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --radius: 20px; --shadow: 0 1px 2px rgba(60, 30, 10, .05), 0 6px 18px rgba(60, 30, 10, .07);
}
:root { --scale: 1; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: calc(17px * var(--scale)); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.5; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
.serif { font-family: var(--font-head); }
.app { max-width: 640px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }

/* Thanh trên */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: calc(env(safe-area-inset-top) + 12px) 16px 10px; display: flex; align-items: center; gap: 10px; }
.top h1 { margin: 0; font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; flex: 1; min-width: 0; letter-spacing: -.01em; }
.brand { color: var(--primary); }
.sub { font-size: .95rem; color: var(--muted); }
.back { height: 48px; padding: 0 16px 0 10px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); border: 0; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; cursor: pointer; color: var(--ink); }
.main { flex: 1; padding: 6px 16px 130px; display: flex; flex-direction: column; gap: 16px; }

/* Thanh dưới nổi */
.nav { position: fixed; bottom: calc(env(safe-area-inset-bottom) + 10px); left: 50%; transform: translateX(-50%); width: calc(100% - 20px); max-width: 620px; z-index: 30;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 30px; box-shadow: 0 10px 30px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.06); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .78rem; font-weight: 600; color: var(--muted); padding: 8px 0 6px; position: relative; border-radius: 22px; }
.nav a.on { color: var(--primary); background: var(--primary-soft); }
.nav a.on:has(.plus) { background: none; }
.nav .plus { width: 60px; height: 60px; border-radius: 30px; background: var(--primary); color: var(--primary-ink); display: flex; align-items: center; justify-content: center; margin-top: -30px; box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 45%, transparent); border: 4px solid var(--bg); }
.nav .badge { position: absolute; top: 2px; left: calc(50% + 6px); }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--primary); color: var(--primary-ink); font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Thẻ */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
button.card { border: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; box-shadow: 0 0 0 3px var(--surface); }
.avatar.sm { width: 38px; height: 38px; font-size: .8rem; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.5rem; box-shadow: 0 0 0 5px var(--surface), var(--shadow); }
.name { font-weight: 700; font-size: 1.05rem; }
.meta { font-size: .85rem; color: var(--muted); }
.section-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; margin: 6px 4px -4px; display: flex; align-items: center; gap: 8px; }

/* Nút */
.btn { white-space: nowrap; min-height: 54px; padding: 0 20px; border-radius: 18px; border: 0; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 28%, transparent); }
.btn:active { transform: scale(.98); }
.btn.big { min-height: 60px; font-size: 1.12rem; width: 100%; }
.btn.soft { background: var(--primary-soft); color: var(--primary-deep); box-shadow: none; }
.btn.plain { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.btn.dark { background: var(--ink); color: var(--bg); box-shadow: none; }
.btn.dashed { background: var(--primary-soft); color: var(--primary-deep); border: 2px dashed color-mix(in srgb, var(--primary) 55%, transparent); box-shadow: none; }
.btn.sm { min-height: 44px; font-size: .95rem; padding: 0 16px; border-radius: 22px; }
.btn:disabled { opacity: .55; }
.icon-btn { width: 50px; height: 50px; border-radius: 25px; border: 0; background: var(--surface); box-shadow: var(--shadow); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; color: var(--ink); }
.actions { display: flex; gap: 8px; }
.actions > * { flex: 1; }
.act { white-space: nowrap; padding: 0 6px; min-height: 48px; border-radius: 16px; border: 0; background: var(--surface-2); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--ink); }
.act.on { background: var(--primary-soft); color: var(--primary); }
.act.on svg { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }

/* Ô nhập */
label.lbl, span.lbl { font-weight: 600; font-size: 1rem; display: block; margin-bottom: 8px; }
.field { width: 100%; min-height: 54px; padding: 12px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); font-size: 1.05rem; }
.field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea.field { min-height: 140px; resize: vertical; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { white-space: nowrap; flex-shrink: 0; min-height: 46px; padding: 0 18px; border-radius: 23px; border: 0; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--primary); color: var(--primary-ink); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 5px; border-radius: 22px; background: var(--surface-2); }
.seg button { white-space: nowrap; padding: 0 4px; min-height: 50px; border-radius: 18px; border: 0; background: transparent; font-weight: 700; font-size: 1rem; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

/* Trang chủ: khung chào */
.hero { position: relative; overflow: hidden; background: var(--hero); color: var(--hero-ink); border-radius: calc(var(--radius) + 6px); padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; background: var(--hero-deco); }
.hero::before { width: 220px; height: 220px; right: -70px; top: -90px; }
.hero::after { width: 140px; height: 140px; right: 40px; bottom: -80px; }
.hero > * { position: relative; }
.hero .hi { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.hero .date { color: var(--hero-sub); font-size: .95rem; }
.hero .ev { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.16); color: inherit; }
.hero .ev b { font-size: 1.02rem; }
.hero .ev .meta { color: var(--hero-sub); font-size: .88rem; }
.hero-heart { position: absolute; right: 18px; top: 18px; opacity: .9; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 2px 12px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-weight: 600; font-size: .88rem; text-align: center; }
.tile span.ic { width: 50px; height: 50px; border-radius: 18px; display: flex; align-items: center; justify-content: center; }
.ti1 { background: var(--primary-soft); color: var(--primary); } .ti2 { background: var(--c3-soft); color: var(--c3); }
.ti3 { background: var(--c4-soft); color: var(--c4); } .ti4 { background: var(--accent-soft); color: var(--accent-ink); }

/* Bài viết */
.poem { background: var(--surface-2); border-radius: 20px; padding: 18px 18px; position: relative; }
.poem::before { content: '“'; position: absolute; right: 14px; top: -6px; font-family: Georgia, serif; font-size: 4.2rem; color: color-mix(in srgb, var(--primary) 25%, transparent); line-height: 1; }
.poem .t { font-family: var(--font-head); font-size: 1.22rem; font-weight: 700; color: var(--primary-deep); margin-bottom: 6px; }
.poem .b { font-family: var(--font-head); font-style: italic; font-size: 1rem; line-height: 1.75; white-space: pre-line; }
.post-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; }
.post-body { font-size: 1.05rem; line-height: 1.65; white-space: pre-line; word-wrap: break-word; }
.clamp { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.tag { align-self: flex-start; padding: 3px 10px; border-radius: 10px; font-size: .78rem; font-weight: 700; }
.grid-photos { display: grid; gap: 4px; border-radius: 20px; overflow: hidden; }
.grid-photos img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--surface-2); cursor: pointer; }
.g1 { grid-template-columns: 1fr; } .g1 img { max-height: 440px; }
.g2 { grid-template-columns: 1fr 1fr; } .g2 img { aspect-ratio: 1; }
.g3 { grid-template-columns: 2fr 1fr; grid-auto-rows: 1fr; } .g3 img { aspect-ratio: 1; } .g3 > :first-child { grid-row: span 2; aspect-ratio: auto; }
.more-photos { position: relative; } .more-photos b { position: absolute; inset: 0; background: rgba(30,20,20,.5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
audio { width: 100%; }
.kind-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 700; }

/* Bình luận & tin nhắn */
.comment { display: flex; gap: 10px; align-items: flex-start; }
.bubble { padding: 10px 14px; border-radius: 6px 20px 20px 20px; background: var(--surface); box-shadow: var(--shadow); max-width: 85%; word-wrap: break-word; white-space: pre-line; }
.msg-me { flex-direction: row-reverse; }
.msg-me .bubble { background: var(--primary); color: var(--primary-ink); border-radius: 20px 6px 20px 20px; }
.composer { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px);
  padding: 10px 12px calc(env(safe-area-inset-bottom) + 12px); display: flex; gap: 8px; align-items: flex-end; z-index: 30; }
.composer textarea { flex: 1; min-height: 52px; max-height: 140px; border-radius: 26px; padding: 13px 18px; resize: none; }

/* Album */
.albums { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.album { display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.album .cv { aspect-ratio: 4/5; border-radius: var(--radius); background: var(--surface-2) center/cover no-repeat; display: flex; align-items: flex-end; padding: 10px; box-shadow: var(--shadow); }
.album .cv span { background: rgba(255,255,255,.92); color: #222; border-radius: 12px; padding: 3px 10px; font-size: .8rem; font-weight: 700; }
.album b { padding: 0 4px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: var(--radius); overflow: hidden; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); cursor: pointer; display: block; }
.lightbox { position: fixed; inset: 0; background: rgba(15,10,10,.96); z-index: 100; display: flex; flex-direction: column; }
.lightbox img { flex: 1; min-height: 0; object-fit: contain; width: 100%; }
.lightbox .bar { display: flex; gap: 8px; padding: 12px; padding-bottom: calc(env(safe-area-inset-bottom) + 12px); }

/* Lịch */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal .wd { font-size: .78rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal .d { min-height: 50px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1rem; line-height: 1.1; }
.cal .d small { font-size: .65rem; color: var(--muted); }
.cal .d.today { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 700; }
.cal .d.ev { background: var(--primary); color: var(--primary-ink); font-weight: 700; } .cal .d.ev small { color: inherit; opacity: .8; }
.cal .d.ev2 { background: var(--c4); color: #fff; font-weight: 700; } .cal .d.ev2 small { color: inherit; opacity: .85; }
.cal .d.ev3 { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.datebox { width: 64px; height: 64px; flex-shrink: 0; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.datebox b { font-size: 1.3rem; line-height: 1; }
.datebox span { font-size: .72rem; font-weight: 600; }

/* Gia phả */
.tree { display: flex; flex-direction: column; gap: 10px; }
.tree .kids { margin-left: 22px; padding-left: 14px; border-left: 2px dashed color-mix(in srgb, var(--primary) 40%, transparent); display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); border: 0; cursor: pointer; text-align: left; width: 100%; }
.person.gone { background: var(--surface-2); box-shadow: none; }

/* Tờ trượt */
.sheet-bg { position: fixed; inset: 0; background: rgba(30,20,20,.4); z-index: 80; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 30px 30px 0 0; padding: 10px 18px calc(env(safe-area-inset-bottom) + 20px); display: flex; flex-direction: column; gap: 14px; animation: up .25s ease; }
.sheet::before { content: ''; width: 44px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; margin-bottom: 4px; }
.sheet h2 { margin: 0; font-family: var(--font-head); font-size: 1.35rem; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(40px); opacity: .5; } }
.pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; padding: 2px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; border: 2px solid transparent; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; width: 100%; text-align: left; }
.pick.on { border-color: var(--primary); background: var(--primary-soft); }
.skins { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.skin { border: 2px solid transparent; border-radius: 20px; padding: 10px; background: var(--surface-2); cursor: pointer; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.skin.on { border-color: var(--primary); }
.skin .sw { display: flex; gap: 4px; } .skin .sw i { flex: 1; height: 26px; border-radius: 8px; }

.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 18px; z-index: 200; font-weight: 600; max-width: 90%; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.note { padding: 14px 16px; border-radius: 20px; background: var(--accent-soft); color: var(--ink); font-size: .95rem; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: sp .8s linear infinite; margin: 20px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.rec-dot { width: 14px; height: 14px; border-radius: 7px; background: currentColor; animation: bl 1s infinite; }
@keyframes bl { 50% { opacity: .3; } }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.thumbs div { position: relative; } .thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.thumbs button { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 15px; border: 0; background: rgba(0,0,0,.6); color: #fff; font-weight: 700; }
.hidden { display: none !important; }
.welcome-top { background: var(--hero); color: var(--hero-ink); padding: calc(env(safe-area-inset-top) + 48px) 24px 40px; text-align: center; border-radius: 0 0 36px 36px; position: relative; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.role-inline { font-weight: 500; font-size: .78rem; color: var(--muted); }
.role { font-size: .82rem; }

/* ===== Cổng vào nhà & bàn phím mã 4 số ===== */
.gate-main { max-width: 560px; margin: 0 auto; width: 100%; padding-bottom: 40px; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 6px 0 16px; }
.pin-dots span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink); }
.pin-dots span.on { background: var(--primary); border-color: var(--primary); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 340px; margin: 0 auto; }
.keypad button { height: 64px; border-radius: 20px; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 1.6rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.keypad button:active { background: var(--primary-soft); }
.banner-pending { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--accent-soft); color: var(--ink); }

/* ===== Khung 3 cột (máy tính) ===== */
.shell { display: block; }
.side, .right { display: none; }
.col { min-width: 0; }
.mini-ev { display: flex; align-items: center; gap: 10px; color: var(--ink); padding: 4px 0; }
.datebox.sm { width: 50px; height: 50px; border-radius: 14px; }
.datebox.sm b { font-size: .95rem; }
.mini-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 14px; overflow: hidden; }
.mini-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: pointer; display: block; background: var(--surface-2); }
.mini-people { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.mini-people a { color: var(--ink); }
.today .big-day { font-family: var(--font-head); font-size: 3rem; font-weight: 700; line-height: 1; color: var(--primary); }

@media (min-width: 1000px) {
  html { font-size: calc(16px * var(--scale)); }
  .app { max-width: none; border: 0 !important; }
  .shell { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 32px; width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px; align-items: start; box-sizing: border-box; }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 22px 0 18px; overflow: auto; }
  .side > a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 16px; color: var(--ink); font-weight: 600; }
  .side > a:hover { background: var(--surface); }
  .side > a.on { background: var(--primary-soft); color: var(--primary-deep); }
  .side > a.btn { color: var(--primary-ink); justify-content: center; }
  .side > a.btn:hover { background: var(--primary); }
  .side-brand { font-size: 1.35rem; color: var(--primary) !important; font-weight: 700 !important; padding: 6px 14px 10px !important; }
  .side-brand:hover { background: none !important; }
  .side-me { margin-top: auto; background: var(--surface); box-shadow: var(--shadow); }
  .right { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; max-height: 100vh; overflow: auto; padding: 22px 2px 24px; }
  .col { max-width: 720px; width: 100%; justify-self: center; }
  .nav { display: none; }
  .top { padding: 20px 0 12px; }
  .top .brand, .top [aria-label="Trang cá nhân"] { display: none; }
  .main { padding: 6px 0 60px; }
  .composer { position: sticky; bottom: 0; left: auto; transform: none; width: 100%; max-width: none; padding: 12px 0 18px; }
  .sheet-bg { align-items: center; }
  .sheet { border-radius: 28px; max-width: 600px; padding-bottom: 22px; }
  .sheet::before { display: none; }
  .albums { grid-template-columns: repeat(3, 1fr); }
  .photos { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 28px 28px 24px; }
  .hero .hi { font-size: 1.9rem; }
  .cal .d { min-height: 64px; font-size: 1.1rem; }
  .lightbox img { padding: 20px; }
  .lightbox .bar { max-width: 700px; margin: 0 auto; width: 100%; }
  .gate .welcome-top { border-radius: 0 0 48px 48px; }
}
@media (min-width: 1000px) and (max-width: 1180px) {
  .shell { grid-template-columns: 210px minmax(0, 1fr) 260px; gap: 20px; padding: 0 16px; }
}
