:root {
  --bg: #121417;
  --panel: #191c21;
  --line: #2a2f37;
  --text: #e8eaed;
  --muted: #9aa3ad;
  --accent: #6ddf7b;
  --danger: #ff6b6b;
  --warn: #f2b544;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}

.brand img { height: 26px; display: block; }

main { padding: 48px 24px 80px; }

.narrow { max-width: 520px; margin: 0 auto; }
.column { max-width: 760px; margin: 0 auto; }
.wide { max-width: 1080px; margin: 0 auto; }

h1 { font-size: 26px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.code-row { display: flex; gap: 10px; margin: 28px 0 20px; }
.code-row input {
  width: 56px;
  height: 64px;
  flex: 0 0 56px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 26px;
  text-align: center;
  text-transform: uppercase;
  outline: none;
}
.code-row input:focus { border-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0f1a12; }
.btn.primary:hover { background: #82e88f; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; font-weight: 500; }

.error { color: var(--danger); margin-top: 12px; }
.notice {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
}

.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.pill.open { color: var(--danger); border-color: var(--danger); }
.pill.lifted { color: var(--accent); border-color: var(--accent); }

.facts { width: 100%; border-collapse: collapse; margin-bottom: 32px; }
.facts th, .facts td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { color: var(--muted); font-weight: 500; width: 160px; }

section { margin-bottom: 36px; }

.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
.timeline time { color: var(--muted); font-size: 13px; padding-top: 2px; }
.timeline .body p { margin: 0; }
.quote { margin: 8px 0 0; padding-left: 12px; border-left: 2px solid var(--line); color: var(--muted); white-space: pre-wrap; }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.field input[type="text"], .field textarea, .field select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  outline: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--muted); }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.staff { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; }
.skin { width: 300px; height: 380px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); overflow: hidden; }
.skin canvas { display: block; }

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list .grow { flex: 1 1 auto; min-width: 0; }
.list .meta { color: var(--muted); font-size: 13px; }
.thumb { width: 96px; height: 64px; flex: 0 0 96px; background: #0e1013; border: 1px solid var(--line); border-radius: 4px; object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; cursor: pointer; }
img.thumb, video.thumb { padding: 0; }

.drop {
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}
.drop.over { border-color: var(--accent); color: var(--text); }
.progress { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: var(--accent); width: 0; }

.preview {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
}
.preview img, .preview video { max-width: 100%; max-height: 100%; }

@media (max-width: 860px) {
  .staff { grid-template-columns: 1fr; }
  .skin { width: 100%; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 16px; }
  main { padding: 32px 16px 64px; }
  .code-row { gap: 6px; }
  .code-row input { width: 46px; flex-basis: 46px; height: 56px; font-size: 22px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .facts th { width: 110px; }
}
