/* ============================================================
   夜のボイスチャットロビー — dark-first design
   themes: dark (default) / light / sakura
   ============================================================ */

:root,
[data-theme="dark"] {
  --bg: #10121b;
  --bg-deep: #0b0d14;
  --surface: #181b28;
  --surface-2: #1f2333;
  --surface-3: #272c40;
  --border: #262b3e;
  --text: #e8eaf2;
  --text-muted: #8b90a5;
  --accent: #8b7cff;
  --accent-strong: #a89bff;
  --accent-soft: rgba(139, 124, 255, 0.14);
  --cta: linear-gradient(135deg, #8b7cff 0%, #5ea8ff 100%);
  --cta-shadow: 0 4px 20px rgba(110, 124, 255, 0.35);
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --chip: #232840;
  --glow: radial-gradient(ellipse 60% 40% at 50% -10%, rgba(139,124,255,.18), transparent 70%);
}

[data-theme="light"] {
  --bg: #f4f5fa;
  --bg-deep: #e9ebf4;
  --surface: #ffffff;
  --surface-2: #f2f3f9;
  --surface-3: #e8eaf4;
  --border: #dfe2ee;
  --text: #23263a;
  --text-muted: #6d7288;
  --accent: #6a5cf5;
  --accent-strong: #5546e0;
  --accent-soft: rgba(106, 92, 245, 0.1);
  --cta: linear-gradient(135deg, #6a5cf5 0%, #3d8bfd 100%);
  --cta-shadow: 0 4px 16px rgba(106, 92, 245, 0.28);
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --chip: #eceef8;
  --glow: radial-gradient(ellipse 60% 40% at 50% -10%, rgba(106,92,245,.10), transparent 70%);
}

[data-theme="sakura"] {
  --bg: #fdf3f6;
  --bg-deep: #f9e8ee;
  --surface: #ffffff;
  --surface-2: #fbeef3;
  --surface-3: #f6e2ea;
  --border: #f0d8e2;
  --text: #43303b;
  --text-muted: #96798a;
  --accent: #e05c8a;
  --accent-strong: #c74675;
  --accent-soft: rgba(224, 92, 138, 0.1);
  --cta: linear-gradient(135deg, #e05c8a 0%, #f08bab 100%);
  --cta-shadow: 0 4px 16px rgba(224, 92, 138, 0.3);
  --ok: #2f9e63;
  --warn: #d97706;
  --danger: #dc2626;
  --chip: #f7e4ec;
  --glow: radial-gradient(ellipse 60% 40% at 50% -10%, rgba(224,92,138,.12), transparent 70%);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image: var(--glow);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
main.main { flex: 1; padding: 20px 0 48px; }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .logo {
  font-family: "M PLUS Rounded 1c", "Zen Kaku Gothic New", sans-serif;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 56px; }
.logo {
  font-weight: 800; font-size: 19px; letter-spacing: .02em;
  background: var(--cta);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
a.logo:hover { text-decoration: none; filter: brightness(1.15); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 6px 12px; border-radius: 999px; color: var(--text-muted);
  font-weight: 500; font-size: 14px;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-avatar img { border-radius: 50%; display: block; border: 2px solid var(--accent); }
.theme-btn {
  border: none; background: none; color: var(--text-muted); font-size: 18px;
  cursor: pointer; padding: 4px 6px; border-radius: 8px;
}
.theme-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 14px;
  padding: 9px 18px; transition: transform .12s ease, filter .12s ease;
  text-decoration: none !important;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--cta); color: #fff; box-shadow: var(--cta-shadow); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }

/* フレンド申請ボタン: このサイトの主役 */
.btn-friend {
  background: var(--cta); color: #fff; box-shadow: var(--cta-shadow);
  position: relative;
}
.btn-friend::before { content: "⚡"; font-size: 13px; }
/* コピー済み（この募集には申請アクション済み） */
.btn-friend--done {
  background: var(--surface-3); color: var(--text-muted);
  box-shadow: none;
}
.btn-friend--done::before { content: "✓"; }

/* ---------- layout: index ---------- */
.page-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) {
  .page-grid { grid-template-columns: 1fr 300px; align-items: start; }
  .sidebar { position: sticky; top: 72px; }
}

.hero { padding: 18px 0 6px; }
.hero h1 { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.hero p { color: var(--text-muted); margin: 0; font-size: 13.5px; }
.hero .accent { color: var(--accent-strong); }

/* ---------- filter ---------- */
.filter-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px 16px; margin: 14px 0 18px;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-row + .filter-row { margin-top: 8px; }
.filter-card select, .filter-card input[type="text"] {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 10px; font-family: inherit; font-size: 13.5px;
  min-width: 0;
}
.filter-card input[type="text"] { flex: 1 1 140px; }
.filter-card select:focus, .filter-card input:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent;
}
.filter-check {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--text-muted); cursor: pointer; padding: 6px 4px;
}
.tag-scroller {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px;
  scrollbar-width: none;
}
.tag-scroller::-webkit-scrollbar { display: none; }

/* ---------- 件数バッジと使い方3ステップ ---------- */
.hero-count {
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 12px; margin-left: 8px;
  vertical-align: middle; white-space: nowrap;
}
.hero-count strong { color: var(--accent-strong); font-size: 14px; }
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); margin-right: 6px; vertical-align: 1px;
  animation: live-pulse 2s ease infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); }
  50% { box-shadow: 0 0 0 5px transparent; }
}

