/* Artdigg — Feed, post types, composer, menus, comments, lightbox, video player.
   Phones: edge to edge (posts span the full screen width, separated by an 8px gap).
   640px+: centred column of soft cards. Measurements follow the Figma post components
   (16px padding, 14/22 body text, 40px action buttons, 12px secondary text). */

:root { --like: #F0445C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --like: #FF5A73; } }
:root[data-theme="dark"] { --like: #FF5A73; }

/* ---------- Column ---------- */

.feed { max-width: 600px; margin: 0 auto; padding-bottom: 24px; }
.feed__top { background: var(--color-surface); margin-bottom: 8px; }
.feed__top .feed__stories { padding: 12px 0 10px; border-bottom: var(--hairline) solid var(--color-line); }
.feed__top .story-gap { background: var(--color-surface); }
.feed__top .story-plus { box-shadow: 0 0 0 2.5px var(--color-surface); }

/* ---------- "What's on your mind" ---------- */

.cmp-entry { padding: 12px 16px; }
.cmp-entry__box {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 4px 0 0;
  border-radius: 22px;
  background: var(--color-field);
  transition: background-color .15s ease;
}
.cmp-entry__field {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 16px;
  border-radius: 22px 0 0 22px;
  color: var(--color-ink-muted);
  font-size: 15px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmp-entry__plus {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: 0 0 0 var(--hairline) var(--color-line);
  transition: transform .15s ease, background-color .15s ease;
}
.cmp-entry__plus svg { width: 18px; height: 18px; }
.cmp-entry__plus[aria-expanded="true"], .cmp-entry__plus:active { transform: scale(.94); }

/* ---------- Post ---------- */

.post { background: var(--color-surface); margin-bottom: 8px; }
/* Posts far off screen are not laid out or painted; "auto" remembers the real height once seen, so nothing jumps */
.feed__list > .post { content-visibility: auto; contain-intrinsic-size: auto 620px; }
.post.is-new { animation: post-in .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes post-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.post__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; }
.post__avatar { flex: none; border-radius: var(--radius-full); }
.post__av { width: 44px; height: 44px; font-size: 15px; }
.post__who { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.post__name {
  max-width: 100%;
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  color: var(--color-ink);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post__meta { max-width: 100%; font-size: 12px; line-height: 16px; color: var(--color-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.post__date {
  flex: none;
  width: 46px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px var(--color-line-strong);
  line-height: 1;
}
.post__date b { font-size: 18px; font-weight: 700; color: var(--color-ink); }   /* normal colours (owner 23 Oct) */
.post__date small { margin-top: 4px; font-size: 10px; letter-spacing: .06em; color: var(--color-ink-muted); }
.post__date.is-past b { color: var(--color-ink-muted); }

.post__text { padding: 10px 16px 0; font-size: 14px; line-height: 22px; color: var(--color-ink); }
.post__p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-user-select: text;
  user-select: text;
}
.post__p.is-open { display: block; -webkit-line-clamp: unset; }
.post__moretext { padding: 0; font-size: 14px; color: var(--color-ink-muted); }
.post__moretext[hidden] { display: none; }
.rt-tag { padding: 0; font: inherit; font-weight: 700; color: var(--color-accent-text); }
.rt-link { color: var(--color-accent-text); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }

.post__evinfo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 8px 16px 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--color-ink-2);
}
.post__evinfo svg { width: 15px; height: 15px; color: var(--color-ink-muted); }
.post__evinfo .dot, .post__stats .dot { color: var(--color-ink-muted); opacity: .7; }

/* Media — full bleed */
.post__media {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 12px;
  overflow: hidden;
  background: var(--color-field);
  cursor: pointer;
}
.post__media > img, .post__media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Placeholder (until real media is supplied) */
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--color-field), color-mix(in srgb, var(--color-field) 70%, var(--color-ink) 6%));
  color: var(--color-ink-muted);
}
.ph svg { width: 28px; height: 28px; opacity: .55; }
.ph--video svg { width: 22px; height: 22px; padding: 14px; box-sizing: content-box; border-radius: var(--radius-full); background: rgba(0, 0, 0, 0.06); opacity: .7; }

/* Gallery: one wide on top, up to three below (Figma) */
.gal { display: flex; flex-direction: column; gap: 2px; background: var(--color-surface); }
.gal__cell { position: relative; display: block; width: 100%; overflow: hidden; background: var(--color-field); }
.gal > .gal__cell { aspect-ratio: 3 / 2; }
.gal__row { display: grid; gap: 2px; }
.gal__row--1 { grid-template-columns: 1fr; }
.gal__row--2 { grid-template-columns: 1fr 1fr; }
.gal__row--3 { grid-template-columns: 1fr 1fr 1fr; }
.gal__row .gal__cell { aspect-ratio: 1; }
.gal__row--1 .gal__cell { aspect-ratio: 3 / 2; }
.gal--2 { display: grid; grid-template-columns: 1fr 1fr; }
.gal--2 .gal__cell { aspect-ratio: 4 / 5; }
.gal__cell > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gal__more {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(10, 10, 14, 0.48);
  color: #FFFFFF;
}
.gal__more b { font-size: 24px; line-height: 28px; }
.gal__more span { font-size: 12px; }
.gal__more svg { position: absolute; right: 10px; bottom: 10px; width: 14px; height: 14px; }

/* Video */
.vid__sound {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: rgba(10, 10, 14, 0.55);
  color: #FFFFFF;
  backdrop-filter: blur(8px);
}
.vid__sound svg { width: 16px; height: 16px; }
.vid__dur {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(10, 10, 14, 0.55);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.vid__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.25); }
.vid__bar i { display: block; height: 100%; background: #FFFFFF; transform-origin: left; transform: scaleX(0); }

/* Event cover */
.ev__rsvp {
  position: absolute;
  right: 12px;
  bottom: 12px;
  height: 40px;
  padding: 0 12px 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.ev__rsvp svg { width: 12px; height: 12px; color: var(--color-ink-muted); }
.ev__rsvp .ev__ok { width: 14px; height: 14px; color: var(--color-accent); }
.ev__rsvp.is-set { font-weight: 700; }
.ev--past > img, .ev--past > .ph { filter: blur(10px) saturate(.8); transform: scale(1.08); }
.ev__finished {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 28px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-ink-2);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Link card (Figma: dark caption over the image) */
.lk { text-align: left; }
.lk > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lk__info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 14px;
  background: rgba(23, 23, 23, 0.9);
  color: #DDDDDD;
}
.lk__domain { font-size: 11px; line-height: 14px; opacity: .8; }
.lk__title { font-size: 16px; font-weight: 700; line-height: 20px; color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk__desc { font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Stats + actions */
.post__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--color-ink-muted);
}
.post__stats-r { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.post__stat { padding: 0; font: inherit; color: inherit; white-space: nowrap; }
.post__actions { display: flex; align-items: center; gap: 4px; padding: 6px 8px 8px; }
.post__spacer { flex: 1; }
.post__btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--color-ink-2);
  transition: background-color .15s ease, color .15s ease;
}
.post__btn svg { width: 22px; height: 22px; }
.heart-on { display: none; color: var(--like); }
.is-liked .heart-on { display: block; }
.is-liked .heart-off { display: none; }
.is-popping svg { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.28); } 100% { transform: scale(1); } }

