/* Pop v2 — dark by default, light on request.
   Palette: plum ink + butter gold. The outfit "garment tags" are the one loud element. */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16111B;
  --surf: #1F1827;
  --surf2: #2A2134;
  --line: #3A2F47;
  --text: #F3EEF6;
  --muted: #A797B4;
  --accent-text: var(--accent);
  --danger: #FF6B7A;
  --ok: #5ED3A2;
  --warn: #FFB454;
  --pop: 0 18px 40px -18px rgba(0, 0, 0, .75);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #FAF7FB;
  --surf: #FFFFFF;
  --surf2: #F3EDF6;
  --line: #E4DAEA;
  --text: #1D1623;
  --muted: #6B5C77;
  --accent-text: color-mix(in srgb, var(--accent) 52%, #1D1623);
  --danger: #C8283D;
  --ok: #157A52;
  --warn: #9A5B00;
  --pop: 0 18px 40px -20px rgba(45, 20, 60, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
@media (min-width: 860px) { body { padding-bottom: 0; } }
img, video, iframe { max-width: 100%; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; }
p { margin: 0 0 .75em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.ok-text { color: var(--ok); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 20px; padding-bottom: 40px; min-height: 60vh; }
.narrow { max-width: 680px; margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.page-h { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 750; margin-bottom: 14px; }
.lede { font-size: 1.05rem; margin-top: -6px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topbar-in { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { font-weight: 800; font-size: 1.45rem; letter-spacing: -0.04em; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; color: var(--accent-text); }
.brand-sm { font-size: 1.15rem; }
.mainnav { display: none; gap: 4px; flex: 1; }
.mainnav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 550; }
.mainnav a:hover { color: var(--text); background: var(--surf2); }
.mainnav a[aria-current] { color: var(--text); background: var(--surf2); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 860px) { .mainnav { display: flex; } .top-actions { margin-left: 0; } }
.hide-sm { display: none !important; }
@media (min-width: 860px) { .hide-sm { display: inline-flex !important; } }

.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--muted); text-decoration: none; }
.icon-btn:hover { background: var(--surf2); color: var(--text); text-decoration: none; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 10px 18px; font-weight: 650; line-height: 1.1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 13px; font-size: .9rem; }
.btn-lg { padding: 13px 22px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surf2); filter: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 4px; color: var(--accent-text); cursor: pointer; font-weight: 600; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.tiny { background: none; border: 0; padding: 2px 6px; font-size: .82rem; color: var(--muted); cursor: pointer; border-radius: 6px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.tiny:hover { color: var(--text); background: var(--surf2); text-decoration: none; }
.danger, .tiny.danger { color: var(--danger) !important; }
.inline-form { display: inline; margin: 0; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; }

/* ---------- menus ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 220px; padding: 6px;
  background: var(--surf2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--pop);
  display: flex; flex-direction: column;
}
.menu-pop a, .menu-pop button, .menu-pop form > button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; background: none; border-radius: 9px;
  color: var(--text); text-decoration: none; text-align: left; cursor: pointer; font-size: .95rem;
}
.menu-pop a:hover, .menu-pop button:hover { background: color-mix(in srgb, var(--text) 8%, transparent); text-decoration: none; }
.menu-pop form { display: block; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.menu-head span { color: var(--muted); font-size: .88rem; }
.usermenu summary { position: relative; border-radius: 50%; }
.usermenu .dot { position: absolute; right: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); border: 2px solid var(--bg); }

/* ---------- avatars ---------- */
.av {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  background: hsl(var(--h) 38% 30%); color: hsl(var(--h) 85% 90%);
  font-weight: 700; font-size: .85rem; letter-spacing: .01em;
}
[data-theme="light"] .av { background: hsl(var(--h) 60% 86%); color: hsl(var(--h) 45% 26%); }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av-xs { width: 24px; height: 24px; font-size: .62rem; }
.av-sm { width: 36px; height: 36px; font-size: .8rem; }
.av-md { width: 44px; height: 44px; font-size: .95rem; }
.av-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.av-xl { width: 112px; height: 112px; font-size: 2.1rem; box-shadow: 0 0 0 4px var(--surf), 0 0 0 5px var(--line); }

/* ---------- flash & forms ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--surf); }
.flash-ok { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 60%, var(--line)); }
.flash-x { margin-left: auto; background: none; border: 0; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; }
.form-error { color: var(--danger); font-weight: 550; margin: 0 0 10px; }

.card { background: var(--surf); border: 1px solid var(--line); border-radius: 18px; padding: 16px; color: var(--text); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-l { font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }
.field-inline { flex-direction: row; align-items: center; gap: 10px; }
.hint { color: var(--muted); font-size: .86rem; margin: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea {
  width: 100%; padding: 10px 12px;
  background: var(--surf2); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
input[readonly] { opacity: .6; }
textarea { resize: vertical; min-height: 44px; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
input[type=color] { width: 54px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surf2); cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.color-in { display: inline-flex; align-items: center; gap: 10px; }
.fs { border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fs > legend { font-weight: 700; padding: 0 6px; }
.card.fs { padding-top: 12px; }
.row2, .row3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); } }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; align-items: center; }
.sticky-actions { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 5; padding: 10px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); border-radius: 16px; }
@media (min-width: 860px) { .sticky-actions { bottom: 10px; } }
.counter { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); }
.prefix-in { display: flex; align-items: center; background: var(--surf2); border: 1px solid var(--line); border-radius: 12px; padding-left: 12px; }
.prefix-in span { color: var(--muted); font-size: .9rem; }
.prefix-in input { border: 0 !important; background: transparent !important; box-shadow: none !important; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; cursor: pointer; }
.switch-row > span { display: flex; flex-direction: column; gap: 2px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 44px !important; height: 26px !important; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }

/* ---------- auth ---------- */
.auth { max-width: 420px; margin: 24px auto; padding: 26px; }
.auth h1 { font-size: 1.7rem; }

/* ---------- hero ---------- */
.hero { padding: 18px 0 26px; max-width: 760px; }
.hero-copy h1 { font-size: clamp(2.1rem, 7vw, 4rem); font-weight: 780; letter-spacing: -0.035em; line-height: 1.02; margin-bottom: 14px; max-width: 14ch; }
.hero-copy p { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }
.taglines { font-size: 1.15rem; font-weight: 650; color: var(--accent-text); min-height: 1.6em; margin: 0 0 16px; overflow: hidden; }
.taglines span { display: inline-block; }
.taglines span.out { animation: tagOut .35s ease forwards; }
.taglines span.in { animation: tagIn .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes tagOut { to { opacity: 0; transform: translateY(-60%); } }
@keyframes tagIn { from { opacity: 0; transform: translateY(60%); } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- feed layout ---------- */
.cols { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .cols { grid-template-columns: minmax(0, 640px) 300px; justify-content: space-between; } }
.feed { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.side { display: none; flex-direction: column; gap: 14px; }
@media (min-width: 980px) { .side { display: flex; position: sticky; top: 80px; align-self: start; } }
.side-card { display: flex; flex-direction: column; gap: 4px; }
.side-h { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.side-more { font-size: .9rem; margin-top: 6px; }
.user-row, .room-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 12px; color: var(--text); text-decoration: none; }
.user-row:hover, .room-row:hover { background: var(--surf2); text-decoration: none; }
.user-row-txt, .room-row > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-row-txt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row-txt small, .room-row small { color: var(--muted); font-size: .8rem; }
.user-row-x { margin-left: auto; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.room-ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--surf2); font-size: 1.1rem; flex: none; }
.room-ico.big { width: 52px; height: 52px; font-size: 1.6rem; border-radius: 16px; }

/* ---------- composer ---------- */
.composer { display: flex; flex-direction: column; gap: 10px; }
.composer-top { display: flex; gap: 10px; align-items: flex-start; }
.composer-top textarea { border: 0; background: transparent; padding: 7px 4px; font-size: 1.05rem; box-shadow: none !important; }
.composer-more { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.composer:not(:focus-within):not(.open) .composer-more .field, .composer:not(:focus-within):not(.open) .composer-more .check, .composer:not(:focus-within):not(.open) .composer-more > .hint { display: none; }
.composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.hint[data-embed-hint].found { color: var(--ok); }

/* ---------- posts ---------- */
.post { background: var(--surf); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 10px; min-width: 0; }
.post.is-pinned { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.post.is-hidden { opacity: .65; border-style: dashed; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.who { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.who:hover { text-decoration: none; }
.who:hover strong { text-decoration: underline; }
.who-txt { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; min-width: 0; line-height: 1.2; }
.who-txt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 18ch; }
.who-txt small { color: var(--muted); font-size: .84rem; width: 100%; }
.post-meta { margin-left: auto; display: flex; align-items: center; gap: 4px; color: var(--muted); }
.post-time { color: var(--muted); font-size: .85rem; text-decoration: none; padding: 0 4px; }
.flag { display: inline-grid; color: var(--accent-text); }
.flag .i { width: 15px; height: 15px; }
.flag-warn { color: var(--warn); }
.post-menu summary { width: 32px; height: 32px; justify-content: center; border-radius: 50%; color: var(--muted); }
.post-menu summary:hover { background: var(--surf2); color: var(--text); }
.post-body { overflow-wrap: anywhere; margin-bottom: 6px; }
.post-body.muted { font-size: .88rem; margin-bottom: 2px; }
.mention, .tag { font-weight: 600; text-decoration: none; }
.post-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.reacts { display: flex; gap: 6px; flex-wrap: wrap; }
.react {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--surf2); border: 1px solid transparent; cursor: pointer;
  font-size: .9rem; line-height: 1.2; transition: transform .12s;
}
.react:hover { border-color: var(--line); }
.react.on { background: color-mix(in srgb, var(--accent) 18%, var(--surf2)); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.react.bump { transform: scale(1.12); }
.react-e { font-size: 1.05rem; }
.react-n { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 0; }
.react-n:empty { display: none; }
.comments-link { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); text-decoration: none; padding: 5px 8px; border-radius: 999px; }
.comments-link:hover { background: var(--surf2); color: var(--text); text-decoration: none; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: .7rem; font-weight: 700; background: var(--surf2); color: var(--muted); vertical-align: 2px; }
.badge-admin { background: var(--accent); color: var(--accent-ink); }
.badge-mod { background: color-mix(in srgb, #9C8CFF 30%, var(--surf2)); color: var(--text); }
.badge-warn { background: color-mix(in srgb, var(--warn) 25%, var(--surf2)); color: var(--text); }

/* ---------- embeds ---------- */
.embed { margin: 10px 0 4px; border-radius: 14px; overflow: hidden; background: var(--surf2); }
.embed iframe { display: block; width: 100%; border: 0; }
.embed-wide iframe { aspect-ratio: 16 / 9; height: auto; }
.embed-tall { max-width: 340px; }
.embed-tall iframe { aspect-ratio: 9 / 16; height: auto; }
.embed-tiktok { max-width: 340px; }
.embed-tiktok iframe { height: 740px; }
.embed-insta { max-width: 440px; }
.embed-insta iframe { height: 600px; }
.embed-x { max-width: 520px; background: transparent; }
.embed-x iframe { height: 520px; }
.embed-pin { max-width: 360px; }
.embed-pin iframe { height: 620px; }
.embed-fb { max-width: 520px; }
.embed-fb iframe { height: 580px; }
.embed-img img, .embed-vid video { display: block; width: 100%; max-height: 640px; object-fit: contain; background: #000; }
.linkcard { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: var(--surf2); color: var(--text); text-decoration: none; }

/* ---------- outfit rail: garment tags ---------- */
.rail { display: flex; flex-direction: column; gap: 12px; }
.rail-compact { gap: 8px; margin: 10px 0 2px; padding: 10px 12px; border-radius: 14px; background: var(--surf2); }
.rail-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 560px) { .rail-row { grid-template-columns: 128px 1fr; align-items: start; } }
.rail-cat { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: .9rem; padding-top: 4px; }
.rail-ico { font-size: 1.1rem; }
.rail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gtag {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 6px 5px 22px;
  background: var(--surf); border: 1px solid var(--line);
  border-radius: 6px 14px 14px 6px;
  color: var(--text); text-decoration: none; font-size: .92rem; line-height: 1.25;
  max-width: 100%;
}
.rail-compact .gtag { background: var(--surf); }
.card > .rail .gtag { background: var(--surf2); }
.gtag::before {
  content: ""; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
}
.gtag:not([href]) { padding-right: 12px; }
a.gtag:hover { border-color: var(--accent); text-decoration: none; }
.gtag-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop { flex: none; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--text); }
.shop-shopee { background: #EE4D2D; color: #fff; }
.shop-lazada { background: #1A1FA8; color: #fff; }
.shop-zalora { background: #fff; color: #000; box-shadow: inset 0 0 0 1px #0002; }
.shop-amazon { background: #FF9900; color: #111; }
.shop-shein { background: #111; color: #fff; box-shadow: inset 0 0 0 1px #fff3; }
.shop-uniqlo, .shop-hm { background: #E60012; color: #fff; }
.shop-zara, .shop-nike { background: #111; color: #fff; box-shadow: inset 0 0 0 1px #fff3; }
.shop-tiktokshop { background: #FE2C55; color: #fff; }
.shop-temu { background: #FB7701; color: #fff; }
.shop-aliexpress { background: #E62E04; color: #fff; }
.shop-adidas { background: #fff; color: #000; box-shadow: inset 0 0 0 1px #0002; }
.shop-etsy { background: #F1641E; color: #fff; }
.shop-ebay { background: #0064D2; color: #fff; }

/* ---------- single post & comments ---------- */
.comments { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.comment:first-of-type { border-top: 0; }
.comment.is-hidden { opacity: .6; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .92rem; }
.comment-head a { color: var(--text); text-decoration: none; }
.comment-head .muted { font-size: .82rem; }
.comment-acts { margin-left: auto; display: inline-flex; gap: 2px; }
.comment-body { overflow-wrap: anywhere; }
.comment-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; }

/* ---------- discover ---------- */
.disc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.disc-head .page-h { margin: 0; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px !important; border-radius: 999px !important; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; margin: 8px 0 14px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 600; }
.chip:hover { color: var(--text); text-decoration: none; }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.user-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 18px; }
.user-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; text-decoration: none; padding: 18px 12px; }
.user-card:hover { text-decoration: none; border-color: var(--accent); }
.user-card strong { margin-top: 6px; }
.user-card small { color: var(--muted); }
.user-card-bio { font-size: .85rem; color: var(--muted); margin: 4px 0 0; }
.xp-pill { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--surf2); color: var(--accent-text); margin-top: 4px; }
.xp-pill .i { width: 13px; height: 13px; }
.rank { position: absolute; left: 10px; top: 10px; min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; font-weight: 750; font-size: .82rem; background: var(--surf2); color: var(--muted); }
.rank-top { background: var(--accent); color: var(--accent-ink); }
.masonry { column-gap: 14px; }
@media (min-width: 900px) { .masonry { column-count: 2; } }
.masonry > .post { break-inside: avoid; margin-bottom: 14px; display: block; }

/* ---------- profile ---------- */
.pskin { font-family: var(--p-font, var(--font)); display: flex; flex-direction: column; gap: 22px; }
.pskin-themed {
  --bg: var(--p-bg); --surf: var(--p-surf); --text: var(--p-text);
  --accent: var(--p-acc); --accent-ink: var(--p-acc-ink, #111); --accent-text: var(--p-acc);
  --muted: color-mix(in srgb, var(--p-text) 62%, var(--p-surf));
  --line: color-mix(in srgb, var(--p-text) 14%, var(--p-surf));
  --surf2: color-mix(in srgb, var(--p-text) 7%, var(--p-surf));
  color: var(--text);
}
.pskin-themed, .pskin-bg { background: var(--p-bg); color: var(--p-text, var(--text)); border-radius: 26px; padding: 14px; margin: -6px -4px 0; }
@media (min-width: 700px) { .pskin-themed, .pskin-bg { padding: 22px; } }
.pskin-bg:not(.pskin-themed) .sec-head h2 { color: var(--p-text); }
.pskin-bg:not(.pskin-themed) .sec-head .muted, .pskin-bg:not(.pskin-themed) > .profile-sec > .muted { color: color-mix(in srgb, var(--p-text) 65%, transparent); }
.pskin-themed .post-body, .pskin-themed .who, .pskin-themed .comment-head a { color: var(--text); }
.profile-card { background: var(--surf); border: 1px solid var(--line); border-radius: 22px; padding: 20px; color: var(--text); }
.profile-id { display: grid; gap: 16px; grid-template-columns: 1fr; justify-items: center; text-align: center; }
@media (min-width: 700px) { .profile-id { grid-template-columns: auto 1fr auto; justify-items: start; text-align: left; align-items: start; } }
.profile-av { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.xpbox { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 120px; }
.xpbox-t { font-size: .8rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.xpbox-t b { color: var(--accent-text); }
.xpbar { display: block; width: 100%; height: 6px; border-radius: 999px; background: var(--surf2); overflow: hidden; }
.xpbar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.profile-name { font-size: clamp(1.6rem, 4.5vw, 2.3rem); font-weight: 780; letter-spacing: -0.03em; margin: 6px 0 2px; }
.profile-handle { color: var(--muted); margin-bottom: 10px; }
.profile-bio { max-width: 56ch; overflow-wrap: anywhere; }
.profile-stats { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; justify-content: inherit; }
@media (max-width: 699px) { .profile-stats, .socials, .profile-contact { justify-content: center; } }
.profile-stats b { color: var(--text); }
.socials { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.soc { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: var(--surf2); color: var(--text); text-decoration: none; font-size: .85rem; font-weight: 600; border: 1px solid var(--line); }
.soc:hover { border-color: var(--accent); text-decoration: none; }
.profile-contact { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; margin-top: 10px; }
.profile-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.menu-right { right: 0; }
.profile-sec { display: flex; flex-direction: column; gap: 10px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec-head h2 { font-size: 1.25rem; margin: 0; }
.note-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note-form input { flex: 1 1 220px; }
.notes { display: flex; flex-wrap: wrap; gap: 8px; }
.note { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px 5px 5px; background: var(--surf); border: 1px solid var(--line); border-radius: 999px; max-width: 100%; color: var(--text); }
.note-body { font-size: .9rem; overflow-wrap: anywhere; }
.note-acts { display: inline-flex; }
.note-acts .tiny { padding: 2px 4px; }
.note-acts .i { width: 14px; height: 14px; }

/* ---------- settings ---------- */
.av-preview { display: flex; gap: 16px; align-items: flex-start; }
.av-preview > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.theme-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .82rem; cursor: pointer; text-align: center; }
.theme-opt input { position: absolute; opacity: 0; }
.theme-sw { width: 100%; height: 48px; border-radius: 12px; background: var(--bg); border: 2px solid var(--line); display: grid; place-items: center; }
.theme-sw i { width: 22px; height: 8px; border-radius: 99px; background: var(--sw, var(--accent)); }
.theme-opt input:checked + .theme-sw { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.theme-opt input:focus-visible + .theme-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.font-prev { font-size: 1.25rem; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surf2); }
.outfit-cat { display: flex; flex-direction: column; gap: 10px; margin: 0; min-width: 0; }
.outfit-cat legend { font-weight: 700; font-size: 1.05rem; float: left; width: 100%; padding: 0; margin-bottom: 4px; }
.item-rows { display: flex; flex-direction: column; gap: 8px; clear: both; }
.item-row { display: grid; grid-template-columns: 1fr 38px; gap: 8px; align-items: center; }
.item-row input:nth-child(2) { grid-column: 1; grid-row: 2; }
.item-row .icon-btn { grid-row: 1 / span 2; grid-column: 2; }
@media (min-width: 640px) { .item-row { grid-template-columns: 1fr 1.3fr 38px; } .item-row input:nth-child(2) { grid-column: 2; grid-row: 1; } .item-row .icon-btn { grid-row: 1; grid-column: 3; } }
.item-rows:empty + .link-btn { margin-top: -4px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surf); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: .8rem; color: var(--muted); font-weight: 650; }
.tbl tr:last-child td { border-bottom: 0; }
.card > .tbl { margin: 0 -4px; }
.tbl .acts { white-space: nowrap; }
.tbl .who { gap: 8px; }
.mute-form select { width: auto; padding: 3px 6px; font-size: .8rem; display: inline-block; }

/* ---------- chat ---------- */
.room-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.room-card { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; }
.room-card:hover { text-decoration: none; border-color: var(--accent); }
.room-card-txt { display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.room-card-txt > span { color: var(--muted); font-size: .92rem; }
.room-card-txt small { font-size: .8rem; }
.chat-layout { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .chat-layout { grid-template-columns: 230px 1fr; } }
.chat-rooms { display: none; flex-direction: column; gap: 2px; position: sticky; top: 80px; align-self: start; }
@media (min-width: 900px) { .chat-rooms { display: flex; } }
.chat-rooms a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 550; }
.chat-rooms a:hover { background: var(--surf2); color: var(--text); text-decoration: none; }
.chat-rooms a[aria-current] { background: var(--surf2); color: var(--text); }
.chat { display: flex; flex-direction: column; padding: 0; height: calc(100dvh - 60px - 72px - 40px - env(safe-area-inset-bottom) - env(safe-area-inset-top)); min-height: 380px; overflow: hidden; }
@media (min-width: 860px) { .chat { height: calc(100dvh - 60px - 56px); } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-head h1 { font-size: 1.1rem; margin: 0; }
.chat-head p { margin: 0; font-size: .85rem; }
.chat-back { font-size: 1.6rem; line-height: 1; }
@media (min-width: 900px) { .chat-back { display: none; } }
.chat-log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.msg { display: flex; gap: 10px; padding: 6px 8px; border-radius: 12px; position: relative; }
.msg:hover { background: var(--surf2); }
.msg.cont { padding-top: 0; }
.msg.cont .av { visibility: hidden; height: 0; }
.msg.cont .msg-head { display: none; }
.msg.mine .msg-body { color: var(--text); }
.msg.is-hidden { opacity: .5; }
.msg-main { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 6px; font-size: .9rem; }
.msg-head a { color: var(--text); font-weight: 650; text-decoration: none; }
.msg-head time { font-size: .76rem; color: var(--muted); }
.msg-body { overflow-wrap: anywhere; }
.msg-acts { position: absolute; right: 6px; top: 4px; display: none; gap: 2px; background: var(--surf); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.msg:hover .msg-acts, .msg:focus-within .msg-acts { display: flex; }
.day-sep { text-align: center; font-size: .76rem; color: var(--muted); margin: 10px 0 4px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form .btn { padding: 10px 14px; }
.chat-note { padding: 14px; border-top: 1px solid var(--line); margin: 0; color: var(--muted); text-align: center; }
.chat-error { color: var(--danger); font-size: .85rem; padding: 0 14px 8px; }
.staff-chat { height: calc(100dvh - 260px); }

/* ---------- staff & admin ---------- */
.dash-head .muted { margin-top: -8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar input { flex: 1 1 220px; width: auto; }
.toolbar select { width: auto; }
.report { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.report-main { flex: 1 1 320px; min-width: 0; }
.report-main p { margin-bottom: 4px; }
.report-reason { font-size: 1.02rem; }
.report-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .admin { grid-template-columns: 210px minmax(0, 1fr); } }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a { white-space: nowrap; padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .94rem; }
.admin-nav a:hover { background: var(--surf2); color: var(--text); text-decoration: none; }
.admin-nav a[aria-current] { background: var(--surf2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
@media (min-width: 900px) { .admin-nav { flex-direction: column; position: sticky; top: 80px; align-self: start; } }
.admin-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.admin-main .page-h { margin-bottom: 0; }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 1.7rem; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.cols-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cols-2 { grid-template-columns: 1fr 1fr; } }
.list-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; }
.list-row.bare { padding: 0; }
.list-row .grow { flex: 1 1 200px; width: auto; }
.list-row .num { width: 76px !important; }
.list-row input:not(.grow):not(.num):not([type=checkbox]) { width: auto; flex: 1 1 120px; }
.list-row .emoji-in { flex: 0 0 64px !important; width: 64px !important; text-align: center; font-size: 1.2rem; padding: 6px !important; }
.list-new { border-style: dashed; }
.summary-btn { cursor: pointer; font-weight: 650; display: flex; align-items: center; gap: 6px; list-style: none; }
.summary-btn::-webkit-details-marker { display: none; }
details[open] > .summary-btn { margin-bottom: 12px; }
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.font-opt { cursor: pointer; }
.font-opt input { position: absolute; opacity: 0; }
.font-opt span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surf2); font-size: .95rem; }
.font-opt b { font-size: 1.1rem; }
.font-opt input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.font-opt input:focus-visible + span { outline: 2px solid var(--accent); }

/* ---------- WYSIWYG ---------- */
.wy { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surf2); }
.wy-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surf); position: sticky; top: 60px; z-index: 3; }
.wy-bar button { border: 0; background: none; padding: 6px 9px; border-radius: 8px; cursor: pointer; font-size: .86rem; font-weight: 650; color: var(--text); }
.wy-bar button:hover, .wy-bar button.on { background: var(--surf2); }
.wy-bar .sep { width: 1px; background: var(--line); margin: 4px 4px; }
.wy-ed { min-height: 280px; padding: 16px; outline: none; }
.wy textarea { border: 0 !important; border-radius: 0 !important; min-height: 280px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }

/* content written in the editor (pages, hero) */
.wysiwyg h1 { font-size: 2rem; }
.wysiwyg h2 { font-size: 1.45rem; margin-top: 1.1em; }
.wysiwyg h3 { font-size: 1.15rem; margin-top: 1em; }
.wysiwyg img { height: auto; border-radius: 12px; }
.wysiwyg blockquote { margin: 1em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.wysiwyg ul, .wysiwyg ol { padding-left: 1.3em; }
.wysiwyg hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
.page-body { max-width: 760px; margin: 0 auto; padding: clamp(18px, 4vw, 36px); line-height: 1.7; }
.page-body > :first-child { margin-top: 0; }

/* ---------- empty, pager, footer ---------- */
.empty { text-align: center; padding: 36px 18px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 1.15rem; }
.empty.big { border: 0; padding: 70px 18px; }
.empty.big h1 { font-size: clamp(2.4rem, 8vw, 4rem); color: var(--text); letter-spacing: -0.04em; }
.empty .btn { margin-top: 6px; }
.pager { display: flex; justify-content: center; gap: 10px; margin: 8px 0; }
.foot { border-top: 1px solid var(--line); padding: 26px 0 30px; color: var(--muted); font-size: .9rem; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-text, .foot-copy { margin: 10px 0 0; }
.ads { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 22px; }
.ad { max-width: 100%; overflow: hidden; }
.ad img { height: auto; }

/* ---------- v2.1: notifications, follows, saves, prices ---------- */
.bell { position: relative; }
.bell-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 750; display: grid; place-items: center; border: 2px solid var(--bg); line-height: 1; }
.bell-n[hidden] { display: none; }
.notif-list { padding: 6px; display: flex; flex-direction: column; }
.notif { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; color: var(--text); text-decoration: none; }
.notif:hover { background: var(--surf2); }
.notif-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.notif-link:hover { text-decoration: none; }
.notif.unread { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.notif-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; overflow-wrap: anywhere; }
.notif-txt small { color: var(--muted); font-size: .8rem; }
.notif-snip { color: var(--muted); }
.save-btn { background: none; border: 0; color: var(--muted); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.save-btn:hover { background: var(--surf2); color: var(--text); }
.save-btn.on { color: var(--accent-text); }
.save-btn.on .i { fill: currentColor; }
.comments-link + .save-btn { margin-left: -4px; }
.price { flex: none; font-size: .78rem; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.rail-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .88rem; color: var(--muted); }
.rail-total b { color: var(--text); font-size: 1rem; font-variant-numeric: tabular-nums; }
.item-row { grid-template-columns: 1fr 96px 38px; }
.item-row input:nth-child(1) { grid-column: 1 / span 2; grid-row: 1; }
.item-row input:nth-child(2) { grid-column: 1; grid-row: 2; }
.item-row .price-in { grid-column: 2; grid-row: 2; }
.item-row .icon-btn { grid-column: 3; grid-row: 1 / span 2; }
@media (min-width: 640px) {
  .item-row { grid-template-columns: 1fr 1.2fr 104px 38px; }
  .item-row input:nth-child(1) { grid-column: 1; grid-row: 1; }
  .item-row input:nth-child(2) { grid-column: 2; grid-row: 1; }
  .item-row .price-in { grid-column: 3; grid-row: 1; }
  .item-row .icon-btn { grid-column: 4; grid-row: 1; }
}
.follow-row { display: flex; align-items: center; gap: 10px; }
.follow-row .user-row { flex: 1; min-width: 0; }
.stack-tight { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.profile-stats a { color: var(--muted); text-decoration: none; }
.profile-stats a:hover { color: var(--text); }
.field-aside { margin-left: auto; font-weight: 500; font-size: .85rem; }
.verify-banner { flex-wrap: wrap; }
.verify-banner > span { flex: 1 1 260px; }
.feed-tabs { margin: 0 0 2px; }
.cf-turnstile { min-height: 65px; }

/* ---------- mobile tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surf) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 600; }
.tabbar a[aria-current] { color: var(--text); }
.tabbar a[aria-current] .i { color: var(--accent-text); }
.tabbar .i { width: 22px; height: 22px; }
.tabbar .tab-new { justify-self: center; width: 48px; height: 48px; border-radius: 16px; background: var(--accent); color: var(--accent-ink); justify-content: center; padding: 0; }
.tabbar .tab-new .i { width: 24px; height: 24px; }
@media (min-width: 860px) { .tabbar { display: none; } }
.is-chat .foot { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 420px) {
  .post { padding: 12px 12px 8px; border-radius: 16px; }
  .card { padding: 14px; }
  .wrap { padding: 0 12px; }
}