.howto {
  position: relative;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 14px; padding: 12px 40px 12px 16px; margin: 12px 0;
}
.howto-steps {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-size: 13px; font-weight: 500;
}
.howto-steps b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px;
  margin-right: 6px;
  font-family: "M PLUS Rounded 1c", sans-serif;
}
.howto-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: var(--text-muted);
  font-size: 14px; cursor: pointer; padding: 4px;
}
.howto-close:hover { color: var(--text); }

/* ---------- 人気タグ（トップの目立つ位置） ---------- */
.top-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 4px 0 6px;
}
.tag-chip--big {
  font-size: 13.5px; font-weight: 700;
  padding: 7px 15px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1.5px solid color-mix(in srgb, var(--accent) 60%, transparent);
}
.tag-chip--big .count {
  color: var(--text); font-size: 11.5px; font-weight: 700;
  margin-left: 4px; opacity: .75;
}
.tag-chip--big:hover {
  background: color-mix(in srgb, var(--accent) 28%, var(--surface));
  border-color: var(--accent);
  color: var(--text);
}
@media (max-width: 640px) {
  .top-tags {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: -16px; padding-inline: 16px;
  }
  .top-tags::-webkit-scrollbar { display: none; }
  .tag-chip--big { flex-shrink: 0; }
}

/* ---------- tags / chips ---------- */
.tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--chip); color: var(--text);
  padding: 4px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
}
a.tag-chip:hover { border-color: var(--accent); color: var(--accent-strong); text-decoration: none; }
.tag-chip--active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.tag-chip .count { color: var(--text-muted); font-size: 11px; }

