/* The shared hidup shell (T-070). Every site (hidup.lol, kesel.lol) serves this one file; it holds layout and
   structure only. Colours, fonts and the lockup are custom properties a brand's brand.css defines
   (brand.css is linked after this file). No hex or rgba literal belongs here: add a token to every brand.css. */

/* ---------- geometry and type (not colour): the same on every site ---------- */
:root {
  --sheet: var(--card);              /* the sticky bar's opaque fill */
  --mood: var(--md5);                /* set per row/edge; --md5 is the default */
  --mood-on: var(--md5-on);          /* the 3 px edge only (never text) */

  /* Type, px. */
  --t-bar: 22px;      /* brand in the bar */
  --t-tab: 14px;      /* tab label; counts 12px */
  --t-name: 15px;     /* author name */
  --t-meta: 13px;     /* country, time, mood chip, translate, action labels */
  --t-body: 16px;     /* post body */
  --t-pick: 17px;     /* composer textarea (16px at 390) */
  --t-foot: 15px;     /* footer */
  --lh-body: 1.45;

  /* Spacing steps actually used, in px: 4, 6, 8, 10, 14, 16, 20, 24. */
  --s1: 4px;  --s2: 6px;  --s3: 8px;  --s4: 10px;
  --s5: 14px; --s6: 16px; --s7: 20px; --s8: 24px;

  /* Geometry */
  --col: 600px;
  --side: 200px;        /* left panel width, from 700 */
  --gap: 32px;          /* panel to column, from 700 */
  --gutter: 16px;
  --mood-edge: 3px;
  --av: 40px;           /* avatar, and the composer's grid column */
  --face: 30px;         /* one mood face */
  --face-gap: 4px;
  --row-1: 52px;        /* bar row 1 (the 4 px stripe sits in the top bar's padding) */
  --strip: 36px;        /* country strip */
  --stripe: 4px;        /* body::before */
  --r-pill: 999px;
  --stick: calc(var(--stripe) + env(safe-area-inset-top, 0px) + var(--row-1) + 1px);   /* no tab row in the bar */
}
@media (max-width: 640px) {
  :root { --av: 36px; --face: 26px; --face-gap: 3px; --row-1: 44px; }
}

/* ---------- the brand lockup layout (the colours of .hid / .up / .lol are in brand.css) ---------- */
.brand { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; font-size: 26px; line-height: 1; }
.brand img { width: 34px; height: 34px; margin-right: 6px; }

/* ---------- the bar brand (the panel and the phone top bar; layout in the T-045 section at the end) ---------- */
:is(.panel, .topbar) .brand { font-size: var(--t-bar); gap: 2px; }
:is(.panel, .topbar) .brand img { width: 26px; height: 26px; margin-right: 6px; }

/* ---------- the column ---------- */
.feed { width: calc(100% - 2 * var(--gutter)); max-width: var(--col); margin-inline: auto; padding-top: 32px; font-size: 16px; }
/* One focus ring for everything in the column (ink on every surface it sits on: 9.8:1 or better). */
:is(.feed, .view, .compose-dlg, .more-sheet, .panel, .topbar, .bnav) :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
:is(.feed, .compose-dlg) button, .feed select { transition: background-color .15s ease-out, color .15s ease-out, border-color .15s ease-out; }
@media (prefers-reduced-motion: no-preference) {
  :is(.feed, .compose-dlg) button:active:not(:disabled) { transform: scale(.97); transition-duration: .1s; }
}

/* ---------- heading ---------- */
.feed h1 { margin: 0; font: 600 34px/1.15 var(--serif); letter-spacing: 0; color: var(--ink); text-wrap: balance; }

/* ---------- mood tabs ---------- */
.tabs { margin-top: 0; }   /* the hidden h1 takes no space (T-045) */
.tabs > div { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border: 0; border-radius: 12px; background: none; color: var(--ink);
  font: 700 14px/1 var(--body); white-space: nowrap; cursor: pointer;
}
.tab .em { font-size: 16px; }
.tab small { font: 700 12px/1 var(--body); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--on-dark); }
.tab[aria-selected="true"] small { color: var(--on-dark); }
@media (hover: hover) { .tab[aria-selected="false"]:hover { background: var(--wash); } }

/* ---------- composer: a card, one textarea, three pickers ---------- */
.compose {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "head head head" "msg msg msg" "cimg cimg cimg" "rule rule rule" "pick cnt post" "meta meta meta" "warn warn warn";
  margin: 16px 0 0; padding: 16px; max-width: none;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 16px; box-shadow: none;
}
/* The mood you are about to post: --c for the swatch, --pk-* for the mood trigger (one pair per wall). */
.compose.md0 { --c: var(--md0-on); }
.compose.md1 { --c: var(--md1-on); }
.compose.md2 { --c: var(--md2-on); }
.compose.md3 { --c: var(--md3-on); }
.compose.md4 { --c: var(--md4-on); }
.compose.md5 { --c: var(--md5-on); }
.compose.md6 { --c: var(--md6-on); }
.compose.md7 { --c: var(--md7-on); }
.compose.md8 { --c: var(--md8-on); }
.compose.md9 { --c: var(--md9-on); }
.compose.md10 { --c: var(--md10-on); }
.compose:is(.md0, .md1, .md2, .md3, .md4) { --pk-bg: var(--tint-k); --pk-fg: var(--chip-k); }
.compose.md5 { --pk-bg: var(--tint-h); --pk-fg: var(--chip-h); }
.compose:is(.md6, .md7, .md8, .md9, .md10) { --pk-bg: var(--tint-s); --pk-fg: var(--chip-s); }
.compose:has(#msg:focus) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

.chead { grid-area: head; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.chead label { font: 600 13px/1.3 var(--body); color: var(--ink); }
.chead .free { flex: none; padding: 5px 10px; border-radius: 999px; background: var(--track); color: var(--ink-2); font: 700 12px/1 var(--body); }
.compose #msg {
  grid-area: msg; display: block; width: 100%; height: 84px; min-height: 84px; margin-top: 4px; padding: 8px 0;
  resize: none; border: 0; border-radius: 0; background: transparent; outline: none;
  font: 400 16px/1.5 var(--body); color: var(--ink);
}
.compose #msg::placeholder { color: var(--ink-soft); opacity: 1; }

.pickers { grid-area: pick; position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; min-width: 0; }
.compose::before { content: ""; grid-area: rule; margin-top: 8px; border-top: 1px solid var(--hairline); }   /* one rule across the card, above pickers + count + Post */
.compose .foot { display: contents; }
.compose .cnt { grid-area: cnt; align-self: end; margin: 0 12px 14px 8px; font: 600 13px/1 var(--body); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pick-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; max-width: 100%; margin: 0; padding: 0 14px;
  border: 1px solid var(--ctl); border-radius: 999px; background: var(--card); color: var(--ink);
  font: 600 14px/1 var(--body); cursor: pointer;
}
.pick-btn > span:not(.chev) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-btn .chev { flex: none; font-size: 14px; line-height: 1; }
.pick-btn[aria-expanded="true"] { border-color: var(--ink); }
.pick-btn[aria-expanded="true"] .chev { display: inline-block; transform: rotate(180deg); }
#moodBtn { max-width: 170px; background: var(--pk-bg); color: var(--pk-fg); border-color: var(--pk-bg); }
#moodBtn[aria-expanded="true"] { border-color: var(--ink); }
#whoBtn { max-width: 150px; }
/* P-047: the photo button (a camera, round like the pickers) and the staged photo above the rule. */
#imgBtn { width: 40px; padding: 0; justify-content: center; }
#imgBtn svg { width: 20px; height: 20px; }
#imgBtn.has { background: var(--pk-bg); color: var(--pk-fg); border-color: var(--pk-bg); }
.cimg { grid-area: cimg; position: relative; display: inline-grid; justify-self: start; margin-top: 8px; max-width: 100%; }
.cimg img { display: block; max-width: 100%; max-height: 180px; width: auto; height: auto; border-radius: 12px; background: var(--track); }
.cimg .x-btn { position: absolute; top: 6px; right: 6px; }
#who { max-width: 14ch; }
@media (hover: hover) {
  #whoBtn:hover, .picker.country select:hover { background: var(--hover); }
  #moodBtn:hover { border-color: var(--pk-fg); }
}
.picker.country { display: inline-flex; align-items: center; }
.picker.country select { appearance: none; width: 160px; padding-right: 32px; text-overflow: ellipsis; }
/* The chevron sits in the flow after the select and is pulled back over its right padding, so it follows the control's width. */
.picker.country .chev { flex: none; margin-left: -28px; font-size: 14px; line-height: 1; pointer-events: none; }

/* Popups hang under the picker row and can never be wider than the composer. */
.pop {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 10; width: min(280px, 100%);
  background: var(--card); border: 1px solid var(--ctl); border-radius: 14px; padding: 6px;
  box-shadow: var(--shadow); animation: popin .14s ease-out;
}
@keyframes popin { from { opacity: 0; transform: translateY(-4px); } }
.pop.list { max-height: min(420px, 60vh); overflow-y: auto; overscroll-behavior: contain; }
.pop.list:has(.opt.active):focus-visible { outline: none; }
#whoPop { padding: 12px; }
/* Posting needs an account; the writer may still hide their name (2026-11-24). */
.anon-opt { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; cursor: pointer; }
.anon-opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.anon-opt input:disabled + span { opacity: .5; }
.as-opts { border: 0; margin: 0; padding: 0; min-width: 0; }
/* .pop .input below sets width:100%; out-rank it or the indent pushes the field out of the popup. */
.pop .as-opts .input { margin: 0 0 4px 28px; width: calc(100% - 28px); }
.as-opts .input:disabled { opacity: .5; }
.anon-hint { margin: 4px 0 0; font-size: var(--t-meta); line-height: 1.4; color: var(--ink-soft); max-width: 32ch; }
.pop .input {
  display: block; width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--ctl-strong); border-radius: 12px; background: var(--card); color: var(--ink); font: 400 16px/1.5 var(--body);
}
.pop .input:focus { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); box-shadow: none; }
.pop .input:disabled { background: var(--track); color: var(--ink); opacity: 1; cursor: not-allowed; }
.mg { display: block; padding: 6px 12px 2px; font: 700 12px/1.5 var(--body); color: var(--ink-soft); }
.opt { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; font: 600 15px/1.2 var(--body); color: var(--ink); cursor: pointer; }
.opt > span { font-size: 20px; line-height: 1; }
.opt[aria-selected="true"] { background: var(--track); }
.opt[aria-selected="true"]::after { content: "✓"; margin-left: auto; font-weight: 700; }
.opt.active { outline: 2px solid var(--ink); outline-offset: -2px; }
@media (hover: hover) { .opt:hover { background: var(--hover); } }

