/* =============================================================
   SAMEKORO LAB — experiments.css
   検証バックログ（DIVE QUEUE）/ 検証詳細ページ専用スタイル。
   デザイントークンは style.css の :root を継承する。
   ============================================================= */

/* ---------- ページヘッダー ---------- */
.page-hero {
  padding: 128px 0 36px;
}
.page-hero__title {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
.page-hero__title .en {
  font-family: var(--font-en);
  color: var(--cyan);
  text-shadow: 0 0 24px var(--glow);
}
.page-hero__lead {
  color: var(--text-sub);
  font-size: 0.95rem;
  max-width: 720px;
}

/* ---------- 計器サマリー ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px 0 10px;
}
.stat-card {
  padding: 16px 20px 14px;
  border-radius: 16px;
}
.stat-card__label {
  font-family: var(--font-en);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.stat-card__value {
  font-family: var(--font-en);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1.1;
}
.stat-card__value small { font-size: 0.85rem; color: var(--text-sub); font-weight: 500; }
.stat-card__sub { font-size: 0.72rem; color: var(--text-sub); margin-top: 6px; line-height: 1.6; }

/* ---------- カテゴリ・チップ列 ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(126, 200, 232, 0.04);
  color: var(--text-sub);
  font-size: 0.8rem;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.cat-chip strong { font-family: var(--font-en); color: var(--cyan); font-weight: 500; }
.cat-chip:hover { color: var(--cyan-bright); border-color: var(--line-bright); }
.cat-chip.is-active {
  color: var(--cyan-bright);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(84, 216, 232, 0.18);
  background: rgba(84, 216, 232, 0.08);
}

/* ---------- TOP20 ストリップ ---------- */
.top20 {
  margin-top: 34px;
  padding: 22px 24px 18px;
  border-radius: var(--radius-card);
}
.top20__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.top20__title { font-size: 1.05rem; font-weight: 700; }
.top20__note { font-size: 0.74rem; color: var(--text-faint); }
.top20__list { display: flex; flex-wrap: wrap; gap: 8px; }
.top20__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--text-sub);
  transition: color var(--ease), border-color var(--ease), transform var(--ease);
}
.top20__item:hover { color: var(--cyan-bright); border-color: var(--line-bright); transform: translateY(-2px); }
.top20__rank {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-family: var(--font-en);
  font-size: 0.66rem;
  font-weight: 700;
  color: #04121c;
  background: linear-gradient(120deg, var(--cyan-bright), var(--cyan));
}

/* ---------- フィルターバー ---------- */
.filters {
  position: sticky;
  top: 68px;
  z-index: 50;
  margin: 30px 0 22px;
  padding: 16px 20px;
  border-radius: var(--radius-card);
  background: rgba(7, 17, 32, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
}
.filters__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters__row + .filters__row { margin-top: 10px; }

.search-box { position: relative; flex: 1 1 260px; min-width: 220px; }
.search-box svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; fill: none; stroke: var(--text-faint); stroke-width: 1.6; stroke-linecap: round;
  pointer-events: none;
}
.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(5, 13, 26, 0.5);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.search-box input::placeholder { color: var(--text-faint); }
.search-box input:focus { border-color: var(--cyan); box-shadow: 0 0 14px rgba(84, 216, 232, 0.15); }

.filter-select {
  height: 38px;
  padding: 0 30px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(5, 13, 26, 0.5) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235f7891' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--ease), color var(--ease);
}
.filter-select:focus, .filter-select:hover { border-color: var(--line-bright); color: var(--text); }
.filter-select.is-set { border-color: var(--cyan); color: var(--cyan-bright); }
.filter-select option { background: var(--surface-solid); color: var(--text); }

.filters__meta { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.filters__count { font-family: var(--font-en); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--cyan); white-space: nowrap; }
.filters__reset {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.76rem;
  transition: color var(--ease), border-color var(--ease);
}
.filters__reset:hover { color: var(--cyan-bright); border-color: var(--line-bright); }

