:root {
  --void: #050505;
  --panel: #111111;
  --panel-2: #161616;
  --line: #2a2a2a;
  --cyan: #e10600;
  --cyan-2: #ff4d4d;
  --plasma: #ff2a2a;
  --bolt: #ffd0d0;
  --hot: #e10600;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --dim: #6d6d6d;
  --font: "Manrope", "Segoe UI", sans-serif;
  --hud: "Manrope", "Segoe UI", sans-serif;
  --dread: "UnifrakturMaguntia", "Old English Text MT", serif;
  --max: 1140px;
  --ease: cubic-bezier(.2, .85, .25, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: #000; color-scheme: dark; }
body {
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  background: #050505;
  overflow-x: hidden;
}
body::after { content: none; }
.bg-deco, .flash { display: none; }
#bolt-layer {
  position: fixed; inset: 0; z-index: 15; pointer-events: none;
  width: 100vw; height: 100vh; max-width: none;
  mix-blend-mode: screen;
}
html.is-flash .flash { opacity: .55; }
.flash {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) 0%, rgba(224,69,69,.45), transparent 42%);
  opacity: 0; transition: opacity .12s;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; border-radius: 0; }
h1, h2, h3 { margin: 0; font-family: var(--dread); font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.05; }
p { margin: 0; }
.wrap { width: min(var(--max), 92vw); margin-inline: auto; position: relative; z-index: 4; }

.top {
  position: sticky; top: 0; z-index: 20;
  background: #050505;
  border-bottom: 1px solid #1c1c1c;
  box-shadow: none;
}
.top-in { display: flex; align-items: center; gap: 1.4rem; min-height: 54px; }
.top .wrap { width: min(1280px, calc(100% - 2.4rem)); }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand-mark {
  width: 3px; height: 18px; display: block; padding: 0;
  background: #e10600; border: 0; border-radius: 2px;
  box-shadow: none; transform: none;
}
.brand:hover .brand-mark { transform: none; }
.brand img, .brand strong { display: none; }
.brand em {
  display: block; font-family: var(--dread); font-style: normal; font-weight: 400;
  font-size: 1.7rem; line-height: .8; color: #ff2a2a; text-shadow: none;
}

.search {
  flex: 1; display: flex; max-width: 440px; margin-left: auto;
  background: #050910; border: 2px solid var(--line);
  box-shadow: inset 0 0 0 1px #000, 4px 4px 0 #02050a;
}
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: .7rem .9rem; }
.search button {
  width: 46px; border: 0; cursor: pointer; background: var(--cyan); color: #031016; font-weight: 700;
  box-shadow: inset 0 1px 0 #fff;
}
.nav-auth {
  display: flex; align-items: center; gap: 1rem;
  margin-left: auto; flex: 0 0 auto; padding-left: 1.6rem;
}
.user-chip span {
  max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 42px; padding: 0 1rem; cursor: pointer; border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--font); font-size: .95rem; letter-spacing: 0; text-transform: none; font-weight: 700;
  transition: transform .15s var(--ease), background .15s, filter .15s;
}
.btn:active { transform: translateY(1px); }
.btn-ember, .btn-cyan {
  background: #e04545; color: #fff; border-color: #e04545;
  box-shadow: 0 0 18px rgba(224,69,69,.35);
}
.btn-ember:hover, .btn-cyan:hover { background: #ff2a2a; }
.btn-send {
  width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 12px;
  background: #e10600; color: #fff; border: 0; box-shadow: none; flex: 0 0 auto;
}
.btn-send:hover { background: #ff1a1a; }
.btn-ghost {
  background: transparent; color: #ffeaea; border-color: #4a1515;
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--cyan); color: #fff; }
.btn-hot {
  background: var(--hot); color: #fff; border-color: #ffb0c8;
  box-shadow: 5px 5px 0 #2a0412, 0 0 18px rgba(255,61,122,.35);
}
.btn-wide { width: 100%; min-height: 50px; }

.user-chip {
  display: flex; align-items: center; gap: .55rem;
  padding: 0; background: transparent; border: 0; box-shadow: none;
}
.av {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--font); font-size: .8rem; background: #1c1c1c;
  border: 0; color: #fff;
  object-fit: cover; flex: 0 0 auto;
}
.av.lg { width: 84px; height: 84px; font-size: 1.7rem; }
.role { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--plasma); font-weight: 700; }
.role.member { color: var(--muted); }
.role.admin { color: var(--hot); }
.role.mod { color: var(--cyan); }