.like-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  color: #FFFFFF;
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.3));
  animation: burst .8s cubic-bezier(.2, .8, .2, 1) forwards;
  z-index: 2;
}
.like-burst svg { width: 100%; height: 100%; }
@keyframes burst {
  0% { transform: scale(.3); opacity: 0; }
  20% { transform: scale(1.1); opacity: 1; }
  35% { transform: scale(.95); }
  70% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.05) translateY(-12px); opacity: 0; }
}

@media (hover: hover) {
  .post__btn:hover { background: var(--color-hover); color: var(--color-ink); }
  .post__stat:hover, .post__name:hover { text-decoration: underline; text-underline-offset: 2px; }
  .cmp-entry__box:hover { background: color-mix(in srgb, var(--color-field) 85%, var(--color-ink) 6%); }
  .cmp-entry__plus:hover { color: var(--color-accent); }
  .gal__cell:hover > img { filter: brightness(.94); }
}
.post__btn:active { transform: scale(.94); }

/* ---------- Cards from 640px ---------- */

@media (min-width: 640px) {
  .feed { padding: 16px 16px 40px; }
  .feed__top, .post {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 0 0 var(--hairline) var(--color-line);
  }
}
@media (min-width: 1024px) {
  .feed { padding-top: 0; }
}

/* ---------- Menus / action sheets ---------- */

.fsheet {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(10, 10, 14, 0);
  transition: background-color .18s ease;
}
.fsheet.is-open { background: rgba(10, 10, 14, 0.42); }
/* Inside the full-screen video player the sheet must not inherit its white text */
.fsheet { color: var(--color-ink); text-align: left; }
.fsheet__panel {
  width: 100%;
  max-width: 440px;
  margin: 8px;
  margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  padding: 6px;
  border-radius: 16px;
  background: var(--color-surface);
  box-shadow: var(--shadow-float);
  transform: translateY(14px);
  opacity: 0;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), opacity .18s ease;
}
.fsheet.is-open .fsheet__panel { transform: none; opacity: 1; }
.fsheet--anchored { display: block; background: transparent !important; }
.fsheet--anchored .fsheet__panel { position: absolute; width: 260px; margin: 0; transform: translateY(-4px) scale(.98); }
.fsheet__title { margin: 8px 12px 6px; font-size: 13px; line-height: 18px; text-align: center; color: var(--color-ink-muted); }
.fsheet__item {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--color-ink);
  font-size: 15px;
  text-align: left;
}
.fsheet__ic { width: 20px; height: 20px; color: var(--color-ink-2); }
.fsheet__check { width: 16px; height: 16px; margin-left: auto; color: var(--color-accent); }
.fsheet__item.is-danger, .fsheet__item.is-danger .fsheet__ic { color: var(--color-danger); }
.fsheet__cancel {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  border-radius: 12px;
  background: var(--color-field);
  color: var(--color-ink);
  font-weight: 700;
}
@media (hover: hover) { .fsheet__item:hover { background: var(--color-hover); } }
@media (min-width: 768px) { .fsheet:not(.fsheet--anchored) { align-items: center; } }

/* ---------- Comments ---------- */

.fsheet--comments .cm-panel {
  max-width: 560px;
  height: min(78vh, 680px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  border-radius: 20px 20px 0 0;
}
@media (min-width: 768px) { .fsheet--comments .cm-panel { margin: 0; border-radius: 16px; height: min(80vh, 640px); } }
.cm-panel__head {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-bottom: var(--hairline) solid var(--color-line);
}
.cm-panel__grab { position: absolute; top: 6px; width: 36px; height: 4px; border-radius: 2px; background: var(--color-line-strong); }
.cm-panel__title { margin: 0; font-size: 15px; font-weight: 700; }
.cm-panel__close { position: absolute; right: 6px; top: 6px; }
@media (min-width: 768px) { .cm-panel__grab { display: none; } }
.cm-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 8px 16px; list-style: none; }
.cm { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-radius: 12px; transition: background-color .2s ease; }
.cm.is-editing { background: var(--color-accent-soft); margin: 0 -8px; padding: 10px 8px; }
.cm__av { width: 32px; height: 32px; font-size: 12px; flex: none; }
.cm__body { flex: 1; min-width: 0; }
.cm__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0 0 2px; font-size: 13px; }
.cm__meta span { font-size: 12px; color: var(--color-ink-muted); }
.cm__text { margin: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.cm__acts { display: flex; align-items: center; gap: 14px; margin-top: 4px; min-height: 24px; font-size: 12px; color: var(--color-ink-muted); }
.cm__link { padding: 0; font-size: 12px; font-weight: 700; color: var(--color-ink-muted); }
.cm__likes { font-weight: 700; }
.cm__more { width: 28px; height: 24px; display: grid; place-items: center; color: var(--color-ink-muted); margin-left: -6px; }
.cm__more svg { width: 16px; height: 16px; }
.cm__like { flex: none; width: 36px; height: 36px; margin: -4px -8px 0 0; display: grid; place-items: center; color: var(--color-ink-muted); }
.cm__like svg { width: 16px; height: 16px; }
.cm__like .heart-on { display: none; color: var(--like); }
.cm__like.is-liked .heart-on { display: block; }
.cm__like.is-liked .heart-off { display: none; }
.cm--reported { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin: 4px 0; background: var(--color-field); }
.cm--reported p { margin: 0; font-size: 13px; color: var(--color-ink-muted); }
.cm-editbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-top: var(--hairline) solid var(--color-line);
  background: var(--color-accent-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent-text);
}
.cm-editbar svg { width: 16px; height: 16px; }
.cm-editbar .cm__link { margin-left: auto; color: var(--color-ink-2); }
.cm-editbar[hidden] { display: none; }
.cm-editbar:not([hidden]) + .cm-form { border-top: 0; }
/* 22 Oct: the composer always sits at the bottom of the sheet/modal — the list takes the rest of the height
   (scoped: the Crew list in tasks.css uses .cm-list too, with flex:none, which used to win here) */
