:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  background: #0f0f0f;
  color: #f1f1f1;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

body.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.welcome {
  max-width: 520px;
  text-align: center;
  padding: 40px 32px;
  background: #17171a;
  border: 1px solid #272727;
  border-radius: 16px;
}
.welcome h1 { font-size: 28px; margin: 0 0 16px 0; }
.welcome .lead { font-size: 15px; opacity: 0.85; line-height: 1.5; margin-bottom: 24px; }
.welcome .fine { font-size: 12px; opacity: 0.5; margin-top: 18px; }

.name-form { display: flex; gap: 8px; }
.name-form input {
  flex: 1;
  padding: 12px 14px;
  font-size: 15px;
  background: #0f0f12;
  color: #eee;
  border: 1px solid #2a2a2e;
  border-radius: 8px;
  outline: none;
}
.name-form input:focus { border-color: #3ea6ff; }
.name-form button {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  background: #2a3a55;
  color: #fff;
  border: 1px solid #35507a;
  border-radius: 8px;
  cursor: pointer;
}
.name-form button:hover { background: #35507a; }

.video-pane {
  width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  gap: 10px;
  border-right: 1px solid #272727;
  background: #0a0a0a;
}
.frame-wrap {
  width: 405px;
  height: 720px;
  max-height: calc(100vh - 70px);
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.frame-wrap iframe { width: 100%; height: 100%; border: 0; }
.open-link { color: #3ea6ff; font-size: 13px; text-decoration: none; }
.open-link:hover { text-decoration: underline; }

.meta-pane { flex: 1; overflow-y: auto; padding: 20px 24px; min-width: 0; }
.title { font-size: 18px; font-weight: 600; margin: 0 0 10px 0; line-height: 1.35; }
.channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #272727;
}
.channel-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff0000, #aa0000);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.channel-name { font-size: 14px; font-weight: 500; }
.og-cat { font-size: 11px; opacity: 0.6; }

.description {
  background: #1f1f1f;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 20px;
}
.description.empty { opacity: 0.5; font-style: italic; }
.tags { font-size: 11px; opacity: 0.7; margin-top: 8px; }
.tag {
  display: inline-block;
  background: #2a2a2a;
  border-radius: 4px;
  padding: 2px 6px;
  margin: 2px 3px 0 0;
}

.comments-header { font-size: 13px; font-weight: 600; margin: 0 0 10px 0; opacity: 0.8; }
.comment {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  border-bottom: 1px solid #1c1c1c;
}
.c-head { display: flex; gap: 6px; font-size: 10px; margin-bottom: 2px; }
.c-author { color: #f1f1f1; font-weight: 500; }
.c-date { color: #888; }
.c-body {
  font-size: 11px;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.35;
  color: #bbb;
}
.empty { opacity: 0.5; font-style: italic; font-size: 11px; }

.side {
  width: 360px;
  padding: 20px 18px;
  background: #17171a;
  border-left: 1px solid #272727;
  overflow-y: auto;
}
.progress {
  font-size: 11px;
  opacity: 0.6;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.done {
  background: #1c2a1c;
  color: #8fdc8f;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  display: none;
}
.view { display: none; }
.view.active { display: block; }
.view-title { font-size: 13px; font-weight: 600; margin: 0 0 10px 0; color: #ddd; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid-ai { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }

button {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #2a2a2e;
  border-radius: 6px;
  background: #202024;
  color: #eee;
  cursor: pointer;
  text-align: center;
  transition: background 0.1s;
}
button:hover { background: #2a2a30; border-color: #3a3a42; }
button:active { background: #151518; }
.wide { grid-column: span 2; }
.skip { background: #3a2f1a; border-color: #55431a; }
.skip:hover { background: #4a3b20; }
.nothing { background: #3a1a1a; border-color: #552020; }
.nothing:hover { background: #4a2020; }
.relevant {
  background: #c1121f;
  border-color: #e63946;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 8px;
  margin-top: 6px;
}
.relevant:hover { background: #e63946; border-color: #ff4d5a; }

.ai-btn { padding: 14px 10px; font-size: 13px; font-weight: 600; }
.ai-yes { background: #1e3a24; border-color: #2a5533; }
.ai-yes:hover { background: #265030; }
.ai-no { background: #2a2a2e; border-color: #3a3a42; }
.ai-no:hover { background: #35353b; }
.ai-unsure { background: #3a2f1a; border-color: #55431a; }
.ai-unsure:hover { background: #4a3b20; }

.back-btn {
  background: transparent;
  border: 1px solid #333;
  color: #aaa;
  margin-top: 12px;
  font-size: 11px;
  padding: 8px;
}
.back-btn:hover { background: #1f1f22; color: #eee; }

.custom-row { display: flex; gap: 6px; margin-top: 10px; }
.custom-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-size: 12px;
  background: #0f0f12;
  color: #eee;
  border: 1px solid #2a2a2e;
  border-radius: 6px;
  outline: none;
}
.custom-row input:focus { border-color: #3ea6ff; }
.custom-row button {
  padding: 8px 12px;
  font-size: 12px;
  background: #2a3a55;
  border-color: #35507a;
}
.custom-row button:hover { background: #35507a; }

.hints { margin-top: 16px; font-size: 11px; opacity: 0.5; line-height: 1.5; }
kbd {
  background: #2a2a2e;
  border: 1px solid #444;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal[hidden] { display: none; }
.modal-card {
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  border-radius: 16px;
  padding: 36px 40px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}
.modal-emoji { font-size: 56px; margin-bottom: 12px; }
.modal-card h2 { margin: 0 0 12px 0; font-size: 22px; }
.modal-card p { margin: 0 0 24px 0; line-height: 1.5; opacity: 0.85; }
.modal-card button {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  background: #2a3a55;
  border-color: #35507a;
  color: #fff;
}
.modal-card button:hover { background: #35507a; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #444; }
