/* פעולה+ · feed v2 (branch v3-feed): post cards, the composer's uploads, the face stickers, #hashtags, saves.
   Tokens only (tokens.css via alias.css); Hebrew letter-spacing stays 0 (TYPOGRAPHY.md). */

/* ── Posts as rounded cards in every feed (owner, 20.11: «כרטיסים מעוגלים, כמו הפיד בדף הנחיתה»): the moments feed,
   the activities feed, a space, a #tag and «שמורים». The photo sits inside with concentric corners. ── */
.feed-wrap > .post {
  margin: 0 var(--sp-3) var(--sp-3); padding: var(--sp-3) 0 var(--sp-2);
  background: var(--c-surface); border: 2px solid var(--c-line); border-bottom-width: 5px; border-radius: var(--r-card);
  overflow: hidden;
}
.feed-wrap { padding-top: var(--sp-2); }
.feed-wrap > .post .post-h { padding: 0 var(--sp-3) var(--sp-2); }
.feed-wrap > .post .post-media { margin: 0 var(--sp-2); border-radius: calc(var(--r-card) - var(--sp-2)); }
.feed-wrap > .post .text-card { margin: 0 var(--sp-2); border-radius: calc(var(--r-card) - var(--sp-2)); }
.feed-wrap > .post .post-body,
.feed-wrap > .post .post-title,
.feed-wrap > .post .post-label { padding-inline: var(--sp-3); }
.feed-wrap > .post .post-from,
.feed-wrap > .post .sr-post,
.feed-wrap > .post .sr-post-ideas { margin-inline: var(--sp-3); }
.feed-wrap > .post .post-acts { padding: var(--sp-2) var(--sp-1) 0; }
.feed-wrap > .post [data-firers] { padding-inline: var(--sp-3) !important; }
.feed-wrap > .feed-kicker, .feed-wrap > .pulse-line { padding-inline: var(--sp-3); }
@media (max-width: 370px) {
  .feed-wrap > .post { margin-inline: var(--sp-2); }
  .feed-wrap > .post .post-media, .feed-wrap > .post .text-card { margin-inline: 6px; border-radius: calc(var(--r-card) - 6px); }
}

/* ── #hashtags and «חם עכשיו» ── */
a.tag { color: var(--c-blue); font-weight: 700; }
.hot-tags { display: flex; align-items: center; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding-bottom: var(--sp-2); }
.hot-tags::-webkit-scrollbar { display: none; }
.hot-tags .kicker { flex: none; }
.hot-tags .chip { flex: none; padding: 6px 12px; font-size: var(--fs-chip); }
.tag-title { font-size: var(--fs-card); font-weight: var(--fw-title); line-height: 1.25; }

/* ── Save (bookmark) on a moment ── */
.post-acts .psave { margin-inline-start: auto; }
.post-acts .psave[aria-pressed="true"] { color: var(--c-blue); }
.post-acts .psave[aria-pressed="true"] svg path { fill: currentColor; }

/* ── A status: its short label over the picture ── */
.story-view .sv-body { position: relative; }
.sv-label {
  align-self: center; margin-bottom: var(--sp-3); padding: 6px 14px; border-radius: 999px;
  background: var(--c-surface); color: var(--c-ink); font-size: var(--fs-chip); font-weight: var(--fw-chip); line-height: 1.2;
}

