/* ==========================================================================
   journal.css — グループA「蒼夜シアター」下層
   journal.html(記事アーカイブ)/ journal-article.html(記事ページ)
   style.css のトークン・コンポーネントと theater.css の差分のみを書く。
   色は :root トークンと黒グラデスクリム(rgba(0,0,0,*))のみ。新色の発明禁止。
   ========================================================================== */

/* ---------- 共通: 現在セクションのナビ(単一記事ページ用) ---------- */

.site-nav a[aria-current="page"] .en { color: var(--c-ice); }

/* style.css は ul のみリセットのため、ol のパンくずをここで整える */
ol.crumbs {
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

/* ---------- 読了プログレスバー(記事上端 1px・氷青=再生系の許可領域) ---------- */

.jr-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 1px;
  z-index: 120;
  pointer-events: none;
}

.jr-progress i {
  display: block;
  height: 100%;
  background: var(--c-ice);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ==========================================================================
   journal.html — 記事アーカイブ(行リスト+背景プレビューのクロスフェード)
   ========================================================================== */

/* 背景プレビュー層: ページ全面に固定し、行ホバーで写真がクロスフェード */
.jr-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.jr-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
}

.jr-bg img.is-active { opacity: .5; }

.jr-bg img[data-journal-bg="j02"] { object-position: 50% 28%; }
.jr-bg img[data-journal-bg="j04"] { object-position: 50% 42%; }
.jr-bg img[data-journal-bg="j06"] { object-position: 50% 38%; }

/* スクリムは黒グラデのみ(SPEC)— 行テキストのコントラストを担保 */
.jr-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0, 0, 0, .84), rgba(0, 0, 0, .46) 52%, rgba(0, 0, 0, .24)),
    linear-gradient(to top, rgba(0, 0, 0, .88), transparent 46%);
}

.jr-program { padding-block: var(--space-5) var(--space-7); }

.jr-label {
  margin-bottom: var(--space-4);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--c-text-dim);
}

.jr-list { border-top: 1px solid var(--c-line); }

.jr-row {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.6rem);
  padding: clamp(1.6rem, 3.8vh, 2.7rem) 0;
  border-bottom: 1px solid var(--c-line);
  transition: opacity .45s ease;
}

/* ホバー中の行以外を減光してフォーカスを作る */
@media (hover: hover) and (pointer: fine) {
  .jr-list:hover .jr-row:not(:hover) { opacity: .3; }
}

.jr-row__no {
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--c-text-faint);
}

.jr-row__title {
  font-size: clamp(1.3rem, 3.2vw, 2.4rem);
  font-weight: 500;
  line-height: 1.45;
}

.jr-row:hover .jr-row__title,
.jr-row:focus-visible .jr-row__title {
  text-decoration: underline;
  text-decoration-color: var(--c-ice);
  text-decoration-thickness: 1px;
  text-underline-offset: .35em;
}

.jr-row__meta {
  display: flex;
  align-items: center;
  gap: 1.1em;
  margin-top: .8em;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--c-text-dim);
}

.jr-row__season {
  padding: .2em .85em;
  font-size: 10px;
  letter-spacing: .22em;
  border: 1px solid var(--c-line);
  border-radius: 2px;
  color: var(--c-text-dim);
}

.jr-row__arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  color: var(--c-text-dim);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .35s ease, transform .35s ease, border-color .35s ease;
}

.jr-row__arrow svg { width: 16px; height: 16px; }

.jr-row:hover .jr-row__arrow,
.jr-row:focus-visible .jr-row__arrow {
  opacity: 1;
  transform: none;
  border-color: var(--c-ice);
}

/* タッチ環境: プレビューの代わりに先頭3件へ静的サムネ(DOMは全行同一) */
.jr-row__thumb { display: none; }

@media (hover: none) {
  .jr-row__arrow { display: none; }

  .jr-list .jr-row:nth-child(-n+3) .jr-row__thumb {
    display: block;
    grid-column: 1 / -1;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--c-black);
  }

  .jr-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ==========================================================================
   journal-article.html — 記事ページ
   ========================================================================== */

