/* ダッシュボードのレイアウトとコンポーネント。色・角丸・フォントは tokens.css のトークンのみ参照する */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
}

/* 右上の言語トグル・右下の支援リンク（固定表示）と重ならないよう上下に余白を取る */
.page { max-width: 960px; margin: 0 auto; padding: 56px 24px 112px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ヘッダ */
.header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.header__brand { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.header__tagline { color: var(--text-muted); }

/* 案内バナー（Cloudflare ダッシュボードの青い情報バナーに倣う） */
.banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-top: 20px; padding: 14px 16px;
  background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: var(--radius);
}
.banner__text { margin: 0; flex: 1 1 320px; color: var(--accent); }

/* 合言葉入力欄 */
.key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.key__label { font-weight: 600; white-space: nowrap; }
.key__input {
  width: 200px; padding: 6px 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: inherit;
}
.key__clear {
  padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline;
}
.key__clear[hidden] { display: none; }
.key__status { font-size: 12px; color: var(--text-muted); }
.key__status--ok { color: var(--accent); }
.key__status--error { color: var(--danger); }

/* セクション */
.section { margin-top: 40px; }
.section__title { margin: 0; font-size: 18px; font-weight: 700; }
.section__sub { margin: 2px 0 16px; color: var(--text-muted); font-size: 13px; }

.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
.chip:hover { background: var(--surface-hover); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.empty { margin: 0; color: var(--text-muted); }

/* カード（フラット: 影は使わず 1px ボーダー。ホバーはボーダー色の変化のみ） */
.card {
  display: block; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
a.card:hover { border-color: var(--accent); background: var(--surface-hover); }
.card__head { display: flex; align-items: center; gap: 8px; }
.card__icon { font-size: 18px; line-height: 1; }
.card__title { margin: 0; font-size: 15px; font-weight: 700; }
.card__desc { margin: 8px 0 0; font-size: 13px; color: var(--text-muted); }
.card__meta { margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.card__meta-models { color: var(--text); font-weight: 600; }

.card__mono { font-family: var(--font-mono); font-size: 14px; font-weight: 700; word-break: break-all; }
.card__sub { margin-top: 6px; font-size: 13px; }
.card__sub .card__icon { margin-right: 6px; font-size: 14px; }
.card__category { color: var(--text-muted); }
.card__caps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* 能力バッジ。非対応は色だけでなく「—」と文言でも示す */
.cap {
  display: inline-flex; align-items: center; padding: 2px 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill); font-size: 12px;
}
.cap--on { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.cap--off { border-style: dashed; color: var(--text-muted); }
.cap__note { margin-left: 2px; }

/* Coming soon（薄表示・クリック不可） */
.card--planned { border-style: dashed; background: var(--surface-muted); color: var(--text-muted); cursor: not-allowed; }
.card--planned .card__title, .card--planned .card__mono { color: var(--text-muted); }
.badge {
  display: inline-block; margin-bottom: 8px; padding: 1px 10px;
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.badge--soon { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-muted); }

/* 読み込みエラー */
.error {
  margin-top: 24px; padding: 14px 16px;
  background: var(--danger-soft); border: 1px solid var(--danger-border); border-radius: var(--radius); color: var(--danger);
}
.error[hidden] { display: none; }
.error pre { margin: 8px 0 0; white-space: pre-wrap; font-family: var(--font-mono); font-size: 12px; }
