:root{
  --bg:#000;
  --panel:#0b0b0b;
  --panel2:#0f0f0f;
  --text:#fff;
  --muted:rgba(255,255,255,.65);
  --border:rgba(255,255,255,.16);
  --accent:#fff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Helvetica,Arial;
  background:var(--bg);
  color:var(--text);
}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

.wrap{max-width:980px;margin:0 auto;padding:18px}

/* Навигация */
.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  background:linear-gradient(180deg, var(--panel), var(--panel2));
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
}
.nav .left,.nav .right{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

/* Пилюли/теги */
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
}

/* Карточки */
.card{
  margin-top:14px;
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

/* Заголовки */
h1,h2{margin:0 0 10px 0}
h2{font-size:20px}

/* Текст */
.muted{color:var(--muted)}
ul{padding-left:18px;margin:8px 0}
li{margin:6px 0}
label{display:block;margin:10px 0 6px}

/* User rows */
.user-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* Avatars/banners */
.mini-avatar{
  width:26px;
  height:26px;
  border-radius:999px;
  border:1px solid var(--border);
  object-fit:contain;
  background:rgba(0,0,0,.35);
}
.mini-avatar--empty{
  background:rgba(255,255,255,.05);
}
.mini-banner{
  width:160px;
  height:44px;
  border-radius:10px;
  border:1px solid var(--border);
  object-fit:cover;
}
.badge{
  width:18px;
  height:18px;
  border-radius:6px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  object-fit:cover;
}

/* Встроенные тултипы для бейджей */
.badge-wrap{
  position:relative;
  display:inline-flex;
  align-items:center;
  margin:2px;
  cursor:help;
}
.badge-wrap::after{
  content: attr(data-tip);
  position:absolute;
  left:50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding:6px 8px;
  border-radius:10px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.92);
  color:var(--text);
  font-size:12px;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease;
  z-index:999;
}
.badge-wrap::before{
  content:"";
  position:absolute;
  left:50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  border:6px solid transparent;
  border-top-color:rgba(0,0,0,.92);
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease;
  z-index:999;
}
.badge-wrap:hover::after,
.badge-wrap:hover::before{
  opacity:1;
}
.badge-wrap:focus::after,
.badge-wrap:focus::before{
  opacity:1;
}
.badge-wrap:focus-visible{
  outline:2px solid var(--border);
  outline-offset:3px;
  border-radius:10px;
}

/* Profile */
.profile-card{
  align-items:stretch;
}
.profile-banner{
  width:100%;
  height:140px;
  border-radius:14px;
  border:1px solid var(--border);
  overflow:hidden;
  background:rgba(255,255,255,.03);
}
.profile-banner img{width:100%;height:100%;object-fit:cover;display:block}
.profile-banner--empty{background:linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.02))}
.profile-head{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
  margin-top:12px;
  padding-left:0;
}
.profile-avatar{
  width:110px;
  height:110px;
  border-radius:14px;
  border:1px solid var(--border);
  overflow:visible;
  background:transparent;
}
.profile-avatar img{
  width:auto;
  height:auto;
  max-width:110px;
  max-height:110px;
  object-fit:contain;
  display:block;
}
.profile-avatar-fallback{width:100%;height:100%;background:rgba(255,255,255,.06)}
.profile-title h2{
  margin:6px 0 0 0;
  font-size:20px;
  color:var(--text);
  text-align:center;
}
.profile-bio{
  margin-top:6px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  line-height:1.4;
}

/* Формы */
input,select,textarea{
  width:100%;
  padding:10px 11px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--text);
  outline:none;
}
textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace}

/* Кнопки */
button{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:#000;
  cursor:pointer;
}
.pill button{background:#fff;color:#000}
button:hover{background:rgba(255,255,255,.85)}

/* Ошибки */
.error{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.07);
  color:var(--text);
}

/* Метаданные */
.meta{display:flex;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:13px}

/* Код */
pre.code{
  overflow:auto;
  background:rgba(0,0,0,.25);
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  white-space:pre-wrap;
  word-break:break-word;
}

/* ASCII логотип */
pre.logo{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;
  font-size: 8px;
  line-height: 0.9;
  text-align: center;
  overflow:auto;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  margin:0;
}
