/* Hinan Lab のページ（トップ・プライバシーポリシー・404）: 白基調のミニマルなデザイン。
   Hinan Games のページは別の見た目（games/css/games.css）。ロゴと色が決まったら、ここの変数を直す */
:root {
  --bg: #ffffff;
  --ink: #111111;
  --sub: #6b6b6b;
  --faint: #a3a3a3;
  --line: #e7e7e7;
  --hover: #f6f6f6;
  --max: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --header: 64px;
  /* 英字は Helvetica（Mac・iPhone にある。無い環境〈Windows など〉では Arial） */
  --latin: "Helvetica Neue", Helvetica, Arial;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--latin), "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}
html:lang(zh-Hans) body { font-family: var(--latin), "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
html:lang(zh-Hant) body { font-family: var(--latin), "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; }
html:lang(ko) body { font-family: var(--latin), "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; word-break: keep-all; }
html:lang(en) body { letter-spacing: 0; line-height: 1.7; }
[hidden] { display: none !important; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ヘッダー */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 32px; height: var(--header); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--latin), sans-serif; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; margin-right: auto; }
.wordmark-mark { width: 17px; height: 20px; flex: none; color: var(--ink); }
/* トップでは、最初の画面に名前があるので、ヘッダーはマークだけ（名前は読み上げには残す） */
.wordmark.mark-only span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav { display: flex; gap: 28px; font-size: 14px; }
.nav a { color: var(--sub); text-decoration: none; white-space: nowrap; transition: color 0.2s; }
.nav a:hover { color: var(--ink); }
.lang {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23111' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0;
  padding: 5px 30px 5px 14px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lang:hover { border-color: var(--ink); }
/* メニュー: 行き先と言語の欄（js/site.js が .menu にまとめる）。広い画面ではヘッダーに並べ、
   スマートフォンでは右上のボタンで開く（下の @media） */
.menu { display: flex; align-items: center; gap: 32px; }
.menu-button { display: none; }

/* 最初の画面: ロゴの扉の向こうに、作品が順に見える（index.html・js/site.js の「扉」） */
/* トップは、ヘッダー・扉・下の帯だけを 1 画面に収め、スクロールさせない */
html.home, html.home body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.home { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100svh; min-height: 0; }
body.home main { display: flex; min-height: 0; }
body.home .footer .wrap { padding-top: 14px; padding-bottom: 16px; }
/* トップは、ヘッダーと下の帯の区切りの線を引かない */
body.home .header { border-bottom: 0; }
body.home .footer { border-top: 0; }
/* 扉の大きさは、上下の余白で決める（余白を広くすると、扉が小さくなる） */
.door-hero { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: end; gap: var(--gutter); padding-top: clamp(32px, 10vh, 112px); padding-bottom: clamp(32px, 10vh, 112px); }
.door-link { display: block; height: 100%; min-height: 0; }
.door { display: block; height: 100%; width: auto; max-width: 100%; aspect-ratio: 1083 / 1276; }
.door-mark { color: var(--ink); }
/* 暗い絵（LIMap の地図）は、ロゴの黒が沈まないよう、少し明るくして敷く */
.door-slide[data-dark] { filter: brightness(1.9) contrast(0.9); }
.door-slide { opacity: 0; transition: opacity 1.2s ease; }
.door-slide.on { opacity: 1; }
.door-side { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.door-side h1 { margin: 0; font-family: var(--latin), sans-serif; font-size: 15px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.door-side.right { display: grid; justify-items: end; text-align: right; }
.door-work { grid-area: 1 / 1; max-width: 100%; display: flex; flex-direction: column; gap: 4px; opacity: 0; visibility: hidden; transition: opacity 0.6s, visibility 0.6s; text-decoration: none; }
.door-work.on { opacity: 1; visibility: visible; }
.door-work .no { font-family: var(--latin), sans-serif; font-size: 13px; letter-spacing: 0.08em; color: var(--sub); }
.door-work .name { font-size: clamp(16px, 1.6vw, 20px); font-weight: 600; line-height: 1.4; text-wrap: balance; word-break: keep-all; }
/* 矢印は、名前の最後の語から離さない（長い名前は 2 行に折り返す） */
.door-work .name::after { content: "\00a0→"; }
.door-work .kind { font-family: var(--latin), sans-serif; font-size: 14px; color: var(--sub); }
.door-work .credit { font-family: var(--latin), sans-serif; font-size: 11px; color: var(--faint); }
.door-work:hover .name { text-decoration: underline; text-underline-offset: 5px; }

/* 作品（写真を主役にしたポートフォリオ） */
.works { padding-bottom: clamp(72px, 11vw, 136px); }
.works-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--ink); margin-bottom: clamp(20px, 3vw, 32px); }
.works-head h1, .works-head h2 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
/* 作品の一覧のページ（/works/） */
.works-page { padding-top: clamp(48px, 8vw, 96px); }
/* 作品のカードの下の、Steam へのリンク（カードとは別のリンク） */
.work-steam { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: text-decoration-color 0.2s; }
.work-steam::after { content: "↗"; }
.work-steam:hover { text-decoration-color: currentColor; }
.count { font-family: var(--latin), sans-serif; font-size: 13px; color: var(--faint); letter-spacing: 0.04em; }
.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 6vw, 72px) clamp(16px, 2.4vw, 28px); }
.work { display: block; text-decoration: none; color: inherit; }
.visual { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--hover); }
.visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
/* 恐怖診断のカバー（Steam のメインの画像）は、左端にロゴがあるので、16:10 に切るとき、左をあまり切らない */
.visual .iaft-key { object-position: 15% center; }
/* 写真全体の代表（いちばん新しいシリーズの代表の写真）。縦長の写真でも上の方〈標識など〉が残るように */
.work:hover .visual img, .work:focus-visible .visual img { transform: scale(1.03); }
/* LIMap は、埋め込みの写真を載せないよう、LIMap の色の地にアイコンとロゴを置く */
.visual.limap { display: flex; align-items: center; justify-content: center; gap: 6%; background: #1a1a1a; }
.visual.limap img { width: auto; height: auto; object-fit: contain; }
.visual.limap .limap-icon { width: 18%; border-radius: 22%; }
.visual.limap .limap-logo { width: 34%; }
.work:hover .visual.limap img { transform: scale(1.05); }
.caption { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding-top: 16px; }
.caption .title { font-size: clamp(17px, 1.8vw, 20px); font-weight: 600; letter-spacing: -0.005em; }
.caption .title::after { content: " →"; display: inline-block; margin-left: 4px; opacity: 0; transform: translateX(-6px); transition: opacity 0.25s, transform 0.25s; }
.work:hover .caption .title::after, .work:focus-visible .caption .title::after { opacity: 1; transform: none; }
.caption .meta { order: -1; margin-bottom: 4px; font-family: var(--latin), sans-serif; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sub); white-space: nowrap; }
.caption .desc { grid-column: 1 / -1; color: var(--sub); font-size: 14px; line-height: 1.8; }

