/* リンちゃんツールキット 最小カスタム CSS（Tailwind CDN と併用） */
:root {
  --rin-pink: #ff7eb6;
  --rin-bg: #fafafa;
  --rin-text: #1f2937;
  --rin-muted: #6b7280;
  --rin-border: #e5e7eb;
}

html, body { height: 100%; margin: 0; }
body {
  background: var(--rin-bg);
  color: var(--rin-text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* レイアウト */
.app-shell { display: grid; grid-template-rows: 56px 1fr; height: 100vh; }
.app-header {
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--rin-border);
}
.app-header .brand { font-weight: 700; color: var(--rin-pink); }
.app-header nav a {
  margin-right: 12px; color: var(--rin-text); text-decoration: none;
  padding: 4px 8px; border-radius: 6px; font-size: 13px;
}
.app-header nav a.active { background: var(--rin-pink); color: #fff; }
.app-header .search-box {
  margin-left: auto; flex: 0 0 280px;
  padding: 6px 10px; border: 1px solid var(--rin-border); border-radius: 6px;
  font-size: 13px;
}

.app-body { display: grid; grid-template-columns: 280px 1fr; min-height: 0; }
.sidebar {
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--rin-border);
  padding: 12px;
}
.sidebar .cat-group { margin-bottom: 8px; }
.sidebar .cat-header {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar .cat-header:hover { background: #f3f4f6; }
.sidebar .cat-header .count { color: var(--rin-muted); font-weight: 400; font-size: 12px; }
.sidebar .cat-items { list-style: none; padding-left: 8px; margin: 4px 0; }
.sidebar .cat-items li a {
  display: block; padding: 4px 8px; border-radius: 4px;
  font-size: 13px; color: var(--rin-text); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar .cat-items li a:hover { background: #f3f4f6; }
.sidebar .cat-items li a.active { background: var(--rin-pink); color: #fff; }
.sidebar .cat-items.collapsed { display: none; }
.sidebar .dup { color: #d97706; font-size: 11px; margin-left: 4px; }
.sidebar .dep { color: #ef4444; font-size: 11px; margin-left: 4px; }

.content {
  overflow-y: auto;
  padding: 24px 32px;
  max-width: 900px;
}
.content h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.content h2 { font-size: 18px; font-weight: 700; margin-top: 24px; margin-bottom: 8px; }
.content h3 { font-size: 16px; font-weight: 600; margin-top: 16px; }
.content .meta {
  color: var(--rin-muted); font-size: 12px; margin-bottom: 16px;
}
.content .meta code { background: #f3f4f6; padding: 1px 4px; border-radius: 3px; }
.content pre {
  background: #1f2937; color: #f9fafb; padding: 12px;
  border-radius: 6px; overflow-x: auto; font-size: 12px;
}
.content code { font-family: "SF Mono", Menlo, Consolas, monospace; }
.content :not(pre) > code {
  background: #f3f4f6; padding: 1px 4px; border-radius: 3px; font-size: 12px;
}
.content ul, .content ol { padding-left: 24px; }
.content table { border-collapse: collapse; margin: 12px 0; }
.content table th, .content table td {
  border: 1px solid var(--rin-border); padding: 6px 10px; font-size: 13px;
}
.content blockquote {
  border-left: 3px solid var(--rin-pink); padding-left: 12px; color: var(--rin-muted);
  margin: 12px 0;
}
.empty {
  color: var(--rin-muted); padding: 40px; text-align: center;
}