/* ---------- post card ---------- */
.post-list {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  align-items: start;
}
@media (min-width: 900px) {
  .post-list { grid-template-columns: 1fr 1fr; }
}
.post-list .ad-slot { grid-column: 1 / -1; }
.post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px;
  transition: border-color .15s ease;
}
.post-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* 性別による色分け（男性=青系 / 女性=ピンク系） */
.post-card--male {
  border-left: 4px solid #4f95ff;
  border-color: color-mix(in srgb, #4f95ff 35%, var(--border));
  border-left-color: #4f95ff;
  background: color-mix(in srgb, #4f95ff 12%, var(--surface));
}
.post-card--female {
  border-left: 4px solid #f0699f;
  border-color: color-mix(in srgb, #f0699f 35%, var(--border));
  border-left-color: #f0699f;
  background: color-mix(in srgb, #f0699f 13%, var(--surface));
}
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--cta); display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 17px;
  font-family: "M PLUS Rounded 1c", sans-serif;
  overflow: hidden;
}
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-names { min-width: 0; flex: 1; }
.post-display-name {
  font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px;
}
.post-display-name a { color: var(--text); }
.post-discord-tag { color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.badge-verified {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--ok); font-size: 11px; font-weight: 700;
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  padding: 1px 8px; border-radius: 999px;
}
.fresh-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 6px var(--ok); flex-shrink: 0;
}
.post-time { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.post-body { margin: 6px 0 10px; white-space: pre-line; overflow-wrap: anywhere; }
.post-body--clamp {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.meta-chip {
  font-size: 11.5px; color: var(--text-muted);
  background: var(--surface-2); padding: 2px 10px; border-radius: 999px;
  border: 1px solid transparent;
}
a.meta-chip:hover {
  border-color: var(--accent); color: var(--accent-strong); text-decoration: none;
}
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.post-actions .spacer { flex: 1; }
.report-btn {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 12px; font-family: inherit; padding: 4px;
}
.report-btn:hover { color: var(--danger); }

/* ---------- sidebar ---------- */
.side-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px; margin-bottom: 16px;
}
.side-card h2 { font-size: 14px; margin: 0 0 10px; color: var(--text-muted); font-weight: 700; }
.side-card .tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.side-list { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.side-list a { color: var(--text); }
.side-list .date { color: var(--text-muted); font-size: 11.5px; display: block; }

/* ---------- forms ---------- */
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px; max-width: 640px; margin-inline: auto;
}
.form-card h1 { font-size: 20px; margin: 0 0 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.field input[type="text"], .field textarea, .field select {
  width: 100%; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-family: inherit; font-size: 14.5px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-picker input { position: absolute; opacity: 0; pointer-events: none; }
.tag-picker label {
  cursor: pointer;
  background: var(--chip); padding: 5px 14px; border-radius: 999px;
  font-size: 13px; border: 1px solid transparent; user-select: none;
}
.tag-picker input:checked + span { color: var(--accent-strong); font-weight: 700; }
.tag-picker label:has(input:checked) {
  background: var(--accent-soft); border-color: var(--accent);
}
.errors {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  color: var(--danger);
  border-radius: 12px; padding: 10px 16px; margin-bottom: 16px; font-size: 13.5px;
}
.errors ul { margin: 0; padding-left: 18px; }
.notice-ok {
  background: color-mix(in srgb, var(--ok) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
  color: var(--ok); border-radius: 12px; padding: 10px 16px; margin-bottom: 16px;
  font-size: 13.5px;
}
/* 任意項目の折りたたみ */
.optional-field summary {
  cursor: pointer; color: var(--text-muted); font-size: 13.5px; font-weight: 700;
}
.optional-field summary:hover { color: var(--accent-strong); }

/* ハニーポット */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- server card ---------- */
.server-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: var(--surface-3); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.server-icon img { width: 100%; height: 100%; object-fit: cover; }
.server-counts { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
.server-counts .online::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); margin-right: 4px;
}
.invite-preview {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface-2); border-radius: 12px; padding: 12px; margin-top: 8px;
}
.invite-preview.invalid { color: var(--danger); font-size: 13px; }

/* ---------- pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 22px; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 10px; font-size: 13.5px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pagination a:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- detail page ---------- */
.detail-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px; margin-bottom: 20px;
}
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.detail-head .post-avatar { width: 56px; height: 56px; font-size: 22px; }
.detail-title { font-size: 18px; font-weight: 800; margin: 0; }
.detail-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px;
}
.copy-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px dashed var(--border);
  border-radius: 12px; padding: 8px 14px; font-size: 14px;
}
.copy-box code { font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.breadcrumb { font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--text-muted); }
.section-title { font-size: 16px; font-weight: 800; margin: 26px 0 12px; }

/* ---------- static pages / articles ---------- */
.article {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 28px; max-width: 760px; margin-inline: auto;
}
.article h1 { font-size: 22px; margin-top: 0; }
.article h2 { font-size: 17px; margin-top: 28px; border-left: 4px solid var(--accent); padding-left: 10px; }
.article ol, .article ul { padding-left: 22px; }
.article .lead { color: var(--text-muted); }

