/* LockedLink — a member's page, and the small pages around it (18+, not found, opening…).
   Colours come from the page's own :root (its theme, or the member's colours on LockedFans+).
   House rules: no pills (no capsule shapes), buttons are 10px-corner rectangles, icons are SVG. */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }

.page {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}
.page.center { justify-content: center; text-align: center; gap: 14px; }
.page.center .btn { width: 100%; max-width: 360px; }
.mark { height: 16px; width: auto; margin-bottom: 10px; }

.top { width: 100%; display: flex; justify-content: flex-end; }
.share {
  width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line);
  background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.avatar {
  width: 104px; height: 104px; border-radius: 52px; object-fit: cover; margin-top: -4px;
  background: var(--surface); border: 1px solid var(--line);
}
.avatar.ph {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', Georgia, serif; font-size: 46px; font-weight: 500;
}
.name {
  margin: 16px 0 0; font-family: 'Playfair Display', Georgia, serif; font-size: 30px; font-weight: 600;
  line-height: 1.15; letter-spacing: 0.01em; text-align: center; display: flex; align-items: center;
  justify-content: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere;
}
.badge { flex: none; }
.handle { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.bio {
  margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); text-align: center;
  max-width: 320px; overflow-wrap: anywhere; white-space: pre-line;
}
.bio-hidden {
  margin-top: 10px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.adult { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.social {
  width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}

.links { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.link {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 16px 0 10px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; font-size: 16px; font-weight: 600; transition: transform .08s ease;
}
.link:active { transform: scale(0.985); }
.link.plain { padding-left: 20px; }
.link .t { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; padding: 10px 0; }
.link .go { color: var(--muted); display: flex; }
.thumb {
  width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex: none; position: relative; background: #111;
}
.thumb img { width: 44px; height: 44px; object-fit: cover; }
.thumb .lock, .cover .lock {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}
/* Large: a photo card with the title written on the photo */
.link.large { position: relative; display: block; padding: 0; overflow: hidden; border: 0; }
.cover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; background: #111; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 48%, rgba(0,0,0,0.78) 100%);
}
.cover .lock { z-index: 1; }
.link.large .over {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0 18px 14px; text-align: center; color: #fff;
  text-shadow: 0 1px 10px rgba(0,0,0,0.55);
}
.link.large .over .t { display: block; padding: 0; font-size: 17px; font-weight: 700; }
.link.large .corner {
  position: absolute; top: 12px; left: 12px; display: flex; align-items: center; color: #fff;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.6));
}
.link.large .corner b { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
/* The 18+ step inside a Large photo card (2026-11-25, after link.me): js/page.js wraps the card and lays this over
   it on the tap. The photo blurs underneath (a look only: the sharp file, if any, is already the one on the card;
   a photo its owner blurred until 18+ is still the server's blurred copy here). Tapping beside the button closes it. */
.gate-wrap { position: relative; }
.link.large.gating .cover img { filter: blur(18px); transform: scale(1.12); }
.link.large.gating .over, .link.large.gating .corner, .link.large.gating .lock { visibility: hidden; }
.gate-in {
  position: absolute; inset: 0; z-index: 3; border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 18px; text-align: center; color: #fff; background: rgba(0,0,0,0.42); cursor: default;
  animation: gi-in .16s ease-out;
}
.gate-in .gi-icon { display: flex; margin-bottom: 2px; }
.gate-in b { font-size: 16px; font-weight: 700; line-height: 1.25; }
.gate-in .gi-p { font-size: 13px; line-height: 1.4; color: rgba(255,255,255,0.86); max-width: 270px; }
.gate-in .gi-yes {
  margin-top: 8px; width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 10px;
  background: #fff; color: #0B0A09; font-size: 15px; font-weight: 700; cursor: pointer;
}
.gate-in .gi-yes:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }
/* the Join card with a photo: the same gate, inside its photo; the button below stays put */
.cphoto.gating .pic { filter: blur(18px); transform: scale(1.12); }
.cphoto.gating .lf, .cphoto.gating .days { visibility: hidden; }
.cphoto .gate-in { border-radius: 0; }
@keyframes gi-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gate-in { animation: none; } }

/* The top of a page with a photo (Daniel 2026-11-23): the photo in a circle, in the middle of a cover made from
   the same photo, blurred and darkened on the server (img.js s=backdrop), fading into the page. On scroll
   (js/page.js, as on link.me) the cover stays pinned behind the page and darkens away, the circle shrinks as it
   rises, and the slim bar takes over at the top. z-index -1 keeps the pinned cover behind everything after it. */
.has-hero { padding-top: 0; position: relative; z-index: 0; }   /* its own stacking context: the cover's -1 sits above the body's background */
.hero { position: relative; width: calc(100% + 40px); margin: 0 -20px; }
.hero-photo { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--surface); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.hero-photo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0) 30%, transparent 52%, var(--bg) 100%);
}
.hero-text {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: calc(max(14px, env(safe-area-inset-top)) + 56px) 20px 6px; text-shadow: 0 1px 14px var(--bg);
}
.ring {
  width: 124px; height: 124px; border-radius: 62px; object-fit: cover; background: var(--surface);
  border: 3px solid rgba(255,255,255,0.92); box-shadow: 0 10px 34px rgba(0,0,0,0.45); transform-origin: 50% 50%;
}
.hero-text .name { margin: 16px 0 0; font-size: 32px; }
.hero-text .handle { margin-top: 4px; }
.share.on-photo {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 2; color: #fff;
  background: rgba(0,0,0,0.34); border-color: rgba(255,255,255,0.28);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.has-hero .socials { margin-top: 16px; }
.has-hero .bio { margin-top: 14px; }

/* The slim bar the top shrinks into: faded in by the scroll (js/page.js), or shown outright with reduced motion */
.mini {
  position: fixed; top: 0; left: 50%; z-index: 50; width: 100%; max-width: 460px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: var(--bg); border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 700;
  opacity: 0; pointer-events: none;
}
.mini.show { opacity: 1; }
.mini img { width: 32px; height: 32px; border-radius: 16px; object-fit: cover; flex: none; }
.mini span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card {
  width: 100%; margin-top: 24px; border-radius: 16px; border: 1px solid var(--gold-line); background: var(--card);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.card .lf { height: 15px; width: auto; align-self: flex-start; }
.days { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.days .n { display: block; font-family: 'Playfair Display', Georgia, serif; font-size: 44px; font-weight: 600; line-height: 1; }
.days .l { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.now { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); padding-bottom: 2px; }
.now svg { color: var(--gold); }
.join, .fitbtn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 10px;
  background: var(--btn); color: var(--btn-text); text-decoration: none; font-size: 16px; font-weight: 600;
}
.join .adult, .fitbtn .adult { color: inherit; opacity: 0.65; font-size: 12px; }
/* The LockedFit card (2026-11-25): the LockedFit app icon and name, this week as a ring in the page's own gold, and
   the button. It follows the page's theme like the LockedFans card above it. */
.fit-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; letter-spacing: 0.01em; }
.fit-head img { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.fit-row { display: flex; align-items: center; gap: 14px; }
.fit-ring { flex: none; }
.fit-ring text { fill: var(--text); font: 600 14px 'DM Sans', system-ui, sans-serif; }
.fit-facts { min-width: 0; }
.fit-facts .n { display: block; font-family: 'Playfair Display', Georgia, serif; font-size: 21px; font-weight: 600; line-height: 1.2; }
.fit-facts .l { display: block; font-size: 13px; color: var(--muted); margin-top: 5px; }
/* Its photo look (2026-11-25): the LockedFans photo card's frame (.cphoto), the name at the top and the week at the
   bottom of the photo in white, the button below inside the card's frame. */
.cphoto .fit-head { position: absolute; top: 14px; left: 16px; z-index: 1; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,0.5); }
.cphoto .fit-head img { box-shadow: 0 1px 8px rgba(0,0,0,0.45); }
.cphoto .fit-row { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,0.5); }
.cphoto .fit-facts .l { color: rgba(255,255,255,0.84); }
.cphoto .fit-ring circle:first-child { stroke: rgba(255,255,255,0.32); }
.cphoto .fit-ring text { fill: #fff; }
.card.has-photo .fitbtn { margin: 14px; }
.cphoto.gating .fit-head, .cphoto.gating .fit-row { visibility: hidden; }
/* The photo card (2026-11-25): the card photo at 4:3 across the top, darkened at both ends so the lockup and the
   lock count read on any photo; the button sits below it, inside the card's frame. Always the light lockup and
   white type here, whatever the theme: they sit on the photo, not on the page. */
.card.has-photo { padding: 0; gap: 0; overflow: hidden; }
.cphoto { position: relative; display: block; aspect-ratio: 4 / 3; background: #111; overflow: hidden; }   /* a blurred, scaled photo never spills onto the button */
.cphoto .pic { display: block; width: 100%; height: 100%; object-fit: cover; }
.cphoto::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 44%, rgba(0,0,0,0.8) 100%);
}
.cphoto .lf { position: absolute; top: 16px; left: 16px; z-index: 1; filter: drop-shadow(0 1px 4px rgba(0,0,0,0.5)); }
.cphoto .days { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,0.5); }
.cphoto .days .l, .cphoto .now { color: rgba(255,255,255,0.84); }
.cphoto .now svg { color: #D4AF37; }
.card.has-photo .join { margin: 14px; }

.spacer { flex: 1; min-height: 32px; }
.foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.get {
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px;
  text-decoration: none; font-size: 14px; font-weight: 600;
}
.get img { height: 14px; width: auto; }
.get .m { color: var(--muted); font-weight: 500; }
.report { font-size: 12px; color: var(--muted); padding: 6px; }

.btn {
  display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 18px; border-radius: 10px;
  border: 0; background: var(--btn); color: var(--btn-text); font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
  width: 100%;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 600; }
.plain { display: flex; align-items: center; justify-content: center; min-height: 44px; font-size: 15px; color: var(--muted); }

/* sheets: the 18+ step, the "open in Safari" prompt */
.scrim {
  position: fixed; inset: 0; z-index: 1000; background: rgba(5,4,3,0.76);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 460px; background: var(--surface); border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0; padding: 24px 24px max(26px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.sheet.top {
  align-self: flex-start; margin: 150px 16px 0; border: 1px solid var(--line); border-radius: 20px; text-align: left; align-items: stretch;
}
.sheet h2 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: 26px; font-weight: 600; line-height: 1.2; }
.sheet p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.sheet .small { font-size: 13px; }
.sheet-icon {
  width: 56px; height: 56px; border-radius: 28px; border: 1px solid var(--gold-line, rgba(212,175,55,0.5));
  display: flex; align-items: center; justify-content: center; color: var(--gold);
}
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.steps span {
  width: 30px; height: 30px; flex: none; border-radius: 15px; border: 1px solid rgba(212,175,55,0.6);
  color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.pointer { position: fixed; top: 8px; right: 22px; }

/* Opened from the editor's View page (?preview=1): a way back, at the bottom, for the owner only (js/page.js) */
.previewing .page { padding-bottom: calc(max(24px, env(safe-area-inset-bottom)) + 72px); }
.preview-bar {
  position: fixed; left: 50%; bottom: 0; z-index: 60; width: 100%; max-width: 460px; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.preview-bar button {
  display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 0;
  background: var(--btn); color: var(--btn-text); font-size: 15px; font-weight: 700; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) { .link { transition: none; } }