.compose .post {
  grid-area: post; align-self: end; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; min-width: 96px; margin-bottom: 0; padding: 0 18px;
  border: 0; border-radius: 12px; background: var(--cta-bg); color: var(--cta-ink); box-shadow: none;
  font: 700 14px/1 var(--body); cursor: pointer;
}
@media (hover: hover) { .compose .post:hover:not(:disabled) { background: var(--cta-hover); } }
.compose .post:disabled { background: var(--cta-off); color: var(--ink-2); cursor: not-allowed; }
.compose .meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 10px 0 0; }
.compose #rule, .compose #where { margin: 0; font: 500 12px/1.35 var(--body); color: var(--ink-soft); }
.compose #rule .link-btn { display: inline-flex; align-items: center; min-height: 24px; padding: 0; font: 700 12px/1.35 var(--body); color: var(--ink); }
.compose .warn {
  grid-area: warn; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; border-left: 3px solid var(--err);
  background: var(--tint-k); color: var(--ink); font: 600 13px/1.3 var(--body);
}

/* ---------- section heading + Latest / Popular ---------- */
.feedhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 0; }
.feed h2 { margin: 0; font: 600 20px/1.3 var(--serif); letter-spacing: 0; color: var(--ink); }
.sort { display: inline-flex; flex: none; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, var(--bg)); }
.sort button {
  height: 32px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--ink-2);
  font: 700 14px/1 var(--body); cursor: pointer;
}
.sort button[aria-pressed="true"] { background: var(--white); color: var(--ink); border-color: var(--ctl); }
@media (hover: hover) { .sort button[aria-pressed="false"]:hover { color: var(--ink); } }
.caption { margin: 4px 0 0; font: 500 13px/1.4 var(--body); color: var(--ink-soft); }

