/* MojiPop artist experience. MomentCam 15 tokens (MPClassicTheme.m), light + dark. */
@font-face {
  font-family: "Fredoka One";
  src: url("/ref/fonts/google/fredoka-one-400-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ground: #FCF8EB;
  --card: #FFFDF7;
  --ink: #111114;
  --mut: #6B6B72;
  --line: rgba(0, 0, 0, .10);
  --accent: #F8EFD3;
  --on-accent: #0B0B0D;
  --glass: rgba(255, 252, 242, .72);
  --glass-strong: rgba(255, 252, 242, .88);
  --chip: rgba(0, 0, 0, .085);
  --scrim: rgba(252, 248, 235, .55);
  --shadow: 0 8px 28px rgba(60, 40, 10, .12);
  --ring: #00B4F4;
  --danger: #C64B3A;
  --r-card: 22px;
  --r-sheet: 30px;
  --brand: "Fredoka One", ui-rounded, system-ui, sans-serif; /* the MojiPop wordmark only */
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0E0E10;
    --card: #1C1C1F;
    --ink: #F2F2F4;
    --mut: #9C9CA4;
    --line: rgba(255, 255, 255, .13);
    --glass: rgba(28, 28, 31, .62);
    --glass-strong: rgba(28, 28, 31, .86);
    --chip: rgba(255, 255, 255, .14);
    --scrim: rgba(14, 14, 16, .48);
    --shadow: 0 8px 28px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #0E0E10;
  --card: #1C1C1F;
  --ink: #F2F2F4;
  --mut: #9C9CA4;
  --line: rgba(255, 255, 255, .13);
  --glass: rgba(28, 28, 31, .62);
  --glass-strong: rgba(28, 28, 31, .86);
  --chip: rgba(255, 255, 255, .14);
  --scrim: rgba(14, 14, 16, .48);
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.4 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- backdrop: a blurred copy of the artwork in focus ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.backdrop img {
  position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover;
  filter: blur(48px) saturate(1.25); opacity: 0; transition: opacity .45s ease;
}
.backdrop img.on { opacity: 1; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: var(--scrim); }

/* ---------- glass + pills ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: var(--shadow), inset 0 0 0 .5px rgba(255, 255, 255, .35);
}
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: transform .12s ease, background .18s ease;
}
.pill:active { transform: scale(.97); }
.pill svg { width: 18px; height: 18px; flex: none; }
.pill.accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 8px rgba(0, 0, 0, .16); }
.pill.quiet { background: var(--chip); }
.pill.big { height: 54px; font-size: 17px; font-weight: 700; padding: 0 22px; }
.pill.sm { height: 30px; font-size: 13px; padding: 0 12px; gap: 5px; }
.pill.sm svg { width: 15px; height: 15px; }
.round {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
}
.round svg { width: 21px; height: 21px; }
.chip {
  height: 32px; padding: 0 14px; border-radius: 999px; background: var(--chip);
  font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none;
}
.chip.on { background: var(--accent); color: var(--on-accent); }
.chip svg { width: 15px; height: 15px; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; z-index: 20; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.wordmark { font-family: var(--brand); font-size: 27px; letter-spacing: .2px; line-height: 1; padding: 6px 4px; }
.topbar .right { display: flex; gap: 8px; align-items: center; }
.topbar .explore { display: none; }

/* ---------- app shell ---------- */
.app { position: relative; z-index: 1; height: 100%; }

/* ---------- mobile stage: vertical, full-height, swipe like a feed ---------- */
.feed {
  height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }
.slide {
  position: relative; height: 100svh; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 72px) 14px calc(env(safe-area-inset-bottom) + 92px);
}
.art {
  position: relative; border-radius: var(--r-card); overflow: hidden; background: var(--card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
  max-width: 100%; max-height: 100%; aspect-ratio: var(--ar, 496 / 701);
  width: min(100%, calc((100svh - 164px) * var(--arn, .7076)));
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.art .heart {
  position: absolute; left: 12px; bottom: 12px; height: 32px; padding: 0 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; font-size: 14px;
  background: rgba(0, 0, 0, .38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.art .heart svg { width: 16px; height: 16px; }
.art .mine-tag {
  position: absolute; top: 12px; left: 12px; height: 28px; padding: 0 11px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.art .mine-tag svg { width: 13px; height: 13px; }
.art .busy {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, .28); color: #fff; font-weight: 700;
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.slide .meta {
  position: absolute; left: 14px; right: 70px; bottom: calc(env(safe-area-inset-bottom) + 96px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none;
}
.slide .meta > * { pointer-events: auto; }
.caption {
  max-width: 100%; padding: 8px 13px; border-radius: 16px; font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.side-actions {
  position: absolute; right: 14px; bottom: calc(env(safe-area-inset-bottom) + 100px);
  display: flex; flex-direction: column; gap: 10px;
}

body:not(.has-avatar) .mine-toggle { display: none; }

/* artist chip (compact; taps open the profile) */
.artist-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 6px 5px 5px; border-radius: 999px;
}
.artist-chip img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--chip); }
.artist-chip .name { font-weight: 700; font-size: 15.5px; line-height: 1; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artist-chip .follow { margin-left: 2px; }

/* bottom dock: the one primary action */
.dock {
  position: fixed; z-index: 15; left: 14px; right: 14px; bottom: calc(env(safe-area-inset-bottom) + 18px);
  display: flex; gap: 10px;
}
.dock .pill.big, .stage-actions .pill.big { flex: 1; }
.dock .pill.sq, .stage-actions .pill.sq { flex: none; width: 54px; padding: 0; }
.pill[disabled] { opacity: .5; }

/* ---------- desktop / laptop ---------- */
.side { display: none; }
.rail { display: none; }

@media (min-width: 900px) {
  body { overflow: hidden; }
  .topbar { top: 18px; left: 24px; right: 24px; }
  .topbar .explore { display: inline-flex; }
  .wordmark { font-size: 31px; }
  .app {
    display: grid; grid-template-columns: 300px 1fr; gap: 24px;
    padding: 86px 24px 24px; height: 100vh;
  }
  .side { display: block; }
  .profile-card { border-radius: 26px; padding: 26px 22px 20px; position: sticky; top: 0; }
  .feed {
    display: flex; flex-direction: row; overflow-x: auto; overflow-y: hidden; height: calc(100vh - 86px - 24px - 182px);
    scroll-snap-type: x mandatory; gap: 20px; padding: 0 calc(50% - 170px); align-items: center;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  }
  .slide {
    height: 100%; flex: none; padding: 6px 0; scroll-snap-align: center;
    transition: transform .3s ease, opacity .3s ease;
  }
  .slide:not(.focus) { transform: scale(.9); opacity: .55; }
  .art { width: auto; height: 100%; max-height: 100%; }
  .slide .meta, .side-actions { display: none; }
  .stage-wrap { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
  .rail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .rail-top .chips { margin: 0; }
  .stage-actions { display: flex; gap: 8px; }
  .stage-actions .pill.big { height: 42px; font-size: 15px; flex: none; min-width: 190px; }
  .stage-actions .pill.sq { width: 42px; min-width: 0; }
  .nav-btn { position: absolute; top: calc((100% - 182px) / 2); z-index: 4; transform: translateY(-50%); }
  .nav-btn.prev { left: 8px; } .nav-btn.next { right: 8px; }
  .rail { display: block; border-radius: var(--r-sheet); padding: 12px 14px 14px; height: 170px; }
  .rail .thumb { width: 72px; height: 96px; }
  .dock { display: none; }
}
@media (max-width: 899px) {
  .stage-actions, .nav-btn { display: none; }
}

/* profile card (desktop side + mobile sheet share this) */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.profile .pic { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; background: var(--chip);
  box-shadow: 0 0 0 4px var(--card), 0 8px 24px rgba(0, 0, 0, .15); margin-bottom: 6px; }
.profile h1 { font-family: var(--display); font-weight: 700; letter-spacing: -.3px; font-size: 28px; line-height: 1.1; margin: 0; word-break: break-word; }
.profile .id { color: var(--mut); font-size: 13px; }
.profile .bio { font-size: 14.5px; margin: 2px 0 6px; white-space: pre-line; }
.profile .acts { display: flex; gap: 8px; width: 100%; margin: 6px 0 4px; }
.profile .acts .pill { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin-top: 10px;
  border-top: 1px solid var(--line); padding-top: 14px; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-size: 19px; font-weight: 700; }
.stats span { font-size: 12px; color: var(--mut); }
.profile .open-app { width: 100%; margin-top: 14px; }

/* rail: chips + filmstrip */
.rail .chips { display: flex; gap: 8px; margin-bottom: 12px; }
.strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 3px; }
.strip::-webkit-scrollbar { display: none; }
.thumb { flex: none; width: 78px; height: 104px; border-radius: 12px; overflow: hidden; position: relative;
  background: var(--chip); outline: 2.5px solid transparent; outline-offset: 2px; transition: outline-color .18s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { outline-color: var(--ink); }

/* ---------- sheets ---------- */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.sheet-scrim.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 92svh; overflow-y: auto;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 10px 18px calc(env(safe-area-inset-bottom) + 22px);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
  transform: translateY(105%); transition: transform .34s cubic-bezier(.2, .9, .25, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
}
.sheet.open { transform: none; }
.sheet .grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.3px; font-size: 26px; margin: 4px 0 6px; text-align: center; }
.sheet .sub { color: var(--mut); text-align: center; font-size: 14px; margin: 0 0 18px; }
@media (min-width: 900px) {
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%; width: 460px; max-height: 86vh;
    border-radius: 28px; transform: translate(-50%, -48%) scale(.98); visibility: hidden;
    transition: transform .2s ease; pointer-events: none; background: var(--card);
  }
  .sheet.open { transform: translate(-50%, -50%); visibility: visible; pointer-events: auto; }
  .sheet.wide { width: min(980px, 92vw); }
  .sheet .grabber { display: none; }
}

/* profile sheet grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 18px; }
.grid button { aspect-ratio: 496 / 701; border-radius: 10px; overflow: hidden; background: var(--chip); }
.grid img { width: 100%; height: 100%; object-fit: cover; }

/* add-your-face */
.face-preview { width: 132px; height: 132px; margin: 6px auto 18px; position: relative; }
.face-preview img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.face-preview .brackets { position: absolute; inset: -10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack .pill { width: 100%; }
.privacy { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--mut);
  font-size: 12.5px; margin: 12px 0 4px; }
.privacy svg { width: 14px; height: 14px; }
.avatars-h { font-weight: 700; font-size: 15px; margin: 20px 0 10px; }
.avatars { display: flex; gap: 12px; overflow-x: auto; padding: 3px; scrollbar-width: none; }
.avatar-b { flex: none; width: 62px; text-align: center; font-size: 12px; color: var(--mut); }
.avatar-b .c { width: 62px; height: 62px; border-radius: 50%; overflow: hidden; background: var(--chip);
  display: grid; place-items: center; outline: 2.5px solid transparent; outline-offset: 2px; margin-bottom: 4px; }
.avatar-b .c img { width: 100%; height: 100%; object-fit: cover; }
.avatar-b.on .c { outline-color: var(--ink); }
.avatar-b .c svg { width: 24px; height: 24px; }

/* creating */
.creating { text-align: center; padding: 10px 0 6px; }
.ring { width: 168px; height: 168px; margin: 8px auto 18px; position: relative; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring img { position: absolute; inset: 16px; width: 136px; height: 136px; border-radius: 50%; object-fit: cover; background: var(--chip); }
.count { font: 700 48px/1 ui-monospace, "SF Mono", Menlo, monospace; margin: 4px 0 14px; }
.steps { list-style: none; padding: 0; margin: 0 auto; display: inline-flex; flex-direction: column; gap: 6px;
  text-align: left; font-size: 16px; color: var(--mut); }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.done { color: var(--ink); }
.steps li::before { content: "○"; display: inline-block; width: 22px; }
.steps li.done::before { content: "✓"; }
.steps li.now::before { content: "●"; }
.err { color: var(--danger); text-align: center; font-weight: 600; margin: 10px 0 0; }

/* editor */
.editor { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.editor > * { min-width: 0; }
.editor .canvas { aspect-ratio: 1; width: min(100%, 30svh); margin: 0 auto; border-radius: 22px; overflow: hidden;
  background: var(--chip); position: relative; }
.editor .canvas img { width: 100%; height: 100%; object-fit: contain; }
.editor .canvas .hd { position: absolute; inset: 0; background: #fff no-repeat; opacity: 0; transition: opacity .25s ease; }
.editor .canvas .hd.on { opacity: 1; }
.cats.packs { margin-top: 10px; }
.chip.sm { padding: 6px 12px; font-size: 13px; }
.editor .assets { margin-top: 10px; }
.ed-more { margin: 12px 2px 0; font-size: 13px; color: var(--mut); }
.ed-more a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.assets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-height: 32svh; overflow-y: auto; }
.asset { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--chip);
  outline: 2.5px solid transparent; outline-offset: -2.5px; }
.asset img { width: 100%; height: 100%; object-fit: contain; }
.asset.on { outline-color: var(--ink); }
@media (min-width: 900px) {
  .editor { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
  .editor .canvas { width: 100%; }
  .assets { max-height: 52vh; }
}

/* toast */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px);
  transform: translate(-50%, 20px); opacity: 0; transition: all .25s ease; pointer-events: none;
  padding: 11px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* empty / loading */
.state { position: fixed; inset: 0; display: grid; place-items: center; z-index: 2; text-align: center; padding: 30px; }
.state h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.3px; font-size: 26px; margin: 0 0 8px; }
.state p { color: var(--mut); margin: 0 0 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01s !important; }
}

/* =====================================================================
   Phone variants (?v=cards | ?v=immersive). Laptop keeps the stage layout.
   ===================================================================== */
.viewer-close, .artist-bubble, .gallery { display: none; }
.artist-bubble { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none;
  box-shadow: 0 0 0 2px var(--card), var(--shadow); }
.artist-bubble img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 899px) {
  /* ---------- A. Cards: MomentCam 15 Stage ---------- */
  .v-cards { --chrome-top: calc(env(safe-area-inset-top) + 74px); --chrome-bot: calc(env(safe-area-inset-bottom) + 214px); }
  .v-cards .topbar { left: 10px; right: 10px; padding: 6px 6px 6px 14px; border-radius: 27px;
    background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
    box-shadow: var(--shadow), inset 0 0 0 .5px rgba(255, 255, 255, .35); }
  .v-cards .topbar .wordmark { font-size: 25px; }
  .v-cards .topbar .open-app { height: 40px; box-shadow: none; }
  .v-cards .artist-bubble { display: block; }
  .v-cards .artist-bubble[hidden] { display: none; }
  .v-cards .feed {
    display: flex; flex-direction: row; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
    gap: 10px; padding: var(--chrome-top) 9vw var(--chrome-bot); align-items: center;
  }
  .v-cards .slide {
    flex: none; height: 100%; padding: 0; scroll-snap-align: center;
    width: min(82vw, calc((100svh - var(--chrome-top) - var(--chrome-bot)) * var(--arn)));
    transition: transform .3s ease, opacity .3s ease;
  }
  .v-cards .slide:not(.focus) { transform: scale(.93); opacity: .6; }
  .v-cards .art { width: 100%; height: auto; max-height: 100%; }
  .v-cards .slide .meta, .v-cards .side-actions, .v-cards .dock { display: none; }
  .v-cards .rail {
    display: flex; flex-direction: column; gap: 10px; position: fixed; z-index: 15; left: 8px; right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom)); border-radius: var(--r-sheet); padding: 12px 12px 12px;
  }
  .v-cards .rail-top { display: contents; }
  .v-cards .rail .chips { order: 1; overflow-x: auto; scrollbar-width: none; margin: 0; }
  .v-cards .rail .chips::-webkit-scrollbar { display: none; }
  .v-cards .rail .strip { order: 2; }
  .v-cards .rail .thumb { width: 58px; height: 80px; border-radius: 10px; }
  .v-cards .stage-actions { order: 3; display: flex; gap: 8px; }
  .v-cards .stage-actions .pill.big { height: 50px; font-size: 16px; }
  .v-cards .stage-actions .pill.sq { width: 50px; }

  /* ---------- B. Immersive: masonry, then a full-screen viewer ---------- */
  .v-imm body, body.v-imm { overflow: auto; }
  .v-imm .app { height: auto; min-height: 100%; }
  .v-imm .topbar { position: fixed; }
  .v-imm .topbar .open-app { height: 38px; }
  .v-imm .gallery { display: block; padding: calc(env(safe-area-inset-top) + 66px) 8px calc(env(safe-area-inset-bottom) + 96px); }
  .gallery-head { display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; }
  .gallery-head .pic { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none;
    box-shadow: 0 0 0 2px var(--card); }
  .gallery-head .who { flex: 1; min-width: 0; }
  .gallery-head .nm { font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gallery-head .sub { color: var(--mut); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .masonry { column-count: 2; column-gap: 8px; }
  .tile { display: block; width: 100%; margin: 0 0 8px; break-inside: avoid; border-radius: 16px; overflow: hidden;
    position: relative; background: var(--chip); }
  .tile img { width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; }
  .tile .heart { position: absolute; left: 8px; bottom: 8px; height: 26px; padding: 0 9px; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 5px; color: #fff; font-weight: 700; font-size: 12.5px;
    background: rgba(0, 0, 0, .38); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .tile .heart svg { width: 13px; height: 13px; }
  .tile .mine-dot { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
  .tile .mine-dot svg { width: 13px; height: 13px; }
  .v-imm .stage-wrap { position: fixed; inset: 0; z-index: 30; background: #000; display: none; }
  .v-imm.viewing .stage-wrap { display: block; }
  .v-imm.viewing { overflow: hidden; }
  .v-imm.viewing .viewer-close { display: grid; }
  .v-imm.viewing .wordmark { display: none; }
  .v-imm .viewer-close { margin-right: auto; color: #fff; }
  .v-imm.viewing .topbar { z-index: 35; }
  .v-imm .slide { padding: 0; }
  .v-imm .art { width: 100vw; height: 100svh; max-height: none; border-radius: 0; box-shadow: none; aspect-ratio: auto; }
  .v-imm .art img { object-fit: cover; }
  .v-imm .art .heart { display: none; }
  .v-imm .slide .meta { bottom: calc(env(safe-area-inset-bottom) + 92px); }
  .v-imm .slide::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; pointer-events: none;
    background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
  .v-imm .slide .meta, .v-imm .side-actions { z-index: 2; }
  .v-imm .caption { background: rgba(0, 0, 0, .3); color: #fff; box-shadow: none; }
  .v-imm .art .mine-tag { top: calc(env(safe-area-inset-top) + 70px); }
  .v-imm .dock { z-index: 36; }
  .v-imm:not(.viewing) .dock .pill.sq { display: none; }
}
@media (max-width: 899px) {
  .v-imm:not(.viewing) .topbar { left: 8px; right: 8px; padding: 6px 6px 6px 14px; border-radius: 27px;
    background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
    box-shadow: var(--shadow), inset 0 0 0 .5px rgba(255, 255, 255, .35); }
  .v-imm:not(.viewing) .topbar .wordmark { font-size: 25px; }
  .v-imm .backdrop { display: none; }
  .v-imm.viewing .backdrop { display: block; }
}
@media (max-width: 899px) {
  .v-imm .viewer-close { background: rgba(0, 0, 0, .38); color: #fff; box-shadow: none; }
  .v-imm.viewing .topbar .open-app { box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
  .v-cards { --chrome-top: calc(env(safe-area-inset-top) + 80px); }
}

/* ---------- laptop: full-height profile + artwork grid, bigger stage, actions on the card ---------- */
.card-actions { display: none; }
@media (min-width: 900px) {
  .app { grid-template-rows: 100%; }
  .side { min-height: 0; }
  .profile-card { height: 100%; display: flex; flex-direction: column; overflow: hidden; padding: 22px 18px 0; }
  .profile-card .profile .pic { width: 88px; height: 88px; }
  .side-head { font-weight: 700; font-size: 13px; color: var(--mut); margin: 16px 2px 8px; text-transform: uppercase; letter-spacing: .06em; }
  .side-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 6px; align-content: start; padding: 3px 3px 18px; scrollbar-width: thin; }
  .side-grid .thumb { width: auto; height: auto; aspect-ratio: 496 / 701; border-radius: 10px; }

  .stage-wrap { gap: 12px; }
  .rail { order: -1; height: auto; align-self: center; padding: 5px; border-radius: 999px; }
  .rail-top { margin: 0; }
  .rail .strip, .stage-actions { display: none; }
  .feed { height: calc(100vh - 86px - 24px - 54px); }
  .nav-btn { top: calc(50% + 27px); }
  .art .heart { left: auto; right: 12px; bottom: auto; top: 12px; }

  .slide.focus .card-actions {
    display: flex; gap: 8px; position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3;
  }
  .card-actions .pill.big { flex: 1; height: 48px; font-size: 15.5px; min-width: 0; }
  .card-actions .pill.sq { flex: none; width: 48px; padding: 0; }
  .card-actions .pill.accent, .card-actions .pill.glass {
    background: rgba(255, 252, 242, .62); color: #111114;
    -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18), inset 0 0 0 .5px rgba(255, 255, 255, .5);
  }
  .card-actions .pill.accent { background: rgba(248, 239, 211, .82); }
}
@media (min-width: 900px) {
  .side-grid .thumb { display: block; position: relative; min-height: 0; }
  .side-grid .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
}
@media (min-width: 900px) {
  /* aspect-ratio tiles with overflow:hidden report a 0 min-height, so auto rows collapse */
  .side-grid { grid-auto-rows: max-content; }
  .side-grid .thumb { height: 0; padding-bottom: 141.3%; aspect-ratio: auto; }
}

/* MojiPop wordmark: see-through letters with an ink outline, so the blurred art shows through */
.wordmark {
  color: rgba(255, 252, 242, .28);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 1px 10px rgba(255, 252, 242, .35);
  letter-spacing: .6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wordmark { color: rgba(255, 255, 255, .10); text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
}
:root[data-theme="dark"] .wordmark { color: rgba(255, 255, 255, .10); text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
/* over a full-screen artwork the outline must read on any colour */
.v-imm.viewing .wordmark { -webkit-text-stroke-color: #fff; }
@media (min-width: 900px) {
  .rail .rail-top .chips { margin: 0; }
}
/* inside the MojiPop app's own web view there is no "open in app" */
.in-app .open-app, .in-app [data-open-app] { display: none !important; }
.stores { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.stores img { height: 40px; width: auto; display: block; }

/* MC15 face brackets: rounded corner marks around each head on the focused card; tap to choose who */
.face-box {
  position: absolute; z-index: 2; border: 3px solid rgba(255, 255, 255, .95); border-radius: 30%;
  -webkit-mask: linear-gradient(to right, #000 28%, transparent 28% 72%, #000 72%), linear-gradient(to bottom, #000 28%, transparent 28% 72%, #000 72%);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(to right, #000 28%, transparent 28% 72%, #000 72%), linear-gradient(to bottom, #000 28%, transparent 28% 72%, #000 72%);
  mask-composite: intersect;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .45));
  opacity: 0; transition: opacity .25s ease;
}
.slide.focus .face-box { opacity: 1; }
.v-imm .face-box { display: none; }
.pill.ef { flex: none; padding: 0 16px; }
.pill.ef svg { width: 19px; height: 19px; }
@media (max-width: 899px) { .v-cards .stage-actions .pill.ef { height: 50px; } }
@media (min-width: 900px) { .card-actions .pill.ef { height: 48px; } }

/* wordmark: steadier fill, crisper outline */
.wordmark { color: rgba(255, 252, 242, .55); -webkit-text-stroke-width: 1.4px; text-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark { color: rgba(255, 255, 255, .16); } }
