
:root{
  --bg:#f7f1ea;
  --card:#fffaf3;
  --ink:#2a2320;
  --muted:#6b5b52;
  --accent:#b56b6b;
  --accent2:#7e5360;
  --ok:#2f7a4d;
  --warn:#b07b2c;
  --danger:#a03838;
  --border:#eadfd4;
  --shadow:0 8px 22px rgba(42,35,32,0.08);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; color:var(--ink); background:var(--bg);}
a{color:var(--accent2); text-decoration:none}
a:hover{text-decoration:underline}

.topbar{
  position:sticky; top:0; z-index:10;
  background:rgba(247,241,234,0.9);
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px;
}
.brand{display:flex; align-items:baseline; gap:8px}
.brand-link{font-weight:800; font-size:18px; color:var(--ink)}
.brand-sub{font-size:12px; color:var(--muted)}
.nav{display:flex; gap:12px; align-items:center}
.nav a{font-size:14px}

.container{max-width:980px; margin:18px auto; padding:0 14px}
.footer{max-width:980px; margin:10px auto 30px; padding:0 14px}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
  margin:14px 0;
}
.card.subcard{box-shadow:none; background:#fffdf8}
h1,h2,h3,h4{margin:0 0 10px}
h1{font-size:28px}
h2{font-size:22px}
h3{font-size:18px}
h4{font-size:15px; color:var(--muted)}

.muted{color:var(--muted)}
.small{font-size:12px}
.error{color:var(--danger); font-weight:600}
hr{border:none;border-top:1px solid var(--border); margin:14px 0}

.row{display:flex; gap:10px; align-items:center}
.row.space-between{justify-content:space-between}
.grow{flex:1}

.grid{display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap:12px}
.grid2{display:grid; grid-template-columns:1fr; gap:12px}
@media(min-width: 760px){
  .grid2{grid-template-columns:1fr 1fr}
}

label{display:block; font-size:13px; color:var(--muted); margin:10px 0 6px}
input, textarea, select{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  color:var(--ink);
  outline:none;
}
textarea{min-height:90px; resize:vertical}
input:focus, textarea:focus, select:focus{border-color: rgba(181,107,107,0.55)}

.check{display:flex; gap:10px; align-items:flex-start; margin:12px 0}
.check input{width:auto}

.btn{
  display:inline-flex; justify-content:center; align-items:center;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(181,107,107,0.55);
  background: var(--accent);
  color:white;
  font-weight:700;
  cursor:pointer;
}
.btn:hover{filter:brightness(0.98)}
.btn.ghost{
  background:transparent;
  color:var(--accent2);
  border-color: var(--border);
}
.btn.small{padding:8px 10px; font-size:13px}
.btn.danger{border-color: rgba(160,56,56,0.55); color: var(--danger)}

.pill{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:12px;
  color:var(--muted);
}
.pill.small{padding:3px 9px; font-size:11px}
.pill.ok{color:var(--ok); border-color: rgba(47,122,77,0.35)}
.pill.warn{color:var(--warn); border-color: rgba(176,123,44,0.35)}
.pill.danger{color:var(--danger); border-color: rgba(160,56,56,0.35)}

.warnbox{
  border:1px dashed rgba(176,123,44,0.35);
  background: rgba(176,123,44,0.08);
  padding:10px 12px;
  border-radius:16px;
}

.verifybox{
  border:1px dashed rgba(181,107,107,0.35);
  background: rgba(181,107,107,0.06);
  padding:12px;
  border-radius:16px;
  margin-top:10px;
}

.list{display:flex; flex-direction:column; gap:10px}
.list-item{
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px 12px;
  display:flex;
  gap:10px;
  align-items:center;
  background:#fff;
}

.usercard{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  background:#fff;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.usercard-top{display:flex; justify-content:space-between; gap:10px; align-items:flex-start}
.usercard-tags{display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end}

.reqform{display:flex; gap:8px; align-items:center}
.reqform input{flex:1; padding:8px 10px}

.thread{display:flex; flex-direction:column; gap:10px; max-height:60vh; overflow:auto; padding:8px 2px}
.msg{display:flex; flex-direction:column; gap:2px}
.msg.me{align-items:flex-end}
.msg.them{align-items:flex-start}
.msg-bubble{
  max-width: 72ch;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid var(--border);
  background:#fff;
}
.msg.me .msg-bubble{
  background: rgba(181,107,107,0.10);
  border-color: rgba(181,107,107,0.25);
}
.msg-text{white-space:pre-wrap}
.msg-attach a{font-size:13px}
.msg-meta{font-size:11px}

.sendbox textarea{min-height:64px}
.keybox{
  padding:12px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
}
.keybox code{font-size:14px}



.attach-preview{display:block; max-width:100%; border-radius:12px; border:1px solid var(--border); background:#fff;}
.attach-preview.image{max-height:320px; object-fit:contain;}
.attach-preview.audio{width:min(360px, 100%);}
.attach-preview.video{max-height:320px;}
.stack-on-mobile{align-items:flex-start;}
.column-actions{display:flex; flex-direction:column; gap:8px;}
.wrap{flex-wrap:wrap;}
.beacon-edit-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:10px; margin-top:10px;}
.compact-check{margin:0; align-self:end;}
@media(max-width: 760px){
  .stack-on-mobile{flex-direction:column;}
  .column-actions{width:100%; flex-direction:row; flex-wrap:wrap;}
}


.align-right{text-align:right}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}
.tiny{font-size:11px}
.narrow-card{max-width:520px; margin-inline:auto}
.ops-stats-grid{grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));}
.stat-card{display:flex; flex-direction:column; align-items:flex-start; justify-content:center; min-height:110px}
.stat-num{font-size:28px; font-weight:800}
.compact-form-grid{align-items:end}
.ops-thread{max-height:none}
@media(max-width: 760px){ .align-right{text-align:left} }

.live-banner{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:40;
  max-width:min(420px, calc(100vw - 32px));
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(181,107,107,0.35);
  background:#fff7ef;
  color:var(--ink);
  box-shadow:var(--shadow);
  cursor:pointer;
  text-align:left;
}
