/* PROCESS — by Cantsoft LLC. */
:root {
  --bg: #0a0a0f;
  --bg-2: #111118;
  --bg-3: #191922;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #ececf2;
  --dim: #8b8b9a;
  --faint: #5d5d6b;
  --accent: #9a7cf0;
  --accent-ink: #0a0a0f;
  --accent-soft: rgba(154, 124, 240, .12);
  --like: #e66a8c;
  --repost: #4fbf95;
  --danger: #e5646a;
  --glass: rgba(10, 10, 15, .78);
  --shadow: 0 12px 40px rgba(0, 0, 0, .55);
  --side: 248px;
  --main: 600px;
  --rail: 340px;
  --tabbar: 54px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f6f6f9;
  --bg-3: #ededf2;
  --line: rgba(15, 15, 30, .1);
  --line-2: rgba(15, 15, 30, .2);
  --text: #14141c;
  --dim: #6b6b7b;
  --faint: #a0a0ae;
  --accent: #6d4bc9;
  --accent-ink: #ffffff;
  --accent-soft: rgba(109, 75, 201, .09);
  --like: #d6436d;
  --repost: #1f9d6f;
  --danger: #cf3f46;
  --glass: rgba(255, 255, 255, .8);
  --shadow: 0 12px 40px rgba(20, 20, 40, .16);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-y: scroll; overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.mark { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mark .in { stroke: var(--accent); }
.wordmark { fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 500; letter-spacing: .02em;
  white-space: nowrap; transition: background .15s, border-color .15s, opacity .15s, color .15s;
}
.btn:hover { background: var(--bg-2); }
.btn.solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.solid:hover { opacity: .88; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { opacity: .9; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.lg { height: 46px; font-size: 15px; padding: 0 24px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.following:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.icbtn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--dim);
  transition: background .15s, color .15s; flex: none; cursor: pointer;
}
.icbtn:hover { background: var(--accent-soft); color: var(--accent); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 11.5px; letter-spacing: .08em; color: var(--dim); margin-bottom: 6px; }
.field input, .field textarea, .field select, .input {
  width: 100%; background: transparent; border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; outline: none;
  transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .input:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 84px; }
.err { color: var(--danger); font-size: 13px; min-height: 20px; margin: 4px 0 10px; }
.spin { width: 20px; height: 20px; border: 1px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.av { border-radius: 50%; object-fit: cover; background: var(--bg-3); flex: none; display: grid; place-items: center; overflow: hidden; }
.av.ph { border: 1px solid var(--line-2); background: transparent; color: var(--dim); font-weight: 300; letter-spacing: 0; text-transform: uppercase; }

/* ------------------------------------------------------------ auth */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-brand { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 34px; border-right: 1px solid var(--line); padding: 40px; position: relative; overflow: hidden; }
.auth-brand .mark { width: min(34vw, 300px); height: auto; stroke-width: .7; }
.auth-brand .wordmark { width: min(26vw, 230px); stroke-width: 1; }
.auth-brand p { margin: 0; color: var(--dim); font-size: 12px; letter-spacing: .32em; font-weight: 300; }
.auth-side { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 88px); }
.auth-card { width: 100%; max-width: 380px; margin: auto 0; }
.auth-card h1 { font-size: 26px; font-weight: 300; letter-spacing: .04em; margin: 0 0 6px; }
.auth-card .lead { color: var(--dim); margin: 0 0 28px; font-size: 13.5px; }
.auth-card .switch { margin-top: 22px; color: var(--dim); font-size: 13.5px; }
.auth-card .switch a { color: var(--accent); cursor: pointer; }
.madeby { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 11px; letter-spacing: .14em; margin-top: 32px; }
.madeby img { width: 112px; height: 40px; object-fit: cover; }
.cs-dark { display: block; } .cs-light { display: none; }
[data-theme="light"] .cs-dark { display: none; } [data-theme="light"] .cs-light { display: block; }
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { border-right: 0; padding: calc(56px + var(--sat)) 24px 8px; gap: 20px; }
  .auth-brand .mark { width: 92px; stroke-width: 1.1; }
  .auth-brand .wordmark { width: 150px; }
  .auth-side { padding: 24px 24px calc(32px + var(--sab)); justify-content: flex-start; }
  .auth-card { margin: 0 auto; }
  .madeby { justify-content: center; margin-left: auto; margin-right: auto; }
}

/* ------------------------------------------------------------ shell */
.shell { display: flex; justify-content: center; min-height: 100dvh; }
.side { width: var(--side); flex: none; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 10px 12px 14px; }
.side .brand { display: flex; align-items: center; gap: 12px; padding: 12px 12px 18px; }
.side .brand .mark { width: 30px; height: 30px; }
.side .brand .wordmark { width: 96px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 16px; padding: 11px 12px; border-radius: 999px; font-size: 16px; font-weight: 300; letter-spacing: .03em; color: var(--text); width: fit-content; position: relative; transition: background .15s; }
.nav a:hover { background: var(--bg-2); }
.nav a.on { font-weight: 500; }
.nav a.on .ic { stroke-width: 1.9; }
.nav .ic { width: 24px; height: 24px; }
.badge { position: absolute; left: 25px; top: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 600; display: grid; place-items: center; line-height: 1; }
.side .compose { margin: 16px 0 0; height: 48px; font-size: 15px; }
.side .compose .ic { display: none; }
.side .mecard { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 999px; text-align: left; width: 100%; transition: background .15s; }
.side .mecard:hover { background: var(--bg-2); }
.who { min-width: 0; flex: 1; line-height: 1.3; }
.who b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { display: block; color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { width: var(--main); flex: 0 1 var(--main); min-width: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100dvh; }
.rail { width: var(--rail); flex: none; position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 10px 0 20px 28px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.searchbox { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--dim); transition: border-color .15s; }
.searchbox:focus-within { border-color: var(--accent); color: var(--accent); }
.searchbox input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); }
.searchbox input::placeholder { color: var(--faint); }
.card { border: 1px solid var(--line); border-radius: 16px; margin-top: 16px; overflow: hidden; }
.card h3 { margin: 0; padding: 14px 16px 8px; font-size: 11px; font-weight: 500; letter-spacing: .22em; color: var(--dim); }
.card .none { padding: 6px 16px 16px; color: var(--faint); font-size: 13px; }
.trend { display: block; padding: 10px 16px; transition: background .15s; }
.trend:hover { background: var(--bg-2); }
.trend b { display: block; font-weight: 500; }
.trend span { color: var(--dim); font-size: 12.5px; }
.rail footer { padding: 18px 4px; color: var(--faint); font-size: 11px; letter-spacing: .14em; line-height: 2; }

/* ------------------------------------------------------------ page header */
.top { position: sticky; top: 0; z-index: 20; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); padding-top: var(--sat); }
.top .bar { display: flex; align-items: center; gap: 14px; height: 53px; padding: 0 12px 0 14px; position: relative; }
.top .bar h2 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: .03em; line-height: 1.25; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .bar h2 small { display: block; font-size: 12px; font-weight: 400; color: var(--dim); letter-spacing: 0; }
.top .bar .grow { flex: 1; }
.top .drawer-btn { display: none; }
.top .mlogo { display: none; }
.tabs { display: flex; }
.tabs button, .tabs a { flex: 1; height: 48px; display: grid; place-items: center; color: var(--dim); font-size: 14px; letter-spacing: .04em; position: relative; transition: background .15s, color .15s; }
.tabs button:hover { background: var(--bg-2); }
.tabs .on { color: var(--text); font-weight: 500; }
.tabs .on::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 44px; margin-left: -22px; height: 1.5px; background: var(--accent); }
.tabs.under { border-bottom: 1px solid var(--line); }
.empty { padding: 56px 32px; text-align: center; color: var(--dim); }
.empty b { display: block; color: var(--text); font-size: 20px; font-weight: 300; letter-spacing: .04em; margin-bottom: 6px; }
.sentinel { display: grid; place-items: center; padding: 28px; }
.newpill { position: sticky; top: calc(112px + var(--sat)); z-index: 15; display: flex; margin: 10px auto -44px; height: 34px; padding: 0 16px; align-items: center; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 500; box-shadow: var(--shadow); width: fit-content; }