.cm-panel .cm-list { flex: 1 1 auto; min-height: 0; display: block; max-width: none; margin: 0; overflow-y: auto; }
.cm-panel .cm-form { position: relative; margin-top: auto; border-top: 0; background: var(--color-surface); }
.cm-panel .cm-form::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-accent) 70%, transparent) 30%, color-mix(in srgb, var(--color-accent) 70%, transparent) 70%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--color-accent) 45%, transparent); opacity: .55; }
.cm-panel .cm-form__input { border-radius: 22px; background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-line-strong), 0 0 18px color-mix(in srgb, var(--color-accent) 14%, transparent); transition: box-shadow .2s ease; }
.cm-panel .cm-form__input:focus { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--color-accent) 80%, transparent), 0 0 22px color-mix(in srgb, var(--color-accent) 28%, transparent); }
.cm-panel .cm-empty { display: grid; place-items: center; min-height: 100%; }
/* 24 Oct (owner): the sheet sizes to the conversation — a few comments keep today's height, a long thread grows up to the
   full screen (Instagram) */
.fsheet--comments .cm-panel { height: auto; min-height: min(78vh, 680px); max-height: calc(100dvh - 24px); transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .2s ease; }
@media (min-width: 768px) { .fsheet--comments .cm-panel { min-height: min(80vh, 640px); max-height: 92vh; } }
@media (max-width: 767px) { .fsheet--comments .cm-panel { min-height: min(85dvh, 760px); max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px); } .cm-panel__head { touch-action: none; cursor: grab; } }
/* replies: indented under their comment, folded behind "— View replies (n)" */
.cm-thread { list-style: none; margin: -2px 0 4px 42px; }
.cm-thread__toggle { display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 12px; font-weight: 700; color: var(--color-ink-muted); background: none; border: 0; cursor: pointer; }
.cm-thread__toggle i { width: 24px; height: 1px; background: var(--color-line-strong); }
.cm-replies { margin: 0; padding: 0; list-style: none; }
.cm--reply .cm__av { width: 24px; height: 24px; font-size: 10px; }
@media (hover: hover) { .cm-thread__toggle:hover { color: var(--color-ink); } }
/* like count under the heart */
.cm__like { flex-direction: column; gap: 0; height: auto; min-height: 36px; padding: 6px 0 0; align-content: start; }
.cm__like-n { font-size: 11px; line-height: 14px; font-weight: 600; color: var(--color-ink-muted); font-variant-numeric: tabular-nums; }
/* who you're answering, above the composer */
.cm-replybar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 8px 16px; font-size: 13px; color: var(--color-ink-muted); background: var(--color-field); }
.cm-replybar[hidden] { display: none; }
.cm-replybar .cm__link { display: grid; place-items: center; width: 28px; height: 28px; }
.cm-replybar svg { width: 14px; height: 14px; }
.fsheet--over { z-index: 96; }
@media (hover: hover) and (pointer: fine) {
  .cm__link:hover, .cm__more:hover { color: var(--color-ink); }
  .cm__like:hover { color: var(--color-ink); }
}
.cm-empty { padding: 40px 16px; text-align: center; color: var(--color-ink-muted); font-size: 14px; }
.cm-form {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 16px;
  border-top: var(--hairline) solid var(--color-line);
}
.cm-form__av { width: 32px; height: 32px; font-size: 12px; }
.cm-form__input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-field);
  color: var(--color-ink);
  font-size: var(--fs-field);
  outline: none;
}
.cm-form__input::placeholder { color: var(--color-ink-muted); }
.cm-form__send { padding: 0 6px; font-weight: 700; color: var(--color-accent-text); }
.cm-form__send:disabled { color: var(--color-ink-muted); opacity: .6; cursor: default; }

/* ---------- Lightbox ---------- */

.lbx {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0B0B0E;
  color: #FFFFFF;
  opacity: 0;
  transition: opacity .18s ease;
  touch-action: none;
}
.lbx.is-open { opacity: 1; }
.lbx__top {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 8px 16px;
  z-index: 2;
}
.lbx__count { font-size: 14px; opacity: .8; }
.lbx__btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-full); color: #FFFFFF; }
.lbx__btn svg { width: 22px; height: 22px; }
.lbx__stage { width: 100%; height: 100%; display: grid; place-items: center; padding: 56px 0; }
.lbx__frame { position: relative; width: min(100%, calc((100vh - 112px) * var(--r, 1))); max-width: 100%; max-height: calc(100vh - 112px); overflow: hidden; }
.lbx__frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lbx__frame .ph { background: #18181C; color: #6E6E7A; }
.lbx__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  display: none;
  place-items: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  color: #17171C;
}
.lbx__nav svg { width: 16px; height: 16px; }
.lbx__nav--prev { left: 20px; }
.lbx__nav--next { right: 20px; }
@media (min-width: 768px) { .lbx__nav:not([hidden]) { display: grid; } }

