:root {
  --bg: #0f0f1a;
  --card: #1a1a2e;
  --accent: #e94560;
  --accent2: #0f3460;
  --text: #e8e8ef;
  --muted: #8888a0;
  --border: #2a2a40;
  --green: #2ecc71;
  --yellow: #f39c12;
  --blue: #3498db;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container { max-width: 960px; margin: 0 auto; padding: 20px; }

header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 30px;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 { font-size: 1.5rem; color: var(--accent); }
header h1 a { color: var(--accent); text-decoration: none; }
header nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.9rem;
  transition: color 0.2s;
}
header nav a:hover, header nav a.active { color: var(--text); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.card h2 { font-size: 1.2rem; margin-bottom: 16px; color: var(--accent); }

.report-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.report-item:last-child { border-bottom: none; }
.report-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.report-meta .profile {
  display: inline-block;
  background: var(--accent2);
  color: var(--blue);
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-right: 8px;
}
.report-text { font-size: 0.95rem; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

.msg {
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.msg-success { background: rgba(46, 204, 113, 0.15); color: var(--green); border: 1px solid rgba(46, 204, 113, 0.3); }
.msg-error { background: rgba(233, 69, 96, 0.15); color: var(--accent); border: 1px solid rgba(233, 69, 96, 0.3); }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.tab {
  padding: 8px 20px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.tab:hover { border-color: var(--accent); color: var(--text); }
.tab.active { background: var(--accent); color: white; border-color: var(--accent); }

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}
.empty-state p { font-size: 0.9rem; }

.schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.schedule-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--accent2);
}
.schedule-date {
  min-width: 80px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.schedule-date .day { font-size: 1.2rem; color: var(--text); display: block; }
.schedule-content { flex: 1; }
.schedule-profile {
  display: inline-block;
  background: var(--accent2);
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.char-counter {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.2s;
}
.char-counter.char-ok { color: var(--green); }
.char-counter.char-over { color: var(--accent); font-weight: bold; }

.report-type {
  display: inline-block;
  background: var(--accent2);
  color: var(--yellow);
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 8px;
}

.devlog-text {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #a8e6cf;
}

.devlog-date {
  color: var(--muted);
  margin-right: 4px;
}

.delete-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
  float: right;
}
.delete-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ═══ Help / Knowledge Base ═══ */
.help-layout { max-width: 800px; }
.help-title { font-size: 2rem; margin-bottom: 8px; }
.help-subtitle { color: var(--muted); margin-bottom: 40px; font-size: 1rem; }

.help-toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px;
  padding: 16px; background: var(--card); border-radius: 12px; border: 1px solid var(--border);
}
.help-toc a {
  padding: 6px 14px; border-radius: 8px; background: var(--bg);
  color: var(--text); text-decoration: none; font-size: 0.88rem; transition: 0.2s;
}
.help-toc a:hover { background: var(--accent2); color: white; }

.help-section {
  margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--border);
}
.help-section:last-child { border-bottom: none; }
.help-section h2 { font-size: 1.5rem; margin-bottom: 20px; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 0.75rem;
  vertical-align: middle; margin-left: 8px; font-weight: normal;
}
.tag-daily { background: rgba(46, 204, 113, 0.15); color: var(--green); }
.tag-devlog { background: rgba(52, 152, 219, 0.15); color: var(--blue); }
.tag-weekly { background: rgba(243, 156, 18, 0.15); color: var(--yellow); }
.tag-schedule { background: rgba(233, 69, 96, 0.15); color: var(--accent); }

.help-rules { margin-bottom: 24px; }
.rule { padding: 8px 0; border-bottom: 1px solid rgba(42, 42, 64, 0.5); font-size: 0.93rem; }
.rule:last-child { border-bottom: none; }

.help-steps { margin-bottom: 16px; }
.help-steps p { margin-bottom: 8px; font-size: 0.93rem; }

.code-block {
  background: #1a1a2e; border: 1px solid var(--border); border-radius: 10px;
  margin: 12px 0; overflow-x: auto;
}
.code-block pre {
  padding: 14px 18px; font-family: 'SF Mono','Fira Code','Cascadia Code',monospace;
  font-size: 0.85rem; line-height: 1.6; color: #a8e6cf; white-space: pre-wrap; word-break: break-word;
}

.help-example { margin-bottom: 12px; }
.example-label {
  font-size: 0.8rem; color: var(--muted); margin-bottom: 4px;
}

.help-hint { font-size: 0.8rem; color: var(--muted); margin-top: -4px; margin-bottom: 16px; }

.help-warn { color: var(--yellow); font-size: 0.85rem; }

.help-table {
  width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.9rem;
}
.help-table th, .help-table td {
  padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border);
}
.help-table th { background: var(--card); color: var(--muted); font-weight: 500; }
.help-table tr:last-child td { border-bottom: none; }
.help-table code { font-size: 0.85rem; }

.help-tip {
  padding: 14px 18px; background: rgba(52, 152, 219, 0.08); border: 1px solid rgba(52, 152, 219, 0.2);
  border-radius: 10px; font-size: 0.9rem; margin: 16px 0;
}

@media (max-width: 600px) {
  header .container { flex-direction: column; gap: 10px; }
  header nav a { margin: 0 10px; }
  .schedule-item { flex-direction: column; }
  .schedule-date { text-align: left; }
}
