@charset "utf-8";

/* =========================================================
   奥寺 新之介 ポートフォリオ
   ・紙の白と墨色を土台に、作品の色だけが前に出るように組む
   ・見出し／作品名は明朝、本文・注記はゴシック
   ・印象に残す場所はトップのスマホ群の1か所だけ
   ========================================================= */

:root {
  color-scheme: light;
  --particle: #1f4e6e;
  --particle-a: 0.22;
  --paper: #f5f2eb;
  --paper-2: #ebe6db;
  --ink: #1c1d1f;
  --ink-2: #4d5156;      /* 紙色上で約7:1 */
  --line: #cfc8b9;
  --focus: #1f4e6e;      /* 藍。フォーカス枠にのみ使う */

  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --gothic: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
  --measure: 34em;       /* 本文1行の上限（全角約34字） */
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.04em;
  line-break: strict;
  overflow-wrap: anywhere;
  word-break: normal;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, dl, dd, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* 明朝の見出しは約物を詰めて組む */
.mincho,
h1, h2, h3 {
  font-family: var(--mincho);
  font-weight: 500;
  font-feature-settings: "palt";
  letter-spacing: 0.08em;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.2s;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 0.5em 1em;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------
   見出し帯（全ページ共通）
   --------------------------------------------------------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5em 2em;
  padding: 28px var(--gutter) 0;
  position: relative;
  z-index: 2;
}
.site-header .name {
  font-family: var(--mincho);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-decoration: none;
}
.site-header nav ul {
  display: flex;
  gap: 1.75em;
  font-size: 0.875rem;
}

/* ---------------------------------------------------------
   トップ：スマホに映るいくつものサイト
   --------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-intro {
  position: relative;
  z-index: 1;
  padding: clamp(40px, 8vw, 96px) var(--gutter) 0;
  max-width: 44rem;
}
.hero-intro h1 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  letter-spacing: 0.14em;
  line-height: 1.6;
}
.hero-intro p {
  margin-top: 1.25em;
  max-width: var(--measure);
  color: var(--ink-2);
}

.phones {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(16px, 2.4vw, 40px);
  padding: clamp(40px, 6vw, 72px) var(--gutter) 0;
}
.phones li:nth-child(1) { margin-top: 72px; }
.phones li:nth-child(2) { margin-top: 24px; }
.phones li:nth-child(3) { margin-top: 0; }      /* メイン */
.phones li:nth-child(4) { margin-top: 56px; }
.phones li:nth-child(5) { margin-top: 112px; }
.phones .is-main .phone { width: clamp(176px, 17vw, 262px); }

.phone {
  display: block;
  width: clamp(146px, 14vw, 216px);
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.phone:hover { transform: translateY(-8px); }
.phone:focus-visible { outline-offset: 8px; border-radius: 24px; }

/* --- 実機らしいスマホ ---
   金属の縁・側面ボタン・浮いた切り欠き・ステータス表示・ホームインジケーター・映り込み */
.phone-body {
  position: relative;
  aspect-ratio: 9 / 19.3;
  padding: 3.4%;
  border-radius: 15% / 7%;
  background: linear-gradient(150deg, #4a4c51 0%, #1a1b1e 22%, #111214 60%, #33353a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.28),
    inset 0 0 0 3px #0b0b0d,
    0 2px 3px rgba(0,0,0,.25),
    0 28px 50px -22px rgba(20, 24, 32, .6);
}
/* 左：音量ボタン2つ（1本の帯を途中で透かして2つに見せる） */
.phone-body::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 21%;
  width: 3px;
  height: 15%;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(#2c2d31 0 44%, transparent 44% 56%, #2c2d31 56% 100%);
}
/* 右：電源ボタン */
.phone-body::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 27%;
  width: 3px;
  height: 11%;
  border-radius: 0 2px 2px 0;
  background: #2c2d31;
}
.screen {
  position: relative;
  height: 100%;
  border-radius: 12% / 5.6%;
  overflow: hidden;
  container-type: inline-size;
  background: #000;
}
.screen::before {          /* 画面から浮いた楕円の切り欠き */
  content: "";
  position: absolute;
  top: 3.2cqw; left: 50%;
  width: 30cqw; height: 8.6cqw;
  translate: -50% 0;
  border-radius: 10cqw;
  background: #050506;
  z-index: 6;
}
.screen::after {           /* ホームインジケーター */
  content: "";
  position: absolute;
  left: 50%; bottom: 2.4cqw;
  width: 36cqw; height: 1.5cqw;
  translate: -50% 0;
  border-radius: 2cqw;
  background: #fff;
  mix-blend-mode: difference;
  opacity: .8;
  z-index: 6;
}
.glare {                   /* ガラスの映り込み */
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.04) 28%, transparent 42%);
}
/* ステータス表示：時刻（左）と電波・Wi-Fi・電池（右）。色は各画面の文字色に合わせる */
.ms::after {
  content: "9:41";
  position: absolute;
  top: 4.6cqw; left: 10cqw;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 4.4cqw;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  z-index: 4;
}
.ms::before {
  content: "";
  position: absolute;
  top: 4.7cqw; right: 8cqw;
  width: 19cqw; height: 4cqw;
  background: currentColor;
  z-index: 4;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 16'%3E%3Crect x='0' y='10' width='3' height='5' rx='1'/%3E%3Crect x='5' y='7' width='3' height='8' rx='1'/%3E%3Crect x='10' y='4' width='3' height='11' rx='1'/%3E%3Crect x='15' y='1' width='3' height='14' rx='1'/%3E%3Cpath d='M31 4.5a10 10 0 0 1 13 0l-1.6 1.7a7.7 7.7 0 0 0-9.8 0zM34 8a5.6 5.6 0 0 1 7 0l-1.6 1.7a3.3 3.3 0 0 0-3.8 0zM37.5 11.5l1.5 1.6 1.5-1.6a2 2 0 0 0-3 0z'/%3E%3Crect x='51.5' y='2.5' width='20' height='11' rx='3' fill='none' stroke='black' stroke-opacity='.45'/%3E%3Crect x='53.5' y='4.5' width='14' height='7' rx='1.6'/%3E%3Cpath d='M73.5 6v4a2 2 0 0 0 0-4z' fill-opacity='.45'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 16'%3E%3Crect x='0' y='10' width='3' height='5' rx='1'/%3E%3Crect x='5' y='7' width='3' height='8' rx='1'/%3E%3Crect x='10' y='4' width='3' height='11' rx='1'/%3E%3Crect x='15' y='1' width='3' height='14' rx='1'/%3E%3Cpath d='M31 4.5a10 10 0 0 1 13 0l-1.6 1.7a7.7 7.7 0 0 0-9.8 0zM34 8a5.6 5.6 0 0 1 7 0l-1.6 1.7a3.3 3.3 0 0 0-3.8 0zM37.5 11.5l1.5 1.6 1.5-1.6a2 2 0 0 0-3 0z'/%3E%3Crect x='51.5' y='2.5' width='20' height='11' rx='3' fill='none' stroke='black' stroke-opacity='.45'/%3E%3Crect x='53.5' y='4.5' width='14' height='7' rx='1.6'/%3E%3Cpath d='M73.5 6v4a2 2 0 0 0 0-4z' fill-opacity='.45'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ms-real, .ms-full { color: #fff; }
.phone-label {
  display: block;
  margin-top: 14px;
  font-family: var(--mincho);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-align: center;
}
.phone-label small {
  display: block;
  font-family: var(--gothic);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.hero-note {
  position: relative;
  z-index: 1;
  margin: 48px var(--gutter) 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
  max-width: var(--measure);
}

/* --- 画面の中の小さなサイト（cqw = 画面幅の1%） --- */
:where(.phone) span { display: block; }
.ms { position: absolute; inset: 0; display: flex; flex-direction: column; font-size: 5.4cqw; line-height: 1.6; letter-spacing: .06em; }
.ms img { width: 100%; height: 100%; object-fit: cover; }
.ms-bar { display: flex; justify-content: space-between; align-items: center; padding: 16cqw 7cqw 4cqw; font-size: 4.6cqw; }
.ms-bar i { display: block; width: 7cqw; height: 4cqw; border-block: 1px solid currentColor; }

/* 0. 実際に制作したサイトの画面をそのまま映す */
.ms-real { background: #0d0c0b; padding-top: 14cqw; }
.ms-real img { object-position: 0 0; }

/* 宿の案内サイト（縦組みの明朝） */
.ms-inn { background: #f4efe4; color: #2a2118; }
.ms-inn .ms-img { height: 44%; }
.ms-inn .ms-img img { object-position: 50% 30%; }
.ms-inn .ms-v { writing-mode: vertical-rl; font-family: var(--mincho); font-size: 7.6cqw; line-height: 1.7; letter-spacing: .18em; padding: 7cqw 8cqw 0; align-self: flex-end; }
.ms-inn .ms-sub { position: absolute; left: 8cqw; bottom: 9cqw; font-family: var(--mincho); font-size: 4.8cqw; line-height: 1.8; color: #6b5a48; }

/* 1. 展示の案内サイト */
.ms-guide { background: #fbfaf7; color: #1c1d1f; }
.ms-guide .ms-img { height: 52%; }
.ms-guide .ms-body { padding: 6cqw 7cqw; }
.ms-guide .ms-title { font-family: var(--mincho); font-size: 9cqw; line-height: 1.45; letter-spacing: .1em; font-feature-settings: "palt"; }
.ms-guide .ms-text { margin-top: 3cqw; font-size: 4.4cqw; color: #55595e; }
.ms-guide .ms-rule { margin-top: 5cqw; border-top: 1px solid #d8d2c6; padding-top: 3cqw; font-size: 4.2cqw; }

/* 2. ゲームの紹介サイト */
.ms-game { background: #1e2b4d; color: #f3ead2; }
.ms-game .ms-title { padding: 0 7cqw; font-family: var(--mincho); font-size: 10cqw; line-height: 1.2; letter-spacing: .02em; }
.ms-game .ms-meta { padding: 2cqw 7cqw 5cqw; font-size: 4.2cqw; opacity: .8; }
.ms-game .ms-img { height: 34%; }
.ms-game .ms-sub { padding: 8cqw 7cqw 4cqw; font-family: var(--mincho); font-size: 5cqw; line-height: 1.7; }
.ms-game .ms-img2 { flex: 1; min-height: 0; }
.ms-game .ms-btn { margin: 7cqw 7cqw 0; padding: 3cqw 0; border: 1px solid currentColor; text-align: center; font-size: 4.6cqw; }

/* 3. 作品を見せるギャラリーサイト（縦組み） */
.ms-gallery { background: #b5463f; color: #f7eddc; flex-direction: row; }
.ms-gallery .ms-v { writing-mode: vertical-rl; font-family: var(--mincho); font-size: 8.5cqw; letter-spacing: .3em; padding: 18cqw 5cqw 0 6cqw; }
.ms-gallery .ms-img { flex: 1; margin: 30cqw 0 30cqw; }
.ms-gallery .ms-img img { object-fit: cover; object-position: 30% 50%; }

/* 4. 催しの告知サイト */
.ms-event { background: #0a0b10; color: #fff; }
.ms-event .ms-img { height: 58%; }
.ms-event .ms-date { padding: 6cqw 7cqw 0; font-family: var(--mincho); font-size: 10cqw; line-height: 1.2; letter-spacing: .02em; }
.ms-event .ms-text { padding: 3cqw 7cqw; font-family: var(--mincho); font-size: 5cqw; line-height: 1.7; opacity: .9; }

/* 5. 映像を全画面で流すサイト */
.ms-full { background: #000; color: #fff; }
.ms-full .ms-img { position: absolute; inset: 0; }
.ms-full .ms-cap { position: absolute; left: 7cqw; right: 7cqw; bottom: 8cqw; font-family: var(--mincho); font-size: 6cqw; letter-spacing: .14em; line-height: 1.6; text-shadow: 0 1px 8px rgba(0,0,0,.8); }

/* ---------------------------------------------------------
   本文の節
   --------------------------------------------------------- */
main > section { padding: clamp(64px, 10vw, 128px) var(--gutter) 0; }

.section-title {
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.625rem);
  letter-spacing: 0.24em;
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* 作品一覧：大きな図版＋縦に並ぶ情報 */
.works > li + li { margin-top: clamp(72px, 10vw, 128px); }
.work {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
}
.work-figure { display: block; background: var(--paper-2); }
.work-figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.work-num {
  font-family: var(--mincho);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  color: var(--ink-2);
}
.work h3 {
  margin-top: 0.25em;
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
  letter-spacing: 0.1em;
}
.work h3 a { text-decoration: none; }
.work h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.work-summary { margin-top: 1em; font-size: 0.9375rem; color: var(--ink-2); }

.meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35em 1.5em;
  margin-top: 1.5em;
  padding-top: 1.25em;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  line-height: 1.8;
}
.meta dt { color: var(--ink-2); }

/* プロフィール・連絡先 */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 56px);
}
.prose p + p { margin-top: 1.2em; }
.prose { max-width: var(--measure); }
.tools { margin-top: 1.75em; font-size: 0.875rem; color: var(--ink-2); }
.tools dt { font-family: var(--mincho); color: var(--ink); letter-spacing: .12em; }
.tools dd + dt { margin-top: 0.75em; }

.site-footer {
  margin-top: clamp(80px, 12vw, 160px);
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--ink-2);
}

/* 未確定の箇所（公開前に必ず埋める） */
.todo {
  background: #fff3b0;
  color: #3d3300;
  padding: 0 .25em;
  font-style: normal;
}

/* ---------------------------------------------------------
   作品ページ
   --------------------------------------------------------- */
.work-head { padding: clamp(48px, 8vw, 96px) var(--gutter) 0; }
.work-head .work-num { display: block; margin-bottom: .5em; }
.work-head h1 {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  letter-spacing: 0.12em;
}
.work-head .lead { margin-top: 1.25em; max-width: var(--measure); font-size: 1.0625rem; }
.work-head .meta { max-width: 36rem; }

.plates { padding: clamp(48px, 7vw, 88px) var(--gutter) 0; }
.plates figure + figure,
.plates .pair + figure,
.plates figure + .pair { margin-top: clamp(40px, 6vw, 80px); }
.plates figcaption {
  margin-top: 0.75em;
  font-size: 0.8125rem;
  color: var(--ink-2);
  max-width: var(--measure);
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
}
.plates .narrow { max-width: 760px; }

.notes { padding: clamp(56px, 8vw, 96px) var(--gutter) 0; }
.notes h2 { font-size: 1.125rem; letter-spacing: .2em; margin-bottom: 1em; }

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1em 2em;
  margin: clamp(72px, 10vw, 120px) var(--gutter) 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}
.pager span { display: block; font-size: .75rem; color: var(--ink-2); }
.pager .next { text-align: right; margin-left: auto; }

/* ---------------------------------------------------------
   スマホ幅
   --------------------------------------------------------- */
@media (max-width: 900px) {
  .phones {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .phones li { flex: 0 0 auto; scroll-snap-align: start; margin-top: 0 !important; }
  .phones li:nth-child(even) { margin-top: 40px !important; }
  .phones li:last-child { padding-right: var(--gutter); }
  .phone { width: 168px; }
  .phones .is-main .phone { width: 196px; }

  .work,
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .pair { grid-template-columns: 1fr; }
  body { letter-spacing: 0.03em; }
}

/* ---------------------------------------------------------
   動きを減らす設定
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .phone:hover { transform: none; }
}

/* 元画像が小さい作品は引き伸ばさず、黒地の中央に原寸近くで置く */
.work-figure.low { background: #111214; display: grid; place-items: center; aspect-ratio: 16 / 10; }
.work-figure.low img { width: auto; max-height: 100%; aspect-ratio: auto; object-fit: contain; }
.plates .low img {
  width: 100%;
  height: min(560px, 70vh);
  object-fit: scale-down;   /* 引き伸ばさない */
  background: #111214;
  padding: clamp(16px, 4vw, 48px);
}

/* スマホ群の動き（phones.js が --rot / --lift / --scale を入れる）
   少し行きすぎて戻る曲線で、ぷるんと止まるようにしている */
.phones li {
  transform: translateY(var(--lift, 0px)) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  transform-origin: 50% 80%;
  transition: transform 0.7s cubic-bezier(.34, 1.56, .64, 1);
}
@media (max-width: 900px) {
  .phones { padding-top: 56px; padding-bottom: 48px; scroll-snap-type: x proximity; }
  .phones li { scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .phones li { transform: none !important; }
}

/* ---------------------------------------------------------
   背景：少年が海へ沈んでいく（トップのみ。deep.js が --depth を入れる）
   紙色から薄い海の色へ。いちばん深いところでも本文は約4.8:1を保つ
   --------------------------------------------------------- */
:root { --sea: #c3d3da; }
html:has(.deep) body {
  background: color-mix(in oklab, var(--paper), var(--sea) calc(var(--depth, 0) * 100%));
}
.deep {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.deep-boy {
  position: absolute;
  top: 0;
  right: 3vw;
  width: clamp(150px, 20vw, 300px);
  opacity: 0.32;
  will-change: transform;
  transform: translate3d(0, -35vh, 0);
}
.hero, main, .site-footer { position: relative; z-index: 1; }
@media (max-width: 900px) {
  .deep-boy { right: -6vw; width: 42vw; opacity: 0.22; }
}

/* ---------------------------------------------------------
   作品の並び：1作品ずつ大きな広告パネルを積み重ねる
   --------------------------------------------------------- */
main > section.works-wall { padding: clamp(40px, 6vw, 72px) 12px 0; }
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tile {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  min-height: 600px;
  padding: clamp(44px, 5vw, 60px) 24px 0;
  background: var(--bg);
  color: var(--fg);
}
.tile-half { grid-column: auto; min-height: 560px; }
.tile h3 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
}
.tile-half h3 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem); }
.tile .tagline {
  margin-top: 0.4em;
  font-family: var(--mincho);
  font-size: clamp(1.0625rem, 0.9rem + 0.8vw, 1.5rem);
  text-wrap: balance;
  word-break: keep-all;
  font-feature-settings: "palt";
  letter-spacing: 0.1em;
  line-height: 1.6;
}
.tile .meta-line {
  margin-top: 0.6em;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  opacity: 0.82;
}
.tile .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.btn {
  display: inline-block;
  min-width: 7.5em;
  padding: 0.62em 1.4em;
  border-radius: 999px;
  border: 1px solid var(--fg);
  font-size: 0.9375rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: transparent; color: var(--fg); }
.btn-secondary { color: var(--fg); }
.btn-secondary:hover { background: var(--fg); color: var(--bg); }
.tile .btn:focus-visible { outline-color: var(--fg); }
.tile-media {
  margin-top: auto;
  padding-top: 36px;
  width: min(100%, var(--w));
}
.tile-media img { width: 100%; height: auto; }

@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; }
  .tile, .tile-half { grid-column: auto; min-height: 0; padding-top: 44px; }
}

/* 写真をそのまま背景にするパネル（解像度が足りる作品だけ）
   上側を暗く落として、白い文字のコントラストを保つ */
.tile-photo {
  position: relative;
  isolation: isolate;
  min-height: clamp(520px, 52vw, 720px);
  --fg: #ffffff;
  --bg: #0b0b0c;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
}
.tile-half.tile-photo { min-height: clamp(480px, 40vw, 600px); }
.tile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.tile-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(0,0,0,.72) 0%, rgba(0,0,0,.48) 32%, rgba(0,0,0,.08) 62%, rgba(0,0,0,0) 100%);
}
.tile-photo .btn { text-shadow: none; }
.tile-photo .btn-primary { color: #111; }

/* 画像をパネルの左右の端まで広げる */
.tile-media-bleed {
  width: calc(100% + 48px);
  margin-inline: -24px;
}
.tile-media-bleed img { width: 100%; }

/* ---------------------------------------------------------
   ダークモード：深海の深い青
   端末の設定に従い、ボタンで選んだときは data-scheme を優先する
   --------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
  color-scheme: dark;
  --paper: #0a2440;      /* 深海の青 */
  --paper-2: #0f2d4d;
  --ink: #e8f0f7;
  --ink-2: #a8bfd2;      /* 深海の青の上で約8:1 */
  --line: #23476b;
  --focus: #8fd0ff;
  --sea: #020b18;        /* いちばん深いところ */
  --particle: #bfe6ff;
  --particle-a: 0.35;
  }
  :root:not([data-scheme="light"]) .deep-boy { filter: invert(1); mix-blend-mode: screen; opacity: .42; }
}
:root[data-scheme="dark"] {
  color-scheme: dark;
  --paper: #0a2440;      /* 深海の青 */
  --paper-2: #0f2d4d;
  --ink: #e8f0f7;
  --ink-2: #a8bfd2;      /* 深海の青の上で約8:1 */
  --line: #23476b;
  --focus: #8fd0ff;
  --sea: #020b18;        /* いちばん深いところ */
  --particle: #bfe6ff;
  --particle-a: 0.35;
}
:root[data-scheme="dark"] .deep-boy { filter: invert(1); mix-blend-mode: screen; opacity: .42; }
html { background: var(--paper); }

/* すりガラスのスイッチ：ライトは左に太陽（橙の光）、ダークは右に月（青の光） */
.site-header nav ul { align-items: center; }
.theme-toggle {
  --tw: 112px; --th: 42px; --kn: 34px;
  position: relative;
  display: block;
  width: var(--tw);
  height: var(--th);
  padding: 0;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 999px;
  background: rgba(255,255,255,.32);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
          backdrop-filter: blur(10px) saturate(140%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.9),
    inset 0 -3px 8px rgba(30,40,60,.08),
    0 8px 20px -10px rgba(20,30,50,.45);
  overflow: hidden;
  cursor: pointer;
  color: var(--ink-2);
  font: 500 .875rem/1 var(--gothic);
  letter-spacing: .04em;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:focus-visible { outline-offset: 3px; border-radius: 999px; }
.tt-glow {
  position: absolute;
  top: -30%; bottom: -30%;
  width: 78%;
  pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
}
.tt-glow-day {
  left: -8%;
  background: radial-gradient(closest-side at 32% 50%, rgba(255,128,32,.95), rgba(255,170,70,.55) 45%, rgba(255,200,120,0) 100%);
}
.tt-glow-night {
  right: -8%;
  opacity: 0;
  transform: translateX(-20%);
  background: radial-gradient(closest-side at 68% 50%, rgba(28,86,255,.95), rgba(70,140,255,.5) 45%, rgba(120,180,255,0) 100%);
}
.tt-knob {
  position: absolute;
  top: calc((var(--th) - var(--kn)) / 2 - 1px);
  left: 3px;
  width: var(--kn); height: var(--kn);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.8);
  background: rgba(255,255,255,.16);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.9), 0 2px 6px rgba(0,0,0,.18);
  transition: transform .5s cubic-bezier(.34, 1.45, .64, 1);
}
.tt-knob svg {
  position: absolute;
  inset: 0; margin: auto;
  width: 60%; height: 60%;
  transition: opacity .35s ease, transform .5s ease;
}
.tt-sun { fill: #fff; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.tt-moon { fill: #fff; opacity: 0; transform: rotate(-60deg) scale(.6); }
.tt-label {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  transition: opacity .35s ease;
}
.tt-day { right: 15px; }
.tt-night { left: 13px; opacity: 0; }

.theme-toggle[aria-checked="true"] .tt-knob { transform: translateX(calc(var(--tw) - var(--kn) - 8px)); }
.theme-toggle[aria-checked="true"] .tt-glow-day { opacity: 0; transform: translateX(20%); }
.theme-toggle[aria-checked="true"] .tt-glow-night { opacity: 1; transform: none; }
.theme-toggle[aria-checked="true"] .tt-sun { opacity: 0; transform: rotate(90deg) scale(.6); }
.theme-toggle[aria-checked="true"] .tt-moon { opacity: 1; transform: none; }
.theme-toggle[aria-checked="true"] .tt-day { opacity: 0; }
.theme-toggle[aria-checked="true"] .tt-night { opacity: 1; }

/* 深海の青の上ではガラスを少し暗めにする */
:root[data-scheme="dark"] .theme-toggle {
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.35), 0 8px 20px -10px rgba(0,0,0,.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) .theme-toggle {
    border-color: rgba(255,255,255,.4);
    background: rgba(255,255,255,.08);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.35), 0 8px 20px -10px rgba(0,0,0,.6);
  }
}
@media (max-width: 560px) {
  .theme-toggle { --tw: 96px; --th: 36px; --kn: 28px; font-size: .8125rem; }
}

/* ---------------------------------------------------------
   ボタンをそろえる：すりガラス＋プルプル（ゼリーのような揺れ）
   transform を使う動きと干渉しないよう、揺れは scale プロパティで付ける
   --------------------------------------------------------- */
@keyframes jelly {
  0%   { scale: 1 1; }
  28%  { scale: 1.12 .88; }
  44%  { scale: .92 1.08; }
  60%  { scale: 1.05 .95; }
  76%  { scale: .98 1.02; }
  100% { scale: 1 1; }
}
.btn {
  position: relative;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
          backdrop-filter: blur(12px) saturate(150%);
  color: #fff;
  text-shadow: none;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.65),
    inset 0 -3px 8px rgba(0,0,0,.14),
    0 10px 22px -12px rgba(0,0,0,.6);
  transition: background-color .25s, box-shadow .25s, scale .15s;
}
.btn-primary {
  background: rgba(255,255,255,.86);
  border-color: rgba(255,255,255,.95);
  color: #141414;
}
.btn-secondary:hover { background: rgba(255,255,255,.24); color: #fff; }
.btn-primary:hover { background: rgba(255,255,255,.96); color: #141414; }
.btn:hover,
.theme-toggle:hover { animation: jelly .6s ease; }
.btn:active,
.theme-toggle:active { scale: .95; animation: none; }
.tile .btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* スイッチのつまみ：移るときに伸び縮みして弾む（theme.js が is-switching を付ける） */
@keyframes knob-jelly {
  0%   { scale: 1 1; }
  30%  { scale: 1.32 .8; }
  55%  { scale: .88 1.12; }
  75%  { scale: 1.06 .95; }
  100% { scale: 1 1; }
}
.theme-toggle.is-switching .tt-knob { animation: knob-jelly .6s ease; }

/* ボタンとスイッチの文字を、パネルの題名・ひとことと同じ明朝にそろえる */
.btn,
.theme-toggle {
  font-family: var(--mincho);
  font-weight: 600;
  font-feature-settings: "palt";
  letter-spacing: .12em;
}
.theme-toggle { letter-spacing: .08em; }

/* ---------------------------------------------------------
   開いた最初の画面に収める
   作品ページ：広い画面では題名と説明を左、情報を右に並べて縦を詰める。
   1枚目の画像の高さは、ページ内のスクリプトが画面の残りに合わせて決める。
   --------------------------------------------------------- */
.site-header { padding-top: clamp(16px, 2.4vw, 28px); }
.work-head { padding-top: clamp(24px, 4vw, 48px); }
.work-head h1 { margin-top: .1em; }
.work-head .lead { margin-top: .8em; }
.plates { padding-top: clamp(20px, 3vw, 36px); }
.plates > figure.is-first img { width: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .work-head {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: end;
  }
  .work-head .meta { margin-top: 0; max-width: none; }
}
@media (max-width: 899px) {
  .work-head .lead { font-size: .9375rem; line-height: 1.8; }
  .work-head .meta { font-size: .75rem; line-height: 1.65; margin-top: 1em; padding-top: .9em; gap: .2em 1.2em; }
}

/* トップ：題名と紹介文の下に、スマホ5台が画面の高さに収まる大きさにする */
.hero-intro { padding-top: clamp(24px, 5vh, 72px); }
.phones { padding-top: clamp(24px, 4vh, 56px); }
.phones .phone { width: clamp(96px, min(13.5vw, calc((100svh - 520px) / 2.2)), 216px); }
.phones .is-main .phone { width: clamp(112px, min(16.5vw, calc((100svh - 450px) / 2.15)), 262px); }
.phones li:nth-child(1) { margin-top: clamp(16px, 7vh, 72px); }
.phones li:nth-child(2) { margin-top: clamp(6px, 2.4vh, 24px); }
.phones li:nth-child(4) { margin-top: clamp(12px, 5vh, 56px); }
.phones li:nth-child(5) { margin-top: clamp(20px, 7vh, 88px); }
.hero-note { margin-top: clamp(20px, 3vh, 48px); }
@media (max-width: 900px) {
  .hero-intro p { font-size: .9375rem; line-height: 1.8; }
  .phones .phone { width: clamp(124px, calc((100svh - 470px) / 2.2), 168px); }
  .phones .is-main .phone { width: clamp(140px, calc((100svh - 470px) / 2.15), 196px); }
  .phones { padding-top: 28px; }
}

@media (max-width: 899px) {
  .work-head { padding-top: 16px; }
  .work-head h1 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 1.875rem); }
  .work-head .lead { font-size: .875rem; }
  .plates { padding-top: 18px; }
  .plates > figure.is-first figcaption { margin-top: .5em; }
}

.site-footer p + p { margin-top: .4em; }

/* =========================================================
   水・深海のルール（サイト全体で共通）
   ・角の丸み：窓（パネル）28px／図版 18px／ボタン類は楕円
   ・すりガラス：1種類（--glass-*）
   ・揺れ：プルプル（jelly）1種類。マウスを乗せたとき・押したとき
   ・余白：8 / 16 / 24 / 40 / 64 / 104 の刻み
   ・背景：下へ行くほど水面から深いところへ（作品ページも）
   ========================================================= */
:root {
  --r-window: 28px;
  --r-figure: 18px;
  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 40px; --s-5: 64px;
  --s-6: clamp(64px, 9vw, 104px);
  --glass-bg: rgba(255,255,255,.28);
  --glass-border: rgba(255,255,255,.75);
  --glass-shadow: inset 0 1px 1px rgba(255,255,255,.9), inset 0 -3px 8px rgba(30,40,60,.08), 0 10px 22px -12px rgba(20,30,50,.45);
}
:root[data-scheme="dark"] {
  --glass-bg: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.38);
  --glass-shadow: inset 0 1px 1px rgba(255,255,255,.35), 0 10px 22px -12px rgba(0,0,0,.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --glass-bg: rgba(255,255,255,.08);
    --glass-border: rgba(255,255,255,.38);
    --glass-shadow: inset 0 1px 1px rgba(255,255,255,.35), 0 10px 22px -12px rgba(0,0,0,.6);
  }
}

/* 背景の深さ：トップだけでなく作品ページにも通す */
body { background: color-mix(in oklab, var(--paper), var(--sea) calc(var(--depth, 0) * 100%)); }

/* 窓：作品パネルは水槽の窓のような角丸 */
.showcase { gap: 14px; }
.tile { border-radius: var(--r-window); isolation: isolate; }
main > section.works-wall { padding: var(--s-5) 14px 0; }

/* 図版も同じ系統の角丸 */
.plates img, .plates video, .work-figure, .work-figure img { border-radius: var(--r-figure); }
.plates .low img { border-radius: var(--r-figure); }
.plates figure + figure,
.plates .pair + figure,
.plates figure + .pair,
.plates .pair + .pair { margin-top: var(--s-5); }
.pair { gap: var(--s-3); }

/* すりガラスを1種類に：スイッチ・水面へ戻る・前後の作品 */
.theme-toggle,
.surface-btn,
.pager a {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
          backdrop-filter: blur(12px) saturate(150%);
  box-shadow: var(--glass-shadow);
}

/* 揺れを1種類に：マウスを乗せるとプルプル、押すと縮む */
.surface-btn:hover, .pager a:hover { animation: jelly .6s ease; }
/* スマホは揺らさず、静かに浮き上がるだけ（端末として重さがあるように見せる） */
.phone:hover { animation: none; }
.surface-btn:active, .pager a:active { scale: .95; animation: none; }

/* 余白の刻み：ヘッダー・本文の節・フッター */
.site-header { padding: var(--s-3) var(--gutter) 0; }
.site-header nav ul { gap: var(--s-3); }
main > section { padding-top: var(--s-6); }
.notes { padding-top: var(--s-6); }

/* 前後の作品：すりガラスの楕円ボタン */
.pager {
  margin: var(--s-6) var(--gutter) 0;
  padding-top: var(--s-4);
  gap: var(--s-2);
}
.pager a {
  display: inline-block;
  padding: var(--s-2) var(--s-4);
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--mincho);
  font-weight: 600;
  letter-spacing: .08em;
}
.pager a span { font-family: var(--gothic); font-weight: 400; letter-spacing: .06em; margin-bottom: 2px; }

