/* Self-hosted fonts (no Google requests, nothing leaks visitors' IPs) */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2'); }

/* Layout: three columns (nav / feed / trends) that fold to an icon rail, then a bottom tab bar on phones. */
:root {
  --font-display: 'Bricolage Grotesque', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --sunken: #F3EFE8;
  --line: #E8E1D6;
  --fg: #241B12;
  --muted: #76695B;
  --accent: #E8A013;
  --accent-hover: #D48F08;
  --accent-ink: #2A1A00;
  --link: #A4540B;
  --like: #D1470B;
  --repost: #2B8458;
  --focus: #2F6FB0;
  --maple: #A9250F;
  --av1: #E8A013; --av1-ink: #2A1A00;
  --av2: #7A4A21; --av2-ink: #FFFFFF;
  --av3: #2B8458; --av3-ink: #FFFFFF;
  --av4: #2F6FB0; --av4-ink: #FFFFFF;
  --av5: #C2410C; --av5-ink: #FFFFFF;
  --av6: #0F766E; --av6-ink: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16110C; --surface: #1F1912; --sunken: #2A221A; --line: #372D22;
    --fg: #F7EFE4; --muted: #A99B8A; --accent: #F0AC2A; --accent-hover: #FFBE45;
    --accent-ink: #2A1A00; --link: #F2A24D; --like: #F37B3A; --repost: #5EC28C; --focus: #6FA8E0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16110C; --surface: #1F1912; --sunken: #2A221A; --line: #372D22;
  --fg: #F7EFE4; --muted: #A99B8A; --accent: #F0AC2A; --accent-hover: #FFBE45;
  --accent-ink: #2A1A00; --link: #F2A24D; --like: #F37B3A; --repost: #5EC28C; --focus: #6FA8E0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 12px 0;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 30; background: var(--bg);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.app {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 224px minmax(0, 620px) minmax(0, 320px);
  gap: 0 28px; justify-content: center; align-items: start;
}

/* Side nav */
.side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 18px; padding-top: 4px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 10px; border-radius: 14px; width: fit-content; }
.brand .word { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.03em; }
.brand .txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; text-align: left; }
.brand small { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button {
  display: flex; align-items: center; gap: 14px; background: none; border: 0;
  padding: 11px 14px; border-radius: 999px; font-weight: 600; font-size: 17px; text-align: left;
}
.nav button:hover { background: var(--sunken); }
.nav button[aria-current="page"] { background: color-mix(in srgb, var(--accent) 24%, transparent); font-weight: 700; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  font-weight: 700; padding: 11px 22px; transition: background .15s, transform .05s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary.sm { padding: 7px 16px; font-size: 14px; }
.side-post { font-size: 17px; padding: 13px 22px; }
.side-post svg { display: none; }

/* Feed column */
.main { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; min-width: 0; }
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); border-radius: 18px 18px 0 0;
}
.bar h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin-right: auto; }
.search { position: relative; flex: 1 1 200px; max-width: 300px; min-width: 0; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; padding: 9px 14px 9px 38px; border-radius: 999px; border: 1px solid transparent;
  background: var(--sunken); min-width: 0;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); outline: none; background: var(--surface); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px;
  background: none; border: 0; color: var(--muted);
}
.icon-btn:hover { background: var(--sunken); color: var(--fg); }

.chips { display: none; gap: 8px; padding: 12px 16px 0; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; background: var(--sunken); border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; color: var(--link); }
.chip:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.profile-card { border-bottom: 1px solid var(--line); }
.profile-card .banner {
  height: 96px; background-color: var(--accent);
  background-image:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-ink) 22%, transparent) 2px, transparent 2px),
    linear-gradient(0deg, color-mix(in srgb, var(--accent-ink) 22%, transparent) 2px, transparent 2px);
  background-size: 26px 26px;
}
.profile-card .info { padding: 0 16px 16px; }
.profile-card .avatar { width: 72px; height: 72px; font-size: 26px; margin-top: -36px; border: 4px solid var(--surface); }
.profile-card h2 { margin: 8px 0 0; font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }
.profile-card .stats { display: flex; gap: 18px; margin-top: 8px; color: var(--muted); }
.profile-card .stats b { color: var(--fg); }

