* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  margin: 0;
  background: #f6f7f9;
  color: #1a1a1a;
}
header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
h1 { margin: 0; font-size: 20px; }
h2 { margin: 0; font-size: 18px; }
main { padding: 24px; max-width: 1100px; margin: 0 auto; }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.row h2 { flex: 1; }
.row.centered { justify-content: center; margin-top: 8px; }
input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}
button {
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
button:hover { background: #f3f4f6; }
button.primary { background: #2563eb; color: #fff; border-color: #2563eb; }
button.primary:hover { background: #1d4ed8; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.warn { color: #92400e; background: #fef3c7; padding: 4px 10px; border-radius: 4px; }
.ok { color: #065f46; background: #d1fae5; padding: 4px 10px; border-radius: 4px; }
.btn { padding: 6px 12px; background: #2563eb; color: #fff; border-radius: 6px;
  text-decoration: none; font-size: 14px; }

#videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.video-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.video-card:hover { border-color: #2563eb; }
.video-card img { width: 100%; border-radius: 4px; display: block; margin-bottom: 8px; }
.video-card .title {
  font-size: 14px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
}
.video-banner:hover { border-color: #2563eb; }
.video-banner img {
  width: 240px;
  border-radius: 6px;
  display: block;
}
.video-banner h2 { margin: 0; flex: 1; }

.comment {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}
.meta-link {
  margin-left: auto;
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
}
.meta-link:hover { text-decoration: underline; }
.comment-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.author { font-weight: 600; }
.meta { color: #6b7280; font-size: 12px; }
.badge {
  font-size: 11px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e5e7eb;
  color: #374151;
}
.badge.technical_issue { background: #fee2e2; color: #991b1b; }
.badge.question { background: #dbeafe; color: #1e40af; }
.badge.personal_story { background: #ede9fe; color: #5b21b6; }
.badge.appreciation { background: #d1fae5; color: #065f46; }
.badge.feedback { background: #fef3c7; color: #92400e; }
.badge.spam { background: #f3f4f6; color: #6b7280; }
.badge.priority {
  background: #fef9c3; color: #713f12;
}
.badge.priority.high { background: #fecaca; color: #991b1b; }
.summary { color: #4b5563; font-size: 13px; font-style: italic; margin-bottom: 8px; }
.text { white-space: pre-wrap; margin-bottom: 12px; }
.draft-area { margin-top: 12px; }
.draft-area textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font: inherit;
  resize: vertical;
}
.draft-actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.sent { color: #065f46; font-size: 13px; }
.autosave-hint { color: #9ca3af; font-size: 12px; font-style: italic; }
.cost-note { color: #9ca3af; font-size: 12px; white-space: nowrap; }
.reply-model {
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}
#status { color: #6b7280; font-size: 13px; margin-left: auto; }

.header-actions { display: flex; gap: 12px; align-items: center; }
.auth-status { font-size: 13px; }
.auth-link { font-size: 13px; color: #2563eb; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

.login-wrap {
  max-width: 360px;
  margin: 80px auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 28px;
}
.login-wrap h1 { font-size: 20px; margin: 0 0 16px; }
.login-wrap form { display: flex; flex-direction: column; gap: 12px; }
.login-wrap input[type="password"] {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}
.login-error { color: #991b1b; font-size: 13px; margin: 0; }
