/* ============================================================================
   FOREVER FIREFLIES — SHARED APP-SCREEN MOCKUPS
   Faithful HTML/CSS recreations of the real app screens, used by BOTH
   landing/home.html (cycling hero) and landing/store-screenshots.html.
   Designed at a fixed 390×844 logical size; scale the whole .afx-screen with
   `transform: scale(var(--afx-s))` to render at any size, crisply.
   Colors/fonts resolved from constants/theme.ts (see docs/design/design-style.md).
   ============================================================================ */

.afx-screen {
  position: relative; width: 390px; height: 844px; overflow: hidden;
  background: #FAF8F5; color: #2C2420;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px; line-height: 1.5;
}
.afx-serif { font-family: 'Merriweather', Georgia, serif; }
.afx-screen * { box-sizing: border-box; }

/* scaler: a fixed box whose child screen is scaled to fill it */
.afx-mount { position: relative; overflow: hidden; }
.afx-mount > .afx-screen { position: absolute; top: 0; left: 0; transform-origin: top left; }

/* ---- status bar ---- */
.afx-status { position: relative; height: 46px; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; padding: 0 26px 0 28px;
  font-size: 15px; font-weight: 700; color: #2C2420; }
.afx-status .dots { display: flex; gap: 6px; align-items: center; }
.afx-status .dots svg { height: 11px; width: auto; display: block; }
.afx-screen.afx-favorites { background: linear-gradient(180deg, #F5E6C8 0%, #FAF8F5 36%); }

/* ---- bottom tab bar ---- */
.afx-tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; background: #FEFCF9;
  border-top: 1px solid #EDE8E3; box-shadow: 0 -1px 3px rgba(44,36,32,0.05); z-index: 5;
  display: flex; align-items: flex-start; justify-content: space-around; padding-top: 9px; }
.afx-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 58px; color: #B5AAA0; }
.afx-tab.active { color: #E8724A; }
.afx-tab svg { width: 24px; height: 24px; fill: currentColor; }
.afx-tab span { font-size: 10px; font-weight: 600; }
.afx-rec { width: 64px; height: 64px; border-radius: 9999px; background: #E8724A; margin-top: -24px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(232,114,74,0.3), 0 6px 16px rgba(232,114,74,0.25); }
.afx-rec svg { width: 28px; height: 28px; fill: #fff; }

/* ---- scroll container (Home etc.) ---- */
.afx-scrollwrap { position: absolute; top: 46px; left: 0; right: 0; bottom: 0; overflow: hidden; }
.afx-scroll { position: absolute; top: 0; left: 0; right: 0; will-change: transform; }

/* ---- top bar ---- */
.afx-topbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 8px; gap: 12px; }
.afx-topbar .ttl-greet { font-family: 'Merriweather', Georgia, serif; font-weight: 400; font-size: 15px; color: #8C7E74; }
.afx-topbar .ttl-sans { font-size: 16px; font-weight: 700; color: #2C2420; }
.afx-topbar .ttl-jar { font-family: 'Merriweather', serif; font-weight: 700; font-size: 17px; letter-spacing: .3px; color: #2C2420; }
.afx-topbar .icons { display: flex; gap: 10px; }
.afx-glass { width: 34px; height: 34px; border-radius: 9999px; background: rgba(255,255,255,0.55);
  border: 1px solid rgba(237,232,227,0.6); display: flex; align-items: center; justify-content: center; }
.afx-glass svg { width: 20px; height: 20px; stroke: #2C2420; fill: none; }
.afx-topbar .back svg { width: 22px; height: 22px; stroke: #2C2420; fill: none; }

/* ---- fixed (non-scrolling) header: sits below the status bar; scroll content
   passes under it. Matches the real app where TopBar is outside the scroll view. ---- */
.afx-fixedhdr { position: absolute; top: 46px; left: 0; right: 0; z-index: 5; height: 50px;
  padding-top: 0; padding-bottom: 0; background: #FAF8F5; }
.afx-scrollwrap.afx-hashdr { top: 96px; }

/* ---- section label ---- */
.afx-sec { font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #B5AAA0; padding: 0 20px; margin: 24px 0 12px; }

/* ---- branding banner (Home hero card) ---- */
.afx-bbanner { margin: 4px 16px 0; border-radius: 16px; min-height: 130px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #F5EDE3 0%, #EDE0D2 50%, #F0E6DC 100%);
  box-shadow: 0 4px 12px rgba(44,36,32,0.08); }
.afx-bbanner .scene { position: absolute; inset: 0; opacity: .5; }
.afx-bbanner .txt { position: relative; padding: 24px 24px 20px; }
.afx-bbanner .tag { font-family: 'Merriweather', serif; font-size: 16px; color: #2C2420; }
.afx-bbanner .tag em { font-style: italic; color: #E8724A; }
.afx-bbanner .sub { font-size: 12px; color: #8C7E74; margin-top: 4px; }
.afx-pill-count { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; background: #F3EDE8;
  border-radius: 9999px; padding: 7px 15px; }
.afx-pill-count .gd { width: 6px; height: 6px; border-radius: 9999px; background: #F2C94C; box-shadow: 0 0 8px 2px rgba(242,201,76,0.5); }
.afx-pill-count span { font-size: 12px; font-weight: 600; color: #8C7E74; }
.afx-ff { position: absolute; border-radius: 9999px; background: #F2C94C; box-shadow: 0 0 10px 3px rgba(242,201,76,0.45); }

/* ---- On This Day polaroid ---- */
.afx-polaroid { margin: 0 16px; background: #FEFCF9; border-radius: 8px; padding: 12px 12px 22px; box-shadow: 0 4px 12px rgba(44,36,32,0.10); transform: rotate(-1.5deg); }
.afx-polaroid .panel { background: linear-gradient(135deg, #fdf8f0, #f5ede3); border-radius: 8px; padding: 16px; }
.afx-polaroid .ago { font-family: 'Merriweather', serif; font-weight: 700; font-size: 16px; color: #2C2420; }
.afx-polaroid .who { display: flex; align-items: center; gap: 6px; margin: 6px 0 8px; font-size: 10px; color: #8C7E74; }
.afx-polaroid .who .d { width: 6px; height: 6px; border-radius: 9999px; }
.afx-polaroid .body { font-family: 'Merriweather', serif; font-style: italic; font-size: 14px; line-height: 1.55; color: #2C2420; }
.afx-polaroid .date { font-family: 'Merriweather', serif; font-size: 11px; color: #B5AAA0; margin-top: 14px; }

/* ---- family avatars ---- */
.afx-family { display: flex; justify-content: center; gap: 22px; padding: 0 20px; }
.afx-avatar { text-align: center; }
.afx-avatar .circ { width: 66px; height: 66px; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  font-family: 'Merriweather', serif; font-weight: 700; font-size: 22px; box-shadow: 0 1px 3px rgba(44,36,32,0.06); }
.afx-avatar .nm { font-size: 12px; font-weight: 600; color: #2C2420; margin-top: 8px; }
.afx-avatar .age { font-size: 11px; color: #B5AAA0; }

/* ---- today's prompt ---- */
.afx-prompt { margin: 0 16px; background: #FEFCF9; border-radius: 16px; padding: 16px; box-shadow: 0 2px 12px rgba(44,36,32,0.06); }
.afx-prompt .row { display: flex; align-items: center; gap: 16px; }
.afx-prompt .q { flex: 1; font-family: 'Merriweather', serif; font-size: 18px; line-height: 1.5; color: #2C2420; }
.afx-mic { width: 44px; height: 44px; border-radius: 9999px; background: #E8724A; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(232,114,74,0.3); flex: 0 0 auto; }
.afx-mic svg { width: 20px; height: 20px; fill: #FEFCF9; }
.afx-prompt .sep { height: 1px; background: #EDE8E3; margin: 12px 0 0; }
.afx-prompt .foot { display: flex; justify-content: space-between; padding-top: 12px; font-size: 12px; font-weight: 500; color: #B5AAA0; }
.afx-prompt .foot .a { color: #E8724A; }

/* ---- week streak ---- */
.afx-week { margin: 0 16px; background: #FEFCF9; border-radius: 12px; padding: 16px; box-shadow: 0 1px 3px rgba(44,36,32,0.06); display: flex; justify-content: space-between; }
.afx-week .d { text-align: center; }
.afx-week .dot { width: 12px; height: 12px; border-radius: 9999px; background: #EDE8E3; margin: 0 auto; }
.afx-week .dot.lit { background: #F2C94C; box-shadow: 0 0 8px 2px rgba(242,201,76,0.5); }
.afx-week .dot.today { background: transparent; border: 2px solid #E8724A; }
.afx-week .lbl { font-size: 10px; font-weight: 500; text-transform: uppercase; color: #B5AAA0; margin-top: 6px; }

/* ---- coming up (upcoming birthday card) ---- */
.afx-coming { margin: 0 16px; background: #FEFCF9; border: 1px solid #EDE8E3; border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(44,36,32,0.06); display: flex; align-items: center; gap: 14px; }
.afx-coming .ring { width: 44px; height: 44px; position: relative; flex: 0 0 auto; }
.afx-coming .ring .lbl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #2C2420; }
.afx-coming .who { font-family: 'Merriweather', Georgia, serif; font-size: 14px; font-weight: 600; color: #2C2420; }
.afx-coming .when { font-size: 11px; color: #B5AAA0; margin-top: 2px; }

/* ---- child filter tabs ---- */
.afx-ctabs { display: flex; gap: 8px; padding: 4px 20px 0; overflow: hidden; }
.afx-ctab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 20px; border: 2px solid transparent;
  background: #FEFCF9; font-size: 13px; font-weight: 700; color: #B5AAA0; box-shadow: 0 1px 3px rgba(44,36,32,0.04); white-space: nowrap; }
.afx-ctab .d { width: 8px; height: 8px; border-radius: 9999px; }

/* ---- entry card (journal/home variant) ---- */
.afx-card { position: relative; margin: 0 20px 10px; background: #FEFCF9; border: 1px solid #EDE8E3; border-radius: 14px;
  padding: 14px 16px; box-shadow: 0 1px 3px rgba(44,36,32,0.06); overflow: hidden; }
.afx-card .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.afx-card .hd { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.afx-card .hd .d { width: 7px; height: 7px; border-radius: 9999px; }
.afx-card .hd .nm { font-family: 'Merriweather', serif; font-weight: 700; font-size: 11px; }
.afx-card .hd .dt { font-size: 11px; font-weight: 600; color: #B5AAA0; }
.afx-card .hd .heart { margin-left: auto; width: 14px; height: 14px; fill: #E8724A; }
.afx-card .ttl { font-size: 14px; font-weight: 700; color: #2C2420; margin-bottom: 4px; }
.afx-card .prev { font-family: 'Merriweather', serif; font-size: 14px; line-height: 1.6; color: #2C2420;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.afx-card .tags { margin-top: 10px; }
.afx-tag { display: inline-block; background: #F3EDE8; color: #8C7E74; font-size: 11px; padding: 2px 8px; border-radius: 8px; margin: 0 5px 4px 0; }
/* journal card photo thumbnails — small 46px rounded squares in a row (matches EntryCard) */
.afx-thumbs { display: flex; gap: 6px; margin-top: 10px; }
.afx-thumb { width: 46px; height: 46px; border-radius: 8px; overflow: hidden; position: relative; flex: 0 0 auto; }

/* ---- core-memory (Firefly Jar) card ---- */
.afx-jarcard { position: relative; margin: 0 20px 12px; background: #FEFCF9; border: 1px solid rgba(180,160,140,0.35);
  border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 3px 12px rgba(242,201,76,0.18); overflow: hidden; }
.afx-jarcard .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.afx-jarcard .hd { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.afx-jarcard .hd .d { width: 7px; height: 7px; border-radius: 9999px; }
.afx-jarcard .hd .nm { font-family: 'Merriweather', serif; font-weight: 700; font-size: 11px; }
.afx-jarcard .hd .dt { font-size: 11px; font-weight: 600; color: #B5AAA0; }
.afx-jarcard .hd .heart { margin-left: auto; width: 14px; height: 14px; fill: #E8724A; }
.afx-jarcard .prev { font-family: 'Merriweather', serif; font-size: 14px; line-height: 1.6; color: #2C2420;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.afx-jarcard .foot { display: flex; align-items: center; margin-top: 12px; }
.afx-playsm { width: 28px; height: 28px; border-radius: 9999px; background: rgba(232,114,74,0.25); display: flex; align-items: center; justify-content: center; margin-left: auto; }
.afx-playsm svg { width: 12px; height: 12px; fill: #FEFCF9; margin-left: 1px; }

/* ---- moments grid ---- */
.afx-monthhd { font-family: 'Merriweather', serif; font-weight: 700; font-size: 18px; color: #2C2420; padding: 16px 16px 8px; }
.afx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 16px; }
.afx-sq { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; padding: 8px; }
.afx-sq .t { font-family: 'Merriweather', serif; font-size: 12px; line-height: 1.33; color: #2C2420;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.afx-sq .ic { position: absolute; right: 6px; bottom: 6px; }
.afx-sq .ic svg { width: 12px; height: 12px; stroke: #B5AAA0; fill: none; }

/* ---- recording ---- */
.afx-rec-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; }
.afx-rec-glow { position: absolute; top: 0; left: 0; right: 0; height: 100%; z-index: 0;
  background: radial-gradient(ellipse 80% 55% at 50% 38%, rgba(244,226,214,0.65) 0%, rgba(250,248,245,0) 70%); }
.afx-rec-close { position: absolute; top: 56px; left: 22px; z-index: 2; }
.afx-rec-close svg { width: 24px; height: 24px; stroke: #2C2420; fill: none; }
.afx-rec-center { position: relative; z-index: 1; margin-top: 240px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.afx-timer { font-size: 30px; font-weight: 300; letter-spacing: 2px; color: #2C2420; }
.afx-rec-hint { font-size: 11px; color: #B5AAA0; }
.afx-rec-cap { font-size: 14px; color: #B5AAA0; margin-bottom: 10px; }
.afx-breathe { position: relative; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.afx-breathe .circle { position: absolute; width: 120px; height: 120px; border-radius: 9999px; background: rgba(232,114,74,0.12); }
.afx-breathe .ring { position: absolute; width: 120px; height: 120px; border-radius: 9999px; border: 2px solid #E8724A; opacity: .35; }
.afx-rec-ctrls { display: flex; align-items: center; gap: 20px; margin-top: 26px; }
.afx-rec-pause { width: 48px; height: 48px; border-radius: 9999px; background: #FEFCF9; border: 1px solid #EDE8E3; display: flex; align-items: center; justify-content: center; }
.afx-rec-pause svg { width: 22px; height: 22px; fill: #2C2420; }
.afx-rec-stop { width: 80px; height: 80px; border-radius: 16px; background: #E8724A; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(232,114,74,0.4); }
.afx-rec-stop .sq { width: 24px; height: 24px; border-radius: 6px; background: #FEFCF9; }
.afx-rec-spacer { width: 48px; }

/* ---- entry detail ---- */
.afx-detail { position: absolute; top: 46px; left: 0; right: 0; bottom: 0; padding: 0 20px; overflow: hidden; }
.afx-detail .topbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 16px; }
.afx-detail .topbar .actions { display: flex; gap: 12px; }
.afx-detail .topbar svg { width: 22px; height: 22px; stroke: #2C2420; fill: none; }
.afx-detail .topbar .heart { fill: #E8724A; stroke: none; }
.afx-eyebrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.afx-eyebrow .for { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.afx-eyebrow .for .lab { color: #B5AAA0; font-weight: 600; }
.afx-eyebrow .for .d { width: 6px; height: 6px; border-radius: 9999px; }
.afx-eyebrow .date { font-style: italic; font-size: 13px; color: #B5AAA0; }
.afx-detail .htitle { font-family: 'Merriweather', serif; font-weight: 700; font-size: 26px; line-height: 1.27; letter-spacing: -0.3px; color: #2C2420; }
.afx-detail .cap { font-size: 12px; color: #B5AAA0; margin-top: 8px; }
.afx-detail .transcard { border: 1px solid #EDE8E3; border-radius: 12px; background: #FEFCF9; padding: 14px; margin-top: 18px; }
.afx-detail .transcard p { font-family: 'Merriweather', serif; font-size: 15px; line-height: 1.73; color: #2C2420; }
.afx-detail .voicelab { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #B5AAA0; margin: 20px 0 12px; }
.afx-audio { display: flex; align-items: center; gap: 12px; }
.afx-audio .play { width: 36px; height: 36px; border-radius: 9999px; background: rgba(232,114,74,0.08); display: flex; align-items: center; justify-content: center; }
.afx-audio .play svg { width: 16px; height: 16px; fill: #E8724A; margin-left: 2px; }
.afx-wave { display: flex; align-items: center; gap: 3px; flex: 1; height: 28px; }
.afx-wave i { width: 3px; border-radius: 9999px; }
.afx-audio .dur { font-size: 11px; color: #B5AAA0; }

/* ---- notification lock screen ---- */
.afx-lock { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 120% 70% at 50% 100%, #4a3b32 0%, #3D322C 55%, #2b231e 100%);
  display: flex; flex-direction: column; align-items: center; padding: 64px 26px 0; }
.afx-lock .date { font-size: 16px; color: rgba(255,255,255,0.85); letter-spacing: .5px; }
.afx-lock .time { font-family: 'Merriweather', serif; font-weight: 400; font-size: 84px; color: #fff; line-height: 1; margin-top: 6px; }
.afx-notif { margin-top: 64px; width: 100%; background: rgba(255,250,245,0.94); border-radius: 22px; padding: 18px 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.35); }
.afx-notif .top { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.afx-notif .ic { width: 32px; height: 32px; border-radius: 9px; background: #E8724A; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 14px 2px rgba(242,201,76,0.4); }
.afx-notif .ic .gd { width: 13px; height: 13px; border-radius: 9999px; background: #F2C94C; box-shadow: 0 0 8px 2px #F2C94C; }
.afx-notif .nm { font-size: 13px; font-weight: 700; flex: 1; color: #2C2420; }
.afx-notif .tm { font-size: 12px; color: #B5AAA0; }
.afx-notif .msg { font-size: 16px; font-weight: 500; color: #2C2420; }
.afx-notif .age { font-size: 14px; color: #8C7E74; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .afx-breathe .circle, .afx-breathe .ring, .afx-ff { animation: none !important; }
}