/* ── The composer: one thumb per file, each with its own progress ── */
.mthumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-top: var(--sp-3); }
.mthumbs:empty { display: none; }
.mthumb { position: relative; aspect-ratio: 1; border-radius: var(--r-btn); overflow: hidden; background: var(--c-ice-2); }
.mthumb img, .mthumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mthumb .mt-ph { position: absolute; inset: 0; background: linear-gradient(90deg, var(--c-ice-2), var(--c-ice), var(--c-ice-2)); }
.mthumb.prep img, .mthumb.wait img, .mthumb.up img { opacity: .82; }
.mt-state, .mt-ok {
  position: absolute; top: 6px; inset-inline-start: 6px; padding: 2px 8px; border-radius: 999px;
  background: rgba(19, 40, 94, .78); color: #fff; font-size: var(--fs-caption); font-weight: 700; line-height: 1.5; font-variant-numeric: tabular-nums;
}
.mt-ok { padding: 2px; background: var(--c-ok); display: grid; place-items: center; }
.mthumb.fail .mt-state { background: var(--c-danger); }
.mt-bar { position: absolute; inset: auto 0 0 0; height: 4px; background: rgba(255, 255, 255, .55); }
.mt-bar i { display: block; height: 100%; width: 0; background: var(--c-blue); transition: width .2s linear; }
.mthumb.done .mt-bar, .mthumb.wait .mt-bar, .mthumb.prep .mt-bar { display: none; }
.mt-x {
  position: absolute; top: 4px; inset-inline-end: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(19, 40, 94, .7); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.mt-face, .mt-retry {
  position: absolute; bottom: 8px; inset-inline: 6px; min-height: 30px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--c-surface); color: var(--c-ink); font: inherit; font-size: var(--fs-caption); font-weight: 700;
}
.mt-face.on { background: var(--c-celebrate); color: var(--c-celebrate-ink); }
.mt-retry { background: var(--c-danger); color: #fff; }
.mthumb.fail .mt-face { display: none; }
.up-line { margin-top: var(--sp-2); font-size: var(--fs-secondary); color: var(--c-muted); font-variant-numeric: tabular-nums; min-height: 1.45em; }

/* ── «כיסוי פנים»: the sticker editor (stickers.js) ── */
.stk-view {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; max-width: var(--maxw); margin: 0 auto;
  background: var(--c-night); color: var(--c-white); touch-action: none; user-select: none; -webkit-user-select: none;
}
.stk-top { display: flex; align-items: center; gap: var(--sp-2); padding: calc(env(safe-area-inset-top) + var(--sp-2)) var(--gutter) var(--sp-2); }
.stk-top .text-btn { color: #fff; }
.stk-top b { font-size: var(--fs-card); font-weight: var(--fw-card); }
.stk-count { font-size: var(--fs-secondary); font-weight: 500; opacity: .75; }
.stk-intro { margin: 0 var(--gutter) var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-btn); background: rgba(255, 200, 61, .16); font-size: var(--fs-secondary); line-height: var(--lh-secondary); }
.stk-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 var(--sp-2); }
.stk-pic { position: relative; max-width: 100%; max-height: 100%; line-height: 0; }
.stk-pic img { display: block; max-width: 100%; max-height: calc(100dvh - 300px); border-radius: var(--r-btn); pointer-events: none; }
.stk-layer { position: absolute; inset: 0; }
.stk { position: absolute; transform: translate(-50%, -50%); touch-action: none; cursor: grab; }
.stk svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
.stk.on { outline: 2px dashed #fff; outline-offset: 3px; border-radius: 50%; }
.stk-size { position: absolute; width: 26px; height: 26px; inset-block-end: -8px; inset-inline-start: -8px; border-radius: 50%; background: #fff; border: 3px solid var(--c-blue); display: none; cursor: nwse-resize; }
.stk.on .stk-size { display: block; }
.stk-bar { padding: var(--sp-3) var(--gutter) calc(env(safe-area-inset-bottom) + var(--sp-3)); }
.stk-hint { font-size: var(--fs-secondary); opacity: .8; text-align: center; margin-bottom: var(--sp-2); }
.stk-add { display: flex; justify-content: center; gap: var(--sp-4); }
.stk-pick { display: grid; justify-items: center; gap: 4px; border: 0; background: none; color: #fff; cursor: pointer; font: inherit; font-size: var(--fs-caption); font-weight: 600; min-width: 64px; }
.stk-pick svg { width: 52px; height: 52px; }
.stk-pick.del svg { width: 26px; height: 26px; margin: 13px; }

/* ── «עולה» on a post that beats its author's and its branch's usual ── */
.post-h small .rising { color: var(--c-blue); font-weight: 700; }

/* ── «דופק הרשת» (/admin/pulse) ── */
.pl-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.pl-tile { border: 2px solid var(--c-line); border-bottom-width: 5px; border-radius: var(--r-btn); background: var(--c-surface); padding: var(--sp-2) 4px; text-align: center; display: grid; gap: 2px; }
.pl-tile b { font-size: var(--fs-stat); font-weight: var(--fw-stat); line-height: var(--lh-stat); font-variant-numeric: tabular-nums; }
.pl-tile span { font-size: var(--fs-caption); color: var(--c-muted); line-height: 1.3; }
.pl-rows { display: grid; }
.pl-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-line); font-size: var(--fs-body); }
.pl-row b { font-weight: 700; text-align: end; white-space: nowrap; }
.pl-post { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-line); color: var(--c-ink); }
.pl-post small { display: block; font-size: var(--fs-secondary); color: var(--c-muted); line-height: var(--lh-secondary); }
.pl-vel { display: grid; justify-items: center; min-width: 52px; }
.pl-vel b { font-size: var(--fs-card); font-weight: var(--fw-stat); font-variant-numeric: tabular-nums; }
.pl-vel small { font-size: var(--fs-caption); color: var(--c-muted); }
@media (max-width: 370px) { .pl-tiles { grid-template-columns: repeat(2, 1fr); } }
