/* =====================================================================
   シャープ・インダストリアル（handoff「Spoiler Share」Turn 2）
   ・角丸なし。装飾は 1px の罫線／小さな正方形マーカー／英字の等幅ラベルだけ
   ・グラデーション、文字の影、背景模様、太いアクセント線は使わない
   ・見た目を変えるときは、まずこの :root の変数を変える。
     同じ部品（見出し・ラベル・ボタンなど）は下の「共通部品」のクラスを
     投稿ページ・トップ・投稿画面（admin）のすべてで使っている
   ===================================================================== */
:root {
  /* ---- 色 ---- */
  --bg: #121210; /* ページ背景 */
  --surface: #161614; /* ブロック・シート */
  --line: #3b3a34; /* 罫線・枠 */
  --line-soft: #2a2925; /* フッター上の区切り */
  --line-strong: #5a584f; /* シート上端 */
  --text: #e4e0d4; /* 本文・見出し（骨白） */
  --text-body: #d6d2c6; /* 長文 */
  --text-sub: #a8a396; /* 補足 */
  --text-muted: #8a8578; /* 日付・英字ラベル・© */
  --primary: #e4e0d4; /* 主ボタン背景 */
  --on-primary: #121210; /* 主ボタン文字 */
  --scrim: rgba(8, 8, 7, 0.8); /* シート背面 */
  --accent: #e4e0d4; /* 拡張のテーマ色（投稿ページでは body の style で上書き） */
  --on-accent: #121210;
  --danger: #e08a7a;
  --caution: #efa07f; /* 「あなたの進行度より先の内容を含みます」 */

  /* ---- フォント ---- */
  --font-display: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Zen Kaku Gothic New', sans-serif;
  --font-body: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', 'YuGothic', 'Meiryo', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* ---- 文字サイズ ---- */
  --fs-label: 11px; /* 英字ラベル・© */
  --fs-small: 12px;
  --fs-note: 13px; /* 補足・説明 */
  --fs-ui: 14px; /* 見出しラベル・UI */
  --fs-body: 15px; /* 本文 */
  --fs-button: 16px;
  --fs-sheet-title: 18px;
  --fs-post-title: 22px;
  --fs-content-title: 18px; /* 表示後のタイトル（SSを早く見せるため控えめ） */
  --fs-top-title: 32px;
  --fs-range: 54px; /* 「暁月 6.0」 */
  --fs-range-note: 15px; /* 「クリア後推奨」 */

  /* ---- 字間 ---- */
  --ls-label: 0.2em;
  --ls-label-tight: 0.12em;
  --ls-warn: 0.22em;
  --ls-button: 0.22em;
  --ls-note: 0.12em;
  --ls-site: 0.14em;

  /* ---- 余白（4px刻み） ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-14: 56px;
  --gutter: 20px; /* 画面の左右 */

  /* ---- 部品の寸法 ---- */
  --marker: 8px;
  --head-h: 44px; /* SSをなるべく早く見せるため控えめに */
  --btn-h: 54px;
  --row-h: 56px;
  --tap: 44px;
  --note-h: 30px;

  color-scheme: dark;
}

@media (min-width: 1024px) {
  :root {
    --gutter: 48px;
    --head-h: 48px;
    --btn-h: 56px;
    --fs-range: 96px;
    --fs-range-note: 20px;
    --fs-post-title: 30px;
    --fs-content-title: 22px;
    --note-h: 40px;
  }
}

/* ---- 基本 ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.9;
  word-break: auto-phrase;
}

body.is-locked {
  overflow: hidden;
}

:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* =====================================================================
   共通部品
   ===================================================================== */

/* 正方形マーカー */
.marker {
  flex: none;
  display: inline-block;
  width: var(--marker);
  height: var(--marker);
  background: var(--text);
}
.marker-accent {
  background: var(--accent);
}
.marker-dark {
  background: var(--on-primary);
}

/* 英字の等幅ラベル（日付、IMG ×4、SPOILER RANGE など） */
.mono-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: var(--ls-label-tight);
  color: var(--text-muted);
}

/* 「━ ■ ネタバレ注意 ■ ━」 */
.warn-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.warn-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.warn-text {
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: var(--ls-warn);
  margin-right: calc(var(--ls-warn) * -1); /* 最後の字間ぶん、中央からずれないように */
  color: var(--accent);
}

/* 「━ ■ ━」の区切り */
.divider {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.divider-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* 「クリア後推奨」ラベル */
.note-label {
  display: inline-flex;
  align-items: center;
  height: var(--note-h);
  margin: 0;
  padding: 0 var(--sp-3);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-range-note);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--ls-note);
}

