/* Matches the invitation at finallyfoundyou.today:
   Cormorant Garamond display + Work Sans UI, tracked uppercase eyebrows,
   white type over full-bleed media, warm cream sheets.
   Old-browser safe: no `inset`, no flex `gap`, no `aspect-ratio`, vh before dvh. */
:root {
  --cream: #faf8f5;
  --cream-2: #f1ece4;
  --ink: #1d1a17;
  --ink-2: #5f5850;
  --line: rgba(29, 26, 23, .14);
  --night: #0f0d0b;
  --w95: rgba(255, 255, 255, .95);
  --w85: rgba(255, 255, 255, .85);
  --w60: rgba(255, 255, 255, .6);
  --w25: rgba(255, 255, 255, .25);
  --w12: rgba(255, 255, 255, .12);
  --stamp: #ff8a1f;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--night); }
body { font-family: var(--sans); color: #fff; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
.ico { width: 22px; height: 22px; display: block; }
.ico.big { width: 44px; height: 44px; margin: 0 auto 14px; opacity: .85; }

/* ---------- type ---------- */
.eyebrow { font-family: var(--sans); font-size: 10px; letter-spacing: .35em; text-transform: uppercase; font-weight: 500; color: #fff; margin: 0; }
.display { font-family: var(--serif); font-weight: 400; line-height: 1.02; margin: 0; letter-spacing: -.005em; }
.meta { font-size: 14px; color: var(--w85); margin: 14px 0 0; }
.meta.small { font-size: 12px; color: var(--w60); margin-top: 4px; letter-spacing: .04em; }
.lede { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.3; color: var(--w95); margin: 0 0 22px; }
.fine { font-size: 12px; color: var(--w60); margin: 16px 0 0; line-height: 1.5; }
.body { font-size: 14px; line-height: 1.55; margin: 0; }
.ink { color: var(--ink); }
.eyebrow.ink { color: var(--ink-2); }
.fine.ink { color: var(--ink-2); }

/* ---------- app shell: screens stacked, tab bar pinned to the bottom ---------- */
:root { --tabh: 58px; }
.app {
  position: relative; width: 100%; max-width: 480px; margin: 0 auto; overflow: hidden;
  height: 100vh; height: 100dvh; background: var(--night);
}
@media (min-width: 560px) {
  body { padding: 20px 0; }
  .app { height: calc(100vh - 40px); border-radius: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
}
.view {
  position: absolute; top: 0; left: 0; right: 0; overflow: hidden; background: var(--night);
  bottom: 58px; bottom: calc(var(--tabh) + env(safe-area-inset-bottom));
}
.view.camera { bottom: 0; }

/* ---------- tab bar ---------- */
.tabbar {
  position: absolute; z-index: 10; left: 0; right: 0; bottom: 0; display: flex; align-items: stretch;
  height: 58px; height: calc(var(--tabh) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #0b0a08; border-top: 1px solid rgba(255,255,255,.08);
}
.tabbar.hidden { display: none !important; }
.tab {
  position: relative; -webkit-flex: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--w60); -webkit-transition: color .15s; transition: color .15s;
}
.tab .ico { width: 23px; height: 23px; }
.tab small { font-size: 10px; letter-spacing: .04em; margin-top: 4px; }
.tab.on { color: #fff; }
.tab.on small { font-weight: 500; }
.tab-shoot { -webkit-flex: 0 0 76px; flex: 0 0 76px; }
.shoot-btn {
  width: 50px; height: 50px; margin-top: -18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--cream); color: var(--ink); border: 4px solid #0b0a08; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 6px 18px rgba(0,0,0,.45);
  -webkit-transition: -webkit-transform .12s; transition: transform .12s;
}
.tab-shoot:active .shoot-btn { -webkit-transform: scale(.92); transform: scale(.92); }
.tab-badge {
  position: absolute; top: 5px; left: 50%; margin-left: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--stamp); color: #1d1a17; font-size: 10px; font-weight: 600; line-height: 18px; text-align: center;
}

.tab-avatar { width: 25px; height: 25px; border-radius: 50%; background-size: cover; background-position: center; border: 1.5px solid currentColor; }

/* ---------- cactus & koala ---------- */
.disc {
  position: absolute; z-index: 4; width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 7px solid #1b1815; box-shadow: 0 4px 14px rgba(0,0,0,.5);
  -webkit-animation: spin 6s linear infinite; animation: spin 6s linear infinite;
}
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
.home-disc { right: 16px; bottom: 18px; }
.feed-disc { right: 14px; bottom: 18px; }
.cele {
  position: absolute; z-index: 40; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.cele-mascot { width: 46%; max-width: 210px; -webkit-animation: celePop 1.9s cubic-bezier(.2,1.4,.4,1) forwards; animation: celePop 1.9s cubic-bezier(.2,1.4,.4,1) forwards; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
.cele-text {
  margin: 14px 24px 0; padding: 10px 18px; border-radius: 999px; background: rgba(250,248,245,.96); color: var(--ink);
  font-size: 13px; text-align: center; -webkit-animation: celeText 1.9s ease forwards; animation: celeText 1.9s ease forwards;
}
.cele-text:empty { display: none; }
@-webkit-keyframes celePop { 0% { -webkit-transform: scale(.2) rotate(-12deg); opacity: 0; } 18% { -webkit-transform: scale(1.06) rotate(3deg); opacity: 1; } 28% { -webkit-transform: scale(1) rotate(0); } 80% { -webkit-transform: scale(1); opacity: 1; } 100% { -webkit-transform: scale(.85) translateY(-30px); opacity: 0; } }
@keyframes celePop { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 18% { transform: scale(1.06) rotate(3deg); opacity: 1; } 28% { transform: scale(1) rotate(0); } 80% { transform: scale(1); opacity: 1; } 100% { transform: scale(.85) translateY(-30px); opacity: 0; } }
@-webkit-keyframes celeText { 0%, 15% { opacity: 0; } 25%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes celeText { 0%, 15% { opacity: 0; } 25%, 80% { opacity: 1; } 100% { opacity: 0; } }
.float-heart { position: absolute; z-index: 30; width: 34px; height: 34px; color: #ff5a6e; pointer-events: none; -webkit-animation: heartUp 1s ease-out forwards; animation: heartUp 1s ease-out forwards; }
@-webkit-keyframes heartUp { 0% { -webkit-transform: scale(.3); opacity: 0; } 20% { -webkit-transform: scale(1.25); opacity: 1; } 100% { -webkit-transform: translateY(-90px) scale(.9); opacity: 0; } }
@keyframes heartUp { 0% { transform: scale(.3); opacity: 0; } 20% { transform: scale(1.25); opacity: 1; } 100% { transform: translateY(-90px) scale(.9); opacity: 0; } }
.empty-mascot { width: 160px; margin-bottom: 4px; -webkit-animation: bob 3s ease-in-out infinite; animation: bob 3s ease-in-out infinite; }
@-webkit-keyframes bob { 50% { -webkit-transform: translateY(-8px) rotate(-2deg); } }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
.sheet-mascot { width: 96px; margin: -78px auto 4px; display: block; -webkit-animation: bob 3s ease-in-out infinite; animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 6px 12px rgba(0,0,0,.25)); }

/* ---------- wall posts ---------- */
.post .track {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; -webkit-scroll-snap-type: x mandatory; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.post .track::-webkit-scrollbar { display: none; }
.post .cell { position: relative; -webkit-flex: 0 0 100%; flex: 0 0 100%; height: 100%; overflow: hidden; scroll-snap-align: start; }
.post .cell img.fit { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; pointer-events: none; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--w25); margin: 0 3px; -webkit-transition: background .2s, width .2s; transition: background .2s, width .2s; }
.dots i.on { background: #fff; width: 16px; border-radius: 3px; }
.post-rail { position: absolute; z-index: 4; right: 10px; bottom: 82px; display: flex; flex-direction: column; align-items: center; }
.rail-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff; background: #3a332c center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.like-btn { margin-top: 22px; display: flex; flex-direction: column; align-items: center; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.like-btn .ico { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); }
.like-btn.on { color: #ff5a6e; }
.like-btn.on .ico { -webkit-animation: likePop .35s ease; animation: likePop .35s ease; }
@-webkit-keyframes likePop { 50% { -webkit-transform: scale(1.3); } }
@keyframes likePop { 50% { transform: scale(1.3); } }
.like-btn small { font-size: 10px; margin-top: 3px; color: #fff; }
.post-rail .disc { position: relative; margin-top: 22px; }
.post-caption { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 70px 80px 30px 16px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.62)); pointer-events: none; }
.post-caption strong { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px; }
.post-caption .cap { font-size: 14px; line-height: 1.4; margin: 4px 0 6px; color: var(--w95); }
.post-caption .cap:empty { display: none; }
.post-caption small { font-size: 11px; color: var(--w60); letter-spacing: .04em; }

/* ---------- profiles (Us / You) ---------- */
.pf-scroll { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pf-head { padding: calc(30px + env(safe-area-inset-top)) 22px 18px; text-align: center; }
.pf-avatar-wrap { position: relative; display: inline-block; }
.pf-avatar { display: block; width: 96px; height: 96px; border-radius: 50%; background: #2a2420 center/cover no-repeat; border: 2px solid var(--w25); }
.pf-avatar.initials { display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 40px; color: #fff; background: linear-gradient(135deg, #6d5a4c, #2a2420); }
#usAvatar { background-size: 250%; background-position: 46% 54%; }
.pf-sticker { position: absolute; right: -34px; bottom: -10px; width: 64px; -webkit-transition: -webkit-transform .3s; transition: transform .3s; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.pf-avatar-wrap.wiggle .pf-sticker { -webkit-animation: wiggle .7s ease; animation: wiggle .7s ease; }
@-webkit-keyframes wiggle { 20% { -webkit-transform: rotate(-14deg) scale(1.15); } 50% { -webkit-transform: rotate(10deg) scale(1.1); } 80% { -webkit-transform: rotate(-4deg); } }
@keyframes wiggle { 20% { transform: rotate(-14deg) scale(1.15); } 50% { transform: rotate(10deg) scale(1.1); } 80% { transform: rotate(-4deg); } }
.pf-edit-dot { position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--cream); color: var(--ink); display: flex; align-items: center; justify-content: center; border: 3px solid var(--night); }
.pf-edit-dot .ico { width: 15px; height: 15px; }
.pf-name { font-size: 32px; margin: 14px 0 2px; }
.pf-handle { margin: 0; font-size: 13px; color: var(--w60); }
.stats { display: flex; justify-content: center; margin: 18px 0 16px; }
.stats div { padding: 0 16px; text-align: center; }
.stats div + div { border-left: 1px solid var(--w12); }
.stats b { display: block; font-size: 18px; font-weight: 600; }
.stats small { font-size: 11px; color: var(--w60); }
.pf-bio { font-size: 14px; margin: 0 0 6px; color: var(--w95); }
.pf-meta { font-size: 12px; color: var(--w60); margin: 0 0 16px; line-height: 1.6; }
.people { margin: 0 0 18px; }
.people div { margin-top: 10px; }
.people b { display: block; font-family: var(--serif); font-weight: 500; font-size: 19px; }
.people small { font-size: 12px; color: var(--w60); }
.pf-btn { display: flex; text-decoration: none; min-height: 44px; font-size: 11px; }
.pf-actions { display: flex; }
.pf-actions .pill { min-height: 44px; font-size: 11px; letter-spacing: .12em; }
.pf-actions .pill + .pill { margin: 0 0 0 10px; }
.toggle-row { display: flex; align-items: center; justify-content: center; margin-top: 14px; font-size: 13px; color: var(--w85); }
.toggle-row input { width: 18px; height: 18px; margin: 0 8px 0 0; accent-color: #faf8f5; }
.grid-head { display: flex; align-items: center; justify-content: center; padding: 12px 0; border-top: 1px solid var(--w12); border-bottom: 1px solid #fff; width: 50%; margin: 0 auto; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.grid-head .ico { width: 16px; height: 16px; margin-right: 8px; }
.pgrid { display: flex; flex-wrap: wrap; padding: 2px 0 0; }
.ptile { position: relative; width: 33.333%; padding-top: 59%; border: 1px solid var(--night); background: #1e1a16 center/cover no-repeat; }
.ptile .tag { position: absolute; top: 6px; right: 6px; font-size: 10px; background: rgba(0,0,0,.45); border-radius: 999px; padding: 2px 7px; }
.ptile .cap { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.ptile.sending { opacity: .6; }
.you-empty { text-align: center; padding: 30px 32px 40px; color: var(--w60); font-family: var(--serif); font-style: italic; font-size: 19px; }

/* ---------- camera additions ---------- */
.top-right { display: flex; align-items: center; }
.save-chip { display: flex; align-items: center; margin-right: 8px; background: var(--cream); color: var(--ink); border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 600; }
.save-chip .ico { width: 14px; height: 14px; margin-right: 4px; }
.selfie-overlay { position: absolute; z-index: 4; top: 0; left: 0; right: 0; bottom: 0; }
.selfie-ring {
  position: absolute; left: 50%; top: 42%; width: 74%; padding-top: 74%; border-radius: 50%;
  -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2000px rgba(15,13,11,.72), inset 0 0 0 2px rgba(255,255,255,.7);
}
.selfie-mascot { position: absolute; left: 50%; top: 42%; width: 92px; margin: 25% 0 0 14%; -webkit-animation: bob 2.6s ease-in-out infinite; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 6px 12px rgba(0,0,0,.4)); }
.selfie-copy { position: absolute; left: 0; right: 0; top: 18px; text-align: center; padding: 0 24px; }
.selfie-copy .display { font-size: 30px; margin: 6px 0 4px; }
.selfie-copy .fine { margin-top: 0; }
.skip-btn { position: absolute; right: 16px; bottom: 16px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.5); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.capbar {
  position: absolute; z-index: 6; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; padding: 6px; border-radius: 16px;
  background: rgba(15,13,11,.78); border: 1px solid var(--w25); overflow: hidden;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-animation: up .25s ease-out; animation: up .25s ease-out;
}
.cap-thumb { width: 40px; height: 52px; object-fit: cover; border-radius: 6px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.cap-input { -webkit-flex: 1; flex: 1; min-width: 0; margin: 0 8px; padding: 10px 4px; background: none; border: 0; color: #fff; font: 15px var(--sans); }
.cap-input::placeholder { color: var(--w60); }
.cap-input:focus { outline: none; }
.cap-post { padding: 9px 14px; border-radius: 999px; background: var(--cream); color: var(--ink); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.cap-timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--cream); -webkit-transform-origin: left; transform-origin: left; }
.cap-timer.run { -webkit-animation: shrink 6s linear forwards; animation: shrink 6s linear forwards; }
@-webkit-keyframes shrink { to { -webkit-transform: scaleX(0); } }
@keyframes shrink { to { transform: scaleX(0); } }

/* ---------- viewer ---------- */
.viewer { position: fixed; z-index: 25; top: 0; left: 0; right: 0; bottom: 0; background: rgba(10,8,6,.97); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.viewer img { max-width: 100%; max-height: 70vh; border: 6px solid var(--cream); border-bottom-width: 26px; }
.viewer-cap { font-family: var(--serif); font-style: italic; font-size: 19px; margin: 14px 0 0; text-align: center; color: var(--w95); }
.viewer-cap:empty { display: none; }
.viewer-bar { display: flex; width: 100%; max-width: 420px; margin-top: 18px; }
.viewer-bar .pill { margin: 0 5px; min-height: 46px; font-size: 11px; }
.topbar {
  position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 16px; margin-top: env(safe-area-inset-top);
}
.topbar.overlay { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,0)); height: 72px; padding-bottom: 16px; }
.icon-btn { width: 40px; height: 40px; margin-left: -8px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.icon-btn:active { background: var(--w12); }
.chip-btn { border: 1px solid var(--w25); border-radius: 999px; padding: 6px 12px; font-size: 11px; letter-spacing: .2em; }

/* ---------- pills ---------- */
.pill {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; border-radius: 999px;
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 500;
  -webkit-transition: -webkit-transform .12s, opacity .12s; transition: transform .12s, opacity .12s;
}
.pill + .pill { margin-top: 10px; }
.pill .ico { width: 18px; height: 18px; margin-right: 10px; }
.pill:active { -webkit-transform: scale(.98); transform: scale(.98); opacity: .9; }
.pill-light { background: var(--cream); color: var(--ink); }
.pill-ghost { border: 1px solid rgba(255,255,255,.45); color: #fff; }
.pill-dark { background: var(--ink); color: var(--cream); }
.pill-outline { border: 1px solid var(--line); color: var(--ink); }
.text-btn { font-size: 13px; color: var(--w85); text-decoration: underline; text-underline-offset: 3px; padding: 10px; }
.text-btn.ink { color: var(--ink-2); display: block; margin: 6px auto 0; }

/* ---------- home ---------- */
.home .bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: #2a2420; background-size: cover; background-position: center;
  -webkit-transform: scale(1.06); transform: scale(1.06);
  -webkit-animation: drift 18s ease-in-out infinite alternate; animation: drift 18s ease-in-out infinite alternate;
}
@-webkit-keyframes drift { to { -webkit-transform: scale(1.14) translateY(-1.5%); } }
@keyframes drift { to { transform: scale(1.14) translateY(-1.5%); } }
.scrim { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,.08) 30%, rgba(0,0,0,.15) 52%, rgba(0,0,0,.82) 100%); }
/* stacked column: hero at the top, actions at the bottom — they can never overlap */
.home { display: flex; flex-direction: column; }
.home .topbar { -webkit-flex-shrink: 0; flex-shrink: 0; }
.hero { position: relative; z-index: 2; text-align: center; padding: 6vh 24px 0; -webkit-flex-shrink: 0; flex-shrink: 0; }
.hero .display { font-size: 52px; margin-top: 14px; }
.home-foot { position: relative; z-index: 2; margin-top: auto; padding: 16px 24px 16px; text-align: center; }
.sound-row { display: flex; align-items: center; justify-content: center; margin-top: 14px; }
.disc.mini { position: static; width: 26px; height: 26px; border-width: 4px; margin-right: 8px; box-shadow: none; }
@media (max-height: 640px) {
  .hero { padding-top: 2vh; }
  .hero .display { font-size: 40px; margin-top: 8px; }
  .meta { margin-top: 8px; font-size: 13px; }
  .lede { font-size: 17px; margin-bottom: 14px; }
  .pill { min-height: 46px; }
  .sound-row { margin-top: 10px; }
}

/* ---------- moments feed ---------- */
.feed {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; -webkit-scroll-snap-type: y mandatory; scroll-snap-type: y mandatory;
}
.slide { position: relative; height: 100%; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; background: #1a1714; overflow: hidden; }
.slide > img, .slide > video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.slide > img, .post .cell img.fit { opacity: 0; -webkit-transition: opacity .5s; transition: opacity .5s; }
.slide > img.in, .post .cell img.fit.in { opacity: 1; }
.post .track { touch-action: manipulation; }
.camera.capping .stamp, .camera.capping .frame i:nth-child(n+3) { visibility: hidden; }
.camera.selfie #galleryBtn, .camera.selfie #flipBtn, .camera.selfie .stamp, .camera.selfie .frame,
.camera.selfie #rollLine, .camera.selfie .exp, .camera.selfie #status { visibility: hidden; }
.slide .play {
  position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; z-index: 2;
  border-radius: 50%; background: rgba(0,0,0,.35); border: 1px solid var(--w60); display: flex; align-items: center; justify-content: center;
}
.slide .play .ico { width: 26px; height: 26px; margin-left: 3px; }
.slide.end { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 32px; background: var(--night); }
.slide.end .display { font-size: 38px; margin: 16px 0 28px; }
.counter-pill, .status-pill { font-size: 11px; letter-spacing: .08em; color: var(--w95); background: rgba(0,0,0,.28); border: 1px solid var(--w25); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.rail { position: absolute; z-index: 4; right: 12px; bottom: calc(120px + env(safe-area-inset-bottom)); }
.rail-btn { display: flex; flex-direction: column; align-items: center; }
.rail-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--cream); color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.rail-btn small { font-size: 10px; margin-top: 6px; letter-spacing: .06em; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.feed-caption {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; pointer-events: none;
  padding: 60px 16px 18px;
  background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.6));
}
.feed-caption strong { display: block; font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.feed-caption span { font-size: 12px; color: var(--w85); line-height: 1.45; }

.pill-row { display: flex; margin-top: 10px; }
.pill-row .pill { -webkit-flex: 1; flex: 1; margin-top: 0; font-size: 11px; letter-spacing: .14em; }
.pill-row .pill + .pill { margin-left: 10px; }
.badge { margin-left: 8px; font-size: 10px; letter-spacing: .04em; background: var(--cream); color: var(--ink); border-radius: 999px; padding: 2px 7px; }

/* ---------- guest wall ---------- */
.slide .blur {
  position: absolute; top: -40px; left: -40px; right: -40px; bottom: -40px; background-size: cover; background-position: center;
  -webkit-filter: blur(28px) brightness(.55); filter: blur(28px) brightness(.55);
}
.slide img.fit { object-fit: contain; }
.new-pill {
  position: absolute; z-index: 5; top: calc(64px + env(safe-area-inset-top)); left: 50%;
  -webkit-transform: translateX(-50%); transform: translateX(-50%);
  background: var(--cream); color: var(--ink); border-radius: 999px; padding: 9px 16px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.wall-empty { position: absolute; z-index: 3; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 32px; }
.wall-empty .display { font-size: 32px; margin: 10px 0 24px; }
.feed-caption strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px; }

/* ---------- camera ---------- */
.camera { display: flex; flex-direction: column; }
.exp { display: flex; align-items: baseline; }
.exp-num { font-family: var(--mono); font-size: 20px; letter-spacing: .04em; margin-right: 8px; }
.status-pill:empty { visibility: hidden; }
.finder {
  position: relative; -webkit-flex: 1; flex: 1; min-height: 0; margin: 0 10px; border-radius: 22px; overflow: hidden; background: #151210;
}
.finder video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
  -webkit-filter: sepia(.16) saturate(1.12) contrast(1.05); filter: sepia(.16) saturate(1.12) contrast(1.05);
}
.finder video.mirror { -webkit-transform: scaleX(-1); transform: scaleX(-1); }
.frame i { position: absolute; width: 22px; height: 22px; border-color: var(--w60); border-style: solid; border-width: 0; pointer-events: none; z-index: 2; }
.frame i:nth-child(1) { top: 18px; left: 18px; border-top-width: 1.5px; border-left-width: 1.5px; border-top-left-radius: 6px; }
.frame i:nth-child(2) { top: 18px; right: 18px; border-top-width: 1.5px; border-right-width: 1.5px; border-top-right-radius: 6px; }
.frame i:nth-child(3) { bottom: 18px; left: 18px; border-bottom-width: 1.5px; border-left-width: 1.5px; border-bottom-left-radius: 6px; }
.frame i:nth-child(4) { bottom: 18px; right: 18px; border-bottom-width: 1.5px; border-right-width: 1.5px; border-bottom-right-radius: 6px; }
.stamp {
  position: absolute; z-index: 2; right: 30px; bottom: 26px; font-family: var(--mono); font-weight: 700; font-size: 15px;
  color: var(--stamp); text-shadow: 0 0 6px rgba(255,110,0,.75); letter-spacing: .06em; pointer-events: none;
}
.native-hint { position: absolute; z-index: 3; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: radial-gradient(circle at 50% 45%, #2a2420, #151210 70%); }
.native-hint p { font-family: var(--serif); font-style: italic; font-size: 22px; margin: 0 0 6px; color: var(--w95); }
.flashfx { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 5; background: #fff; opacity: 0; pointer-events: none; }
.flashfx.on { -webkit-animation: flash .5s ease-out; animation: flash .5s ease-out; }
@-webkit-keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.polaroid {
  position: absolute; z-index: 6; left: 18px; bottom: 18px; width: 28%; max-width: 116px;
  background: var(--cream); padding: 5px 5px 18px; box-shadow: 0 10px 28px rgba(0,0,0,.5);
  -webkit-animation: pop 1.7s ease forwards; animation: pop 1.7s ease forwards;
}
.polaroid img { display: block; width: 100%; }
@-webkit-keyframes pop {
  0% { -webkit-transform: translateY(30px) rotate(-6deg) scale(.7); opacity: 0; }
  14%, 78% { -webkit-transform: translateY(0) rotate(-3deg) scale(1); opacity: 1; }
  100% { -webkit-transform: translate(-10px, 90px) rotate(-10deg) scale(.6); opacity: 0; }
}
@keyframes pop {
  0% { transform: translateY(30px) rotate(-6deg) scale(.7); opacity: 0; }
  14%, 78% { transform: translateY(0) rotate(-3deg) scale(1); opacity: 1; }
  100% { transform: translate(-10px, 90px) rotate(-10deg) scale(.6); opacity: 0; }
}
.controls { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px 0; -webkit-flex-shrink: 0; flex-shrink: 0; }
.side-btn { width: 58px; display: flex; flex-direction: column; align-items: center; color: var(--w95); }
.side-btn .ico { width: 26px; height: 26px; }
.side-btn small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; margin-top: 7px; color: var(--w60); }
.side-btn.invisible { visibility: hidden; }
.shutter { width: 80px; height: 80px; border-radius: 50%; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; }
.shutter span { display: block; width: 64px; height: 64px; border-radius: 50%; background: var(--cream); -webkit-transition: -webkit-transform .12s; transition: transform .12s; }
.shutter:active span, .shutter.pressed span { -webkit-transform: scale(.86); transform: scale(.86); }
.roll-line { text-align: center; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--w60); margin: 14px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); -webkit-flex-shrink: 0; flex-shrink: 0; }

/* ---------- sheets ---------- */
.sheet-wrap { position: fixed; z-index: 20; top: 0; left: 0; right: 0; bottom: 0; background: rgba(10,8,6,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 480px; background: var(--cream); color: var(--ink); border-radius: 24px 24px 0 0;
  padding: 28px 24px calc(22px + env(safe-area-inset-bottom)); text-align: center;
  -webkit-animation: up .28s ease-out; animation: up .28s ease-out;
}
@-webkit-keyframes up { from { -webkit-transform: translateY(40px); opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet .display { font-size: 34px; margin: 10px 0 20px; }
.sheet .body { margin-bottom: 20px; color: var(--ink-2); }
.input {
  display: block; width: 100%; margin-bottom: 14px; padding: 15px 18px; border-radius: 999px; text-align: center;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font: 16px var(--sans);
}
.input:focus { outline: none; border-color: var(--ink); }
.howto { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.howto .body { margin: 10px 0 16px; text-align: left; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 30; left: 50%; top: calc(64px + env(safe-area-inset-top));
  -webkit-transform: translateX(-50%); transform: translateX(-50%);
  background: rgba(250,248,245,.96); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: 88%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
