/* feed.css — "One Thumb" (docs/superpowers/specs/2026-10-01-one-thumb-feed-design.md).
 * Palette from the design; Arapey is the site's only typeface (§2.6), with the phone's own UI
 * face for small text, as on the privacy page. Gold FILLS carry dark text; gold TEXT uses the
 * site's gold ink (4.98:1 on cream). Contrast pairs are checked by test-site-static. */
:root {
  --bg:#F2ECE1; --surface:#FFFFFF; --raise:#FAF8F0;
  --ink:#241409; --ink2:#6E5745; --line:#E0D3BE;
  --gold-ink:#8A6520; --goldhot:#C8A750; --on-gold:#2A1710;
  --champagne:#F7E7CE; --cocoa:#592C1E; --deep:#3D1F15; --night:#140E09;
  /* The dark pill under small text that sits on a photo (the wordmark, the "Studio photo" badge).
   * Its alpha is what keeps gold text at 4.5:1 even over the brightest photo; test-site-static
   * composites it over white to check. */
  --pill:rgba(8,5,3,.82);
  --serif:'Arapey', 'Noto Serif', Georgia, 'Times New Roman', serif;
  --sans:system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme:light;
}
* { box-sizing:border-box; }
html, body { height:100%; margin:0; }
body { background:var(--night); color:var(--ink); font-family:var(--sans); font-size:15px; line-height:1.55;
  -webkit-font-smoothing:antialiased; overflow:hidden; }
a { color:inherit; }
.vh { position:absolute; width:1px; height:1px; opacity:0; overflow:hidden; clip:rect(0 0 0 0); }
button, input { font:inherit; }
:focus-visible { outline:2px solid var(--goldhot); outline-offset:2px; }
/* Gold is a focus ring over the dark photos only; on the white sheets and the cream end card it is
 * 2.3:1, under the 3:1 a focus ring needs, so there it is the deep brown (13:1). */
.sheet :focus-visible, .post.end :focus-visible { outline-color:var(--deep); }