/* フッター：水面へ戻るボタン＋注記 */
.site-footer {
  margin-top: var(--s-6);
  padding: var(--s-5) var(--gutter) var(--s-5);
  text-align: center;
}
.surface-btn {
  display: inline-block;
  margin-bottom: var(--s-4);
  padding: .75em 1.8em;
  border-radius: 999px;
  color: var(--ink);
  font: 600 .9375rem/1.4 var(--mincho);
  letter-spacing: .14em;
  text-decoration: none;
}
.surface-btn::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .7em; border-left: 1.5px solid currentColor; border-top: 1.5px solid currentColor; rotate: 45deg; translate: 0 .1em; }

/* 英字の題名：和文用の広い字間をやめ、英字に合う詰め方に */
.tile h3.is-latin, .work-head h1.is-latin, .phone-label .is-latin, .ms-title, .ms-date {
  letter-spacing: .02em;
  font-feature-settings: normal;
}

/* =========================================================
   ページの移り変わり：水に潜るように
   今の画面はにじみながら上へ遠ざかり、次の画面は下から浮かび上がる
   （対応していないブラウザでは普通に切り替わる。動きを減らす設定では使わない）
   ========================================================= */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: dive-out .42s cubic-bezier(.4, 0, .2, 1) both; }
::view-transition-new(root) { animation: dive-in .62s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes dive-out {
  to { opacity: 0; transform: translateY(-4%) scale(1.02); filter: blur(8px) brightness(.85); }
}
@keyframes dive-in {
  from { opacity: 0; transform: translateY(5%) scale(.985); filter: blur(10px); }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* スマホ幅ではヘッダーの余白を詰め、最初の画面に1枚目の絵まで収める */
@media (max-width: 899px) {
  .site-header { padding-top: var(--s-2); }
  .site-header nav ul { gap: var(--s-2) var(--s-3); }
}

/* ---------------------------------------------------------
   スマホ群の横スクロールバー：すりガラスの溝と、プルプルするつまみ
   ブラウザ標準のバーは隠し、phones.js が位置と伸び縮みを動かす
   --------------------------------------------------------- */
.phones { scrollbar-width: none; }
.phones::-webkit-scrollbar { display: none; }
.phones-bar {
  position: relative;
  z-index: 1;
  width: min(62%, 440px);
  height: 16px;
  margin: var(--s-2) auto 0;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
          backdrop-filter: blur(12px) saturate(150%);
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  touch-action: none;
}
.phones-bar[hidden] { display: none; }
.phones-thumb {
  position: absolute;
  top: 2px; bottom: 2px; left: 0;
  min-width: 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(225,235,245,.9));
  box-shadow: inset 0 1px 1px #fff, 0 0 0 1px rgba(31,78,110,.18), 0 3px 8px -2px rgba(31,78,110,.35);
  transform-origin: 50% 50%;
  transition: scale .18s ease-out;
  cursor: grab;
}
.phones-thumb.is-dragging { cursor: grabbing; }
.phones-thumb.is-jelly { animation: jelly .6s ease; }
:root[data-scheme="dark"] .phones-thumb { background: linear-gradient(180deg, rgba(220,240,255,.9), rgba(150,200,240,.75)); box-shadow: inset 0 1px 1px rgba(255,255,255,.8), 0 0 12px rgba(143,208,255,.45); }
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) .phones-thumb { background: linear-gradient(180deg, rgba(220,240,255,.9), rgba(150,200,240,.75)); box-shadow: inset 0 1px 1px rgba(255,255,255,.8), 0 0 12px rgba(143,208,255,.45); }
}
