:root{
  --bg:#0b0c10;
  --card:#11131a;
  --text:#e8e9ee;
  --muted:#9aa0aa;
  --line:#202431;
  --primary:#5b8cff;
  --danger:#ff5b6e;
  --ok:#59d38c;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  --vv-offset: 0px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  background:linear-gradient(180deg, #07080b 0%, var(--bg) 60%, #07080b 100%);
  color:var(--text);
}
.topbar{
  position:sticky;
  top:0;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  background:rgba(11,12,16,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.brand{font-weight:700; letter-spacing:.3px}
.topbar{display:none}
.mono{font-family:var(--mono); color:var(--muted); font-size:12px}
.author-code{
  font-family:var(--mono);
  color:var(--muted);
  font-size:12px;
  cursor:pointer;
  user-select:none;
}
.author-code.following{
  color:#cde2ff;
  text-shadow: 0 0 20px rgba(91,140,255,.25);
}
.author-code:hover{color:var(--text)}
.main{padding:12px 12px 90px}
.view{max-width:720px; margin:0 auto}
.hidden{display:none !important}
.bottom-nav{
  position:fixed;
  left:0; right:0; bottom:0;
  height:64px;
  display:flex;
  background:rgba(11,12,16,.9);
  border-top:1px solid var(--line);
  backdrop-filter: blur(10px);
  transition: transform .18s ease;
  z-index:6;
}
.bottom-nav.hidden-ui{transform: translateY(80px)}
.tab{
  flex:1;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:14px;
}
.tab.active{color:var(--text)}
.fab{
  position:fixed;
  right:18px;
  bottom:86px;
  width:52px;
  height:52px;
  border-radius:26px;
  border:0;
  background:var(--primary);
  color:white;
  font-size:30px;
  box-shadow: var(--shadow);
  cursor:pointer;
  transition: transform .18s ease, opacity .18s ease;
  z-index:7;
}
.fab.hidden-ui{transform: translateY(90px); opacity:0}
.card{
  background:rgba(17,19,26,.85);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:10px 10px 6px;
  margin:6px 0;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.card .meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:var(--muted);
  font-size:12px;
}
.badge{
  padding:2px 8px;
  border-radius: 999px;
  border:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
}
.badge.buffer{color:#bcdcff; border-color: rgba(91,140,255,.35); background: rgba(91,140,255,.08)}
.badge.public{color: #cde2ff; border-color: rgba(91,140,255,.5)}
.badge.private{color: #d6ffd6; border-color: rgba(89,211,140,.4)}
.badge.review{color:#ffe5b3; border-color: rgba(255,179,0,.4)}
.badge.locked{color:#ffb3bd; border-color: rgba(255,91,110,.4)}
.content{white-space:pre-wrap; line-height:1.55; margin:6px 0 3px}
.actions-row{display:flex; gap:8px; flex-wrap:wrap}
.actions-row .btn{font-size:12px; padding:7px 10px}
.icon-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.icon{
  width:16px;
  height:16px;
  display:block;
}
.icon path{stroke-linecap:round; stroke-linejoin:round}
.btn.icon-btn{color:#cde2ff}
.btn.danger.icon-btn{color:#ffd1d8}
.btn{
  border:1px solid var(--line);
  background:transparent;
  color:var(--text);
  padding:8px 10px;
  border-radius: 12px;
  cursor:pointer;
  font-size:13px;
}
.btn.primary{background:var(--primary); border-color: rgba(91,140,255,.6)}
.btn.secondary{color:var(--muted)}
.btn.danger{background:rgba(255,91,110,.12); border-color: rgba(255,91,110,.4); color:#ffd1d8}
.muted{color:var(--muted)}
.modal{
  position:fixed;
  left:0; right:0; top:0; bottom:0;
  background: rgba(0,0,0,.55);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:12px;
  z-index:10;
}
#editor.modal{padding-bottom: calc(12px + var(--vv-offset))}
.modal-card{
  width:min(760px, 100%);
  background: rgba(17,19,26,.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding:10px 12px 8px;
  box-shadow: var(--shadow);
}
.modal-title{font-weight:700; margin:4px 0 10px}
.modal-body{color:var(--text); line-height:1.55; white-space:pre-wrap; margin:6px 0 10px}
.textarea{
  width:100%;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color:var(--text);
  padding:10px 12px;
  resize: vertical;
  outline:none;
  font-size:15px;
}
.row{display:flex; gap:12px; align-items:center; margin-top:8px; color:var(--muted)}
.row.actions{justify-content:flex-end}
.row.actions.editor-actions{justify-content:center; margin-top:6px}
.row.editor-top{justify-content:flex-start; gap:14px; margin-top:0; margin-bottom:8px; font-size:12px}
.row.editor-top input{transform: translateY(1px)}
#btnPublish{min-width:120px}
.hint{margin-top:8px; color:var(--muted); font-size:12px}
.hint:empty{display:none}
#editorHint{margin-top:6px}
.section-title{
  font-weight:700;
  margin:12px 6px 6px;
  color:var(--muted);
  font-size:12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.reactions-row{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  align-items:center;
  margin-top:10px;
}
.owner-actions{
  display:flex;
  justify-content:center;
  gap:10px;
  align-items:center;
  margin-top:10px;
  padding:10px;
  border-radius: 14px;
  background: rgba(91,140,255,.08);
  border: 1px solid rgba(91,140,255,.25);
}
.btn.ghost{
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.10);
}
.icon-plain{
  border:0;
  background:transparent;
  color:var(--muted);
  padding:6px 6px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  font-size:12px;
}
.icon-plain:hover{color:var(--text)}
.icon-plain .icon{width:16px; height:16px}
.input{
  width:100%;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color:var(--text);
  padding:10px 12px;
  outline:none;
}
.hint.small{font-size:12px; line-height:1.35}
.me-compact{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:baseline;
}
.subtabs{
  position:sticky;
  top:0;
  z-index:5;
  display:flex;
  gap:8px;
  padding:10px 2px;
  margin:10px 0 0;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(11,12,16,.85);
  backdrop-filter: blur(10px);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.subtab{
  flex:0 0 auto;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--muted);
  padding:8px 10px;
  border-radius: 999px;
  cursor:pointer;
  font-size:13px;
  white-space:nowrap;
}
.subtab.active{color:var(--text); border-color: rgba(91,140,255,.5); background: rgba(91,140,255,.08)}
.op-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  margin-top:4px;
  margin-bottom:-2px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}
.op-row span{font-size:12px; line-height:1}
.detail-top{
  position:sticky;
  top:0;
  z-index:6;
  padding:8px 0;
  background: rgba(11,12,16,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.search-center{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  margin: 26vh 0 18px;
}
.search-top.sticky{
  position:sticky;
  top:0;
  z-index:6;
  display:flex;
  gap:8px;
  padding:10px 0;
  background: rgba(11,12,16,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.toast{
  position:fixed;
  top:10px;
  left:50%;
  transform: translateX(-50%);
  z-index:12;
  background: rgba(17,19,26,.94);
  border:1px solid rgba(91,140,255,.45);
  color: var(--text);
  padding:10px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  max-width: min(560px, calc(100% - 24px));
  cursor:pointer;
  user-select:none;
}