/* 主ボタン（骨白ベタ＋黒文字。左に正方形、右に矢印） */
.btn-primary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: var(--btn-h);
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-body);
  font-size: var(--fs-button);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: var(--ls-button);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn-primary:hover {
  background: var(--accent);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
}
.btn-label {
  flex: 1;
  text-align: center;
}
.btn-arrow {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0;
}

/* 副ボタン（枠線だけ。左に英字ラベル、右に状態と ›） */
.btn-secondary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: var(--row-h);
  margin: 0;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-ui);
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.btn-secondary:hover {
  border-color: var(--text-sub);
}
.btn-secondary .mono-label {
  letter-spacing: 0.1em;
}
.btn-state {
  font-size: var(--fs-small);
  color: var(--text-sub);
}
.btn-chevron {
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  color: var(--text-muted);
}

/* 小さな枠線ボタン（コピーなど） */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--text);
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline:hover {
  border-color: var(--text-sub);
}

/* 文字だけのボタン（変更、リセットなど） */
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin: calc((var(--tap) - 1.5em) / -2) 0;
  padding: 0 var(--sp-1);
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button.is-sub {
  color: var(--text-sub);
}

/* =====================================================================
   ヘッダー・フッター
   ===================================================================== */
.site-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--head-h);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}
.site-head-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: var(--fs-ui);
  font-weight: 700;
  letter-spacing: var(--ls-site);
  text-decoration: none;
}
@media (min-width: 1024px) {
  .site-head {
    gap: var(--sp-3);
  }
  .site-head-name {
    font-size: var(--fs-button);
    letter-spacing: 0.16em;
  }
  .site-head .mono-label {
    font-size: var(--fs-small);
    letter-spacing: var(--ls-site);
  }
}

.page {
  flex: 1;
  width: 100%;
}

.site-foot {
  margin: var(--sp-10) var(--gutter) 0;
  padding: var(--sp-3) 0 28px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.copyright {
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-shadow: none;
}
@media (min-width: 1024px) {
  .site-foot {
    margin: 0;
    padding: 0;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .copyright {
    font-size: var(--fs-small);
  }
}

/* =====================================================================
   投稿ページ：注意画面
   スマホ・タブレットは縦に並べ、PC（1024px以上）は左にネタバレ範囲、右にタイトルとボタン
   ===================================================================== */
.notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    'warn'
    'block'
    'desc'
    'heading'
    'actions';
  max-width: 560px;
  margin: 0 auto;
  padding: 36px var(--gutter) 0;
}

.notice-warn {
  grid-area: warn;
  margin-bottom: 18px;
}

.range-block {
  grid-area: block;
  border: 1px solid var(--line);
  background: var(--surface);
}
.range-block-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 28px;
  margin: 0;
  padding: 0 var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.range-block-head .mono-label {
  letter-spacing: var(--ls-label);
}
.range-block-warn {
  display: none;
  align-items: center;
  gap: 10px;
}
.range-block-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: 22px var(--sp-5);
}
.range-big {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 0.26em;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-range);
  font-weight: 700;
  line-height: 1;
}
.range-ver {
  color: var(--accent);
}

.notice-text {
  grid-area: desc;
  margin: 14px 0 0;
  font-size: var(--fs-note);
  line-height: 1.8;
  color: var(--text-sub);
}

.post-heading {
  grid-area: heading;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-8);
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.post-meta {
  display: flex;
  gap: var(--sp-4);
}
.post-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-post-title);
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.notice-actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: var(--sp-6);
}

/* 進行度を保存できなかったときなどの一文 */
.progress-note {
  margin: 0;
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1.7;
  color: var(--caution);
}

/* 進行度の枠：OK（クリア済み）と NG（自分の進行度より先を含む）。形は同じで色だけ変える */
.cleared {
  border: 1px solid var(--text);
}
.cleared.is-ng {
  border-color: var(--caution);
}
.cleared.is-ng .cleared-head {
  color: var(--caution);
}
.cleared.is-ng .ok-label {
  background: var(--caution);
}
.cleared-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin: 0;
  padding: 14px var(--sp-4);
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.5;
}
.ok-label {
  padding: 3px 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: var(--ls-label-tight);
}
.cleared-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 14px;
  margin: 0;
  padding: 10px var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-sub);
}