/* 記事ヘッダ(page-head の差分): 記事タイトル+タグ・日付・執筆者 */
.jr-head { border-bottom: 0; }

.jr-head .page-head__title {
  max-width: 26em;
  font-size: clamp(1.6rem, 4.4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.55;
}

.jr-headmeta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5em 1.8em;
  margin-top: var(--space-3);
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--c-text-faint);
}

/* 主役写真(全幅・微パララックス・スクリーン) */
.jr-hero { position: relative; margin: 0; }

.jr-hero__frame {
  position: relative;
  overflow: hidden;
  height: 88vh;
  height: 88svh;
  min-height: 480px;
  background: var(--c-black);
}

.jr-hero__frame > a { display: block; height: 100%; }

.jr-hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.jr-hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .62), transparent 28%);
}

.jr-hero figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4em 1.5em;
  padding: 0 var(--pad-x) 1.1rem;
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--c-text-dim);
}

.jr-hero figcaption .en {
  align-self: center;
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--c-text-faint);
}

/* 本文カラム(読みやすさ最優先: 16px / 行間2.1) */
.jr-body {
  max-width: 720px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.jr-body p {
  margin: 0 0 1.9em;
  line-height: 2.1;
  word-break: auto-phrase;
  text-wrap: pretty;
}

.jr-lede { padding-top: clamp(3.5rem, 9vh, 6rem); }

.jr-lede p { font-size: 17px; }

/* 章見出し(章番号+内容見出し+ヘアライン) */
.jr-time {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5em .8em;
  margin: clamp(3rem, 8vh, 5rem) 0 1.9rem;
  font-weight: 400;
  line-height: 1.4;
}

.jr-time .en {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  letter-spacing: .12em;
  color: var(--c-text-dim);
}

.jr-time small {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--c-text);
}

.jr-time::after {
  content: "";
  flex: 1 1 2.5rem;
  min-width: 2rem;
  height: 1px;
  align-self: center;
  background: var(--c-line);
}

/* 引用ブロック */
.jr-quote {
  margin: 2.6em 0;
  padding: 1.6em 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 500;
  line-height: 2.1;
  letter-spacing: .05em;
}

.jr-quote p { margin: 0; }

/* 全幅写真章(data-parallax の親=frame に overflow:hidden) */
.jr-photo { margin: clamp(3.5rem, 9vh, 6rem) 0; }

.jr-photo__frame {
  position: relative;
  overflow: hidden;
  height: clamp(420px, 86vh, 840px);
  background: var(--c-black);
}

.jr-photo__frame > a { display: block; height: 100%; }

.jr-photo__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jr-photo--crystal .jr-photo__frame img { object-position: 50% 45%; }
.jr-photo--sl .jr-photo__frame img { object-position: 50% 56%; }

.jr-photo figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4em 1.5em;
  max-width: var(--inner-max);
  margin: 1rem auto 0;
  padding-inline: var(--pad-x);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.9;
  color: var(--c-text-dim);
}

.jr-photo figcaption .en {
  align-self: center;
  font-size: 9.5px;
  letter-spacing: .2em;
  color: var(--c-text-faint);
}

/* 2面ペアの写真章 */
.jr-photo--pair .jr-photo__frame {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  height: auto;
  overflow: visible;
  background: none;
}

.jr-photo--pair .jr-photo__cell {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--c-black);
}

.jr-photo--pair .jr-photo__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 記事末尾(クレジット+前後ナビ) */
.jr-end { padding-bottom: var(--space-7); }

/* ---------- responsive: 768px ---------- */

@media (max-width: 768px) {
  .jr-row { grid-template-columns: 64px 1fr auto; }

  .jr-hero__frame {
    height: 72vh;
    height: 72svh;
    min-height: 420px;
  }

  .jr-photo__frame { height: clamp(320px, 58vh, 560px); }

  .jr-photo--pair .jr-photo__frame { grid-template-columns: 1fr; }
}