/* ---------- country strip ---------- */
.feedfilters { display: flex; align-items: center; gap: var(--s3); height: 44px; margin-top: 12px; }
.feedfilters .pills {
  flex: 1 1 auto; min-width: 0; height: calc(100% + 8px); margin: -4px -3px; padding: 4px 3px;
  display: flex; align-items: center; gap: var(--s3);
  overflow-x: auto; scrollbar-width: none;
  scroll-margin-top: calc(var(--stick) + var(--s3));   /* app.js scrolls #pills here */
}
.feedfilters .pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; display: inline-flex; align-items: center; gap: var(--s1);
  height: 32px; padding: 0 12px; border: 1px solid var(--ctl); border-radius: 999px;
  background: none; color: var(--ink); font: 600 13px/1 var(--body); white-space: nowrap; cursor: pointer;
}
@media (hover: hover) { .pill:not(.on):hover { background: var(--wash); } }
.pill.on { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.pill.map { background: var(--card); }
.pill.map .see { color: var(--ink-soft); font-weight: 500; }

/* ---------- posts: flat rows, a hairline between them ---------- */
.wall { margin-top: 4px; }
.note {
  --mood-on: var(--md5-on);
  display: grid; grid-template-columns: 36px auto auto auto minmax(0, 1fr) auto;   /* col 1 is the avatar, fixed: .nm's x never depends on the count */
  grid-template-areas: "av au au au au au" "txt txt txt txt txt txt" "img img img img img img" "react react tr rbtn shr flag" "rpl rpl rpl rpl rpl rpl"; align-items: start;
  margin: 0; padding: 16px 0 8px 13px;
  border-width: 0; border-left: var(--mood-edge) solid var(--mood-on);
  border-radius: 0; background: transparent; box-shadow: none; transform: none; color: var(--ink);
}
/* The separator comes after .note: equal specificity, later wins, and it sets only the top side. */
.wall > * + * { border-top: 1px solid var(--hairline); }
.note.md0  { --mood-on: var(--md0-on); }
.note.md1  { --mood-on: var(--md1-on); }
.note.md2  { --mood-on: var(--md2-on); }
.note.md3  { --mood-on: var(--md3-on); }
.note.md4  { --mood-on: var(--md4-on); }
.note.md5  { --mood-on: var(--md5-on); }
.note.md6  { --mood-on: var(--md6-on); }
.note.md7  { --mood-on: var(--md7-on); }
.note.md8  { --mood-on: var(--md8-on); }
.note.md9  { --mood-on: var(--md9-on); }
.note.md10 { --mood-on: var(--md10-on); }
.from-k { --wt: var(--tint-k); --wf: var(--chip-k); }
.from-h { --wt: var(--tint-h); --wf: var(--chip-h); }
.from-s { --wt: var(--tint-s); --wf: var(--chip-s); }
.note .av {
  grid-area: av; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 999px; background: var(--wt); color: var(--wf);
  font: 800 14px/1 var(--body); letter-spacing: .01em; overflow: hidden;
}
.note .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note .av .anon { opacity: .85; }
/* .main and .acts dissolve so avatar, name line, text and the action row are all cells of .note's grid:
   the text and actions start at the avatar's left edge. The DOM stays .au, .txt, .tr, .acts (the translate
   handler reads .txt then .tr), see design A8. */
.note .main { display: contents; }
.note .acts { display: contents; }
.note .au {
  grid-area: au; margin-left: 12px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 2px; min-height: 36px;
  font: 500 13px/1.35 var(--body); color: var(--ink-soft);
}
.note .au > span:nth-child(2)::before, .note .au > span:nth-child(3)::before { content: "·"; margin-right: 8px; }
.note .au .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 15px/1.3 var(--body); color: var(--ink); }
.note .au .mood {
  display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--wt); color: var(--wf); font: 700 12px/1.3 var(--body); white-space: nowrap;
}
.note .au .mood .src { font-weight: 600; }
.note .txt { grid-area: txt; margin: 8px 0 0; font: 400 15px/1.5 var(--body); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
/* P-047: the note's photo, under the text, at most 320px tall and never wider than the note; a button that opens it full size. */
.note .img { grid-area: img; display: block; justify-self: start; max-width: 100%; margin: 10px 0 0; padding: 0; border: 0; border-radius: 12px; background: var(--track); overflow: hidden; cursor: zoom-in; }
.note .img img { display: block; max-width: 100%; max-height: 320px; width: auto; height: auto; }
.note .img:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.img-dlg { padding: 0; border: 0; border-radius: 12px; background: transparent; max-width: min(96vw, 1200px); max-height: 96vh; }
.img-dlg::backdrop { background: var(--backdrop); backdrop-filter: blur(2px); }
.img-dlg img { display: block; max-width: min(96vw, 1200px); max-height: 96vh; width: auto; height: auto; border-radius: 12px; }
.img-dlg .x-btn { position: fixed; top: 12px; right: 12px; }
.note .tr {
  grid-area: tr; align-self: center; display: inline-flex; align-items: center; min-height: 32px; margin-top: 4px; padding: 0 10px;
  font: 600 13px/1.3 var(--body); color: var(--ink-soft); text-decoration: none;
}
.note .tr:hover, .note .tr:focus-visible { color: var(--ink); text-decoration: underline; }
.note .cheer, .note .rep, .note .del {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 36px; min-width: 36px; margin-top: 4px; padding: 0 10px;
  border: 0; border-radius: 999px; background: none; color: var(--ink-soft);
  font: 600 13px/1 var(--body); font-variant-numeric: tabular-nums; cursor: pointer;
}
.note .cheer { grid-area: react; align-self: center; margin-left: -10px; }
.note .rep, .note .del { grid-area: flag; align-self: center; justify-self: end; font-size: 15px; }
@media (hover: hover) { .note .cheer:not(.on):hover, .note .rep:hover, .note .del:hover { background: var(--wash); color: var(--ink); } }
.note .cheer.on { background: var(--wt); color: var(--wf); font-weight: 700; }

/* ---------- P-040 replies: the Replies pill and the panel under a note ---------- */
.note .rbtn {
  grid-area: rbtn; justify-self: start; align-self: center; display: inline-flex; align-items: center; justify-content: center;
  height: 36px; min-width: 36px; margin-top: 4px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--ink-soft);
  font: 600 13px/1 var(--body); cursor: pointer;
}
.note .rbtn[aria-expanded="true"] { background: var(--wt); color: var(--wf); font-weight: 700; }
.note .rbtn { gap: 5px; padding: 0 8px; }
.note .rbtn .rc:empty { display: none; }
.note .rbtn svg { flex: none; }
@media (hover: hover) { .note .rbtn:hover { background: var(--wash); color: var(--ink); } }
/* Share (26 Nov): signed-in readers only; sits after Replies. The cell is the row's 1fr, so it hugs Replies. */
.note .shr {
  grid-area: shr; justify-self: start; align-self: center; display: inline-flex; align-items: center; justify-content: center;
  height: 36px; min-width: 36px; margin-top: 4px; padding: 0 8px; border: 0; border-radius: 999px; background: none; color: var(--ink-soft); cursor: pointer;
}
.note .shr svg { flex: none; }
@media (hover: hover) { .note .shr:hover { background: var(--wash); color: var(--ink); } }
/* The note a shared link opened: a short wash that fades out. */
.note.shared { animation: shared-note 2.6s ease-out; }
@keyframes shared-note { 0%, 40% { background: var(--wt); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .note.shared { animation: none; background: var(--wt); } }
.rpl { grid-area: rpl; min-width: 0; margin: 4px 0 8px 12px; padding-left: 12px; border-left: 2px solid var(--ctl); }
.rpl-list { list-style: none; margin: 0; padding: 0; }
.rpl-item { padding: 10px 0; }
.rpl-item + .rpl-item { border-top: 1px solid var(--hairline); }
.rpl-hd { display: flex; align-items: center; flex-wrap: wrap; column-gap: 8px; row-gap: 2px; min-height: 24px; font: 500 12px/1.35 var(--body); color: var(--ink-soft); }
.rpl-nm { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 14px/1.3 var(--body); color: var(--ink); }
/* P-054: a photo-only note or reply has an empty text; the paragraph takes no room. */
.note .txt:empty, .rpl-txt:empty { display: none; }
.rpl-txt { margin: 2px 0 0; font: 400 15px/1.5 var(--body); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.rpl-del {
  margin: -10px -10px -10px auto; display: inline-flex; align-items: center; justify-content: center; height: 36px; min-width: 36px; padding: 0 10px;
  border: 0; border-radius: 999px; background: none; color: var(--ink-soft); font: 600 12px/1 var(--body); cursor: pointer;
}
@media (hover: hover) { .rpl-del:hover { background: var(--wash); color: var(--ink); } }
/* Share a reply (27 Nov): the arrow in the reply's head, before Delete; a shared link marks the reply like a note. */
.rpl-shr { display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 32px; margin: -8px 0 -8px auto; padding: 0 6px; border: 0; border-radius: 999px; background: none; color: var(--ink-soft); cursor: pointer; }
.rpl-shr svg { width: 16px; height: 16px; }
.rpl-shr + .rpl-del { margin-left: 0; }
@media (hover: hover) { .rpl-shr:hover { background: var(--wash); color: var(--ink); } }
.rpl-item.shared { animation: shared-note 2.6s ease-out; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .rpl-item.shared { animation: none; background: var(--wt); } }
.rpl-state { margin: 0; padding: 10px 0; font: 500 14px/1.45 var(--body); color: var(--ink-soft); }
.rpl-state + .retry { margin-top: 8px; }
.rpl-more { min-width: 0; margin: 8px 0 4px; min-height: 40px; padding: 0 16px; font-size: 13px; }
.rpl-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ta ta" "cnt send"; gap: 8px 12px; align-items: center; margin-top: 10px; }
/* P-053: a photo on a reply. The form gains a camera beside the counter and a staged preview above them; a reply's photo
   sits under its text, smaller than a note's, and opens the same dialog. */
.rpl-form.has-cam { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "ta ta ta" "prev prev prev" "cnt cam send"; }
.rpl-prev { grid-area: prev; position: relative; display: inline-grid; justify-self: start; max-width: 100%; }
.rpl-prev img { display: block; max-width: 100%; max-height: 140px; width: auto; height: auto; border-radius: 12px; background: var(--track); }
.rpl-prev .x-btn { position: absolute; top: 6px; right: 6px; }
.rpl-prev:empty { display: none; }
.rpl-img { grid-area: cam; width: 40px; padding: 0; justify-content: center; }
.rpl-img svg { width: 20px; height: 20px; }
.rpl-img.has { background: var(--ink); color: var(--card); border-color: var(--ink); }
.rpl-pic { display: block; justify-self: start; max-width: 100%; margin: 8px 0 0; padding: 0; border: 0; border-radius: 10px; background: var(--track); overflow: hidden; cursor: zoom-in; }
.rpl-pic img { display: block; max-width: 100%; max-height: 220px; width: auto; height: auto; }
.rpl-pic:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rpl-form textarea {
  grid-area: ta; display: block; width: 100%; min-height: 72px; margin: 0; padding: 10px 12px; border: 1px solid var(--ctl-strong); border-radius: 12px;
  background: var(--card); color: var(--ink); font: 400 16px/1.5 var(--body); resize: vertical; box-sizing: border-box;
}
.rpl-form textarea::placeholder { color: var(--ink-soft); opacity: 1; }
.rpl-form textarea:focus { border-color: var(--ink); }
.rpl-form textarea[readonly] { color: var(--ink); }
.rpl-cnt { grid-area: cnt; font: 600 13px/1 var(--body); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rpl-cnt[data-full] { color: var(--ink); font-weight: 700; }
.rpl-send { grid-area: send; min-height: 44px; min-width: 104px; }
.vbtn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.rpl-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.rpl-prompt p { margin: 0; font: 600 14px/1.4 var(--body); color: var(--ink); }
.rpl-prompt .vbtn { flex: none; }
.rpl-msg { margin: 8px 0 0; font: 600 14px/1.45 var(--body); color: var(--ink); }
.rpl-msg:empty { margin: 0; }
.rpl-msg[data-kind="err"] { padding: 10px 14px; border-radius: 12px; background: var(--track); font-weight: 700; }
.note.new { animation: land .4s ease-out both; }
@keyframes land { from { opacity: 0; transform: translateY(-6px); } }
.note.new:nth-child(2) { animation-delay: 40ms; } .note.new:nth-child(3) { animation-delay: 80ms; }
.note.new:nth-child(4) { animation-delay: 120ms; } .note.new:nth-child(5) { animation-delay: 160ms; }
.note.new:nth-child(6) { animation-delay: 200ms; } .note.new:nth-child(n+7) { animation-delay: 240ms; }

/* ---------- empty and failed rows, Show more ---------- */
.state { padding: 40px 16px; text-align: center; }
.state p { margin: 0 0 12px; font: 600 16px/1.4 var(--body); color: var(--ink); }
.state p:last-child { margin-bottom: 0; }
.retry, .state .link-btn, .more {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  border: 1.5px solid var(--ink); border-radius: 12px; background: none; color: var(--ink);
  font: 700 14px/1 var(--body); text-decoration: none; cursor: pointer;
}
.more { display: flex; min-width: 160px; margin: 16px auto 0; }
@media (hover: hover) { .retry:hover:not(:disabled), .state .link-btn:hover, .more:hover { background: var(--wash); color: var(--ink); } }
.retry:disabled { opacity: .6; cursor: default; }

/* ---------- promo cards ---------- */
.promos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.promo {
  display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 20px;
  color: var(--ink); text-decoration: none;
}
.promo:hover { color: var(--ink); }
.promo.p1, .promo.p1:hover { color: var(--promo-ink, var(--ink)); }
.promo.p1 { background: var(--accent); border: 1px solid var(--accent); }
.promo.p2 { background: var(--card); border: 1px solid var(--hairline); }
.promo-t { font: 600 22px/1.25 var(--serif); letter-spacing: 0; }
.promo-x { margin-bottom: 10px; font: 400 14px/1.4 var(--body); }
.promo-go {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin-top: auto; padding-top: 0;
  border-radius: 12px; font: 700 14px/1 var(--body);
}
.promo.p1 .promo-go { background: var(--ink); color: var(--on-dark); }
.promo.p2 .promo-go { background: var(--accent); color: var(--promo-ink, var(--ink)); }
.promo:focus-visible { outline-offset: 3px; border-radius: 20px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .promo-go span[aria-hidden="true"] { transition: transform .15s ease-out; }
  .promo:hover .promo-go span[aria-hidden="true"] { transform: translateX(3px); }
}

/* ---------- footer ---------- */
.feed footer {
  margin-top: 32px; padding: 16px 0 calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hairline); text-align: left; font: 500 13px/1.5 var(--body); color: var(--ink-soft);
}
.feed footer p { margin: 0; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; }
.feed footer .total { margin-top: 6px; font: 700 13px/1.4 var(--body); color: var(--ink); font-variant-numeric: tabular-nums; }
.feed footer .links { margin-top: 10px; }
.feed footer a, .feed footer .link-btn { display: inline-block; min-height: 24px; padding: 6px 4px; font: 500 13px/1.4 var(--body); color: var(--ink-soft); }
.feed footer a:hover, .feed footer .link-btn:hover { color: var(--ink); }

/* ---------- for a screen reader only (not in seneng-base.css) ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- 390 ---------- */
@media (max-width: 640px) {
  .feed { padding-top: 24px; }
  .foot-top { flex-direction: column; }
  .tabs { margin-top: 0; }
  .tabs > div { gap: 6px; }
  .tab { min-height: 44px; padding: 0 10px; font-size: 13px; }
  .tab .em { display: none; }
  .compose { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head head" "msg msg" "cimg cimg" "rule rule" "pick pick" "cnt post" "meta meta" "warn warn"; }
  .compose #msg { height: 72px; min-height: 72px; }
  .compose .cnt { align-self: center; margin: 8px 12px 0 0; justify-self: end; }
  .compose .post { align-self: center; height: 44px; min-width: 104px; margin: 8px 0 0; }
  .pick-btn { height: 44px; }
  #moodBtn { max-width: 160px; }
  #whoBtn { max-width: 140px; }
  #imgBtn { width: 44px; }
  .picker.country select { width: min(200px, 100%); }
  .pop { width: 100%; max-width: calc(100vw - 32px); }
  .opt { min-height: 44px; }
  .compose #rule .link-btn { min-height: 44px; }
  .feedhead { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 0; }
  .feed h2 { font-size: 18px; }
  .sort { width: 100%; }
  .sort button { flex: 1; height: 44px; }
  .pill { height: 36px; }
  .pill.map { position: relative; }
  .pill.map .see {   /* the .sr-only pattern: out of the layout, still in the accessible name */
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  /* Same header shape on every row: name + chip on line 1, "country · time" on line 2. */
  .note .au { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "nm nm nm chip" "co tm . ."; align-items: center; row-gap: 0; }
  .note .au > .nm { grid-area: nm; }
  .note .au > span:nth-child(2) { grid-area: co; }
  .note .au > span:nth-child(3) { grid-area: tm; }
  .note .au > .mood { grid-area: chip; justify-self: end; }
  .note .au > span:nth-child(2)::before { content: none; }
  .note .tr { min-height: 44px; margin-top: 0; }
  .note .cheer, .note .rep, .note .del, .note .rbtn, .note .shr { height: 44px; min-width: 44px; margin-top: 0; }
  .rpl-del { height: 44px; min-width: 44px; }
  .rpl-shr { height: 44px; min-width: 44px; margin: -10px 0 -10px auto; }
  .note .au .mood .src { display: none; }
  .promos { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .feed footer { margin-top: 28px; }
}

/* ---------- the page behind the column ---------- */
body { background-color: var(--bg); background-image: none; min-height: 100vh; }
/* The stripe across the very top of the page: the feed's colour key, over the sticky bar. */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: var(--stripe); background: var(--spectrum); z-index: 30; pointer-events: none; }

/* seneng-base.css shortens the duration but keeps the name; a row must not move at all. */
@media (prefers-reduced-motion: reduce) {
  .note, .note.new { animation: none !important; transform: none !important; }
}

/* ---------- Privacy and Terms pages ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 24px 16px calc(60px + env(safe-area-inset-bottom, 0px)); }
.doc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.doc-top .brand img { width: 28px; height: 28px; margin-right: 6px; }
.doc-top > a:last-child { color: var(--ink-soft); font-weight: 700; }
.doc-paper {
  padding: 28px 26px;
  border: var(--line) solid var(--edge);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: 0 6px 0 var(--drop);
}
.doc-paper > * { max-width: 66ch; }
.doc-paper h1 { font-size: clamp(34px, 6vw, 46px); font-weight: 700; text-wrap: balance; }
.doc-paper h2 { margin: 30px 0 8px; font-size: 24px; text-wrap: balance; }
.doc-paper p, .doc-paper ul { margin: 0 0 16px; }
.doc-paper ul { padding-left: 1.2em; }
.doc-paper li { margin-bottom: 6px; }
.doc-paper .updated { color: var(--ink-soft); margin-top: 6px; }
.doc-paper a { color: var(--ink); text-decoration-color: var(--coral); }
.doc-paper > :last-child { margin-bottom: 0; }

/* ---------- dialogs ---------- */
/* The box is padded by .dlg, so a click on the dialog element itself is a click on the backdrop. */
dialog.sheet { padding: 0; }
dialog.sheet.wide { width: min(760px, calc(100vw - 32px)); }
.dlg { padding: 24px 22px 20px; }
.dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dhead h2 { margin: 0 0 4px !important; }
.dhead p { margin: 0; color: var(--ink-soft); }
.dhead .x-btn { flex: none; }
.dlg ul { margin: 0 0 12px; padding-left: 20px; }
.dlg li { margin-bottom: 6px; }
.dlg h3 { margin: 16px 0 4px; font-size: 20px; }
.dlg p { margin: 0 0 10px; }
.dlg a:not(.btn) { color: var(--coral); font-weight: 700; }

.mapbox { min-height: 120px; padding: 8px; border: var(--line) solid var(--edge); border-radius: var(--r-sm); background: color-mix(in srgb, var(--sky) 14%, var(--card)); }
.mapbox svg { display: block; width: 100%; height: auto; }
.land { fill: var(--land); stroke: var(--coast); stroke-width: .6; vector-effect: non-scaling-stroke; }
.land.has { fill: var(--land-on); cursor: pointer; }
.bub { fill: var(--coral); fill-opacity: .92; stroke: var(--edge); stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.bub.sel { fill: var(--grape); stroke-width: 2.5; }
.num { fill: var(--on-dark); font-family: var(--body); font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; margin: 10px 2px 4px; color: var(--ink-soft); }
.pick b { color: var(--ink); }
.pick .btn { flex: none; padding: 9px 16px; font-size: 16px; }
.rank { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.rank button { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 4px 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; font-weight: 700; }
.rank button:hover { background: var(--bg-2); }
.rank .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rank .ct { text-align: right; font-variant-numeric: tabular-nums; }
.rank .bar { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.rank .bar i { display: block; height: 100%; min-width: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--sun), var(--coral)); }

/* The game poster (ads.js): just the image, as large as the screen allows at its 4:5 shape. */
dialog.ad { position: fixed; inset: 0; margin: auto; width: min(calc(100% - 24px), 440px, calc((100dvh - 76px) * .8)); max-width: none; max-height: none; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
dialog.ad::backdrop { background: var(--backdrop); backdrop-filter: blur(2px); }
dialog.ad[open] { animation: pop .3s cubic-bezier(.3, 1.5, .6, 1); }
dialog.ad a { display: block; text-decoration: none; cursor: pointer; border-radius: 22px; }
dialog.ad img { display: block; width: 100%; height: auto; border: var(--line) solid var(--edge); border-radius: 22px; box-shadow: 0 8px 0 var(--drop); }
.adtag { display: block; width: fit-content; margin: 0 auto 10px; padding: 6px 14px; border-radius: 99px; background: var(--ad-bg); color: var(--ad-ink); font: 600 13px var(--body); }
dialog.ad a:focus-visible { outline: 3px solid var(--ad-on); outline-offset: 3px; }
/* The ✕ sits on the poster's top corner, big enough for a thumb. */
dialog.ad .x { position: absolute; top: 44px; right: 8px; width: 40px; height: 40px; border: 2px solid var(--ad-on); border-radius: 50%; background: var(--ad-ink); color: var(--ad-on); font-size: 16px; cursor: pointer; box-shadow: var(--ad-shadow); }

/* ---------- what the shared sheet paints, in hidup's colours ---------- */
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; }
.langs, .pill-btn, .x-btn { box-shadow: none; }
.langs button[aria-pressed="true"] { background: var(--fill); color: var(--ink); }
a:hover, .link-btn:hover { color: var(--ink); }
.dlg a:not(.btn) { color: var(--ink); }
.btn, .btn.coral { background: var(--fill); color: var(--ink); border-color: var(--fill-edge); box-shadow: 0 3px 0 var(--drop); font-weight: 700; }
.btn:hover, .btn.coral:hover { color: var(--ink); }
.toast { background: var(--fill); color: var(--ink); border-color: var(--fill-edge); }

/* ---------- account: Sign in / @username in the bar ---------- */
.tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* A signed-in note: its writer's username, with a tick. The name box shows it and can't be changed. */
.note .au .ok { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 2px; border-radius: 50%; background: var(--ink); color: var(--on-dark); font-size: 12px; vertical-align: 1px; }
.rule.signed { font-weight: 800; color: var(--ink); }
.compose .guest { grid-column: 1 / -1; width: auto; max-width: none; margin: 10px 0 0; font: 600 13px/1.4 var(--body); color: var(--ink-2); }   /* P-000a: signed out, says sign-in comes at Post */
.providers { display: grid; gap: 10px; margin-top: 8px; }
.providers .btn { width: 100%; }
#uForm label { display: block; font-weight: 800; margin: 6px 0; }
#uForm input { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: var(--line) solid var(--edge); border-radius: var(--r-sm); padding: 11px 14px; }

/* ---------- T-045: the shell ----------
   From 700 px a left panel is the nav; below it there is a top bar, a bottom bar and a More sheet. The feed and the
   Games and coming-soon views are two sibling mains; shell.js shows one. Colours are the tokens above. */
.ico {
  display: inline-block; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}
.i-feed { -webkit-mask-image: url(assets/icons/feed.svg); mask-image: url(assets/icons/feed.svg); }
.i-games { -webkit-mask-image: url(assets/icons/games.svg); mask-image: url(assets/icons/games.svg); }
.i-board { -webkit-mask-image: url(assets/icons/board.svg); mask-image: url(assets/icons/board.svg); }
.i-competitions { -webkit-mask-image: url(assets/icons/competitions.svg); mask-image: url(assets/icons/competitions.svg); }
.i-profile { -webkit-mask-image: url(assets/icons/profile.svg); mask-image: url(assets/icons/profile.svg); }
.i-winners { -webkit-mask-image: url(assets/icons/winners.svg); mask-image: url(assets/icons/winners.svg); }
.i-whats-new { -webkit-mask-image: url(assets/icons/whats-new.svg); mask-image: url(assets/icons/whats-new.svg); }
.i-more { -webkit-mask-image: url(assets/icons/more.svg); mask-image: url(assets/icons/more.svg); }
.i-plus { -webkit-mask-image: url(assets/icons/plus.svg); mask-image: url(assets/icons/plus.svg); }
.i-person { -webkit-mask-image: url(assets/icons/person.svg); mask-image: url(assets/icons/person.svg); }

/* One nav row for the panel, the bottom bar and the More sheet. */
.navlist { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-a {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin: 0; padding: 0 4px 0 8px;
  border: 0; border-radius: 12px; background: none; color: var(--ink);
  font: 400 14px/1.3 var(--body); text-align: left; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease-out, color .15s ease-out;
}
.nav-l { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.soon {
  display: inline-block; height: 20px; padding: 0 8px; border-radius: 999px;
  background: var(--track); color: var(--ink-2); font: 700 12px/20px var(--body);
}
.nav-a[aria-current="page"] { background: var(--accent-tint); font-weight: 700; }
@media (hover: hover) {
  .nav-a:hover { background: var(--wash); color: var(--ink); }
  .nav-a[aria-current="page"]:hover { background: var(--accent-tint); }
}
@media (prefers-reduced-motion: no-preference) {
  .nav-a:active { transform: scale(.97); transition-duration: .1s; }
}
.navlist > .sep { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.tagline { margin: 0; font: 500 12px/1.4 var(--body); color: var(--ink-soft); }

/* The three account controls: a person glyph and a label that shell.js sets with textContent. */
.acct {
  display: inline-flex; align-items: center; width: 100%; min-height: 44px; margin: 0; padding: 0 12px;
  border: 1px solid var(--ctl); border-radius: 999px; background: var(--card); color: var(--ink);
  font: 700 14px/1.3 var(--body); cursor: pointer;
}
.acct-t { display: inline-flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-t::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-right: 8px; background: currentColor;
  -webkit-mask: url(assets/icons/person.svg) center / contain no-repeat; mask: url(assets/icons/person.svg) center / contain no-repeat;
}
@media (hover: hover) { .acct:hover { background: var(--wash); } }
.langs button { min-height: 36px; min-width: 44px; }

/* The Games and coming-soon views (main#view): the feed's column. */
.view { width: calc(100% - 2 * var(--gutter)); max-width: var(--col); margin-inline: auto; padding-top: 32px; font-size: 16px; }
:is(.view, .compose-dlg, .more-sheet) :is(h1, h2, h3) { font-family: var(--serif); font-weight: 600; letter-spacing: 0; }
:is(.view, .feed) h1[tabindex="-1"]:focus-visible { outline: none; }
.view h1 { margin: 0; font-size: 32px; line-height: 1.15; color: var(--ink); text-wrap: balance; }
.vsub { margin: 8px 0 0; font: 400 15px/1.45 var(--body); color: var(--ink-soft); }
.gprompt { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding: 12px 16px; border-radius: 20px; background: var(--accent); }
.gprompt p { margin: 0; font: 600 15px/1.4 var(--body); color: var(--ink); }
.gp-btn, .vbtn, .gplay {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px;
  border: 1.5px solid var(--ink); border-radius: 12px; background: var(--cta-bg); color: var(--cta-ink);
  font: 700 14px/1 var(--body); text-decoration: none; cursor: pointer;
}
.gp-btn { flex: none; width: auto; min-width: 0; min-height: 44px; padding: 0 16px; }
.gplay { width: 100%; }
.ghub { margin-top: 40px; }
.vsub + .ghub, .gprompt + .ghub { margin-top: 32px; }
.ghead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gpill { display: inline-block; margin: 0; padding: 4px 14px; border-radius: 999px; font-size: 20px; line-height: 1.3; }
.g-k { background: var(--tint-k); color: var(--chip-k); }
.g-s { background: var(--tint-s); color: var(--chip-s); }
.gexplore { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font: 700 14px/1.3 var(--body); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.gexplore::after, .gplay::after { content: "→"; content: "→" / ""; margin-left: 6px; }
.gexplore:hover { color: var(--ink); }
.ggrid { display: grid; gap: 12px; margin-top: 12px; }
.gcard { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--hairline); border-radius: 20px; background: var(--card); }
.gcard img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--track); }
.gbody { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; }
.gtag { display: inline-flex; align-items: center; height: 24px; margin-bottom: 6px; padding: 0 10px; border-radius: 999px; background: var(--track); color: var(--ink-2); font: 700 12px/1 var(--body); }
.gbody h3 { margin: 0; font-size: 20px; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; }
.gbody p { margin: 0 0 12px; font: 400 14px/1.45 var(--body); color: var(--ink-soft); overflow-wrap: anywhere; }
.gplay { margin-top: auto; }
.vchip { display: inline-flex; align-items: center; height: 24px; margin-bottom: 12px; padding: 0 10px; border-radius: 999px; background: var(--track); color: var(--ink-2); font: 700 12px/1 var(--body); }
.vtext { max-width: 46ch; margin: 12px 0 0; font: 400 16px/1.5 var(--body); color: var(--ink); }
.vacts { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.vbtn.ghost { background: none; color: var(--ink); border: 1.5px solid var(--ink); }
/* P-056 Scores on the hub: the feed's featured game, the top line on a Games card, the Leaderboard view. */
/* The card wears the site's accent (founder 27 Nov: hidup gold, kesel red, seneng green) like .gprompt: --card-fill (each brand.css,
   a step lighter than --accent; founder: "lightened a bit") is the fill,
   the text is --promo-ink (hidup's dark ink on gold); kesel/seneng brand.css recolour the text to --accent-ink (white on red /
   green). The Play button is --white on --ink so it reads on any of the three fills in both themes. */
.gbanner { display: flex; gap: 18px; align-items: stretch; margin: 0 0 20px; padding: 18px; border: 1px solid var(--card-fill, var(--accent)); border-radius: 20px; background: var(--card-fill, var(--accent)); color: var(--promo-ink, var(--ink)); }
.gbanner[hidden] { display: none; }
/* Once the banner shows a game at the top, the game promo at the foot of the feed says the same thing twice: drop it. */
.gbanner:not([hidden]) ~ .promos { grid-template-columns: 1fr; }
.gbanner:not([hidden]) ~ .promos .p1 { display: none; }
.gb-cover { flex: none; width: 160px; height: 90px; border-radius: 14px; object-fit: cover; background: var(--track); align-self: flex-start; box-shadow: 0 6px 0 var(--drop); }   /* lifted off the card like the ad's image */
.gb-body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.gbanner .gb-name { margin: 0; font: 600 20px/1.2 var(--serif); letter-spacing: 0; color: inherit; }   /* .gbanner: outranks .feed h2 */
.gb-kicker { margin: 8px 0 0; font: 700 12px/1.3 var(--body); letter-spacing: .06em; text-transform: uppercase; color: inherit; }
.gb-score { margin: 2px 0 0; font: 800 32px/1.1 var(--body); color: inherit; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gb-score.gb-first { font-size: 16px; font-weight: 600; color: inherit; }
.gb-who { font-size: 15px; font-weight: 600; color: inherit; }
.gb-acts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: auto; padding-top: 14px; }
.gb-play { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1.5px solid var(--white); border-radius: 12px; background: var(--white); color: var(--ink); font: 700 14px/1 var(--body); text-decoration: none; }
.gb-board { display: inline-flex; align-items: center; min-height: 44px; font: 700 14px/1 var(--body); color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.gbanner :focus-visible { outline-color: var(--promo-ink, var(--ink)); }
.gb-board::after { content: "\2192"; margin-left: 5px; }
.gtop { margin: -8px 0 12px; font: 600 13px/1.4 var(--body); color: var(--ink); font-variant-numeric: tabular-nums; }
.gtop [data-t] { font-weight: 500; color: var(--ink-soft); }
.gtop .gwho { font-weight: 500; color: var(--ink-soft); }
.btabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.btab { min-height: 36px; padding: 0 14px; border: 1px solid var(--ctl); border-radius: 999px; background: var(--card); color: var(--ink-2); font: 600 14px/1 var(--body); cursor: pointer; }
.btab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.bcard { margin-top: 16px; overflow: hidden; border: 1px solid var(--hairline); border-radius: 20px; background: var(--card); }
.bhead { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.bhead img { flex: none; width: 112px; height: 63px; border-radius: 12px; object-fit: cover; background: var(--track); }
.bhd { display: flex; flex: 1; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-width: 0; }
.bhd h2 { margin: 0; font-size: 20px; line-height: 1.25; color: var(--ink); }
.bhd .gplay { width: auto; min-height: 40px; padding: 0 16px; }
.bmine { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 16px; border-top: 1px solid var(--hairline); background: var(--accent-tint); }
.bmine p { margin: 0; font: 500 14px/1.45 var(--body); color: var(--ink); }
.bmine .vbtn { min-height: 40px; padding: 0 16px; font-size: 13px; }
.bmine-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bstate { margin: 0; padding: 20px 16px; border-top: 1px solid var(--hairline); font: 400 15px/1.45 var(--body); color: var(--ink-soft); }
.bstate + .vbtn { margin: 0 16px 16px; }
.brows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hairline); }
.brow { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 16px; font: 500 15px/1.3 var(--body); color: var(--ink); }
.brow + .brow { border-top: 1px solid var(--hairline); }
.brank { flex: none; width: 28px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.brow.is-top .brank { color: var(--ink); }
.bname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.byou { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: var(--on-dark); font: 700 12px/1.5 var(--body); }
.bbest { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.brow.is-me { background: var(--accent-tint); font-weight: 700; }
@media (hover: hover) {
  .gb-play:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
  .btab[aria-pressed="false"]:hover { background: var(--wash); color: var(--ink); }
}
@media (max-width: 479.98px) {
  /* Phones: cover left, the three lines right, the two buttons on a full-width row under both (they wrapped in the narrow body). */
  .gbanner { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 0 14px; padding: 16px; }
  .gbanner[hidden] { display: none; }
  .gb-body { display: contents; }
  .gb-cover { grid-row: 1 / span 3; width: 128px; height: 72px; }
  .gb-acts { grid-column: 1 / -1; padding-top: 16px; }
  .gb-acts .gb-play { flex: 1; }
  .gb-kicker { margin-top: 6px; }
  .bhead img { width: 88px; height: 50px; }
}
/* T-046 Profile */
.pf-name { margin: 12px 0 0; font: 700 22px/1.25 var(--body); color: var(--ink); overflow-wrap: anywhere; }
.pf-via { margin: 4px 0 0; font: 400 14px/1.45 var(--body); color: var(--ink-soft); }
.pf-ban { margin: 12px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--track); font: 600 14px/1.45 var(--body); color: var(--ink); }
.pf-one { margin-top: 24px; }
.view .pf-h { margin: 32px 0 0; font-size: 22px; line-height: 1.25; color: var(--ink); }
.pf-games { margin: 12px 0 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: 16px; background: var(--card); }
.pf-game { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 16px; }
.pf-game + .pf-game { border-top: 1px solid var(--hairline); }
.pf-gt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-gt a { font: 700 15px/1.3 var(--body); color: var(--ink); text-underline-offset: 3px; overflow-wrap: anywhere; }
.pf-flag, .pf-small { font: 400 13px/1.45 var(--body); color: var(--ink-soft); }
.pf-best { flex: none; font: 700 16px/1 var(--body); color: var(--ink); font-variant-numeric: tabular-nums; }
.pf-best [data-t] { font-weight: 400; font-size: 14px; color: var(--ink-soft); }
.pf-danger-zone { margin: 40px 0 0; padding: 16px; border: 1px solid var(--hairline); border-radius: 16px; }
.pf-danger-zone summary { min-height: 32px; font: 700 15px/2 var(--body); color: var(--ink); cursor: pointer; }
.pf-danger-zone p.pf-small { margin: 8px 0 0; }
.pf-del { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 16px; }
.pf-input { width: 100%; max-width: 320px; min-height: 48px; padding: 0 12px; border: 1px solid var(--ctl-strong); border-radius: 12px; background: var(--card); color: var(--ink); font: 400 16px/1.5 var(--body); }
.pf-hint:empty { display: none; }
.pf-hint { margin: 0; font-weight: 700; color: var(--ink); }
.vbtn.pf-danger { background: var(--ink); color: var(--on-dark); }
.vbtn:disabled { opacity: .6; cursor: progress; }
@media (hover: hover) {
  .gp-btn:hover, .vbtn:not(.ghost):hover, .gplay:hover { background: var(--ink-soft); color: var(--on-dark); }
  .vbtn.ghost:hover { background: var(--wash); color: var(--ink); }
}
@media (min-width: 560px) {
  .ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .vacts { flex-direction: row; }
  .vbtn { width: auto; }
}

/* The shell dialogs (More now, the composer later): not .sheet, so their own box. */
dialog.shdlg { padding: 0; border: 0; max-width: none; max-height: none; background: var(--card); color: var(--ink); overscroll-behavior: contain; }
dialog.shdlg::backdrop { background: var(--backdrop); backdrop-filter: blur(2px); }
.sdlg { position: relative; padding: 20px; }
.sx { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); font-size: 24px; }
@media (hover: hover) { .sx:hover { background: var(--wash); } }
html.is-locked { overflow: hidden; scrollbar-gutter: stable; }

dialog.more-sheet {
  margin: auto auto 0; width: min(100%, 480px); max-height: calc(100% - 48px); overflow-y: auto;
  border-top: 1px solid var(--hairline); border-radius: 20px 20px 0 0;
  transition: translate .16s ease-out;
}
dialog.more-sheet[open] { translate: none; }
@starting-style { dialog.more-sheet[open] { translate: 0 100%; } }
.more-sheet .sdlg { padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.shead { display: flex; align-items: center; min-height: 56px; padding-right: 52px; }
.shead h2 { margin: 0; font-size: 20px; line-height: 1.3; color: var(--ink); }
.more-sheet .sx { top: 14px; right: 8px; }
.more-sheet .nav-a { min-height: 56px; padding: 0 12px; font-size: 16px; font-weight: 500; }
.more-sheet .nav-a[aria-current="page"] { font-weight: 700; }
.more-sheet .nav-l { flex: 1; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
.more-sheet .ico { width: 20px; height: 20px; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); font: 600 14px/1.3 var(--body); }
.mrow .langs button { min-width: 56px; min-height: 44px; }
.macct { min-height: 56px; border: 0; border-radius: 12px; background: none; font-size: 16px; }
.more-sheet .tagline { margin-top: 8px; }
/* The contact heading in both languages, picked by <html lang> (no JS: kesel/seneng cache scripts 4 h). */
.contact .ask-id, html[lang="id"] .contact .ask-en { display: none; }
html[lang="id"] .contact .ask-id { display: inline; }

/* From 700: the left panel. */
@media (min-width: 700px) {
  body:has(> .panel) { padding-left: calc(var(--lead) + var(--side) + var(--gap)); padding-right: max(var(--lead), var(--gutter)); }
  body:not(:has(> .panel)) { padding-left: 163px; }   /* doc pages (privacy, terms): no panel, unchanged */
  .feed, .view { width: auto; max-width: var(--col); margin-inline: 0; }
  .panel {
    position: fixed; top: 0; left: var(--lead); bottom: 0; z-index: 20; display: flex; flex-direction: column; width: var(--side);
    padding: calc(var(--stripe) + 16px) 8px 16px; overflow-y: auto; overscroll-behavior: contain;
    border-left: 1px solid var(--hairline); border-right: 1px solid var(--hairline); background: var(--card);
  }
  .panel .tagline { text-wrap: balance; }
  .panel .brand { align-self: flex-start; margin: 0 0 16px 10px; }
  .pfoot { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: auto; padding-top: 12px; }
  .pfoot .sites { width: 100%; }
  .pfoot .langs { display: flex; width: 100%; box-sizing: border-box; }   /* language pick spans the panel */
  .pfoot .langs button { flex: 1; }
  .panel .site { min-height: 44px; padding: 0 1px; border-radius: 10px; flex-direction: column; gap: 4px; font-size: 12px; }
  @media (max-height: 699px) { .panel .tagline:not(.contact) { display: none; } }   /* the contact stays */
  .topbar, .bnav { display: none; }
  :root {
    --stick: calc(var(--stripe) + env(safe-area-inset-top, 0px));   /* no sticky bar */
    --lead: max(0px, calc((100% - var(--side) - var(--gap) - var(--col)) / 2));   /* use only in .panel left and body padding */
  }
  .view h1 { font-size: 36px; }
}

/* The rail (P-056b, the mockup's right column; founder 27 Nov: "for web the beat this score banner should be at the right
   panel"): on every laptop width, from 1100px, the game card, the board and the other games sit in a fixed column to the
   right of the feed and the in-feed card hides. 1100-1319: panel 200 + 32 + column 600 + 24 + rail 240 = 1096.
   From 1320 (founder, 2026-11-08: margins were too big): panel 232 + 48 + column 720 + 32 + rail 272 = 1304.
   700-1099 (tablets) keep the card in the feed: there is no room for a third column. */
.rail { display: none; }
@media (min-width: 1320px) {
  :root { --side: 232px; --gap: 48px; --col: 720px; --rail: 272px; --rgap: 32px; }
}
@media (min-width: 1100px) {
  :root {
    --rail: 240px; --rgap: 24px;
    --lead: max(0px, calc((100% - var(--side) - var(--gap) - var(--col) - var(--rgap) - var(--rail)) / 2));
  }
  body:has(> .panel) { padding-right: calc(var(--lead) + var(--rgap) + var(--rail)); }
  .rail {
    position: fixed; top: calc(var(--stripe) + 32px); bottom: 0; z-index: 10; display: flex; flex-direction: column; gap: 16px;
    left: calc(var(--lead) + var(--side) + var(--gap) + var(--col) + var(--rgap)); width: var(--rail); padding-bottom: 24px;
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  }
  .rail:empty, .view:not([hidden]) ~ .rail { display: none; }
  .feed .gbanner { display: none; }   /* the rail carries the game; the promo at the foot stays dropped (the rule above reads the banner, not the width) */
  .rl-game { flex-direction: column; gap: 12px; margin: 0; }
  .rl-game .gb-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .rl-board, .rl-break { padding: 14px 16px 16px; border: 1px solid var(--hairline); border-radius: 20px; background: var(--card); }
  .rl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }   /* the select wraps under the title in the 240 rail */
  .rl-head h2, .rl-break h2 { margin: 0; font: 600 17px/1.25 var(--serif); letter-spacing: 0; color: var(--ink); }
  .rl-pick select { max-width: 100%; min-height: 32px; padding: 0 8px; border: 1px solid var(--ctl); border-radius: 10px; background: var(--card); color: var(--ink); font: 600 13px/1 var(--body); }
  .rl-rows { border-top: 0; margin: 0 -16px; }
  .rl-rows .brow { min-height: 40px; padding: 4px 16px; font-size: 14px; }
  .rl-state { margin: 4px 0; font: 400 14px/1.45 var(--body); color: var(--ink-soft); }
  .rl-mine { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-tint); font: 500 13px/1.45 var(--body); color: var(--ink); }
  .rl-mine a { display: block; margin-top: 2px; font-weight: 700; color: var(--ink); }
  .rl-share { display: block; margin: 4px 0 0; padding: 0; border: 0; background: none; font: 700 13px/1.45 var(--body); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
  .rl-full { display: inline-block; margin-top: 12px; font: 700 13px/1 var(--body); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
  .rl-full::after { content: "\2192"; margin-left: 5px; }
  .rl-break ul { margin: 8px 0 0; padding: 0; list-style: none; }
  .rl-break a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
  .rl-break img { flex: none; width: 56px; height: 32px; border-radius: 8px; object-fit: cover; background: var(--track); }
  .rl-gn { flex: 1; min-width: 0; font: 600 14px/1.3 var(--body); }
  .rl-gt { flex: none; font: 500 12px/1 var(--body); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
  @media (hover: hover) { .rl-break a:hover .rl-gn { text-decoration: underline; } }
}


/* Below 700: top bar, bottom bar, More sheet. */
@media (max-width: 699.98px) {
  :root { --row-1: 44px; }
  .panel { display: none; }
  .topbar {
    position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--hairline);
    padding-top: calc(var(--stripe) + env(safe-area-inset-top, 0px));
  }
  .tb {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
    width: calc(100% - 2 * var(--gutter)); max-width: var(--col); height: var(--row-1); margin-inline: auto;
  }
  .topbar .brand { padding-block: 9px; }
  .tb-acct { width: auto; min-width: 44px; padding: 0 4px; border: 0; background: none; }
  .tb-acct .acct-t { max-width: 160px; height: 32px; padding: 0 12px; border: 1px solid var(--ctl); border-radius: 999px; font-size: 13px; }
  .bnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 0 8px env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--hairline); background: var(--card);
  }
  .bnav .navlist { display: flex; gap: 8px; height: 60px; }
  .bnav li { display: flex; flex: 1 1 auto; min-width: 56px; }
  .bnav .nav-a {
    position: relative; isolation: isolate; flex-direction: column; justify-content: flex-start; gap: 2px;
    padding: 8px 0 6px; font-size: 12px; font-weight: 500; color: var(--ink-soft);
  }
  .bnav .nav-a::before { content: ""; position: absolute; z-index: -1; top: 8px; left: 50%; width: 52px; height: 28px; margin-left: -26px; border-radius: 999px; }
  .bnav .nav-a[aria-current="page"] { background: none; color: var(--ink); font-weight: 700; }
  .bnav .nav-a[aria-current="page"]::before { background: var(--accent-tint); }
  .bnav .nav-a:hover { background: none; }
  .bnav .ico { width: 24px; height: 24px; margin-block: 2px; }
  .bnav .nav-l { align-items: center; }
  .feed footer, .view { padding-bottom: calc(144px + env(safe-area-inset-bottom, 0px)); }
  .view { padding-top: 24px; }
  .toast { bottom: calc(144px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- T-045: the composer modal, "+" and the three tabs ---------- */
.plus {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin: 16px 0 0; padding: 0 8px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--on-dark); font: 700 14px/1 var(--body); cursor: pointer;
}
.plus:focus-visible, .fab:focus-visible { outline-offset: 3px; }
@media (hover: hover) { .plus:hover, .fab:hover { background: var(--ink-soft); } }
@media (prefers-reduced-motion: no-preference) { .plus:active, .fab:active { transform: scale(.97); transition-duration: .1s; } }
.fab { display: none; }

dialog.compose-dlg {
  width: min(600px, calc(100% - 32px)); max-height: calc(100% - 64px); margin: 48px auto auto; overflow-y: auto;
  border: 1px solid var(--hairline); border-radius: 20px; box-shadow: var(--shadow);
  opacity: 1; translate: none; transition: opacity .16s ease-out, translate .16s ease-out;
}
@starting-style { dialog.compose-dlg[open] { opacity: 0; translate: 0 8px; } }
.ctitle { margin: 0; padding-right: 52px; font-size: 22px; line-height: 1.25; color: var(--ink); }
.csub { margin: 4px 0 0; padding-right: 52px; font: 400 15px/1.45 var(--body); color: var(--ink-soft); }
/* Flat composer inside the modal: no card, the dialog is the card. */
.compose-dlg .compose { margin: 12px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.compose-dlg .compose:has(#msg:focus) { border-color: transparent; box-shadow: none; }
.compose-dlg .compose #msg { height: 88px; min-height: 88px; border-bottom: 2px solid transparent; }
.compose-dlg .compose #msg:focus { border-bottom-color: var(--ink); }

@media (min-width: 700px) {
  .fab { display: none; }
  dialog.compose-dlg { margin-top: max(24px, 8vh); max-height: calc(100% - max(24px, 8vh) - 24px); }
  .compose-dlg .sdlg { padding: 24px 20px; }
  .ctitle { font-size: 24px; }
  .compose-dlg .compose #msg { height: 112px; min-height: 112px; }
  .compose-dlg .pop.list { max-height: min(360px, 60vh); }
}
@media (min-width: 700px) and (min-height: 760px) {
  dialog.compose-dlg { overflow: visible; }
}
@media (max-width: 699.98px) {
  .fab {
    position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 26;
    display: flex; align-items: center; justify-content: center; width: auto; min-width: 56px; height: 56px; padding: 0 18px 0 16px;
    border: 0; border-radius: 20px; background: var(--cta-bg); color: var(--cta-ink); box-shadow: var(--shadow); cursor: pointer;
    font: 700 14px/1 var(--body);
  }
  .fab .ico { flex: none; width: 24px; height: 24px; }
  /* P-051: a word beside the plus at the top of the page; chrome.js adds .is-compact after 120px, .is-away while reading down */
  .fab .fab-l { max-width: 120px; margin-left: 8px; overflow: hidden; white-space: nowrap; }
  .fab.is-compact { padding: 0; }
  .fab.is-compact .fab-l { max-width: 0; margin-left: 0; opacity: 0; }
  .fab.is-away { transform: translateY(calc(100% + 96px)); }
  .pill { position: relative; }
  .pill::after { content: ""; position: absolute; inset: -4px 0; }
  .feed footer a, .feed footer .link-btn { display: inline-flex; align-items: center; min-height: 44px; }
  .more-sheet a[href^="mailto"] { display: inline-flex; align-items: center; min-height: 44px; }
  /* The mood list is a sheet pinned to the viewport, so it never stretches the dialog's scroll area. */
  .compose-dlg .pop.list { position: fixed; top: auto; left: 16px; right: 16px; bottom: 16px; width: auto; max-width: none; max-height: min(360px, 60dvh); }
  .compose-dlg .pop.list .opt { min-height: 44px; }
  /* Three equal tabs, no emoji. */
  .tabs .tab { flex: 1 1 0; justify-content: center; min-height: 44px; padding: 0 8px; font-size: 13px; }
  .tab .em { display: none; }
}

/* ---------- T-070: the F8 site switcher (three tiles: kesel, hidup, seneng) ----------
   Panel (>= 700): a 3-up row above EN | ID, tiles 47.3 x 44. More sheet: a labelled row of 114 x 48 tiles.
   The current site is a span with aria-current (selected fill, bold name, 2 px ink bar); the others are links. */
.sites { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.site {
  position: relative; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-width: 0; margin: 0; background: none; color: var(--ink); text-decoration: none;
  font: 500 12px/1.2 var(--body); white-space: nowrap;
  transition: background-color .15s ease-out, color .15s ease-out;
}
.site .sw { flex: none; width: 14px; height: 14px; box-sizing: border-box; border: 1.5px solid var(--ink); border-radius: 50%; }
.s-kesel .sw { background: var(--sw-kesel); }
.s-hidup .sw { background: var(--sw-hidup); }
.s-seneng .sw { background: var(--sw-seneng); }
.site[aria-current="true"] { background: var(--accent-tint); font-weight: 700; }
.site[aria-current="true"] .sn { box-shadow: 0 2px 0 var(--ink); }
.site:is(a):focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) { .site:is(a):hover { background: var(--wash); color: var(--ink); } }
@media (prefers-reduced-motion: no-preference) { .site:is(a):active { transform: scale(.97); transition-duration: .1s; } }
.msites { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.slabel { margin: 0 0 8px; font: 700 12px/18px var(--body); color: var(--ink-soft); }
.msites .sites { gap: 8px; }
.site.in-more { min-height: 48px; gap: 8px; border-radius: 12px; font-size: 14px; }

/* P-039 profile image */
.pf-id { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.pf-av { flex: none; position: relative; width: 96px; height: 96px; border-radius: 999px; overflow: hidden; display: grid; place-items: center; background: var(--wt); color: var(--wf); font: 800 36px/1 var(--body); letter-spacing: .01em; }
.pf-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-av::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--hairline); pointer-events: none; }
.pf-av[aria-busy="true"] > * { opacity: .5; }
.pf-idt { min-width: 0; }
.pf-idt .pf-name { margin: 0; }
.pf-avctl { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.pf-avctl .vbtn { flex: 1 1 140px; }
@media (min-width: 560px) { .pf-avctl .vbtn { flex: none; } }
.pf-avhelp { max-width: 46ch; margin: 12px 0 0; }
.pf-avmsg { max-width: 46ch; margin: 8px 0 0; font: 600 14px/1.45 var(--body); color: var(--ink); }
.pf-avmsg:empty { margin: 0; }
.pf-avmsg[data-kind="err"] { padding: 10px 14px; border-radius: 12px; background: var(--track); font-weight: 700; }
.vbtn[aria-disabled="true"] { opacity: .6; cursor: progress; }
.acct-t[data-av]::before { display: none; }
.acct-t .acct-av { flex: none; width: 24px; height: 24px; margin-right: 8px; border-radius: 999px; object-fit: cover; background: var(--track); }
.tb-acct .acct-t[data-av] { padding-left: 4px; }

/* ---------- P-060: a player's public page (#/u/<username>) ---------- */
.uv-title { overflow-wrap: anywhere; }
.uv-id { margin-top: 16px; }
.uv-joined { margin: 0; font-size: 15px; }
.uv-img { flex: none; width: 96px; height: 96px; border-radius: 999px; object-fit: cover; display: block; box-shadow: inset 0 0 0 1px var(--hairline); background: var(--track); }
/* P-062: the counts as on X — the number in ink, the word soft, each a link to the list page (or, on the own Profile, a button
   that opens the matching tab). On the own Profile they sit under the name (.pf-idt), on a player's page under the picture. */
.uv-counts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 14px 0 0; font: 400 15px/1.4 var(--body); color: var(--ink-soft); }
.pf-idt .uv-counts { margin-top: 8px; font-size: 14px; gap: 4px 14px; }
.pf-joined { margin-top: 2px; }
.uv-count { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: none; cursor: pointer; }
.uv-count b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
a.uv-count:hover, a.uv-count:focus-visible, button.uv-count:hover, button.uv-count:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.uv-acts { margin-top: 16px; flex-direction: row; flex-wrap: wrap; align-items: center; }
.uv-follow { min-width: 140px; }
.uv-follow.is-on { background: var(--accent-tint); border-color: var(--hairline); }
.uv-you { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0; color: var(--ink-soft); }
.uv-msg { margin-top: 8px; }
.uv-hint { margin: 4px 0 0; color: var(--ink-soft); }
.uv-notes { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.uv-note { padding: 14px 16px; border: 1px solid var(--hairline); border-radius: 16px; background: var(--card); }
.uv-txt { margin: 0; font: 400 16px/1.5 var(--body); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.uv-pic { margin: 6px 0 0; font: 400 14px/1.4 var(--body); color: var(--ink-soft); }
.uv-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 10px 0 0; font: 400 14px/1.4 var(--body); color: var(--ink-soft); }
.uv-open { margin-left: auto; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
/* P-062: a list page (#/u/<name>/followers | following) as on X — a back arrow and the name, two tabs with the open one
   underlined in the site's button colour, then a card of rows: 40 px picture, the name, "Follows you", and the button. */
.uv-lhead { display: flex; align-items: center; gap: 6px; margin: 0 0 0 -10px; }
.uv-back { display: inline-grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--ink); font: 400 22px/1 var(--body); text-decoration: none; }
.uv-lht { min-width: 0; }
.view h1.uv-ltitle { font-size: 24px; }
.uv-lsub { margin: 2px 0 0; font: 400 14px/1.4 var(--body); color: var(--ink-soft); }
.uv-tabs { display: flex; margin: 12px 0 0; border-bottom: 1px solid var(--hairline); }
.uv-tab { display: flex; flex: 1; justify-content: center; min-height: 52px; padding: 0 12px; border: 0; background: none; color: var(--ink-soft); font: 700 15px/1 var(--body); text-decoration: none; cursor: pointer; }
.uv-tab > span { position: relative; display: inline-flex; align-items: center; }
.uv-tab[aria-current="page"], .uv-tab[aria-selected="true"] { color: var(--ink); }
.uv-tab[aria-current="page"] > span::after, .uv-tab[aria-selected="true"] > span::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 999px; background: var(--cta-bg); }
.uv-tab:focus-visible { outline-offset: -2px; }
/* The own Profile's tab strip (Notes · Scores · Followers · Following) and the panel under it; its action buttons wrap in a
   row on phones too (X keeps the profile head short), instead of the view's one-per-line column. */
.pf-acts { flex-direction: row; flex-wrap: wrap; }
.pf-acts .vbtn { width: auto; flex: 1 1 auto; }
.pf-tabs { margin-top: 24px; }
.pf-panel .pf-games { margin-top: 16px; }
.pf-panel .uv-hint { margin-top: 14px; }
.uv-people { margin: 16px 0 0; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--hairline); border-radius: 16px; background: var(--card); }
.uv-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.uv-row + .uv-row { border-top: 1px solid var(--hairline); }
.uv-person { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; min-height: 44px; color: var(--ink); text-decoration: none; }
.uv-person img, .uv-dot { flex: none; width: 40px; height: 40px; border-radius: 999px; object-fit: cover; background: var(--track); }
.uv-pn { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.uv-pname { font: 700 15px/1.3 var(--body); overflow-wrap: anywhere; }
.uv-fy, .uv-youp { display: inline-block; flex: none; padding: 0 6px; border-radius: 4px; background: var(--track); color: var(--ink-2); font: 600 12px/18px var(--body); }
.uv-row .vbtn { flex: none; width: auto; min-width: 104px; min-height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14px; }
.uv-empty { max-width: 46ch; margin: 20px 0 0; font: 400 15px/1.5 var(--body); color: var(--ink-soft); }
.uv-cap { margin: 10px 0 0; }
@media (hover: hover) {
  .uv-back:hover, .uv-tab:hover, .uv-row:hover { background: var(--wash); }
  .uv-person:hover .uv-pname { text-decoration: underline; text-underline-offset: 3px; }
  /* X: "Following" reads "Unfollow" in the warning colour under the pointer (the span gives way to data-off). */
  .uv-follow.is-on:hover { background: transparent; color: var(--err); border-color: var(--err); }
  .uv-follow.is-on:hover > span { display: none; }
  .uv-follow.is-on:hover::after { content: attr(data-off); }
}
.nm-a { color: inherit; text-decoration: none; }
.nm-a:hover, .nm-a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
/* ---------- P-051 ---------- */
/* a short view keeps the long view's scrollbar gutter, so the panel and the column do not move 7px sideways */
@media (min-width: 700px) { html { scrollbar-gutter: stable; } }
@media (prefers-reduced-motion: no-preference) {
  @media (max-width: 699.98px) {
    .fab { transition: padding .2s ease-out, transform .2s ease-out; }
    .fab .fab-l { transition: max-width .2s ease-out, margin-left .2s ease-out, opacity .15s ease-out; }
  }
}
/* the sign-in sheet: a close button 44px square and the serif heading the composer uses */
dialog.sheet .x-btn { width: 44px; height: 44px; }
dialog.sheet h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; }
/* the panel's Soon chip sits on the label's row, so every row is 44px */
.panel .nav-l { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
.panel .nav-a:has(.soon) { padding-block: 0; }
/* skip link: out of sight until focused */
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { position: fixed; left: 8px; z-index: 40; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--cta-bg); color: var(--cta-ink); font: 700 14px/1 var(--body); text-decoration: none; }
@media (min-width: 700px) { .feed .caption { margin-top: 4px; } }
@media (min-width: 1024px) {
  dialog.compose-dlg { width: min(640px, calc(100% - 32px)); }
  .picker.country select { min-width: 172px; }
}
/* country pills: scroll arrows for a mouse (chrome.js), hidden unless the row can scroll that way */
@media (min-width: 700px) and (hover: hover) {
  .feedfilters { position: relative; }
  .pillnav { position: absolute; z-index: 2; top: 50%; width: 32px; height: 32px; margin-top: -16px; padding: 0; border: 1px solid var(--hairline); border-radius: 999px; background: var(--card); color: var(--ink); font: 700 20px/1 var(--body); cursor: pointer; }
  .pillnav[hidden] { display: none; }
  .pillnav:hover { background: var(--wash); }
}
@media not all and (min-width: 700px) and (hover: hover) { .pillnav { display: none; } }