@media (min-width: 1024px) {
  .notice {
    grid-template-columns: 560px 400px;
    grid-template-rows: 1fr auto auto auto 1fr;
    grid-template-areas:
      'block .'
      'block heading'
      'block desc'
      'block actions'
      'block .';
    column-gap: 72px;
    justify-content: center;
    max-width: none;
    min-height: calc(100vh - var(--head-h) - 52px);
    min-height: calc(100dvh - var(--head-h) - 52px);
    padding: var(--sp-10) var(--gutter);
  }
  .notice-warn {
    display: none;
  }
  .range-block {
    align-self: center;
  }
  .range-block-head {
    justify-content: space-between;
    height: 36px;
    padding: 0 var(--sp-4);
  }
  .range-block-head .mono-label {
    font-size: var(--fs-small);
  }
  .range-block-warn {
    display: inline-flex;
  }
  .range-block-warn .marker {
    width: 10px;
    height: 10px;
  }
  .range-block-body {
    gap: var(--sp-6);
    padding: var(--sp-14) var(--sp-10) 52px;
  }
  .post-heading {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    gap: 10px;
  }
  .post-meta {
    font-size: var(--fs-small);
    letter-spacing: var(--ls-site);
  }
  .notice-text {
    font-size: var(--fs-ui);
    line-height: 1.9;
  }
  .notice-actions {
    margin-top: var(--sp-8);
  }
}

/* 開く瞬間の演出（1回だけ） */
.notice.is-opening {
  animation: notice-out 0.3s ease forwards;
}
@keyframes notice-out {
  to {
    opacity: 0;
  }
}

/* =====================================================================
   投稿ページ：表示後
   ===================================================================== */