.composer { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.composer .field { flex: 1; min-width: 0; }
.composer textarea {
  width: 100%; border: 0; background: none; resize: none; outline: none; font-size: 19px;
  padding: 8px 0; min-height: 56px; max-height: 260px;
}
.composer textarea::placeholder { color: var(--muted); }
.composer .foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.count { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.count.warn { color: var(--like); font-weight: 600; }
.count.over { color: var(--like); font-weight: 800; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 14px 8px; font-weight: 600; color: var(--muted); position: relative; }
.tabs button:hover { background: var(--sunken); }
.tabs button[aria-selected="true"] { color: var(--fg); }
.tabs button[aria-selected="true"]::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 56px; height: 4px; transform: translateX(-50%);
  background: var(--accent); border-radius: 4px 4px 0 0;
}

/* Posts */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
}
.av-1 { background: var(--av1); color: var(--av1-ink); } .av-2 { background: var(--av2); color: var(--av2-ink); }
.av-3 { background: var(--av3); color: var(--av3-ink); } .av-4 { background: var(--av4); color: var(--av4-ink); }
.av-5 { background: var(--av5); color: var(--av5-ink); } .av-6 { background: var(--av6); color: var(--av6-ink); }
.post { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.post:hover { background: color-mix(in srgb, var(--sunken) 45%, transparent); }
.post .body { flex: 1; min-width: 0; }
.meta { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.meta .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.meta .handle, .meta .dot, .meta time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.meta .handle { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.meta .del { margin-left: auto; width: 30px; height: 30px; align-self: center; }
.meta .del svg { width: 17px; height: 17px; }
.text { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; }
.tag { background: none; border: 0; padding: 0; color: var(--link); font-weight: 600; }
.tag:hover { text-decoration: underline; }
.actions { display: flex; justify-content: space-between; max-width: 400px; margin: 8px 0 0 -8px; }
.act {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted);
  padding: 6px 8px; border-radius: 999px; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 56px;
}
.act svg { width: 19px; height: 19px; }
.act:hover { background: var(--sunken); color: var(--fg); }
.act[data-act="like"].on, .act[data-act="like"]:hover { color: var(--like); }
.act[data-act="repost"].on, .act[data-act="repost"]:hover { color: var(--repost); }
.act[data-act="save"].on, .act[data-act="save"]:hover { color: var(--link); }
.act.on { font-weight: 700; }
.act[data-act="like"].on svg, .act[data-act="save"].on svg { fill: currentColor; }
.thread { margin-top: 8px; border-left: 2px solid var(--line); padding-left: 12px; display: flex; flex-direction: column; gap: 10px; }
.reply { display: flex; gap: 10px; }
.reply .avatar { width: 30px; height: 30px; font-size: 11px; }
.reply .text { font-size: 15px; margin: 0; }
.reply-form { display: flex; align-items: flex-end; gap: 10px; }
.reply-form textarea {
  flex: 1; min-width: 0; resize: none; border: 1px solid var(--line); background: var(--surface);
  border-radius: 14px; padding: 8px 12px; max-height: 160px; outline: none;
}
.reply-form textarea:focus { border-color: var(--accent); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--fg); font-family: var(--font-display); font-size: 20px; margin-bottom: 4px; }

/* Waffle faces */
.wf { width: 1em; height: 1em; flex: none; display: inline-block; }
.wf-body { fill: var(--accent); }
.wf-grid { fill: none; stroke: var(--accent-ink); stroke-opacity: .16; stroke-width: 1.6; }
.wf-rim { fill: none; stroke: var(--accent-ink); stroke-opacity: .35; stroke-width: 2; }
.wf-line { fill: none; stroke: var(--accent-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wf-ink { fill: var(--accent-ink); }
.wf-heart { fill: var(--maple); }
.wf-tear { fill: var(--focus); }
.wf-blush { fill: var(--maple); fill-opacity: .3; }
.wf-inline { width: 1.4em; height: 1.4em; vertical-align: -0.32em; margin: 0 1px; }
.wf-sm { width: 20px; height: 20px; }
.wf-md { width: 32px; height: 32px; }
.wf-xl { width: 60px; height: 60px; display: block; margin: 0 auto 12px; }
.wf-idle { opacity: .6; }
.mini-logo { display: none; width: 30px; height: 30px; }
.act { min-width: 0; padding: 6px 7px; }
.actions { flex-wrap: wrap; }
.act[data-act="tray"].on { background: var(--sunken); }
.reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rchip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.rchip:hover { background: var(--sunken); }
.rchip[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--fg); }
.tray {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; padding: 6px; width: fit-content; max-width: 100%;
  border: 1px solid var(--line); border-radius: 16px; background: var(--sunken);
}
.tray button { background: none; border: 0; padding: 4px; border-radius: 12px; line-height: 0; transition: transform .12s, background .12s; }
.tray button:hover { background: var(--surface); transform: translateY(-2px) scale(1.08); }
.tray button[aria-pressed="true"] { outline: 2px solid var(--accent); }
.composer .tray { margin: 4px 0 10px; }
.composer .foot .emoji { margin-right: auto; width: 40px; height: 40px; }
.composer .foot .emoji .wf { width: 28px; height: 28px; }
.empty .slogan { display: block; margin-top: 12px; font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--link); }
.fineprint b { display: block; font-family: var(--font-display); font-size: 15px; color: var(--fg); margin-bottom: 2px; }

/* Right rail */
.rail { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 6px 6px; }
.card h2 { margin: 0 0 6px 12px; font-family: var(--font-display); font-size: 19px; letter-spacing: -0.02em; }
.trend { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 12px; }
.trend:hover { background: var(--sunken); }
.trend small { display: block; color: var(--muted); font-size: 12px; }
.trend b { font-weight: 700; }
.who { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; }
.who .avatar { width: 40px; height: 40px; font-size: 14px; }
.who .id { flex: 1; min-width: 0; line-height: 1.25; }
.who .id b, .who .id small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .id small { color: var(--muted); font-size: 13px; }
.follow {
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg); border-radius: 999px;
  padding: 6px 14px; font-weight: 700; font-size: 13px;
}
.follow[aria-pressed="true"] { background: none; color: var(--fg); border-color: var(--line); }
.follow[aria-pressed="true"]:hover { border-color: var(--like); color: var(--like); }
.fineprint { color: var(--muted); font-size: 12px; padding: 0 12px; }