/* ---------- Videos (immersive) ---------- */

.wv {
  position: fixed;
  inset: 0;
  z-index: 86;
  background: #000;
  color: #FFFFFF;
  opacity: 0;
  transition: opacity .2s ease;
}
.wv.is-open { opacity: 1; }
.wv__top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 24px;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
}
.wv__top > * { pointer-events: auto; }
.wv__title { margin: 0; text-align: center; font-size: 16px; font-weight: 700; }
.wv__btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-full); color: #FFFFFF; }
.wv__btn svg { width: 22px; height: 22px; }
.wv__list { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.wv__list::-webkit-scrollbar { display: none; }
.wv__slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.wv__media { position: absolute; inset: 0; background: #000; }
.wv__media > video { width: 100%; height: 100%; object-fit: contain; display: block; }
.wv__media .mv > img, .wv__media .mv > video { object-fit: contain; }
.wv__media .ph { background: #121216; color: #55555F; }
.wv__media .ph svg { background: rgba(255, 255, 255, 0.06); }
.wv__media.is-paused::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8.5 6.1v11.8c0 .9.97 1.44 1.73.97l9.2-5.9a1.15 1.15 0 0 0 0-1.94l-9.2-5.9C9.47 4.66 8.5 5.2 8.5 6.1z'/%3E%3C/svg%3E") center / 28px no-repeat;
}
.wv__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.2); z-index: 2; }
.wv__bar i { display: block; height: 100%; background: #FFFFFF; transform-origin: left; transform: scaleX(0); }
.wv__info {
  position: absolute;
  left: 0;
  right: 72px;
  bottom: 0;
  z-index: 2;
  padding: 48px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.wv__info .rt-tag, .wv__info a { pointer-events: auto; color: #FFFFFF; font-weight: 700; }
.wv__who { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.wv__who span:last-child { opacity: .7; font-size: 13px; }
.wv__av { width: 32px; height: 32px; font-size: 12px; }
.wv__av.avatar--initials { background: rgba(255, 255, 255, 0.18); color: #FFFFFF; }
.wv__text {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wv__views { display: block; margin-top: 6px; font-size: 12px; opacity: .7; }
.wv__rail {
  position: absolute;
  right: 6px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.wv__act {
  min-width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
}
.wv__act svg { width: 28px; height: 28px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35)); }
.wv__act.is-liked .heart-on { display: block; }

@media (min-width: 768px) {
  .wv__media { inset: 16px auto 16px 50%; width: min(calc((100vh - 32px) * 9 / 16), 520px); transform: translateX(-50%); border-radius: 14px; overflow: hidden; }
  .wv__info { left: 50%; right: auto; width: min(calc((100vh - 32px) * 9 / 16), 520px); transform: translateX(-50%); bottom: 16px; border-radius: 0 0 14px 14px; }
  .wv__rail { right: auto; left: calc(50% + min(calc((100vh - 32px) * 9 / 32), 260px) + 16px); bottom: 32px; }
  .wv__act { color: #FFFFFF; }
}

/* ---------- Composer ---------- */

.cmp {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(10, 10, 14, 0);
  transition: background-color .2s ease;
}
.cmp.is-open { background: rgba(10, 10, 14, 0.45); }
.cmp__panel {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  transform: translateY(24px);
  opacity: 0;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}
.cmp.is-open .cmp__panel { transform: none; opacity: 1; }
.cmp__head {
  flex: none;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px 6px;
  border-bottom: var(--hairline) solid var(--color-line);
  min-height: 56px;
}
.cmp__title { margin: 0; text-align: center; font-size: 16px; font-weight: 700; }
.cmp__post {
  height: 36px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: 14px;
  font-weight: 700;
  transition: opacity .15s ease;
}
.cmp__post:disabled { opacity: .35; cursor: default; }
.cmp__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cmp__author { display: flex; align-items: center; gap: 12px; }
.cmp__av { width: 44px; height: 44px; font-size: 15px; }
.cmp__who { display: flex; flex-direction: column; }
.cmp__who b { font-size: 15px; }
.cmp__who small { font-size: 12px; color: var(--color-ink-muted); }
.cmp__text {
  width: 100%;
  min-height: 96px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-size: 18px;
  line-height: 26px;
}
.cmp__text::placeholder { color: var(--color-ink-muted); }

.cmp__event {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 var(--hairline) var(--color-line-strong);
}
.cmp__event[hidden] { display: none; }
.cmp__event-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cmp__event-head svg { width: 18px; height: 18px; color: var(--color-ink-2); }
.cmp__link { margin-left: auto; font-size: 13px; color: var(--color-ink-muted); }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld--full { grid-column: 1 / -1; }
.fld span { font-size: 12px; color: var(--color-ink-muted); }
.fld input {
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--color-field);
  color: var(--color-ink);
  font: inherit;
  font-size: var(--fs-field);
  outline: none;
  min-width: 0;
  width: 100%;
}
.fld input:focus { box-shadow: inset 0 0 0 1px var(--color-line-strong); background: var(--color-surface); }

.cmp__media { display: grid; gap: 6px; }
.cmp__media:empty { display: none; }
.cmp__media--1 { grid-template-columns: 1fr; }
.cmp__media--2 { grid-template-columns: 1fr 1fr; }
.cmp__media--3 { grid-template-columns: repeat(3, 1fr); }
.cmp__thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--color-field); }
.cmp__media--1 .cmp__thumb { aspect-ratio: 4 / 3; }
.cmp__thumb > img, .cmp__thumb > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp__rm {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: rgba(10, 10, 14, 0.6);
  color: #FFFFFF;
}
.cmp__rm svg { width: 14px; height: 14px; }
.cmp__dur { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 99px; background: rgba(10, 10, 14, 0.6); color: #FFFFFF; font-size: 12px; font-weight: 700; }

.cmp__story { display: flex; align-items: center; gap: 12px; padding: 4px 0; cursor: pointer; }
.cmp__story[hidden] { display: none; }
.cmp__story-cb { position: absolute; opacity: 0; pointer-events: none; }
.cmp__switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--color-toggle-track);
  box-shadow: inset 0 0 0 1px var(--color-line-strong);
  transition: background-color .18s ease;
}
.cmp__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform .18s ease;
}
.cmp__story-cb:checked + .cmp__switch { background: var(--color-accent); box-shadow: none; }
.cmp__story-cb:checked + .cmp__switch::after { transform: translateX(18px); }
.cmp__story-cb:focus-visible + .cmp__switch { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.cmp__story-text { display: flex; flex-direction: column; font-size: 14px; }
.cmp__story-text small { font-size: 12px; color: var(--color-ink-muted); }

.cmp__tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) 16px;
  border-top: var(--hairline) solid var(--color-line);
}
.cmp__tools-label { flex: 1; font-size: 14px; color: var(--color-ink-2); }
.cmp__tool { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-md); color: var(--color-ink-2); }
.cmp__tool svg { width: 22px; height: 22px; }
.cmp__tool.is-on { background: var(--nav-bg-active); color: var(--color-accent); }