/* ---------- responsive: 390px ---------- */

@media (max-width: 480px) {
  .jr-row {
    grid-template-columns: 1fr;
    gap: .45rem;
    padding: 1.5rem 0;
  }

  .jr-row__no { font-size: 10px; }
  .jr-row__arrow { display: none; }
  .jr-row__title { line-height: 1.6; }

  .jr-head .page-head__title { font-size: 1.45rem; }

  .jr-time { margin-top: 2.6rem; }
  .jr-time .en { font-size: 1.4rem; }
  .jr-time small { font-size: 1.05rem; }

  .jr-lede p { font-size: 16px; }
  .jr-body p { line-height: 2; }

  .jr-hero figcaption,
  .jr-photo figcaption { font-size: 10px; }
}

/* ==========================================================================
   2026-06-11 媒体化アップグレード(LIG級)
   アーカイブ: 検索+タグ絞込+Popular / 記事: TOC+シェア+執筆者+関連記事
   既存トークン(--c-*, --space-*, --pad-x, --inner-max)と黒スクリムのみ使用。
   ========================================================================== */

/* ---------- アーカイブ: 検索ボックス+タグチップ ---------- */

.jr-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem 2.4rem;
  margin-bottom: var(--space-4);
}

.jr-toolbar__search {
  display: flex;
  align-items: center;
  gap: 1em;
  flex: 1 1 300px;
  max-width: 460px;
  border-bottom: 1px solid var(--c-line);
  transition: border-color .3s ease;
}

.jr-toolbar__search:focus-within { border-color: var(--c-ice); }

.jr-toolbar__input {
  width: 100%;
  padding: .7em 0;
  font: inherit;
  font-size: 14px;
  letter-spacing: .05em;
  color: var(--c-text);
  background: none;
  border: 0;
}

.jr-toolbar__input:focus { outline: none; }

.jr-toolbar__input::placeholder { color: var(--c-text-faint); opacity: 1; }

.jr-toolbar__count {
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--c-text-faint);
  white-space: nowrap;
}

.jr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.jr-chip {
  padding: .45em 1.1em;
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--c-text-dim);
  background: none;
  border: 1px solid var(--c-line);
  border-radius: 2px;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease;
}

.jr-chip:hover { color: var(--c-text); border-color: var(--c-ice); }

.jr-chip[aria-pressed="true"] { color: var(--c-ice); border-color: var(--c-ice); }

/* 絞込で非表示の行 */
.jr-row.is-filtered { display: none; }

/* 0件メッセージ */
.jr-empty {
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--c-line);
  font-size: 14px;
  color: var(--c-text-dim);
}

/* 行の執筆者(タグチップは style.css の .jr-row__tag を流用) */
.jr-row__author { color: var(--c-text-faint); }

/* ---------- アーカイブ: Popular(3本・01-03番号・1位のみ氷青) ---------- */

.jr-popular-side { margin-top: var(--space-5); }

.jr-popular-side__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(.8rem, 1.6vw, 1.2rem);
}

.jr-pop {
  display: flex;
  align-items: baseline;
  gap: 1.1em;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--c-line);
  transition: border-color .3s ease;
}

.jr-pop:hover { border-color: var(--c-ice); }

.jr-pop i {
  font-style: normal;
  font-size: 20px;
  letter-spacing: .08em;
  color: var(--c-text-faint);
}

.jr-pop:first-child i { color: var(--c-ice); }

.jr-pop__t {
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-dim);
  transition: color .3s ease;
}

.jr-pop:hover .jr-pop__t { color: var(--c-text); }

/* ---------- 記事: 目次(本文見出しから自動生成・現在地ハイライト) ---------- */

.jr-toc {
  max-width: 720px;
  margin: clamp(2.4rem, 6vh, 3.6rem) auto 0;
  padding-inline: var(--pad-x);
}