/* 区切り（見出し ＋ 中身） */
.section { display: grid; grid-template-columns: minmax(180px, 1fr) 2.4fr; gap: 24px var(--gutter); padding: clamp(72px, 11vw, 136px) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 6px; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
.lead { margin: 0; font-size: clamp(20px, 2.6vw, 28px); line-height: 1.75; font-weight: 500; letter-spacing: 0.01em; }
html:lang(en) .lead { line-height: 1.5; letter-spacing: -0.01em; }

/* プライバシーポリシー・404 */
.doc { max-width: 760px; padding-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(72px, 10vw, 120px); }
.doc h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 44px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.doc .updated { margin: 0 0 40px; color: var(--sub); font-size: 13px; }
.doc h2 { margin: 48px 0 8px; font-size: 17px; font-weight: 600; }
.doc p { margin: 0 0 16px; }
.back { display: inline-flex; align-items: center; gap: 10px; margin-top: 40px; padding: 12px 22px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-size: 14px; transition: background 0.2s, color 0.2s; }
.back::before { content: "←"; }
.back:hover { background: var(--ink); color: var(--bg); }

main { flex: 1; }

/* フッター */
.footer { border-top: 1px solid var(--line); font-size: 13px; color: var(--sub); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 36px; }
.footer a { color: var(--sub); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
/* X・Threads のロゴのボタン */
.social { display: inline-flex; align-items: center; gap: 4px; }
.social a { display: inline-flex; padding: 6px; color: var(--sub); }
.social a:hover { color: var(--ink); }
.social svg { width: 16px; height: 16px; }

/* 作品のページ（共通のレイアウト。/works/〈作品〉/） */
.work-page { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(72px, 10vw, 120px); }
.crumbs { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); text-decoration: none; }
.crumbs::before { content: "←"; transition: transform 0.2s; }
.crumbs:hover { color: var(--ink); }
.crumbs:hover::before { transform: translateX(-4px); }
.work-head { padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); }
.work-head .meta { margin: 0 0 14px; font-family: var(--latin), sans-serif; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); }
.work-head h1 { margin: 0; font-size: clamp(34px, 6vw, 72px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.work-head .sub { margin: 6px 0 0; color: var(--sub); font-size: clamp(15px, 1.6vw, 18px); }
.work-hero { margin: 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--hover); }
.work-hero img { width: 100%; height: 100%; object-fit: cover; }
.work-hero.limap { display: flex; align-items: center; justify-content: center; gap: 5%; background: #1a1a1a; }
.work-hero.limap img { width: auto; height: auto; object-fit: contain; }
.work-hero.limap .limap-icon { width: 14%; border-radius: 22%; }
.work-hero.limap .limap-logo { width: 28%; }

.work-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px var(--gutter); padding: clamp(48px, 7vw, 88px) 0; }
.facts { margin: 0; border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
html:lang(en) .facts div { grid-template-columns: 6.5em minmax(0, 1fr); }
.facts dt { color: var(--sub); }
.facts dd { margin: 0; }
/* 作品のページの説明文: 小さく細く（ミニマルに。どの作品も同じ） */
.work-text p { margin: 0 0 16px; font-size: 15px; font-weight: 300; line-height: 2.1; letter-spacing: 0.04em; }
html:lang(en) .work-text p { line-height: 1.85; letter-spacing: 0.01em; }
.work-text .lead { margin-bottom: 20px; white-space: pre-line; }
.work-text .note { color: var(--sub); font-size: 14px; }
/* 文書のページ（配信・動画投稿のガイドラインなど）: 作品のページの文と同じ字で、読みやすい幅に */
.doc { max-width: 720px; padding-bottom: 8px; }
.doc p, .doc li { font-size: 15px; font-weight: 300; line-height: 2.1; letter-spacing: 0.04em; }
html:lang(en) .doc p, html:lang(en) .doc li { line-height: 1.85; letter-spacing: 0.01em; }
.doc p { margin: 0 0 16px; }
.doc .lead { font-weight: 400; margin-bottom: 20px; }
.doc ul { margin: 0 0 16px; padding-left: 1.2em; }
.doc li { margin: 0 0 6px; }
.doc h2 { margin: clamp(40px, 6vw, 56px) 0 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
.doc a { text-underline-offset: 4px; }
.doc .contact { margin-top: clamp(40px, 6vw, 56px); color: var(--sub); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 24px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500; text-align: center; transition: background 0.2s, color 0.2s; }
.btn::after { content: "→"; transition: transform 0.2s; }
.btn[target="_blank"]::after { content: "↗"; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:hover::after { transform: translateX(3px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: #333; }

.work-section { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.work-section > h2 { margin: 0 0 28px; font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--hover); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); margin-top: 40px; }
.figures p { margin: 0; padding-top: 14px; border-top: 1px solid var(--ink); }
.figures .value { display: block; font-family: var(--latin), sans-serif; font-size: clamp(40px, 6vw, 64px); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.figures .label { display: block; margin-top: 8px; color: var(--sub); font-size: 14px; }
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px var(--gutter); list-style: none; margin: 0; padding: 0; }
.points li { padding-top: 14px; border-top: 1px solid var(--line); }
.points h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.points p { margin: 0; color: var(--sub); font-size: 14px; line-height: 1.8; }
.link-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.link-list a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 15px; }
.link-list a::after { content: "↗"; color: var(--sub); }
.link-list a:hover::after { color: var(--ink); }

/* 写真（/works/photography/。tools/photos-build.mjs が作るページ） */
.work-section.first { border-top: 0; padding-top: 8px; }
.series-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 64px) clamp(16px, 2.4vw, 28px); }
.series-card { display: block; text-decoration: none; }
.series-card .visual { aspect-ratio: 3 / 2; }
.series-card:hover .visual img { transform: scale(1.03); }
.series-card:hover .caption .title::after { opacity: 1; transform: none; }
/* 写真を、それぞれの縦横の比のまま、左から順に行に詰める（切り取らない） */
.photo-grid { display: flex; flex-wrap: wrap; gap: clamp(8px, 1.2vw, 14px); }
.photo-grid::after { content: ""; flex: 10 1 0; }
.photo { flex: var(--r) 1 calc(var(--r) * 220px); margin: 0; }
.photo a { display: block; overflow: hidden; background: var(--hover); cursor: zoom-in; }
.photo img { width: 100%; height: auto; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.photo a:hover img { transform: scale(1.02); }
/* シリーズのページ: タイトルのすぐ下に、写真を大きめに並べる */
.series-photos .photo { flex-basis: calc(var(--r) * 340px); }
/* 写真がまだ無いシリーズ（準備中）: 写真の代わりに Hinan Lab のマークを薄く */
.pending { display: flex; align-items: center; justify-content: center; color: var(--line); }
.pending-mark { width: auto; height: 46%; }
.photo-soon { margin: 0; color: var(--sub); font-size: 15px; font-weight: 300; letter-spacing: 0.04em; }
/* 大きく見る */
html.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; background: rgba(255, 255, 255, 0.97); }
.lightbox[hidden] { display: none; }
.lightbox figure { grid-column: 2; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: 100%; max-height: calc(100svh - 120px); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { font-size: 13px; color: var(--sub); text-align: center; }
.lightbox button { border: 0; background: none; color: var(--ink); font: inherit; font-size: 22px; line-height: 1; padding: 16px; cursor: pointer; }
.lightbox button:hover { color: var(--sub); }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-close { position: absolute; top: 8px; right: 8px; font-size: 28px !important; }
.lb-count { position: absolute; top: 18px; left: 24px; margin: 0; font-family: var(--latin), sans-serif; font-size: 13px; color: var(--sub); }

/* 次の作品 */
.next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gutter); align-items: center; padding-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--ink); text-decoration: none; }
.next .label { display: block; font-size: 13px; color: var(--sub); }
.next .name { display: block; margin-top: 6px; font-size: clamp(24px, 3.4vw, 40px); font-weight: 700; letter-spacing: -0.01em; }
.next .name::after { content: " →"; transition: margin 0.2s; }
.next:hover .name::after { margin-left: 8px; }
.next .visual { aspect-ratio: 16 / 9; }
.next:hover .visual img { transform: scale(1.03); }