.cmp__confirm {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(10, 10, 14, 0.4);
}
.cmp__confirm[hidden] { display: none; }
.cmp__confirm-panel {
  width: 100%;
  max-width: 420px;
  margin: 8px;
  margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  padding: 6px;
  border-radius: 16px;
  background: var(--color-surface);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
}
.cmp__confirm-panel p { margin: 12px 12px 8px; text-align: center; font-size: 14px; color: var(--color-ink-2); }
.cmp__confirm-btn { height: 48px; border-radius: 12px; font-size: 15px; color: var(--color-ink); }
.cmp__confirm-btn.is-danger { color: var(--color-danger); font-weight: 700; }

@media (hover: hover) {
  .cmp__tool:hover { background: var(--color-hover); color: var(--color-ink); }
  .cmp__confirm-btn:hover { background: var(--color-hover); }
}

@media (min-width: 768px) {
  .cmp { align-items: center; padding: 24px; }
  .cmp__panel { max-width: 560px; max-height: min(86vh, 760px); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-float); }
  .cmp__head { padding-top: 6px; }
  .cmp__confirm { align-items: center; }
}

/* ---------- Toast with action ---------- */

.toast.toast--action { display: flex; align-items: center; gap: 14px; }
.toast.toast--action.is-visible { pointer-events: auto; }
.toast__action { font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .post.is-new, .like-burst, .is-popping svg { animation: none; }
}
.gal__cell:has(.gal__more) .ph svg { display: none; }

/* ---------- Repost and quote ---------- */

.post__btn--rp.is-reposted { color: var(--color-success); }
.post__rp {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 0 30px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-ink-muted);
}
.post__rp svg { width: 15px; height: 15px; flex: none; }
.post__rp button { color: inherit; font: inherit; }
.post--repost .post__head { padding-top: 8px; }
.post.is-flash { animation: post-flash 1.2s ease; }
@keyframes post-flash { 0%, 40% { box-shadow: inset 0 0 0 2px var(--color-accent); } 100% { box-shadow: inset 0 0 0 2px transparent; } }

.post__quote { padding: 0 16px 12px; }
.qt {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 var(--hairline) var(--color-line-strong);
  text-align: left;
  color: var(--color-ink);
  background: var(--color-surface);
  transition: background-color .15s ease;
}
button.qt:active { background: var(--color-hover); }
.qt--gone { color: var(--color-ink-muted); font-size: 14px; background: var(--color-field); box-shadow: none; }
.qt__head { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.qt__head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt__head small { flex: none; color: var(--color-ink-muted); font-size: 13px; }
.qt__av { width: 22px; height: 22px; font-size: 9px; font-weight: 700; color: var(--color-ink-2); }
.qt__body { display: flex; gap: 12px; align-items: flex-start; }
.qt__text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}
.qt__img { flex: none; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--color-field); }
.qt__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp__quote { padding: 4px 0 8px; }
@media (hover: hover) and (pointer: fine) {
  button.qt:hover { background: var(--color-hover); }
  .post__rp button:hover { color: var(--color-ink); text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) { .post.is-flash { animation: none; } }

.cmp__tools[hidden] { display: none; }

/* ---------- Link players and cards ---------- */

.lk--video { cursor: pointer; background: #000; }
.lk--video > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lk__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 16, 20, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  transition: transform .15s ease, background-color .15s ease;
}
.lk__play svg { width: 26px; height: 26px; margin-left: 3px; }
.lk--video:active .lk__play { transform: scale(.94); }
.lk-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.lk__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: var(--color-field);
  color: var(--color-ink);
}
.lk__bar { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "d x" "t x"; row-gap: 2px; }
.lk__bar .lk__domain { display: block; grid-area: d; font-size: 12px; color: var(--color-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk__bar .lk__title { display: block; grid-area: t; font-size: 15px; font-weight: 700; line-height: 20px; color: var(--color-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk__ext { grid-area: x; width: 16px; height: 16px; color: var(--color-ink-muted); }

.lk-audio {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 4px;
  padding: 10px;
  border-radius: 14px;
  background: var(--color-field);
  color: var(--color-ink);
  cursor: pointer;
}
.lk-audio__cover { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--color-surface); color: var(--color-ink-muted); }
.lk-audio__cover img { width: 100%; height: 100%; object-fit: cover; }
.lk-audio__cover svg { width: 24px; height: 24px; }
.lk-audio__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lk-audio__txt .lk__domain { font-size: 12px; color: var(--color-ink-muted); opacity: 1; }
.lk-audio__txt .lk__title { font-size: 15px; color: var(--color-ink); line-height: 20px; }
.lk-audio__play { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--color-ink); color: var(--color-surface); }
.lk-audio__play svg { width: 16px; height: 16px; margin-left: 2px; }
.lk-audio--playing { padding: 0; background: none; cursor: default; overflow: hidden; }
.lk-audio--playing .lk-frame { position: static; width: 100%; border-radius: 12px; background: transparent; }

.lk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  margin: 0 16px 4px;
  padding: 12px;
  border-radius: 14px;
  background: var(--color-field);
  text-align: left;
  color: var(--color-ink);
}
.lk-row__ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--color-surface); color: var(--color-ink-2); }
.lk-row__ic svg { width: 20px; height: 20px; }
.lk-row__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lk-row__txt .lk__domain { font-size: 12px; color: var(--color-ink-muted); opacity: 1; }
.lk-row__txt .lk__title { font-size: 15px; color: var(--color-ink); line-height: 20px; }
.lk-row__chev { width: 16px; height: 16px; color: var(--color-ink-muted); }