.fab, .toast { position: fixed; }
.fab {
  display: none; right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--accent-ink); place-items: center;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--fg) 28%, transparent); z-index: 25;
}
.fab svg { width: 26px; height: 26px; stroke-width: 2.2; }
.toast {
  left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 24px); opacity: 0;
  pointer-events: none; background: var(--fg); color: var(--bg); padding: 10px 14px 10px 18px; border-radius: 999px;
  display: flex; align-items: center; gap: 12px; font-weight: 600; z-index: 40; transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { background: none; border: 0; color: var(--accent); font-weight: 700; padding: 2px 6px; }
:root[data-theme="light"] .toast button { color: var(--accent-hover); }

/* Icon rail */
@media (max-width: 1020px) {
  .app { grid-template-columns: 64px minmax(0, 620px); gap: 0 20px; }
  .rail { display: none; }
  .chips { display: flex; }
  .brand .txt, .nav .lbl, .side-post span { display: none; }
  .nav button { padding: 12px; justify-content: center; }
  .brand { padding: 4px; }
  .side-post { width: 48px; height: 48px; padding: 0; display: grid; place-items: center; }
  .side-post svg { display: block; stroke-width: 2.2; }
}
/* Phone: bottom tab bar */
@media (max-width: 700px) {
  .app { display: block; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .side {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 35; padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    background: var(--surface); border-top: 1px solid var(--line); flex-direction: row;
  }
  .brand, .side-post { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav button { flex-direction: column; gap: 2px; padding: 6px 12px; border-radius: 14px; font-size: 11px; }
  .nav .lbl { display: block; }
  .fab { display: grid; }
  .mini-logo { display: block; }
  .main { border-radius: 14px; }
  .bar { border-radius: 14px 14px 0 0; }
  .search { max-width: none; flex-basis: 100%; order: 3; }
  .toast { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.auth{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(0,0,0,.45)}
.auth[hidden]{display:none}
.auth-card{width:100%;max-width:360px;display:flex;flex-direction:column;gap:12px;padding:22px;border-radius:16px;background:var(--card,var(--surface,var(--bg,Canvas)));color:inherit;box-shadow:0 10px 40px rgba(0,0,0,.35)}
.auth-card [hidden]{display:none}
.auth-card h2{margin:0;font-size:1.2rem}
.auth-f{display:flex;flex-direction:column;gap:4px;font-size:.85rem}
.auth-f input{font:inherit;padding:10px 12px;border-radius:10px;border:1px solid rgba(128,128,128,.5);background:transparent;color:inherit}
.auth-err{margin:0;min-height:1.2em;color:#d33;font-size:.85rem}
.auth-link{background:none;border:0;color:inherit;opacity:.75;text-decoration:underline;cursor:pointer;font:inherit;font-size:.85rem}

/* Casino / market */
.wfx-dock{position:fixed;left:12px;bottom:12px;z-index:45;display:flex;gap:8px;flex-wrap:wrap}
.wfx-dock[hidden],.wfx-ov[hidden],.wfx-people[hidden],.wfx-pane[hidden]{display:none}
.wfx-btn{font:inherit;font-weight:600;padding:9px 14px;border:0;border-radius:999px;cursor:pointer;background:var(--accent,#f5a524);color:var(--accent-ink,#222);box-shadow:0 4px 14px rgba(0,0,0,.3)}
.wfx-btn:disabled{opacity:.5;cursor:default}
.wfx-ov{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:12px;background:rgba(0,0,0,.5)}
.wfx-card{width:100%;max-width:460px;max-height:90vh;overflow:auto;box-sizing:border-box;padding:16px;border-radius:16px;box-shadow:0 10px 40px rgba(0,0,0,.4);display:flex;flex-direction:column;gap:12px}
.wfx-top,.wfx-row,.wfx-tabs,.wfx-line{display:flex;gap:8px;align-items:center}
.wfx-top,.wfx-row{justify-content:space-between}
.wfx-row{padding:8px 0;border-bottom:1px solid rgba(128,128,128,.25)}
.wfx-tab,.wfx-opt{font:inherit;color:inherit;background:transparent;border:1px solid rgba(128,128,128,.5);border-radius:10px;padding:8px 10px;cursor:pointer}
.wfx-tab[aria-selected=true],.wfx-opt[aria-pressed=true]{outline:2px solid var(--accent,#f5a524)}
.wfx-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.wfx-ball{width:84px;height:84px;margin:0 auto;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:700;color:#fff;background:#777}
.wfx-in{font:inherit;color:inherit;background:transparent;border:1px solid rgba(128,128,128,.5);border-radius:10px;padding:8px 10px;width:100%;box-sizing:border-box}
.wfx-sub,.wfx-note{margin:0;font-size:.85rem;opacity:.8}
.wfx-pane{display:flex;flex-direction:column;gap:10px}
.wfx-people{position:fixed;z-index:55;max-height:320px;overflow:auto;padding:6px;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.35)}
.wfx-tabs{flex-wrap:wrap}
.wfx-chips{display:flex;gap:6px;flex-wrap:wrap}
.wfx-allin{font-weight:700;border-color:var(--accent,#f5a524)}
.wfx-table{display:flex;flex-direction:column;gap:8px;padding:10px;border-radius:12px;background:rgba(30,132,73,.16)}
.wfx-hand{display:flex;flex-direction:column;gap:4px}
.wfx-cards{display:flex;gap:6px;flex-wrap:wrap;min-height:58px;align-items:center}
.wfx-pc{display:inline-flex;align-items:center;justify-content:center;width:42px;height:58px;border-radius:8px;background:#fff;color:#111;border:1px solid rgba(0,0,0,.25);font-weight:700;font-size:1rem;box-shadow:0 2px 6px rgba(0,0,0,.2)}
.wfx-pc.red{color:#c0392b}
.wfx-pc.back{background:repeating-linear-gradient(45deg,#7a4a21 0 6px,#a4682f 6px 12px);color:transparent}
.wfx-pc.big{width:88px;height:122px;font-size:1.9rem}
.wfx-pot{font-size:1.15rem}
.wfx-acts{display:flex;gap:8px;flex-wrap:wrap}

/* Former inline style attributes (strict CSP forbids them) */
.sprite { position: absolute; width: 0; height: 0; }
.handle-line { color: var(--muted); }
.minw0 { min-width: 0; }

/* Casino + Market in the left nav */
.nav-sep { display: block; margin: 14px 14px 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); }
.nav button[data-panel] .i { color: var(--accent); }
.nav button[data-panel]:hover .i { color: var(--accent-hover); }
.wfx-card { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.wfx-people { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.wfx-tab[aria-selected=true] { background: color-mix(in srgb, var(--accent) 22%, transparent); }
@media (max-width: 1020px) { .nav-sep { display: none; } }
@media (max-width: 700px) {
  .nav button { padding: 6px 6px; }
  .nav .lbl { font-size: 10px; }
}

/* v4: verified badge, admin, Mines */
svg.vb { width: 17px; height: 17px; flex: none; align-self: center; margin-left: 2px; }
#profileCard h2 svg.vb { width: 20px; height: 20px; vertical-align: -3px; margin-left: 4px; }
.who .id b svg.vb, .wfx-people strong svg.vb { width: 15px; height: 15px; vertical-align: -2px; margin-left: 3px; }
.nav button[hidden] { display: none; }
.wfx-title { font-size: 1.1rem; font-family: 'Bricolage Grotesque', var(--font-display, inherit); }
.wfx-sel { width: auto; flex: none; }
.wfx-mines { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wfx-tile { aspect-ratio: 1; border: 0; border-radius: 10px; font-size: 1.5rem; cursor: pointer; color: inherit;
  background: rgba(128,128,128,.22); transition: transform .08s, background .15s; }
.wfx-tile:hover:not(:disabled) { background: rgba(128,128,128,.38); transform: translateY(-1px); }
.wfx-tile:disabled { cursor: default; }
.wfx-tile.gem { background: rgba(30,132,73,.32); }
.wfx-tile.mine { background: rgba(192,57,43,.28); }
.wfx-tile.hit { background: #c0392b; }
.wfx-tile.dim { opacity: .55; }
.wfx-danger { color: #e0182d; border-color: #e0182d; }
.wfx-danger-btn { background: #c0392b; color: #fff; }
.wfx-logrow { align-items: flex-start; }

/* v5: profiles + mentions */
.ulink { color: inherit; text-decoration: none; }
.ulink:hover, .ulink:focus-visible { text-decoration: underline; }
a.avatar { text-decoration: none; cursor: pointer; }
.mention { color: var(--link); font-weight: 600; text-decoration: none; }
.mention:hover, .mention:focus-visible { text-decoration: underline; }
.uprof { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.uprof-banner { height: 120px; opacity: .55; border-radius: 0; }
.uprof-row { position: relative; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px; margin-top: -46px; }
.uprof .avatar.big { width: 92px; height: 92px; font-size: 32px; border: 4px solid var(--surface); }
.uprof-name { margin: 10px 16px 0; font-family: var(--font-display); font-size: 22px; line-height: 1.2; display: flex; align-items: center; gap: 4px; overflow-wrap: anywhere; }
.uprof-name svg.vb { width: 20px; height: 20px; }
.uprof-handle { padding: 0 16px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.uprof-meta { padding: 6px 16px 0; color: var(--muted); font-size: 14px; }
.uprof-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 16px 0; color: var(--muted); font-size: 14px; }
.uprof-stats b { color: var(--fg); }
.pill { font-size: 12px; background: var(--sunken); border-radius: 6px; padding: 2px 7px; color: var(--muted); }
.tabs.ptabs { grid-template-columns: repeat(3, 1fr); }
.replying { color: var(--muted); font-size: 14px; margin: 2px 0 4px; }
.quoted { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; }
.quoted .text { margin: 4px 0 0; color: var(--muted); }
.mbox { position: fixed; z-index: 70; width: 290px; max-width: calc(100vw - 16px); padding: 4px; border-radius: 12px;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.mbox[hidden] { display: none; }
.mopt { display: flex; align-items: center; gap: 4px; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px;
  border-radius: 8px; color: inherit; font: inherit; cursor: pointer; }
.mopt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mopt small { color: var(--muted); margin-left: auto; padding-left: 8px; white-space: nowrap; }
.mopt[aria-selected="true"], .mopt:hover { background: var(--sunken); }

/* v6: flashbang + smoke easter egg (never blocks clicks) */
.wfx-flash { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; background: #fff;
  animation: wfx-flash 3.6s ease-out forwards; }
.wfx-flash.soft { animation: wfx-flash-soft 1.2s ease-out forwards; }
@keyframes wfx-flash { 0% { opacity: 1; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes wfx-flash-soft { 0% { opacity: .45; } 100% { opacity: 0; } }
.wfx-smoke, .wfx-throw { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2147483000; pointer-events: none; }
