/* Mench web app. Layout: navigation rail, feed column, side column; bottom tabs on phones. */
:root {
  --bg: #fff; --ink: #000; --muted: #5d6673; --line: #e7e9ec; --soft: #f5f6f7; --hover: #f0f1f3;
  --blue: #1f6bff; --red: #e5383b; --green: #0f9d63; --yellow: #ffc21a;
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Roboto Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --ink: #f2f3f5; --muted: #8b95a3; --line: #262a30; --soft: #121418; --hover: #181b20; --blue: #5b93ff; --green: #2fc487; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--font); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.ic { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -0.2em; flex: none; }
i.far, i.fas { width: 1.25em; text-align: center; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 600px) 340px; justify-content: center; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; padding: 10px 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 10px 12px; font: 700 26px/1 "Bodoni Moda", Georgia, serif; }
.brand svg { width: 30px; height: 30px; }
.nav a { display: flex; align-items: center; gap: 16px; padding: 11px 14px; border-radius: 999px; font-size: 19px; width: fit-content; }
.nav a:hover { background: var(--hover); }
.nav a[aria-current="page"] { font-weight: 700; }
.nav .ic, .nav i { font-size: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 18px; border-radius: 999px; font-weight: 700; background: var(--ink); color: var(--bg); }
.btn:hover { opacity: .88; }
.btn[disabled] { opacity: .4; cursor: default; }
.btn.line { background: none; color: var(--ink); border: 1px solid var(--line); }
.btn.line:hover { background: var(--hover); opacity: 1; }
.btn.big { min-height: 50px; font-size: 17px; margin-top: 12px; width: 100%; }
.me { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 999px; }
.me:hover { background: var(--hover); }
.main { border-inline: 1px solid var(--line); min-height: 100vh; padding-bottom: 80px; }
.side { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 8px 0 20px 24px; display: flex; flex-direction: column; gap: 14px; }

