
    /* index.css — ダッシュボード固有スタイル（共通スタイルはcommon.cssを参照） */

    html {
      height: 100%;
      overflow: hidden;
    }

    body {
      height: 100%;
      overflow: hidden;
    }

    /* index.cssのnav-linkはborderあり・inline-flex・gap付き */
    .nav-link {
      background: var(--card2);
      border: 1px solid var(--border);
      padding: 6px 14px;
      font-size: 12px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .nav-link:hover {
      border-color: var(--accent);
    }

    /* header-rightのgapはindex固有で16px */
    .header-right {
      gap: 16px;
    }

    .refresh-btn {
      background: var(--card2);
      border: 1px solid var(--border);
      color: var(--text-muted);
      padding: 6px 14px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: 12px;
      transition: all 0.2s;
    }

    .refresh-btn:hover {
      border-color: var(--accent);
      color: var(--text);
    }

    /* メインレイアウト */
    .main {
      max-width: 1400px;
      margin: 0 auto;
      padding: 24px;
    }

    .grid {
      display: grid;
      gap: 20px;
    }

    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }

    @media (max-width: 1024px) {
      .grid-3 { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 640px) {
      .grid-2, .grid-3 { grid-template-columns: 1fr; }
      .main { padding: 16px; }
    }

    /* カード */
    .card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
    }

    .card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .card-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .card-title-icon {
      font-size: 16px;
    }

    /* プログレスバー */
    .stat-item {
      margin-bottom: 14px;
    }

    .stat-item:last-child { margin-bottom: 0; }

    .stat-label {
      display: flex;
      justify-content: space-between;
      margin-bottom: 6px;
      font-size: 13px;
    }

    .stat-name { color: var(--text-muted); }

    .stat-value { color: var(--text); font-weight: 600; }

    .progress-bar {
      height: 6px;
      background: var(--card2);
      border-radius: 3px;
      overflow: hidden;
    }

    .progress-fill {
      height: 100%;
      border-radius: 3px;
      transition: width 0.6s ease;
    }

    .progress-fill.low { background: var(--green); }
    .progress-fill.mid { background: var(--yellow); }
    .progress-fill.high { background: var(--red); }

    /* サーバーステータスのサマリー */
    .server-meta {
      display: flex;
      gap: 16px;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
      flex-wrap: wrap;
    }

    .server-meta-item {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .server-meta-label { font-size: 11px; color: var(--text-dim); }
    .server-meta-value { font-size: 13px; color: var(--text); font-weight: 600; }

    /* キャラクター・配信設定 */
    .info-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
    }

    .info-item {
      background: var(--card2);
      border-radius: var(--radius-sm);
      padding: 12px;
    }

    .info-label { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
    .info-value { font-size: 14px; color: var(--text); font-weight: 600; }

    .tag-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 12px;
    }

    .tag {
      background: var(--accent-glow);
      border: 1px solid rgba(124, 58, 237, 0.3);
      color: var(--accent-light);
      padding: 3px 10px;
      border-radius: 20px;
      font-size: 12px;
    }

    .tag.green {
      background: rgba(34, 197, 94, 0.1);
      border-color: rgba(34, 197, 94, 0.3);
      color: var(--green);
    }

    /* APIキー */
    .key-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .key-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 14px;
      background: var(--card2);
      border-radius: var(--radius-sm);
      border: 1px solid transparent;
      transition: border-color 0.2s;
    }

    .key-item.configured { border-color: rgba(34, 197, 94, 0.15); }
    .key-item.not-configured { border-color: rgba(239, 68, 68, 0.15); }

    .key-label { font-size: 13px; color: var(--text); }
    .key-name { font-size: 11px; color: var(--text-dim); font-family: monospace; margin-top: 1px; }

    .key-status {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 12px;
      font-weight: 600;
    }

    .key-status.ok { color: var(--green); }
    .key-status.ng { color: var(--red); }

    /* エージェント */
    .agent-list {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
    }

    @media (max-width: 768px) {
      .agent-list { grid-template-columns: 1fr; }
    }

    .agent-card {
      background: var(--card2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 14px;
      transition: border-color 0.2s;
    }

    .agent-card:hover { border-color: var(--accent); }

    .agent-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 6px;
    }

    .agent-name {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      font-family: monospace;
    }

    .agent-role {
      font-size: 12px;
      color: var(--accent-light);
      margin-bottom: 6px;
    }

    .agent-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

    .agent-status {
      font-size: 11px;
      padding: 2px 8px;
      border-radius: 20px;
      white-space: nowrap;
    }

    .agent-status.active {
      background: rgba(34, 197, 94, 0.1);
      color: var(--green);
      border: 1px solid rgba(34, 197, 94, 0.3);
    }

    /* ログテーブル */
    .log-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }

    .log-table th {
      text-align: left;
      padding: 8px 10px;
      color: var(--text-dim);
      font-weight: 500;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }

    .log-table td {
      padding: 8px 10px;
      border-bottom: 1px solid rgba(42, 45, 62, 0.5);
      vertical-align: middle;
    }

    .log-table tr:last-child td { border-bottom: none; }

    .log-table tr:hover td { background: var(--card2); }

    .log-status {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
    }

    .log-status.success {
      background: rgba(34, 197, 94, 0.1);
      color: var(--green);
    }

    .log-status.error, .log-status.blocked {
      background: rgba(239, 68, 68, 0.1);
      color: var(--red);
    }

    .log-status.warning {
      background: rgba(234, 179, 8, 0.1);
      color: var(--yellow);
    }

    .log-time { color: var(--text-dim); white-space: nowrap; }
    .log-agent { color: var(--accent-light); font-family: monospace; }
    .log-action { color: var(--text); }

    /* チェックリスト */
    .checklist {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .check-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 14px;
      background: var(--card2);
      border-radius: var(--radius-sm);
      border: 1px solid transparent;
    }

    .check-item.done {
      border-color: rgba(34, 197, 94, 0.15);
      opacity: 0.7;
    }

    .check-item.todo {
      border-color: rgba(234, 179, 8, 0.2);
    }

    .check-icon {
      font-size: 16px;
      flex-shrink: 0;
      margin-top: 1px;
    }

    .check-text {
      flex: 1;
    }

    .check-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 2px;
    }

    .check-item.done .check-title {
      text-decoration: line-through;
      color: var(--text-dim);
    }

    .check-desc { font-size: 12px; color: var(--text-muted); }

    /* エラー・ローディング */
    .loading {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 40px;
      color: var(--text-muted);
    }

    .spinner {
      width: 20px;
      height: 20px;
      border: 2px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

    .error-msg {
      background: rgba(239, 68, 68, 0.08);
      border: 1px solid rgba(239, 68, 68, 0.2);
      border-radius: var(--radius-sm);
      padding: 12px 16px;
      color: var(--red);
      font-size: 13px;
    }

    .empty-msg {
      text-align: center;
      padding: 24px;
      color: var(--text-dim);
      font-size: 13px;
    }

    /* セクション見出し */
    .section-label {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--text-dim);
      margin-bottom: 12px;
    }

    /* 数値ハイライト */
    .big-stat {
      font-size: 28px;
      font-weight: 700;
      color: var(--text);
      line-height: 1;
    }

    .big-stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

    /* レスポンシブ微調整 */
    .scroll-x {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    /* スクロール可能なテーブルに最小幅を確保 */
    .scroll-x .log-table {
      min-width: 520px;
    }

    /* フッター */
    .footer-note {
      text-align: center;
      font-size: 11px;
      color: var(--text-dim);
      margin-top: 12px;
      padding-bottom: 24px;
    }

    /* =====================================================
       スマホ対応メディアクエリ (max-width: 640px)
    ===================================================== */
    @media (max-width: 640px) {

      /* ヘッダー: 2行レイアウトに変更 */
      .header {
        height: auto;
        padding: 10px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
      }

      .header-left {
        gap: 10px;
      }

      .header-title {
        font-size: 15px;
      }

      .header-subtitle {
        font-size: 11px;
      }

      /* ナビリンク・ステータス: 横スクロール可能な1行に */
      .header-right {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 2px;
        scrollbar-width: none;
      }

      .header-right::-webkit-scrollbar {
        display: none;
      }

      /* ナビリンク・ボタン: タッチしやすいサイズに */
      .nav-link,
      .refresh-btn {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
      }

      .status-badge {
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
        align-self: center;
      }

      /* メインコンテンツの余白調整 */
      .main {
        padding: 12px;
      }

      /* カードの余白縮小 */
      .card {
        padding: 14px;
      }

      .card-header {
        margin-bottom: 12px;
        flex-wrap: wrap;
        gap: 4px;
      }

      /* info-grid: 2列→1列 */
      .info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
      }

      .info-item {
        padding: 10px;
      }

      .info-value {
        font-size: 15px;
      }

      /* server-meta: 2列グリッドに整理 */
      .server-meta {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 12px;
        padding-top: 12px;
      }

      .server-meta-label {
        font-size: 11px;
      }

      .server-meta-value {
        font-size: 13px;
      }

      /* stat-label: 長い値が折り返せるように */
      .stat-label {
        flex-wrap: wrap;
        gap: 2px;
      }

      .stat-value {
        font-size: 12px;
        text-align: right;
      }

      /* key-item: 縦方向に並べる */
      .key-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 12px;
      }

      .key-status {
        font-size: 12px;
      }

      /* チェックリスト */
      .check-item {
        padding: 10px 12px;
      }

      .check-title {
        font-size: 13px;
      }

      .check-desc {
        font-size: 12px;
      }

      /* agent-card */
      .agent-card {
        padding: 12px;
      }

      .agent-name {
        font-size: 13px;
      }

      /* big-stat */
      .big-stat {
        font-size: 24px;
      }

      /* セクション見出し */
      .section-label {
        font-size: 11px;
      }

      /* ログテーブルのフォント */
      .log-table {
        font-size: 11px;
      }

      .log-table th,
      .log-table td {
        padding: 7px 8px;
      }

      /* tag */
      .tag {
        font-size: 12px;
        padding: 4px 10px;
      }

      /* フッター */
      .footer-note {
        padding-bottom: 16px;
      }
    }

    /* タブレット対応 (641px〜1024px) */
    @media (min-width: 641px) and (max-width: 1024px) {
      .header {
        padding: 0 16px;
      }

      .main {
        padding: 16px;
      }

      .info-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }
  
@keyframes gpuPulse{0%,100%{opacity:1}50%{opacity:.3}}
@keyframes gpuPulse{0%,100%{opacity:1}50%{opacity:.3}}