.cmp__linkprev { padding: 4px 0 8px; }
.cmp-lk { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 44px 10px 10px; border-radius: 14px; background: var(--color-field); }
.cmp-lk__img { flex: none; width: 72px; height: 54px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--color-surface); color: var(--color-ink-muted); }
.cmp-lk__img img { width: 100%; height: 100%; object-fit: cover; }
.cmp-lk__img svg { width: 22px; height: 22px; }
.cmp-lk__txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cmp-lk__txt b { font-size: 14px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmp-lk__txt small { font-size: 12px; color: var(--color-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-lk__x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--color-ink-2); }
.cmp-lk__x svg { width: 16px; height: 16px; }
@media (min-width: 640px) {
  .lk__bar { border-radius: 0; }
}
@media (hover: hover) and (pointer: fine) {
  .lk--video:hover .lk__play { background: rgba(16, 16, 20, .72); transform: scale(1.05); }
  .lk__bar:hover, .lk-row:hover { background: color-mix(in srgb, var(--color-field) 85%, var(--color-ink) 6%); }
}
.lk--social { cursor: pointer; background: var(--color-field); }
.lk--social > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lk__social { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--color-ink-2); }
.lk__social svg { width: 32px; height: 32px; color: var(--color-ink-muted); }
.lk__social b { font-size: 16px; }
.lk__social small { font-size: 13px; color: var(--color-ink-muted); }
.lk--social.is-social-playing { background: var(--color-surface); }
.lk--social.is-social-playing .lk-frame { background: var(--color-surface); }

/* "+" in the composer bar: the white circle keeps its size, the plus inside is half as big */
.cmp-entry__plus svg { width: 9px; height: 9px; }

/* ---------- Gallery = Instagram carousel ---------- */
.car { position: relative; overflow: hidden; background: var(--color-field); }
.car__track { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.car__track::-webkit-scrollbar { display: none; }
.car__slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; position: relative; cursor: zoom-in; }
.car__slide > img, .car__slide > .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.car__count { position: absolute; top: 12px; right: 12px; z-index: 2; padding: 4px 9px; border-radius: 999px; background: rgba(15, 15, 18, .62); color: #FFFFFF;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; pointer-events: none;
  opacity: 1; transition: opacity .35s ease; }
.car:not(.is-moved) .car__count { opacity: .92; }
.car__nav { position: absolute; top: 50%; z-index: 2; width: 30px; height: 30px; margin-top: -15px; display: none; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #17171C; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); opacity: 0; transition: opacity .15s ease; }
.car__nav svg { width: 14px; height: 14px; }
.car__nav--prev { left: 10px; }
.car__nav--next { right: 10px; }
@media (hover: hover) and (pointer: fine) {
  .car__nav:not([hidden]) { display: grid; }
  .car:hover .car__nav { opacity: 1; }
}
.car__dots { display: flex; justify-content: center; align-items: center; gap: 4px; height: 18px; margin-top: 2px; }
.car__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-line-strong); transition: background-color .2s ease, transform .2s ease; }
.car__dots i.is-on { background: var(--color-accent); transform: scale(1.1); }
.post--gallery .post__foot, .post--gallery .post__stats { margin-top: 0; }

/* ---------- Full-screen album ---------- */
.lbx { flex-direction: column; }
.lbx__sp { flex: 1; }
.lbx__top { gap: 4px; justify-content: flex-start; }
.lbx__count { font-variant-numeric: tabular-nums; }
.lbx__btn[aria-pressed="true"] { background: rgba(255, 255, 255, .16); }
.lbx__track { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x pinch-zoom; }
.lbx__track::-webkit-scrollbar { display: none; }
.lbx__slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; padding: calc(60px + env(safe-area-inset-top, 0px)) 0 calc(76px + env(safe-area-inset-bottom, 0px)); scroll-snap-align: center; scroll-snap-stop: always; }
.lbx__slide .lbx__frame { width: min(100%, calc((100dvh - 150px) * var(--r, 1))); max-height: calc(100dvh - 150px); }
.lbx__foot { position: absolute; inset: auto 0 0 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.lbx__foot > * { pointer-events: auto; }
.lbx__dots { display: flex; gap: 5px; }
.lbx__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .35); transition: background-color .2s ease; }
.lbx__dots i.is-on { background: #FFFFFF; }
.lbx__credit { max-width: 100%; }
.lbx.is-grid .lbx__track, .lbx.is-grid .lbx__dots { visibility: hidden; }
.lbx__grid { position: absolute; inset: 0; z-index: 1; overflow-y: auto; padding: calc(60px + env(safe-area-inset-top, 0px)) 2px calc(76px + env(safe-area-inset-bottom, 0px)); background: #0B0B0E; }
.lbx__gridIn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; max-width: 960px; margin: 0 auto; }
@media (min-width: 768px) { .lbx__gridIn { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; } }
.lbx__thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: #18181C; }
.lbx__thumb > img, .lbx__thumb > .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (pointer: fine) { .lbx__thumb:hover > img { opacity: .85; } }

/* ---------- Where it came from ---------- */
.src-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 5px; border: 1px solid var(--color-line); border-radius: 999px;
  color: var(--color-ink-muted); font-size: 11.5px; font-weight: 600; line-height: 17px; text-decoration: none; vertical-align: 1px; white-space: nowrap; }