.content {
  padding: var(--sp-4) var(--gutter) 0;
}
.content-head {
  max-width: 560px;
  margin: 0 auto;
}
.content-range {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1.6;
  color: var(--accent);
}
.content-title {
  margin: var(--sp-1) 0 2px;
  font-family: var(--font-display);
  font-size: var(--fs-content-title);
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.content-title:focus {
  outline: none;
}
/* ひとことコメント（SSの下） */
.memo {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: 560px;
  margin: var(--sp-6) auto 0;
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.memo-text {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--text-body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (min-width: 1024px) {
  .content {
    padding-top: var(--sp-6);
  }
  .content-head,
  .memo {
    max-width: 720px;
  }
}

/* SSの並べ方。行・列への振り分けと間隔は layout.js が決める */
.shots {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: 1184px;
  margin: var(--sp-3) auto 0;
}
.shots[data-layout='single'] {
  max-width: 896px;
}
.shots-row {
  display: flex;
  width: 100%;
  margin: 0 auto;
}
.shots.is-masonry {
  flex-direction: row;
  align-items: flex-start;
}
.shots-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
}
.shot {
  margin: 0;
  min-width: 0;
  animation: shot-in 0.4s ease both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.shot-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
/* 枠線は outline にして、行内で高さがずれないようにする */
.shot-img {
  display: block;
  width: 100%;
  height: auto;
  outline: 1px solid var(--line);
  outline-offset: -1px;
  background: var(--surface);
}
@keyframes shot-in {
  from {
    opacity: 0;
  }
}

/* =====================================================================
   トップページ
   ===================================================================== */
.top {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 100px var(--sp-6) 0;
  text-align: center;
}
.top .mono-label {
  letter-spacing: var(--ls-label);
}
.top-title {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: var(--fs-top-title);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
}
.top .divider {
  align-self: stretch;
  margin-top: 18px;
}
.top-desc {
  align-self: stretch;
  margin: 18px 0 0;
  text-align: left;
  font-size: var(--fs-body);
  line-height: 2;
  color: var(--text-body);
}
.top-section {
  margin-top: var(--sp-10);
}
.steps {
  align-self: stretch;
  margin: var(--sp-3) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.steps li {
  display: flex;
  gap: var(--sp-4);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.step-no {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: var(--fs-note);
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-muted);
}
.step-text {
  flex: 1;
  font-size: var(--fs-ui);
  line-height: 1.8;
}
.top-note {
  align-self: stretch;
  margin: var(--sp-4) 0 0;
  text-align: left;
  font-size: var(--fs-note);
  line-height: 1.8;
  color: var(--text-sub);
}
.top .btn-secondary {
  margin-top: 28px;
  min-height: 52px;
  border-color: var(--text);
}
.top .btn-secondary .btn-label {
  font-weight: 700;
  letter-spacing: 0.08em;
}
@media (min-width: 1024px) {
  .top {
    padding-top: 140px;
  }
}

/* =====================================================================
   進行度設定のボトムシート（progress.js）
   ===================================================================== */
.sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--scrim);
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  max-height: 88dvh;
  margin: 0 auto;
  padding: var(--sp-3) var(--gutter) max(28px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
  animation: sheet-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (min-width: 1024px) {
  .sheet {
    padding-left: var(--sp-8);
    padding-right: var(--sp-8);
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}
@keyframes sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}
.sheet:focus {
  outline: none;
}
.sheet-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sheet-top .mono-label {
  letter-spacing: 0.16em;
}
.sheet-icon {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: var(--fs-sheet-title);
  cursor: pointer;
}
.sheet-icon:hover {
  color: var(--text);
}
.sheet-close {
  margin-right: -12px;
}
.sheet-back {
  width: 32px;
  margin-left: -8px;
  font-size: var(--fs-button);
}
.sheet-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  font-size: var(--fs-sheet-title);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-align: center;
}
.sheet-title .marker {
  width: 10px;
  height: 10px;
}
.sheet-desc {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-note);
  line-height: 1.6;
  color: var(--text-sub);
  text-align: center;
}
.sheet-list {
  margin: var(--sp-4) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.sheet-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: var(--row-h);
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.sheet-row:hover {
  background: rgba(228, 224, 212, 0.04);
}
.sheet-row .marker {
  width: 10px;
  height: 10px;
}
.sheet-row-name {
  flex: 1;
}
.sheet-row-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.sheet-row-chevron {
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  color: var(--text-muted);
}
/* パッチの行（選択中は反転） */
.sheet-patch {
  min-height: 50px;
  padding: 0 var(--sp-3);
}
.sheet-radio {
  display: grid;
  place-items: center;
  flex: none;
  width: 12px;
  height: 12px;
  border: 1px solid var(--line-strong);
}
.sheet-radio::after {
  content: '';
  width: 6px;
  height: 6px;
}
.sheet-patch-ver {
  width: 44px;
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 500;
}
.sheet-patch-label {
  font-size: var(--fs-note);
  color: var(--text-sub);
}
.sheet-patch[aria-checked='true'] {
  background: var(--text);
  color: var(--on-primary);
}
.sheet-patch[aria-checked='true'] .sheet-radio {
  border-color: var(--on-primary);
}
.sheet-patch[aria-checked='true'] .sheet-radio::after {
  background: var(--on-primary);
}
.sheet-patch[aria-checked='true'] .sheet-patch-label {
  color: var(--line);
}
.sheet .btn-primary {
  margin-top: 18px;
  letter-spacing: 0.16em;
}
.sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-muted);
}

/* =====================================================================
   拡大表示（viewer.js）。黒い全画面に画像だけを置く
   ===================================================================== */
.xv {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  touch-action: none; /* 拡大・スワイプは viewer.js で処理する */
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.xv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 7, 0.97);
}
.xv-track {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.xv-slide {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.xv-img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  max-width: none;
  transform-origin: 0 0;
  -webkit-touch-callout: none;
  cursor: zoom-in;
}
.xv.is-zoomed .xv-img {
  cursor: grab;
}
.xv-anim .xv-track,
.xv-anim .xv-slide,
.xv-anim .xv-img {
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.xv-anim .xv-backdrop,
.xv-anim {
  transition: opacity 0.26s ease;
}
/* ボタン類（1回タップで隠せる） */
.xv-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.xv.is-ui-hidden .xv-ui,
.xv.is-dragging .xv-ui,
.xv.is-opening .xv-ui,
.xv.is-closing .xv-ui {
  opacity: 0;
}
.xv.is-ui-hidden .xv-ui * {
  pointer-events: none !important;
}
.xv-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(22, 22, 20, 0.86);
  color: var(--text);
  cursor: pointer;
  pointer-events: auto;
}
.xv-btn:hover {
  border-color: var(--text-sub);
}
.xv-btn svg {
  width: 20px;
  height: 20px;
}
.xv-btn[disabled] {
  display: none;
}
.xv-close {
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
}
.xv-open {
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
}
.xv-open svg {
  width: 18px;
  height: 18px;
}
.xv-count {
  position: absolute;
  top: max(22px, calc(env(safe-area-inset-top) + 10px));
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  border: 1px solid var(--line);
  background: rgba(22, 22, 20, 0.86);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  line-height: 1.6;
  letter-spacing: var(--ls-label-tight);
  font-variant-numeric: tabular-nums;
}
.xv-prev,
.xv-next {
  top: 50%;
  margin-top: calc(var(--tap) / -2);
}
.xv-prev {
  left: max(16px, env(safe-area-inset-left));
}
.xv-next {
  right: max(16px, env(safe-area-inset-right));
}
/* タッチ操作の端末ではスワイプで移動するので矢印は出さない */
@media (hover: none), (max-width: 599px) {
  .xv-prev,
  .xv-next {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