.jr-toc__hd {
  margin-bottom: .9em;
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--c-text-faint);
}

.jr-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--c-line);
}

.jr-toc__list li { border-bottom: 1px solid var(--c-line); }

.jr-toc__list a {
  display: flex;
  align-items: baseline;
  gap: 1.2em;
  padding: .62em .1em;
}

.jr-toc__list a .en {
  min-width: 3.4em;
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--c-text-dim);
  transition: color .3s ease;
}

.jr-toc__list a small {
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--c-text-faint);
  transition: color .3s ease;
}

.jr-toc__list a:hover .en,
.jr-toc__list a.is-active .en { color: var(--c-ice); }

.jr-toc__list a:hover small,
.jr-toc__list a.is-active small { color: var(--c-text); }

/* 広幅では左の固定レール(全幅写真の上では黒スクリムで可読性を担保)。
   記事ヘッダとの重なりを避けるため、本文に入ってから(is-float)表示する */
@media (min-width: 1280px) {
  .jr-toc {
    position: fixed;
    left: clamp(20px, 3vw, 56px);
    top: clamp(120px, 24vh, 220px);
    z-index: 90;
    width: 212px;
    margin: 0;
    padding: 1.1rem 1.2rem 1.3rem;
    background: rgba(16, 19, 22, .72);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
  }

  .jr-toc.is-float {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .jr-toc__list a { padding-block: .5em; }
}

/* ---------- 記事: シェア行 ---------- */

.jr-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem;
  margin-top: 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--c-line);
}

.jr-share__label {
  margin-right: .6rem;
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--c-text-faint);
}

.jr-share__btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .6em 1.4em;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--c-text-dim);
  background: none;
  border: 1px solid var(--c-line);
  border-radius: 2px;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease;
}

.jr-share__btn:hover { color: var(--c-text); border-color: var(--c-ice); }

.jr-share__done {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--c-ice);
}

/* ---------- 記事: 執筆者ボックス ---------- */

.jr-author {
  max-width: 720px;
  margin: 3.2rem auto 0;
  padding-inline: var(--pad-x);
}

.jr-author__box {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(1.2rem, 3vw, 1.8rem);
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--c-line);
}

.jr-author__photo {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--c-black);
}

.jr-author__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.jr-author__label {
  margin-bottom: .8em;
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--c-text-faint);
}

.jr-author__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .06em;
}

.jr-author__name small {
  margin-left: 1em;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .22em;
  color: var(--c-text-faint);
}

.jr-author__role {
  margin-top: .35em;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--c-text-dim);
}

.jr-author__bio {
  margin-top: 1em;
  font-size: 12.5px;
  line-height: 2;
  color: var(--c-text-dim);
}

.jr-author__more {
  display: inline-block;
  margin-top: 1.2em;
  padding-bottom: .25em;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--c-text-dim);
  border-bottom: 1px solid var(--c-line);
  transition: color .3s ease, border-color .3s ease;
}

.jr-author__more:hover { color: var(--c-ice); border-color: var(--c-ice); }

/* ---------- 記事: 関連記事(journal-card 流用) ---------- */

.jr-related {
  max-width: var(--inner-max);
  margin-inline: auto;
  padding: clamp(4rem, 10vh, 7rem) var(--pad-x) 0;
}

.jr-related .sec-hd { margin-bottom: var(--space-4); }

/* ---------- 媒体化: responsive ---------- */

@media (max-width: 768px) {
  .jr-popular-side__list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .jr-toolbar { gap: 1rem; margin-bottom: var(--space-3); }
  .jr-toolbar__search { flex-basis: 100%; max-width: none; }
  .jr-chip { padding: .4em .95em; }

  .jr-row__meta { flex-wrap: wrap; gap: .5em .9em; }

  .jr-author__box { grid-template-columns: 84px 1fr; }
  .jr-author__name small { display: block; margin: .3em 0 0; }
}