.src-tag svg { width: 12px; height: 12px; }
.src-tag svg:last-child:not(:first-child) { width: 10px; height: 10px; opacity: .7; }
a.src-tag:hover { color: var(--color-ink); border-color: var(--color-line-strong); }
.src-credit { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px 10px; padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85); font-size: 12.5px; line-height: 17px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.src-credit > svg { width: 14px; height: 14px; }
.src-credit a { color: #FFFFFF; }
.src-credit__go { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; }
.src-credit__go svg { width: 12px; height: 12px; }

/* One post on its own screen (opened from a notification or a shared link): same width and look as in the feed */
.screen--post .screen-inner { max-width: 600px; padding: 0 0 calc(32px + env(safe-area-inset-bottom, 0px)); gap: 0; }
.screen--post .feed--one { width: 100%; }
@media (min-width: 640px) { .screen--post .screen-inner { padding-top: 16px; } }

/* Suggested post (not someone you follow): a quiet label above the author */
.post__sug { display: flex; align-items: center; gap: 6px; margin: 0; padding: 12px 16px 0; font-size: 12.5px; font-weight: 600; color: var(--color-ink-muted); }
.post__sug svg { width: 14px; height: 14px; color: var(--color-accent-text); }
/* Markers in the feed: where you stopped last time, and where the people you follow run out */
.feed-mark { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 24px; text-align: center; }
.feed-mark__ic { box-sizing: border-box; width: 44px; height: 44px; padding: 11px; margin-bottom: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--color-line-strong); color: var(--color-ink); }
.feed-mark b { font-size: 16px; }
.feed-mark small { font-size: 14px; color: var(--color-ink-muted); }
/* The post's author among the comments */
.cm__author { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-left: 6px; border-radius: 99px; background: var(--color-accent-soft); color: var(--color-accent-text); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
/* Edit post */
.pe-sheet .dsheet__body { padding-bottom: 12px; }
.pe-text { width: 100%; min-height: 140px; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--color-field); color: var(--color-ink); font: inherit; font-size: 16px; line-height: 22px; resize: vertical; }
.pe-text:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--color-line-strong); background: var(--color-surface); }
.pe-sheet .dsheet__foot { grid-template-columns: 1fr; }
.pe-sheet .dsheet__foot .dx-cta { height: 48px; }
@media (min-width: 640px) { .fsheet.pe-sheet { align-items: center; } }

/* A gig without a picture: a typographic poster (feed.js posterHTML). Always dark, its hue from the gig. */
.ev-poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  padding: clamp(16px, 4.5%, 28px); color: #FFFFFF; text-align: left; overflow: hidden;
  background:
    radial-gradient(110% 85% at 0% 0%, hsl(var(--h) 72% 56% / .62), transparent 62%),
    radial-gradient(90% 80% at 100% 100%, hsl(calc(var(--h) + 70) 70% 48% / .50), transparent 64%),
    #101016;
}
.ev-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8, 8, 12, .45)); pointer-events: none; }
.ev-poster__day { position: relative; z-index: 1; display: flex; flex-direction: column; line-height: .9; }
.ev-poster__day b { font-size: clamp(44px, 12vw, 72px); font-weight: 900; letter-spacing: -0.04em; }
.ev-poster__day small { margin-top: 4px; font-size: 13px; font-weight: 800; letter-spacing: .16em; opacity: .85; }
.ev-poster__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; max-width: calc(100% - 132px); }
.ev-poster__title { font-size: clamp(22px, 5.4vw, 34px); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ev-poster__bill { font-size: 13px; line-height: 18px; font-weight: 600; opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-poster__where { font-size: 13px; line-height: 18px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev--past > .ev-poster { filter: saturate(.4) brightness(.8); }

/* an event post: the picture opens the gig */
.post__media.ev[data-ev-open], .post__date[data-ev-open] { cursor: pointer; }
.post__media.ev--cover { position: relative; overflow: hidden; background: hsl(var(--h, 220) 30% 14%); }
.post__media.ev--cover .ev__rsvp, .post__media.ev--cover .ev__finished { z-index: 1; }
@media (hover: hover) { .post__media.ev[data-ev-open]:hover .ev-poster, .post__media.ev[data-ev-open]:hover .pfit__img { filter: brightness(1.06); } .post__date[data-ev-open]:hover { box-shadow: inset 0 0 0 1px var(--color-line-strong); } }
.post__media.ev[data-ev-open]:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* Pinned on top: a gig you're going to changed or was cancelled (feed.js alertsFor) — never ranked away */
.feed-alert { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 14px 16px; border-radius: 18px; color: inherit; text-decoration: none !important;
  background: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 28%, transparent), 0 0 26px -10px color-mix(in srgb, var(--color-accent) 50%, transparent); }
.feed-alert.is-cancel { background: color-mix(in srgb, var(--color-danger) 8%, var(--color-surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-danger) 30%, transparent), 0 0 26px -10px color-mix(in srgb, var(--color-danger) 45%, transparent); }
.feed-alert__ic { flex: none; width: 22px; height: 22px; color: var(--color-accent-text); }
.feed-alert.is-cancel .feed-alert__ic { color: var(--color-danger); }
.feed-alert__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.feed-alert__t small { font-size: 12px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--color-accent-text); }
.feed-alert.is-cancel .feed-alert__t small { color: var(--color-danger); }
.feed-alert__t b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-alert__t span { font-size: 13px; color: var(--color-ink-muted); }
.feed-alert__go { flex: none; width: 16px; height: 16px; color: var(--color-ink-muted); }
@media (max-width: 640px) { .feed-alert { margin: 0 12px 10px; } }
.post__friends { display: flex; align-items: center; gap: 8px; margin: 10px 16px 0; font-size: 13.5px; font-weight: 600; color: var(--color-ink-2); text-decoration: none !important; }
.post__friends-faces { display: inline-flex; }
.post__friend { width: 22px; height: 22px; font-size: 9px; box-shadow: 0 0 0 2px var(--color-surface); }
.post__friend + .post__friend { margin-left: -7px; }

/* Moderation: a comment the page hid (its admins still see it, dimmed) / your comment under review */
.cm--hid .cm__av, .cm--hid .cm__text { opacity: .5; }
.cm__mod { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 12px; line-height: 16px; color: var(--color-ink-muted); }
.cm__mod svg { width: 13px; height: 13px; flex: none; }

/* ---------- Web: the post beside its photo / video (feed.js sidePanel) ---------- */
.lbx--side, .wv--side { --side: clamp(340px, 30vw, 420px); }
.lbx--side .lbx__top, .lbx--side .lbx__foot, .lbx--side .lbx__grid { right: var(--side); }
.lbx--side .lbx__track { right: var(--side); }
.lbx--side .lbx__nav--next { right: calc(var(--side) + 20px); }
.lbx--side .lbx__slide { padding-inline: 24px; }
.lbx--side .lbx__slide .lbx__frame { width: min(100%, calc((100dvh - 150px) * var(--r, 1))); }
.wv--side .wv__list { margin-right: var(--side); }
.wv--side .wv__top { right: var(--side); }
.pside { position: absolute; top: 0; right: 0; bottom: 0; z-index: 3; width: var(--side); display: flex; flex-direction: column; background: var(--color-surface); color: var(--color-ink); touch-action: auto;
  box-shadow: -1px 0 0 var(--color-line), -24px 0 48px rgba(0, 0, 0, .18); }
.pside__head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; position: relative; }
.pside__head::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--color-line-strong), transparent); }
.pside__av { width: 36px; height: 36px; font-size: 13px; flex: none; }
.pside__who { min-width: 0; display: flex; flex-direction: column; color: var(--color-ink); text-decoration: none; }
.pside__who b { font-size: 14px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pside__who small { font-size: 12px; line-height: 16px; color: var(--color-ink-muted); }
.pside__cm { flex: 1; min-height: 0; display: flex; }
.cm-panel--inline { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; background: transparent; }
.cm-panel--inline .cm-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-top: 6px; }
.cm--cap { padding-bottom: 14px; }
.pside__mid { flex: none; padding: 4px 8px 10px; position: relative; }
.pside__mid::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--color-line-strong), transparent); }
.pside__acts { display: flex; align-items: center; }
.pside__likes { display: flex; flex-direction: column; gap: 2px; margin: 0 8px; font-size: 14px; }
.pside__likes span { font-size: 12px; color: var(--color-ink-muted); }
.pside .post__btn.is-liked .heart-on { display: block; }
.pside .post__btn.is-liked .heart-off { display: none; }