/* ------------------------------------------------------------ composer */
.composer { display: flex; gap: 12px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.composer .cmain { flex: 1; min-width: 0; }
.composer textarea { width: 100%; background: none; border: 0; outline: 0; resize: none; font-size: 18px; font-weight: 300; line-height: 1.5; padding: 7px 0 10px; min-height: 44px; max-height: 50vh; overflow-y: auto; }
.composer textarea::placeholder { color: var(--faint); }
.cbar { display: flex; align-items: center; gap: 2px; margin-left: -8px; padding-top: 6px; }
.cbar .icbtn { color: var(--accent); }
.cbar .grow { flex: 1; }
.ccount { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12.5px; margin-right: 12px; }
.ring { width: 22px; height: 22px; transform: rotate(-90deg); fill: none; stroke-width: 1.5; }
.ring .t { stroke: var(--line-2); } .ring .f { stroke: var(--accent); transition: stroke-dashoffset .1s; }
.ccount.warn { color: var(--danger); } .ccount.warn .f { stroke: var(--danger); }
.cmedia { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 8px; }
.cmedia:empty { display: none; }
.cmedia > div { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/10; background: var(--bg-2); display: grid; place-items: center; }
.cmedia img, .cmedia video { width: 100%; height: 100%; object-fit: cover; }
.cmedia button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; }
.cmedia button .ic { width: 16px; height: 16px; }
.cpoll { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.cpoll input, .cpoll select { width: 100%; background: transparent; border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; outline: 0; }
.cpoll input:focus { border-color: var(--accent); }
.cpoll .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.cpoll .row select { width: auto; margin: 0; }
.cpoll .row button { color: var(--accent); font-size: 13px; }
.cpoll .row button.rm { color: var(--danger); }
.replying { color: var(--dim); font-size: 13.5px; padding: 0 0 2px; }
.replying a { color: var(--accent); }

/* ------------------------------------------------------------ post */
.post { display: block; padding: 12px 16px 6px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; position: relative; }
.post:hover { background: color-mix(in srgb, var(--bg-2) 55%, transparent); }
.pctx { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12.5px; margin: -2px 0 4px 26px; }
.pctx .ic { width: 15px; height: 15px; }
.pctx a:hover { text-decoration: underline; }
.prow { display: flex; gap: 12px; }
.pav { flex: none; align-self: flex-start; position: relative; }
.pbody { flex: 1; min-width: 0; }
.phead { display: flex; align-items: center; gap: 5px; min-width: 0; height: 22px; }
.pname { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.pname:hover { text-decoration: underline; }
.phandle, .ptime, .dot { color: var(--dim); font-size: 14px; white-space: nowrap; }
.phandle { overflow: hidden; text-overflow: ellipsis; flex: 0 2 auto; min-width: 24px; }
.ptime:hover { text-decoration: underline; }
.phead .more { margin: -6px -8px -6px auto; }
.preply { color: var(--dim); font-size: 13.5px; }
.preply a, .ptext a { color: var(--accent); }
.ptext a:hover, .preply a:hover { text-decoration: underline; }
.ptext { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 1px; }
.media { display: grid; gap: 2px; margin-top: 10px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.media.n1 img { width: 100%; max-height: 520px; object-fit: cover; }
.media.n1 video { width: 100%; max-height: 520px; background: #000; }
.media.n2, .media.n3, .media.n4 { grid-template-columns: 1fr 1fr; aspect-ratio: 16/9; }
.media.n3 > :first-child { grid-row: span 2; }
.media.n3, .media.n4 { grid-template-rows: 1fr 1fr; }
.media > * { min-height: 0; min-width: 0; }
.media.n2 img, .media.n3 img, .media.n4 img, .media.n2 video, .media.n3 video, .media.n4 video { width: 100%; height: 100%; object-fit: cover; }
.media img { cursor: zoom-in; }
.poll { margin-top: 10px; display: grid; gap: 6px; }
.poll button.opt { height: 36px; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; font-size: 14px; transition: background .15s; }
.poll button.opt:hover { background: var(--accent-soft); }
.poll .res { position: relative; height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-size: 14px; border-radius: 8px; overflow: hidden; }
.poll .res i { position: absolute; inset: 0 auto 0 0; background: var(--bg-3); border-radius: 8px; min-width: 6px; }
.poll .res.win i { background: var(--accent-soft); border-left: 1.5px solid var(--accent); }
.poll .res span { position: relative; display: flex; align-items: center; gap: 6px; }
.poll .res .ic { width: 15px; height: 15px; color: var(--accent); }
.poll .res.win { font-weight: 500; }
.poll small { color: var(--dim); font-size: 13px; }
.quote { display: block; margin-top: 10px; border: 1px solid var(--line-2); border-radius: 16px; padding: 10px 12px; cursor: pointer; transition: background .15s; }
.quote:hover { background: var(--bg-2); }
.quote .qhead { display: flex; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.quote .qhead b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote .qhead span { color: var(--dim); white-space: nowrap; }
.quote .qtext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.quote .media { margin-top: 8px; }
.quote.gone { color: var(--dim); font-size: 14px; cursor: default; }
.actions { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 0 -8px; max-width: 460px; color: var(--dim); }
.act { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--dim); min-width: 52px; transition: color .15s; }
.act i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; transition: background .15s; }
.act .ic { width: 18px; height: 18px; }
button.act:hover { color: var(--accent); } button.act:hover i { background: var(--accent-soft); }
.act.repost:hover, .act.repost.on { color: var(--repost); } .act.repost:hover i { background: color-mix(in srgb, var(--repost) 12%, transparent); }
.act.like:hover, .act.like.on { color: var(--like); } .act.like:hover i { background: color-mix(in srgb, var(--like) 12%, transparent); }
.act.like.on .ic { fill: currentColor; }
.act.repost.on .ic { stroke-width: 2; }
.act.bm.on { color: var(--accent); } .act.bm.on .ic { fill: currentColor; }
.act.sm { min-width: 0; }
.actr { display: flex; }
.post.thread .pav::after { content: ""; position: absolute; left: 50%; top: 46px; width: 1px; height: 4000px; background: var(--line-2); }
.post.thread { border-bottom: 0; overflow: hidden; }
.post.gone { color: var(--dim); cursor: default; padding: 16px; }
.post.focal { cursor: default; padding-bottom: 0; }
.post.focal:hover { background: none; }
.post.focal .fhead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post.focal .fhead .who b:hover { text-decoration: underline; }
.post.focal .ptext { font-size: 19px; font-weight: 300; line-height: 1.6; }
.post.focal .pstamp { color: var(--dim); font-size: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.post.focal .pstamp b { color: var(--text); font-weight: 500; }
.post.focal .actions { max-width: none; margin: 0; padding: 4px 0; justify-content: space-around; }
.post.focal .act .ic { width: 21px; height: 21px; }

/* ------------------------------------------------------------ users / profile */
.urow { display: flex; gap: 12px; padding: 12px 16px; align-items: flex-start; transition: background .15s; cursor: pointer; }
.urow:hover { background: var(--bg-2); }
.urow .who p { margin: 4px 0 0; font-size: 14px; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.urow .who b:hover { text-decoration: underline; }
.tag { display: inline-block; font-size: 11px; color: var(--dim); background: var(--bg-3); padding: 1px 6px; border-radius: 4px; margin-left: 4px; vertical-align: 1px; }
.phero { aspect-ratio: 3/1; background: var(--bg-2) center/cover; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.phero.blank { background-image: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 60%); }
.phero.blank svg { position: absolute; right: -4%; top: -30%; height: 180%; opacity: .14; stroke-width: .4; }
.pinfo { padding: 12px 16px 14px; position: relative; }
.pinfo .pavbig { margin-top: calc(-12px - min(11vw, 68px)); width: min(22vw, 134px); height: min(22vw, 134px); border-radius: 50%; border: 4px solid var(--bg); background: var(--bg); overflow: hidden; position: relative; z-index: 1; }
.pinfo .pavbig .av { width: 100% !important; height: 100% !important; font-size: min(8vw, 48px) !important; }
.pinfo .pbtns { position: absolute; right: 16px; top: 12px; display: flex; gap: 8px; align-items: center; }
.pinfo .pbtns .icbtn { border: 1px solid var(--line-2); color: var(--text); }
.pinfo h1 { margin: 10px 0 0; font-size: 21px; font-weight: 500; letter-spacing: .02em; line-height: 1.3; overflow-wrap: anywhere; }
.pinfo .handle { color: var(--dim); }
.pinfo .bio { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pinfo .bio a { color: var(--accent); }
.pinfo .facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; color: var(--dim); font-size: 14px; }
.pinfo .facts span, .pinfo .facts a { display: inline-flex; align-items: center; gap: 5px; }
.pinfo .facts a { color: var(--accent); }
.pinfo .facts .ic { width: 16px; height: 16px; }
.pinfo .stats { display: flex; gap: 20px; margin-top: 12px; font-size: 14px; color: var(--dim); }
.pinfo .stats a:hover { text-decoration: underline; }
.pinfo .stats b { color: var(--text); font-weight: 500; }
.notice { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--dim); font-size: 13.5px; }

/* ------------------------------------------------------------ notifications */
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.notif:hover { background: color-mix(in srgb, var(--bg-2) 55%, transparent); }
.notif.unread { background: var(--accent-soft); }
.notif > .ic { width: 26px; height: 26px; margin: 4px 7px 0; }
.notif.like > .ic { color: var(--like); fill: currentColor; } .notif.repost > .ic { color: var(--repost); } .notif.follow > .ic { color: var(--accent); }
.notif .nb { min-width: 0; flex: 1; }
.notif .nb p { margin: 8px 0 0; }
.notif .nb p b { font-weight: 500; }
.notif .nb .nt { color: var(--dim); font-size: 14px; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.notif time { color: var(--dim); font-size: 13px; white-space: nowrap; }

/* ------------------------------------------------------------ messages */
.conv { display: flex; gap: 12px; padding: 14px 16px; align-items: center; transition: background .15s; cursor: pointer; }
.conv:hover { background: var(--bg-2); }
.conv .who span.last { color: var(--dim); font-size: 14px; }
.conv.unread .who span.last { color: var(--text); font-weight: 500; }
.conv time { color: var(--dim); font-size: 13px; margin-left: 6px; font-weight: 400; }
.conv .dotu { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.chat { display: flex; flex-direction: column; min-height: calc(100dvh - 54px - var(--sat)); }
.chat .peer { text-align: center; padding: 28px 16px 22px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.chat .peer .av { margin: 0 auto 8px; }
.chat .peer b { display: block; font-weight: 500; } .chat .peer span { color: var(--dim); font-size: 14px; }
.chat .peer p { margin: 8px auto 0; max-width: 360px; font-size: 14px; }
.msgs { flex: 1; padding: 4px 16px 12px; display: flex; flex-direction: column; gap: 3px; }
.msgs .day { align-self: center; color: var(--faint); font-size: 11.5px; letter-spacing: .1em; margin: 14px 0 8px; }
.msg { max-width: 78%; align-self: flex-start; display: flex; flex-direction: column; align-items: flex-start; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg .bub { padding: 9px 14px; border-radius: 20px 20px 20px 5px; background: var(--bg-3); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .bub { background: var(--accent); color: var(--accent-ink); border-radius: 20px 20px 5px 20px; }
.msg .bub a { text-decoration: underline; }
.msg img, .msg video { border-radius: 16px; max-height: 320px; margin-bottom: 3px; border: 1px solid var(--line); cursor: zoom-in; }
.msg small { color: var(--faint); font-size: 11.5px; margin: 2px 4px 6px; }
.older { align-self: center; color: var(--accent); font-size: 13px; padding: 10px; }
.chatbar { position: sticky; bottom: 0; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 8px 10px calc(8px + var(--sab)); }
.chatbar .cmedia { grid-template-columns: repeat(4, 1fr); margin: 0 0 8px; }
.chatbar .rowi { display: flex; align-items: flex-end; gap: 4px; background: var(--bg-2); border-radius: 22px; padding: 4px 6px; }
.chatbar textarea { flex: 1; min-width: 0; background: none; border: 0; outline: 0; resize: none; padding: 7px 4px; max-height: 140px; line-height: 1.45; }
.chatbar .icbtn { color: var(--accent); }

/* ------------------------------------------------------------ settings */
.sect { padding: 22px 16px; border-bottom: 1px solid var(--line); }
.sect h3 { margin: 0 0 14px; font-size: 11px; font-weight: 500; letter-spacing: .22em; color: var(--dim); }
.sect p { margin: 0 0 12px; color: var(--dim); font-size: 13.5px; }
.sect .rowb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.seg button { height: 30px; padding: 0 16px; border-radius: 999px; font-size: 13px; color: var(--dim); }
.seg button.on { background: var(--text); color: var(--bg); }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv:first-of-type { border-top: 0; }
.kv code { font: 500 14px/1 ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.kv .used { color: var(--dim); font-size: 13px; }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--dim); }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.state.on { color: var(--text); } .state.on::before { background: var(--repost); }
.about { text-align: center; padding: 36px 16px calc(48px + var(--sab)); color: var(--faint); font-size: 11px; letter-spacing: .16em; }
.about .mark { width: 44px; height: 44px; color: var(--text); }
.about .wordmark { display: block; width: 110px; margin: 12px auto 18px; color: var(--text); }
.about img { width: 150px; height: 54px; object-fit: cover; margin: 8px auto 0; }
.steps { margin: 0 0 12px; padding-left: 20px; color: var(--dim); font-size: 13.5px; }
.steps li { margin-bottom: 4px; }

/* ------------------------------------------------------------ overlays */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(8, 8, 14, .62); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; overflow-y: auto; animation: fade .15s; }
[data-theme="light"] .overlay { background: rgba(30, 30, 45, .35); }
.modal { width: 100%; max-width: 600px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.modal .mhead { display: flex; align-items: center; gap: 12px; height: 53px; padding: 0 10px; }
.modal .mhead h3 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: .03em; flex: 1; }
.modal .mbody { padding: 4px 16px 18px; }
.modal .composer { border: 0; padding: 4px 16px 12px; }
.modal .ctxpost { padding: 8px 16px 0; }
.modal .ctxpost .post { padding: 0; border: 0; cursor: default; }
.modal .ctxpost .post:hover { background: none; }
.modal .ctxpost .actions, .modal .ctxpost .more { display: none; }
.modal.sm { max-width: 400px; }
.modal.sm .mbody { padding: 24px; }
.modal.sm h3 { margin: 0 0 8px; font-size: 19px; font-weight: 400; }
.modal.sm p { margin: 0 0 22px; color: var(--dim); font-size: 14px; }
.modal.sm .btn { margin-top: 10px; }
.edit-hero { aspect-ratio: 3/1; background: var(--bg-2) center/cover; position: relative; display: grid; place-items: center; }
.edit-av { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--bg); margin: -48px 0 12px 16px; position: relative; overflow: hidden; display: grid; place-items: center; background: var(--bg); }
.edit-av .av { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.camb { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.menu-back { position: fixed; inset: 0; z-index: 70; }
.menu { position: fixed; z-index: 71; min-width: 220px; max-width: 320px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; animation: fade .12s; }
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; text-align: left; font-size: 14.5px; transition: background .15s; }
.menu button:hover { background: var(--bg-2); }
.menu button.danger { color: var(--danger); }
.menu .ic { width: 18px; height: 18px; }
.viewer { position: fixed; inset: 0; z-index: 80; background: rgba(4, 4, 8, .95); display: grid; place-items: center; animation: fade .15s; }
.viewer img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.viewer .icbtn { position: absolute; color: #fff; background: rgba(255, 255, 255, .1); width: 40px; height: 40px; }
.viewer .x { top: calc(14px + var(--sat)); left: 14px; } .viewer .pv { left: 14px; top: 50%; } .viewer .nx { right: 14px; top: 50%; }
.toast { position: fixed; left: 50%; bottom: calc(76px + var(--sab)); transform: translateX(-50%); z-index: 90; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 13.5px; box-shadow: var(--shadow); animation: fade .2s; max-width: calc(100vw - 32px); text-align: center; }
@keyframes fade { from { opacity: 0; } }

.tabbar, .fab, .scrim, .tabbar .lbl { display: none; }
.badge, .tag, .dotu { font-style: normal; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1260px) {
  :root { --side: 76px; }
  .side { align-items: center; padding: 10px 0 14px; }
  .side .brand { padding: 12px 0 14px; } .side .brand .wordmark { display: none; }
  .nav a span.lbl { display: none; } .nav a { padding: 12px; }
  .side .compose { width: 48px; padding: 0; } .side .compose span { display: none; } .side .compose .ic { display: block; }
  .side .mecard { width: auto; padding: 6px; } .side .mecard .who, .side .mecard > .ic { display: none; }
}
@media (max-width: 1080px) { .rail { display: none; } }
@media (max-width: 700px) {
  :root { --side: 280px; }
  body { font-size: 15px; }
  .shell { display: block; padding-bottom: calc(var(--tabbar) + var(--sab)); }
  .main { width: 100%; border: 0; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; height: auto; width: var(--side); background: var(--bg); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .22s ease; align-items: stretch; padding: calc(12px + var(--sat)) 12px calc(14px + var(--sab)); }
  body.drawer .side { transform: none; }
  body.drawer .scrim { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(8, 8, 14, .6); animation: fade .2s; }
  .side .brand { padding: 12px 12px 18px; } .side .brand .wordmark { display: block; }
  .nav a span.lbl { display: inline; } .nav a { padding: 11px 12px; width: 100%; }
  .side .compose { display: none; }
  .side .mecard { width: 100%; padding: 10px 12px; } .side .mecard .who { display: block; } .side .mecard > .ic { display: block; }
  .top .drawer-btn { display: block; }
  .top .mlogo { display: block; position: absolute; left: 50%; transform: translateX(-50%); }
  .top .mlogo .mark { width: 26px; height: 26px; display: block; }
  .top.home .bar h2 { display: none; }
  .tabbar { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar) + var(--sab)); padding-bottom: var(--sab); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .tabbar a { flex: 1; display: grid; place-items: center; color: var(--dim); position: relative; }
  .tabbar a.on { color: var(--text); } .tabbar a.on .ic { stroke-width: 1.9; }
  .tabbar .ic { width: 24px; height: 24px; }
  .tabbar .badge { left: 50%; top: 8px; margin-left: 2px; }
  .fab { display: grid; place-items: center; position: fixed; z-index: 31; right: 16px; bottom: calc(var(--tabbar) + var(--sab) + 16px); width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
  .fab .ic { width: 24px; height: 24px; }
  body.nochrome .tabbar, body.nochrome .fab { display: none; }
  body.nochrome .shell { padding-bottom: 0; }
  .hcomp { display: none; }
  .overlay { padding: 0; align-items: stretch; background: var(--bg); }
  .modal { max-width: none; border: 0; border-radius: 0; box-shadow: none; padding-top: var(--sat); }
  .overlay.center { padding: 20px; align-items: center; background: rgba(8, 8, 14, .62); }
  .overlay.center .modal { border: 1px solid var(--line); border-radius: 18px; padding-top: 0; }
  .menu { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + var(--sab)); max-width: none; border-radius: 18px; }
  .menu button { padding: 15px 18px; font-size: 15.5px; }
  .menu-back { background: rgba(8, 8, 14, .5); }
  .newpill { top: calc(112px + var(--sat)); }
  .actions { max-width: none; }
  .chat { min-height: calc(100dvh - 54px - var(--sat)); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