/* ---------------- layout: a full-height column; a brand panel beside it on wide screens */
.stage { height:100%; display:flex; justify-content:center; align-items:stretch; gap:56px; }
.app { position:relative; height:100%; height:100dvh; width:100%; max-width:min(100vw, 520px); flex:none; overflow:hidden; background:var(--night); }
.brand, .lapnav { display:none; }
@media (min-width:1100px) {
  .app { width:min(520px, calc((100dvh - 48px) * 9 / 16)); height:calc(100dvh - 48px); margin:24px 0; border-radius:28px;
    box-shadow:0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(250,248,240,.08); }
  .brand { display:flex; flex-direction:column; justify-content:center; gap:18px; width:360px; flex:none; color:#E6D8C2; }
  .brand h1 { margin:0; font-family:var(--serif); font-weight:400; font-size:46px; line-height:1.02; color:#FAF8F0; text-wrap:balance; }
  .brand h1 em { color:var(--goldhot); }
  .brand p { margin:0; font-size:15px; line-height:1.6; }
  .brand b { color:#FAF8F0; font-weight:600; }
  .brand ul { margin:0; padding-left:18px; font-size:14px; }
  .brand .links { font-size:14px; }
  .brand .links a { color:var(--goldhot); text-underline-offset:3px; }
  .feed > h1.vh { display:none; }   /* the brand panel's h1 is the page heading here */
  /* Previous / next beside the column, with the count between them. */
  .lapnav { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; width:56px; flex:none; margin-left:-40px; }
  .lapnav button { background:rgba(250,248,240,.08); box-shadow:0 0 0 1px rgba(250,248,240,.18); color:#FAF8F0; }
  .lapnav button:hover { background:rgba(250,248,240,.16); }
  .lapnav button[hidden] { display:inline-flex !important; visibility:hidden; }   /* keeps its place: the count does not jump */
  .lapnav .count { font-size:12px; color:#E6D8C2; font-variant-numeric:tabular-nums; white-space:nowrap; }
}

/* ---------------- the feed */
.feed { height:100%; overflow-y:auto; overflow-x:hidden; scroll-snap-type:y mandatory; overscroll-behavior:contain;
  scrollbar-width:none; background:var(--night); }
.feed::-webkit-scrollbar { display:none; }
.post { position:relative; height:100%; scroll-snap-align:start; scroll-snap-stop:always; overflow:hidden;
  display:flex; flex-direction:column; color:#fff; background:#0A0703; }
.post > img.ph { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
/* The customer's photo or preview fills the card from the top, so her face is never cropped away. */
.post.mine > img.ph { object-position:50% 18%; }
.post .scrim { position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(180deg, rgba(8,5,3,.62) 0%, rgba(8,5,3,0) 22%, rgba(8,5,3,0) 40%, rgba(8,5,3,.9) 100%); }
.phd { position:relative; z-index:3; display:flex; justify-content:space-between; align-items:flex-start; gap:10px;
  padding:calc(env(safe-area-inset-top, 0px) + 18px) 14px 0; }
.wordmark { font-family:var(--sans); font-size:10.5px; letter-spacing:.18em; text-transform:uppercase; color:var(--goldhot);
  line-height:1.5; text-decoration:none; font-weight:600; }
.wordmark.dark { color:var(--goldhot); font-size:13px; letter-spacing:.3em; }
.phd a.wordmark { display:inline-flex; align-items:center; min-height:44px; padding:4px 12px; border-radius:14px;
  background:var(--pill); }   /* a 44px tap target, like every control; gold on a photo alone was 1.4:1 */
.phd-r { display:flex; gap:8px; }
.ico { width:44px; height:44px; border-radius:99px; border:0; background:rgba(8,5,3,.5); color:#fff; cursor:pointer;   /* 3:1 over a white photo */
  display:inline-flex; align-items:center; justify-content:center; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.heart svg { fill:none; }
.heart[aria-pressed="true"] { background:var(--goldhot); color:var(--on-gold); }
.heart[aria-pressed="true"] svg { fill:currentColor; }
.kind { display:inline-block; font-size:10px; letter-spacing:.06em; background:var(--pill); padding:3px 9px; border-radius:99px; white-space:nowrap; }
/* The badge sits in the title block, under the family rail's row rather than in it. */
.tag { margin:0 0 6px; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; font-size:10px; line-height:1.4; }
.asis { font-size:11px; font-style:italic; color:rgba(255,255,255,.88); text-shadow:0 1px 2px rgba(0,0,0,.6); }
/* Card 1 only, until her first new look: the screen moves. Horizontal, centred, above the title. */
/* On the dark pill: a shadow alone left it at 2.8:1 over a pale photo. */
.swipehint { display:flex; width:max-content; margin:0 auto 14px; padding:6px 12px; border-radius:99px; background:var(--pill);
  align-items:center; justify-content:center; gap:4px; font-size:11.5px; letter-spacing:.08em; color:rgba(255,255,255,.88); }
.swipehint svg { animation:nudge 1.4s ease-in-out 4; }
@keyframes nudge { 0%, 100% { transform:none; } 50% { transform:translateY(-4px); } }

/* ---------------- chapters: the family rail, over every card, and the progress bar */
[hidden] { display:none !important; }
.fams { position:absolute; z-index:5; top:calc(env(safe-area-inset-top, 0px) + 68px); left:50%; transform:translateX(-50%);
  display:flex; padding:0 4px; border-radius:99px; background:var(--pill); white-space:nowrap; max-width:calc(100% - 24px); }
.fams button { position:relative; min-height:44px; padding:0 9px; border:0; background:none; cursor:pointer; font-family:var(--sans);
  font-size:12px; color:rgba(255,255,255,.7); }
.fams button[aria-current="true"] { color:#fff; font-weight:600; }
.fams button[aria-current="true"]::after { content:''; position:absolute; left:9px; right:9px; bottom:9px; height:2px; border-radius:2px; background:var(--goldhot); }
.prog { position:absolute; z-index:5; right:4px; top:30%; height:40%; width:2px; display:flex; flex-direction:column; gap:3px; pointer-events:none; }
.prog i { display:block; position:relative; min-height:2px; border-radius:2px; background:rgba(255,255,255,.28); overflow:hidden; }
.prog b { position:absolute; left:0; right:0; top:0; height:0; background:var(--goldhot); transition:height .25s ease; }

/* ---------------- a bundle card: the whole photo, tag and ends included, over a blur of itself */
.post--bundle::before { content:''; position:absolute; inset:-48px; background:var(--ph) center / cover no-repeat;
  filter:blur(24px) brightness(.55); }
/* The photos are 3:4: with width auto the box is the photo's own shape, so the corners round the
 * photo itself; object-fit:contain covers a narrow column, where max-width wins. */
.post--bundle > img.ph { top:calc(env(safe-area-inset-top, 0px) + 120px); bottom:auto; left:50%; right:auto; transform:translateX(-50%);
  width:auto; max-width:calc(100% - 24px); height:max(250px, calc(100% - 366px)); object-fit:contain; border-radius:14px;
  box-shadow:0 18px 40px rgba(0,0,0,.35); }
.post--bundle .scrim { background:linear-gradient(180deg, rgba(8,5,3,.35) 0%, rgba(8,5,3,0) 18%, rgba(8,5,3,0) 50%, rgba(8,5,3,.85) 100%); }
.post--bundle.mine > img.ph { top:0; left:0; transform:none; width:100%; max-width:none; height:100%; object-fit:cover; border-radius:0; box-shadow:none; }   /* her preview fills the card */
.post.mine .worn { display:none; }
/* The family worn, in the one shade it was photographed in, named so no colour is misattributed. */
.worn { position:absolute; right:12px; bottom:calc(100% + 10px); display:flex; flex-direction:column; align-items:center; gap:4px;
  width:96px; padding:0; border:0; background:none; color:#fff; cursor:pointer; text-align:center; }
.worn img { width:64px; height:64px; border-radius:99px; object-fit:cover; object-position:50% 20%; border:2px solid rgba(255,255,255,.9);
  box-shadow:0 4px 14px rgba(0,0,0,.45); }
.worn span { font-size:10.5px; line-height:1.3; text-shadow:0 1px 3px rgba(0,0,0,.8); }

/* ---------------- a video card (feed.js REELS): the film fills the card like a worn photo */
.post > video.ph { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; background:#0A0703; }
/* The ads burn their own subtitles into the bottom fifth of the frame, right where the caption and
 * button sit: a deeper band there keeps the two texts from reading as one. */
/* The ads carry their own burned-in subtitles near the bottom: the fade under the caption is solid
   enough that they never show through it. */
.post.reel .scrim { background:linear-gradient(180deg, rgba(8,5,3,.5) 0%, rgba(8,5,3,0) 16%, rgba(8,5,3,0) 52%, rgba(8,5,3,.94) 70%, rgba(8,5,3,.99) 100%); }
.phd .badge { display:inline-flex; align-items:center; min-height:32px; padding:4px 12px; border-radius:14px; background:var(--pill); }
.snd[aria-pressed="false"] .on, .snd[aria-pressed="true"] .off { display:none; }
/* Over the picture when the video waits for a tap (reduced motion, Data Saver, autoplay refused). */
.reelbig { position:absolute; z-index:2; left:50%; top:50%; width:76px; height:76px; margin:-38px 0 0 -38px; border-radius:99px;
  display:flex; align-items:center; justify-content:center; padding-left:4px; background:var(--pill); color:#fff; cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,.35); }

/* A one-time peek on a first visit (feed.js peek): card 1 and the top of card 2 lift and settle. */
.post.peek { animation:peek .9s ease-in-out 1; }
@keyframes peek { 0%, 100% { transform:none; } 40%, 60% { transform:translateY(-72px); } }

.toast { position:absolute; z-index:30; left:50%; top:calc(env(safe-area-inset-top, 0px) + 122px); transform:translateX(-50%);
  margin:0; padding:10px 16px; border-radius:99px; background:var(--night); color:var(--champagne); font-size:13px; white-space:nowrap;
  box-shadow:0 8px 24px rgba(0,0,0,.4); opacity:0; pointer-events:none; transition:opacity .2s ease; }
.toast.on { opacity:1; }
.feed:focus { outline:none; }   /* focused for the arrow keys, not as a control */
.pft { position:relative; z-index:3; margin-top:auto; padding:0 16px calc(env(safe-area-inset-bottom, 0px) + 20px); }
.pft h2 { font-family:var(--serif); font-weight:400; font-size:26px; line-height:1.12; margin:0 0 4px; text-wrap:balance; }
.pft .line { font-size:13px; color:rgba(255,255,255,.88); margin:0 0 12px; line-height:1.45; }
.acts { display:flex; flex-direction:column; }
.cta { display:flex; align-items:center; justify-content:center; width:100%; min-height:50px; padding:12px 14px;
  border-radius:12px; border:0; background:var(--goldhot); color:var(--on-gold); font-size:15px; font-weight:600;
  cursor:pointer; text-decoration:none; text-align:center; }
.cta.wa { background:#fff; color:#111; }
.cta[disabled] { opacity:.6; cursor:default; }
.undercta { display:block; width:100%; margin-top:8px; background:none; border:0; color:rgba(255,255,255,.88); font-size:13px;
  cursor:pointer; text-decoration:underline; text-underline-offset:3px; padding:8px 4px; min-height:44px; }
.underrow { display:flex; gap:8px; margin-top:8px; }
.underrow .undercta { flex:1 1 0; width:auto; margin-top:0; display:flex; align-items:center; justify-content:center; }

.post.end { background:var(--bg); color:var(--ink); justify-content:center; }
.endin { padding:32px 22px calc(env(safe-area-inset-bottom, 0px) + 28px); display:flex; flex-direction:column; gap:12px; }
.endin h2 { font-family:var(--serif); font-weight:400; font-size:34px; line-height:1.05; margin:0; color:var(--deep); }
.endin p { margin:0; color:var(--ink2); }
.endin .cta.wa { background:var(--surface); color:var(--ink); border:1px solid var(--line); }
.endin .links a { display:inline-block; padding:12px 0; color:var(--gold-ink); text-underline-offset:3px; }   /* 44px thumb targets */
.post.end .wordmark { color:var(--gold-ink); }   /* gold ink on cream, not the gold fill (2:1) */
.small { font-size:12.5px; }

/* ---------------- sheets */
.ov { position:absolute; inset:0; z-index:40; display:none; flex-direction:column; justify-content:flex-end; }
.ov[data-on="1"] { display:flex; }
.ov .dim { position:absolute; inset:0; background:rgba(8,5,3,.55); }
/* The result sheet is compact and barely dims, so the preview above it stays the point. */
.ov[data-kind="result"] .dim, .ov[data-kind="making"] .dim { background:rgba(8,5,3,.12); }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.row2 .btn { font-size:13.5px; }
.sheet { position:relative; background:var(--surface); color:var(--ink); border-radius:20px 20px 0 0; max-height:86%; overflow-y:auto;
  padding:14px 18px calc(env(safe-area-inset-bottom, 0px) + 20px); overscroll-behavior:contain; }
.grab { width:36px; height:4px; border-radius:99px; background:var(--line); margin:0 auto 14px; }
.sheet h3 { font-family:var(--serif); font-weight:400; font-size:24px; line-height:1.15; margin:0 0 10px; color:var(--deep); }
.sheet p { font-size:13.5px; color:var(--ink2); margin:0 0 10px; line-height:1.55; }
.sheet p.strong { color:var(--ink); font-size:14.5px; }
.btn { display:flex; align-items:center; justify-content:center; width:100%; min-height:48px; padding:12px; border-radius:11px;
  font-size:14.5px; cursor:pointer; border:1px solid transparent; font-weight:600; margin-top:10px; text-align:center; text-decoration:none; }
.btn.gold { background:var(--goldhot); color:var(--on-gold); }
.btn.ghost { background:transparent; border-color:var(--line); color:var(--ink); font-weight:500; }
.link { display:inline-block; background:none; border:0; color:var(--gold-ink); font-size:13px; cursor:pointer;
  text-decoration:underline; text-underline-offset:3px; padding:10px 0; }
.lbl { font-size:11px !important; letter-spacing:.1em; text-transform:uppercase; color:var(--gold-ink) !important; font-weight:600; margin:16px 0 6px !important; }
.chips { display:flex; flex-wrap:wrap; gap:7px; }
.chip { padding:8px 12px; min-height:48px; border-radius:10px; border:1px solid var(--line); background:var(--raise); font-size:14px;
  color:var(--ink); cursor:pointer; line-height:1.2; }
.chip[aria-pressed="true"] { border-color:var(--goldhot); background:var(--champagne); font-weight:600; }
.chip small { display:block; font-size:11.5px; color:var(--ink2); font-weight:400; }
.swatchrow { display:flex; gap:10px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.swatchrow::-webkit-scrollbar { display:none; }
.sw { flex:0 0 auto; background:none; border:0; cursor:pointer; text-align:center; color:var(--ink); padding:0; }
.sw figure { margin:0 0 4px; width:52px; height:52px; border-radius:99px; overflow:hidden; border:2px solid transparent; }
.sw[aria-pressed="true"] figure { border-color:var(--goldhot); }
.sw img { width:100%; height:100%; object-fit:cover; display:block; }
.sw span { font-size:11px; display:block; width:62px; line-height:1.25; color:var(--ink2); }
.stepper { display:flex; align-items:center; gap:12px; }
.stepper button { width:48px; height:48px; border-radius:10px; border:1px solid var(--line); background:var(--raise); font-size:20px; cursor:pointer; color:var(--ink); }
.stepper output { font-size:15px; font-variant-numeric:tabular-nums; min-width:120px; }
.total { display:flex; justify-content:space-between; align-items:baseline; margin-top:16px; padding-top:12px; border-top:1px solid var(--line);
  font-size:13.5px; color:var(--ink2); }
.total b { font-family:var(--serif); font-size:28px; font-weight:400; color:var(--deep); font-variant-numeric:tabular-nums; }
.fl { display:block; font-size:12.5px; color:var(--ink2); margin:12px 0 0; }
.field { width:100%; padding:12px; border-radius:10px; border:1px solid var(--line); background:var(--raise); font-size:16px; color:var(--ink); margin-top:5px; }
.err { color:var(--cocoa) !important; font-weight:600; min-height:1px; margin-top:10px !important; }
.bar { height:4px; border-radius:99px; background:var(--line); overflow:hidden; margin:12px 0 10px; }
.bar { margin-bottom:6px; }
.bar i { display:block; height:100%; width:0; background:var(--goldhot); border-radius:99px; transition:width .5s linear; }
.count { margin:0 0 10px; font-size:13px; color:var(--ink2); font-variant-numeric:tabular-nums; }
.stepsrow { list-style:none; margin:0 0 10px; padding:0; display:flex; flex-wrap:wrap; gap:4px 14px; font-size:12.5px; color:var(--ink2); }
.stepsrow li.done { color:var(--ink2); text-decoration:line-through; }
.stepsrow li.now { color:var(--ink); font-weight:600; }
.srl { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px; }
.sr { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:8px 12px; border-radius:10px; border:1px solid var(--line);
  background:var(--raise); color:var(--ink); font-size:14px; cursor:pointer; text-decoration:none; }
.sr small { color:var(--ink2); font-size:11.5px; }
.sri { flex:none; width:22px; height:22px; border-radius:99px; object-fit:cover; background:var(--line); display:block; }
.sheet h3[tabindex="-1"]:focus { outline:none; }
.endsaved .lbl { color:var(--deep) !important; }
.endsaved .sw span { width:84px; }

@media (prefers-reduced-motion: reduce) {
  .bar i { transition:none; }
  .feed { scroll-behavior:auto; }
  .swipehint svg, .post.peek { animation:none; }
  .prog b, .toast { transition:none; }
}
