/* Fonts, served from here (public/fonts) and not from Google. Inter: the text on Android and Windows (Apple
   devices use their own system font, and never fetch it). Sora: only the letters of the wordmark. */
@font-face {
  font-family: Inter; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Sora; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/sora-wordmark.woff2) format('woff2');
  unicode-range: U+2e, U+61, U+63-65, U+67, U+69, U+6e, U+79;
}
/* Mobile-first. On wider screens the app is a centred phone-width column. */
:root {
  --bg: #0b090a;
  --surface: #151113;
  --surface-2: #1e191c;
  --line: rgba(255,255,255,.09);
  --text: #f7f2f3;
  --muted: #a39a9d;
  --pink: #f04f9e;
  --pink-2: #ff7db7;
  --brand-ai: #e67586; /* the ".ai" of the wordmark */
  --ease-out: cubic-bezier(.3,.8,.2,1);
  --cta: linear-gradient(90deg, #e63e8e 0%, #ff7db7 100%);
  --cta-glow: 0 6px 20px rgba(240,79,158,.42);
  --gold: #f5cd55;
  --danger: #ff6b6b;
  --ok: #7ddea2;
  --col: 480px;
  --header: 52px;
  --nav: 58px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius: 20px;
  /* Layers: one surface colour lifted by a hairline edge and a faint top light. */
  --edge: rgba(255,255,255,.07);
  --lift: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0) 70%);
  --input: #0f0c0e;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* On html, not body: iOS only honours it on the root. Without it, pulling down at the
   top of a page drags the whole page, bottom nav included, behind Safari's toolbar. */
html { background: #050405; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body {
  margin: 0; color: var(--text); background: #050405;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
#app {
  position: relative; max-width: var(--col); min-height: 100dvh; margin: 0 auto;
  background: var(--bg); padding-bottom: calc(var(--nav) + var(--safe-bottom));
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
b, strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.visually-hidden, .offscreen { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; justify-content: center; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.ico { width: 22px; height: 22px; flex: 0 0 auto; }
.diamond { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------- buttons ---------- */
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 50px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--cta); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: var(--cta-glow);
}
.cta-btn:active:not(:disabled) { transform: scale(.98); }
.cta-btn.wide, .ghost.wide, .danger.wide { width: 100%; }
.ghost, .danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; text-decoration: none;
}
.ghost { border: 0; background: rgba(255,255,255,.08); }
.ghost.sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
.ghost.on { background: rgba(240,79,158,.2); color: var(--pink-2); }
.danger { border: 1px solid rgba(255,107,107,.45); background: transparent; color: var(--danger); }
.danger-text { color: var(--danger) !important; }
.text-btn { border: 0; background: none; padding: 10px 4px; color: var(--pink-2); font-weight: 600; }
.text-btn.center { display: block; width: 100%; }
.text-btn.inline { padding: 0; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; flex: 0 0 auto;
  display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--text);
}
.icon-btn .ico { width: 19px; height: 19px; }
.icon-btn.on { background: #fff; color: #111; }
.icon-btn.fav-on { color: var(--pink); }

/* ---------- header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--header) + var(--safe-top)); padding: var(--safe-top) 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(11,9,10,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: height .36s var(--ease-out), padding .36s var(--ease-out), opacity .24s ease;
}
/* Feeds, once expanded: the header folds away and the video takes its room. */
body.feed-expanded .app-header { height: 0; padding-top: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.brand { border: 0; background: none; padding: 4px 0; display: inline-flex; align-items: center; }
.logo {
  font-family: Sora, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 20px; font-weight: 600; line-height: 1; letter-spacing: -.005em; color: #fff; white-space: nowrap;
}
.logo-ai { color: var(--brand-ai); }
.bot-card h1 .logo { font-size: 32px; }
.wallet {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px 0 10px; white-space: nowrap;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.09);
}
.wallet b { font-size: 15px; font-variant-numeric: tabular-nums; }
/* 💎 1855 | Pro: the level in its colour after a hairline. */
.wallet-sep { width: 1px; height: 14px; margin: 0 3px; background: rgba(255,255,255,.28); }
.wallet-tier { font-size: 14px; font-weight: 700; }
.wallet-tier.free { color: #cfc8ca; }
.wallet-tier.basic { color: var(--t-basic-2); }
.wallet-tier.pro { color: var(--t-pro-2); }
.wallet-tier.max { background: var(--t-max); -webkit-background-clip: text; background-clip: text; color: transparent; }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-avatar { width: 36px; height: 36px; padding: 0; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255,255,255,.85); background: var(--surface-2); }
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.join-btn { position: relative; overflow: hidden; height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--cta); color: #fff; font-weight: 800; box-shadow: 0 4px 14px rgba(240,79,158,.4); }
.join-btn::after, .welcome-go::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.5) 50%, transparent 65%); transform: translateX(-120%); animation: mtp-shine 4.2s ease-in-out 2s infinite; }
.join-btn:active { transform: scale(.96); }