.head { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head h1 { margin: 0; padding: 14px 16px; font-size: 20px; display: flex; align-items: center; gap: 18px; }
.tabs { display: flex; }
.tabs a { flex: 1; text-align: center; padding: 14px 0 0; color: var(--muted); font-weight: 500; }
.tabs a span { display: inline-block; padding-bottom: 12px; border-bottom: 4px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tabs a[aria-current="page"] span { border-color: var(--yellow); }
.tabs a:hover { background: var(--hover); }

/* ---------- people and posts ---------- */
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.s { width: 28px; height: 28px; font-size: 11px; }
.av.l { width: 84px; height: 84px; font-size: 30px; border: 4px solid var(--bg); }
.who { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span, .dim { color: var(--muted); }
.post { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.post:hover { background: var(--soft); }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.text p { margin: 0 0 2px; }
.text .t { font-weight: 500; }
.text a.tag, .text a.at { font-weight: 500; }
.text a.tag::before { content: ""; display: inline-block; width: .55em; height: .55em; background: var(--yellow); margin-right: .22em; }
.text a.at { color: var(--blue); }
.text a:hover { text-decoration: underline; }
.text code { font: 400 .9em var(--mono); background: var(--soft); padding: 1px 5px; border-radius: 5px; }
.media { margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--soft); }
.media img, .media video, .media svg { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.seq { margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; }
.seq b { font-weight: 500; }
.bar { display: flex; gap: 3px; flex: 1; min-width: 40px; }
.bar i { flex: 1; height: 5px; background: var(--line); border-radius: 2px; }
.bar i.on { background: var(--red); }
.acts { display: flex; justify-content: space-between; max-width: 430px; margin-top: 8px; color: var(--muted); font-size: 14px; }
.acts button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; margin-left: -7px; border-radius: 999px; }
.acts button:hover { background: var(--hover); color: var(--ink); }
.acts .on-like { color: var(--red); }
.acts .on-save { color: var(--blue); }
.empty { padding: 42px 24px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 20px; margin-bottom: 4px; }

/* ---------- compose ---------- */
.compose { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.compose textarea { width: 100%; min-height: 56px; border: 0; outline: 0; resize: none; background: none; color: inherit; font: 400 19px/1.4 var(--font); padding: 6px 0; }
.compose .row { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.compose .row > button:not(.btn) { color: var(--blue); width: 34px; height: 34px; border-radius: 50%; }
.compose .row > button:not(.btn):hover { background: var(--hover); }
.compose .row .btn { margin-left: auto; }
.plan { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; font-size: 13px; }
.plan span { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--muted); }
.plan span b { color: var(--ink); font-weight: 500; }
.plan .warn { color: var(--red); border-color: var(--red); }
.field { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); color: inherit; font: inherit; }
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .45); display: grid; place-items: start center; padding: 5vh 12px; }
.modal > div { background: var(--bg); border-radius: 18px; width: min(600px, 100%); overflow: hidden; }
.modal .top { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; }

/* ---------- discovery ---------- */
.step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 12px 16px 0; position: relative; }
.step.past { color: var(--muted); }
.step.past::before { content: ""; position: absolute; left: 35px; top: 56px; bottom: -12px; width: 2px; background: var(--line); }
.step.past .text .t { color: var(--ink); }
.pick { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 14px; }
.now { padding: 14px 16px 18px; border-bottom: 1px solid var(--line); }
.now .text { font-size: 22px; line-height: 1.35; margin-top: 10px; }
.now .text .t { font-weight: 700; }
.opts { display: grid; gap: 8px; margin-top: 14px; }
.opts button { text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; font-weight: 500; }
.opts button:hover { background: var(--hover); }
.opts button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.go { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.go .btn { min-height: 46px; padding: 0 26px; background: var(--red); color: #fff; }
.err { color: var(--red); margin-top: 10px; font-weight: 500; }
.hint { color: var(--muted); font-size: 13px; }
.prog { display: flex; align-items: center; gap: 12px; padding: 0 16px 12px; font-size: 14px; color: var(--muted); }
.done { padding: 26px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.done b { font-size: 22px; display: block; }

/* ---------- side column, profile, ledger ---------- */
.search { position: sticky; top: 0; background: var(--bg); padding: 6px 0; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--soft); border-radius: 999px; padding: 11px 18px; color: inherit; font: inherit; }
.card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.card h2 { margin: 0; padding: 12px 16px 6px; font-size: 19px; }
.card .li { display: flex; gap: 10px; align-items: center; padding: 10px 16px; }
.card .li:hover { background: var(--soft); }
.card .li > div { min-width: 0; flex: 1; }
.card .li .btn { min-height: 32px; padding: 0 14px; font-size: 14px; }
.foot { color: var(--muted); font-size: 13px; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.foot a:hover { text-decoration: underline; }
.cover { height: 130px; background: linear-gradient(120deg, var(--yellow), var(--red) 60%, var(--blue)); }
.prof { padding: 0 16px 14px; border-bottom: 1px solid var(--line); }
.prof .top { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -42px; }
.prof h2 { margin: 8px 0 0; font-size: 21px; }
.prof .nums { display: flex; gap: 18px; margin-top: 10px; color: var(--muted); }
.prof .nums b { color: var(--ink); }
table.ledger { width: 100%; border-collapse: collapse; font: 400 12.5px/1.5 var(--mono); }
.ledger td, .ledger th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger th { color: var(--muted); font-weight: 500; }
.scroll { overflow-x: auto; }
.note { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sample { background: var(--soft); color: var(--muted); font-size: 13px; padding: 6px 16px; border-bottom: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 500; z-index: 30; }
.tabbar, .fab, .mhead { display: none; }

@media (max-width: 1240px) { .shell { grid-template-columns: 76px minmax(0, 600px) 320px; } .rail { align-items: center; padding-inline: 6px; } .nav a span, .brand span, .me div, .btn.big span { display: none; } .nav a { padding: 12px; } .btn.big { width: 50px; padding: 0; } }
@media (max-width: 1000px) { .shell { grid-template-columns: 76px minmax(0, 600px); } .side { display: none; } }
@media (max-width: 690px) {
  .shell { display: block; } .rail { display: none; } .main { border: 0; padding-bottom: 120px; }
  .mhead { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 0; }
  .mhead .brand { padding: 4px 0; font-size: 22px; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; text-align: center; padding: 13px 0 12px; font-size: 21px; color: var(--muted); }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: 74px; z-index: 11; width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 22px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
  .home-compose { display: none; }
  .now .text { font-size: 20px; }
}
@media (prefers-reduced-motion: no-preference) { .now { animation: rise .22s ease-out; } @keyframes rise { from { opacity: 0; transform: translateY(14px); } } }

/* ---------- added with the API-driven app ---------- */
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.hero { position: relative; min-height: 230px; display: flex; align-items: flex-end; overflow: hidden; background: #000; color: #fff; border-bottom: 1px solid var(--line); }
.hero > img, .hero > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; }
.hero > div { position: relative; padding: 18px 16px; }
.hero h2 { margin: 10px 0 2px; font: 700 30px/1.1 "Bodoni Moda", Georgia, serif; }
.hero p { margin: 0; max-width: 34rem; }
.opts a.opt { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; font-weight: 500; }
.opts a.opt:hover { background: var(--hover); border-color: var(--ink); }
.post > a, a.post { display: contents; }
a.post { display: grid; }
.acts span { display: inline-flex; align-items: center; gap: 6px; }
.now .acts { margin-top: 16px; }
.go a.btn { background: var(--red); color: #fff; min-height: 46px; padding: 0 26px; }

.signin { padding: 22px 16px; display: grid; gap: 10px; max-width: 26rem; }
.signin h2 { margin: 0; font-size: 22px; }
.signin p { margin: 0; }
.signin label { font-weight: 500; margin-top: 8px; }
.signin .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.signin [hidden] { display: none; }
.signin [data-step2] { display: grid; gap: 10px; }
.signin [data-step2][hidden] { display: none; }

.tabs.sub { border-bottom: 1px solid var(--line); }
.tabs i { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.more { padding: 18px 16px 28px; text-align: center; }
.ok { color: var(--green); margin-top: 10px; font-weight: 500; }
.small { font-size: 14px; }
.who .ic, .nums .ic { width: .95em; height: .95em; }