/* ---------- report modal ---------- */
dialog.modal {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 18px;
  padding: 22px; width: min(420px, calc(100vw - 40px));
}
dialog.modal::backdrop { background: rgba(6, 8, 15, 0.6); backdrop-filter: blur(2px); }
dialog.modal h2 { margin: 0 0 12px; font-size: 16px; }
.modal-close { float: right; background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.radio-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.radio-list label { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 10px 22px; font-size: 14px; font-weight: 500; z-index: 100;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
  animation: toast-in .25s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- ads ---------- */
.ad-slot { margin: 16px 0; text-align: center; min-height: 90px; }
.ad-slot .ad-label { font-size: 10px; color: var(--text-muted); letter-spacing: .1em; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-deep);
  padding: 32px 0; margin-top: 40px;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.logo--footer { font-size: 16px; }
.footer-note { color: var(--text-muted); font-size: 12px; max-width: 320px; }
.footer-cols { display: flex; gap: 48px; }
.footer-cols h3 { font-size: 12.5px; color: var(--text-muted); margin: 0 0 10px; }
.footer-cols a { display: block; color: var(--text); font-size: 13.5px; margin-bottom: 8px; }

/* ---------- admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); border-radius: 12px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.admin-table th { color: var(--text-muted); font-weight: 700; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.stat-card .num { font-size: 24px; font-weight: 800; font-family: "M PLUS Rounded 1c", sans-serif; }
.stat-card .label { font-size: 12px; color: var(--text-muted); }
.status-pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.status-active { color: var(--ok); }
.status-hidden { color: var(--warn); }
.status-banned, .status-deleted { color: var(--danger); }

/* ---------- MBTI ---------- */
.quiz-q { margin-bottom: 18px; }
.quiz-q-title { font-weight: 700; font-size: 14.5px; margin-bottom: 8px; }
.quiz-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz-choice {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; font-size: 13.5px;
}
.quiz-choice:hover { border-color: var(--accent); }
.quiz-choice:has(input:checked) {
  background: var(--accent-soft); border-color: var(--accent); font-weight: 700;
}
.quiz-choice input { accent-color: var(--accent); }
.type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.type-card {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; color: var(--text);
  transition: border-color .15s ease, transform .12s ease;
}
.type-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.type-code {
  font-family: "M PLUS Rounded 1c", sans-serif; font-weight: 800; font-size: 17px;
  background: var(--cta); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.type-name { font-weight: 700; font-size: 13px; }
.type-tagline { font-size: 11.5px; color: var(--text-muted); }
.type-stars { color: var(--warn); font-size: 13px; letter-spacing: 2px; }
.pair-head { display: flex; justify-content: center; align-items: center; gap: 18px; margin-bottom: 10px; }
.pair-type {
  display: flex; flex-direction: column; color: var(--text); min-width: 110px;
}
.pair-type strong {
  font-family: "M PLUS Rounded 1c", sans-serif; font-size: 26px;
  background: var(--cta); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pair-type span { font-size: 12.5px; color: var(--text-muted); }
.pair-x { font-size: 20px; color: var(--text-muted); }
.pair-stars { font-size: 34px; color: var(--warn); letter-spacing: 6px; margin: 6px 0 2px; }
.pair-score { font-weight: 800; font-family: "M PLUS Rounded 1c", sans-serif; }
.compat-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--accent-strong); border-radius: 999px;
  padding: 4px 14px; font-size: 12.5px; font-weight: 700;
}
.compat-badge:hover { text-decoration: none; filter: brightness(1.1); }
.compat-badge .stars { color: var(--warn); letter-spacing: 1px; }

/* ---------- 削除キー ---------- */
.delkey-box { margin-top: 14px; font-size: 13px; }
.delkey-box summary { color: var(--text-muted); cursor: pointer; }
.delkey-box summary:hover { color: var(--text); }
.delkey-form { display: flex; gap: 8px; margin-top: 10px; }
.delkey-form input {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px; font-family: inherit; width: 200px;
}

/* ---------- misc ---------- */
.empty-state {
  text-align: center; padding: 48px 16px; color: var(--text-muted);
  background: var(--surface); border: 1px dashed var(--border); border-radius: 16px;
}
.page-title { font-size: 21px; font-weight: 800; margin: 8px 0 16px; }
.inline-form { display: inline; }

@media (max-width: 640px) {
  /* ナビは隠さず、ヘッダー2段目の横スクロール帯にする */
  .header-inner {
    flex-wrap: wrap; height: auto; padding-top: 10px; gap: 8px;
  }
  .nav {
    order: 10; flex-basis: 100%;
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    padding-bottom: 8px; margin-top: -2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; flex-shrink: 0; background: var(--surface-2); }
  .field-row { grid-template-columns: 1fr; }
  .footer-cols { gap: 28px; }
  .detail-actions .btn { flex: 1 1 auto; }
}