.hero { padding: 2.6rem 0 1.5rem; }
.hero.tight { padding: 1.4rem 0 1rem; }
.hero.tight h1 { font-size: clamp(1.4rem, 3.4vw, 2.1rem); }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--hud); font-size: .62rem; letter-spacing: .2em;
  color: var(--cyan); border: 2px solid var(--cyan); padding: .28rem .7rem; margin-bottom: 1rem;
  box-shadow: 4px 4px 0 #021018, 0 0 12px rgba(24,240,255,.25);
  background: rgba(24,240,255,.06);
}
.kicker i { width: 8px; height: 8px; background: var(--bolt); box-shadow: 0 0 10px var(--bolt); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero h1 {
  font-size: clamp(2rem, 5.4vw, 3.8rem); line-height: .92;
  text-shadow: 0 0 22px rgba(24,240,255,.28), 4px 4px 0 #021018;
  animation: glitch 6s infinite;
}
.hero h1 span { color: var(--cyan); }
@keyframes glitch {
  0%, 92%, 100% { transform: none; }
  93% { transform: translate(-2px, 1px); text-shadow: -2px 0 var(--hot), 2px 0 var(--cyan); }
  94% { transform: translate(2px, -1px); }
}
.hero p { max-width: 56ch; color: var(--muted); margin-top: .9rem; font-size: 1.05rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 1.5rem; max-width: 540px; }
.stat {
  background: var(--panel); border: 2px solid var(--line); padding: .9rem 1rem;
  box-shadow: 6px 6px 0 #02050a, inset 0 0 0 1px rgba(24,240,255,.08);
  transform: perspective(600px) rotateX(6deg);
  transition: transform .3s var(--ease);
}
.stat:hover { transform: perspective(600px) rotateX(0); }
.stat b { display: block; font-family: var(--hud); font-size: 1.5rem; color: var(--cyan-2); }
.stat span { color: var(--dim); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }

.panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  position: relative;
}
.panel::before { content: none; }
@keyframes beam { to { filter: hue-rotate(40deg); opacity: .55; } }

.cat-list { display: grid; gap: .85rem; padding-bottom: 3.2rem; }
.cat {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  padding: 1.15rem 1.2rem; color: inherit;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.cat:hover {
  transform: translate(-3px, -3px);
  border-color: var(--cyan);
  box-shadow: 11px 11px 0 #021018, 0 0 28px rgba(24,240,255,.22);
}
.cat h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.cat p { color: var(--muted); }
.cat-meta { display: flex; gap: 1.1rem; text-align: right; color: var(--dim); font-size: .82rem; }
.cat-meta b { color: var(--cyan-2); font-family: var(--hud); }
.last { font-size: .8rem; color: var(--muted); margin-top: .4rem; }

.crumb { display: flex; flex-wrap: wrap; gap: .4rem; color: var(--dim); margin: 1.3rem 0 .8rem; font-size: .88rem; }
.crumb a { color: var(--cyan); }
.row-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin: 0 0 1rem; }
.row-head h1 { font-size: clamp(1.3rem, 3vw, 2rem); }

.thread {
  display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: center;
  padding: 1rem 1.1rem; border-bottom: 2px solid rgba(24,240,255,.08); color: inherit;
}
.thread:last-child { border-bottom: 0; }
.thread:hover { background: rgba(24,240,255,.04); }
.badges { display: flex; gap: .35rem; margin-bottom: .25rem; }
.badge {
  font-family: var(--hud); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .15rem .45rem; border: 2px solid var(--line); color: var(--muted);
}
.badge.pin { color: var(--bolt); border-color: var(--bolt); }
.badge.lock { color: var(--hot); border-color: var(--hot); }
.thread h3 { font-size: .95rem; }
.thread .sub { color: var(--muted); font-size: .82rem; margin-top: .2rem; }
.nums { display: flex; gap: 1rem; font-size: .8rem; color: var(--dim); white-space: nowrap; }

