/* ============================
   XENO チャームビューア 専用CSS（カードUIは cards-common.css）
   ※見た目は「無印 charms.css」を基準に復元
   ============================ */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 10px;
  background: #f7f7f8;
  overflow-x: hidden;
}

.page {
  max-width: 1224px;
  width: 100%;
  margin: 0 auto;
}

.top-nav {
  margin-bottom: 10px;
}

.back-link {
  font-size: 14px;
  text-decoration: none;
  color: #409eff;
}

h1 {
  margin-top: 0;
  margin-bottom: 15px;
}

/* ============================
   タブUI
   ============================ */
.charm-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tab {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #ddd;
}

.tab.active {
  background: #409eff;
  color: #fff;
}

/* ============================
   部位フィルタ
   ============================ */
.slot-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.slot-tab {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  cursor: pointer;
  background: #fff;
  font-size: 14px;
}

.slot-tab.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* ============================
   検索・フィルタ
   ============================ */
.search-box {
  width: 260px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
}

.filter-toggle {
  background: #0a0a0a;
  color: #fff;
  border: 1px solid #555;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  cursor: pointer;
}

/* ============================
   シリーズフィルタ（アコーディオン）
   ============================ */
#seriesFilters {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

#seriesFilters.open {
  display: grid;
}

/* ============================
   シリーズボタン
   ============================ */
.series-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0a0a0a;
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
}

.series-button img {
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  object-fit: contain;
}

.series-button span {
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
}

.series-button.selected {
  background: linear-gradient(180deg, #2f7dff, #1a5ef5);
}

/* ============================
   セット効果（チャーム固有）
============================ */
.set-effects {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  font-size: 13px;
  white-space: pre-line;
}

/* ============================
   PC表示調整
   ============================ */
@media (min-width: 769px) {
  .card .info-box {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .card .effects-box {
    flex: 1;
  }

  .card .set-effects {
    margin-top: auto;
  }
}


/* ============================
   スマホ表示調整
   ============================ */
@media (max-width: 768px) {
  .slot-filters {
    flex-wrap: wrap;
  }

  .search-box {
    width: 100%;
    box-sizing: border-box;
  }

  #seriesFilters {
    grid-template-columns: repeat(2, 1fr);
  }

  .series-button {
    width: 100%;
    box-sizing: border-box;
  }

  #skillGrid {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 10px;
    gap: 12px;
  }

  .card .icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin: 0;
  }

  .card .info-box {
    flex: 1;
    min-width: 0;
  }

  .card .skill-name {
    margin-top: 0;
    margin-bottom: 8px;
    text-align: left;
  }

  .card .effects-box {
    margin-top: 0;
  }

  .card .effect-row {
    margin-bottom: 4px;
  }

  .card .set-effects {
    margin-top: 8px;
    border-top: 1px solid #eee;
    padding-top: 6px;
  }
}

/* ============================
   装備中表示
   ============================ */
.card.equipped {
  position: relative;
  opacity: 0.5;
  filter: grayscale(1);
}

.card.equipped::after {
  content: "装備中";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 11px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  pointer-events: none;
}
