/* The Mess Hall's everything feed (social R2, task T6; docs/social-plan.md §8 item 1). Built to the approved T0 board:
 * classes sx- (feed), and the static parts of the shared footer rx- (reactions) + cm- (comment peek, ⋯ menu), which
 * css/comments.css (T4) may take over at integration. Only the site's tokens (style.css :root / :root[data-night]). */

[hidden] { display: none !important; }

/* ── tabs + "Show only" chips ── */
.sx-tabs { display: flex; gap: 4px; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; overflow-x: auto; scrollbar-width: none; }
.sx-tabs a { flex: none; padding: 7px 15px; border-radius: 999px; color: var(--ink); text-decoration: none; font: 600 14px var(--body); white-space: nowrap; }
.sx-tabs a[aria-current] { background: var(--ketchup); color: #fff; }
:root[data-night] .sx-tabs a[aria-current] { background: var(--neon-pink); }
.sx-tabs .e { margin-right: 4px; }
.sx-kinds { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -4px 0 0; padding: 2px 0; }
.sx-kinds .chip { flex: none; text-decoration: none; color: var(--ink); }
.sx-kinds .chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
@media (max-width: 520px) {
  .sx-feed .mh-filters { gap: 8px; }
  .sx-tabs { display: grid; grid-template-columns: repeat(4, auto); width: 100%; border-radius: 14px; }
  .sx-tabs a { text-align: center; padding: 7px 4px; font-size: 13.5px; }
  .sx-tabs .e { display: none; }
}

/* ── notes, the New pill, day headers ── */
.sx-note { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bun); font-size: 14px; }
.sx-note img { border-radius: 50%; background: var(--mustard); flex: none; }
.sx-note p { margin: 0; min-width: 0; }
.sx-note-ic { font-size: 22px; flex: none; }
.sx-note select { font: inherit; font-weight: 700; padding: 1px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.pf-following .sx-note { margin-bottom: 12px; }
.sx-pill { justify-self: center; position: sticky; top: 70px; z-index: 6; border: 0; border-radius: 99px; padding: 8px 16px; background: var(--ketchup); color: #fff;
  font: 700 14px var(--body); box-shadow: 0 6px 18px rgb(200 16 46 / .35); cursor: pointer; }
:root[data-night] .sx-pill { background: var(--neon-pink); }
.sx-day { margin: 6px 0 -4px; font: 800 13px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sx-list, .sx-list [data-near-list], .pf-following .pf-list.sx-list { display: grid; gap: 14px; }
.sx-loud-note { margin: 6px 0 0; }

/* ── item cards ── */
.sx-item { padding-bottom: 0; min-width: 0; }
.sx-item.pf-post { padding: 14px 16px 0; }
.sx-item .pf-ph { margin-bottom: 8px; }
.sx-item .pf-ph > div { flex: 1; min-width: 0; }
.sx-item .pf-media { margin-bottom: 8px; }
.sx-item .mh-acts { margin-top: 2px; }
.sx-kind { margin-left: auto; align-self: flex-start; flex: none; font: 700 11.5px var(--body); color: var(--muted); background: var(--bun); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.sx-cap { margin: 0 0 8px; }
.pf-ava.rank-general, .pf-ava.rank-admiral, .pf-ava.rank-private, .pf-ava.rank-lieutenant { background: var(--mustard); }
/* new spot */
.sx-spotcard { display: flex; gap: 12px; align-items: center; margin: 0 0 10px; padding: 10px; border-radius: var(--radius-sm); background: var(--bun); text-decoration: none; color: var(--ink); min-width: 0; }
.sx-spotcard img, .sx-spotcard-ph { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; flex: none; }
.sx-spotcard-ph { display: grid; place-items: center; font-size: 34px; background: var(--card); }
.sx-spotcard > span { min-width: 0; }
.sx-spotcard b { font: 800 18px var(--head); display: block; overflow-wrap: anywhere; } .sx-spotcard small { color: var(--muted); display: block; }
.sx-new { display: inline-block; background: var(--relish); color: #fff; font: 800 11px var(--body); padding: 2px 7px; border-radius: 5px; margin-bottom: 4px; letter-spacing: .05em; }
/* Dog of the Week: a navy mini card */
.sx-dotw { display: grid; grid-template-columns: 120px minmax(0, 1fr); margin: 0 -16px 10px; background: #1b2a4a; color: #fff; text-decoration: none; }
.sx-dotw img, .sx-dotw-ph { width: 100%; height: 100%; min-height: 120px; object-fit: cover; }
.sx-dotw-ph { display: grid; place-items: center; font-size: 40px; background: #24365e; }
.sx-dotw div { padding: 12px 14px; } .sx-dotw b { font: 800 20px/1.1 var(--head); display: block; } .sx-dotw small { color: #c9d3e8; } .sx-dotw p { margin: 6px 0 0; font-size: 14px; }
@media (max-width: 380px) { .sx-dotw { grid-template-columns: 92px minmax(0, 1fr); } }
/* a Glizette dispatch: a bun-colored block */
.sx-dispatch { display: block; margin: 0 -16px 10px; padding: 14px 16px; background: var(--bun); color: var(--ink); text-decoration: none; border-block: 1px solid var(--line); }
.sx-dispatch b { font: 800 19px/1.15 var(--head); display: block; margin-bottom: 4px; } .sx-dispatch span { font-size: 14px; color: var(--muted); }
.sx-dispatch small { font: 800 11px var(--body); letter-spacing: .1em; color: var(--ketchup); }
:root[data-night] .sx-dispatch small { color: var(--neon-cyan); }
/* a promotion: the purple Dixon box */
.sx-promo { display: flex; gap: 12px; align-items: center; margin: 0 0 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: #241a3d; color: #ece4ff; }
.sx-promo img { flex: none; border-radius: 50%; background: var(--mustard); } .sx-promo b { color: #fff; font: 800 17px var(--head); display: block; } .sx-promo span { font-size: 14px; }

/* ── the shared footer (docs/social-plan.md §4.5a) ── */
.sx-acts { position: relative; flex-wrap: nowrap; min-width: 0; }
.sx-acts .mh-act, .sx-acts .rx-sum { flex: none; white-space: nowrap; }
@media (max-width: 420px) { .sx-acts { gap: 0; } .sx-acts .mh-share-label { display: none; } .sx-acts .mh-act { padding-inline: 8px; } }
@media (max-width: 359px) { .sx-acts .rx-l { display: none; } }
.sx-more { margin-left: auto; font-size: 18px; letter-spacing: 1px; }
.sx-acts .cm-menu { right: 0; left: auto; top: auto; bottom: calc(100% + 4px); }
.rx { position: relative; display: inline-flex; align-items: center; gap: 2px; }
.rx-btn .rx-e { font-size: 17px; line-height: 1; filter: grayscale(1) opacity(.75); }
.rx-btn.is-on .rx-e { filter: none; }
.rx-btn.is-on { background: var(--open-bg); color: var(--open); }
.rx-btn.rx-fire.is-on { background: var(--closed-bg); color: var(--closed); }
.rx-btn.rx-lol.is-on, .rx-btn.rx-want.is-on { background: var(--soon-bg); color: var(--soon); }
.rx-btn.rx-salute.is-on { background: var(--unk-bg); color: var(--ink); }
.rx-sum { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--muted); font: 600 13.5px var(--body); padding: 6px 6px; border-radius: 99px; cursor: pointer; }
.rx-sum:hover { color: var(--ink); background: var(--bun); }
.rx-tops { display: inline-flex; font-size: 15px; letter-spacing: -3px; padding-right: 3px; }
.rx-sum.is-empty { padding: 0; }
.rx-pick { position: absolute; z-index: 30; bottom: calc(100% + 6px); left: -4px; display: flex; gap: 2px; padding: 5px; background: var(--card); border: 1px solid var(--line);
  border-radius: 99px; box-shadow: 0 10px 30px rgb(40 20 0 / .22); }
.rx-pick button { display: grid; justify-items: center; gap: 1px; width: 52px; padding: 5px 0 3px; border: 0; border-radius: 16px; background: none; cursor: pointer; color: var(--muted); }
.rx-pick button span { font-size: 27px; line-height: 1.1; }
.rx-pick button small { font: 700 10.5px var(--body); }
.rx-pick button[aria-checked="true"] { background: var(--bun); color: var(--ink); }
:root[data-night] .rx-pick { box-shadow: 0 0 0 1px var(--neon-cyan), 0 10px 30px rgb(0 0 0 / .5); }
@media (max-width: 360px) { .rx-pick button { width: 46px; } .rx-pick button span { font-size: 24px; } }
.cm-menu { position: absolute; z-index: 40; display: grid; min-width: 190px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgb(40 20 0 / .22); }
.cm-menu button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 9px; font: 600 14px var(--body); color: var(--ink); cursor: pointer; width: 100%; }
.cm-menu button:hover, .cm-menu button:focus-visible { background: var(--bun); }
.cm-menu button small { color: var(--muted); font-weight: 500; }
.cm-menu [data-own] { display: contents; }
.cm-menu .is-bad { color: var(--closed); }
:root[data-night] .cm-menu { box-shadow: 0 0 0 1px #2f3770, 0 12px 34px rgb(0 0 0 / .5); }
/* the 2 newest comments under a card (§8 decision 3) */
.cm-peek { display: grid; gap: 7px; margin: 2px -16px 0; padding: 10px 16px 12px; border-top: 1px solid var(--line); }
.mh-post .cm-peek { margin-inline: 0; padding-inline: 0; }
.cm-all { font: 600 13.5px var(--body); color: var(--muted); text-decoration: none; } .cm-all:hover { color: var(--ink); text-decoration: underline; }
.cm-mini { display: flex; gap: 8px; align-items: flex-start; }
.cm-mini p { margin: 0; font-size: 14px; line-height: 1.38; min-width: 0; overflow-wrap: anywhere; }
.cm-mini p a, .cm-mini p b { color: var(--ink); text-decoration: none; }
.cm-mini .mh-ava { box-shadow: none; margin-top: 1px; }
.cm-mini.is-owner .mh-ava { border-radius: 8px; box-shadow: 0 0 0 2px var(--open); }
.cm-owner { display: inline-block; color: #fff; background: var(--open); border-radius: 4px; padding: 0 5px; font: 800 11px/17px var(--body); vertical-align: 1px; }
:root[data-night] .cm-owner { color: #04121a; }
.cm-when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.cm-add { display: flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 14px; }
.cm-add span { flex: 1; min-width: 0; padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--bg); }
.cm-add:hover span { border-color: var(--mustard); }
.cm-add .mh-ava { box-shadow: none; }

/* ── composer: ✍️ Post · 📷 Photo · 🎬 Video ── */
.sx-compose { gap: 10px; }
.sx-modes { display: flex; gap: 6px; }
.sx-modes button { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 9px 8px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); font: 700 14px var(--body); cursor: pointer; min-width: 0; }
.sx-modes button[aria-pressed="true"] { border-color: var(--ketchup); background: var(--closed-bg); color: var(--ketchup); }
:root[data-night] .sx-modes button[aria-pressed="true"] { border-color: var(--neon-pink); color: var(--neon-pink); background: #2a0f22; }
.sx-modes small { font-weight: 600; color: var(--muted); }
.sx-pickrow { display: flex; gap: 8px; padding-left: 52px; flex-wrap: wrap; align-items: center; }
.sx-pickrow .tile { width: 84px; height: 84px; border-radius: 12px; border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-size: 12px;
  text-align: center; background: var(--bg); cursor: pointer; line-height: 1.25; }
.sx-pickrow .tile:focus-within { border-color: var(--mustard); }
.sx-thumbs { display: contents; }
.sx-thumbs img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; }
.sx-pick-note { margin: 0; max-width: 320px; flex: 1 1 200px; }
.sx-compose-mini { display: flex; gap: 10px; align-items: center; background: var(--card); border: 2px solid var(--mustard); border-radius: var(--radius); padding: 10px 12px; }
.sx-compose-mini .mh-ava { box-shadow: none; }
.sx-compose-mini .fake { flex: 1; min-width: 0; text-align: left; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 99px; color: var(--muted); font: 15px var(--body);
  background: var(--bg); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-compose-mini .ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--bun); font-size: 19px; cursor: pointer; }
@media (max-width: 860px) {
  .mh-compose-wrap:not(.is-open) .sx-compose { display: none; }
  .mh-compose-wrap.is-open .sx-compose-mini { display: none; }
}
@media (min-width: 861px) { .sx-compose-mini { display: none !important; } }
@media (max-width: 520px) { .sx-pickrow, .sx-compose .mh-compose-row { padding-left: 0; } .sx-modes button { font-size: 13px; padding: 9px 4px; } }

/* ── clips in the feed (R3; tap to play, muted, §8 decision 2) ── */
.vd { position: relative; margin: 0 -16px 8px; background: #000; overflow: hidden; }
.vd video { display: block; width: 100%; max-height: 560px; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.vd.is-wide video { aspect-ratio: 16 / 9; }
.vd-play { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .55); color: #fff; font-size: 30px; cursor: pointer;
  padding-left: 6px; box-shadow: 0 0 0 3px rgb(255 255 255 / .7); }
.vd.is-playing .vd-play { display: none; }
.vd-tag { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; }
.vd-tag span { background: rgb(0 0 0 / .62); color: #fff; font: 700 12.5px var(--body); border-radius: 99px; padding: 4px 10px; }
.vd-snd { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .62); color: #fff; font-size: 17px; cursor: pointer; }
.vd-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgb(255 255 255 / .25); } .vd-bar i { display: block; height: 100%; width: 0; background: var(--mustard); }
@media (min-width: 700px) { .vd video { max-height: 620px; } }
.cotw-mini .sx-item { border: 0; box-shadow: none; padding: 0; background: none; }
/* the ~300 px sidebar box: always the compact footer (one row, icon-only Share), the peek inside the box (T10 found the ⋯ sticking out) */
.cotw-mini .sx-acts { gap: 0; }
.cotw-mini .sx-acts .mh-act { padding-inline: 7px; }
.cotw-mini .sx-acts .mh-share-label, .cotw-mini .sx-acts .rx-l { display: none; }
.cotw-mini .cm-peek { margin-inline: 0; padding-inline: 0; }
.cotw-mini .vd { margin: 8px 0 0; border-radius: 12px; }
.cotw-mini .vd video { max-height: 300px; }