/* ---------- bottom navigation ---------- */
.bottom-nav {
  position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, var(--col)); height: calc(var(--nav) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(11,9,10,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.bottom-nav button {
  position: relative; border: 0; background: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; font-weight: 600;
}
.bottom-nav button.on { color: #fff; }
.bottom-nav button.on .ico { color: var(--pink); }
.bottom-nav .dot { position: absolute; top: 8px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--bg); }

/* ---------- filters ---------- */
.filters {
  position: sticky; top: calc(var(--header) + var(--safe-top)); z-index: 20;
  display: flex; align-items: center; gap: 8px; padding: 6px 0 10px 12px;
  background: var(--bg);
}
/* Signed-out visitors, above the tabs (views.js welcome): the sign-up gift, one tap to the sheet. */
.welcome {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 11px;
  width: calc(100% - 16px); margin: 2px 8px 4px; padding: 9px 10px; border: 0; border-radius: 16px; text-align: left; color: var(--text);
  background: radial-gradient(130% 180% at 0% 0%, rgba(240,79,158,.28), transparent 58%), radial-gradient(120% 170% at 100% 100%, rgba(164,107,255,.22), transparent 60%), #171216;
  transition: transform .12s ease;
}
.welcome:active { transform: scale(.985); }
.welcome::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,125,183,.75), rgba(164,107,255,.3) 48%, rgba(255,186,104,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.welcome-gem { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(126,200,255,.13); box-shadow: inset 0 0 0 1px rgba(126,200,255,.24); }
.welcome-gem .diamond { width: 22px; height: 22px; filter: drop-shadow(0 2px 6px rgba(126,200,255,.55)); }
.welcome-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.welcome-text b { font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.welcome-text small { margin-top: 2px; font-size: 12.5px; color: #cbc0c5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.welcome-go { position: relative; overflow: hidden; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cta); color: #fff; box-shadow: var(--cta-glow); }
.welcome-go .ico { width: 18px; height: 18px; }
/* Explore's card for a checkout left unpaid (views.js pendingCard): the same card, with × to hide it. */
.welcome.notice-card { padding: 0; gap: 0; }
.notice-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 9px 4px 9px 10px; border: 0; background: none; color: inherit; text-align: left; }
.notice-main:active { transform: scale(.985); }
.notice-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-right: 4px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.notice-x svg { width: 16px; height: 16px; }
@media (max-width: 345px) {
  .welcome { gap: 9px; }
  .welcome-gem { width: 34px; height: 34px; border-radius: 11px; }
  .welcome-text b { font-size: 14.5px; }
  .welcome-text small { font-size: 11.5px; }
}
.chips { flex: 1; min-width: 0; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
/* fading out only on the side with more to see (main.js sideFades) */
.chips.more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
.chips.more-left { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 32px), transparent); }
.chips.more-left.more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.filter-tools { display: flex; gap: 6px; padding-right: 12px; }
/* on a phone the three tabs and the three tools share one row: a little
   tighter as the screen narrows (390, 375, 360 all fit; 320 slides) */
@media (max-width: 430px) {
  .filters { gap: 6px; padding-left: 10px; }
  .chips { gap: 4px; }
  .filters .chip { padding: 0 10px; font-size: 13.5px; }
  .filter-tools { gap: 2px; padding-right: 10px; }
  .filter-tools .icon-btn { width: 32px; height: 32px; }
  .filter-tools .icon-btn .ico { width: 18px; height: 18px; }
}
@media (max-width: 389px) {
  .filters { gap: 4px; padding-left: 8px; }
  .filter-tools { padding-right: 8px; }
  .filter-tools .icon-btn { width: 30px; height: 30px; }
}
@media (max-width: 374px) {
  .filters .chip { padding: 0 8px; font-size: 13px; }
}
.chip {
  flex: 0 0 auto; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.chip.on { background: #fff; color: #111; border-color: #fff; }
.chip .cost { color: var(--pink-2); font-weight: 700; }
.chip.on .cost { color: #c2185b; }
.chip-row { display: flex; gap: 8px; }
.chip-row.wrap { flex-wrap: wrap; }
.search-mode { padding-right: 12px; }
.search-box { flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); }
.search-box .ico { width: 18px; height: 18px; color: var(--muted); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 10px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: rgba(240,79,158,.18); color: var(--pink-2); font-size: 13px; font-weight: 600; }
.pill .ico { width: 14px; height: 14px; }

/* ---------- template card ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 8px; }
.tcard {
  position: relative; aspect-ratio: 3 / 5; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); isolation: isolate; contain: layout paint;
}
.tcard-media, .tcard-media .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.86) 0%, rgba(0,0,0,.68) 12%, rgba(0,0,0,.4) 27%, rgba(0,0,0,.14) 42%, rgba(0,0,0,0) 58%);
}
/* A hairline edge with a faint top light, so a dark cover still reads as a card. */
.tcard::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset 0 1px 0 rgba(255,255,255,.1);
}
/* FREE TRIAL cards, where a new visitor starts: a pink-to-gold ring and a soft glow under them. */
.tcard.trial { box-shadow: 0 10px 26px -12px rgba(240,79,158,.7); }
.tcard.trial::before {
  content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(155deg, #ff62b0 0%, rgba(255,98,176,.18) 34%, rgba(255,186,104,.2) 66%, #ffba68 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.tcard-hit { position: absolute; inset: 0; z-index: 1; border: 0; padding: 0; background: none; }
.tcard { transition: transform .12s ease; }
.tcard:has(.tcard-hit:active) { transform: scale(.985); }
/* On-demand grid video (grid-video.js), fading in over the cover once it plays. */
.tcard-video { position: absolute; inset: 0; }
.grid-video { opacity: 0; transition: opacity .3s ease; }
.grid-video.on { opacity: 1; }
.tcard-media:has(.grid-video.on) > img.media { visibility: hidden; }
/* The template's example photos: one, or two for two-photo templates, tilted
   like prints; two are numbered 1 and 2. */
.ref-thumbs { position: absolute; z-index: 2; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.ref-shot { position: relative; display: block; transform: rotate(-6deg); }
.ref-shot + .ref-shot { transform: rotate(5deg); margin-left: 7px; }
.ref-shot + .ref-shot + .ref-shot { transform: rotate(-4deg); margin-left: 0; }
/* Three: a little smaller, so the column stays short. */
.ref-thumbs.three { gap: 3px; }
.ref-thumbs.three .ref-shot img { width: 26px; height: 35px; }
.ref-shot img {
  display: block; width: 30px; height: 40px; object-fit: cover; border-radius: 6px; border: 1.5px solid #e5dbdc;
  box-shadow: 0 2px 8px rgba(0,0,0,.55); background: var(--surface-2);
  /* Shown once the picture has loaded (main.js), so no empty frame sits on the card; after a while anyway. */
  opacity: 0; transition: opacity .2s ease; animation: ref-in .2s ease 2.5s forwards;
}
@keyframes ref-in { to { opacity: 1; } }
.ref-num {
  position: absolute; left: -4px; bottom: -4px; width: 14px; height: 14px; border-radius: 50%;
  display: grid; place-items: center; background: #ec4a9c; color: #fff; box-shadow: 0 0 0 1.5px #fff, 0 1px 4px rgba(0,0,0,.4);
  font-size: 9px; font-weight: 800; font-style: normal; line-height: 1;
}
.sound-btn {
  position: absolute; z-index: 3; right: 8px; top: 8px; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(38,36,37,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.sound-btn .ico { width: 18px; height: 18px; }
.sound-btn.on { background: rgba(240,79,158,.85); }
.sound-btn.sm { width: 30px; height: 30px; right: 6px; top: 6px; }
.sound-btn.lg { width: 44px; height: 44px; right: 12px; top: calc(56px); }
.sound-btn.lg .ico { width: 22px; height: 22px; }
.sound-btn::before { content: ""; position: absolute; inset: -8px; } /* bigger touch target */
.pro-badge {
  position: absolute; z-index: 2; right: 8px; top: 8px; padding: 3px 7px; border-radius: 8px; pointer-events: none;
  font-size: 10px; font-weight: 800; letter-spacing: .06em; color: #1a1404; background: linear-gradient(90deg, #f5cd55, #fff2cb);
}
.sound-btn ~ .pro-badge { top: 48px; }
.tcard-info {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 10px 10px;
  display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none;
}
.tcard-name {
  margin: 0; max-width: 100%; font-size: 14.5px; font-weight: 800; letter-spacing: .11em; line-height: 1.24; text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 2px 12px rgba(0,0,0,.45);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tcard-by { margin-top: 3px; font-size: 11.5px; letter-spacing: .01em; color: rgba(255,255,255,.66); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Badges (card_tags): small italic pills, coloured by kind. */
.badges { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; max-width: 100%; margin-top: 6px; }
/* Badges (card_tags): rounded pills. Kinds are italic on a colour of their
   own; the length and NEW are upright on flat colours. */
.badge {
  position: relative; padding: 3px 7px; border-radius: 999px; background: #796c90; color: #fff; text-shadow: none; white-space: nowrap;
  font-size: 10px; line-height: 1.2; font-weight: 800; font-style: italic; letter-spacing: .01em;
}
.badge.time, .badge.new { font-style: normal; }
.badge.new { background: #d16d52; }
.badge.trial { background: linear-gradient(90deg, #d7377f, #ef7fb9); font-size: 11px; padding: 4px 11px; box-shadow: 0 2px 10px rgba(215,55,127,.35); }
/* a badge drawn as a picture (FREE TRIAL, Talk): 22px tall, its own width, level with the pills */
.badge-img { display: block; height: 22px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.tcard.shape-wide .badge-img { height: 18px; }
.badge.talk { background: linear-gradient(90deg, #1f4a2b, #52ad6a); }
.badge.custom { background: linear-gradient(90deg, #0a1f5a, #4a7af2); }
.badge.drama { background: linear-gradient(90deg, #2c0a47, #9a3dda); }
.badge.drama-pro, .badge.premium { background: linear-gradient(90deg, #4438e8, #d940ad); }
/* Drama Pro: a small gold ribbon tip on the top-right corner */
.badge.drama-pro { padding-right: 10px; }
.badge.drama-pro::after {
  content: ""; position: absolute; top: -2px; right: -2px; width: 8px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3b8'/%3E%3Cstop offset='1' stop-color='%23d9a23a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M2 0h7.5A2.5 2.5 0 0 1 12 2.5V12c0 1.6-1.8 2.5-3 1.4C7.8 12.2 9 9.6 7.4 7.6 5.8 5.6 2.6 6 1 4.6-.4 3.3.3 0 2 0z' fill='url(%23g)'/%3E%3C/svg%3E") no-repeat center / contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}
.skeleton { background: linear-gradient(110deg, #141012 30%, #201a1d 50%, #141012 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* waterfall: two columns; card height = width x data-ratio (set via padding-top) */
.masonry { display: flex; align-items: flex-start; gap: 8px; padding: 0 8px; }
/* Explore's MyTok card (mytok.js mytokPromo), third as Explore first opens:
   "Custom Video" on a dark card with a pink glow from the top, a line with
   pink words, two scenes tilted one behind the other (the front one floating,
   a play mark on it) and Join Her, which catches the light now and then.
   Sizes follow the card's width (container units). */
.tcard.mt-promo {
  container-type: inline-size;
  background: radial-gradient(120% 55% at 50% 0%, rgba(255,79,163,.42), rgba(255,79,163,0) 70%), linear-gradient(#1d0f1b, #0d080c 70%);
  box-shadow: inset 0 0 0 1px rgba(255,140,198,.22);
}
.mtp-body { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.mtp-head { position: relative; z-index: 1; padding: 9cqw 7cqw 0; text-align: center; pointer-events: none; }
.mtp-title { margin: 0; color: #fff; font-size: 13.5cqw; font-weight: 900; line-height: 1.02; letter-spacing: -.01em; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.mtp-line { margin: 4cqw 0 0; color: rgba(255,255,255,.82); font-size: 6.6cqw; font-weight: 600; line-height: 1.3; }
.mtp-line em { font-style: normal; color: #ff7db7; font-weight: 800; }
.mtp-pics { position: relative; z-index: 1; flex: 1; width: 100%; min-height: 0; pointer-events: none; }
.mtp-pic { position: absolute; overflow: hidden; border-radius: 6cqw; background: #2a1f28; box-shadow: 0 10px 26px rgba(0,0,0,.55); }
.mtp-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mtp-pic.back { left: 6%; top: 10%; width: 46%; height: 64%; transform: rotate(-8deg); opacity: .78; filter: saturate(.85); }
.mtp-pic.front { right: 7%; top: 4%; width: 60%; height: 82%; transform: rotate(5deg); box-shadow: 0 0 0 1.5px rgba(255,255,255,.75), 0 14px 32px rgba(0,0,0,.6); animation: mtp-float 4.5s ease-in-out infinite; }
@keyframes mtp-float { 0%, 100% { transform: rotate(5deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-3%); } }
.mtp-play {
  position: absolute; left: 50%; top: 50%; width: 22cqw; height: 22cqw; transform: translate(-50%, -50%); display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.28); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55);
}
.mtp-play svg { width: 48%; height: 48%; margin-left: 6%; }
.mtp-cta {
  position: relative; z-index: 1; overflow: hidden; margin: 2cqw 0 8cqw; display: inline-flex; align-items: center; gap: 2.5cqw; padding: 3.6cqw 6.5cqw;
  border-radius: 999px; background: linear-gradient(90deg, #ff4fa3, #a46bff); color: #fff; font-size: 7cqw; font-weight: 800; white-space: nowrap; pointer-events: none;
  box-shadow: 0 6px 20px rgba(255,79,163,.45);
}
.mtp-cta .ico { width: 7.5cqw; height: 7.5cqw; }
.mtp-cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); transform: translateX(-120%); animation: mtp-shine 3.2s ease-in-out 1s infinite; }
@keyframes mtp-shine { 0% { transform: translateX(-120%); } 40%, 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
  .mtp-pic.front, .mtp-cta::after, .join-btn::after, .welcome-go::after, .mp-cta::after, .buy-btn::after, .pk-card.on .pk-art svg { animation: none; }
}

.mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tcard.m { aspect-ratio: auto; height: 0; padding-top: 150%; }
/* square-ish cards (1:1 to 5:6): one-line title */
.tcard.shape-square .tcard-name { -webkit-line-clamp: 1; }
.tcard.shape-square .badges { margin-top: 4px; }
/* shorter cards: two example photos side by side so they stay clear of the title */
.tcard.shape-square .ref-thumbs { flex-direction: row; }
.tcard.shape-square .ref-shot + .ref-shot { margin: 4px 0 0 -1px; }
/* landscape cards: title and badges only; the example photos sit side by side */
.tcard.shape-wide .tcard-by { display: none; }
.tcard.shape-wide .badges { margin-top: 4px; }
.tcard.shape-wide .ref-thumbs { flex-direction: row; left: 6px; top: 6px; }
.tcard.shape-wide .ref-shot img { width: 24px; height: 32px; }
.tcard.shape-wide .ref-shot + .ref-shot { margin: 3px 0 0 0; }
.tcard.shape-wide .tcard-info { padding: 0 8px 7px; }
.tcard.shape-wide .tcard-name { -webkit-line-clamp: 1; font-size: 12.5px; letter-spacing: .08em; }
.tcard.shape-wide .sound-btn { width: 30px; height: 30px; top: 6px; right: 6px; }
.tcard.shape-wide .pro-badge { top: 6px; left: 6px; right: auto; }

/* a generation still running: blurred photo, mark, "Loading", the usual wait */
.gen-loading { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: #141012; }
.gen-loading-bg { position: absolute; inset: -12%; width: 124%; height: 124%; max-width: none; object-fit: cover; filter: blur(22px) brightness(.62) saturate(1.15); }
.gen-loading-body {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; text-align: center; text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
/* The candy logo (views.js loadingMark): it floats, sways like a sweet being
   twisted, a pink glow breathes under it and a shine crosses it now and then.
   64px wide on a card, 96px on the opened page. */
.candy-mark { position: relative; display: block; width: 64px; aspect-ratio: 240 / 174; margin-bottom: 4px; animation: candy-float 2.4s ease-in-out infinite; }
.candy-mark::before {
  content: ''; position: absolute; inset: -35% -20%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(240,79,158,.6), rgba(240,79,158,0)); animation: candy-glow 2.4s ease-in-out infinite;
}
.candy-body { position: relative; display: block; width: 100%; height: 100%; animation: candy-sway 2.4s ease-in-out infinite; transform-origin: 50% 55%; }
.candy-body img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.candy-shine {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.85) 50%, rgba(255,255,255,0) 60%) no-repeat;
  background-size: 260% 100%; background-position: 140% 0;
  -webkit-mask: url(img/candy-mark.webp) center / 100% 100% no-repeat; mask: url(img/candy-mark.webp) center / 100% 100% no-repeat;
  mix-blend-mode: soft-light; animation: candy-shine 2.4s ease-in-out infinite;
}
@keyframes candy-float { 50% { transform: translateY(-5px); } }
@keyframes candy-sway { 0%, 100% { transform: rotate(-9deg) scale(1); } 25% { transform: rotate(0) scale(1.06, .96); } 50% { transform: rotate(9deg) scale(1); } 75% { transform: rotate(0) scale(1.06, .96); } }
@keyframes candy-glow { 0%, 100% { opacity: .45; transform: scale(.9); } 50% { opacity: .95; transform: scale(1.08); } }
@keyframes candy-shine { 0%, 45% { background-position: 140% 0; } 80%, 100% { background-position: -40% 0; } }
.gen-loading b { font-size: 17px; font-weight: 700; color: #f4efe9; }
.gen-loading p { margin: 0; max-width: 230px; font-size: 12.5px; line-height: 1.4; color: rgba(255,255,255,.8); }
/* a generation that failed: the same blurred photo, a red mark */
.gen-failed .gen-loading-bg { filter: blur(22px) brightness(.5) saturate(.85); }
.fail-mark { width: 50px; height: 50px; margin-bottom: 4px; color: #e5484d; filter: drop-shadow(0 2px 10px rgba(0,0,0,.4)); }
.gen-loading p.fail-why { margin-top: 2px; font-size: 11.5px; color: rgba(255,255,255,.6); }
/* Refused by a content check: the reason on the card itself, readable at a glance. */
.gen-failed.content .gen-loading-body { gap: 6px; padding: 12px 10px; }
.gen-failed.content b { font-size: 15px; color: #ffd0d3; }
.gen-loading p.fail-why-card { font-size: 12.5px; line-height: 1.35; color: #fff; font-weight: 600; }
.gen-loading p.fail-refund { font-size: 11px; color: rgba(255,255,255,.65); }
.gen-loading p.fail-refund:empty { display: none; }
.result-view.failed .gen-failed.content b { font-size: 19px; }
.result-view.failed .gen-loading p.fail-why-card { max-width: 290px; font-size: 14.5px; }
.tcard.creation.failed .tcard-info { padding-bottom: 12px; }
.tcard.creation.failed .tcard-name { font-size: 11.5px; letter-spacing: .06em; opacity: .75; }
.tcard.creation.working .tcard-info { padding-bottom: 12px; }
.tcard.creation.working .tcard-name { font-size: 11.5px; letter-spacing: .06em; opacity: .75; }
.result.working { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; }
.result.working .candy-mark { width: 96px; }
.result.working .gen-loading b { font-size: 22px; }
.result.working .gen-loading p { max-width: 280px; font-size: 15px; }

/* collection cards */
.tcard.creation .tcard-media::after { background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0) 45%); }
.tcard.creation .tcard-name { font-size: 13px; letter-spacing: .06em; }
.tcard.working .tcard-media .media { filter: saturate(.6) brightness(.7); }
.status-pill {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: rgba(255,255,255,.14);
}
.status-pill.succeeded { background: rgba(125,222,162,.2); color: var(--ok); }
.status-pill.failed { background: rgba(255,107,107,.18); color: var(--danger); }
.play-badge {
  position: absolute; z-index: 2; left: 50%; top: 42%; transform: translate(-50%, -50%); pointer-events: none;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
}

.more, .end { height: 72px; display: grid; place-items: center; }
/* Collection: how long creations stay, barely there, just above the copyright. */
.keep-note { display: flex; justify-content: center; align-items: center; gap: 5px; margin: 0 0 14px; color: var(--muted); font-size: 11px; letter-spacing: .02em; opacity: .55; }
.keep-note svg { width: 11px; height: 11px; flex: none; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--pink); animation: spin .8s linear infinite; display: inline-block; }
.spinner.sm { width: 12px; height: 12px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-head { padding: 8px 16px 12px; }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.empty h2 { color: #fff; margin: 0 0 4px; font-size: 20px; }
.empty h2, .empty p, .tcard-name, .auth-terms, .age-note, .profile-bio, .mt-hero > p, .sub.center, .fine-print, .mt-steps li span { text-wrap: balance; }
/* A page that is only its empty state: in the middle, not under the header. */
.page.with-footer > .page-body:has(> .empty:only-child) { display: flex; flex-direction: column; justify-content: center; }
.page.with-footer > .page-body > .empty:only-child { padding-bottom: 88px; }
.empty .cta-btn { margin-top: 16px; max-width: 300px; }

/* ---------- feeds ---------- */
.page.is-feed { padding: 0; }
.feed-page {
  position: relative; overflow: hidden; background: #000;
  height: calc(100dvh - var(--header) - var(--safe-top) - var(--nav) - var(--safe-bottom));
  transition: height .36s var(--ease-out);
}
body.feed-expanded .feed-page { height: calc(100dvh - var(--nav) - var(--safe-bottom)); }

/* top bar over the video: back, CandyTok / MyTok */
.feed-top {
  position: absolute; z-index: 6; top: 0; left: 0; right: 0; height: 52px;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
  transition: padding-top .36s var(--ease-out), height .36s var(--ease-out);
}
body.feed-expanded .feed-top { height: calc(52px + var(--safe-top)); padding-top: var(--safe-top); }
.feed-back {
  position: absolute; left: 4px; bottom: 4px; width: 44px; height: 44px; padding: 0; border: 0; background: none;
  display: grid; place-items: center; color: #fff; pointer-events: auto; filter: drop-shadow(0 1px 4px rgba(0,0,0,.6));
}
.feed-back .ico { width: 26px; height: 26px; stroke-width: 2.4; }
.feed-tabs { display: flex; gap: 24px; pointer-events: auto; }
.feed-title { padding: 8px 0; color: #fff; font-size: 16px; font-weight: 700; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.feed-tabs button {
  position: relative; border: 0; background: none; padding: 8px 0; color: rgba(255,255,255,.6);
  font-size: 16px; font-weight: 700; text-shadow: 0 1px 8px rgba(0,0,0,.7); transition: color .2s ease;
}
.feed-tabs button.on { color: #fff; }
.feed-tabs button::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 20px; height: 3px; margin-left: -10px;
  border-radius: 2px; background: #fff; transform: scaleX(0); transition: transform .25s var(--ease-out);
}
.feed-tabs button.on::after { transform: none; }

/* the list: one card per screen, snapping */
.feed { position: relative; height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.feed-card { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; }
.feed-card .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* landscape/square sources: show the whole frame over a blurred copy */
.feed-card.fit .media { object-fit: contain; }
.feed-card .backdrop { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(28px) brightness(.55); }
.feed-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.2) 26%, rgba(0,0,0,0) 42%), linear-gradient(to bottom, rgba(0,0,0,.38), rgba(0,0,0,0) 16%);
}
.feed-hit { position: absolute; inset: 0; z-index: 1; padding: 0; border: 0; background: none; }
.feed-play { position: absolute; z-index: 2; left: 50%; top: 50%; margin: -36px 0 0 -36px; color: rgba(255,255,255,.85); pointer-events: none; filter: drop-shadow(0 2px 12px rgba(0,0,0,.45)); animation: play-in .2s var(--ease-out); }
.feed-play .ico { width: 72px; height: 72px; }
@keyframes play-in { from { transform: scale(1.4); opacity: 0; } }
.sound-btn.feed-sound { top: 9px; right: 10px; z-index: 7; }
body.feed-expanded .sound-btn.feed-sound { top: calc(var(--safe-top) + 9px); }

/* right rail: like, share, Create now (its foot level with the text's) */
.rail { position: absolute; z-index: 3; right: 8px; bottom: 18px; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.rail-btn {
  width: 52px; min-height: 48px; padding: 0; border: 0; background: none; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 1px; filter: drop-shadow(0 1px 6px rgba(0,0,0,.5)); transition: transform .12s ease, color .2s ease;
}
.rail-btn span { font-size: 11px; font-weight: 600; color: #fff; line-height: 1.2; }
.rail-btn .ico { width: 34px; height: 34px; }
.rail-btn:active { transform: scale(.86); }
.rail-btn.on { color: var(--pink); }
.toast-btn { margin-left: 10px; padding: 4px 12px; border: 0; border-radius: 999px; background: #111; color: #fff; font-weight: 700; font-size: 13px; }
.rail-btn.on .ico { animation: heart-pop .34s cubic-bezier(.3,1.6,.5,1); }
@keyframes heart-pop { 0% { transform: scale(.55); } 60% { transform: scale(1.18); } }
/* At the foot of the rail: the example photo in a white ring (faces sit high
   in a portrait), "Create now" under it. */
.rail-create { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; padding: 0; border: 0; background: none; transition: transform .12s ease; }
.rail-create:active { transform: scale(.94); }
.rail-create img { width: 62px; height: 62px; border: 3px solid #fff; border-radius: 50%; background: var(--surface-2); object-fit: cover; object-position: 50% 18%; box-shadow: 0 2px 12px rgba(0,0,0,.45); }
.rail-create span { color: #fff; font-size: 11.5px; font-weight: 800; line-height: 1.2; white-space: nowrap; text-shadow: 0 1px 6px rgba(0,0,0,.65); }
.rail-create b { color: var(--pink-2); font-weight: inherit; }

/* bottom left, beside the rail: the title, then what it makes and who made it */
.meta { position: absolute; z-index: 3; left: 14px; right: 88px; bottom: 18px; display: flex; flex-direction: column; align-items: flex-start; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.meta-title {
  margin: 0; max-width: 100%; font-size: 18px; font-weight: 700; line-height: 1.28; letter-spacing: -.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.meta-line { display: flex; align-items: center; gap: 6px; max-width: 100%; margin: 5px 0 0; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.8); white-space: nowrap; }
.meta-line > span { flex: none; }
.meta-line i { font-style: normal; opacity: .6; }
.meta-author { min-width: 0; padding: 8px 0; margin: -4px 0; border: 0; background: none; color: rgba(255,255,255,.95); font: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* playback progress, at the very bottom of the card */
.feed-progress { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.16); pointer-events: none; }
.feed-progress i { display: block; height: 100%; background: rgba(255,255,255,.9); transform: scaleX(0); transform-origin: left; }
.feed-progress.waiting i { animation: buffering 1.1s ease-in-out infinite; }
@keyframes buffering { 50% { opacity: .35; } }
/* Collapsed: just the video and the hint; the controls come in as it expands. */
.feed-card :is(.rail, .meta) { transition: opacity .36s ease, transform .36s var(--ease-out); }
body:not(.feed-expanded) .feed-card :is(.rail, .meta) { opacity: 0; transform: translateY(12px); pointer-events: none; }

/* Swipe Up hint: text on the video, no panel; touches pass through */
.swipe-hint {
  position: absolute; z-index: 4; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: max-content; max-width: calc(100% - 32px);
  color: #fff; text-align: center; text-shadow: 0 1px 8px rgba(0,0,0,.8); pointer-events: none; animation: fade .3s ease;
}
.swipe-hint img { width: 32px; height: 32px; margin-bottom: 2px; filter: drop-shadow(0 1px 8px rgba(0,0,0,.8)); animation: nudge 1.4s ease-in-out infinite; }
.swipe-hint b { font-size: 14px; font-weight: 700; }
.swipe-hint span { font-size: 12px; color: #ffffffb8; }
@keyframes nudge { 0%, 100% { transform: translateY(3px); } 50% { transform: translateY(-4px); } }

/* end of the list, MyTok, sign-in */
.feed-card.tail, .feed-soon {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 72px 28px 24px; text-align: center; color: var(--muted);
  background: radial-gradient(120% 60% at 50% 0%, rgba(240,79,158,.13), transparent 62%), var(--bg);
}
.feed-soon { height: 100%; }
.feed-card.tail::after { display: none; }
.feed-card.tail h2, .feed-soon h2 { margin: 6px 0 2px; color: #fff; font-size: 22px; }
.feed-card.tail p, .feed-soon p { margin: 0; max-width: 300px; }
.feed-card.tail .cta-btn, .feed-soon .cta-btn { margin-top: 16px; width: min(280px, 100%); }
.soon-pill {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px;
  background: rgba(240,79,158,.16); color: var(--pink-2); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}

/* ---------- creator ---------- */
.creator-head { position: relative; padding: 18px 20px 16px; text-align: center; }
.creator-head .hero-btn { top: 12px; }
.avatar-lg { width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.9); background: var(--surface-2); }
.creator-head h1 { margin: 10px 0 2px; font-size: 20px; }
.creator-head p { margin: 0; min-height: 1.45em; }

/* ---------- dialogs ----------
   Two sizes, both centred over the same backdrop (82% black, 8px blur).
   small: a card, min(100%, 480px) wide, at most 100dvh − 32px tall.
   full:  on phones a page, min(100%, 430px) × 100% with square edges, so it
          reads as a new screen; from 768px a card, min(100%, 1024px) ×
          min(100dvh, 982px). Its content keeps a readable column (--page).
   The body scrolls; a page's leading .sheet-head and the foot stay put. */
.modal-back {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .18s ease;
}
.modal-back.small { padding: 16px; }
@keyframes fade { from { opacity: 0; } }
/* A sheet taking another's place: its backdrop is there at once (the page
   under it never shows through), and the photo editor too (no fade in from
   black; a MyTok face tapped grows into it, photo-edit.js). One come back
   to: no entrance at all; on MyTok's sheet only the face just set pops in
   (store.js enterClass). */
.modal-back.swap, .modal-back.swap > .pe { animation: none; }
.modal-back.back > .sheet, .modal-back.back > .pe, .modal-back.back .mt-scene { animation: none; }
.modal-back.back .mt-face:not(.fresh) .mt-face-ring img { animation: none; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
@keyframes push { from { transform: translateX(32px); opacity: 0; } }
.sheet { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--lift), var(--surface); }
.sheet.small {
  width: min(100%, 480px); max-height: min(100dvh - 32px, 100%); border-radius: 16px; border: 1px solid var(--edge);
  box-shadow: 0 24px 60px rgba(0,0,0,.55); animation: pop .2s var(--ease-out);
}
.sheet.full {
  --page: 520px; --gutter: max(16px, (100% - var(--page)) / 2);
  width: min(100%, 430px); height: 100%; padding-top: var(--safe-top); background: var(--surface); animation: push .24s var(--ease-out);
}
@media (min-width: 768px) {
  .sheet.full {
    width: min(100%, 1024px); height: min(100dvh, 982px); padding-top: 0; border-radius: 16px; border: 1px solid var(--edge);
    box-shadow: 0 24px 80px rgba(0,0,0,.6); animation: pop .2s var(--ease-out);
  }
}
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px 18px; }
/* Google's way out spelled out (an app's browser didn't let Safari/Chrome open): the three ticks step aside so email stays in sight. */
.auth-main:has(.auth-out) .auth-perks { display: none; }
.auth-main:has(.auth-out) .auth-out { margin-top: 10px; }
.sheet.full .sheet-body { padding: 0 var(--gutter) 18px; }
.sheet.full .sheet-body:last-child { padding-bottom: calc(18px + var(--safe-bottom)); }
.sheet.full .sheet-body > .sheet-head:first-child { position: sticky; top: 0; z-index: 5; min-height: 56px; margin: 0 -16px 4px; padding: 0 16px; background: var(--surface); }
.sheet-foot {
  flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface);
}
.sheet.full .sheet-foot { padding: 12px var(--gutter) calc(12px + var(--safe-bottom)); }
.sheet-foot .wide { flex-basis: 100%; }
.sheet-head { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.sheet-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 20px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { margin: 2px 0 14px; color: var(--muted); }
.debug-code { color: var(--gold); font-weight: 800; letter-spacing: .12em; }


.field-label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.text-input {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; outline: 0;
  background: var(--input); font-size: 16px; /* ≥16px stops iOS zooming on focus */
}
.text-input:focus { border-color: var(--pink); }
textarea.text-input { resize: vertical; margin-bottom: 8px; }
/* The code step: six boxes drawn over one transparent field (modals.js authModal). */
.otp-sub { margin-bottom: 18px; line-height: 1.5; }
.otp-to { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.otp-to b { min-width: 0; overflow-wrap: anywhere; color: var(--text); font-weight: 600; }
.otp-to .text-btn { font-size: 14px; }
.otp-boxes { position: relative; display: block; max-width: 400px; cursor: text; }
.otp-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 2.2vw, 10px); }
.otp-cell {
  position: relative; display: grid; place-items: center; height: 58px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--input); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.otp-cell.filled { border-color: rgba(255,255,255,.2); background: var(--surface-2); }
.otp-boxes:focus-within .otp-cell.current { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(240,79,158,.22); }
.otp-boxes:focus-within .otp-cell.current:empty::after { content: ""; width: 2px; height: 26px; border-radius: 1px; background: var(--pink-2); animation: otp-caret 1s steps(1) infinite; }
@keyframes otp-caret { 50% { opacity: 0; } }
/* The real field covers the boxes: taps, paste and the keyboard's code suggestion go to it. */
.otp-field {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; outline: 0;
  background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: transparent;
  font-size: 16px; /* no zoom on focus in iOS */ letter-spacing: 0; opacity: .01; z-index: 1;
}
.otp-field:-webkit-autofill { -webkit-box-shadow: 0 0 0 60px transparent inset; transition: background-color 9999s; }
.otp-form.busy .otp-cell { opacity: .55; }
.otp-form.has-error .otp-cell { border-color: var(--danger); }
.otp-form.has-error .otp-cells { animation: otp-shake .32s ease; }
@keyframes otp-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.otp-msg { min-height: 20px; margin: 8px 0 10px; font-size: 13px; line-height: 20px; color: var(--danger); }
.otp-resend { margin: 16px 0 6px; text-align: center; color: var(--muted); font-size: 14px; }
.otp-resend .num { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.otp-resend .text-btn { font-size: 14px; }
.otp-hint { margin: 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.5; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .otp-form.has-error .otp-cells, .otp-boxes:focus-within .otp-cell.current:empty::after { animation: none; } }
form .text-input { margin-bottom: 12px; }
/* Continue with Google, as Google's light button: white, the four-colour G, near-black text. */
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 52px; padding: 0 20px;
  border-radius: 999px; border: 1px solid #747775; background: #fff; color: #1f1f1f; font-size: 16px; font-weight: 600; letter-spacing: .1px;
  box-shadow: 0 6px 18px rgba(0,0,0,.3); transition: transform .12s, background-color .15s;
}
.google-btn:hover { background: #f2f3f5; }
.google-btn:active:not(:disabled) { transform: scale(.985); }
.google-btn:disabled { opacity: .8; }
.google-g { flex: none; width: 20px; height: 20px; }
.auth-terms { margin: 16px 8px 0; text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
/* Sign in, first screen: a picture on top fading into the sheet; the offer,
   three ticks, Google and Email at the bottom. A card on wider screens. */
.sheet.auth-sheet { padding-top: 0; }
.sheet.full.auth-sheet .sheet-body { position: relative; display: flex; flex-direction: column; padding: 0; overflow-x: hidden; }
.auth-sheet .icon-btn.close { position: absolute; top: calc(12px + var(--safe-top)); right: 12px; z-index: 3; background: rgba(0,0,0,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.auth-hero {
  position: relative; flex: 1 1 auto; min-height: 150px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 10%, rgba(240,79,158,.35), transparent 70%), var(--surface);
}
.auth-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,17,19,0) 40%, rgba(21,17,19,.75) 78%, var(--surface) 100%); }
.auth-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.auth-collage {
  position: absolute; inset: -12% -18%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start;
  transform: rotate(-8deg); opacity: .85;
}
.auth-collage img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; }
.auth-collage img:nth-child(3n + 2) { transform: translateY(-22%); }
.auth-main { position: relative; z-index: 1; flex: none; margin-top: -56px; padding: 0 20px calc(18px + var(--safe-bottom)); }
.auth-main h2 { margin: 0; text-align: center; font-size: 26px; font-weight: 800; letter-spacing: -.2px; }
.auth-offer { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 0; color: #e9e1e4; font-size: 15px; }
.auth-offer .diamond { width: 18px; height: 18px; }
.auth-offer b { color: var(--pink); }
/* The line under the offer: what the free diamonds are for. */
.auth-pitch { margin: 6px 0 0; text-align: center; color: #f4edf0; font-size: 15px; font-weight: 600; }
.auth-pitch b { color: var(--pink); }
.auth-perks {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0; padding: 12px 4px; list-style: none;
  border-radius: 16px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.06); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.auth-perks li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 8px; text-align: center; font-size: 13px; font-weight: 600; line-height: 1.3; color: #eee7ea; }
.auth-perks li + li { border-left: 1px solid rgba(255,255,255,.14); }
.auth-perks svg { width: 18px; height: 18px; color: #ff7db7; }
.email-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 52px; margin-top: 10px; padding: 0 20px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 16px; font-weight: 600;
  transition: transform .12s, background-color .15s;
}
.email-btn:hover { background: rgba(255,255,255,.2); }
.email-btn:active { transform: scale(.985); }
.email-btn.primary { background: linear-gradient(90deg, #e9408f, #ff7db7); box-shadow: 0 8px 24px rgba(233,64,143,.35); }
.mail-ico { flex: none; width: 22px; height: 22px; color: #fff; }
/* The email screen: the same sheet, the field and Continue in place of the two buttons. */
.auth-sheet .icon-btn.back { position: absolute; top: calc(12px + var(--safe-top)); left: 12px; z-index: 3; background: rgba(0,0,0,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.email-field {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px; cursor: text;
  border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .15s, box-shadow .15s;
}
.email-field:focus-within { border-color: rgba(255,125,183,.75); box-shadow: 0 0 0 3px rgba(240,79,158,.2); }
.email-field .mail-ico { color: #f8d5e6; }
.email-field input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none;
  color: #fff; font-size: 16px; /* ≥16px: no zoom on focus in iOS */
}
.email-field input::placeholder { color: rgba(255,255,255,.5); }
.email-field input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 60px transparent inset; transition: background-color 9999s; }
.auth-email-form .cta-btn { height: 52px; margin-top: 12px; }
.auth-email-form .cta-btn:disabled { opacity: .45; box-shadow: none; }
.auth-note { margin: 12px 0 0; text-align: center; color: #d9cfd3; font-size: 13.5px; }
/* The email field on the first screen (in an app's browser): "or" between it and Google. */
.auth-or { display: flex; align-items: center; gap: 12px; margin: 12px 4px 10px; color: #cfc4c8; font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.16); }
.auth-email-form.inline .cta-btn { margin-top: 10px; }
/* The code step, on the same picture: the boxes as glass, like the email field. */
.auth-code .sub { text-align: center; }
.auth-code .otp-sub { margin: 8px 0 16px; color: #d9cfd3; }
.auth-code .otp-to { justify-content: center; }
.auth-code .otp-boxes { margin: 0 auto; }
.auth-code .otp-cell { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.auth-code .otp-cell.filled { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.14); }
.auth-code .otp-msg { text-align: center; }
.auth-code .otp-form .cta-btn { height: 52px; }
.auth-code .otp-form .cta-btn:disabled { opacity: .45; box-shadow: none; }
.auth-code .otp-resend { margin-top: 12px; }
@media (max-height: 600px) {
  .auth-main h2 { font-size: 22px; }
  .auth-perks { margin: 12px 0; padding: 10px 2px; }
  .auth-perks li { font-size: 12px; }
}
@media (min-width: 768px) {
  .sheet.full.auth-sheet { width: 440px; height: min(100dvh - 48px, 780px); }
}
.auth-terms a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* links in small print: a taller tap area than their line, the text where it was */
.auth-terms a, .age-note a, article.legal a { padding: 7px 2px; margin: 0 -2px; }
.google-btn[aria-busy="true"] .google-g { animation: g-pulse 1s ease-in-out infinite; }
@keyframes g-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .google-btn[aria-busy="true"] .google-g { animation: none; } }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 4px; font-size: 14px; line-height: 1.45; color: #d9d1d4; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--pink); flex: 0 0 auto; }
.result { max-width: 300px; margin: 0 auto 8px; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #000; position: relative; }
.result .media { width: 100%; height: 100%; object-fit: cover; }
.gift { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0; font-size: 36px; font-weight: 800; color: var(--pink-2); }
.gift .diamond { width: 40px; height: 40px; }

/* membership: Go Basic / Go Pro (Basic accents pink, Pro gold) */
.sheet .close-ring { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); background: none; color: #fff; display: grid; place-items: center; z-index: 2; }
.sheet .close-ring .ico { width: 20px; height: 20px; }
.sheet.full .close-ring { top: calc(14px + var(--safe-top)); }
@media (min-width: 768px) { .sheet.full .close-ring { top: 14px; } }
/* Segmented Yearly / Monthly: a thumb slides under the selected option; the
   label and its badge brighten with it. */
.billing-toggle {
  position: relative; display: flex; width: fit-content; max-width: 100%; margin: 16px auto 18px; padding: 5px;
  border-radius: 999px; background: #141213; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), inset 0 1px 3px rgba(0,0,0,.5);
}
.toggle-thumb {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: linear-gradient(180deg, #343132, #282526);
  box-shadow: 0 4px 14px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.06), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .34s cubic-bezier(.3, .8, .2, 1), width .34s cubic-bezier(.3, .8, .2, 1);
}
.billing-toggle button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; min-height: 46px; padding: 0 14px;
  border: 0; border-radius: 999px; background: none; color: rgba(255,255,255,.42); font-size: 16px; font-weight: 600; white-space: nowrap;
  transition: color .25s ease, transform .12s ease;
}
.billing-toggle button:active { transform: scale(.97); }
.billing-toggle button.on { color: #fff; }
.off-badge {
  padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .01em;
  background: rgba(240,79,158,.14); color: rgba(255,125,183,.6); transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.billing-toggle button.on .off-badge { background: linear-gradient(90deg, #e63e8e, #ff6aac); color: #fff; box-shadow: 0 2px 10px rgba(240,79,158,.35); }
@media (max-width: 360px) {
  .billing-toggle button { padding: 0 11px; font-size: 15px; gap: 5px; }
  .off-badge { padding: 3px 7px; font-size: 11px; }
}
/* A light passing over the buy buttons now and then. */
.buy-btn::after, .mp-cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 36%, rgba(255,255,255,.6) 50%, transparent 64%);
  transform: translateX(-120%); animation: mtp-shine 3.6s ease-in-out 1.2s infinite;
}
/* ---------- membership sheet (modals.js memberModal) ----------
   One colour per level, here and everywhere a level shows: Basic blue, Pro
   pink, Max iridescent. The top of the sheet takes the chosen level's light. */
:root {
  --t-basic: #6a9ff2; --t-basic-2: #8db8ff;
  --t-pro: #ea5fa6; --t-pro-2: #ff8ec3;
  --t-max: linear-gradient(95deg, #eedb8e 0%, #a9e4ee 52%, #e8a7d0 100%);
}
.member-sheet .sheet-body { padding-bottom: 22px; }
/* The light scrolls with the page, under everything, edge to edge. */
.mp-glow { position: absolute; z-index: -1; top: 0; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); height: 540px; pointer-events: none; overflow: hidden; }
.mp-glow i { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; }
.mp-glow i.basic { background: radial-gradient(120% 70% at 50% -10%, rgba(52,98,214,.5), rgba(29,52,120,.2) 45%, transparent 75%); }
.mp-glow i.pro { background: radial-gradient(120% 70% at 50% -10%, rgba(176,40,104,.55), rgba(110,26,66,.22) 45%, transparent 75%); }
.mp-glow i.max {
  background: radial-gradient(60% 45% at 18% -4%, rgba(120,220,170,.32), transparent 70%), radial-gradient(60% 45% at 60% -8%, rgba(110,150,255,.34), transparent 70%),
    radial-gradient(55% 45% at 92% 0%, rgba(240,140,200,.3), transparent 70%), linear-gradient(180deg, rgba(40,40,70,.35), transparent 70%);
}
.member-sheet.t-basic .mp-glow i.basic, .member-sheet.t-pro .mp-glow i.pro, .member-sheet.t-max .mp-glow i.max { opacity: 1; }
/* A fine dotted grid over the light, fading out downwards; the light itself breathes slowly. */
.mp-glow::after {
  content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.11) 1px, transparent 1.3px); background-size: 13px 13px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.5) 38%, transparent 72%); mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.5) 38%, transparent 72%);
}
.mp-glow i { transform-origin: 50% 0; animation: mp-breathe 7s ease-in-out infinite; }
@keyframes mp-breathe { 50% { transform: scale(1.12, 1.08); } }

.mp-hero { position: relative; z-index: 0; padding: 30px 4px 0; text-align: center; }
.member-sheet .sheet-body > * { position: relative; z-index: 1; }
.member-sheet .sheet-body > .close-ring { position: absolute; z-index: 6; width: 34px; height: 34px; right: 12px; border-color: rgba(255,255,255,.28); background: rgba(0,0,0,.25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.member-sheet .close-ring .ico { width: 17px; height: 17px; }
.mp-title { margin: 0 auto; max-width: calc(100% - 52px); font-size: clamp(17px, 5.45vw, 30px); font-weight: 800; line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.mp-title em { font-style: normal; background: linear-gradient(180deg, #ffb3d7 0%, #ff78b6 45%, #ea4d98 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 14px rgba(240,85,159,.55)); }
.mp-sub { margin: 8px 0 0; color: rgba(255,255,255,.78); font-size: clamp(12px, 3.35vw, 15px); line-height: 1.4; text-wrap: balance; }
.mp-hero .wall-note { margin: 12px 0 0; text-align: left; }
.member-sheet .fo-strip { margin-top: 14px; }

/* After a first video (modals.js unlockHead / unlockPicks): its still with a
   lock beside what it's for, then two quick Basic picks, each straight to paying. */
.un-hero { display: flex; align-items: center; gap: 14px; padding: 26px 4px 0; text-align: left; }
.un-hero .mp-title { margin: 0; max-width: none; padding-right: 38px; font-size: clamp(20px, 6.2vw, 28px); }
.un-hero .mp-sub { margin-top: 6px; text-wrap: pretty; }
.un-text { flex: 1; min-width: 0; }
.un-pic { position: relative; flex: none; width: 76px; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #222; box-shadow: 0 12px 26px -10px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.18); }
.un-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.un-lock { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.un-lock svg { width: 14px; height: 14px; }
.un-picks { display: grid; gap: 10px; margin-top: 18px; animation: mp-in .5s cubic-bezier(.2, .8, .2, 1) .04s both; }
.un-pick {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 12px 12px 12px 16px; border-radius: 16px; text-align: left;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); transition: transform .12s ease;
}
.un-pick:active { transform: scale(.985); }
.un-pick.best { margin-top: 8px; }
.un-pick.best.pro {
  border-color: var(--t-pro); background: linear-gradient(100deg, rgba(200,50,120,.38), rgba(80,20,50,.55));
  box-shadow: 0 16px 30px -14px rgba(234,95,166,.85), 0 0 0 4px rgba(234,95,166,.1), inset 0 1px 0 rgba(255,255,255,.14);
}
.un-tag { position: absolute; top: -10px; left: 14px; padding: 3px 10px; border-radius: 999px; background: linear-gradient(180deg, #ff8ec3, #d9468e); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; box-shadow: 0 4px 10px -4px rgba(234,95,166,.8); }
.un-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.un-name b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.un-name small { color: rgba(255,255,255,.72); font-size: 12.5px; line-height: 1.3; }
.un-price { flex: none; display: flex; align-items: baseline; gap: 2px; }
.un-price b { color: var(--t-basic-2); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.un-pick.pro .un-price b { color: var(--t-pro-2); }
.un-price small { color: rgba(255,255,255,.7); font-size: 12.5px; }
.un-go { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; }
.un-go svg { width: 18px; height: 18px; }
.un-pick.best .un-go { background: linear-gradient(180deg, #f472b3, #c93d84); box-shadow: 0 6px 14px -6px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.un-pick.best .un-go svg { animation: mp-nudge 1.6s ease-in-out infinite; }
/* A members-only wall before the free first video (modals.js trialBox). */
.tr-box { margin-top: 16px; padding: 14px 12px 12px; border-radius: 18px; background: linear-gradient(180deg, rgba(255,214,120,.14), rgba(255,140,190,.08)); box-shadow: inset 0 0 0 1px rgba(255,214,140,.35); animation: mp-in .5s cubic-bezier(.2, .8, .2, 1) .04s both; }
.tr-head { display: flex; flex-direction: column; gap: 2px; margin: 0 4px 10px; }
.tr-head b { color: #ffe3a6; font-size: 17px; font-weight: 800; }
.tr-head small { color: rgba(255,255,255,.74); font-size: 13px; }
.tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tr-card { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 8px 7px 7px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(0,0,0,.28); color: #fff; text-align: left; transition: transform .12s ease; }
.tr-card:active { transform: scale(.97); }
.tr-pic { position: relative; flex: none; width: 50px; aspect-ratio: 3 / 4; border-radius: 9px; overflow: hidden; background: #222; }
.tr-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tr-pic .tr-me { position: absolute; right: 3px; bottom: 3px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.tr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.tr-txt b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.tr-free { white-space: nowrap; padding: 2px 7px; border-radius: 999px; background: linear-gradient(180deg, #ffd98a, #f2a93b); color: #2a1600; font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .03em; }
.tr-go { flex: none; display: grid; place-items: center; width: 22px; color: rgba(255,255,255,.7); }
.tr-go svg { width: 16px; height: 16px; }
.un-or { display: flex; align-items: center; gap: 10px; margin: 22px 0 -4px; color: rgba(255,255,255,.55); font-size: 13px; font-weight: 600; }
.un-or::before, .un-or::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.12); }
@media (max-width: 360px) {
  .un-pic { width: 64px; }
  .un-pick { gap: 9px; padding-left: 13px; }
  .un-name b { font-size: 16px; }
  .un-price b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .un-pick.best .un-go svg, .un-picks { animation: none; } }

/* One Month | Annual: a white thumb slides under the chosen one. */
.mp-toggle { margin: 18px auto 16px; padding: 5px; background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px -14px rgba(0,0,0,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.mp-toggle .toggle-thumb { top: 5px; bottom: 5px; background: linear-gradient(180deg, #fff, #f1eef0); box-shadow: 0 6px 16px rgba(0,0,0,.4), inset 0 -1px 0 rgba(0,0,0,.08); }
.mp-toggle button { min-height: 44px; padding: 0 16px; color: rgba(255,255,255,.66); font-size: 17px; font-weight: 600; }
.mp-toggle button.on { color: #111; }
.mp-toggle .off-badge { padding: 5px 10px; background: linear-gradient(90deg, #e63e8e, #ff5fa8); color: #fff; font-size: 12.5px; box-shadow: 0 2px 10px rgba(240,79,158,.35); }
.mp-toggle button:not(.on) .off-badge { animation: mp-beat 2.4s ease-in-out infinite; }
@keyframes mp-beat { 0%, 60%, 100% { transform: scale(1); box-shadow: 0 2px 10px rgba(240,79,158,.35); } 30% { transform: scale(1.07); box-shadow: 0 2px 16px rgba(240,79,158,.7); } }

/* What the chosen level is for, pointing at its card. */
.mp-pitch {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 14px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 12px 26px -18px rgba(0,0,0,.8); transition: background-color .35s ease, border-color .35s ease;
}
.mp-pitch.basic { background: linear-gradient(100deg, rgba(60,110,230,.32), rgba(30,50,110,.18)); border-color: rgba(120,160,255,.28); }
.mp-pitch.pro { background: linear-gradient(100deg, rgba(200,50,120,.3), rgba(80,20,50,.2)); border-color: rgba(255,130,190,.26); }
.mp-pitch.max { background: linear-gradient(100deg, rgba(240,210,120,.12), rgba(120,200,230,.1) 50%, rgba(230,150,200,.1)); border-color: rgba(220,220,255,.24); }
.mp-pitch::after {
  content: ""; position: absolute; bottom: -6px; left: calc(16.667% - 5px); width: 10px; height: 10px; transform: rotate(45deg);
  border: solid rgba(255,255,255,.2); border-width: 0 1px 1px 0; background: #15131a; transition: left .35s cubic-bezier(.3, .8, .2, 1);
}
.mp-pitch.at-1::after { left: calc(50% - 5px); }
.mp-pitch.at-2::after { left: calc(83.333% - 5px); }
.mp-pitch-ico {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; font-size: 26px; line-height: 1;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.2), 0 6px 14px -6px rgba(0,0,0,.6);
  animation: mp-pop .42s cubic-bezier(.3, 1.5, .5, 1) both;
}
.mp-pitch-text { animation: mp-slide .34s ease both; }
@keyframes mp-pop { from { transform: scale(.6) rotate(-12deg); opacity: 0; } }
@keyframes mp-slide { from { transform: translateX(8px); opacity: 0; } }
.mp-pitch-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mp-pitch-text b { font-size: clamp(13px, 3.5vw, 15.5px); font-weight: 800; line-height: 1.25; }
.mp-pitch.max b { background: var(--t-max); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mp-pitch-text small { color: rgba(255,255,255,.78); font-size: 12.5px; line-height: 1.3; }

/* The three levels side by side: name in its colour, the old price struck, the price. */
.mp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
/* Annual: room above the cards for Max's "Recommend" pill, which sits on its top edge. */
.mp-cards.tagged { margin-top: 22px; }
/* Max with its pill on top: its tick sits just under the pill, beside the name. */
.mp-cards.tagged .mp-card.max .mp-check { top: 17px; }
html[lang=de] .bt-k, html[lang=de] .bt-c { white-space: normal; overflow-wrap: anywhere; hyphens: auto; line-height: 1.2; min-width: 0; }
/* The level names on top stay whole ("Ba-sic" broke on the chosen tag). */
html[lang=de] .bt-th { white-space: nowrap; overflow-wrap: normal; hyphens: none; }
html[lang=de] .bt-c { padding: 4px 2px; }
.mp-card > .mp-rec {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -55%); z-index: 2; padding: 3px 10px; border-radius: 999px;
  background: #fff; color: #111; font-size: 12px; font-weight: 800; line-height: 1.3; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.mp-card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 112px; padding: 14px 6px;
  border-radius: 18px; border: 1.5px solid rgba(255,255,255,.14); background: linear-gradient(180deg, rgba(26,24,28,.82), rgba(10,9,11,.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06); transition: border-color .25s ease, background-color .25s ease, transform .28s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s ease;
}
.mp-card:active { transform: scale(.97); }
.mp-card.on { transform: translateY(-4px) scale(1.035); z-index: 1; }
.mp-card.on:active { transform: translateY(-2px) scale(1); }
/* A sheen across the top of the chosen card. */
.mp-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 46%; border-radius: 16.5px 16.5px 0 0; background: linear-gradient(180deg, rgba(255,255,255,.12), transparent); opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.mp-card.on::before { opacity: 1; }
/* Its tick, in the level's colour. */
.mp-check {
  position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff;
  transform: scale(0); opacity: 0; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), opacity .2s ease;
}
.mp-check .bt-tick { width: 12px; height: 12px; }
.mp-card.on .mp-check { transform: scale(1); opacity: 1; }
.mp-card.basic .mp-check { background: var(--t-basic); box-shadow: 0 2px 8px rgba(90,140,255,.6); }
.mp-card.pro .mp-check { background: var(--t-pro); box-shadow: 0 2px 8px rgba(240,90,165,.6); }
.mp-card.max .mp-check { background: var(--t-max); color: #151515; box-shadow: 0 2px 8px rgba(170,220,240,.5); }
.mp-card > span, .mp-card > s, .mp-card > b { position: relative; }
.mp-card:not(.on) .mp-price { color: rgba(255,255,255,.86); }
.mp-price, .mp-was { animation: mp-rise .36s cubic-bezier(.3, 1.3, .5, 1) both; }
.mp-was { animation-duration: .3s; }
@keyframes mp-rise { from { transform: translateY(9px); opacity: 0; } }
.mp-name { font-size: 19px; font-weight: 700; }
.mp-card.basic .mp-name, .bt-th.basic, .bt-c.cost.basic { color: var(--t-basic); }
.mp-card.pro .mp-name, .bt-th.pro, .bt-c.cost.pro { color: var(--t-pro); }
.mp-card.max .mp-name, .bt-th.max, .bt-c.cost.max { background: var(--t-max); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mp-was { color: rgba(255,255,255,.45); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; text-decoration-thickness: 1.5px; }
.mp-price { font-size: 27px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mp-card.basic.on { border-color: var(--t-basic); background: linear-gradient(180deg, rgba(70,120,230,.36), rgba(30,50,110,.55)); box-shadow: 0 18px 34px -14px rgba(90,140,255,.85), 0 0 0 4px rgba(90,140,255,.1), inset 0 1px 0 rgba(255,255,255,.14); }
.mp-card.pro.on { border-color: var(--t-pro); background: linear-gradient(180deg, rgba(170,45,108,.56), rgba(80,22,52,.6)); box-shadow: 0 18px 34px -14px rgba(240,90,165,.85), 0 0 0 4px rgba(240,90,165,.1), inset 0 1px 0 rgba(255,255,255,.14); }
.mp-card.max.on {
  border-color: transparent; box-shadow: 0 18px 34px -14px rgba(170,210,255,.7), 0 0 0 4px rgba(190,220,255,.08);
  background: radial-gradient(90% 70% at 20% 0%, rgba(238,219,142,.26), transparent 70%) padding-box, radial-gradient(90% 80% at 100% 100%, rgba(232,167,208,.26), transparent 70%) padding-box,
    linear-gradient(#0b0c12, #0b0c12) padding-box, conic-gradient(from var(--mp-ang), #eedb8e, #a9e4ee, #e8a7d0, #fff, #eedb8e) border-box;
  animation: mp-spin 5s linear infinite;
}
/* Max's rim turns slowly (where the browser can animate an angle; elsewhere it stands still). */
@property --mp-ang { syntax: "<angle>"; inherits: false; initial-value: 140deg; }
@keyframes mp-spin { to { --mp-ang: 500deg; } }
/* "Max" itself shimmers. */
.mp-card.max .mp-name, .bt-th.max:not(.on) { background-size: 220% 100%; animation: mp-hue 5s ease-in-out infinite; }
@keyframes mp-hue { 50% { background-position: 100% 0; } }
.mp-cards.fit-1 .mp-price { font-size: 22px; }
.mp-cards.fit-2 .mp-price { font-size: 18px; }
.mp-cards.fit-2 .mp-name { font-size: 16px; }

/* Monthly: the same level by the year, one tap away. */
.mp-switch {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 13px 14px 13px 18px; border-radius: 16px; text-align: left;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #fff; transition: transform .12s ease;
}
.mp-switch:active { transform: scale(.985); }
.mp-switch.basic { background: linear-gradient(100deg, rgba(60,110,230,.22), rgba(30,50,110,.14)); }
.mp-switch.pro { background: linear-gradient(100deg, rgba(200,50,120,.2), rgba(80,20,50,.14)); }
.mp-switch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; color: rgba(255,255,255,.78); font-size: 14.5px; }
.mp-switch-v { color: #fff; font-size: 16px; font-weight: 600; }
.mp-switch em { font-style: normal; font-weight: 800; }
.mp-switch.basic em { color: var(--t-basic-2); }
.mp-switch.pro em { color: var(--t-pro-2); }
.mp-switch.max em { background: var(--t-max); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mp-go { flex: none; display: grid; place-items: center; width: 56px; height: 34px; border-radius: 999px; color: #fff; }
.mp-go svg { width: 20px; height: 20px; }
.mp-switch.basic .mp-go { background: linear-gradient(180deg, #6fa3ff, #3f73da); }
.mp-switch.pro .mp-go { background: linear-gradient(180deg, #f472b3, #c93d84); }
.mp-switch.max .mp-go { background: var(--t-max); color: #121212; }
.mp-go { box-shadow: 0 6px 14px -6px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.mp-go svg { animation: mp-nudge 1.6s ease-in-out infinite; }
@keyframes mp-nudge { 50% { transform: translateX(4px); } }
.mp-switch { box-shadow: inset 0 1px 0 rgba(255,255,255,.08); animation: mp-in .34s ease both; }

/* Benefits: the chosen level's column lit from top to bottom, its name on a tag. */
.mp-box { margin-top: 18px; border-radius: 22px; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(180deg, rgba(22,20,24,.92), rgba(12,11,13,.92)); overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 20px 40px -28px rgba(0,0,0,.9); }
.bt { --k: 33.4%; --c: 22.2%; position: relative; padding-bottom: 6px; }
.bt-row { position: relative; z-index: 1; display: grid; grid-template-columns: var(--k) var(--c) var(--c) var(--c); align-items: center; min-height: 50px; }
.bt-head { min-height: 74px; }
.bt-k { padding-left: 16px; color: rgba(255,255,255,.72); font-size: clamp(13px, 3.75vw, 15px); white-space: nowrap; }
.bt-head .bt-k { color: #fff; font-size: 15.5px; font-weight: 800; }
.bt-c { display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; font-size: clamp(13px, 3.9vw, 15.5px); font-variant-numeric: tabular-nums; }
.bt-c.cost { font-weight: 700; }
.bt-row:nth-child(odd):not(.bt-head) { background: rgba(255,255,255,.028); }
.bt-row:not(.bt-head) .bt-c:not(.cost) { color: rgba(255,255,255,.7); transition: color .25s ease; }
.bt-row:not(.bt-head) .bt-c.on:not(.cost) { color: #fff; font-weight: 700; }
.bt-c.cost:not(.on) { opacity: .8; }
.bt-c.cost { font-size: clamp(13.5px, 4.1vw, 16.5px); }
/* Annual diamonds: the number, then a small /mo under it (it no longer reaches the next column). */
.bt-c.cost:has(.bt-per) { flex-direction: column; gap: 0; line-height: 1.1; }
.bt-per { font-size: 10.5px; font-weight: 600; opacity: .75; }
.bt-c.cost.on { font-weight: 800; }
.bt-dash { font-style: normal; color: rgba(255,255,255,.3); }
.bt-tick { width: 19px; height: 19px; }
/* A tick in the chosen column: on a disc of the level's colour. */
.bt-c.on .bt-tick { width: 22px; height: 22px; padding: 4px; border-radius: 50%; color: #fff; }
.bt.basic .bt-c.on .bt-tick { background: var(--t-basic); }
.bt.pro .bt-c.on .bt-tick { background: var(--t-pro); }
.bt.max .bt-c.on .bt-tick { background: var(--t-max); color: #151515; }
.bt-hl {
  position: absolute; z-index: 0; top: 8px; bottom: -2px; left: var(--k); width: var(--c); border-radius: 18px 18px 0 0;
  border: 1.5px solid; border-bottom: 0; transition: left .38s cubic-bezier(.3, 1.2, .4, 1), border-color .3s ease, background-color .3s ease, box-shadow .3s ease;
}
/* The lit column and its rim thin out towards the bottom, so it melts into the box instead of ending on a line. */
.bt-hl { -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 38%, rgba(0,0,0,.55) 68%, transparent 97%); mask-image: linear-gradient(180deg, #000 0%, #000 38%, rgba(0,0,0,.55) 68%, transparent 97%); }
.bt.at-1 .bt-hl { left: calc(var(--k) + var(--c)); }
.bt.at-2 .bt-hl { left: calc(var(--k) + 2 * var(--c)); }
.bt.basic .bt-hl { border-color: rgba(106,159,242,.8); background: linear-gradient(180deg, rgba(70,120,230,.26), rgba(70,120,230,.07)); box-shadow: 0 0 26px rgba(90,140,255,.22); }
.bt.pro .bt-hl { border-color: rgba(234,95,166,.8); background: linear-gradient(180deg, rgba(234,95,166,.26), rgba(234,95,166,.07)); box-shadow: 0 0 26px rgba(240,90,165,.22); }
.bt.max .bt-hl { border-color: rgba(230,230,240,.75); background: linear-gradient(180deg, rgba(238,219,142,.14), rgba(169,228,238,.07) 50%, rgba(232,167,208,.05)); box-shadow: 0 0 26px rgba(170,220,240,.18); }
.bt-th {
  position: relative; min-width: 0; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font-size: 16px; font-weight: 800;
  transition: color .25s ease;
}
/* The chosen name: a tag with its right end cut on a slant. */
.bt-th.on { color: #fff; -webkit-text-fill-color: currentColor; padding: 0 20px 0 18px; clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%); border-radius: 999px 4px 4px 999px; }
.bt-th.basic.on { background: var(--t-basic); }
.bt-th.pro.on { background: var(--t-pro); }
.bt-th.max.on { background: var(--t-max); color: #111; }
.bt-th.on { filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }

/* No hidden fees, one-time payment, privacy: under the table, quiet. */
.mp-info { display: flex; flex-direction: column; gap: 14px; padding: 18px 16px 20px; border-top: 1px solid rgba(255,255,255,.12); }
.mp-info-row { align-items: center; }
.mp-info-row { display: flex; gap: 14px; align-items: flex-start; }
.mp-info-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.08); }
.mp-info-ico svg { width: 22px; height: 22px; fill: rgba(255,255,255,.78); }
.mp-info-ico svg path[stroke] { stroke: #1b191d; }
.mp-info-row span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mp-info-row b { color: rgba(255,255,255,.9); font-size: 15px; font-weight: 600; }
.mp-info-row small { color: rgba(255,255,255,.6); font-size: 13px; line-height: 1.45; }

/* Questions: open at first, each folds away. */
.mp-faq-title { margin: 30px 0 14px; text-align: center; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.mp-faq { border-radius: 22px; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(180deg, rgba(22,20,24,.92), rgba(12,11,13,.92)); padding: 0 16px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.faq-item + .faq-item { border-top: 1px solid rgba(255,255,255,.08); }
.faq-q { display: flex; align-items: center; gap: 12px; width: 100%; padding: 18px 0; border: 0; background: none; color: #f2eef0; text-align: left; font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.faq-q span { flex: 1; min-width: 0; }
.faq-chev { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.07); color: #fff; transition: transform .25s ease; }
.faq-chev svg { width: 18px; height: 18px; }
.faq-item:not(.open) .faq-chev { transform: rotate(180deg); }
.faq-a { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s ease; }
.faq-item:not(.open) .faq-a { grid-template-rows: 0fr; }
.faq-a p { overflow: hidden; margin: 0; padding: 0 44px 0 14px; color: rgba(255,255,255,.62); font-size: 15.5px; line-height: 1.6; }
.faq-item.open .faq-a p { padding-bottom: 18px; }

/* The button stays at the bottom: the level's colour, its price, what the year saves. */
.member-sheet .sheet-foot { position: relative; display: block; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(24,22,26,.86); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
/* The page fades out under the bar. */
.member-sheet .sheet-foot::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 34px; background: linear-gradient(180deg, transparent, rgba(8,7,9,.7)); pointer-events: none; }
.member-sheet .combine-note { margin: 0 4px 10px; }
.mp-cta-wrap { position: relative; }
/* The level's light under the button, breathing. */
.mp-cta-wrap::before { content: ""; position: absolute; inset: 10px 8% -6px; border-radius: 50%; filter: blur(18px); opacity: .7; animation: mp-glow 2.6s ease-in-out infinite; pointer-events: none; }
.mp-cta-wrap.basic::before { background: #5a8fe8; }
.mp-cta-wrap.pro::before { background: #ea4d98; }
.mp-cta-wrap.max::before { background: var(--t-max); }
@keyframes mp-glow { 50% { opacity: .35; transform: scaleX(.92); } }
.mp-cta {
  position: relative; overflow: hidden; width: 100%; min-height: 58px; border: 0; border-radius: 16px; color: #fff; font-size: 19.5px; font-weight: 800; letter-spacing: -.005em;
  transition: transform .12s ease, background-color .3s ease, box-shadow .3s ease;
}
.mp-cta-label { display: inline-block; text-shadow: 0 1px 0 rgba(0,0,0,.18); animation: mp-rise .34s cubic-bezier(.3, 1.3, .5, 1) both; }
.mp-cta.max .mp-cta-label { text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.mp-cta:active { transform: scale(.985); }
.mp-cta.basic { background: linear-gradient(180deg, #86b4ff 0%, #6298f0 50%, #4c80dc 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 0 0 1px rgba(170,205,255,.35), inset 0 -2px 0 rgba(0,0,0,.12); }
.mp-cta.pro { background: linear-gradient(180deg, #ff8cc4 0%, #f05fa6 50%, #dc4590 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 0 0 1px rgba(255,175,212,.38), inset 0 -2px 0 rgba(0,0,0,.12); }
.mp-cta.max { background: linear-gradient(95deg, #f3e29a 0%, #b4e9f2 52%, #eeb2d7 100%); color: #121212; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 0 0 1px rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.1); }
.mp-save {
  position: absolute; z-index: 1; top: -12px; right: -4px; padding: 4px 11px; border-radius: 11px 11px 11px 3px; background: linear-gradient(180deg, #fff, #f3eff1); color: #121212;
  font-size: 13.5px; font-weight: 800; white-space: nowrap; box-shadow: 0 6px 14px rgba(0,0,0,.4), inset 0 -1px 0 rgba(0,0,0,.08); pointer-events: none;
  transform-origin: 20% 100%; animation: mp-tag .5s cubic-bezier(.3, 1.7, .5, 1) both;
}
@keyframes mp-tag { from { transform: scale(.4) rotate(8deg); opacity: 0; } }
.mp-fine { margin: 11px 0 0; text-align: center; color: rgba(255,255,255,.68); font-size: 13.5px; line-height: 1.45; }

/* Phones (iPhone and Android alike): a little tighter than on a computer, so
   the plans and the first rows of the table show above the button, with room
   left between the parts. Computers keep the roomy sheet. */
@media (max-width: 767px) {
  .mp-hero { padding-top: 22px; }
  .mp-sub { margin-top: 7px; font-size: clamp(11px, 3.15vw, 15px); letter-spacing: -.005em; }
  .mp-toggle { margin: 16px auto 14px; padding: 4px; }
  .mp-toggle .toggle-thumb { top: 4px; bottom: 4px; }
  .mp-toggle button { min-height: 40px; font-size: 16px; }
  .mp-pitch { min-height: 56px; padding: 9px 14px; border-radius: 15px; }
  .mp-pitch-ico { width: 38px; height: 38px; border-radius: 11px; font-size: 22px; }
  .mp-pitch-text { gap: 2px; }
  .mp-cards { margin-top: 16px; gap: 10px; }
  .mp-card { gap: 3px; min-height: 102px; padding: 12px 6px; line-height: 1.18; }
  .mp-name { font-size: 18px; }
  .mp-price { font-size: 25px; }
  .mp-box { margin-top: 18px; }
  .bt-row { min-height: 45px; }
  .bt-head { min-height: 56px; }
  .member-sheet .sheet-foot { padding-top: 14px; }
  .mp-cta { min-height: 54px; }
  .mp-fine { margin-top: 9px; font-size: 12.5px; line-height: 1.45; }
}
@media (max-width: 389px) {
  .mp-toggle button { padding: 0 12px; font-size: 16px; gap: 6px; }
  .mp-price { font-size: 23px; }
  .bt-k { padding-left: 12px; }
  .bt-th { padding: 0 10px; font-size: 15px; }
  .bt-th.on { padding: 0 15px 0 12px; }
}
@media (max-width: 349px) {
  .mp-toggle .off-badge { padding: 4px 7px; font-size: 11px; }
  .mp-price { font-size: 20px; }
  .mp-name { font-size: 16px; }
  .bt-th { font-size: 13.5px; padding: 0 6px; }
  .bt-th.on { padding: 0 12px 0 9px; }
  .mp-cta { font-size: 17px; }
  .mp-fine { font-size: 11.5px; margin-top: 8px; }
  .mp-switch-v { font-size: 14px; }
  .mp-switch { padding: 11px 12px 11px 14px; gap: 8px; }
  .mp-switch-text { font-size: 13px; }
  .mp-go { width: 46px; height: 30px; }
  /* the smallest phones: a little air between the columns, a lower bar */
  .bt-row:not(.bt-head) .bt-c:not(.cost) { font-size: 12.5px; }
  .bt-row { min-height: 46px; }
  .mp-pitch-ico { width: 38px; height: 38px; font-size: 22px; }
  .mp-pitch-text small { font-size: 11.5px; }
  .mp-info-row b { font-size: 14px; }
  .mp-info-row small { font-size: 12.5px; }
  .mp-info-ico { width: 34px; height: 34px; }
  .mp-cta { min-height: 52px; }
  .member-sheet .sheet-foot { padding-top: 14px; }
  .mp-save { font-size: 12.5px; }
  .faq-q { font-size: 15px; }
  .faq-a p { font-size: 14px; padding-right: 20px; }
}
/* The sheet's parts come up one after the other when it opens. */
@keyframes mp-in { from { transform: translateY(14px); opacity: 0; } }
.member-sheet .mp-hero, .member-sheet .mp-toggle, .member-sheet .mp-pitch, .member-sheet .mp-cards, .member-sheet .mp-box { animation: mp-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.member-sheet .mp-toggle { animation-delay: .05s; }
.member-sheet .mp-pitch { animation-delay: .1s; }
.member-sheet .mp-cards { animation-delay: .15s; }
.member-sheet .mp-box { animation-delay: .22s; }
.modal-back.back .member-sheet :is(.mp-hero, .mp-toggle, .mp-pitch, .mp-cards, .mp-box) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .member-sheet *, .member-sheet *::before, .member-sheet *::after { animation: none !important; }
  .mp-card.on { transform: none; }
}

/* ---------- template detail card ----------
   Generate stays on the card's lower edge while the rest scrolls, so on a
   short phone (an SE in Safari has 548px) it is never below the fold. */
.sheet.gen-card .sheet-body { padding: 18px 14px 0; }
.sheet.gen-card .gen-actions {
  position: sticky; bottom: 0; z-index: 4; margin: 2px -14px 0; padding: 12px 14px 16px;
  background: linear-gradient(180deg, rgba(21,17,19,0), var(--surface) 12px);
}
.sheet.gen-card .gen-info { margin-bottom: 16px; }
/* A sheet with a box to write in (Talk, Custom Prompt) on a phone: the
   photo, the preview, the text and Generate all on screen at once. The photo
   and preview row takes what the screen's height leaves (150–236px; less
   room again for Custom Prompt's length slider and presets); the photo's box
   is as tall as the preview whatever the template's shape; the text box is
   two rows, its chips (Inspire me, presets) under them. */
.sheet.gen-card.prompted { --talk-media: clamp(150px, calc(100dvh - 420px), 236px); }
.sheet.gen-card.prompted:has(.length-row) { --talk-media: clamp(132px, calc(100dvh - 470px), 236px); }
.sheet.gen-card.prompted:has(.length-row):has(.preset-chip:not(.inspire-chip)) { --talk-media: clamp(120px, calc(100dvh - 510px), 236px); }
.gen-card.prompted .gen-right { min-height: var(--talk-media); }
.gen-card.prompted .gen-upload.tall { aspect-ratio: auto; min-height: 0; }
.gen-card.prompted .preset-row { padding: 0 8px 8px; }
.gen-card.prompted .preset-chip { height: 30px; padding: 0 10px; font-size: 13px; }
@media (max-height: 600px) { .sheet.gen-card .length-row { margin-top: 6px; } }
/* a short screen: the name on one line */
@media (max-height: 720px) {
  .sheet.gen-card .gen-head h2 { -webkit-line-clamp: 1; }
  .sheet.gen-card .gen-head { margin-bottom: 10px; }
}
/* a very short one (an SE in Safari): a little less air everywhere */
@media (max-height: 600px) {
  .sheet.gen-card .sheet-body { padding-top: 12px; }
  .sheet.gen-card .gen-head { margin-bottom: 8px; }
  .sheet.gen-card .gen-by { margin-bottom: 10px; }
  .sheet.gen-card .addon-row { min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
  .sheet.gen-card .gen-addons { margin-top: 8px; }
  .sheet.gen-card .gen-prompt { margin-top: 8px; }
  .sheet.gen-card .gen-actions { margin-top: 8px; padding: 10px 14px 12px; }
  .sheet.gen-card .gen-btn { min-height: 52px; }
}

/* a creation opened from Collection: the result fills the rest of the page */
.sheet.result-sheet { --page: 760px; }
.sheet.result-sheet .sheet-body { display: flex; flex-direction: column; }
.sheet.result-sheet .sheet-body > * { flex-shrink: 0; }
.result-view { position: relative; flex: 1 1 auto; min-height: 360px; margin-top: 4px; border-radius: 16px; overflow: hidden; background: #000; }
.result-view > .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.result-view.removed > .media { object-fit: cover; filter: blur(16px) brightness(.4); transform: scale(1.1); }
/* a failed generation, on its page: bigger, and centred above the bottom buttons */
.result-view.failed .gen-loading-body { bottom: 76px; }
.result-view.failed .fail-mark { width: 76px; height: 76px; }
.result-view.failed .gen-loading b { font-size: 26px; }
.result-view.failed .gen-loading p { max-width: 300px; font-size: 16px; }
.result-view.failed .gen-loading p.fail-why { font-size: 13px; }
.result-view.working .candy-mark { width: 96px; }
.result-view.working .gen-loading b { font-size: 22px; }
.result-view.working .gen-loading p { max-width: 280px; font-size: 15px; }
.rv-fail { position: absolute; inset: 0 0 76px; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; }
.rv-fail b { font-size: 18px; }
.rv-fail p { margin: 0; color: rgba(255,255,255,.75); font-size: 14px; }
.rv-tools { position: absolute; z-index: 3; right: 10px; bottom: 74px; display: flex; flex-direction: column; gap: 12px; }
.rv-btn {
  width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.12);
  display: grid; place-items: center; color: #fff; background: rgba(66,62,64,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color .15s, transform .12s;
}
.rv-btn .ico { width: 26px; height: 26px; }
.rv-btn:active { transform: scale(.92); }
.rv-btn.on { background: rgba(240,79,158,.85); border-color: transparent; }
.rv-trash { position: absolute; z-index: 3; left: 10px; bottom: 74px; }
.rv-regen {
  position: absolute; z-index: 3; left: 8px; right: 8px; bottom: 8px; height: 56px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-size: 17px; font-weight: 700;
  background: rgba(58,54,56,.62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.rv-regen .gen-cost { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.rv-regen .ico { width: 18px; height: 18px; }
.rv-note { margin: 10px 0 0; }
/* A finished free video (modals.js creationModal): Make Another, the plans' way in. */
.rv-regen.rv-next, .rv-regen.rv-another { border-color: transparent; background: linear-gradient(135deg, #f04f9e, #ff7a59); box-shadow: 0 10px 24px -12px rgba(240,79,158,.9); }
.rv-next-note { margin: 10px 4px 0; font-size: 13.5px; line-height: 1.4; text-align: center; color: var(--muted); }
.rv-next-note b { color: #fff; font-weight: 600; }
/* A free trial's download, for members: the button with a small lock. */
.rv-btn.locked { position: relative; }
.rv-lock { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #e9408f; color: #fff; box-shadow: 0 0 0 2px #151214; }
.rv-lock svg { width: 11px; height: 11px; }
/* After a finished video: keep going (download, extend, the photo in more scenes). */
/* A sheet opened before the sheets have loaded (main.js modalHtml): its backdrop and a spinner. */
.modal-back.sheet-wait { display: grid; place-items: center; }
.rv-more { margin: 14px 2px 0; }
.rv-more-title { margin: 0 2px 8px; font-size: 14px; font-weight: 700; color: #fff; }
.rv-more-title + .rv-acts, .rv-more-title + .rv-nexts { margin-bottom: 14px; }
.rv-more-title + .rv-acts { margin-top: 12px; }
.rv-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rv-acts.one { grid-template-columns: 1fr; }
.rv-act {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 12px; border-radius: 16px; text-align: left; text-decoration: none;
  border: 1px solid rgba(255,255,255,.1); background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); color: #fff;
}
.rv-act:active { transform: scale(.98); }
.rv-act > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-act b { font-size: 14.5px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.rv-act small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-act-ico { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 11px; color: #ff8ec3; background: rgba(255,125,183,.14); }
.rv-act-lock {
  position: absolute; top: -8px; right: 8px; display: inline-flex; flex-direction: row; line-height: 1; font-style: normal; white-space: nowrap; align-items: center; gap: 3px; padding: 2px 7px 2px 6px; border-radius: 999px;
  background: linear-gradient(90deg, #e9408f, #ff7db7); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; box-shadow: 0 4px 10px rgba(233,64,143,.35);
}
.rv-act-lock svg { flex: none; display: block; width: 10px; height: 10px; }
/* The two next (modals.js nextFor): the template's cover with the user's photo on it, what kind, its name, its price. */
.rv-nexts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rv-next { display: flex; gap: 9px; align-items: stretch; min-width: 0; padding: 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.05); color: #fff; text-align: left; }
.rv-next:active { background: rgba(255,255,255,.09); }
.rv-next-pic { position: relative; flex: none; width: 58px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 11px; background: #1d1a1c; }
.rv-next-pic > img:first-child { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rv-next-me { position: absolute; z-index: 1; left: 4px; bottom: 4px; width: 24px; height: 24px; object-fit: cover; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.rv-next-txt { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; }
.rv-next-txt small { color: var(--pink-2); font-size: 11px; font-weight: 700; line-height: 1.2; }
.rv-next-txt b { font-size: 12.5px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rv-next-cost { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 4px; font-style: normal; font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,.85); }
.rv-next-cost .diamond { width: 12px; height: 12px; }
.rv-next-cost em { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-weight: 600; color: rgba(255,255,255,.6); }
.rv-next-cost em svg { width: 10px; height: 10px; }
/* Extend Video from a finished video of theirs: that video in the box. */
.gen-upload.extend-from { aspect-ratio: 9 / 16; }
.gen-upload.extend-from .upload-note { top: auto; bottom: 8px; }
/* Not enough diamonds on the packs sheet: how many more, then what it costs and what they have. */
.wall-note.short { text-align: center; }
.wall-note.short .diamond { vertical-align: -2px; }
.wall-note.short small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
/* After "Doesn't match my photo": what photo works, beside a face in a frame. */
.rv-photo-tip {
  display: flex; align-items: center; gap: 12px; margin: 12px 2px 0; padding: 12px 14px;
  border-radius: 16px; border: 1px solid rgba(255,125,183,.28); background: linear-gradient(135deg, rgba(233,64,143,.16), rgba(255,255,255,.04));
}
.rv-photo-tip p { margin: 0; font-size: 13.5px; line-height: 1.45; color: #e9e1e4; }
.rv-photo-tip b { display: block; margin-bottom: 2px; color: #fff; font-size: 14.5px; font-weight: 700; }
.rv-tip-ico { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 12px; color: #ff8ec3; background: rgba(255,125,183,.14); }
.rv-another .rv-ico { width: 19px; height: 19px; margin-right: 7px; vertical-align: -4px; }

/* confirmations (delete, log out, queue, photo rejected): centred in their card or page */
.sheet.confirm-sheet .sheet-body { display: flex; flex-direction: column; }
.confirm { width: 100%; max-width: 360px; margin: auto; padding: 20px 4px 4px; text-align: center; }
.sheet.full .confirm { padding-block: 24px; }
.alert-ico { display: block; width: 56px; height: 56px; margin: 0 auto 14px; color: #f0875c; }
.confirm .reject-icon { margin: 0 auto 14px; }
.confirm h2 { margin: 0 0 12px; font-size: 20px; }
.confirm p { margin: 0 0 22px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.confirm p.confirm-note { margin-top: -14px; font-size: 13px; }
/* Delete Account: what goes with it (the membership left, the diamonds). */
[data-key='modal-delete'] .confirm p.confirm-note { color: #ff8a9c; font-weight: 600; }
.danger-btn, .soft-btn, .confirm-btn { display: block; width: 100%; min-height: 52px; border: 0; border-radius: 12px; color: #fff; font-size: 16px; font-weight: 700; }
.danger-btn { background: #e2586a; }
.confirm-btn { background: var(--cta); }
.soft-btn { background: #2a2729; margin-top: 10px; }

/* what went wrong */
.reason-list { margin-top: 4px; }
.reason-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; font-size: 16px; color: #ddd6da; cursor: pointer; }
.reason-row input {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 24px; height: 24px; margin: 0; border-radius: 6px;
  border: 1.5px solid rgba(255,255,255,.32); background: transparent; transition: background-color .12s, border-color .12s;
}
.reason-row input:checked { border-color: var(--pink); background: var(--pink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / 16px; }
.details-wrap { position: relative; margin-top: 12px; }
.details-wrap textarea { min-height: 120px; padding-bottom: 30px; resize: none; }
.details-count { position: absolute; right: 14px; bottom: 12px; font-size: 13px; color: var(--muted); pointer-events: none; }
.dislike-foot { width: 100%; }
.dislike-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dislike-actions .soft-btn { margin: 0; }
.dislike-actions .cta-btn { min-height: 52px; border-radius: 12px; box-shadow: none; }
.support-link { display: block; margin-top: 14px; text-align: center; color: var(--muted); font-size: 14px; text-decoration: underline; }
.gen-head { display: flex; align-items: center; gap: 4px; }
.gen-head h2 {
  flex: 1; min-width: 0; margin: 0 0 0 4px; font-size: 21px; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;
}
.plain-icon { width: 40px; height: 40px; border: 0; padding: 0; background: none; color: #fff; display: grid; place-items: center; }
.plain-icon .ico { width: 24px; height: 24px; }
.plain-icon.fav-on { color: var(--pink); }
.gen-head { margin-bottom: 12px; }
/* who made it: their avatar and name, to their page */
/* …and the categories: one row, sliding sideways when they don't fit */
.gen-by { display: flex; align-items: center; gap: 6px; margin: -4px -14px 12px 0; padding: 0 14px 0 2px; overflow-x: auto; scrollbar-width: none; }
.gen-by::-webkit-scrollbar { display: none; }
.gen-by > * { flex: 0 0 auto; }
.gen-by .creator-pill { max-width: 62%; }
.gen-by.more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.gen-by.more-left { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 36px), transparent); }
.gen-by.more-left.more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.gen-by .sep { margin: 0 2px; }
.gen-tag {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 11px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.13); color: #bdb3b8; font-size: 13.5px; font-weight: 600;
}
.creator-pill {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; height: 32px; padding: 0 8px 0 4px; border-radius: 999px;
  border: 1px solid rgba(240,79,158,.38); background: rgba(240,79,158,.08); color: var(--pink-2); font-size: 14px; font-weight: 700;
}
.creator-pill img { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(240,79,158,.5); }
.creator-pill span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-pill .ico { width: 15px; height: 15px; flex: 0 0 auto; margin-left: -3px; }
.sep { color: var(--muted); }
.wall-note { margin: 4px 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(240,79,158,.1); border: 1px solid rgba(240,79,158,.3); font-size: 14px; line-height: 1.45; }
.wall-note.center { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; text-align: center; }
.wall-note .diamond { width: 15px; height: 15px; }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 10px; border-radius: 14px; background: #151315; }
.mode-tabs button { min-height: 40px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-weight: 600; font-size: 14.5px; }
.mode-tabs button.on { background: #2e2c2e; color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 2px 6px rgba(0,0,0,.35); }
.gen-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.gen-left { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gen-upload { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--surface-2); border: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.gen-upload .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gen-upload.filled { border-color: var(--pink); }
.upload-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; padding-bottom: 46px; color: var(--muted); }
.upload-empty .ico { width: 34px; height: 34px; }
.upload-pill {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); max-width: calc(100% - 16px); height: 36px; padding: 0 14px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px; white-space: nowrap;
  background: rgba(22,21,22,.78); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.upload-pill span { overflow: hidden; text-overflow: ellipsis; }
.upload-pill .ico { width: 18px; height: 18px; flex: 0 0 auto; }
/* the example photo's note, e.g. how many people should be in it */
.upload-note {
  position: absolute; z-index: 2; left: 8px; top: 8px; max-width: calc(100% - 16px); padding: 3px 9px; border-radius: 999px; pointer-events: none;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* fixed promo tag on the 60 s drama button; the price itself is not discounted */
.off-tag {
  position: absolute; top: -9px; right: 12px; padding: 3px 9px; border-radius: 999px;
  background: linear-gradient(90deg, #ffe08a, #f2a93b); color: #3a2105; box-shadow: 0 2px 8px rgba(0,0,0,.35);
  font-size: 11px; font-weight: 800; font-style: italic; line-height: 1.2;
}
.fs-btn {
  position: absolute; z-index: 3; right: 6px; bottom: 6px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(38,36,37,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.fs-btn .ico { width: 17px; height: 17px; }
.fs-btn::before { content: ""; position: absolute; inset: -6px; }
.addon-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 50px; padding: 6px 10px 6px 14px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: none; text-align: left; font-size: 15px;
}
/* name, then the price on its own line, so the price always shows */
.addon-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.addon-text b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addon-row small { color: var(--muted); font-size: 12px; }
.addon-row .radio { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); }
.addon-row.on { border-color: rgba(240,79,158,.6); }
/* An add-on the user's level can't have: a small crown where the radio goes,
   and after the price the level it needs in that metal (gold for Pro), so the
   name keeps its room. A faint sheen of the same colour on the row. */
.addon-need { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.addon-need::before { content: "·"; margin: 0 6px 0 5px; letter-spacing: 0; color: rgba(255,255,255,.28); }
.addon-need.basic { background: linear-gradient(180deg, #cfe0ff, #4f86e8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.addon-need.pro { background: linear-gradient(180deg, #ffd3ea, #e2559c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.addon-need.max { background: var(--t-max); -webkit-background-clip: text; background-clip: text; color: transparent; }
.addon-crown { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; }
.addon-crown svg { width: 19px; height: 19px; }
.addon-crown.basic svg { filter: drop-shadow(0 0 5px rgba(90,140,255,.38)); }
.addon-crown.pro svg { filter: drop-shadow(0 0 5px rgba(240,79,158,.35)); }
.addon-crown.max svg { filter: drop-shadow(0 0 5px rgba(170,220,240,.38)); }
.addon-row.locked { border-color: rgba(240,79,158,.18); background: linear-gradient(135deg, rgba(240,79,158,.07), rgba(240,79,158,0) 55%); }
.addon-row.on .radio { border-color: var(--pink); background: radial-gradient(circle, #fff 0 3.5px, var(--pink) 4.5px); }
.gen-right { position: relative; min-height: 220px; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,.08); }
.gen-right .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gen-length {
  position: absolute; z-index: 3; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 7px; border-radius: 999px;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.gen-length .ico { width: 11px; height: 11px; }
.gen-arrow { position: absolute; z-index: 2; left: calc(50% - 26px); top: 46%; width: 44px; height: 36px; color: var(--pink); filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); pointer-events: none; }
.gen-prompt { margin-top: 12px; }
/* the text and, under it, its preset chips (Custom Prompt) or Inspire me (Talk), in one box */
.prompt-box { border-radius: 14px; border: 1px solid var(--line); background: var(--input); }
.prompt-box:focus-within { border-color: rgba(240,79,158,.55); }
.prompt-box .text-input { margin: 0; border: 0; background: none; box-shadow: none; resize: none; }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 10px; }
.preset-chip {
  min-width: 38px; height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04); color: #e8e2e5; font-size: 13.5px; font-weight: 600;
}
.preset-chip.on { border-color: rgba(240,79,158,.7); background: rgba(240,79,158,.14); color: var(--pink-2); }
.inspire-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--pink-2); border-color: rgba(240,79,158,.35); }
.inspire-chip .ico { width: 15px; height: 15px; }
/* Custom Prompt: the length slider; the price on Generate follows it */
.length-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 0 2px; }
.length-label { font-size: 14px; font-weight: 600; color: #d9d1d4; }
.length-value { min-width: 34px; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.length-range { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 32px; margin: 0; background: transparent; }
.length-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--pink) 0 var(--fill, 0%), #3a3538 var(--fill, 0%)); }
.length-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45), 0 0 0 4px rgba(240,79,158,.25); }
.length-range::-moz-range-track { height: 6px; border-radius: 999px; background: #3a3538; }
.length-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--pink); }
.length-range::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; }
.gen-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.gen-btn {
  position: relative; flex: 1; min-height: 58px; border: 0; border-radius: 14px; color: #fff;
  background: linear-gradient(100deg, #ff3f95, #f2559f 55%, #ff80b3);
  box-shadow: 0 10px 24px -10px rgba(242,85,159,.8), inset 0 1px 0 rgba(255,255,255,.22);
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-size: 18px; font-weight: 700;
}
/* a light sweep across Generate every few seconds, only while it waits for a tap */
.gen-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.26) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0; animation: cta-shine 4.2s ease-in-out 1.2s infinite;
}
.gen-btn:disabled::after, .gen-btn.uploading::after, .gen-btn.done::after { display: none; }
@keyframes cta-shine { 0% { background-position: 130% 0; } 32%, 100% { background-position: -30% 0; } }
@media (prefers-reduced-motion: reduce) { .gen-btn::after { display: none; } }
.gen-btn:disabled { opacity: .6; }
.gen-btn:active:not(:disabled) { transform: scale(.985); }
.gen-cost { display: inline-flex; align-items: center; gap: 6px; }
.gen-btn .spinner.sm { border-top-color: #fff; margin-right: 2px; }
.gen-btn .secs { font-variant-numeric: tabular-nums; opacity: .85; font-weight: 700; }
.reject-icon { width: 56px; height: 56px; margin: 6px auto 4px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,107,107,.15); color: var(--danger); }
.reject-icon .ico { width: 28px; height: 28px; stroke-width: 2.5; }
.reject-icon.political { background: rgba(245,205,85,.15); color: var(--gold); }
.gen-cost .ico { width: 20px; height: 20px; }
/* price details: a quiet square beside Generate, the same height and corners */
.info-btn {
  width: 58px; height: 58px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.09); background: linear-gradient(180deg, #2b282a, #211f20); color: #d9d1d4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.info-btn .ico { width: 23px; height: 23px; }
.info-btn.on { border-color: rgba(240,79,158,.45); background: rgba(240,79,158,.1); color: var(--pink-2); }
/* Generate Tips (the (i) beside Generate): what to do for a good result, with
   the Undress add-on shown as the off -> on pill the upload box uses. */
.sheet.tips-sheet .sheet-head { margin-bottom: 2px; }
.sheet.tips-sheet .sheet-head h2 { font-size: 21px; font-weight: 800; }
.tips-title { margin: 10px 0 14px; font-size: 17px; font-weight: 700; color: #fff; }
.tips-list { display: grid; gap: 15px; margin: 0 0 16px; padding: 0; list-style: none; }
.tips-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; color: #ebe3e6; }
.tips-list li.tips-demo-row { display: block; }
.tips-tick { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 2px; color: var(--pink); }
.tips-demo {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.04);
}
.tips-chip {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 46px; padding: 0 12px; border-radius: 11px;
  border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.03);
  color: #8d8387; font-size: 14.5px;
}
.tips-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tips-chip.on { border-color: rgba(240,79,158,.65); background: rgba(240,79,158,.09); color: var(--pink-2); font-weight: 600; }
.tips-ring { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; border: 1.6px solid currentColor; }
.tips-ring svg { width: 12px; height: 12px; }
.tips-chip.on .tips-ring { background: var(--pink); border-color: var(--pink); color: #fff; }
.tips-arrow { flex: 0 0 auto; width: 20px; height: 20px; color: #9a9095; }
.tips-note { margin: 0 0 12px; text-align: center; font-size: 12px; line-height: 1.4; color: var(--muted); }
.tips-note b { color: #d9d1d4; }
.tips-note .diamond { width: 12px; height: 12px; vertical-align: -2px; }
.tips-ok {
  width: 100%; height: 54px; border: 0; border-radius: 13px;
  background: rgba(240,79,158,.16); color: var(--pink); font-size: 16.5px; font-weight: 800;
  transition: background-color .15s, transform .12s;
}
.tips-ok:hover { background: rgba(240,79,158,.24); }
.tips-ok:active { transform: scale(.99); }
.gen-info { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #151415; font-size: 14px; }
.gen-info p { margin: 0 0 10px; color: #d9d1d4; line-height: 1.45; }
.gen-info .line { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); }
.gen-info .line.total { color: var(--text); font-weight: 800; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.gen-info .line.total span:last-child { display: inline-flex; align-items: center; gap: 4px; }
.gen-info .muted.small { margin: 8px 0 0; }

.upload-wrap { position: relative; }
/* one photo's 3:4 box for a wider template: as tall as the preview beside it */
.gen-left:has(> .upload-wrap > .gen-upload.tall) > .upload-wrap { flex: 1; display: flex; flex-direction: column; }
.gen-upload.tall { flex: 1; }
/* the chosen photo inside a framed box can be dragged to choose the crop */
/* picked photo: remove (top left) and crop (top right) */
.box-tool {
  position: absolute; z-index: 3; top: 8px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(20,18,19,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.box-tool .ico { width: 18px; height: 18px; }
.box-tool::before { content: ""; position: absolute; inset: -6px; }
.box-tool.trash { left: 8px; }
.box-tool.crop { right: 8px; }
/* The one-time crop tip (actions.js showCropTip): the crop button glows and a
   small note hangs under it, then both fade by themselves. Nothing waits on it. */
.box-tool.crop.hint { background: #ef5fa7; animation: crop-glow 1.5s ease-out 3; }
@keyframes crop-glow { 0% { box-shadow: 0 0 0 0 rgba(239,95,167,.75); } 100% { box-shadow: 0 0 0 12px rgba(239,95,167,0); } }
.crop-tip {
  position: absolute; z-index: 4; top: 50px; right: 6px; max-width: min(176px, calc(100% - 12px)); padding: 7px 10px; border: 0; border-radius: 12px;
  background: rgba(24,20,22,.92); box-shadow: 0 0 0 1px rgba(239,95,167,.55), 0 8px 20px rgba(0,0,0,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.3; text-align: left;
  animation: crop-tip 6s ease forwards; pointer-events: auto;
}
/* its arrow, pointing up at the crop button */
.crop-tip::before { content: ""; position: absolute; top: -5px; right: 14px; width: 10px; height: 10px; transform: rotate(45deg); background: rgba(24,20,22,.92); box-shadow: -1px -1px 0 rgba(239,95,167,.55); }
@keyframes crop-tip { 0% { opacity: 0; transform: translateY(-4px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .box-tool.crop.hint { animation: none; } .crop-tip { animation: none; } }

/* a crop of another shape than its box: shown whole, over a blurred copy of itself */
.gen-upload img.media.whole { object-fit: contain; background: none; }

/* The photo editor (photo-edit.js), full screen: a frame that stays put and
   the photo moving under it. MyTok's is a circle (like setting a profile
   picture); a template's a rectangle in its shape, with corner marks. */
.pe {
  position: relative; display: flex; flex-direction: column; width: min(100%, 520px); height: 100%;
  padding-top: var(--safe-top); background: #0b090a; animation: push .24s var(--ease-out);
}
/* on a phone the editor covers the page entirely */
@media (max-width: 767px) { .modal-back.pe-back { background: #050405; } }
@media (min-width: 768px) { .pe { height: min(100% - 48px, 860px); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); } }
.pe-top { flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; min-height: 62px; padding: 6px 12px; }
.pe-heading { text-align: center; min-width: 0; }
.pe-heading h2 { margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; }
.pe-heading p { margin: 2px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.pe-btn {
  justify-self: start; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 12px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, transform .12s;
}
.pe-btn:first-child { padding: 0; }
.pe-btn:active { transform: scale(.94); background: rgba(255,255,255,.18); }
.pe-btn .ico { width: 18px; height: 18px; }
.pe-change { justify-self: end; }
.pe-stage {
  position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #050405;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; outline: none;
}
.pe-stage.dragging { cursor: grabbing; }
.pe-pan { position: absolute; inset: 0; pointer-events: none; }
/* until the first touch, the photo shows it moves: a small nudge, twice,
   only where there is photo beyond the frame (photo-edit.js sets data-nudge) */
.pe-stage:not(.touched)[data-nudge="xy"] .pe-pan { animation: pe-nudge-xy 1.6s var(--ease-out) .5s 2; }
.pe-stage:not(.touched)[data-nudge="x"] .pe-pan { animation: pe-nudge-x 1.6s var(--ease-out) .5s 2; }
.pe-stage:not(.touched)[data-nudge="y"] .pe-pan { animation: pe-nudge-y 1.6s var(--ease-out) .5s 2; }
@keyframes pe-nudge-xy { 0%, 100% { transform: none; } 25% { transform: translate(10px, -8px); } 60% { transform: translate(-8px, 6px); } }
@keyframes pe-nudge-x { 0%, 100% { transform: none; } 25% { transform: translateX(10px); } 60% { transform: translateX(-8px); } }
@keyframes pe-nudge-y { 0%, 100% { transform: none; } 25% { transform: translateY(-8px); } 60% { transform: translateY(6px); } }
.pe-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; -webkit-user-drag: none; will-change: transform; }
/* the frame: what is kept; the rest of the photo dimmed around it */
.pe-frame { position: absolute; pointer-events: none; box-shadow: 0 0 0 1.5px rgba(255,255,255,.9), 0 0 0 9999px rgba(5,4,5,.58); }
.pe-frame.round { overflow: hidden; border-radius: 50%; box-shadow: 0 0 0 2.5px #fff, 0 0 0 9999px rgba(5,4,5,.58); }
/* the tapped face's picture, standing in until the photo is decoded */
.pe-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pe-stage.dragging .pe-frame { box-shadow: 0 0 0 1.5px rgba(255,255,255,.9), 0 0 0 9999px rgba(5,4,5,.4); }
.pe-stage.dragging .pe-frame.round { box-shadow: 0 0 0 2.5px #fff, 0 0 0 9999px rgba(5,4,5,.4); }
/* a template's crop box on the whole photo: a dashed edge, a handle on each
   corner to resize it (a larger touch area round each), the photo outside it
   dimmed; the corners pulse until the first touch */
.pe-stage.boxed { cursor: move; }
.pe-frame.rect { outline: 1.5px dashed rgba(255,255,255,.95); outline-offset: -1px; box-shadow: 0 0 0 9999px rgba(5,4,5,.62); }
.pe-stage.dragging .pe-frame.rect { box-shadow: 0 0 0 9999px rgba(5,4,5,.45); }
.pe-frame.rect .pe-grid { overflow: hidden; }
.pe-corner { position: absolute; width: 24px; height: 24px; border: 2px solid #fff; border-radius: 7px; background: rgba(10,8,10,.35); box-shadow: 0 1px 6px rgba(0,0,0,.45); pointer-events: auto; touch-action: none; cursor: nwse-resize; }
.pe-corner::before { content: ""; position: absolute; inset: -12px; }
.pe-corner.tl { left: -12px; top: -12px; }
.pe-corner.tr { right: -12px; top: -12px; cursor: nesw-resize; }
.pe-corner.bl { left: -12px; bottom: -12px; cursor: nesw-resize; }
.pe-corner.br { right: -12px; bottom: -12px; }
.pe-stage:not(.touched) .pe-corner { animation: pe-corner 1.4s ease-in-out .5s 3; }
@keyframes pe-corner { 50% { transform: scale(1.25); background: rgba(240,79,158,.55); } }
.pe-grid {
  position: absolute; inset: 0; opacity: 0; transition: opacity .2s ease;
  background:
    linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.5) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.5) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
    linear-gradient(180deg, transparent calc(33.33% - .5px), rgba(255,255,255,.5) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.5) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px));
}
.pe-stage.dragging .pe-grid { opacity: 1; }
.pe-anim .pe-img { transition: transform .25s var(--ease-out), width .25s var(--ease-out), height .25s var(--ease-out); }
.pe-anim .pe-frame { transition: left .25s var(--ease-out), top .25s var(--ease-out), width .25s var(--ease-out), height .25s var(--ease-out); }
/* the how-to, under the frame: a hand showing the drag, until the first touch */
.pe-hint {
  position: absolute; left: 50%; margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; transform: translateX(-50%);
  border-radius: 999px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; pointer-events: none; transition: opacity .3s ease;
}
/* a photo just picked, being made ready */
.pe-stage.pe-opening { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 14px; cursor: default; }
.pe-stage.pe-opening p { margin: 0; }
.upload-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11,10,11,.6); }
/* a picked video on its way up (modals.js videoStatus), over its box above Change */
.up-status {
  position: absolute; z-index: 3; left: 8px; right: 8px; bottom: 54px; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; padding: 5px 10px; border-radius: 12px; overflow: hidden; pointer-events: none;
  background: rgba(16,14,16,.74); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 12.5px; font-weight: 700;
}
.up-status .spinner.sm { width: 14px; height: 14px; flex: none; }
.up-status:has(.up-bar)::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.16); }
.up-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: linear-gradient(90deg, #ff3f95, #ff80b3); box-shadow: 0 0 6px rgba(255,63,149,.7); transition: width .2s ease; }
.up-status.ok { color: #7ee2a8; }
.up-status.ok .tick { width: 15px; height: 15px; flex: none; }
.up-status.bad { justify-content: space-between; padding-right: 5px; color: #ff9aa9; white-space: nowrap; pointer-events: auto; }
.up-retry { position: relative; flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #111; }
.up-retry .ico { width: 16px; height: 16px; }
.up-retry::before { content: ""; position: absolute; inset: -8px; }
.pe-hint .pe-hand { width: 20px; height: 20px; animation: pe-hand 1.6s ease-in-out infinite; }
@keyframes pe-hand { 0%, 100% { transform: translate(-3px, 0) rotate(-8deg); } 50% { transform: translate(5px, -2px) rotate(6deg); } }
.pe-stage.touched .pe-hint { opacity: 0; }
/* a template's shapes: four in one segmented row, each with an outline of its shape */
.pe-shapes { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 12px 16px 0; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.07); }
.pe-shapes button {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 38px; padding: 0 4px; border: 0; border-radius: 10px;
  background: transparent; color: #d6cdd1; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; transition: background .18s, color .18s;
}
.pe-shapes button.on { background: #fff; color: #0b090a; }
@media (max-width: 360px) { .pe-shapes .pe-shape { display: none; } }
.pe-shape { flex: none; width: 11px; height: 15px; border: 1.6px solid currentColor; border-radius: 2.5px; }
.pe-shape.s-original { width: 14px; height: 14px; border-style: dashed; }
.pe-shape.s-9-16 { width: 9px; height: 16px; }
.pe-shape.s-1-1 { width: 13px; height: 13px; }
.pe-shape.s-4-3 { width: 15px; height: 11px; }
.pe-shape.s-16-9 { width: 16px; height: 9px; }
.pe-zoom { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; margin: 10px 12px 0; color: var(--muted); }
.pe-step { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #d6cdd1; cursor: pointer; }
.pe-step:active { background: rgba(255,255,255,.1); }
.pe-step:disabled { opacity: .35; }
.pe-step .ico { width: 22px; height: 22px; }
#pe-zoom { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 40px; margin: 0; background: transparent; }
#pe-zoom::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--pink) 0 var(--fill, 0%), rgba(255,255,255,.18) var(--fill, 0%)); }
#pe-zoom::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
#pe-zoom::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(255,255,255,.18); }
#pe-zoom::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--pink); }
#pe-zoom::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; }
.pe-foot { flex: 0 0 auto; padding: 10px 16px calc(12px + var(--safe-bottom)); }
.pe-use {
  width: 100%; height: 52px; border: 0; border-radius: 999px; background: var(--cta); color: #fff; font-size: 17px; font-weight: 700;
  box-shadow: 0 10px 26px rgba(240,79,158,.35); transition: transform .12s, opacity .15s;
}
.pe-use:active { transform: scale(.98); }
.pe-use:disabled { opacity: .7; }
@media (max-height: 640px) {
  .pe-top { min-height: 56px; }
  .pe-zoom { margin-top: 4px; }
  .pe-use { height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .pe-stage .pe-pan, .pe-hint .pe-hand, .pe-corner { animation: none; } }
.gen-upload.square { aspect-ratio: 1 / 1; }
.gen-upload.square .upload-pill, .gen-upload.pair .upload-pill { height: 32px; padding: 0 12px; font-size: 13px; bottom: 8px; }
.upload-empty { flex-direction: column; gap: 6px; }
.upload-empty small { font-size: 12.5px; }
.gen-upload.square .upload-empty, .gen-upload.pair .upload-empty { padding-bottom: 36px; }
/* two-photo boxes: the photo fills the box, kept on its upper part */
.gen-upload.pair .media { object-position: 50% 28%; }
.upload-pill.static { font-size: 12.5px; font-weight: 600; color: #d9d1d4; }
.extend-or { margin: 6px 0 0; }
.gen-grid.single { grid-template-columns: 1fr; }
.gen-grid.single .gen-right { aspect-ratio: 4 / 5; min-height: 0; }
/* A drama: fixed shapes, the same on every screen. The video is 9:16 (the
   shape of most dramas; a wider one shows whole over its blurred cover). One
   photo sits beside it in an equal 9:16 column; two photos stack in a
   narrower column (.87 : 1), so each comes out square. The user's photos show
   whole over a blurred copy; example photos fill their box. Width capped
   (centred), so a wide sheet doesn't make it tall. */
.gen-grid.drama { grid-template-columns: 1fr 1fr; gap: 8px; max-width: 420px; margin-inline: auto; }
.gen-grid.drama.pairs { grid-template-columns: .87fr 1fr; max-width: 400px; }
/* Three photos: the preview across the top, whole over its blurred cover; the three boxes in a row under it. */
.gen-grid.trio { grid-template-columns: 1fr; gap: 8px; }
.gen-grid.trio .gen-right { order: -1; width: 100%; min-width: 0; min-height: 0; aspect-ratio: 16 / 11; }
.gen-grid.trio .gen-left { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gen-upload.trio { aspect-ratio: 1 / 1; border-radius: 16px; }
.gen-upload.trio .media { object-position: 50% 18%; }
.gen-upload.trio .upload-pill { height: 30px; padding: 0 9px; gap: 4px; font-size: 12.5px; bottom: 7px; max-width: calc(100% - 10px); }
.gen-upload.trio .upload-pill .ico { width: 15px; height: 15px; }
.gen-upload.trio .upload-empty { padding-bottom: 34px; }
/* Narrow phones: the person's name alone on the button, so it never shortens to “Gir…”. */
@media (max-width: 370px) { .gen-upload.trio .upload-pill { padding: 0 10px; } .gen-upload.trio .upload-pill .ico { display: none; } }
.gen-grid.drama .gen-right { aspect-ratio: 9 / 16; min-height: 0; }
.gen-right.whole .media:not(.blur-fill) { object-fit: contain; }
.gen-grid.drama .gen-left { display: grid; grid-template-rows: minmax(0, 1fr); gap: 8px; min-height: 0; }
.gen-grid.drama.pairs .gen-left { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.gen-grid.drama .upload-wrap { min-height: 0; }
.gen-grid.drama .gen-upload { aspect-ratio: auto; height: 100%; }
.gen-grid.drama.pairs .gen-arrow { left: calc(46.5% - 22px); }
.blur-fill { filter: blur(18px) saturate(1.2) brightness(.55); transform: scale(1.2); }
/* add-ons get the card's full width (side by side when they fit), so names and prices show */
/* Side by side, down to the narrowest phone (two fit in 248px). */
.gen-addons { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin-top: 10px; }
/* Free Trial, no photo yet: what photo works, as four copies of the template's example. */
.photo-guide {
  margin-top: 12px; padding: 12px 12px 10px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,.09); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
}
.pg-head { display: flex; flex-direction: column; gap: 2px; margin: 0 2px 10px; }
.pg-head b { font-size: 14px; font-weight: 700; color: #fff; }
.pg-head span { font-size: 12.5px; color: var(--muted); }
.pg-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pg-tile { position: relative; margin: 0; text-align: center; }
.pg-pic { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 12px; background: #1d1a1c; border: 1.5px solid rgba(255,255,255,.1); }
.pg-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.pg-tile.good .pg-pic { border-color: #34d27b; box-shadow: 0 0 0 3px rgba(52,210,123,.16); }
/* Too far: the person small in the frame, over a blurred, dimmed copy. */
.pg-tile.far .pg-back { filter: blur(6px) brightness(.45); transform: scale(1.15); }
.pg-tile.far .pg-img { inset: auto; left: 50%; top: 56%; width: 40%; height: 40%; transform: translate(-50%, -50%); border-radius: 4px; }
.pg-tile.blur .pg-img { filter: blur(2.4px); transform: scale(1.06); }
.pg-tile.dark .pg-img { filter: brightness(.25) saturate(.7); }
.pg-mark {
  position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  color: #fff; background: #ef4f5f; box-shadow: 0 2px 8px rgba(0,0,0,.45), 0 0 0 2px #151214;
}
.pg-mark svg { width: 12px; height: 12px; }
.pg-tile.good .pg-mark { background: #22b866; }
.pg-tile figcaption { margin-top: 6px; font-size: 11.5px; font-weight: 600; line-height: 1.2; color: #cfc4c8; }
.pg-tile.good figcaption { color: #7fe3a9; }
/* Short screens (an app's browser, small iPhones; 2026-11-30, the user: "都想在
   矮屏上不用滑就看到"): with the photo guide, the whole template sheet fits
   (no author line, the photo and preview boxes shorter); with the keep-going
   panel, the whole result fits (the video takes what's left). */
@media (max-height: 900px) {
  .gen-card.guided .gen-by { display: none; }
  .gen-card.guided .gen-grid { height: min(31vh, 236px); }
  .gen-card.guided .gen-left, .gen-card.guided .gen-right { height: 100%; min-height: 0; }
  .gen-card.guided .upload-wrap { height: 100%; }
  /* (its shape is set on the element itself, from the template's frame) */
  .gen-card.guided .gen-upload { aspect-ratio: auto !important; height: 100%; }
  .gen-card.guided .photo-guide { margin-top: 8px; }
  .gen-card.guided .gen-addons { margin-top: 8px; }
  .sheet.result-sheet.has-more .result-view { min-height: 220px; }
  .has-more .rv-more { margin-top: 10px; }
  .has-more .rv-more-title { margin-bottom: 6px; font-size: 13.5px; }
  .has-more .rv-more-title + .rv-acts { margin-top: 10px; }
  .has-more .rv-more-title + .rv-acts, .has-more .rv-more-title + .rv-nexts { margin-bottom: 10px; }
  .has-more .rv-act { padding: 9px 10px; }
  .has-more .rv-act-ico { width: 30px; height: 30px; padding: 6px; }
  .has-more .rv-next-pic { width: 50px; }
  /* The video is shorter here: like, dislike and download in a row above the button, clear of the sound button. */
  .result-sheet.has-more .rv-tools { flex-direction: row; gap: 10px; }
}
/* A result's video not playing: one big play button over it. */
.rv-play {
  position: absolute; z-index: 2; left: 50%; top: 42%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 64px; height: 64px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.rv-play .ico { width: 28px; height: 28px; margin-left: 3px; }
/* Short screens (an app's browser, small iPhones): a slimmer guide, so it shows above Generate. */
@media (max-height: 900px) {
  .photo-guide { margin-top: 10px; padding: 10px 10px 8px; }
  .pg-head { flex-direction: row; align-items: baseline; gap: 6px; margin-bottom: 8px; }
  .pg-head span { display: none; }
  .pg-pic { aspect-ratio: 1; border-radius: 10px; }
  .pg-tile figcaption { margin-top: 4px; font-size: 11px; }
}
.per-sec .diamond { width: 14px; height: 14px; }

/* diamond packs */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sheet-head.centered { justify-content: center; position: relative; }
.sheet-head.centered h2 { flex: 0 1 auto; padding: 0 30px; text-align: center; font-size: 24px; white-space: normal; }
.sheet-head.centered .close { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: none; }
.sheet-head.centered .close .ico { width: 24px; height: 24px; }
.sub.center { text-align: center; }
/* ---------- diamond packs (modals.js packModal) ----------
   Four packs, two by two: the gems and how many on top, the price and what a
   video comes to below. The chosen one takes a pink rim. */
.packs-sheet::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 240px; pointer-events: none;
  background: radial-gradient(90% 70% at 50% -10%, rgba(126,200,255,.16), rgba(240,79,158,.06) 50%, transparent 78%);
}
.packs-sheet .sheet-body { position: relative; z-index: 1; }
.pk-perk { margin: 0 0 2px; text-align: center; color: rgba(255,255,255,.72); font-size: 15.5px; }
.pk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; margin: 18px 0 18px; }
.pk-card {
  position: relative; display: flex; flex-direction: column; padding: 0; border-radius: 20px; border: 1.5px solid rgba(255,255,255,.1); background: #262527;
  transition: transform .2s cubic-bezier(.3, 1.4, .5, 1), border-color .25s ease, box-shadow .3s ease, background-color .25s ease;
}
.pk-card:active { transform: scale(.97); }
.pk-top { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 6px 16px; border-radius: 19px 19px 50% 50% / 19px 19px 14px 14px; background: #1f1e20; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.pk-art { height: 44px; display: grid; place-items: center; }
.pk-art svg { height: 100%; width: auto; filter: drop-shadow(0 6px 10px rgba(170,190,255,.35)); }
.pk-amount { font-size: clamp(21px, 6.4vw, 27px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pk-bottom { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 12px 6px 14px; }
.pk-price { color: #eae6e8; font-size: clamp(17px, 5vw, 21px); font-weight: 700; font-variant-numeric: tabular-nums; }
.pk-per { color: rgba(255,255,255,.55); font-size: 14px; font-variant-numeric: tabular-nums; }
/* Popular / Best Value: a tab on the top right corner. */
.pk-tag { position: absolute; z-index: 1; top: -8px; right: -1.5px; padding: 3px 11px 4px; border-radius: 12px 12px 0 12px; color: #fff; font-size: 13.5px; font-weight: 800; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.pk-tag.popular { background: linear-gradient(180deg, #f472b3, #e2559c); }
.pk-tag.best { background: linear-gradient(180deg, #7fb0ff, #5a8fe8); }
.pk-card.on { border-color: var(--t-pro); background: #3a2330; box-shadow: 0 16px 32px -18px rgba(240,90,165,.8), 0 0 0 4px rgba(240,90,165,.09); transform: translateY(-2px); }
.pk-card.on .pk-top { background: #2e2029; }
.pk-card.on .pk-art svg { animation: pack-float 2.6s ease-in-out infinite; }
@keyframes pack-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.pk-buy-label { display: inline-block; animation: mp-rise .34s cubic-bezier(.3, 1.3, .5, 1) both; }
.packs-sheet .buy-btn { padding: 0 8px; font-size: clamp(12.5px, 4.3vw, 19px); white-space: nowrap; }
.packs-sheet .fine-print { color: rgba(255,255,255,.55); }
/* Buy and its line, pinned under the packs (modals.js packModal footer). */
.packs-sheet .sheet-foot { position: relative; z-index: 1; display: block; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(24,22,26,.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.packs-sheet .sheet-foot .fine-print { margin: 8px 0 0; text-align: center; }
.packs-sheet .pk-grid { margin-bottom: 6px; }
/* The label is always one line: it scales with the phone's width (smaller when it carries a bonus). */
.packs-sheet .buy-btn.long { font-size: clamp(11px, 4.1vw, 19px); }
@media (max-width: 359px) { .pk-per { font-size: 13px; } }
.buy-btn { position: relative; overflow: hidden; width: 100%; min-height: 56px; border: 0; border-radius: 16px; background: linear-gradient(180deg, #ff8fc2 0%, #f0589e 52%, #dc3f88 100%); color: #fff; font-size: 19px; font-weight: 800; box-shadow: 0 16px 32px -14px rgba(240,79,158,.8), inset 0 1px 0 rgba(255,255,255,.32), inset 0 0 0 1px rgba(255,170,208,.35); transition: transform .12s ease; }
.buy-btn:active:not(:disabled) { transform: scale(.985); }
.buy-btn:disabled { opacity: .6; }
.fine-print { margin: 14px 0 4px; text-align: center; color: #8f868a; font-size: 13.5px; line-height: 1.5; }
/* ---------- profile ---------- */
.profile-top { position: relative; padding: 64px 20px 18px; text-align: center; overflow: hidden; isolation: isolate; }
.hero-bg {
  position: absolute; inset: 0 0 auto; height: 240px; z-index: -1;
  background: radial-gradient(320px 180px at 20% 10%, rgba(240,79,158,.34), transparent 70%),
              radial-gradient(300px 200px at 85% 0%, rgba(150,70,200,.32), transparent 70%), #170d15;
  -webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent);
}
.hero-hearts { width: 100%; height: 100%; fill: rgba(255,120,190,.2); filter: blur(3px); }
.hero-btn {
  position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; padding: 0;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.25); color: #fff;
  display: grid; place-items: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero-btn.left { left: 14px; right: auto; }
.hero-btn .ico { width: 22px; height: 22px; }
.avatar-wrap { position: relative; width: 92px; margin: 0 auto 12px; }
.avatar-xl { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.9); background: var(--surface-2); }
.avatar-edit {
  position: absolute; right: -2px; bottom: 2px; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  border: 2px solid var(--bg); background: #2a2327; color: #fff; display: grid; place-items: center;
}
.avatar-edit .ico { width: 15px; height: 15px; }
.profile-name { margin: 0; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; font-size: 22px; }
.profile-bio { margin: 6px auto 0; max-width: 320px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.tier-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; flex: 0 0 auto;
  background: var(--cta); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .01em;
}
/* One colour per level: Free gray, Basic blue, Pro pink, Max iridescent. */
.tier-pill.free { background: #e4e4e8; color: #1c1c1e; }
.tier-pill.basic { background: linear-gradient(180deg, #74a7f8, #5a8fe8); color: #fff; }
.tier-pill.pro { background: var(--cta); color: #fff; }
.tier-pill.max { background: var(--t-max); color: #151515; }

/* Free accounts: neutral wallet with "View Plans" */
.wallet-card.free {
  background: radial-gradient(240px 140px at 12% 0%, rgba(255,255,255,.1), transparent 70%), linear-gradient(160deg, #2a2a2c, #151516);
  border-color: rgba(255,255,255,.16);
}
.plans-btn {
  min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; flex: 0 0 auto;
  background: linear-gradient(180deg, #ffffff, #e2e2e6); color: #111; font-size: 16px; font-weight: 700;
  box-shadow: 0 0 22px rgba(255,255,255,.18);
}
.wallet-plan.free-row {
  width: 100%; text-align: left; color: var(--text); cursor: pointer;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.3);
}
.wallet-plan.free-row b { font-weight: 600; }
.ledger.free .ledger-row.plus { background: linear-gradient(100deg, rgba(255,255,255,.13), rgba(255,255,255,.05) 70%), var(--surface); border-color: rgba(255,255,255,.12); }

.wallet-card {
  margin: 4px 12px 22px; padding: 18px 16px 14px; border-radius: 22px;
  background: radial-gradient(260px 140px at 15% 0%, rgba(240,79,158,.18), transparent 70%), var(--lift), var(--surface);
  border: 1px solid rgba(240,79,158,.32); box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.wallet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wallet-balance { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wallet-balance .diamond { width: 30px; height: 30px; }
.wallet-balance b { font-size: 36px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cta-btn.sm { min-height: 42px; padding: 0 18px; font-size: 15px; box-shadow: none; }
.wallet-plan {
  display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px; border-radius: 14px;
  background: rgba(0,0,0,.28); border: 1px solid var(--edge); font-size: 15px; font-weight: 500;
}
.plan-link { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 0; color: var(--pink-2); font-weight: 600; }
.plan-link .ico { width: 16px; height: 16px; }
.wallet-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.wallet-plan .grow { flex: 1; min-width: 0; }
/* The last 7 days (views.js membershipState): the count stands out, Renew beside it. */
.wallet-plan.ending { border-color: rgba(240,79,158,.45); background: linear-gradient(100deg, rgba(240,79,158,.16), rgba(0,0,0,.28) 70%); }
.wallet-plan.ending .ends-n { color: #ff8ec3; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wallet-renew { flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--cta); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: var(--cta-glow); }
/* Ended: said plainly, Renew lit. */
.wallet-card.expired { border-color: rgba(255,255,255,.16); background: radial-gradient(260px 140px at 15% 0%, rgba(240,79,158,.12), transparent 70%), var(--lift), var(--surface); }
.wallet-plan.expired-row { width: 100%; text-align: left; color: var(--text); cursor: pointer; border-color: rgba(240,79,158,.4); }
.wallet-plan.expired-row .tier-pill { opacity: .55; }
.wallet-plan.expired-row b { display: block; font-size: 15px; font-weight: 700; }
.wallet-plan.expired-row small { display: block; margin-top: 2px; color: #ffb3d6; font-size: 13px; }
.wallet-plan.expired-row > svg { flex: none; width: 18px; height: 18px; color: var(--muted); }

.ledger { padding: 0 12px 24px; }
.ledger-head {
  position: sticky; top: calc(var(--header) + var(--safe-top)); z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 4px 10px; background: linear-gradient(var(--bg) 75%, transparent);
}
.ledger-head h2 { margin: 0; font-size: 18px; }
.ledger-filter { position: relative; display: inline-flex; align-items: center; color: var(--text); }
.ledger-filter select { appearance: none; -webkit-appearance: none; border: 0; background: none; color: inherit; font-size: 16px; font-weight: 500; padding: 4px 22px 4px 8px; }
.ledger-filter .ico { position: absolute; right: 0; width: 16px; height: 16px; pointer-events: none; }
.ledger-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 14px 16px; border-radius: 16px;
  background: var(--lift), var(--surface); border: 1px solid var(--edge);
}
.ledger-row.plus { background: linear-gradient(100deg, rgba(240,79,158,.16), rgba(240,79,158,.04) 70%), var(--surface); border-color: rgba(240,79,158,.22); }
.ledger-title { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-date { margin-top: 3px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.ledger-amount { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--muted); }
.ledger-amount b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ledger-row.plus .ledger-amount { color: var(--text); }
.ledger-amount .diamond { width: 18px; height: 18px; }
.ledger-empty { padding: 24px 0; }

/* grouped menus (settings sheet) */
.menu-list { margin: 0 0 12px; border-radius: 18px; background: var(--lift), var(--surface-2); border: 1px solid var(--edge); overflow: hidden; }
.menu-list.flat { margin: 0; background: none; border: 0; }
.menu-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px;
  border: 0; border-bottom: 1px solid var(--edge); background: none; text-align: left; font-weight: 500; font-size: 16px;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row .ico { width: 18px; height: 18px; color: var(--muted); }

/* simple rows (affiliate months, admin lists) */
.log { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.log .plus { color: var(--ok); }
.log .minus { color: var(--danger); }
.link-box { word-break: break-all; }

/* ---------- first visit: the age check ---------- */
/* A card over the site, which shows through heavily blurred and darkened. */
.age {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(52px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  background: radial-gradient(130% 90% at 50% 40%, rgba(8,6,7,.12), rgba(5,4,5,.62)), rgba(5,4,5,.22);
  -webkit-backdrop-filter: blur(28px) saturate(1.35); backdrop-filter: blur(28px) saturate(1.35);
  animation: fade .25s ease;
}
.age-card {
  position: relative; width: min(100%, 340px); padding: 54px 18px 26px; border-radius: 28px; text-align: center;
  background: rgba(27,25,26,.94); border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.04);
  animation: pop .32s var(--ease-out);
}
/* The candy mark sits on the card's top edge. */
.age-mark { position: absolute; top: -36px; left: 50%; width: 88px; height: auto; transform: translateX(-50%); filter: drop-shadow(0 10px 22px rgba(240,79,158,.38)); }
.age-card h1 { margin: 0 0 20px; }
.age-card h1 .logo { font-size: 30px; }
.age-rules { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; text-align: left; }
.age-rules li {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border-radius: 16px;
  background: rgba(255,255,255,.07); color: var(--text); font-size: 14.5px; font-weight: 500; line-height: 1.35;
}
.age-rules svg { flex: none; width: 24px; height: 24px; color: var(--pink-2); }
.age-note { margin: 16px 8px 20px; color: var(--muted); font-size: 12px; line-height: 1.5; opacity: .8; }
.age-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.age-btn {
  min-width: 184px; height: 50px; padding: 0 40px; border: 0; border-radius: 999px;
  background: #fff; color: #0b090a; font-size: 16px; font-weight: 700; transition: transform .12s ease;
}
.age-btn:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { .age, .age-card { animation: none; } }

/* ---------- misc pages ---------- */

.toast {
  position: fixed; z-index: 90; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav) + var(--safe-bottom) + 14px); max-width: min(92vw, 440px);
  padding: 11px 16px; border-radius: 16px; background: #fff; color: #111; font-weight: 600; font-size: 14px; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fade .15s ease;
}
.toast.err { background: #3a161c; color: #fff; }
/* Over a dialog: at the top, clear of its buttons (Generate, Create, Pay). */
body.locked .toast { top: calc(var(--safe-top) + 12px); bottom: auto; }

/* ---------- task dock: generations in progress, over every page ----------
   Starts above the toast line on the right of the app column; once dragged it
   keeps its height (top, set by main.js) on the nearer edge. A task is a card
   of the same width; several fold into a stack (cards peeking above the front
   one, a count) and spread into an even column when tapped. */
/* Room under a page's last lines for the dock (70px above the nav + a card). */
body.has-dock main.page:not(.is-feed) { padding-bottom: 150px; }
.task-dock {
  position: fixed; z-index: 40; bottom: calc(var(--nav) + var(--safe-bottom) + 70px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  touch-action: none; user-select: none; -webkit-user-select: none; animation: dock-in .32s var(--ease-out);
}
.task-dock.right { right: max(12px, (100vw - var(--col)) / 2 + 12px); }
.task-dock.left { left: max(12px, (100vw - var(--col)) / 2 + 12px); align-items: flex-start; }
.task-dock.placed { bottom: auto; }
.task-dock.dragging { opacity: .92; cursor: grabbing; }
.task-dock.dragging .dock-card { box-shadow: 0 18px 44px rgba(0,0,0,.65); }
@keyframes dock-in { from { transform: translateY(14px) scale(.92); opacity: 0; } }
.dock-card {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 2px; width: 232px; max-width: calc(100vw - 24px); padding: 6px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(28,24,26,.92); color: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
/* the job whose photo is still flying in */
.dock-card.arriving { visibility: hidden; }
.task-dock.open .dock-card { animation: dock-in .28s var(--ease-out) both; }
.task-dock.open .dock-card:nth-child(2) { animation-delay: .04s; }
.task-dock.open .dock-card:nth-child(3) { animation-delay: .08s; }
.task-dock.open .dock-card:nth-child(4) { animation-delay: .12s; }
.dock-main { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 10px 0 0; border: 0; background: none; color: inherit; text-align: left; }
.dock-thumb { position: relative; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--surface-2); }
.dock-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dock-card.working .dock-thumb img { filter: blur(2px) brightness(.65); transform: scale(1.1); }
.dock-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: var(--pink); animation: spin 1.1s linear infinite; }
.dock-badge { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.38); }
.dock-badge .ico { width: 22px; height: 22px; }
.dock-card.ready .dock-thumb { box-shadow: inset 0 0 0 2px var(--pink); }
.dock-card.ready .dock-badge { color: #fff; background: rgba(240,79,158,.45); }
.dock-card.failed .dock-badge { color: var(--danger); }
.dock-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dock-text b { font-size: 14px; font-weight: 700; white-space: nowrap; }
.dock-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-x { flex: 0 0 auto; width: 30px; height: 30px; margin-right: 2px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; }
.dock-x .ico { width: 15px; height: 15px; }
/* folded: the next cards peek above the front one; the count sits on its corner */
.dock-deck { position: relative; margin-top: 15px; }
.dock-peek {
  position: absolute; z-index: 1; inset: 0; border-radius: 999px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(54,47,51,.92); box-shadow: 0 6px 18px rgba(0,0,0,.35); transform-origin: 50% 0; pointer-events: none;
}
.dock-peek.p1 { transform: translateY(-8px) scale(.93); }
.dock-peek.p2 { z-index: 0; transform: translateY(-15px) scale(.86); opacity: .7; }
.dock-count {
  position: absolute; z-index: 3; top: -6px; left: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--pink); color: #fff; font-size: 12px; font-weight: 800; font-style: normal; line-height: 22px; text-align: center;
  box-shadow: 0 0 0 2px rgba(20,17,19,.95), 0 3px 8px rgba(0,0,0,.4); pointer-events: none;
}
/* spread out: an even column, then how many more, then fold */
.dock-more { width: 232px; max-width: calc(100vw - 24px); text-align: center; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.75); text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.dock-fold {
  width: 232px; max-width: calc(100vw - 24px); height: 30px; padding: 0; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.12); background: rgba(28,24,26,.85); color: #fff; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.dock-fold .ico { width: 18px; height: 18px; transform: rotate(90deg); }
.upload-limit { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }

.legal { padding: 12px 16px 32px; line-height: 1.6; }
.legal h1 { font-size: 26px; }
article.legal { max-width: 720px; margin: 0 auto; font-size: 15px; }
article.legal h1 { margin: 8px 0 2px; }
article.legal h2 { font-size: 17px; margin: 26px 0 6px; }
article.legal p, article.legal li { color: var(--text); opacity: .86; }
article.legal ul { margin: 6px 0 10px; padding-left: 20px; }
article.legal li { margin: 4px 0; }
article.legal a { color: var(--pink); }
.legal-updated { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.legal-contact { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.bot {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(500px 240px at 50% 0%, rgba(240,79,158,.25), transparent 60%), var(--bg);
}
.bot-card { width: 100%; text-align: center; }

/* A page with a footer is at least the screen between the header and the
   bottom bar: on a short page the footer sits right above the bar. */
.page.with-footer { display: flex; flex-direction: column; min-height: calc(100dvh - var(--header) - var(--safe-top) - var(--nav) - var(--safe-bottom)); }
.page.with-footer > .page-body { flex: 1 0 auto; }
/* Footer: the copyright and links on every page; the home page adds its page
   numbers above and two laurel badges over a hairline. */
.footer { padding: 28px 16px 24px; text-align: center; }
.footer.home { padding-top: 6px; }
.footer-base { color: #a8a1a4; }
.footer.home .footer-base { padding-top: 24px; border-top: 1px solid rgba(255,255,255,.09); }
.copyright { margin: 0; font-size: 15px; font-weight: 500; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 30px; margin-top: 12px; }
.footer-links a { color: #9b9497; font-size: 15px; font-weight: 500; text-decoration: none; }
/* The two badges side by side on one line, on any phone. */
.trust { display: flex; justify-content: center; flex-wrap: nowrap; gap: clamp(8px, 3vw, 22px); padding: 4px 0 26px; }
.trust-item { display: flex; align-items: center; gap: 5px; color: #4a4547; }
.trust-item p { margin: 0; color: #6f686b; font-size: clamp(11px, 3.2vw, 13.5px); font-weight: 700; line-height: 1.3; white-space: nowrap; }
.laurel { flex: none; width: 19px; height: 35px; }
.laurel.flip { transform: scaleX(-1); }
.pg-nav { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 22px 12px 26px; }
.pg {
  min-width: 44px; height: 44px; padding: 0 9px; border: 0; border-radius: 10px;
  background: #232123; color: #a39a9d; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.pg.on { background: #e3609e; color: #fff; }
/* Numbers were skipped before this one: a "…" in a slightly wider gap. */
.pg.gap { position: relative; margin-left: 12px; }
.pg.gap::before { content: "…"; position: absolute; right: 100%; top: 0; width: 20px; line-height: 36px; text-align: center; color: #6f686b; font-weight: 600; pointer-events: none; }
.pg:active:not(.on) { background: #2e2b2d; }
.pg-arrow { display: grid; place-items: center; width: 34px; height: 44px; padding: 0; border: 0; background: none; color: #8f888b; }
.pg-arrow .ico { width: 22px; height: 22px; }
.pg-arrow:disabled { opacity: .3; }
/* Diamond Details: its page numbers close under the rows; rows dim while a page loads. */
.ledger .pg-nav { padding: 14px 0 6px; }
.ledger.loading .ledger-row { opacity: .45; transition: opacity .15s; }
@media (max-width: 389px) {
  .pg-nav { gap: 6px; }
  .pg { min-width: 40px; height: 40px; font-size: 16px; }
  .pg-nav { padding-left: 6px; padding-right: 6px; }
  .pg.gap { margin-left: 8px; }
  .pg.gap::before { width: 14px; line-height: 32px; }
  .trust-item { gap: 3px; }
  .laurel { width: 15px; height: 28px; }
}
@media (max-width: 345px) {
  .pg { min-width: 34px; padding: 0 6px; font-size: 15px; }
  .pg-arrow { width: 26px; }
}

/* ---------- admin (desktop page, not part of the app shell) ---------- */
.admin { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; background: var(--bg); min-height: 100vh; }
.admin .field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.admin .field input { padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); outline: 0; font-size: 15px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 22px; }
.notice { border: 1px solid rgba(245,205,85,.35); background: rgba(245,205,85,.08); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.tier-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tier { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tier.t-top { background: rgba(245,205,85,.18); color: var(--gold); }
.tier.t-feat { background: rgba(240,79,158,.18); color: var(--pink-2); }
.tier.t-list { background: rgba(126,200,255,.15); color: #9fd3ff; }
.tier.t-minor { background: rgba(255,255,255,.08); color: #d9d1d4; }
.tier.t-zero { background: rgba(255,255,255,.04); color: var(--muted); }
.tpl-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 72px; }
.tpl-row { display: grid; grid-template-columns: 36px 1fr auto 110px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); }
.tpl-row.dirty { border-color: var(--pink); background: rgba(240,79,158,.06); }
.tpl-row img { width: 36px; height: 48px; object-fit: cover; border-radius: 6px; }
.tpl-name { min-width: 0; display: flex; flex-direction: column; }
.tpl-name b, .tpl-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-name span { font-size: 12px; }
.tpl-row input { width: 100%; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--input); text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.tpl-bar { position: fixed; z-index: 20; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(728px, calc(100% - 32px)); display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: #221c1f; border: 1px solid rgba(240,79,158,.4); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.tpl-bar #tpl-dirty { flex: 1; font-weight: 600; }
.tpl-bar .cta-btn { min-height: 42px; }
.hidden { display: none !important; }
.admin .field select { height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); color: var(--text); font-size: 15px; }
.tpl-row.off { opacity: .6; }
.tpl-tools { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tpl-tools .ghost.sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: -56px 0 72px; }
.editor-back { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.65); overflow-y: auto; padding: 24px 12px; }
.editor { max-width: 760px; margin: 0 auto; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.editor-head h2 { margin: 0; font-size: 18px; }
.editor-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 12px; }
.editor-fields .field { margin: 6px 0; }
.editor-fields input, .editor-fields select { height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--input); color: var(--text); font-size: 14px; }
.editor-fields input[readonly] { opacity: .6; }
.editor-foot { position: sticky; bottom: -16px; padding: 12px 0 4px; background: var(--surface); }
.user-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: left; font: inherit; }
.user-card { margin-top: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.user-card h3 { margin: 0; }
.user-card h4 { margin: 16px 0 4px; }

@media (min-width: 520px) {
  #app { box-shadow: 0 0 80px rgba(0,0,0,.6); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.mt { margin-top: 12px; }

/* messages: the bell in the header and the Messages page */
.bell { position: relative; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--text); }
.bell .ico { width: 20px; height: 20px; }
.bell .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--bg); }
.messages { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.message { padding: 14px 14px 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--edge); }
.message.new { border-color: rgba(240,79,158,.45); }
.message h3 { margin: 0 0 6px; font-size: 16px; }
.message p { margin: 0; color: #d9d1d4; line-height: 1.5; white-space: pre-wrap; }
.message-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 13px; }
.small-empty { padding: 40px 0; }
.messages:has(> .small-empty) { min-height: calc(100dvh - 200px); justify-content: center; padding-bottom: 12vh; }
.messages > .small-empty { gap: 10px; }
.messages > .small-empty .ico { width: 30px; height: 30px; padding: 13px; box-sizing: content-box; border-radius: 50%; background: var(--surface-2); color: #8f868a; }
.tcard.creation.removed .media { filter: blur(10px) brightness(.45); }

/* ---------- motion: submitting, saving ---------- */
/* The picture that flies into the Collection tab (fx.js). */
.fly-ghost { position: fixed; z-index: 120; object-fit: cover; border-radius: 16px; pointer-events: none; box-shadow: 0 12px 30px rgba(0,0,0,.5); will-change: transform; }
/* Double-tap heart on Feeds (fx.js). */
.heart-burst { position: fixed; z-index: 120; width: 104px; height: 104px; pointer-events: none; color: var(--pink); filter: drop-shadow(0 4px 18px rgba(240,79,158,.55)); }
.heart-burst svg { width: 100%; height: 100%; fill: currentColor; }
/* Generate: the button fills while the photo uploads, and ticks once submitted. */
.gen-btn.uploading { background: linear-gradient(90deg, #f2559f 0 var(--p, 0%), #b8457c var(--p, 0%)); opacity: 1; }
.gen-btn.done { background: linear-gradient(90deg, #e63e8e, #ff7db7); opacity: 1; animation: submitted .38s cubic-bezier(.3,1.5,.5,1); }
.gen-btn .tick { width: 22px; height: 22px; animation: tick-in .3s ease-out; }
@keyframes submitted { 40% { transform: scale(1.04); } }
@keyframes tick-in { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
/* The job just submitted, on top of Collection. */
.tcard.creation.fresh { animation: fresh-in .55s cubic-bezier(.2,1.2,.4,1) both; }
.tcard.creation.fresh::before { content: ""; position: absolute; inset: 0; z-index: 6; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 2px var(--pink), inset 0 0 28px rgba(240,79,158,.55); animation: fresh-glow 2.6s ease-out .4s both; }
@keyframes fresh-in { from { transform: translateY(-14px) scale(.9); opacity: 0; } }
@keyframes fresh-glow { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
/* A finished result fades in where the Loading view was. */
.tcard.creation:not(.working) .tcard-media .media { animation: fade .45s ease; }

/* ---------- paying ----------
   "Plan selected" (modals.js payModal): method tiles, that method's steps, the
   one-time note, the button (Processing… while busy). Payment Confirming…
   (payStatusModal): a coin over a card, the buttons and × below it on the
   backdrop. /checkout/<order> (views.js): a dark summary over a white form. */
/* The payment sheet: the method and its steps scroll if they must; the
   button and the fine print stay pinned below, always in sight. */
.pay-sheet .sheet-body { padding: 14px 15px 16px; }
/* The pinned part is a card of its own: what's bought, the total, the button. */
.pay-sheet .sheet-foot {
  display: block; padding: 16px 16px 12px; border-top: 1px solid rgba(255,255,255,.12); border-radius: 22px 22px 0 0;
  background: #252326; box-shadow: 0 -12px 24px -14px rgba(0,0,0,.7);
}
.pay-sum { display: flex; flex-direction: column; gap: 6px; }
.pay-sum-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14.5px; }
.pay-sum-row.main { color: var(--text); font-size: 16.5px; }
.pay-sum-row.main b { font-weight: 700; }
/* An annual plan: "5,000 a month × 12 months" under its name. */
.pay-sum-row.main small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.pay-sum-row.extra { font-size: 14px; }
.pay-sum-row.extra .pay-sum-v { color: #ff8ec3; font-weight: 700; }
.pay-sum-row.total { margin-top: 6px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.pay-sum-v { display: inline-flex; align-items: center; gap: 5px; flex: none; color: var(--text); font-variant-numeric: tabular-nums; }
.pay-sum-v b { font-size: 18px; font-weight: 800; }
.pay-sum-v .pm-gem { width: 18px; height: 18px; }
.pay-sheet .pay-btn { margin-top: 0; min-height: 50px; font-size: 17px; }
.pay-sheet .sheet-foot { padding-top: 12px; }
.pay-sheet .sheet-body .pay-sum { margin: 12px 0 4px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.pay-sheet .sheet-body .pay-out-box { margin: 0 0 12px; }
.pay-fine { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.35; }
.pay-per { margin: 0 0 8px; text-align: center; color: rgba(255,255,255,.8); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* The × sits in the corner so the title and its pill keep one line on a phone. */
.pay-head { position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 10px; padding-right: 36px; }
/* "Plan selected:" and a wide amount (15,000) stay on one line, a size smaller. */
.pay-line { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; }
.pay-line.fit-1, .pay-line.fit-2 { gap: 6px; }
.pay-line.fit-1 h2 { font-size: 18px; }
.pay-line.fit-1 .pay-pill, .pay-line.fit-2 .pay-pill { height: 30px; padding: 0 10px 0 8px; font-size: 15px; }
.pay-line.fit-1 .pay-gem, .pay-line.fit-2 .pay-gem { width: 17px; height: 17px; }
.pay-line.fit-2 { flex-wrap: wrap; }
.pay-line.fit-2 h2 { font-size: 16px; }
.pay-head h2 { margin: 0; font-size: 21px; font-weight: 800; white-space: nowrap; }
.pay-head .icon-btn.close { position: absolute; top: 4px; right: -8px; background: none; }
.pay-head .icon-btn.close .ico { width: 24px; height: 24px; }
.pay-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 11px; border-radius: 999px;
  background: linear-gradient(90deg, #f0a3cc 0%, #b4e2f4 52%, #ead98a 100%); color: #111; font-size: 17px; font-weight: 800;
}
.pay-gem { width: 20px; height: 20px; color: #111; }
/* a membership plan, selected (modals.js planChip): its name on a pill in the level's colour */
.plan-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; white-space: nowrap; }
.plan-chip b { color: #fff; font-size: 16px; font-weight: 800; }
.plan-chip.basic { background: linear-gradient(180deg, #86b4ff, #4c80dc); }
.plan-chip.pro { background: linear-gradient(180deg, #ff7db7, #e04a93); }
.plan-chip.max { background: linear-gradient(95deg, #f3e29a 0%, #b4e9f2 52%, #eeb2d7 100%); }
.plan-chip.max b { color: #151515; }
.pay-line.fit-1 .plan-chip, .pay-line.fit-2 .plan-chip { height: 28px; padding: 0 12px; }
.pay-line.fit-1 .plan-chip b, .pay-line.fit-2 .plan-chip b { font-size: 15px; }
.pm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.pm-tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px; min-width: 0; min-height: 84px;
  padding: 11px 9px; border-radius: 16px; border: 1.5px solid rgba(255,255,255,.16); background: #121011; text-align: left;
}
.pm-tile b { font-size: clamp(12.5px, 3.6vw, 16px); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.pm-tile.on { border: 2px solid #ef6aa9; padding: 10.5px 8.5px; background: #2a1f25; }
/* Three methods side by side; two or four, two by two. A method with a bonus:
   "+20% bonus" on its corner, and the extra diamonds under its name. */
.pm-tiles.n2, .pm-tiles.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pm-tiles.tagged { padding-top: 10px; row-gap: 18px; }
.pm-tile { position: relative; }
.pm-tag {
  position: absolute; top: -11px; right: 0; padding: 3px 9px; border-radius: 9px 9px 9px 3px;
  background: linear-gradient(90deg, #ff6aac, #e3407f); color: #fff; font-size: 12px; font-weight: 800; line-height: 1.25; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(227,64,127,.35);
}
.pm-name { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pm-bonus { display: inline-flex; align-items: center; gap: 4px; color: #fff; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pm-gem { width: 16px; height: 16px; flex: none; color: #ff6aac; }
.pm-logo.crypto { width: 27px; height: 27px; }
.pay-note.bonus { margin-top: 10px; min-height: 0; gap: 10px; padding: 8px 12px 8px 0; }
.pay-note.bonus .pay-note-ico { width: 38px; margin: -8px 0 -8px -6px; }
.pay-note.bonus .pay-note-ico svg { width: 22px; height: 22px; }
.pay-note.bonus p { font-size: 13.5px; line-height: 1.4; }
.pay-note.bonus p b { font-weight: 600; }
/* Shorter phones in Safari (an SE 548, a mini 629 tall): the tiles'
   "+N% bonus" say it already, and the rest packs closer. */
@media (max-height: 640px) {
  .pay-note.bonus { display: none; }
  .pay-head { min-height: 38px; margin-bottom: 6px; }
  .pm-tiles.tagged { row-gap: 16px; }
  .pm-tile, .pm-tile.on { gap: 10px; min-height: 74px; }
  .pm-detail { margin-top: 12px; }
  .pm-steps > li { padding-bottom: 10px; }
  .pay-sheet .sheet-body { padding-top: 10px; }
}
/* An SE (548 tall): the steps a size smaller. */
@media (max-height: 600px) {
  .pm-detail { font-size: 13px; }
  .pm-tiles.tagged { padding-top: 8px; row-gap: 14px; }
  .pay-fine { margin-top: 5px; font-size: 12px; }
}
.pm-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 26px; }
.pm-logo { flex: none; width: 31px; height: 21px; }
.pm-logo.round { width: 26px; height: 26px; }
.pm-logo.square { width: 25px; height: 25px; }
.pm-detail { margin: 16px 2px 0; font-size: 14px; }
.pm-lead { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
/* The steps: a numbered circle each, a line joining them, the step in bold over what happens. */
.pm-steps { margin: 0; padding: 0; list-style: none; }
.pm-steps > li { position: relative; display: flex; gap: 14px; padding-bottom: 14px; }
.pm-steps > li:last-child { padding-bottom: 0; }
.pm-steps > li:not(:last-child)::before { content: ''; position: absolute; left: 13.5px; top: 36px; bottom: 6px; width: 1.5px; border-radius: 1px; background: rgba(255,255,255,.22); }
.pm-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #3a3638; color: #e4dfe1; font-size: 14px; font-weight: 700; }
.pm-steps li > div { min-width: 0; padding-top: 3px; }
.pm-steps b { display: block; color: var(--text); font-size: 16px; font-weight: 600; line-height: 1.3; }
.pm-steps p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
/* Crypto: "Pay with [USDT · TRC20 ▾]" (16px: iPhones don't zoom into it) */
.pm-coin { position: relative; display: inline-block; vertical-align: middle; margin: -4px 0 -2px 4px; }
.pm-coin select {
  -webkit-appearance: none; appearance: none; height: 32px; padding: 0 30px 0 11px; border: 1px solid rgba(240,79,158,.55); border-radius: 10px;
  background: #2a1f25; color: #fff; font: inherit; font-size: 16px; font-weight: 700;
}
.pm-coin::after { content: ''; position: absolute; right: 11px; top: 12px; width: 7px; height: 7px; border: solid #ff7db7; border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.pay-note { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 14px 10px 0; border-radius: 12px; background: #232022; overflow: hidden; }
.pay-note-ico {
  flex: none; align-self: stretch; display: grid; place-items: center; width: 46px; margin: -10px 0 -10px -6px;
  border-radius: 0 50% 50% 0 / 0 50% 50% 0; background: #3b3638; color: #8f888b; font-size: 30px; font-weight: 900;
}
.pay-note p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.pay-note.once { margin-top: 18px; min-height: 56px; }
.pay-note.once .pay-note-ico svg { width: 22px; height: 22px; margin-left: 4px; }
.pay-note b { color: var(--text); font-weight: 600; }
.pay-btn {
  display: block; width: 100%; min-height: 54px; margin-top: 18px; padding: 0 12px; border: 0; border-radius: 12px;
  background: #e3609e; color: #fff; font-size: 18px; font-weight: 700; transition: background .15s, transform .1s;
}
.pay-btn:active:not(:disabled) { transform: scale(.985); }
/* Telegram Stars: the button is the invoice link */
a.pay-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.pay-none { margin: 18px 2px 8px; color: var(--muted); }
.pay-held { margin: 0 2px 10px; font-size: 12.5px; color: var(--muted); text-align: center; }
.pay-btn:disabled, .co-pay:disabled { opacity: 1; background: #a8507a; color: rgba(255,255,255,.7); }

.sheet.pay-status-sheet { width: min(100%, 400px); overflow: visible; border: 0; background: none; box-shadow: none; }
.pay-status-sheet .sheet-body { overflow: visible; padding: 0; text-align: center; }
.ps-card {
  position: relative; margin-top: 74px; padding: 74px 22px 24px; border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12); background: linear-gradient(180deg, #252123, #19171a);
}
.ps-coin { position: absolute; left: 50%; top: -92px; width: 250px; transform: translateX(-50%); filter: drop-shadow(0 12px 18px rgba(0,0,0,.5)); }
.ps-card.confirming .ps-coin { animation: coin-bob 2.6s ease-in-out infinite; }
@keyframes coin-bob { 50% { transform: translate(-50%, -6px); } }
.ps-title { margin: 22px 0 16px; line-height: .98; letter-spacing: -.02em; }
.ps-title span {
  display: block; font-size: 38px; font-weight: 900;
  background: linear-gradient(180deg, #ff95c8, #e2408d); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-title b { display: block; font-size: 40px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 #000, 0 8px 16px rgba(0,0,0,.6); }
.ps-card.failed .ps-title b, .ps-card.declined .ps-title b { color: #ffc1c1; }
.ps-card p { margin: 0; color: #bdb5b8; font-size: 15px; line-height: 1.55; }
.ps-card p.ps-help { margin-top: 10px; font-size: 13px; color: #9d9598; }
.ps-help a { color: #ff7db7; }
.ps-actions { display: flex; gap: 12px; margin-top: 18px; }
.ps-actions :is(button, a) { flex: 1; min-height: 54px; border-radius: 999px; font-size: 18px; font-weight: 700; }
.ps-actions a { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.ps-ghost { border: 1.5px solid #ef6aa9; background: #0b090a; color: #ff7db7; }
.ps-main { border: 0; background: linear-gradient(180deg, #f27ab3, #e3407f); color: #fff; box-shadow: var(--cta-glow); }
/* Paid: the invite page, one tap away (modals.js payStatusModal). */
.ps-invite { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(255,125,183,.35); border-radius: 16px; background: rgba(240,79,158,.12); color: var(--text); text-align: left; }
.ps-invite > svg:first-child { flex: none; width: 24px; height: 24px; color: #ff8ec3; }
.ps-invite span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ps-invite b { font-size: 15px; font-weight: 700; }
.ps-invite small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.ps-invite > svg:last-child { flex: none; width: 18px; height: 18px; color: var(--muted); }
.ps-x { display: grid; place-items: center; width: 46px; height: 46px; margin: 18px auto 0; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.55); background: none; color: #fff; }
.ps-x .ico { width: 22px; height: 22px; }

body.on-checkout #app { padding-bottom: 0; }
.checkout { display: flex; flex-direction: column; min-height: calc(100dvh - var(--header) - var(--safe-top)); }
.co-top { position: relative; padding: 16px 20px 26px; background: #1b1b1b; text-align: center; }
.co-back { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 6px; border: 0; background: none; color: #cfcfcf; font-size: 15px; }
.co-back .ico { width: 18px; height: 18px; }
.co-top h1 { margin: 42px 0 6px; font-size: 20px; font-weight: 600; }
.co-price { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.01em; }
.co-top p { margin: 6px 0 0; color: #bdbdbd; font-size: 15px; }
.co-body { flex: 1; padding: 24px 20px calc(28px + var(--safe-bottom)); background: #fff; color: #161616; color-scheme: light; }
.co-form, .co-app, .co-state { max-width: 520px; margin: 0 auto; }
.co-label { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; font-size: 18px; font-weight: 700; }
.co-test + .co-label, .co-form > .co-label:first-child { margin-top: 0; }
.co-brands { display: inline-flex; gap: 6px; }
.co-brands i { display: inline-flex; transition: opacity .15s; }
.co-brands i.dim { opacity: .25; }
.co-brands .pm-logo { border-radius: 5px; box-shadow: 0 0 0 1px #dedede; }
.co-field {
  display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 14px;
  border: 1.5px solid #dcdcdc; border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.co-field:focus-within { border-color: #e3609e; box-shadow: 0 0 0 3px rgba(227,96,158,.16); }
.co-field.bad { border-color: #e5484d; }
.co-field input { flex: 1; width: 100%; min-width: 0; height: 51px; border: 0; outline: 0; background: none; color: #161616; font-size: 17px; }
.co-field input::placeholder { color: #b3b3b3; }
.co-card-ico { display: inline-flex; }
.co-card-ico .pm-logo { width: 30px; height: 20px; }
.co-card-ico .pm-logo rect { fill: #fff; }
.co-card-ico .pm-logo rect:first-child { fill: #6b6b6b; }
.co-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.co-err { display: block; margin: 6px 2px 0; color: #d93036; font-size: 13px; }
.co-pay {
  display: block; width: 100%; min-height: 56px; margin-top: 22px; border: 0; border-radius: 12px;
  background: #e3609e; color: #fff; font-size: 19px; font-weight: 600;
}
.co-terms { margin: 16px 0 0; color: #7a7a7a; font-size: 14px; }
.co-terms a { color: #555; padding: 8px 2px; margin: -8px -2px; }
.co-test { margin: 0 0 18px; padding: 10px 12px; border-radius: 10px; background: #fff4d6; color: #6a4b00; font-size: 13.5px; line-height: 1.45; }
.co-app { text-align: center; }
.co-app-logo .pm-logo { width: 64px; height: 64px; }
.co-app-logo { display: inline-flex; }
.co-app h2 { margin: 10px 0 14px; font-size: 22px; }
.co-app .co-test { text-align: left; }
.co-link { display: block; margin: 14px auto 0; border: 0; background: none; color: #666; font-size: 15px; text-decoration: underline; }
/* Telegram Stars: the price in Stars, three steps, Open Telegram (a link), then waiting. */
a.co-pay { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.co-tg a.co-pay { background: #2aabee; }
.co-stars { display: inline-flex; align-items: baseline; gap: 6px; margin: -4px 0 4px; padding: 8px 16px; border-radius: 999px; background: #fff6dc; color: #6a4b00; font-size: 15px; }
.co-stars b { font-size: 22px; font-variant-numeric: tabular-nums; }
.co-steps { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: step; text-align: left; }
.co-steps li { position: relative; padding: 0 0 12px 38px; color: #555; font-size: 15px; line-height: 1.45; counter-increment: step; }
.co-steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #eaf6fd; color: #1a8fd0; font-size: 13px; font-weight: 800; }
.co-steps b { color: #161616; }
.co-tg a.co-pay { margin-top: 16px; }
.co-wait { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; color: #555; font-size: 14.5px; }
.co-wait .spinner { border-color: rgba(0,0,0,.12); border-top-color: #2aabee; }
.co-state { padding-top: 8px; text-align: center; }
.co-state h2 { margin: 6px 0 8px; font-size: 21px; }
.co-state p { margin: 0; color: #555; }
.co-loading { display: grid; place-items: center; min-height: 50vh; }
@media (prefers-reduced-motion: reduce) { .ps-card.confirming .ps-coin, .candy-mark, .candy-mark::before, .candy-body, .candy-shine { animation: none; } }

/* Narrow phones: the header tightens; at 320px the level stays in the account menu only. */
@media (max-width: 389px) {
  .app-header { gap: 8px; }
  .app-header .logo { font-size: 17px; }
  .header-right { gap: 6px; }
  .wallet { gap: 4px; padding: 0 10px 0 8px; }
}
@media (max-width: 359px) { .wallet-sep, .wallet-tier { display: none; } }

/* ---------- account menu (the header avatar; views.js accountMenu) ----------
   A panel under the header on the right, over a light dim. */
.menu-back { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.35); animation: fade .15s ease; }
.account-menu {
  position: absolute; top: calc(var(--header) + var(--safe-top) + 2px); right: max(10px, (100vw - var(--col)) / 2 + 10px);
  width: min(calc(100vw - 20px), 300px); max-height: calc(100dvh - var(--header) - var(--safe-top) - 16px); overflow-y: auto;
  padding: 22px 16px 16px; border-radius: 20px; border: 1px solid rgba(255,255,255,.1);
  background: var(--lift), #1c1a1b; box-shadow: 0 24px 60px rgba(0,0,0,.6);
  transform-origin: calc(100% - 24px) 0; animation: menu-in .18s var(--ease-out);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.am-head { text-align: center; }
.am-head h2 { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; font-size: 20px; }
.am-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.am-upgrade { margin-top: 6px; padding: 2px 4px; border: 0; background: none; color: var(--pink-2); font-size: 14px; font-weight: 600; }
.am-balance {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin: 18px 0 8px; padding: 0 18px;
  overflow: hidden; border: 0; border-radius: 14px; background: #2f2a22; color: #f6d58a; text-align: left;
}
.am-balance.basic { background: #1d2738; color: #b9d2ff; }
.am-balance.pro { background: #33232c; color: #ffc0dd; }
.am-balance.max { background: linear-gradient(100deg, #2c2a1f, #1d2c33 50%, #33232e); color: #e9f2f6; }
.am-balance.free { background: #2a2829; color: #ece6e8; }
.am-balance .diamond { width: 24px; height: 24px; }
.am-balance b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.am-mark { position: absolute; right: 14px; bottom: -12px; width: 82px; height: 66px; color: currentColor; opacity: .1; transform: rotate(-14deg); }
.am-rows { display: flex; flex-direction: column; }
.am-row {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding: 0 6px 0 10px;
  border: 0; border-radius: 12px; background: none; font-size: 17px; font-weight: 600; text-align: left;
}
.am-row:active { background: rgba(255,255,255,.06); }
.am-row span { flex: 1; }
.am-row .ico { width: 24px; height: 24px; }
.am-row .ico:last-child { width: 18px; height: 18px; color: var(--muted); }
.am-logout {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; margin-top: 10px;
  border: 0; border-radius: 999px; background: #262325; color: #8f888b; font-size: 17px; font-weight: 600;
}
.am-logout .ico { width: 20px; height: 20px; }

/* Get the app (public/js/install.js): the avatar menu's card, and its sheet. */
.am-app {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 8px; padding: 10px 10px 10px 10px;
  overflow: hidden; border: 0; border-radius: 16px; color: var(--text); text-align: left;
  background: linear-gradient(135deg, rgba(240,79,158,.26), rgba(255,125,183,.08) 55%, rgba(255,255,255,.03));
  box-shadow: inset 0 0 0 1px rgba(255,125,183,.34); transition: transform .12s ease;
}
.am-app::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.13) 50%, transparent 65%);
  transform: translateX(-110%); animation: ia-sheen 4.2s ease-in-out 1s infinite;
}
@keyframes ia-sheen { 0%, 62% { transform: translateX(-110%); } 100% { transform: translateX(110%); } }
.am-app:active { transform: scale(.985); }
.am-app-icon { flex: none; width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 6px 16px rgba(240,79,158,.38), 0 0 0 1px rgba(255,255,255,.08); }
.am-app-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.am-app-text b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-app-text small { color: #e9b9ce; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-app-pill { flex: none; padding: 7px 13px; border-radius: 999px; background: var(--cta); color: #fff; font-size: 13px; font-weight: 800; box-shadow: var(--cta-glow); }

.install-sheet .sheet-body { padding: 0 20px 22px; }
.ia-hero { position: relative; display: flex; flex-direction: column; align-items: center; padding: 36px 0 4px; text-align: center; }
.ia-halo {
  position: absolute; top: 0; width: 220px; height: 220px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(240,79,158,.5), rgba(240,79,158,.14) 58%, transparent);
  animation: ia-breathe 4.5s ease-in-out infinite;
}
@keyframes ia-breathe { 50% { transform: scale(1.1); opacity: .75; } }
.ia-icon {
  position: relative; width: 92px; height: 92px; border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.1); animation: ia-float 4.5s ease-in-out infinite;
}
@keyframes ia-float { 50% { transform: translateY(-6px); } }
.ia-title { position: relative; display: flex; align-items: center; gap: 8px; margin: 20px 0 0; font-size: 25px; font-weight: 800; letter-spacing: -.01em; }
.ia-badge { padding: 4px 8px 3px; border-radius: 8px; background: var(--cta); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ia-sub { position: relative; margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.ia-perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.ia-perks li {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 6px 12px; text-align: center;
  border-radius: 14px; border: 1px solid var(--edge); background: rgba(255,255,255,.035);
}
.ia-perks .ia-g { width: 24px; height: 24px; margin-bottom: 6px; color: var(--pink-2); }
.ia-perks b { font-size: 13.5px; }
.ia-perks span { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.ia-way { margin-top: 22px; }
.ia-cta {
  position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px;
  overflow: hidden; border: 0; border-radius: 999px; background: var(--cta); color: #fff; font-size: 17px; font-weight: 800; box-shadow: var(--cta-glow);
}
.ia-cta::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%);
  transform: translateX(-110%); animation: ia-sheen 3.4s ease-in-out .6s infinite;
}
.ia-cta:active { transform: scale(.985); }
.ia-cta .ia-g { width: 22px; height: 22px; }
.ia-cta.ghost { min-height: 50px; margin-top: 16px; background: none; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.26); font-size: 16px; font-weight: 700; }
.ia-cta.ghost::after { display: none; }
.ia-fine { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; text-align: center; }
.ia-how { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.ia-text { margin: -4px 0 12px; color: var(--muted); font-size: 14px; }
.ia-steps { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: ia; }
.ia-steps li {
  display: flex; align-items: center; gap: 14px; padding: 11px 14px 11px 12px; counter-increment: ia;
  border-radius: 14px; border: 1px solid var(--edge); background: rgba(255,255,255,.035);
}
.ia-tile { position: relative; flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #2b2528; color: #fff; }
.ia-tile::after {
  content: counter(ia); position: absolute; top: -6px; left: -6px; display: grid; place-items: center; width: 19px; height: 19px;
  border-radius: 50%; background: var(--cta); color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 0 0 2.5px var(--surface);
}
.ia-tile .ia-g { width: 22px; height: 22px; }
/* On iPhone, Share looks the way Safari draws it. */
.ia-way.ios-safari li:first-child .ia-tile, .ia-way.ios-other li:first-child .ia-tile { background: #fff; color: #0a84ff; }
.ia-step { font-size: 14.5px; line-height: 1.35; color: #ddd5d8; }
.ia-step b { color: #fff; }
.ia-point { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 16px 0 0; color: var(--pink-2); font-size: 13px; font-weight: 700; }
.ia-point .ia-g { width: 22px; height: 22px; animation: ia-nudge 1.2s ease-in-out infinite; }
@keyframes ia-nudge { 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) {
  .am-app::after, .ia-cta::after, .ia-halo, .ia-icon, .ia-point .ia-g { animation: none; }
}

/* Narrow phones (Display Zoom 320, Galaxy Fold 344, Galaxy S 360): method
   names keep whole words; the Me page's balance leaves room for its button. */
@media (max-width: 374px) {
  .pm-tiles { gap: 6px; }
  .pm-tile, .pm-tile.on { padding: 10px 8px; }
  .pm-tile.on { padding: 9.5px 7.5px; }
  .pm-tile b { font-size: 13px; }
  .pm-logo { width: 28px; height: 19px; }
  .pm-logo.round, .pm-logo.square { width: 23px; height: 23px; }
}
@media (max-width: 359px) {
  .wallet-balance b { font-size: 30px; }
  .wallet-top .cta-btn { padding: 0 14px; white-space: nowrap; }
}

/* Collection cards: the Loading / Failed text sits above the template name,
   which takes the card's bottom lines. */
.tcard.creation .gen-loading-body { padding-bottom: 46px; }
@media (max-width: 359px) {
  .tcard.creation .gen-loading b { font-size: 15px; }
  .tcard.creation .gen-loading p { font-size: 11px; }
  .tcard.creation .candy-mark { width: 54px; }
}
/* Small targets made easier to hit: the logo, footer links, the ledger filter. */
.brand { min-height: 36px; }
.footer-links a { display: inline-block; padding: 6px 2px; }
.ledger-filter select { min-height: 36px; }

/* Feeds and the drama player: the video's name and Create now sit at the bottom, so
   the dock waits top-right under the tab bar as just its photo (a stack keeps
   its count; a tap still spreads it). It isn't dragged there. */
.task-dock.on-feed {
  top: calc(var(--header) + var(--safe-top) + 58px) !important; bottom: auto !important;
  left: auto !important; right: max(10px, (100vw - var(--col)) / 2 + 10px) !important;
}
body.feed-expanded .task-dock.on-feed { top: calc(var(--safe-top) + 58px) !important; }
.task-dock.on-feed:not(.open) .dock-card { width: auto; padding: 3px; }
.task-dock.on-feed:not(.open) .dock-main { padding: 0; }
.task-dock.on-feed:not(.open) :is(.dock-text, .dock-x, .dock-peek) { display: none; }
.task-dock.on-feed .dock-deck { margin-top: 0; }

/* Short screens (a phone held sideways, an SE in Safari): the Payment
   Confirming card scrolls instead of losing its buttons below the edge, and
   comes in smaller; the task dock sits just above the nav instead of
   mid-screen, so the page needs less room below its last line. */
.modal-back.small:has(> .pay-status-sheet) { align-items: flex-start; overflow-y: auto; }
.sheet.pay-status-sheet { margin: auto; }
@media (max-height: 600px) {
  .ps-card { margin-top: 56px; padding-top: 52px; }
  .ps-coin { width: 190px; top: -70px; }
  .ps-title { margin: 12px 0 10px; }
  .ps-title span { font-size: 30px; }
  .ps-title b { font-size: 32px; }
  .task-dock:not(.on-feed):not(.placed) { bottom: calc(var(--nav) + var(--safe-bottom) + 10px); }
  body.has-dock main.page:not(.is-feed) { padding-bottom: 84px; }
}
@media (max-height: 430px) {
  .ps-card { margin-top: 40px; padding: 38px 18px 16px; }
  .ps-coin { width: 130px; top: -48px; }
  .ps-title { margin: 6px 0 8px; }
  .ps-card p { font-size: 14px; line-height: 1.4; }
  .ps-actions { margin-top: 12px; }
  .ps-actions button { min-height: 46px; }
}

/* Rows that didn't fit (main.js fitRows; mostly a large Android system font or
   a zoomed page): fit-1 is a little more compact, fit-2 more. */
.wallet-top .cta-btn, .wallet-top .plans-btn { flex: none; white-space: nowrap; }
.app-header.fit-1 :is(.wallet-sep, .wallet-tier) { display: none; }
.app-header.fit-2 { gap: 6px; padding-left: 10px; padding-right: 10px; }
.app-header.fit-2 .logo { font-size: 15px; }
.app-header.fit-2 .header-right { gap: 4px; }
.app-header.fit-2 .wallet { padding: 0 8px 0 6px; }
.app-header .header-avatar, .app-header .bell { flex: none; }
.billing-toggle.fit-1 button { padding: 0 10px; font-size: 15px; gap: 4px; }
.billing-toggle.fit-2 button { padding: 0 8px; font-size: 14px; gap: 4px; }
.billing-toggle.fit-2 .off-badge { padding: 3px 6px; font-size: 10.5px; }
.wallet-top.fit-1 .wallet-balance b { font-size: 28px; }
.wallet-top.fit-1 :is(.cta-btn, .plans-btn) { padding: 0 12px; }
.wallet-top.fit-2 { flex-wrap: wrap; }
.wallet-top.fit-2 .wallet-balance { flex-basis: 100%; }
.pm-tiles.fit-1 { gap: 6px; }
.pm-tiles.fit-1 .pm-tile, .pm-tiles.fit-1 .pm-tile.on { padding: 9px 7px; }
.pm-tiles.fit-1 .pm-tile.on { padding: 8.5px 6.5px; }
.pm-tiles.fit-1 .pm-tile b { font-size: 12px; }
.pm-tiles.fit-2 .pm-tile b { overflow-wrap: anywhere; }
.ps-title.fit-1 span { font-size: 30px; }
.ps-title.fit-1 b { font-size: 31px; }
.ps-title.fit-2 span { font-size: 24px; }
.ps-title.fit-2 b { font-size: 25px; }

/* ---------- MyTok (mytok.js) ----------
   The page: CandyTok | MyTok, a hero with a fan of scenes, Solo / Couple, the
   scene cards. The sheet: the scene on top, then photos (him blue, her pink),
   length, quality, a line, and Create with its price. */
.mytok-page { padding: 0 16px 28px; }
.mt-switch { display: flex; justify-content: center; padding: 6px 0 2px; }
.mt-switch .feed-tabs button { font-size: 16px; }

.mt-hero { position: relative; padding: 14px 0 6px; text-align: center; }
.mt-fan { position: relative; height: 138px; margin: 4px auto 14px; width: 220px; }
.mt-fan img {
  position: absolute; top: 6px; left: 50%; width: 76px; height: 124px; margin-left: -38px; object-fit: cover; border-radius: 14px;
  border: 2px solid rgba(255,255,255,.9); box-shadow: 0 10px 26px rgba(0,0,0,.5); animation: fan-in .5s var(--ease-out) both;
}
.mt-fan img.f0 { transform: translateX(-62px) rotate(-12deg); z-index: 1; animation-delay: .05s; }
.mt-fan img.f1 { transform: translateY(-6px); z-index: 3; width: 84px; height: 136px; margin-left: -42px; top: 0; }
.mt-fan img.f2 { transform: translateX(62px) rotate(12deg); z-index: 2; animation-delay: .1s; }
@keyframes fan-in { from { opacity: 0; translate: 0 14px; } }
.mt-hero h1 {
  margin: 0; font-size: 30px; letter-spacing: -.02em;
  background: linear-gradient(90deg, #fff 30%, #ffc0dc 70%, #ff7db7); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mt-hero > p { margin: 8px auto 0; max-width: 300px; color: var(--muted); font-size: 15px; }
.mt-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: step; }
.mt-steps li {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 14px;
  background: var(--lift), var(--surface); border: 1px solid var(--edge); font-size: 12.5px; font-weight: 600; color: #e9e2e5; counter-increment: step;
}
.mt-steps li .ico { width: 22px; height: 22px; color: var(--pink-2); }
.mt-steps li span::before { content: counter(step) ". "; color: var(--muted); font-weight: 500; }

.mt-notice {
  display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 12px 14px; border-radius: 14px;
  background: rgba(245,205,85,.08); border: 1px solid rgba(245,205,85,.25); color: #f3e3b0; font-size: 13.5px; line-height: 1.45;
}
.mt-notice .ico { flex: none; width: 20px; height: 20px; color: var(--gold); margin-top: 1px; }
.mt-notice b { color: #fff3c8; }

.mt-kind { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0 14px; }
.mt-kind button {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; text-align: left;
  border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .2s ease, background-color .2s ease, transform .12s ease;
}
.mt-kind button:active { transform: scale(.98); }
.mt-kind button > .ico { flex: none; width: 36px; height: 36px; padding: 7px; border-radius: 50%; background: rgba(255,255,255,.06); color: #d9d0d4; }
.mt-kind button span { display: flex; flex-direction: column; min-width: 0; }
.mt-kind button b { font-size: 15px; }
.mt-kind button small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.mt-kind button i { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.mt-kind button.on { border-color: var(--pink); background: linear-gradient(135deg, rgba(240,79,158,.16), rgba(240,79,158,.04)); }
.mt-kind button.on > .ico { background: var(--cta); color: #fff; }
.mt-kind button.on i { color: var(--pink-2); }

.mt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mt-card {
  position: relative; display: block; aspect-ratio: 9 / 14; padding: 0; overflow: hidden; border: 0; border-radius: 18px;
  background: var(--surface-2); box-shadow: 0 8px 24px rgba(0,0,0,.35); text-align: left; isolation: isolate; transition: transform .14s ease;
}
.mt-card:active { transform: scale(.975); }
.mt-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.mt-card:hover .mt-card-img { transform: scale(1.04); }
.mt-card::after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(180deg, transparent, rgba(5,3,6,.88)); z-index: 1; }
.mt-card-badge {
  position: absolute; top: 9px; left: 9px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 7px;
  border-radius: 999px; background: rgba(12,8,12,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 11.5px; font-weight: 700;
}
.mt-card-badge .ico { width: 14px; height: 14px; }
.mt-card-foot { position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 2; display: flex; flex-direction: column; gap: 2px; }
.mt-card-foot b { font-size: 15.5px; line-height: 1.2; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.mt-from { display: inline-flex; align-items: center; gap: 3px; color: rgba(255,255,255,.75); font-size: 12px; font-weight: 600; }
.mt-from .diamond { width: 13px; height: 13px; }
.mt-card.skeleton { box-shadow: none; background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.mt-empty { padding: 40px 12px; text-align: center; color: var(--muted); }

/* The sheet: the scene's own picture, blurred, behind everything; the scene as
   a card with the user's face(s) set on its lower edge (him blue, her pink);
   then a glass panel with the length, each with its price.
   The body is a column and the stage (scene and faces) takes the height that
   is left: the scene is sized from it (container units), as large as the
   phone allows, so the length stays above Create on every phone. Below
   --stage-min (a phone on its side) the body scrolls instead. */
.modal-back.mt-back { align-items: stretch; }
.sheet.full.mytok-sheet { --her: #ff7db7; --him: #6fb0ff; padding-top: 0; background: #070507; isolation: isolate; }
@media (min-width: 768px) { .sheet.full.mytok-sheet { width: min(100%, 460px); align-self: center; } }
.mt-backdrop {
  position: absolute; inset: -40px; z-index: -1; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover;
  filter: blur(34px) saturate(1.25) brightness(.5); transform: scale(1.1);
}
.mytok-sheet::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 50% 30%, transparent, rgba(5,3,6,.55) 70%), linear-gradient(180deg, rgba(5,3,6,.15), rgba(5,3,6,.7) 75%); }
.mytok-sheet { --mt-face: 92px; --mt-overlap: 48px; --stage-min: 250px; }
.mytok-sheet .sheet-body { display: flex; flex-direction: column; padding: calc(10px + var(--safe-top)) 16px 10px; }
.mytok-sheet .sheet-body > * { flex-shrink: 0; }
.mt-top { position: relative; display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 46px; }
.mt-close { position: absolute; top: 1px; right: 0; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; }
.mt-close .ico { width: 20px; height: 20px; }
.mt-title { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 25px; letter-spacing: -.02em; text-shadow: 0 2px 16px rgba(0,0,0,.5); }

.mt-stage { flex: 1 0 var(--stage-min); container-type: size; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 8px; }
.mt-scene {
  position: relative; height: calc(min(40vw, 150px) * 16 / 9); aspect-ratio: 9 / 16; margin: 0; overflow: hidden; border-radius: 22px;
  /* the stage's height less the faces under the scene; at most 190 wide */
  height: min(calc(100cqh - var(--mt-face) - 28px + var(--mt-overlap)), calc(min(48vw, 190px) * 16 / 9));
  border: 1px solid rgba(255,255,255,.22); box-shadow: 0 24px 50px rgba(0,0,0,.55), 0 0 0 6px rgba(255,255,255,.04); animation: scene-in .5s var(--ease-out) both;
}
@keyframes scene-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.mt-scene img { width: 100%; height: 100%; object-fit: cover; }
.mt-scene::after { content: ''; position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, transparent, rgba(5,3,6,.55)); }
.mt-chip {
  position: absolute; z-index: 1; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 7px; border-radius: 999px;
  background: rgba(8,5,8,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 11.5px; font-weight: 700;
}
.mt-chip .ico { width: 14px; height: 14px; }
.mytok-sheet.solo .mt-chip .ico { color: var(--her); }
.mytok-sheet.couple .mt-chip .ico { color: var(--him); }
.mt-cast { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: center; gap: 6px; margin-top: calc(-1 * var(--mt-overlap)); }
.mt-face { --role: var(--her); position: relative; display: flex; flex-direction: column; align-items: center; width: 108px; }
.mt-face.man { --role: var(--him); }
.mt-face-ring {
  position: relative; display: grid; place-items: center; width: var(--mt-face); height: var(--mt-face); overflow: hidden; border-radius: 50%; cursor: pointer;
  border: 2.5px dashed var(--role); background: color-mix(in srgb, var(--role) 18%, rgba(12,8,12,.82)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(0,0,0,.45); transition: transform .14s ease;
}
.mt-face-ring:active { transform: scale(.95); }
/* a face is never see-through (it sits on the scene), even while busy */
button.mt-face-ring:disabled { opacity: 1; }
button.mt-face-ring:disabled:active { transform: none; }
button.mt-face-ring { padding: 0; color: inherit; font: inherit; }
/* a filled face: tap to edit it (the pencil on its lower edge says so) */
.mt-face-edit { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; display: grid; place-items: center; padding-top: 4px; background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; }
.mt-face-ring .mt-face-edit .ico { width: 15px; height: 15px; color: #fff; stroke-width: 2.2; }
.mt-face-ring .ico { width: 34px; height: 34px; color: var(--role); stroke-width: 2.4; }
.mt-face:not(.filled) .mt-face-ring { animation: face-breathe 2.4s ease-in-out infinite; }
@keyframes face-breathe { 50% { box-shadow: 0 10px 26px rgba(0,0,0,.45), 0 0 0 7px color-mix(in srgb, var(--role) 22%, transparent); } }
.mt-face.filled .mt-face-ring { border: 3px solid var(--role); box-shadow: 0 10px 26px rgba(0,0,0,.45), 0 0 22px color-mix(in srgb, var(--role) 45%, transparent); }
.mt-face-ring img { width: 100%; height: 100%; object-fit: cover; animation: face-in .35s var(--ease-out); }
@keyframes face-in { from { transform: scale(1.15); opacity: 0; } }
.mt-face-x { position: absolute; top: 0; right: 8px; z-index: 2; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 2px solid #070507; border-radius: 50%; background: #2a2427; color: #fff; }
.mt-face-x .ico { width: 14px; height: 14px; }
.mt-face-name { margin-top: 7px; padding: 3px 10px; border-radius: 999px; background: var(--role); color: #0b090a; font-size: 12px; font-weight: 800; white-space: nowrap; }
.mt-face:not(.filled) .mt-face-name { background: rgba(12,8,12,.7); color: #fff; box-shadow: inset 0 0 0 1.5px var(--role); }
.mt-swap { align-self: center; margin-top: calc(var(--mt-face) / 2 - 17px); width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mt-swap:disabled { opacity: .35; }
.mt-swap .ico { width: 18px; height: 18px; }
.mt-tip { margin: 8px auto 0; max-width: 300px; text-align: center; color: rgba(255,255,255,.66); font-size: 12.5px; line-height: 1.45; }

.mt-panel {
  margin-top: 12px; padding: 14px 14px 16px; border-radius: 24px; border: 1px solid rgba(255,255,255,.09);
  background: rgba(18,13,16,.66); backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
.mt-label { display: flex; align-items: baseline; gap: 6px; margin: 0 2px 8px; font-size: 13px; font-weight: 700; color: #f1eaed; }
.mt-label small { color: var(--muted); font-size: 12px; font-weight: 500; }
.mt-lengths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mt-lengths button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; padding: 6px 4px;
  border: 1.5px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(255,255,255,.05); color: #fff; transition: background-color .2s ease, border-color .2s ease, transform .12s ease;
}
.mt-lengths button:active { transform: scale(.97); }
.mt-lengths b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mt-lengths span { display: inline-flex; align-items: center; gap: 3px; color: rgba(255,255,255,.65); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-lengths .diamond { width: 12px; height: 12px; }
.mt-lengths button.on { background: #fff; border-color: #fff; color: #0b090a; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.mt-lengths button.on span { color: #4a4245; }
.mt-lengths button:disabled { opacity: .32; }
/* Styles: one row of pills that slides sideways, kept inside the panel's
   padding. The side with more to see fades out (more-left / more-right, set
   by main.js sideFades), so a pill there reads as "slide for more", never as
   cut off; the picked one is slid into view. */
.mt-styles {
  display: flex; gap: 8px; margin: 0 0 12px; padding: 1px 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
}
.mt-styles::-webkit-scrollbar { display: none; }
.mt-styles button {
  flex: 0 0 auto; max-width: 168px; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color: #fff; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background-color .2s ease, border-color .2s ease;
}
.mt-styles.more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.mt-styles.more-left { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 40px), transparent); }
.mt-styles.more-left.more-right {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}
.mt-styles button.on { background: #fff; border-color: #fff; color: #0b090a; }
.mt-style-note { margin: -4px 2px 12px; color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.4; }
/* Shorter screens (Safari leaves an iPhone 659–760 of its height, an SE 548):
   smaller faces and a tighter panel, so more of the height goes to the scene. */
@media (max-height: 820px) {
  .mt-title { font-size: 22px; }
}
@media (max-height: 700px) {
  .mytok-sheet { --mt-face: 80px; --mt-overlap: 40px; }
  .mt-panel { margin-top: 10px; padding: 12px 12px 14px; }
  .mt-lengths button { min-height: 54px; }
  .mt-styles { margin-bottom: 10px; gap: 6px; }
  .mt-styles button { min-height: 34px; padding: 0 14px; font-size: 13.5px; }
  .mt-style-note { display: none; }
  /* With styles, the pills and the lengths say what they are: the room goes to the scene. */
  .mt-panel.has-styles .mt-label { display: none; }
}
@media (max-height: 620px) {
  .mytok-sheet { --mt-face: 72px; --mt-overlap: 34px; --stage-min: 200px; }
  .mt-styles button { min-height: 31px; }
  .mt-title { font-size: 20px; }
  .mt-panel .mt-label { display: none; }
  .mt-lengths button { min-height: 48px; }
  .sheet-foot.mt-foot { padding-top: 6px; }
  .mt-create { min-height: 50px; }
}

.sheet-foot.mt-foot { display: block; padding-top: 10px; background: linear-gradient(180deg, rgba(7,5,7,0), rgba(7,5,7,.92) 35%); border-top: 0; }
.mt-create {
  --p: 0%; position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 18px;
  border: 0; border-radius: 999px; background: var(--cta); box-shadow: var(--cta-glow); color: #fff; font-size: 17px; font-weight: 800;
  transition: transform .12s ease, filter .2s ease;
}
.mt-create:active:not(:disabled) { transform: scale(.985); }
.mt-create.idle { filter: saturate(.55) brightness(.85); box-shadow: none; }
.mt-create.uploading { background: linear-gradient(90deg, #e63e8e 0 var(--p), #4a2236 var(--p) 100%); }
.mt-create:disabled { opacity: 1; }
.mt-create:disabled:not(.busy) { filter: saturate(.3) brightness(.7); box-shadow: none; }
.mt-price { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(0,0,0,.22); font-size: 15px; font-variant-numeric: tabular-nums; }
.mt-price .diamond { width: 13px; height: 13px; }
.mt-fine { margin: 9px 0 0; text-align: center; color: rgba(255,255,255,.55); font-size: 12px; }

/* Collection: a MyTok video's card says so. */
.tcard .mt-tag {
  position: absolute; top: 8px; left: 8px; z-index: 3; height: 20px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 999px;
  background: var(--cta); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; pointer-events: none;
}
.wallet-held { display: flex; align-items: center; gap: 5px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.wallet-held .diamond { width: 14px; height: 14px; }
.wallet-held b { color: var(--text); font-variant-numeric: tabular-nums; }

/* A membership ending soon (views.js renewBanner). */
.renew-bar {
  display: flex; align-items: center; gap: 10px; margin: 10px 12px 2px; padding: 10px 10px 10px 14px; border-radius: 14px;
  background: linear-gradient(100deg, rgba(240,79,158,.22), rgba(240,79,158,.08)); border: 1px solid rgba(240,79,158,.35);
}
.renew-bar p { flex: 1; margin: 0; font-size: 13px; line-height: 1.35; color: var(--text); }
.renew-bar b { color: #fff; }
.renew-btn { flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--pink); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.renew-x { flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.renew-x svg { width: 16px; height: 16px; }
/* In an app's own browser (modals.js payModal): pay in Safari or Chrome instead. */
/* Under Google or Pay inside an app's browser, only when it didn't work there: the way to Safari / Chrome. */
.alt-out { display: block; width: 100%; margin-top: 6px; padding: 6px; border: 0; background: none; color: var(--muted); font-size: 13px; text-align: center; }
.alt-out b { color: #ff8ec3; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
/* …and when that browser didn't open: the app's own ••• menu, or copy the link. */
.auth-out { margin-top: 14px; }
.pay-out-box { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 142, 195, .1); border: 1px solid rgba(255, 142, 195, .35); text-align: center; }
.pay-out-box p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text); }
.pay-out-box b { color: #fff; }
.pay-out-dots { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); letter-spacing: 1px; }
.pay-out-copy { margin-top: 10px; height: 34px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; background: none; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
/* Plans: how this purchase combines with the membership running (modals.js combineNote). */
.combine-note { margin: 10px 4px 0; font-size: 13px; line-height: 1.4; text-align: center; color: #ffc6e0; }
.am-then { margin-top: 2px; font-size: 12px; color: var(--muted); }

/* Invite friends, earn diamonds (views.js affiliate). */
.invite { padding: 8px 16px 32px; }
.inv-hero { padding: 18px 4px 14px; text-align: center; }
.inv-hero h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; }
.inv-hero h1 span { background: var(--cta); -webkit-background-clip: text; background-clip: text; color: transparent; }
.inv-hero p { margin: 0 auto; max-width: 340px; color: var(--muted); font-size: 14px; }
.inv-paused { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(245,205,85,.1); color: var(--gold); font-size: 13px; text-align: center; }
.inv-card { padding: 14px; border-radius: var(--radius); background: var(--lift), var(--surface); border: 1px solid var(--edge); }
.inv-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.inv-url { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(240,79,158,.45);
  background: var(--input); color: var(--text); font: 600 14px ui-monospace, "SF Mono", Menlo, monospace; text-align: left; cursor: pointer; }
.inv-url span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-url svg { flex: none; width: 18px; height: 18px; color: var(--pink-2); }
.inv-btns { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-top: 12px; }
.inv-btns .cta-btn, .inv-btns .ghost { width: 100%; margin: 0; }
.inv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.inv-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--edge); }
.inv-stat b { display: flex; align-items: center; gap: 5px; font-size: 20px; letter-spacing: -.01em; }
.inv-stat b svg { width: 16px; height: 16px; }
.inv-stat span { color: var(--muted); font-size: 12px; }
.inv-month { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--edge); display: grid; gap: 6px; }
.inv-month-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.inv-month-row b { color: var(--text); font-weight: 600; }
.inv-bar { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.inv-bar::-webkit-progress-bar { background: rgba(255,255,255,.08); border-radius: 999px; }
.inv-bar::-webkit-progress-value { background: var(--cta); border-radius: 999px; }
.inv-bar::-moz-progress-bar { background: var(--cta); border-radius: 999px; }
.invite h2 { margin: 24px 2px 10px; font-size: 17px; }
.inv-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.inv-steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; align-items: start; }
.inv-steps li::before { content: counter(step); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(240,79,158,.16); color: var(--pink-2); font-weight: 700; font-size: 14px; }
.inv-steps b { font-size: 14px; }
.inv-steps span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.inv-list { display: grid; gap: 8px; }
.inv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--edge); }
.inv-row div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.inv-row b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.inv-row span { color: var(--muted); font-size: 12px; }
.inv-row em { flex: none; font-style: normal; font-weight: 700; font-size: 16px; }
.inv-row.ok em { color: var(--ok); }
.inv-row.wait em { color: var(--gold); }
.inv-row.off em { color: var(--muted); }
.inv-none { color: var(--muted); font-size: 14px; text-align: center; padding: 16px 0; }
.inv-fine { margin: 20px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ---------- wide screens: a phone held sideways, a tablet ----------
   (2026-11-05, the user: no more narrow page when the phone is sideways.)
   From 640px the app fills the width instead of a 480px column with black on
   both sides: the bottom bar becomes a rail on the left, so the height goes
   to the content; the template grid takes more columns (views.js
   gridColumns); reading pages keep a column; the player shows videos whole
   (views.js fitsWhole). Phone notches (sideways) are kept clear with the
   left/right safe areas. */
.gen-side { display: contents; }
@media (min-width: 640px) {
  :root {
    --col: 100%; --nav: 0px; --rail: 76px;
    --safe-left: env(safe-area-inset-left, 0px); --safe-right: env(safe-area-inset-right, 0px);
  }
  #app { max-width: none; padding: 0 var(--safe-right) var(--safe-bottom) calc(var(--rail) + var(--safe-left)); }
  .bottom-nav {
    top: 0; bottom: 0; left: 0; transform: none;
    width: calc(var(--rail) + var(--safe-left)); height: auto;
    padding: calc(var(--safe-top) + 8px) 0 calc(var(--safe-bottom) + 8px) var(--safe-left);
    grid-template-columns: 1fr; grid-template-rows: repeat(5, minmax(0, 66px)); align-content: center; gap: 2px;
    border-top: 0; border-right: 1px solid var(--line);
  }
  .bottom-nav button { font-size: 11px; }
  .bottom-nav .dot { top: 8px; }
  .masonry { gap: 10px; padding: 0 12px; }
  .mcol { gap: 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 0 12px; }
  .page-reading .page-body { width: 100%; max-width: 760px; margin-inline: auto; }
  .task-dock.left { left: calc(var(--rail) + var(--safe-left) + 12px); }
  .task-dock.right { right: calc(var(--safe-right) + 12px); }
  /* the player runs to the bottom edge (under the home indicator, as videos do) */
  #app:has(> .page.is-feed) { padding-bottom: 0; }
  .feed-page { height: calc(100dvh - var(--header) - var(--safe-top)); }
  body.feed-expanded .feed-page { height: 100dvh; }
  /* sheets that cover the screen keep clear of a notch */
  .sheet.full { padding-left: var(--safe-left); padding-right: var(--safe-right); }
}

/* A phone held sideways (short and wide): whole cards in view, and the sheets
   side by side so their main button shows without scrolling. */
@media (min-width: 640px) and (max-height: 540px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .modal-back.small { padding: 8px calc(12px + var(--safe-right)) 8px calc(12px + var(--safe-left)); }
  .sheet.small { max-height: calc(100dvh - 16px); }
  .sheet.full, .sheet.full.auth-sheet, .sheet.full.mytok-sheet { width: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none; }

  /* the age check: the three lines in a row */
  .age { padding: 12px calc(24px + var(--safe-right)) 12px calc(24px + var(--safe-left)); }
  .age-card { width: min(100%, 640px); padding: 16px 18px 14px; border-radius: 22px; }
  .age-mark { top: 10px; left: 14px; width: 54px; transform: none; }
  .age-card h1 { margin: 2px 0 12px; }
  .age-card h1 .logo { font-size: 24px; }
  .age-rules { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .age-rules li { flex-direction: column; justify-content: center; gap: 6px; min-height: 0; padding: 10px 8px; text-align: center; font-size: 13px; }
  .age-note { margin: 10px 8px 12px; }
  .age-btn { height: 46px; }

  /* sign up: the picture on the left, the offer and the ways in on the right */
  .sheet.full.auth-sheet .sheet-body { flex-direction: row; }
  .auth-hero { flex: 0 0 40%; min-height: 0; }
  .auth-hero::after { background: linear-gradient(90deg, rgba(21,17,19,0) 50%, rgba(21,17,19,.6) 80%, var(--surface) 100%); }
  .auth-main { flex: 1 1 0; min-width: 0; margin: 0; padding: 14px 28px 12px; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; }
  .auth-main > * { width: 100%; max-width: 420px; margin-inline: auto; }
  .auth-main h2 { font-size: 22px; }
  .auth-offer { margin-top: 4px; font-size: 14px; }
  .auth-pitch { margin-top: 2px; font-size: 14px; }
  .auth-perks { display: none; }
  .auth-main .google-btn, .auth-main .email-btn { margin-top: 10px; }
  .auth-terms { margin-top: 8px; font-size: 12.5px; line-height: 1.6; }
  .auth-terms a { display: inline-block; padding: 8px 2px; margin: -6px -2px; }
  .auth-sheet .icon-btn.back { top: 12px; }
  .auth-sheet .icon-btn.close { top: 12px; }

  /* membership: one column down the middle, the button under it */
  .sheet.full.member-sheet { --page: 560px; }

  /* diamond packs: the four in a row, the art smaller */
  .sheet.packs-sheet { width: min(100%, 720px); }
  .packs-sheet .sheet-body { padding-top: 10px; }
  .packs-sheet .pk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0 12px; }
  .packs-sheet .pk-top { padding: 14px 6px 10px; }
  .packs-sheet .pk-art { height: 30px; }
  .packs-sheet .pk-amount { font-size: 21px; }
  .packs-sheet .pk-bottom { padding: 8px 6px 10px; }
  .packs-sheet .fine-print { margin-top: 8px; font-size: 12.5px; }

  /* MyTok: the scene and the faces on the left; the title, the tip, the
     length and Create on the right */
  .sheet.full.mytok-sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; column-gap: 20px; }
  .mytok-sheet .sheet-body { display: contents; }
  .mytok-sheet .mt-stage { grid-column: 1; grid-row: 1 / -1; min-height: 0; height: 100%; margin: 0; padding: 10px 0; }
  .mytok-sheet .mt-top { grid-column: 2; grid-row: 1; padding: 10px 46px 0 0; justify-content: flex-start; }
  .mytok-sheet .mt-title { text-align: left; font-size: 22px; }
  .mytok-sheet .mt-close { top: 10px; right: 12px; }
  .mytok-sheet .mt-tip { grid-column: 2; grid-row: 2; margin: 4px 12px 0 0; max-width: none; text-align: left; }
  .mytok-sheet .mt-panel { grid-column: 2; grid-row: 3; align-self: end; margin: 0 12px 0 0; overflow-y: auto; min-height: 0; }
  .mytok-sheet .mt-foot { grid-column: 2; grid-row: 4; padding: 8px 12px calc(10px + var(--safe-bottom)) 0; border-top: 0; background: none; }

  /* the photo editor (crop, MyTok's face): the photo on the left, the title,
     the zoom or shapes and the button on the right */
  .modal-back.pe-back { background: #050405; }
  .pe { width: 100%; height: 100%; padding: 0 var(--safe-right) 0 var(--safe-left); border-radius: 0; box-shadow: none;
    display: grid; grid-template-columns: minmax(0, 1fr) min(42%, 340px); grid-template-rows: auto minmax(0, 1fr) auto auto; }
  .pe-stage { grid-column: 1; grid-row: 1 / -1; }
  .pe-top { grid-column: 2; grid-row: 1; grid-template-columns: auto minmax(0, 1fr) auto; padding: 10px 12px 4px; }
  .pe-heading { text-align: left; }
  .pe-heading h2 { font-size: 16px; }
  .pe-heading p { white-space: normal; }
  .pe-zoom, .pe-shapes { grid-column: 2; grid-row: 3; margin: 8px 12px 0; }
  .pe-shapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pe-shapes .pe-shape { display: inline-block; }
  .pe-foot { grid-column: 2; grid-row: 4; padding: 10px 12px calc(12px + var(--safe-bottom)); }

  /* a result: the video takes the height under its title */
  .sheet.result-sheet .sheet-body { padding-bottom: 10px; }
  .result-view { min-height: 0; }
  .rv-tools { flex-direction: row; }
  .sheet.full .sheet-body > .sheet-head:first-child { min-height: 48px; }

  /* paying: a wider card, the methods in one row */
  .sheet.pay-sheet { width: min(100%, 640px); }

  /* generate: the photos and the preview on the left, the rest on the right
     with Generate at the foot */
  .sheet.gen-card { width: min(100%, 860px); height: calc(100dvh - 16px); }
  .sheet.gen-card .sheet-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 18px; padding: 12px 14px; overflow: hidden; }
  .sheet.gen-card .gen-side { display: block; grid-column: 2; min-width: 0; }
  .sheet.gen-card .gen-side.top { grid-row: 1; }
  .sheet.gen-card .gen-side.bottom { grid-row: 2; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .sheet.gen-card .gen-side.bottom > * { flex-shrink: 0; }
  .sheet.gen-card .sheet-body > .gen-grid { grid-column: 1; grid-row: 1 / -1; margin: 0; min-height: 0; height: 100%; max-width: none; }
  .sheet.gen-card .gen-side .gen-actions { margin: auto -2px 0; padding: 10px 2px 0; }
  .sheet.gen-card .gen-grid > * { min-height: 0; }
  .sheet.gen-card .gen-grid:not(.drama) .gen-right { min-height: 0; aspect-ratio: auto; height: 100%; }
  .sheet.gen-card .gen-grid:not(.drama):not(.pairs) .gen-left .gen-upload { aspect-ratio: auto; height: 100%; }
  .sheet.gen-card .gen-grid:not(.drama):not(.pairs) .gen-left > .upload-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .sheet.gen-card .gen-grid.pairs .gen-left { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); height: 100%; }
  .sheet.gen-card .gen-grid.pairs .gen-upload { aspect-ratio: auto; height: 100%; }
  .sheet.gen-card .gen-grid.trio { grid-template-rows: minmax(0, 1fr) auto; }
  .sheet.gen-card .gen-grid.trio .gen-left .gen-upload { aspect-ratio: 1 / 1; height: auto; }
  .sheet.gen-card .gen-grid.single .gen-right { aspect-ratio: auto; }
  .sheet.gen-card .gen-grid.drama { height: 100%; }
  .sheet.gen-card .gen-grid.drama .gen-right { aspect-ratio: auto; height: 100%; }
  .sheet.gen-card .gen-head { margin-bottom: 6px; }
  .sheet.gen-card .gen-addons, .sheet.gen-card .gen-prompt, .sheet.gen-card .length-row { margin-top: 8px; }
  .sheet.gen-card.prompted { --talk-media: auto; }
  .sheet.gen-card.prompted .gen-by { display: none; }
}

/* The first-purchase offer (public/js/offer.js): a full-screen gift over the
   plans. The headline with its share in pink, what it comes to on the plan
   picked, diamonds bursting from an open box (drawn, floating, the light
   breathing), the countdown as tiles, the pink Claim and a quiet Cancel. The
   strip on the membership sheet and the reminder on Explore stay quiet. */
.sheet.fo-sheet {
  width: min(100%, 420px); min-height: min(100%, 720px); border: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(90% 55% at 50% 52%, rgba(240,79,158,.16), transparent 70%), radial-gradient(70% 40% at 50% 0%, rgba(255,170,90,.08), transparent 70%), #121012;
}
.fo-sheet .sheet-body { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 100%; padding: 46px 22px 16px; overflow-x: hidden; text-align: center; }
.fo-clock { font-variant-numeric: tabular-nums; }
.fo-sheet .fo-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 42px; height: 42px; background: rgba(255,255,255,.06); }
.fo-title { margin: 0; font-size: clamp(24px, 7.4vw, 31px); font-weight: 800; font-style: italic; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
.fo-title em {
  font-style: inherit; background-image: linear-gradient(180deg, #ffb3d6 0%, #ff6fb0 55%, #ea4d98 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 14px rgba(240,79,158,.5));
}
.fo-sub { max-width: 300px; margin: 12px auto 0; color: rgba(255,255,255,.82); font-size: 15.5px; line-height: 1.45; text-wrap: balance; }
/* What it comes to on the plan picked */
.fo-plan {
  display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 0; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: rgba(240,79,158,.14); box-shadow: inset 0 0 0 1px rgba(255,125,183,.35); color: rgba(255,255,255,.86); font-size: 14px;
  animation: fo-pop .5s cubic-bezier(.3, 1.5, .5, 1) .25s backwards;
}
.fo-plan .diamond { width: 18px; height: 18px; }
.fo-plan b { color: #fff; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
@keyframes fo-pop { from { transform: scale(.6); opacity: 0; } }
/* The gift */
.fo-art { display: block; width: min(100%, 330px); height: auto; margin: 6px auto 0; flex: 1 1 auto; max-height: 300px; }
.fo-art .fo-glow { transform-box: fill-box; transform-origin: center; animation: fo-breathe 3.2s ease-in-out infinite; }
.fo-art .fo-rays { animation: fo-rays 3.2s ease-in-out infinite; }
.fo-art .fo-g { animation: fo-float 3.4s ease-in-out infinite; }
.fo-art .fo-g.big { animation-duration: 3s; }
.fo-art .fo-g.a, .fo-art .fo-g.d, .fo-art .fo-g.g { animation-delay: -.8s; }
.fo-art .fo-g.b, .fo-art .fo-g.e { animation-delay: -1.7s; }
.fo-art .fo-g.c, .fo-art .fo-g.f, .fo-art .fo-g.h { animation-delay: -2.5s; }
.fo-art .fo-spark path { transform-box: fill-box; transform-origin: center; animation: fo-twinkle 2.2s ease-in-out infinite; }
.fo-art .fo-spark path:nth-child(2) { animation-delay: -.7s; }
.fo-art .fo-spark path:nth-child(3) { animation-delay: -1.4s; }
@keyframes fo-breathe { 50% { transform: scale(1.06); opacity: .8; } }
@keyframes fo-rays { 50% { opacity: .25; } }
@keyframes fo-float { 50% { translate: 0 -6px; } }
@keyframes fo-twinkle { 0%, 100% { transform: scale(.4); opacity: .3; } 50% { transform: scale(1); opacity: 1; } }
/* The countdown as tiles */
.fo-expire { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; color: #fff; font-size: 19px; font-weight: 700; }
.fo-expire span { white-space: nowrap; }
@media (max-width: 374px) { .fo-expire { gap: 10px; font-size: 17px; } .fo-tiles b { min-width: 34px; font-size: 19px; } }
.fo-tiles { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.fo-tiles b { display: grid; place-items: center; min-width: 38px; height: 40px; padding: 0 6px; border-radius: 9px; background: #fff; color: #111; font-size: 21px; font-weight: 800; box-shadow: 0 6px 14px -8px rgba(0,0,0,.8); }
.fo-tiles i { font-style: normal; font-weight: 800; color: #fff; }
.fo-tiles.urgent b { background: #ff5a7a; color: #fff; animation: fo-urgent 1s ease-in-out infinite; }
@keyframes fo-urgent { 50% { transform: scale(1.06); } }
.fo-cta {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 360px; height: 56px; margin-top: 20px; padding: 0 20px;
  border: 0; border-radius: 999px; background: linear-gradient(180deg, #ff8fc2 0%, #f0589e 52%, #dc3f88 100%);
  box-shadow: 0 16px 32px -14px rgba(240,79,158,.85), inset 0 1px 0 rgba(255,255,255,.32), inset 0 0 0 1px rgba(255,170,208,.35);
  color: #fff; font-size: 19px; font-weight: 800; letter-spacing: -.005em; white-space: nowrap; transition: transform .12s;
}
.fo-cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 36%, rgba(255,255,255,.55) 50%, transparent 64%);
  transform: translateX(-120%); animation: mtp-shine 3s ease-in-out .8s infinite;
}
.fo-cta:active { transform: scale(.985); }
/* After a year: the same level for one month (offer.js monthOf), quieter than Claim, louder than Cancel. */
.fo-month {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; max-width: 360px; min-height: 54px; margin-top: 10px; padding: 7px 16px;
  border: 1px solid rgba(255,140,195,.45); border-radius: 999px; background: rgba(240,79,158,.08); color: #fff; transition: transform .12s;
}
.fo-month span { color: rgba(255,255,255,.66); font-size: 12.5px; font-weight: 600; }
.fo-month b { font-size: 15.5px; font-weight: 800; }
.fo-month:active { transform: scale(.985); }
.fo-leave { width: 100%; max-width: 360px; height: 46px; margin-top: 10px; border: 0; border-radius: 999px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.78); font-size: 16px; font-weight: 600; }
/* Shorter phones: a smaller gift, so Claim stays on the first screen. */
@media (max-height: 700px) {
  .fo-sheet .sheet-body { padding-top: 40px; }
  .fo-art { max-height: 210px; }
  .fo-sub { font-size: 14.5px; margin-top: 8px; }
  .fo-cta { margin-top: 14px; height: 52px; }
}
@media (max-height: 600px) {
  .fo-art { max-height: 150px; }
  .fo-title { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .fo-art .fo-glow, .fo-art .fo-rays, .fo-art .fo-g, .fo-art .fo-spark path, .fo-tiles.urgent b, .fo-plan { animation: none; }
}
/* The gift on the payment sheet */
.pay-sum-row.gift span:first-child { color: #ffb3d6; }

.fo-strip {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 9px 9px 9px 12px; border-radius: 14px; font-size: 14px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: #eee7ea;
}
.fo-strip .diamond { flex: none; width: 18px; height: 18px; }
/* The whole line is always readable: it shrinks a little on a narrow phone and wraps before it would be cut. */
.fo-strip > span { flex: 1; min-width: 0; font-size: clamp(12.5px, 3.6vw, 15px); line-height: 1.3; text-wrap: balance; }
.fo-strip b { color: #fff; }
/* The renewal bonus on the plans (modals.js renewStrip): no clock. */
.fo-strip.renew > span { text-align: left; }
.fo-strip .fo-clock { flex: none; padding: 3px 9px; border-radius: 999px; background: rgba(240,79,158,.18); color: #ff9fca; font-size: 13px; font-weight: 700; }

.fo-remind {
  position: fixed; z-index: 35; left: 50%; bottom: calc(var(--nav) + var(--safe-bottom) + 10px); transform: translateX(-50%);
  display: flex; align-items: center; width: min(calc(100% - 24px), calc(var(--col) - 24px)); padding: 6px 6px 6px 8px;
  border-radius: 18px; border: 1px solid rgba(255,255,255,.12); background: rgba(28,24,26,.94); color: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: fo-rise .35s var(--ease-out);
}
@keyframes fo-rise { from { opacity: 0; transform: translate(-50%, 12px); } }
.fo-remind-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: #fff; text-align: left; }
.fo-remind-gift { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(240,79,158,.16); }
.fo-remind-gift .diamond { width: 20px; height: 20px; }
.fo-remind-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fo-remind-text b { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-remind-text small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.fo-remind-text .fo-clock { color: #ff9fca; font-weight: 700; }
.fo-remind-go { flex: none; padding: 8px 15px; border-radius: 999px; background: linear-gradient(90deg, #e9408f, #ff7db7); color: #fff; font-size: 13.5px; font-weight: 700; }
.fo-remind-x { flex: none; width: 34px; height: 34px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: none; color: #8f878b; font-size: 22px; line-height: 1; }
@media (prefers-reduced-motion: reduce) { .fo-remind { animation: none; } }
/* The offer's last 10 minutes: every clock red, pulsing. */
.fo-clock.urgent { color: #ff5c7a !important; animation: fo-pulse 1s ease-in-out infinite; }
@keyframes fo-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .fo-clock.urgent { animation: none; } }

/* Less motion asked for: the passing lights and floating gems hold still (declared last, to win). */
@media (prefers-reduced-motion: reduce) {
  .mp-cta::after, .buy-btn::after, .welcome-go::after, .pk-card.on .pk-art svg, .fo-cta::after { animation: none; }
}

/* Explore: a checkout left on the provider's page (views.js pendingCard), in the sale banner's place. */
.welcome.pending .welcome-text em { font-style: normal; font-weight: 700; color: #ffd27a; }
.pending-go { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }

/* Explore's sale banner (views.js annualBanner): its title and line, one line each. */
.welcome-text .one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The keyboard up in any text field (keyboard.js kb-input): the tab bar steps
   aside, so on Android (where the page shrinks above the keyboard) it doesn't
   ride on top of the keyboard over what's being typed. */
html.kb-input .bottom-nav { visibility: hidden; }

/* 移动端登录全屏态：使用纯背景面避免毛玻璃穿透与闪烁 */
@media (max-width: 767.98px), (max-height: 500px) and (pointer: coarse) {
  html.auth-screen, html.auth-screen body, html.auth-screen #app { background: var(--surface); }
  html.auth-screen #app > :not(.modal-back):not(.toast) { visibility: hidden; }
  html.auth-screen .modal-back:has(> .auth-sheet) {
    background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

/* 软键盘弹起态（keyboard.js）：切至文档坐标 position: absolute 严格贴合 visualViewport，
   规避 iOS WKWebView 中 fixed 与 offsetTop 双重偏移造成的顶部大块空白和输入区被遮挡问题。 */
html.kb-open .modal-back {
  position: absolute;
  top: var(--vv-page-top, 0px);
  left: 0;
  right: 0;
  bottom: auto;
  height: var(--vv-h, 100%);
}
html.kb-open .modal-back.small { padding: 8px 12px; }
html.kb-open .sheet.small { max-height: 100%; }
html.kb-open .sheet.full,
html.kb-open .sheet.full.auth-sheet { height: 100%; max-height: 100%; padding-top: 0; }
html.kb-open body.locked .toast {
  position: absolute;
  top: calc(var(--vv-page-top, 0px) + var(--safe-top) + 12px);
  bottom: auto;
}
/* 登录弹窗输入期间收起顶部大图与非必要装饰，让标题、奖励提示、已有账号提示与表单按钮稳稳留在键盘上方 */
html.kb-open .auth-hero,
html.kb-open .auth-perks,
html.kb-open .auth-pitch:not(.auth-taken) { display: none; }
html.kb-open .auth-sheet .icon-btn.close,
html.kb-open .auth-sheet .icon-btn.back { top: calc(10px + var(--safe-top)); }
html.kb-open .auth-main { margin-top: 0; padding: calc(14px + var(--safe-top)) 20px 14px; }
html.kb-open .auth-main h2 { font-size: 20px; line-height: 1.25; padding: 4px 40px 0; }
html.kb-open .auth-offer { margin-top: 6px; font-size: 13.5px; }
html.kb-open .auth-taken { margin-top: 4px; font-size: 13.5px; }
html.kb-open .auth-main .google-btn { height: 44px; margin-top: 10px; font-size: 15px; }
html.kb-open .auth-or { margin: 8px 4px; }
html.kb-open .auth-email-form:not(.inline) { margin-top: 12px; }
html.kb-open .email-field { height: 48px; }
html.kb-open .auth-email-form .cta-btn { height: 46px; min-height: 46px; margin-top: 10px; }
html.kb-open .auth-note { margin-top: 8px; font-size: 12.5px; }
html.kb-open .auth-terms { margin-top: 10px; font-size: 11.5px; }
html.kb-open .auth-code .otp-sub { margin: 6px 0 12px; font-size: 13.5px; }
html.kb-open .auth-code .otp-cell { height: 50px; font-size: 23px; }
html.kb-open .auth-code .otp-msg { min-height: 16px; margin: 6px 0 8px; }
html.kb-open .auth-code .otp-form .cta-btn { height: 46px; min-height: 46px; }
html.kb-open .auth-code .otp-resend { margin-top: 10px; }
html.kb-open .sheet.gen-card .gen-actions { padding: 8px 14px 10px; }