/* 開いたときに、文が下から現れる（動きを減らす設定なら、しない） */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .rise.d1 { animation-delay: 0.15s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 760px) {
  .series-photos .photo { flex-basis: calc(var(--r) * 200px); }
  .header .wrap { gap: 16px; }
  /* メニュー: 右上のボタン（2 本線。開くと ×）で、ヘッダーの下を覆う白い面を出す */
  .menu-button { display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; margin-right: -11px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
  .menu-button span { display: block; width: 22px; height: 1.5px; background: currentColor; transition: transform 0.3s; }
  .header.open .menu-button span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .header.open .menu-button span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .menu { position: absolute; top: 100%; left: 0; right: 0; height: calc(100svh - var(--header)); flex-direction: column; align-items: flex-start; gap: 36px; padding: 28px var(--gutter); background: var(--bg); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
  .header.open .menu { opacity: 1; visibility: visible; }
  .menu .nav { flex-direction: column; gap: 10px; font-size: 26px; font-weight: 500; letter-spacing: 0; }
  .menu .nav a { color: var(--ink); }
  html.menu-open, html.menu-open body { overflow: hidden; }
  .door-hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; align-content: center; justify-items: center; text-align: center; gap: 14px; padding-top: 16px; padding-bottom: 16px; }
  /* 扉は、幅の 76% まで。画面の低いスマートフォンでは、作品名と下の帯が収まるよう、高さで小さくする。扉と作品名は、まとめて上下の真ん中に */
  .door-link { order: -1; display: flex; justify-content: center; width: 100%; height: auto; }
  .door { width: auto; max-width: 100%; height: min(calc((100vw - 2 * var(--gutter)) * 0.76 * 1276 / 1083), calc(100svh - 400px)); }
  .door-side { padding-bottom: 0; }
  /* スマートフォンのトップの下の帯は、コピーライトとメールアドレスだけ（1 行） */
  body.home .footer .wrap { flex-wrap: nowrap; align-items: center; }
  body.home .footer nav > a:not([data-config="contactEmail"]), body.home .footer .social { display: none; }
  .door-side, .door-side.right { justify-items: center; text-align: center; }
  .works-grid { grid-template-columns: minmax(0, 1fr); }
  .section { grid-template-columns: 1fr; gap: 28px; }
  .section-head { flex-direction: row; gap: 14px; align-items: baseline; }
  .work-body, .next { grid-template-columns: minmax(0, 1fr); }
  .gallery, .points, .link-list, .series-grid { grid-template-columns: minmax(0, 1fr); }
  .photo { flex-basis: calc(var(--r) * 140px); }
  .lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .lightbox button { padding: 10px; }
  .actions .btn { flex: 1 1 100%; }
}
