/* Monika's birthday site: shared look. Colours are the variables just below. */
:root {
  --cream: #fff8f1;
  --paper: #ffffff;
  --blush: #ffe9ee;
  --blush-deep: #ffd3de;
  --rose: #b8255f;
  --rose-dark: #8f1a49;
  --marigold: #f2a71b;
  --marigold-soft: #ffeac2;
  --gold-text: #9a5f00; /* marigold dark enough to read as small text */
  --plum: #3b1f2b;
  --ink-soft: #6f5560;
  --line: #f0dcd4;
  --sage: #2f8f6b;
  --sage-soft: #dff5ea;
  --danger: #c92a2a;
  --danger-soft: #ffe3e3;
  --shadow: 0 6px 24px rgba(120, 40, 70, 0.10);
  --shadow-lift: 0 14px 34px rgba(120, 40, 70, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --display: 'Fraunces', 'Georgia', serif;
  --body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--plum);
  background:
    radial-gradient(900px 500px at 100% -10%, #ffe3ea 0%, transparent 60%),
    radial-gradient(700px 420px at -10% 10%, #fff0cf 0%, transparent 60%),
    var(--cream);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word; /* a very long word or address wraps instead of widening the page */
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--rose); }
img, video, canvas, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding: 22px 0 56px; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
/* A row of form fields: side by side when there is room, stacked on a phone. */
.row.fields > .grow { flex: 1 1 200px; }
.stack > * + * { margin-top: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header and navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 248, 241, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--rose); text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 28px; height: 28px; border-radius: 50%; background: conic-gradient(from 20deg, var(--rose), var(--marigold), #ff8fab, var(--rose)); display: grid; place-items: center; color: #fff; font-size: .8rem; }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.who .name { font-weight: 700; font-size: .92rem; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blush-deep); color: var(--rose-dark); display: grid; place-items: center; font-weight: 800; font-size: .85rem; object-fit: cover; flex: none; }
.nav { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; text-decoration: none; color: var(--plum); font-weight: 700; font-size: .93rem; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; position: relative; }
.nav a:hover { background: var(--blush); }
.nav a[aria-current='page'] { background: var(--rose); color: #fff; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--marigold); color: var(--plum); font-size: .74rem; font-weight: 800; margin-left: 6px; }

.site-footer { border-top: 1px solid var(--line); padding: 18px 0 26px; color: var(--ink-soft); font-size: .88rem; text-align: center; }

/* ---------- Buttons and forms ---------- */
.btn { appearance: none; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 800; border-radius: 999px; padding: 11px 20px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; background: var(--rose); color: #fff; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--rose-dark); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--rose); border-color: var(--blush-deep); }
.btn.ghost:hover { background: var(--blush); }
.btn.soft { background: var(--blush); color: var(--rose-dark); }
.btn.soft:hover { background: var(--blush-deep); }
.btn.gold { background: var(--marigold); color: var(--plum); }
.btn.gold:hover { background: #e39708; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 6px 13px; min-height: 36px; font-size: .88rem; }
.btn.big { padding: 15px 30px; font-size: 1.12rem; }
.icon-btn { appearance: none; border: 0; background: transparent; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.15rem; color: var(--plum); }
.icon-btn:hover { background: var(--blush); }

label { font-weight: 700; font-size: .92rem; display: block; margin-bottom: 5px; }
input[type='text'], input[type='email'], textarea, select {
  width: 100%; font: inherit; color: var(--plum); background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; min-height: 44px;
}
textarea { resize: vertical; min-height: 84px; }
input[type='checkbox'] { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--rose); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--blush); }

/* ---------- Cards ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.flat { box-shadow: none; }
.notice { background: var(--marigold-soft); border: 1px solid #f6d58a; border-radius: var(--radius-sm); padding: 12px 15px; }
.notice.good { background: var(--sage-soft); border-color: #b5e3cd; }
.notice.bad { background: var(--danger-soft); border-color: #ffc9c9; }
.empty { text-align: center; padding: 44px 16px; color: var(--ink-soft); }
.empty .big-emoji { font-size: 2.6rem; display: block; margin-bottom: 8px; }
.page-head { margin: 8px 0 22px; }
.page-head p { color: var(--ink-soft); max-width: 62ch; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--blush); color: var(--rose-dark); border-radius: 999px; padding: 3px 11px; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.chip.gold { background: var(--marigold-soft); color: #7a5200; }
.chip.green { background: var(--sage-soft); color: #1b6348; }
.chip.grey { background: #f1ebe8; color: var(--ink-soft); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--blush-deep); border-top-color: var(--rose); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Dialogs and toasts ---------- */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(480px, calc(100vw - 28px)); box-shadow: var(--shadow-lift); color: var(--plum); background: var(--paper); }
dialog::backdrop { background: rgba(59, 31, 43, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
dialog .dlg { padding: 22px; }
dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
dialog.wide { width: min(720px, calc(100vw - 28px)); }
.toasts[popover] { inset: auto; margin: 0; border: 0; padding: 0; background: transparent; overflow: visible; }
.toasts, .toasts[popover] { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { background: var(--plum); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lift); font-weight: 700; font-size: .95rem; animation: rise .25s ease; }
.toast.bad { background: var(--danger); }
.toast.good { background: var(--sage); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 34px; align-items: center; padding: 14px 0 6px; }
.hero-photo { position: relative; justify-self: center; width: min(100%, 400px); }
/* Softly rounded top (not a full arch) so writing near the photo's top corners is not cut off. */
.hero-photo .frame { aspect-ratio: 4 / 5; border-radius: 20% 20% 26px 26px / 16% 16% 26px 26px; overflow: hidden; background: linear-gradient(160deg, var(--blush-deep), var(--marigold-soft)); border: 7px solid #fff; box-shadow: var(--shadow-lift), 0 0 0 3px var(--marigold); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo .placeholder { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; color: var(--rose-dark); padding: 20px; }
.hero-photo .placeholder b { font-family: var(--display); font-size: 5rem; line-height: 1; display: block; }
.hero-photo .spark { position: absolute; font-size: 1.7rem; animation: float 4s ease-in-out infinite; }
.hero-photo .s1 { top: 4%; left: -4%; } .hero-photo .s2 { top: 46%; right: -6%; animation-delay: -1.3s; } .hero-photo .s3 { bottom: 6%; left: -7%; animation-delay: -2.4s; }
@keyframes float { 50% { transform: translateY(-10px) rotate(8deg); } }
.eyebrow { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: var(--gold-text); margin-bottom: 10px; display: block; }
.hero h1 { font-size: clamp(2.3rem, 7vw, 4rem); color: var(--rose); margin-bottom: 16px; }
.wishes p { font-size: 1.14rem; margin-bottom: .6em; }
.sing { margin-top: 22px; }
/* While someone sings, the stage lies over the headline and wishes, ending just above the button. */
.hero-text { position: relative; }
.stage { position: absolute; z-index: 2; left: -14px; right: -14px; bottom: -8px; min-height: calc(100% + 16px); display: flex; align-items: flex-end; padding: 14px; border-radius: 24px; background: rgba(255, 248, 241, .94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 0 0 1px var(--line); scroll-margin: 130px 0 90px; animation: stage-in .25s ease; }
.stage:empty { display: none; }
@keyframes stage-in { from { opacity: 0; } }
.singer { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: end; width: 100%; max-width: 480px; animation: pop-in .5s cubic-bezier(.2, 1.4, .4, 1); }
.singer.leaving { animation: pop-out .4s ease forwards; }
.singer img, .singer .sprite { height: 210px; width: auto; filter: drop-shadow(0 8px 12px rgba(59, 31, 43, .25)); animation: bounce 1s ease-in-out infinite; transform-origin: bottom center; }
.singer .sprite { background-repeat: no-repeat; }
.singer .framed { height: 200px; background-color: #fff; border: 5px solid #fff; border-radius: 26px; box-shadow: var(--shadow-lift), 0 0 0 3px var(--marigold); filter: none; animation: sway 2.6s ease-in-out infinite; }
@keyframes sway { 50% { transform: translateY(-5px) rotate(-1.5deg); } }
.bubble { position: relative; background: #fff; border: 2px solid var(--blush-deep); border-radius: 20px; padding: 14px 16px; margin-bottom: 60px; box-shadow: var(--shadow); }
.bubble::after { content: ''; position: absolute; left: -11px; bottom: 18px; width: 18px; height: 18px; background: #fff; border-left: 2px solid var(--blush-deep); border-bottom: 2px solid var(--blush-deep); transform: rotate(45deg); }
.bubble .by { font-size: .8rem; font-weight: 800; color: var(--gold-text); text-transform: uppercase; letter-spacing: .08em; }
.bubble .lyric { font-family: var(--display); font-size: 1.25rem; color: var(--rose); min-height: 2.4em; margin: 2px 0 0; }
.bubble .lyric span { display: inline-block; animation: rise .3s ease; }
@keyframes bounce { 50% { transform: translateY(-9px) rotate(-2deg); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(40px) scale(.8); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(30px) scale(.85); } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 40px; }
.tile { text-decoration: none; color: var(--plum); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; display: block; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.tile .emoji { font-size: 1.9rem; display: block; margin-bottom: 6px; }
.tile b { font-family: var(--display); font-size: 1.12rem; display: block; }
.tile span.sub { color: var(--ink-soft); font-size: .88rem; }

/* ---------- Our Story ---------- */
.timeline { position: relative; margin: 30px auto 0; max-width: 820px; padding: 4px 0; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: linear-gradient(var(--blush-deep), var(--marigold), var(--blush-deep)); border-radius: 3px; }
.moment { position: relative; width: 50%; padding: 0 34px 30px 0; text-align: right; }
.moment:nth-child(even) { margin-left: 50%; padding: 0 0 30px 34px; text-align: left; }
.moment .pin { position: absolute; top: 4px; right: -22px; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 3px solid var(--marigold); display: grid; place-items: center; font-size: 1.25rem; box-shadow: var(--shadow); z-index: 1; }
.moment:nth-child(even) .pin { right: auto; left: -22px; }
.moment .date { font-weight: 800; color: var(--rose); letter-spacing: .04em; font-size: .92rem; text-transform: uppercase; }
.moment h3 { font-size: 1.45rem; margin: 2px 0 4px; }
.moment p { color: var(--ink-soft); margin: 0; }
.moment.future h3 { color: var(--rose); font-style: italic; }
@media (max-width: 640px) {
  .timeline::before { left: 22px; }
  .moment, .moment:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 26px 58px; text-align: left; }
  .moment .pin, .moment:nth-child(even) .pin { left: 0; right: auto; }
}

/* ---------- Lines 4 U ---------- */
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: line; }
.lines a { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; text-decoration: none; color: var(--plum); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px 13px 12px; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.lines a:hover { transform: translateX(4px); box-shadow: var(--shadow); border-color: var(--blush-deep); }
.lines .no { width: 40px; height: 40px; border-radius: 50%; background: var(--blush); color: var(--rose-dark); display: grid; place-items: center; font-weight: 800; font-family: var(--display); }
.lines .txt { font-family: var(--display); font-size: 1.08rem; line-height: 1.35; }
.quote { font-family: var(--display); font-size: clamp(1.3rem, 4vw, 1.9rem); line-height: 1.3; color: var(--rose); border-left: 5px solid var(--marigold); padding: 6px 0 6px 18px; margin: 10px 0 18px; }
.chat { display: flex; flex-direction: column; gap: 10px; padding: 6px 2px; max-height: 58vh; overflow-y: auto; }
.msg { max-width: 82%; background: #fff; border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 9px 14px; align-self: flex-start; box-shadow: 0 2px 8px rgba(120, 40, 70, .06); }
.msg.mine { align-self: flex-end; background: var(--blush); border-color: var(--blush-deep); border-radius: 18px 18px 6px 18px; }
.msg .meta { font-size: .76rem; color: var(--ink-soft); font-weight: 700; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.composer { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.composer textarea { min-height: 48px; max-height: 160px; }
.members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.members li { display: flex; align-items: center; gap: 8px; min-width: 0; background: var(--cream); border-radius: 12px; padding: 7px 10px; font-size: .92rem; }
.members li b { flex: 0 1 auto; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.members li .chip, .members li .btn { flex: none; }
.members li span.em { color: var(--ink-soft); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch { display: inline-flex; background: var(--blush); border-radius: 999px; padding: 4px; }
.switch button { appearance: none; border: 0; background: transparent; font: inherit; font-weight: 800; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--rose-dark); min-height: 38px; }
.switch button[aria-pressed='true'] { background: var(--rose); color: #fff; }

/* ---------- Galleries ---------- */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.folder { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; transition: box-shadow .15s ease; display: block; width: 100%; height: 100%; }
/* The card and its "⋮" button lift together. */
.folder-wrap { position: relative; min-width: 0; transition: transform .15s ease; }
.folder-wrap:hover { transform: translateY(-4px); }
.folder-wrap:hover .folder { box-shadow: var(--shadow-lift); }
.thumb-wrap { position: relative; min-width: 0; }
/* "⋮" on folders and tiles, and the small menu it opens. */
.more-btn { position: absolute; top: 6px; right: 6px; z-index: 1; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); background: rgba(28, 16, 22, .55); color: #fff; font: 800 1.25rem/1 var(--body); cursor: pointer; display: grid; place-items: center; padding: 0; }
.more-btn:hover, .more-btn[aria-expanded='true'] { background: rgba(28, 16, 22, .82); }
.folder-wrap .more-btn { top: 8px; right: 8px; }
.menu { position: fixed; z-index: 60; min-width: 180px; display: grid; gap: 2px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift); animation: menu-in .12s ease; }
.menu-item { appearance: none; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--plum); text-align: left; padding: 10px 14px; min-height: 44px; border-radius: 10px; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--blush); outline: none; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover, .menu-item.danger:focus-visible { background: var(--danger-soft); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.folder .cover { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--blush), var(--marigold-soft)); display: grid; place-items: center; font-size: 2.4rem; }
.folder .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.folder .info { padding: 11px 14px 13px; }
.folder .info b { display: block; font-family: var(--display); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--blush); border: 0; padding: 0; cursor: pointer; display: block; width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.thumb:hover img { transform: scale(1.05); }
.thumb .tag { position: absolute; left: 6px; bottom: 6px; background: rgba(59, 31, 43, .78); color: #fff; font-size: .74rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.thumb .tag.wait { background: var(--marigold); color: var(--plum); }
.thumb .tag.right { left: auto; right: 6px; }
.lightbox { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; background: #1c1016; color: #fff; }
/* minmax(0, ...) keeps a long picture name from stretching the viewer wider than the screen. */
.lightbox .lb { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.lightbox .lb-top { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.lightbox .lb-top .title { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox .icon-btn, .lightbox .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.lightbox .icon-btn:hover, .lightbox .btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.lightbox .lb-stage { position: relative; min-height: 0; overflow: hidden; }
/* Pinned inside the stage so the height limit really applies: the whole picture always shows,
   centred, scaled down to fit and never stretched past its own size. */
.lightbox .lb-stage img, .lightbox .lb-stage video { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; }
.lightbox .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(28, 16, 22, .55); color: #fff; font-size: 1.4rem; cursor: pointer; z-index: 1; }
.lightbox .nav-btn:hover { background: rgba(28, 16, 22, .8); }
.lightbox .nav-btn.prev { left: 10px; } .lightbox .nav-btn.next { right: 10px; }
.lightbox .lb-bottom { padding: 10px 14px 16px; background: #26151d; max-height: 42vh; max-height: 42dvh; overflow-y: auto; }
.lightbox .lb-bottom input[type='text'] { background: #3a2530; border-color: #553a47; color: #fff; }
/* Likes and comments go beside the picture, so it keeps the full height: on a phone turned
   sideways, and in the Memory Gallery (.social) on a PC-sized screen. */
@media (orientation: landscape) and (max-height: 520px) {
  .lightbox .lb { grid-template-columns: minmax(0, 1fr) clamp(220px, 34vw, 340px); grid-template-rows: auto minmax(0, 1fr); }
  .lightbox .lb-top { grid-column: 1 / -1; }
  .lightbox .lb-bottom { max-height: none; min-height: 0; }
}
@media (min-width: 900px) and (min-aspect-ratio: 5 / 4) {
  .lightbox.social .lb { grid-template-columns: minmax(0, 1fr) clamp(280px, 28vw, 380px); grid-template-rows: auto minmax(0, 1fr); }
  .lightbox.social .lb-top { grid-column: 1 / -1; }
  .lightbox.social .lb-bottom { max-height: none; min-height: 0; }
}
/* "Already here" list shown before uploading copies. */
.dupes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; max-height: 46vh; max-height: 46dvh; overflow-y: auto; }
.dupes li { display: flex; gap: 12px; align-items: center; background: var(--cream); border-radius: 12px; padding: 8px 10px; }
.dupes .pic { flex: none; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--blush); display: grid; place-items: center; font-size: 1.5rem; }
.dupes .grow { overflow-wrap: anywhere; }
.dupes b { display: block; }
.comments { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.comments li { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 7px 11px; font-size: .93rem; display: flex; gap: 8px; align-items: flex-start; }
.comments li b { color: #ffc2d4; }
.progress { height: 10px; background: var(--blush); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--marigold)); border-radius: 999px; transition: width .25s ease; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.people li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--cream); border-radius: 14px; padding: 10px 12px; }
/* The name and note keep a readable width; on a phone the buttons drop to the next line instead of squeezing them. */
.people li .grow { flex: 1 1 190px; overflow-wrap: anywhere; }
.people li .grow b { display: block; }
.people li video { max-width: 100%; }
.dropzone { border: 2px dashed var(--blush-deep); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--ink-soft); background: rgba(255, 255, 255, .6); }
.dropzone.over { border-color: var(--rose); background: var(--blush); }

/* ---------- My Docs ---------- */
.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.docs-layout > * { min-width: 0; }
.folder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.folder-list button { width: 100%; text-align: left; appearance: none; border: 0; background: transparent; font: inherit; font-weight: 700; padding: 10px 12px; border-radius: 12px; cursor: pointer; color: var(--plum); display: flex; gap: 8px; align-items: center; min-height: 44px; }
.folder-list button:hover { background: var(--blush); }
.folder-list button[aria-current='true'] { background: var(--rose); color: #fff; }
.folder-list button .count { margin-left: auto; font-size: .8rem; opacity: .75; }
.files { width: 100%; border-collapse: collapse; }
.files thead { display: none; }
.files tr { display: grid; grid-template-columns: auto auto 1fr; gap: 6px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.files td { padding: 0; }
.files td.name { grid-column: 1 / -1; font-weight: 700; overflow-wrap: anywhere; }
.files td.actions { text-align: right; }
.file-ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--blush); font-size: .68rem; font-weight: 800; color: var(--rose-dark); margin-right: 10px; vertical-align: middle; text-transform: uppercase; }
@media (max-width: 760px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .folder-list { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .folder-list li { flex: none; }
  .files tr { grid-template-columns: auto 1fr; }
  .files td.actions { grid-column: 1 / -1; text-align: left; }
}

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .hero-photo { width: min(72%, 300px); }
  .sing .row { justify-content: center; }
  .singer { text-align: left; margin: 0 auto; }
  .stage { left: -6px; right: -6px; padding: 10px; }
  .bubble { margin-bottom: 26px; padding: 11px 13px; }
  .bubble .lyric { font-size: 1.1rem; }
  .singer img, .singer .sprite, .singer .framed { height: 160px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .brand span.long { display: none; }
  /* Keep the "Click here" button on the first screen of a phone. */
  main { padding-top: 12px; }
  .hero { gap: 12px; padding-top: 0; }
  .hero-photo { width: min(54%, 200px); }
  .hero-photo .placeholder b { font-size: 3.4rem; }
  .eyebrow { margin-bottom: 4px; }
  .hero h1 { font-size: 2.05rem; margin-bottom: 8px; }
  .wishes p { font-size: 1rem; margin-bottom: .3em; line-height: 1.4; }
  .sing { margin-top: 12px; }
  .tiles { margin-top: 26px; grid-template-columns: 1fr 1fr; gap: 10px; }
  .who .name { display: none; }
  .card { padding: 16px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .folders { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .lines a { grid-template-columns: 40px 1fr; }
  .lines a .chip { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
