/* ===========================================================
   costume.html 専用スタイル（衣装一覧）
   規格：costume-pages-survey.md 末節「可借用的模式」1〜3
     ・一覧はカード格状（桌機 4／900 以下 3／600 以下 2 欄）
     ・1 枚のカードに「立ち絵・衣装名・お披露目日・2D/3D タグ・デザイン／モデル」
   ・色は tokens.css の語意層のみ参照（生の色値をここに書かない）。
     site.css の .panel / .stitle / .tag / .lift をそのまま使い、
     このページ固有の見た目（tab・グリッド・カード内訳）だけ足す。
   =========================================================== */

.costume-panel {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---------- 上段：見出し＋tab（discography と同じ形） ---------- */
.costume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.costume-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--tile-bg);
  border-radius: var(--r-pill);
  padding: 6px;
}
.costume-tab {
  height: 36px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  color: var(--title-ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.costume-tab.is-active {
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--font-btn);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .06em;
}
.costume-tab:hover:not(.is-active) { color: var(--link-ink-hover); }

/* ---------- グリッド ---------- */
.costume-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 24px;
}
@media (max-width: 900px) {
  .costume-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; }
}
@media (max-width: 600px) {
  .costume-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
}

/* ---------- カード 1 枚 ---------- */
.cos-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  border-radius: var(--r-box);
}
/* [hidden] は UA 由来で優先度が低く display:flex に負けるため明示的に上書き
   （tab の絞り込みで使う） */
.cos-card[hidden] { display: none; }

/* 立ち絵は 16 着とも img/visual の正規化済み画像（516x932・人物の高さと下端が
   揃っている）から作ったサムネなので、同じ枠に contain で入れれば比率が揃う。
   切り抜き（cover）にすると頭や足が切れる衣装が出るので使わない。 */
.cos-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 320 / 578;
  background: var(--tile-bg);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.cos-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .25s var(--ease);
}
.cos-card:hover .cos-img { transform: scale(1.03); }
@media (hover: none), (prefers-reduced-motion: reduce) {
  .cos-card:hover .cos-img { transform: none; }
}

.cos-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cos-meta .d {
  font-family: var(--font-geo);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--title-ink);
}
/* 2D は site.css の .tag（--tag-bg）のまま。3D だけ濃いほうに振って見分ける */
.cos-tag-3d { background: var(--pink-shadow); }

.cos-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-dark);
}
.cos-credits {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-brown);
}

.costume-empty {
  text-align: center;
  font-size: 14px;
  color: var(--card-ink);
  padding: 24px 0 4px;
}

@media (max-width: 600px) {
  .costume-head { justify-content: center; text-align: center; }
  .cos-name { font-size: 14px; }
  .cos-credits { font-size: 11px; }
  .cos-meta .d { font-size: 12px; }
}
