* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Yu Gothic UI", "Meiryo", sans-serif;
  background: #f5f7fa;
  color: #1f2937;
  line-height: 1.6;
}
.header {
  background: #1e3a8a;
  color: #fff;
  padding: 12px 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 12px;
}
.header h1 { margin: 0; font-size: 20px; font-weight: 600; }
.nav a {
  color: #dbeafe;
  margin-left: 16px;
  text-decoration: none;
  font-size: 14px;
}
.nav a:hover,
.nav a.active {
  color: #fff;
  text-decoration: underline;
}
.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}
.card {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
h2 {
  margin-top: 0;
  color: #1e3a8a;
  border-bottom: 2px solid #eff6ff;
  padding-bottom: 8px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.tile {
  display: block;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all .15s;
}
.tile:hover {
  border-color: #1e3a8a;
  background: #eff6ff;
  transform: translateY(-2px);
}
.tile-icon { font-size: 32px; }
.tile-title { font-weight: 600; margin-top: 8px; }
.tile-desc {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}
.info {
  margin-top: 16px;
  padding: 10px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 14px;
  color: #4b5563;
}
.muted { color: #6b7280; font-size: 14px; }
.actions {
  margin: 16px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.btn {
  display: inline-block;
  padding: 8px 16px;
  background: #e5e7eb;
  color: #1f2937;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover { background: #d1d5db; }
.btn-primary { background: #1e3a8a; color: #fff; }
.btn-primary:hover { background: #1e40af; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
input[type=file],
input[type=number],
input[type=text],
textarea {
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
input[type=file],
input[type=text],
textarea { width: 100%; }
textarea { resize: vertical; }
.result,
.answer {
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-left: 3px solid #1e3a8a;
  border-radius: 4px;
  white-space: pre-wrap;
  font-size: 14px;
}
.answer { min-height: 40px; }
.sources { margin-top: 16px; }
.source {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.source-head {
  font-size: 13px;
  color: #1e3a8a;
  margin-bottom: 4px;
}
.source-snippet {
  color: #4b5563;
  font-size: 12px;
  white-space: pre-wrap;
  background: #fff;
  padding: 6px;
  border-radius: 4px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}
.table th,
.table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
}
.table th {
  background: #f9fafb;
  color: #374151;
  font-weight: 600;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}
.badge-ok { background: #d1fae5; color: #065f46; }
.badge-warn { background: #fef3c7; color: #92400e; }
.logs {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 6px;
  max-height: 600px;
  overflow-y: auto;
  font-size: 12px;
  font-family: "Consolas", "Courier New", monospace;
  white-space: pre-wrap;
  margin-top: 12px;
}
code {
  background: #eff6ff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ===== SKYM Library ブランディング ===== */
.subtitle-badge {
  display: inline-block;
  font-size: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 3px 10px;
  border-radius: 12px;
  margin-left: 8px;
  font-weight: 500;
  vertical-align: middle;
}
.header h1 {
  letter-spacing: 0.3px;
}

/* JOB依頼タイル（フィーチャー） */
.tile-feature {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: #fff;
  border: none;
  grid-column: span 2;
}
.tile-feature .tile-title { color: #fff; }
.tile-feature .tile-desc { color: #dbeafe; }
.tile-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(30,58,138,0.3);
}
