.aip { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.aip-card { background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 16px; }
.aip-title { margin: 0 0 8px; font-size: 18px; }
.aip-desc { margin: 0 0 12px; color: rgba(0,0,0,.65); }
.aip-field { margin: 12px 0; }
.aip-label { display: block; font-weight: 600; margin: 0 0 6px; }
.aip-input, .aip-textarea, .aip-input[type="file"], select.aip-input { width: 100%; box-sizing: border-box; border: 1px solid rgba(0,0,0,.18); border-radius: 10px; padding: 10px 12px; background: #fff; }
.aip-input[type="file"] { padding: 8px 12px; cursor: pointer; }
.aip-input[type="file"]::-webkit-file-upload-button { border: 0; border-radius: 6px; padding: 6px 12px; background: #f3f4f6; cursor: pointer; margin-right: 12px; }
.aip-input[type="file"]::-webkit-file-upload-button:hover { background: #e5e7eb; }
.aip-textarea { resize: vertical; min-height: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
select.aip-input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.aip-help { margin-top: 6px; color: rgba(0,0,0,.6); font-size: 12px; }
.aip-actions { margin-top: 12px; display: flex; gap: 8px; }
.aip-btn { appearance: none; border: 0; border-radius: 999px; background: #111827; color: #fff; padding: 10px 14px; font-weight: 700; cursor: pointer; }
.aip-btn:hover { opacity: .92; }
.aip-alert { border-radius: 10px; padding: 10px 12px; margin: 10px 0 12px; }
.aip-alert--error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.aip-result { line-height: 1.8; color: #1f2937; padding: 24px; background: #ffffff; border-radius: 12px; }
.aip-result h1 { font-size: 28px; font-weight: 700; margin: 32px 0 20px; padding-bottom: 12px; color: #111827; }
.aip-result h1:first-child { margin-top: 0; }
.aip-result h2 { font-size: 22px; font-weight: 700; margin: 28px 0 16px; padding: 12px 16px; background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);  color: #1f2937; border-radius: 4px; }
.aip-result h3 { font-size: 18px; font-weight: 600; margin: 20px 0 12px; padding-left: 8px;  color: #374151; }
.aip-result h4 { font-size: 16px; font-weight: 600; margin: 16px 0 10px; color: #4b5563; }
.aip-result h5 { font-size: 14px; font-weight: 600; margin: 14px 0 8px; color: #6b7280; }
.aip-result .aip-paragraph { margin: 12px 0; line-height: 1.8; color: #374151; }
.aip-result .aip-list { margin: 16px 0 16px 24px; padding-left: 0; list-style: none; }
.aip-result .aip-list li { margin: 8px 0; line-height: 1.8; padding-left: 24px; position: relative; color: #374151; }
.aip-result .aip-list li:before { content: "▸"; position: absolute; left: 0; color: #667eea; font-weight: bold; }
.aip-result .aip-list ul, .aip-result .aip-list ol { margin: 12px 0 12px 24px; }
.aip-result .aip-list ol { counter-reset: item; list-style: none; }
.aip-result .aip-list ol li { counter-increment: item; }
.aip-result .aip-list ol li:before { content: counter(item) ". "; position: absolute; left: 0; color: #667eea; font-weight: bold; }
.aip-result .aip-code { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px; margin: 12px 0; overflow-x: auto; }
.aip-result .aip-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 13px; color: #1f2937; }
.aip-result strong { font-weight: 600; color: #111827; background: linear-gradient(transparent 60%, #fef3c7 60%); }
.aip-result em { font-style: italic; color: #4b5563; }
.aip-result .aip-table { width: 100%; border-collapse: collapse; margin: 20px 0; border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.aip-result .aip-table thead { background: #f9fafb; }
.aip-result .aip-table th { color: #111827 !important; font-weight: 700; padding: 14px 16px; text-align: left; border-right: 1px solid #e5e7eb; border-bottom: 2px solid #d1d5db; font-size: 14px; }
.aip-result .aip-table th:last-child { border-right: none; }
/* 「2. アクセスが多いキーワード」セクションのテーブルヘッダーも黒文字 */
.aip-result .aip-keyword-table thead { background: #f9fafb !important; }
.aip-result .aip-keyword-table th { color: #111827 !important; font-weight: 700; }
.aip-result .aip-table th:last-child { border-right: none; }
.aip-result .aip-table tbody { background: #ffffff; }
.aip-result .aip-table td { padding: 12px 16px; border-bottom: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; color: #374151; font-size: 14px; }
.aip-result .aip-table td:last-child { border-right: none; }
.aip-result .aip-table tbody tr:last-child td { border-bottom: none; }
.aip-result .aip-table tbody tr:nth-child(even) { background: #f9fafb; }
.aip-result .aip-table tbody tr:hover { background: #f3f4f6; transition: background 0.2s; }
.aip-result .aip-table tbody tr:hover td { background: transparent; }