/* ---------- 検証カード ---------- */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-bottom: 40px;
}
.exp-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 18px;
  border-radius: 18px;
  cursor: pointer;
}
.exp-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.exp-card__id {
  font-family: var(--font-en);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
}
.exp-card__rank {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  font-family: var(--font-en);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #04121c;
  background: linear-gradient(120deg, var(--cyan-bright), var(--cyan));
}
.exp-card__spacer { flex: 1; }
.exp-card__title { font-size: 0.95rem; font-weight: 700; line-height: 1.55; transition: color var(--ease); }
.exp-card:hover .exp-card__title { color: var(--cyan-bright); }
.exp-card__q {
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.exp-card__services { display: flex; flex-wrap: wrap; gap: 6px; }
.exp-card__services li {
  font-size: 0.66rem;
  color: var(--text-faint);
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.exp-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(126, 200, 232, 0.08);
}

/* メタバッジ共通 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--text-sub);
  background: rgba(126, 200, 232, 0.06);
  border: 1px solid transparent;
}
.badge--depth-200  { color: #8ee7f2; background: rgba(84, 216, 232, 0.10); }
.badge--depth-1000 { color: #9db4ff; background: rgba(120, 150, 255, 0.12); }
.badge--depth-4000 { color: #c9b2ff; background: rgba(170, 130, 255, 0.13); }
.badge--cost-free  { color: #7de8c0; background: rgba(70, 220, 165, 0.10); }
.badge--cost-warn  { color: #ffb27d; background: rgba(255, 150, 70, 0.12); }
.badge--status     { font-family: var(--font-en); letter-spacing: 0.1em; }
.badge--status-planned   { color: var(--text-sub); border-color: var(--line); background: transparent; }
.badge--status-ready     { color: #7de8c0; background: rgba(70, 220, 165, 0.1); }
.badge--status-diving    { color: var(--cyan-bright); background: rgba(84, 216, 232, 0.12); }
.badge--status-observed  { color: #9db4ff; background: rgba(120, 150, 255, 0.12); }
.badge--status-published { color: #ffd98a; background: rgba(255, 200, 90, 0.12); }
.badge--status-hold      { color: var(--text-faint); background: rgba(126, 200, 232, 0.04); }
.badge--cat { color: var(--cyan); background: rgba(84, 216, 232, 0.07); }

.exp-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-faint);
  padding: 60px 0 80px;
  font-size: 0.9rem;
}
.exp-empty .en { font-family: var(--font-en); letter-spacing: 0.2em; display: block; margin-bottom: 10px; color: var(--text-sub); }

/* ---------- 詳細ページ ---------- */
.detail { padding: 122px 0 80px; }
.detail__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-bottom: 22px;
  transition: color var(--ease);
}
.detail__back:hover { color: var(--cyan-bright); }
.detail__back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.detail__head { margin-bottom: 26px; }
.detail__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.detail__id { font-family: var(--font-en); font-size: 0.82rem; letter-spacing: 0.14em; color: var(--cyan); }
.detail__title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; line-height: 1.5; margin-bottom: 14px; }
.detail__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.detail__tags li { font-size: 0.7rem; color: var(--text-faint); padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); }

.detail__question {
  margin: 22px 0 28px;
  padding: 20px 24px;
  border-radius: 16px;
  border-left: 3px solid var(--cyan);
  background: rgba(84, 216, 232, 0.06);
}
.detail__question .label {
  font-family: var(--font-en);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  color: var(--cyan);
  display: block;
  margin-bottom: 8px;
}
.detail__question p { font-size: 1rem; font-weight: 500; line-height: 1.85; }

.detail__grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 22px;
  align-items: start;
}
.detail__main { display: flex; flex-direction: column; gap: 18px; }

.d-section { padding: 22px 26px; border-radius: 18px; }
.d-section h2 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.d-section h2::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--glow); }
.d-section p { font-size: 0.88rem; color: var(--text-sub); line-height: 1.9; }
.d-section p + h2 { margin-top: 18px; }
.d-section ul { display: flex; flex-direction: column; gap: 6px; }
.d-section ul li {
  position: relative;
  font-size: 0.86rem;
  color: var(--text-sub);
  padding-left: 18px;
  line-height: 1.8;
}
.d-section ul li::before { content: ""; position: absolute; left: 2px; top: 0.75em; width: 6px; height: 1.5px; background: var(--cyan); }

.d-section--warn { border-color: rgba(255, 170, 90, 0.25); }
.d-section--warn h2 { color: #ffb27d; }
.d-section--warn h2::before { background: #ffb27d; box-shadow: 0 0 8px rgba(255, 170, 90, 0.4); }

/* サイドバー（メタ情報表） */
.detail__side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 92px; }
.meta-table { padding: 20px 22px; border-radius: 18px; }
.meta-table dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; }
.meta-table dt { font-size: 0.72rem; color: var(--text-faint); padding-top: 2px; white-space: nowrap; }
.meta-table dd { font-size: 0.8rem; color: var(--text); line-height: 1.6; }
.meta-table dd .badge { height: 20px; }
.meta-table dd a { color: var(--cyan); }
.meta-table dd a:hover { color: var(--cyan-bright); text-decoration: underline; }

.detail__nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}
.detail__nav a {
  flex: 1;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--text-sub);
  transition: color var(--ease), border-color var(--ease);
}
.detail__nav a:hover { color: var(--cyan-bright); border-color: var(--line-bright); }
.detail__nav a.next { text-align: right; }
.detail__nav .dir { font-family: var(--font-en); font-size: 0.62rem; letter-spacing: 0.18em; color: var(--text-faint); display: block; margin-bottom: 4px; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 992px) {
  .exp-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .detail__grid { grid-template-columns: 1fr; }
  .detail__side { position: static; }
}
@media (max-width: 768px) {
  .page-hero { padding-top: 108px; }
  .exp-grid { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters__meta { margin-left: 0; width: 100%; justify-content: space-between; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
}
