/* 表現テーマ詳細ページ（/themes/{id}/・/ja/themes/{id}/）。atlas.css のトークンと部品
   （masthead・btn・footer）の上に、テーマ詳細だけの配置を足す。クラスは theme-detail-* に閉じ、
   図鑑トップの .swatches などとは衝突させない。参考色は記録値の hex をそのまま背景に使う。
   角丸と影は使わない。動きは定義しない：本文とコピー結果は静止した HTML だけで読める。 */

/* 操作できる要素は 44px 四方以上（文中のリンクも行内のまま押せる大きさにする） */
.page-theme .masthead__nav a,
.page-theme .footer__inner a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.theme-detail-hero {
  max-width: 60em;
  padding: 18px 0 26px;
}

.theme-detail-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.theme-detail-eyebrow__no {
  font-weight: 700;
  color: var(--ink);
}

.theme-detail-hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  --heading-size: clamp(30px, 4.6vw, 58px);
  font-size: var(--heading-size);
  font-weight: 700;
  line-height: 1.15;
}

.theme-detail-hero .lede {
  margin: 14px 0 0;
  padding-left: 12px;
  border-left: 4px solid var(--signal);
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.5;
}

.theme-detail-hero .purpose {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--ink-2);
}

.theme-detail-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter) 48px;
}

.theme-detail-section {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
}

.theme-detail-section:first-child {
  margin-top: 0;
}

.theme-detail-section h2 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  --heading-size: clamp(26px, 3vw, 38px);
  font-size: var(--heading-size);
  font-weight: 700;
  line-height: 1.25;
}

.theme-detail-section > p {
  max-width: 62ch;
}

.theme-detail-cards,
.theme-detail-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}

.theme-detail-card,
.theme-detail-related a {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--paper-hi);
  box-shadow: none;
}

.theme-detail-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-sans);
  --heading-size: 15px;
  font-size: var(--heading-size);
  font-weight: 700;
  line-height: 1.5;
}

.theme-detail-card p,
.theme-detail-card ul {
  margin: 4px 0 0;
}

.theme-detail-card h3 + p,
.theme-detail-card h3 + ul {
  margin-top: 0;
}

.theme-detail-card__taxonomy {
  font-weight: 700;
}

.theme-detail-vocab {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.theme-detail-vocab li {
  padding: 1px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  font-size: 14px;
}

.theme-detail-spec {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
}

.theme-detail-spec div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
}

.theme-detail-spec dt {
  font-size: 13px;
  color: var(--ink-2);
}

.theme-detail-spec dd {
  margin: 0;
  font-weight: 700;
}

.theme-detail-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.theme-detail-swatch {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 120px;
  min-height: 76px;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.theme-detail-swatch code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

.theme-detail-related a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  font-weight: 700;
  text-underline-offset: 4px;
}

.theme-detail-related__kind {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
}

.theme-detail-note {
  color: var(--ink-2);
}

.theme-detail-prompt {
  max-width: 100%;
  margin: 0;
  padding: 16px 18px;
  border-radius: 0;
  background: var(--deck);
  color: var(--deck-ink);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.theme-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.theme-detail-actions .btn {
  min-height: 44px;
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
}

.theme-detail-status {
  min-height: 1.75em;
  margin: 8px 0 0;
  font-weight: 700;
}

/* 動きを減らす設定：atlas.css の 0.01ms より強く、遷移とアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  .page-theme *,
  .page-theme *::before,
  .page-theme *::after {
    animation: none !important;
    transition: none !important;
  }
}