/* Phones: like · comments · share under the photo */
.pbar { display: flex; align-items: center; gap: 6px; }
.pbar__btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; color: #FFFFFF; font-size: 14px; font-weight: 700; background: rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.pbar__btn svg { width: 20px; height: 20px; }
.pbar__btn .heart-on { display: none; color: var(--like); }
.pbar__btn.is-liked .heart-on { display: block; }
.pbar__btn.is-liked .heart-off { display: none; }

/* ---------- 27 Oct (owner): comments on phones read and work like Instagram ---------- */
.cm-panel__head { border-bottom: 0; }
.cm__meta b { font-size: 13px; }
.cm__media { margin: 6px 0 2px; }
.cm__media .msg-gif, .cm__pic { display: block; max-width: min(220px, 100%); border-radius: 12px; overflow: hidden; }
.cm__pic { height: auto; max-height: 260px; object-fit: cover; }
.cm__av.has-story { outline-width: 2px; outline-offset: 2px; }
/* quick reactions above the composer: tap = the emoji goes into the comment */
.cm-emoji { flex: none; display: flex; justify-content: space-between; gap: 4px; padding: 8px 16px 2px; background: var(--color-surface); }
.cm-emoji button { flex: 1; height: 40px; border-radius: 12px; font-size: 24px; line-height: 1; transition: transform .12s ease; }
.cm-emoji button:active { transform: scale(1.25); }
@media (hover: hover) { .cm-emoji button:hover { background: var(--color-hover); } }
/* the field: text, then a picture and a GIF inside it; while you type they make room for a round Send */
.cm-form__field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; padding: 0 6px 0 0; border-radius: 22px; background: var(--color-surface);
  box-shadow: 0 0 0 1px var(--color-line-strong), 0 0 18px color-mix(in srgb, var(--color-accent) 14%, transparent); transition: box-shadow .2s ease; }
.cm-form__field:focus-within { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--color-accent) 80%, transparent), 0 0 22px color-mix(in srgb, var(--color-accent) 28%, transparent); }
.cm-panel .cm-form__field .cm-form__input, .cm-form__field .cm-form__input { flex: 1; min-width: 0; border: 0; box-shadow: none !important; background: none; }
.cm-form__tool { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--color-ink); }
.cm-form__tool svg { width: 20px; height: 20px; }
.cm-form__gif { width: auto; height: 26px; padding: 0 6px; margin: 0 4px; border-radius: 7px; box-shadow: inset 0 0 0 1.6px currentColor; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.cm-form__field .cm-form__send { display: none; flex: none; width: 34px; height: 34px; padding: 0; border-radius: 50%; background: var(--color-accent); color: var(--color-on-accent); place-items: center; opacity: 1; }
.cm-form__field .cm-form__send svg { width: 18px; height: 18px; }
.cm-form__field.has-text .cm-form__tool { display: none; }
.cm-form__field.has-text .cm-form__send { display: grid; }
.cm-form__field .cm-form__send:disabled { opacity: .5; }
@media (hover: none) and (pointer: coarse) {
  /* phones: pull the handle down to close; long-press a comment for its options */
  .fsheet--comments .cm-panel__close { display: none; }
  .fsheet--comments .cm__more { display: none; }
  .cm { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
.cm-panel .cm-emoji { position: relative; }
.cm-panel .cm-emoji::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-accent) 70%, transparent) 30%, color-mix(in srgb, var(--color-accent) 70%, transparent) 70%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--color-accent) 45%, transparent); opacity: .55; }
.cm-panel .cm-emoji + .cm-form::before { display: none; }
/* 27 Oct: a commenter's face and name lead to their page */
.cm__who { font-weight: 700; font-size: 13px; color: var(--color-ink); text-decoration: none; }
.cm__av[data-cm-who] { cursor: pointer; }
@media (hover: hover) { .cm__who:hover { text-decoration: underline; } }
