/* =============================================
   style_toppage_20260506.css
   トップページ専用スタイル（2026-05-06 / 2026-07-17 統合修正版）
   目的: tools-list & details の中央寄せ強化 + レスポンシブ改善 + テーブル内アイコン統合
   ============================================= */

.center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* ツールリスト（常用・その他共通） */
.tools-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    padding: 0;
    list-style: none;
    margin: 16px auto;
    max-width: 860px;
}

.tools-list li {
    white-space: nowrap;
}

.tools-list li a {
    color: dodgerblue;
    text-decoration: none;
    font-size: 1.02em;
}

.tools-list li a:hover {
    color: mediumblue;
    text-decoration: underline;
}

/* details（折りたたみ部分）の中央寄せ強化 */
.tools-details {
    margin: 12px auto !important;
    max-width: 860px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px 0;
    border: 1px solid #eee;
}

.tools-details summary {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.08em;
    color: #333;
    text-align: center;
    padding: 10px 0;
    list-style: none; /* 三角を非表示にしたい場合はここを調整 */
}

.tools-details summary::-webkit-details-marker {
    display: none;
}

.tools-details .tools-list {
    justify-content: center !important;
    margin: 8px auto 16px auto !important;
    max-width: 820px;
}

/* 開いた時の視覚的区切り */
details[open] .tools-list {
    padding-top: 12px;
    border-top: 1px dashed #ccc;
}

/* その他 */
.last-update {
    color: #666;
    font-size: 0.95em;
    margin: 12px 0 20px 0;
}

.inline-controls {
    margin: 24px auto;
    max-width: 860px;
    text-align: center;
}

/* ブラウザ対応表まわりの調整 */
.map-section {
    margin: 30px auto;
    max-width: 960px;
}

/* ==================== レスポンシブ ==================== */
@media screen and (max-width: 767px) {
    .tools-list {
        gap: 10px 16px;
    }

    .tools-details {
        margin: 10px auto !important;
        max-width: 96%;
    }

    .tools-list li a {
        font-size: 0.98em;
    }

    .inline-controls {
        margin: 20px 8px;
    }
}

@media screen and (max-width: 480px) {
    .tools-list {
        gap: 8px 12px;
    }
}

/* === 2026-07-07 追加：文字サイズ調整・インライン回避 === */

/* h1を小さく（1.35remに） */
h1.center {
  font-size: 1.35rem !important;
  margin: 10px 0 6px !important;
  line-height: 1.3;
}

/* detailsのsummaryを小さく */
.tools-details summary {
  font-size: 0.88rem !important;
  font-weight: 600;
  color: #555;
}

/* インラインstyleの置き換え */
.bottom-nav {
  margin: 20px 0;
  text-align: center;
}
.bottom-nav a {
  margin: 0 12px;
}

.sitemap-link {
  font-weight: bold !important;
  color: #d32f2f !important;
}

.last-update {
  font-size: 0.82rem !important;
  color: #777 !important;
}

/* === 2026-07-17 追加：テーブル内作者アイコン用レイアウト === */
.table-author-flex {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    vertical-align: middle;
}

.table-author-icon {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #f5f5f5;
    flex-shrink: 0;
    vertical-align: middle;
}

/* === 文字が小さい問題 FIX 2026-08-04 pc-mode === */
body.pc-mode{ font-size:16px !important; line-height:1.7 !important; }
body.pc-mode .tools-list{ font-size:16px !important; }
body.pc-mode .tools-list a{ font-size:16px !important; padding:5px 10px !important; }
body.pc-mode #browser-table, body.pc-mode #links-table{ font-size:14px !important; }

/* ============================================================
   ブラウザ対応表デザイン改善
   ============================================================ */
#browser-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c-surface, #f8f9fa);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-size: 0.9em;
}

#browser-table thead th {
    background: var(--c-primary, #007bff);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
}

#browser-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--c-border, #e0e0e0);
    vertical-align: middle;
}

#browser-table tbody tr:hover {
    background: rgba(0, 123, 255, 0.05);
}

#browser-table tbody tr:last-child td {
    border-bottom: none;
}

/* リンクコンテナ（既存の.link-container を補完） */
#browser-table .link-container {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

#browser-table .link-container a {
    color: var(--c-primary, #007bff);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

#browser-table .link-container a:hover {
    background: rgba(0, 123, 255, 0.1);
    text-decoration: underline;
}

#browser-table .browser-name {
    font-weight: 600;
    color: var(--c-text, #333);
}

#browser-table img {
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#browser-table a:hover img {
    opacity: 1;
}

/* ダークモード対応 */
@media (prefers-color-scheme: light) {
    #browser-table {
        background: var(--c-surface, #2a2a2a);
    }
    #browser-table tbody td {
        border-bottom-color: var(--c-border, #444);
    }
    #browser-table tbody tr:hover {
        background: rgba(255,255,255,0.04);
    }
    #browser-table .link-container a {
        color: #6ea8fe;
    }
    #browser-table .browser-name {
        color: #e0e0e0;
    }
}

/* スマホ対応（横スクロール） */
@media (max-width: 640px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #browser-table {
        font-size: 0.75em;
    }
    #browser-table thead th,
    #browser-table tbody td {
        padding: 6px 8px;
    }
}
