/* ============================================================
   ai.kitemir.jp Neural 共通スタイル
   濃い色味 + コンパクトヘッダー
   ============================================================ */

:root {
  --neg: #ff5722;
  --pos: #1976d2;
  --neg-soft: #ffebe5;
  --pos-soft: #e3f2fd;
  --bg: #fafafa;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --sub: #555;
  --rule: #e0e0e0;
  --accent: #fbbc04;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Yu Gothic Medium", "Yu Gothic",
               "Meiryo", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

/* ============= コンパクトヘッダー (旧 playground の半分) ============= */
.aik-header {
  background: linear-gradient(135deg, var(--pos) 0%, #1565c0 100%);
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.aik-header__left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.aik-header__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
}
.aik-header__age {
  background: var(--accent);
  color: #1a1a1a;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}
.aik-header__nav {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
}
.aik-header__nav a {
  color: #fff;
  opacity: 0.85;
}
.aik-header__nav a:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 600px) {
  .aik-header { padding: 8px 12px; flex-wrap: wrap; gap: 6px; }
  .aik-header__title { font-size: 1rem; }
  .aik-header__age { font-size: 0.7rem; }
  .aik-header__nav { font-size: 0.75rem; gap: 8px; }
}

/* ============= 共通レイアウト ============= */
.aik-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}
.aik-card {
  background: var(--paper);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 14px;
}
.aik-card h2 {
  font-size: 1.05rem;
  margin: 0 0 10px;
  color: var(--pos);
  border-bottom: 2px solid var(--pos-soft);
  padding-bottom: 4px;
}

.aik-row { display: flex; gap: 14px; flex-wrap: wrap; }
.aik-col { flex: 1; min-width: 280px; }

.aik-canvas {
  display: block;
  width: 100%;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--rule);
}

.aik-svg {
  display: block;
  width: 100%;
  height: 240px;
  background: var(--paper);
  border-radius: 6px;
  border: 1px solid var(--rule);
}

/* ============= ボタン ============= */
.aik-btn {
  background: var(--pos);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.aik-btn:hover { background: #1565c0; }
.aik-btn:active { transform: translateY(1px); }
.aik-btn--secondary {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--rule);
}
.aik-btn--secondary:hover { background: #f5f5f5; }
.aik-btn--accent {
  background: var(--accent);
  color: #1a1a1a;
}
.aik-btn--accent:hover { background: #f59f00; }
.aik-btn--big {
  font-size: 1.3rem;
  padding: 14px 32px;
}

/* ============= データセット選択 ============= */
.aik-dataset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 8px;
}
.aik-dataset-thumb {
  cursor: pointer;
  background: var(--bg);
  border: 3px solid transparent;
  border-radius: 6px;
  padding: 4px;
  transition: border-color 0.15s, transform 0.15s;
}
.aik-dataset-thumb:hover {
  border-color: var(--pos-soft);
  transform: translateY(-2px);
}
.aik-dataset-thumb.active {
  border-color: var(--pos);
  background: var(--pos-soft);
}
.aik-dataset-thumb canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* ============= スライダー / セレクト ============= */
.aik-control { margin-bottom: 12px; }
.aik-control label {
  display: block;
  font-size: 0.85rem;
  color: var(--sub);
  margin-bottom: 4px;
  font-weight: 600;
}
.aik-control input[type=range] {
  width: 100%;
  accent-color: var(--pos);
}
.aik-control select {
  width: 100%;
  padding: 6px 10px;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
}

/* ============= 凡例・色サンプル ============= */
.aik-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--sub);
  margin-top: 8px;
}
.aik-legend__bar {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--neg) 0%, #f5f5f5 50%, var(--pos) 100%);
}
.aik-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 3px;
}
.aik-dot--neg { background: var(--neg); }
.aik-dot--pos { background: var(--pos); }

/* ============= メトリクス ============= */
.aik-metric {
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
}
.aik-metric strong { font-size: 1.4rem; color: var(--pos); }
.aik-metric--accent strong { color: var(--accent); }

/* ============= 解説テキスト ============= */
.aik-help {
  background: #fffde7;
  border-left: 4px solid var(--accent);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.92rem;
  margin-bottom: 12px;
  color: #5a4a00;
}
.aik-help strong { color: #b56500; }

/* ============= フッター ============= */
.aik-footer {
  text-align: center;
  padding: 16px;
  color: var(--sub);
  font-size: 0.82rem;
  border-top: 1px solid var(--rule);
  margin-top: 24px;
}
.aik-footer a { color: var(--sub); }