.post { display: grid; grid-template-columns: 188px 1fr; border-bottom: 2px solid rgba(24,240,255,.08); }
.post:last-child { border-bottom: 0; }
.post-user { padding: 1.1rem; background: rgba(0,0,0,.28); border-right: 2px solid rgba(24,240,255,.08); }
.post-user a { font-weight: 700; color: var(--cyan-2); }
.post-body { padding: 1.15rem 1.25rem 1.3rem; }
.post-body .meta { color: var(--dim); font-size: .78rem; margin-bottom: .7rem; display: flex; justify-content: space-between; }
.post-text { white-space: pre-wrap; word-break: break-word; line-height: 1.65; }
.post-text a { color: var(--cyan); text-decoration: underline; }

.composer { padding: 1rem; display: grid; gap: .7rem; margin-top: 1rem; }
.field { display: grid; gap: .3rem; }
.field span { font-family: var(--hud); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.field input, .field textarea, .field select, .captcha input,
.pass-wrap input[type="password"] {
  width: 100%; background: #0c0c0c; border: 1px solid #2a2a2a; border-radius: 10px; padding: .85rem 1rem; outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  box-shadow: none;
}
.field input::placeholder, .field textarea::placeholder, .captcha input::placeholder,
.pass-wrap input::placeholder, .pass-wrap input::-webkit-input-placeholder {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  -webkit-text-security: none;
  color: #7a4a4a;
  opacity: 1;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .captcha input:focus {
  border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(224,69,69,.25), inset 3px 3px 0 rgba(0,0,0,.45);
}
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffeaea !important;
  caret-color: #ffeaea;
  box-shadow: 0 0 0 1000px #0c0c0c inset !important;
  transition: background-color 99999s ease-out;
}
.notice { color: var(--hot); }
.ok { color: #6ee7a8; }
.muted { color: var(--muted); }

.auth-stage { position: relative; padding: 2rem 0 4rem; }
.auth-card {
  position: relative; z-index: 1;
  max-width: 440px; margin: 0 auto; padding: 1.7rem 1.5rem 1.6rem;
  display: grid; gap: .9rem;
  background: #101010;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  box-shadow: none;
  animation: cardIn .7s var(--ease) both;
  overflow: hidden;
}
.auth-card::before, .auth-card::after { content: none; }
@keyframes spinBorder { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) rotateX(12deg); }
  to { opacity: 1; transform: none; }
}
.auth-card h1 {
  font-size: 1.55rem;
  text-shadow: 0 0 18px rgba(224,69,69,.45);
  animation: titlePulse 3s ease-in-out infinite;
}
@keyframes titlePulse { 50% { text-shadow: 0 0 28px rgba(255,90,90,.8), 0 0 8px #fff; } }
.auth-card .field { animation: fieldIn .55s var(--ease) both; }
.auth-card .field:nth-of-type(1) { animation-delay: .08s; }
.auth-card .field:nth-of-type(2) { animation-delay: .16s; }
.auth-card .field:nth-of-type(3) { animation-delay: .24s; }
@keyframes fieldIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.auth-card .btn-wide {
  min-height: 52px;
  animation: btnGlow 1.8s ease-in-out infinite;
}
@keyframes btnGlow { 50% { filter: brightness(1.12); box-shadow: 5px 5px 0 #3a0808, 0 0 28px rgba(255,80,80,.7); } }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 3.2rem; }
.pass-wrap input.masked {
  -webkit-text-security: disc;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
}
.pass-wrap input.masked::placeholder,
.pass-wrap input.masked::-webkit-input-placeholder {
  -webkit-text-security: none;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
}
.pass-wrap .eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .8rem;
  font-family: var(--hud); letter-spacing: .08em;
}

.bg-deco { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-deco .orb {
  position: absolute; border-radius: 50%; filter: blur(40px);
  animation: orbFloat 12s ease-in-out infinite;
}
.bg-deco .o1 { width: 340px; height: 340px; left: -80px; top: 12%; background: rgba(224,69,69,.28); }
.bg-deco .o2 { width: 420px; height: 420px; right: -120px; bottom: 8%; background: rgba(120,0,0,.4); animation-delay: -4s; }
.bg-deco .o3 { width: 180px; height: 180px; left: 42%; top: 38%; background: rgba(255,80,80,.16); animation-delay: -7s; }
@keyframes orbFloat { 50% { transform: translate(24px, -30px) scale(1.08); } }
.bg-deco .ring {
  position: absolute; border: 2px solid rgba(224,69,69,.25);
  animation: ringSpin 28s linear infinite;
}
.bg-deco .rg1 { width: 220px; height: 220px; left: 8%; bottom: 14%; }
.bg-deco .rg2 { width: 140px; height: 140px; right: 12%; top: 18%; animation-duration: 18s; animation-direction: reverse; border-color: rgba(255,180,180,.2); }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.bg-deco .shard {
  position: absolute; width: 10px; height: 10px; background: #e04545;
  box-shadow: 0 0 12px #ff5a5a; opacity: .55;
  animation: shardFall 9s linear infinite;
}
.bg-deco .s1 { left: 12%; animation-delay: 0s; }
.bg-deco .s2 { left: 28%; animation-delay: -2s; width: 6px; height: 6px; }
.bg-deco .s3 { left: 61%; animation-delay: -5s; }
.bg-deco .s4 { left: 79%; animation-delay: -3.5s; width: 7px; height: 7px; }
.bg-deco .s5 { left: 91%; animation-delay: -7s; }
@keyframes shardFall {
  0% { top: -12px; opacity: 0; }
  12% { opacity: .7; }
  100% { top: 110%; opacity: 0; transform: rotate(220deg); }
}
.pager { display: flex; gap: .5rem; justify-content: center; margin: 1.2rem 0 2.5rem; }
.pager button[disabled] { opacity: .35; cursor: default; }

.site-footer {
  position: relative; z-index: 4;
  background: #050505; border-top: 1px solid #1c1c1c;
  padding: 1.2rem 0; text-align: center; color: var(--dim); font-size: .84rem;
  box-shadow: none;
}
.site-footer a { color: var(--cyan); }
.net-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  background: #1a1a1a; border-bottom: 1px solid #2a2a2a;
  color: #ffd0d0; text-align: center; padding: .45rem .8rem;
  font-family: var(--hud); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
}
.toast {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%);
  z-index: 50; display: none; padding: .7rem 1rem;
  background: #08111c; border: 2px solid var(--cyan); color: #fff;
  box-shadow: 6px 6px 0 #021018, 0 0 20px rgba(24,240,255,.25);
  font-family: var(--hud); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
}

.tabs { display: flex; gap: 0; margin-left: .4rem; }
.tabs[hidden] { display: none; }
.tabs a {
  font-family: var(--font); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  padding: .45rem .7rem; color: #6a6a6a; border-bottom: 0; line-height: 1;
}
.tabs a:hover { color: #fff; }
.tabs a.on { color: #ff2a2a; box-shadow: inset 3px 0 0 #e10600; }
img.av { display: block; width: 34px; height: 34px; object-fit: cover; }
img.av.lg { width: 84px; height: 84px; }
.profile-head { display: flex; gap: 1rem; align-items: center; }
.av-edit { display: flex; align-items: center; gap: .8rem; }
.crop-card { width: min(420px, 100%); background: #1c1c1c; border-color: #c45c4a; }
.crop-frame {
  width: min(300px, 72vw);
  height: min(300px, 72vw);
  margin: 0 auto; overflow: hidden; position: relative;
  border: 1px solid #e7b7a4;
  border-radius: 16px;
  background:
    linear-gradient(45deg, #3a3a3a 25%, transparent 25%),
    linear-gradient(-45deg, #3a3a3a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #3a3a3a 75%),
    linear-gradient(-45deg, transparent 75%, #3a3a3a 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #2a2a2a;
  touch-action: none; cursor: grab;
}
.crop-frame:active { cursor: grabbing; }
.crop-frame img {
  position: absolute; left: 0; top: 0; max-width: none; max-height: none;
  user-select: none; pointer-events: none; transform-origin: 0 0;
}
.crop-zoom { display: grid; gap: .3rem; }
.crop-zoom span { font-family: var(--hud); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.crop-zoom input { width: 100%; accent-color: var(--cyan); }
.hist-title { font-size: .8rem; letter-spacing: .14em; color: var(--cyan); margin: 1.2rem 0 .6rem; }
.sala-box.hist { min-height: 240px; margin-bottom: 2.2rem; }
.you {
  display: inline-block; margin-left: .35rem; font-family: var(--hud); font-size: .55rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); border: 1px solid var(--cyan); padding: 0 .35rem;
}
.person-meta { flex: 1; min-width: 0; }
.person-meta .snip {
  color: var(--dim); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .15rem;
}

.sala { padding: 0; display: flex; flex-direction: column; min-height: min(68vh, 720px); }
.sala-head { margin-bottom: .85rem; }
.sala-head.row { display: flex; align-items: center; gap: 1rem; }
.sala-head h1 {
  font-size: clamp(1.55rem, 3.8vw, 2.4rem);
  text-shadow: 0 0 18px rgba(224,69,69,.35);
}
.sala-head p { color: var(--muted); margin-top: .35rem; }
.sala-head .back { color: var(--cyan); font-family: var(--hud); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.sala-box {
  display: grid; grid-template-rows: 1fr auto;
  min-height: 0; flex: 1;
}
.sala-box .join { padding: 1rem; text-align: center; }
.sala-box .join a { color: var(--cyan); }

.bubbles { padding: 1rem .9rem 1.2rem; display: grid; gap: .65rem; align-content: start; }
.bubbles.live { max-height: min(58vh, 620px); overflow: auto; scroll-behavior: smooth; }
.bubbles.live::-webkit-scrollbar { width: 8px; }
.bubbles.live::-webkit-scrollbar-thumb { background: #2a2a2a; }
.bubble {
  display: flex; gap: .55rem; align-items: flex-end; max-width: min(460px, 78%);
  animation: bubbleIn .28s var(--ease) both;
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bubble .av, .bubble img.av {
  display: grid; width: 36px; height: 36px; border-radius: 50%;
  align-self: flex-end; flex: 0 0 auto;
}
.bubble img.av { display: block; object-fit: cover; }
.bubble-in {
  padding: .7rem .85rem .55rem;
  border: 1px solid #2c2c2c;
  border-radius: 16px;
  background: #1a1a1a;
  box-shadow: none;
  min-width: 0;
}
.bubble.me { justify-self: end; margin-left: auto; flex-direction: row-reverse; }
.bubble.me .bubble-in {
  background: #6d1c22;
  border-color: transparent;
  border-radius: 16px;
  box-shadow: none;
}
.bubble-in small { display: block; color: #ff3b3b; font-family: var(--font); font-weight: 700; font-size: .82rem; line-height: 1.2; margin-bottom: .28rem; }
.bubble.me .bubble-in small { display: none; }
.bubble-in small a { color: inherit; }
.bubble-text { white-space: pre-wrap; word-break: break-word; line-height: 1.4; color: #f3f3f3; }
.bubble-in time { float: right; margin: .35rem 0 0 .8rem; font-size: .68rem; color: #8a8a8a; letter-spacing: 0; }
.bubble-in img.shot { display: block; max-width: min(280px, 70vw); max-height: 240px; object-fit: cover; margin: .4rem 0 .2rem; border: 2px solid var(--line); }
.bubble .st { font-size: 2.1rem; line-height: 1; }

.msg-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  margin: .55rem .7rem .7rem;
  padding: .35rem .35rem .35rem .45rem;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  background: #101010;
}
.msg-bar input[name="body"] {
  flex: 1; min-width: 0; min-height: 44px; background: transparent; border: 0;
  border-radius: 10px;
  padding: .55rem .7rem; outline: none; color: var(--text);
  box-shadow: none;
}
.msg-bar input[name="body"]:focus { border-color: transparent; box-shadow: none; }
.msg-bar input[name="body"]::placeholder { color: #6d6d6d; }
.msg-bar .notice { flex: 1 0 100%; margin: 0; }
.msg-bar .attach {
  flex: 1 0 100%;
  display: flex; align-items: center; gap: .6rem;
}
.msg-bar .attach img { height: 56px; width: 56px; object-fit: cover; border: 2px solid var(--cyan); }
.msg-bar .attach button { background: none; border: 0; color: var(--hot); cursor: pointer; font-family: var(--hud); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 10px; cursor: pointer; font-size: 1.15rem;
  box-shadow: none; color: #bdbdbd;
}
.icon-btn:hover, .icon-btn.on { background: #1c1c1c; box-shadow: none; }

.emo-pop {
  position: absolute; left: .5rem; right: .5rem; bottom: calc(100% + 6px);
  z-index: 8;
  background: #100303;
  border: 2px solid var(--cyan);
  box-shadow: 8px 8px 0 #050000, 0 0 28px rgba(224,69,69,.28);
  animation: cardIn .25s var(--ease) both;
}
.emo-tabs {
  display: flex; gap: 0; overflow: auto; border-bottom: 2px solid var(--line);
  background: #180505;
}
.emo-tab {
  flex: 1; min-width: 42px; height: 40px; background: none; border: 0; cursor: pointer; font-size: 1.05rem;
  border-bottom: 2px solid transparent;
}
.emo-tab.on { border-bottom-color: var(--cyan); background: rgba(224,69,69,.12); }
.emo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: .15rem; padding: .55rem; max-height: 220px; overflow: auto;
}
.emo {
  min-height: 38px; background: transparent; border: 0; cursor: pointer; font-size: 1.35rem;
  line-height: 1;
}
.emo:hover { background: rgba(224,69,69,.18); }
.pack-row {
  display: flex; gap: .35rem; overflow: auto; padding: .45rem .5rem;
  border-bottom: 2px solid var(--line); background: #140404;
}
.pack-tab {
  display: inline-flex; align-items: center; gap: .35rem; flex: 0 0 auto;
  background: #180505; border: 2px solid var(--line); color: var(--text);
  cursor: pointer; padding: .2rem .55rem; font-size: .78rem; white-space: nowrap;
}
.pack-tab img { width: 22px; height: 22px; }
.pack-tab.on { border-color: var(--cyan); color: #fff; }
.emo-grid.stickers { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .35rem; max-height: 250px; }
.sticker {
  width: 100%; aspect-ratio: 1; background: #120404; border: 2px solid var(--line);
  cursor: pointer; padding: .2rem;
}
.sticker img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sticker:hover { border-color: var(--cyan); transform: scale(1.06); }
.stk { width: 118px; height: 118px; object-fit: contain; display: block; filter: drop-shadow(0 4px 0 #050000); }
.bubble.sticker-msg .bubble-in { background: transparent; border: 0; box-shadow: none; padding: .15rem .2rem; }

.inbox { padding: 1.1rem 0 2.4rem; }
.inbox-shell {
  display: grid; grid-template-columns: 300px 1fr;
  width: 100%;
  margin-inline: 0;
  min-height: min(68vh, 720px); overflow: hidden;
}
.inbox-shell.is-thread { grid-template-columns: 300px 1fr; }
.inbox-list { background: #080808; min-height: 0; overflow: auto; }
.inbox-shell.is-thread .inbox-list, .inbox-shell .inbox-list { border-right: 1px solid #1c1c1c; }
.inbox-tools {
  display: flex; gap: .4rem; padding: .7rem .7rem .5rem; align-items: center;
  position: sticky; top: 0; z-index: 2; background: #080808;
  border-bottom: 1px solid #1c1c1c;
}
.inbox-tools input {
  flex: 1; min-width: 0; background: #111; border: 1px solid #2a2a2a; border-radius: 10px;
  padding: .55rem .65rem; outline: none; color: var(--text);
}
.inbox-tools input:focus { border-color: var(--cyan); }
.inbox-tools .btn { min-height: 40px; padding: 0 .75rem; flex: 0 0 auto; }
.inbox-thread {
  display: grid; grid-template-rows: auto 1fr auto;
  min-height: 0; background: #050505;
}
.thread-head {
  display: flex; gap: .65rem; align-items: center;
  padding: .7rem .9rem; border-bottom: 1px solid #1c1c1c;
  background: #050505;
}
.thread-head .back {
  display: none; width: 40px; height: 40px; place-items: center;
  font-size: 1.2rem; color: var(--cyan); border: 2px solid var(--line);
}
.thread-faces { display: flex; }
.thread-faces .av, .thread-faces img.av { width: 32px; height: 32px; margin-left: -8px; }
.thread-faces .av:first-child, .thread-faces img.av:first-child { margin-left: 0; }
.thread-who { min-width: 0; }
.thread-who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font); font-size: .95rem; font-weight: 700; text-transform: none; letter-spacing: 0; line-height: 1.2; color: #fff; }
.thread-who span { display: block; color: var(--muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-thread .bubbles.live { max-height: none; min-height: 0; }
.sheet {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(3, 0, 0, .78); display: none;
  place-items: center; padding: 1.2rem;
  backdrop-filter: blur(8px);
}
.sheet.open { display: grid; }
.sheet-card {
  width: min(400px, 100%); max-height: min(80dvh, 560px);
  overflow: auto; padding: 1.15rem 1.1rem 1.2rem; display: grid; gap: .75rem;
  background: #101010;
  border: 2px solid var(--cyan);
  box-shadow: 10px 10px 0 #050000, 0 0 40px rgba(224,69,69,.28);
}
.sheet-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.sheet-top h3 { font-size: .9rem; }
.inbox-sec {
  margin: 0; padding: .85rem .9rem .35rem;
  font-family: var(--font); font-size: .68rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: #ff3b3b; line-height: 1;
}
.inbox-wait {
  display: grid; place-items: center; color: #ff2a2a;
  background: #050505;
}
.inbox-wait p { font-family: var(--dread); font-size: clamp(2.4rem, 5vw, 4.2rem); text-shadow: none; }
.empty-line { padding: .5rem .9rem 1rem; margin: 0; font-size: .9rem; }
.inbox-row {
  display: flex; gap: .7rem; align-items: center;
  padding: .7rem .9rem; border-bottom: 1px solid rgba(224,69,69,.1);
}
.inbox-row:hover, .inbox-row.on { background: rgba(224,69,69,.12); }
.inbox-row.on { border-left: 3px solid var(--cyan); }
.inbox-meta { min-width: 0; flex: 1; display: grid; gap: .15rem; }
.inbox-top { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.inbox-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-top time { color: var(--dim); font-size: .72rem; flex: 0 0 auto; }
.inbox-sub {
  color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inbox-sub i { font-style: normal; color: var(--cyan); margin-right: .35rem; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.inbox-new {
  padding: .95rem .85rem 1rem;
  display: grid; gap: .65rem; align-content: start;
  background: #100303;
}
.inbox-new h3 { font-size: .78rem; }
.inbox-new .btn { width: 100%; min-height: 44px; }
.inbox-picks { display: grid; gap: .35rem; max-height: 46vh; overflow: auto; }
.inbox-pick {
  display: grid; grid-template-columns: auto 1fr auto; gap: .55rem; align-items: center;
  padding: .4rem .45rem; border: 2px solid var(--line); background: #0c0303; cursor: pointer;
}
.inbox-pick:hover, .inbox-pick:has(input:checked) { border-color: var(--cyan); }
.inbox-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-pick input { accent-color: var(--cyan); width: 16px; height: 16px; }
.chat-layout { display: grid; grid-template-columns: 280px 1fr; gap: .8rem; min-height: 62vh; margin-bottom: 2rem; }
.chat-list h3 {
  margin: 0; padding: .7rem .9rem .35rem;
  font-size: .62rem; letter-spacing: .16em; color: var(--cyan);
  border-bottom: 2px solid rgba(224,69,69,.12);
}
.chat-list a { display: flex; gap: .65rem; align-items: center; padding: .8rem; border-bottom: 2px solid rgba(224,69,69,.12); }
.chat-list a span { min-width: 0; }
.chat-list a .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list a:hover, .chat-list a.on { background: rgba(224,69,69,.08); }
.check { display: flex; gap: .5rem; align-items: center; color: var(--muted); }
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, 300px);
  gap: .7rem;
  justify-content: start;
  padding: .4rem 0 3rem;
  perspective: 900px;
}
.person {
  position: relative;
  width: 300px; max-width: 100%; height: 76px;
  padding: .45rem .6rem .45rem .45rem;
  display: flex; gap: .6rem; align-items: center;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(225, 6, 0, .16), transparent 46%),
    linear-gradient(180deg, #1c1c1c, #0e0e0e);
  border: 1px solid #3a3a3a;
  border-radius: 16px;
  box-shadow: 0 10px 18px rgba(0,0,0,.35);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.person::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255,255,255,.16) 48%, transparent 64%);
  transform: translateX(-130%);
  transition: transform .6s ease;
  pointer-events: none;
}
.person::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: #e10600;
  box-shadow: 0 0 12px #e10600;
  pointer-events: none;
}
.person > * { position: relative; z-index: 1; }
.person:hover {
  border-color: #e10600;
  box-shadow: 0 18px 32px rgba(225, 6, 0, .28), 0 0 0 1px rgba(225, 6, 0, .45);
}
.person:hover::before { transform: translateX(130%); }
.person .av, .person img.av {
  width: 40px; height: 40px; border: 1px solid #4a4a4a;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.person:hover .av, .person:hover img.av {
  border-color: #ff4d4d;
  box-shadow: 0 0 14px rgba(225, 6, 0, .65);
  transform: scale(1.06);
}
.person-meta { min-width: 0; flex: 1; }
.person b {
  display: block; color: #f2f2f2; font-size: .92rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.person-meta .muted, .person-meta .snip { font-size: .72rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-meta .snip { display: none; }
.person .btn { min-height: 32px; padding: 0 .7rem; font-size: .8rem; flex: 0 0 auto; }
.captcha {
  display: grid; grid-template-columns: 1fr 110px; gap: .7rem; align-items: center;
  padding: .85rem; background: #120404; border: 2px solid var(--cyan);
  box-shadow: 5px 5px 0 #050000, 0 0 18px rgba(224,69,69,.2);
}
.captcha .q { display: grid; gap: .15rem; }
.captcha small { font-family: var(--hud); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.captcha b { font-family: var(--hud); font-size: 1.45rem; color: #fff; text-shadow: 0 0 12px rgba(224,69,69,.8); }
.file { display: none; }
.privacy {
  position: relative; z-index: 4;
  background: linear-gradient(90deg, #3a0808, #1a0303);
  border-bottom: 2px solid var(--hot);
  color: #ffd0d0;
  font-size: .92rem;
  padding: .7rem 0;
  text-align: center;
  box-shadow: 0 10px 30px rgba(224, 69, 69, .2);
}
.privacy b { color: #fff; }
body.chat-mode {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.chat-mode .bg-deco,
body.chat-mode .site-footer { display: none; }
body.chat-mode::after { opacity: .08; }
body.chat-mode .top { flex: none; }
body.chat-mode #app {
  flex: 1; min-height: 0; width: 100%; max-width: none;
  display: flex; flex-direction: column;
}
body.chat-mode .sala,
body.chat-mode .inbox {
  flex: 1; min-height: 0; width: 100%; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
body.chat-mode .sala-box,
body.chat-mode .inbox-shell {
  height: 100%; min-height: 0; border: 0; box-shadow: none; background: transparent;
}
body.chat-mode .sala-box::before,
body.chat-mode .inbox-shell::before { display: none; }
body.chat-mode .bubbles.live { max-height: none; }
body.chat-mode .msg-bar {
  background: #101010;
  border-top: 1px solid #2a2a2a;
}
@media (max-width: 800px) {
  .people { grid-template-columns: 1fr; }
  .person { width: 100%; }
  .search { display: none; }
  .chat-layout, .inbox-shell, .inbox-shell.is-thread { grid-template-columns: 1fr; width: 100%; }
  .inbox-shell { min-height: calc(100dvh - 120px); }
  body.chat-mode .inbox-shell,
  body.chat-mode .sala { min-height: 0; height: 100%; }
  .tabs a { font-size: 1.12rem; padding: .25rem .4rem; }
  .brand em { font-size: 1.25rem; }
  .inbox-shell.is-thread .inbox-list { display: none; }
  .inbox-shell:not(.is-thread) .inbox-thread { display: none; }
  .thread-head .back { display: grid; }
  body.thread-open .site-footer { display: none; }
  body.thread-open .inbox { padding: .4rem 0 0; }
  .inbox-thread { min-height: calc(100dvh - 78px); }
  body.chat-mode .inbox-thread { min-height: 0; }
  .inbox-list { border-right: 0; }
  .inbox-head input { width: 100%; max-width: none; }
  .sheet { place-items: end center; padding: 0; }
  .sheet-card { width: 100%; max-height: 78dvh; border-left: 0; border-right: 0; }
  .tabs { overflow: auto; }
  .cat, .thread { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; }
  .post-user { display: flex; gap: .7rem; align-items: center; border-right: 0; border-bottom: 2px solid rgba(24,240,255,.08); }
  .row-head { flex-direction: column; align-items: stretch; }
  .stat { transform: none; }
  .top-in { gap: .45rem; min-height: 64px; }
  .nav-auth { gap: .45rem; padding-left: .4rem; }
  .nav-auth.guest-auth { display: none; }
  .nav-auth .btn { min-height: 36px; padding: 0 .7rem; font-size: .85rem; }
  .user-chip span { display: none; }
  .msg-bar { padding: .55rem .5rem .65rem; }
  .msg-bar .btn { min-height: 44px; padding: 0 .7rem; }
  .emo-grid { max-height: 180px; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); }
  .emo-pop { left: .25rem; right: .25rem; }
  .bubble { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
