:root {
  --bg: #f1ebe2;
  --ink: #17140f;
  --soft: #6b645a;
  --accent: #c0392b;
  --line: rgba(23, 20, 15, .14);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  overflow: hidden;
  transition: background-color .9s ease;
  -webkit-font-smoothing: antialiased;
}
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
a { color: inherit; text-decoration: none; }

.top {
  position: fixed; left: 0; right: 0; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(16px, 4vw, 56px);
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.logo { font-family: Inter, sans-serif; font-weight: 800; font-size: 26px; letter-spacing: -.02em; }
.top nav { display: flex; gap: 40px; font-weight: 700; font-size: 15px; }
.top nav a.on { box-shadow: 0 2px 0 var(--accent); padding-bottom: 6px; }

.info {
  position: fixed; z-index: 3;
  left: clamp(16px, 4vw, 56px); bottom: 118px;
  max-width: 560px;
  pointer-events: none;
  touch-action: none; /* 「遊ぶ」「くわしく」の上から縦に払っても、ブラウザに取られず（pointercancel にならず）下のセクションへ進める。タップはそのまま効く */
}
.pager, .hint { touch-action: none; }
.info > * { pointer-events: none; }
/* 文字の箱がカセットのつかみを奪わないよう、押せるのはボタンと札だけ */
.info .tag, .info .btn, .info .more { pointer-events: auto; }
.meta { margin: 0 0 10px; font-family: Inter, "Noto Sans JP", sans-serif; font-weight: 700; font-size: 17px; }
.meta #no { box-shadow: 0 3px 0 var(--accent); padding-bottom: 4px; }
.meta .slash { margin: 0 10px; color: var(--soft); font-weight: 500; }
.meta #kind { font-weight: 500; color: var(--soft); }
h1 { margin: 6px 0 6px; font-weight: 900; font-size: clamp(30px, 3.2vw, 50px); letter-spacing: -.01em; line-height: 1.15; }
.line { margin: 0 0 18px; color: var(--soft); font-weight: 500; font-size: 15px; }
.acts { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tag { border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 18px; font-weight: 700; font-size: 14px; background: rgba(255,255,255,.35); }
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--accent); color: #fff; border-radius: 999px;
  padding: 12px 30px; font-weight: 900; font-size: 18px;
  box-shadow: 0 10px 24px -8px var(--accent);
  transition: transform .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn i { font-style: normal; font-family: Inter, sans-serif; }

.hint {
  position: fixed; z-index: 3; right: clamp(16px, 5vw, 72px); top: 64%;
  margin: 0; font-weight: 700; font-size: 16px; letter-spacing: .08em;
  border-bottom: 1.5px solid var(--ink); padding-bottom: 6px;
  pointer-events: none; transition: opacity .6s ease;
}
.hint i { font-style: normal; margin-left: 10px; font-family: Inter, sans-serif; }
.hint.gone { opacity: 0; }
.hint .hint-s { display: none; }
/* 前後の作品：ヒントの下に、線の細い丸ボタンと番号 */
.pager {
  position: fixed; z-index: 3; right: clamp(16px, 5vw, 72px); top: calc(64% + 50px);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; width: 190px;
  transition: opacity .45s ease;
}
.pager button {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--ink); background: rgba(255,255,255,.35);
  color: var(--ink); font: 700 15px/1 Inter, sans-serif; cursor: pointer; display: grid; place-items: center;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.pager button:hover { background: var(--ink); color: var(--bg); }
.pager button:active { transform: scale(.92); }
.pg-no { font: 700 15px/1 Inter, sans-serif; letter-spacing: .06em; color: color-mix(in srgb, var(--ink) 45%, transparent); min-width: 74px; text-align: center; }
.pg-no b { color: var(--ink); }
.pg-sep { margin: 0 6px; }
.pg-cap { flex-basis: 100%; text-align: right; font-size: 12px; font-weight: 700; letter-spacing: .06em; opacity: .55; transition: opacity .6s ease; }
.pager.used .pg-cap { opacity: 0; }
/* 最初は「→」が2回だけ小さく誘う */
.pager.nudge #pg-next { animation: pg-nudge 1.1s ease-in-out 1.6s 2; } /* 出てくる（.9s 遅れでフェード）のを待ってから */
@keyframes pg-nudge { 0%, 100% { transform: none; } 40% { transform: translateX(5px); } 70% { transform: translateX(-1px); } }
@media (prefers-reduced-motion: reduce) { .pager.nudge #pg-next { animation: none; } }

.works {
  position: fixed; z-index: 3; left: clamp(16px, 4vw, 56px); right: clamp(16px, 4vw, 56px); bottom: 0;
  display: flex; gap: 0; border-top: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
  padding: 18px 0 calc(22px + env(safe-area-inset-bottom));
  touch-action: pan-x; /* 横は帯のスクロールをブラウザに任せ、縦の払い（下のセクションへ）は自分で取る */
}
.works::-webkit-scrollbar { display: none; }
.works button {
  flex: 1 0 auto; border: 0; background: none; color: var(--ink); cursor: pointer;
  font: 500 14px "Noto Sans JP", sans-serif; padding: 6px 18px; white-space: nowrap; text-align: left;
  opacity: .72; transition: opacity .2s;
}
.works button b { font-family: Inter, sans-serif; font-weight: 700; margin-right: 10px; }
.works button:hover { opacity: 1; }
.works button.on { opacity: 1; color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.works > * + * { border-left: 1px solid var(--line); }
.works .gap { flex: none; padding: 6px 14px; color: var(--soft); align-self: center; }
.works .all { flex: none; margin-left: auto; padding: 6px 4px 6px 22px;
  /* 題名が長くて列があふれても「すべて見る」は右端に残す */
  position: sticky; right: 0; background: var(--bg); box-shadow: -28px 0 18px -10px var(--bg); font-weight: 700; font-size: 14px; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.works .all small { font: 700 12px Inter, "Noto Sans JP", sans-serif; color: var(--soft); }
.works .all i { font-style: normal; font-family: Inter, sans-serif; transition: transform .2s; }
.works .all:hover { color: var(--accent); }
.works .all:hover i { transform: translateX(4px); }

/* スマホ縦：カセットを上、文字を下に */
@media (max-aspect-ratio: 1/1) {
  .top { padding: 16px; }
  .logo { font-size: 22px; }
  .top nav { gap: 6px; font-size: 13px; }
  .top nav a { padding: 12px 6px; } /* 指で押せる高さ */
  .info { left: 16px; right: 16px; bottom: 92px; max-width: none; }
  h1 { font-size: 30px; }
  .meta { font-size: 15px; }
  .btn { padding: 12px 26px; font-size: 17px; }
  .hint { right: 16px; top: 58%; font-size: 14px; }
  /* 縦画面の下の列は、作品名の帯ではなく「点の並び＋すべて見る（N作品）」。
     横に流れる帯だと1本半しか見えず、6本あることも横に動くことも伝わらなかった。点は新しい6本（＋見ている古い作品）なので、何本に増えても1行に収まる */
  .works { left: 0; right: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); gap: 2px; align-items: center; overflow: visible; }
  .works > * + * { border-left: 0; }
  .works button { flex: none; width: 26px; height: 36px; padding: 0; position: relative; overflow: hidden; font-size: 0; color: transparent; opacity: 1; }
  .works button b { margin: 0; }
  .works button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 99px;
    border: 1.5px solid var(--ink); opacity: .55; transition: width .25s ease, margin .25s ease, background-color .25s, border-color .25s, opacity .25s; }
  .works button.on { box-shadow: none; }
  .works button.on::after { width: 24px; margin-left: -12px; background: var(--accent); border-color: var(--accent); opacity: 1; }
  .works .gap { padding: 0 2px; font-size: 12px; }
  .works .all { margin-left: auto; position: static; box-shadow: none; background: none; padding: 8px 0 8px 12px; font-size: 13px; gap: 6px; }
  .works .all small { display: inline; font-size: 12px; }
}
/* スマホ横など背の低い横長：文字を左に寄せて小さく */
@media (max-height: 500px) and (min-aspect-ratio: 1/1) {
  .info { max-width: 40vw; bottom: 76px; }
  h1 { font-size: 24px; }
  .line { display: none; }
  .tag { display: none; }
  .btn { padding: 9px 20px; font-size: 15px; }
  .works { padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .hint { display: none; }
  .pager { right: 16px; width: auto; gap: 8px; }
  .pager button { width: 32px; height: 32px; font-size: 13px; }
  .pg-no { min-width: 60px; font-size: 13px; }
  .pg-cap { display: none; }
}
.more { font-weight: 700; font-size: 15px; border-bottom: 1.5px solid var(--ink); padding-bottom: 3px; }
.more::after { content: " ↗"; font-family: Inter, sans-serif; }

/* ---------- 画面の切り替え（トップ／作品ページ／一覧） ---------- */
.info, .works, .hint, .pager { transition: opacity .45s ease, transform .45s ease; }
body.mode-work .info, body.mode-list .info { opacity: 0; transform: translateY(16px); pointer-events: none; }
body.mode-work .info *, body.mode-list .info * { pointer-events: none !important; }
body.mode-work .works, body.mode-list .works { opacity: 0; transform: translateY(20px); pointer-events: none; }
body.mode-work .hint, body.mode-list .hint, body.mode-work .pager, body.mode-list .pager { opacity: 0; pointer-events: none; }
.top nav a.on { box-shadow: 0 2px 0 var(--accent); padding-bottom: 6px; }
/* 作品ページ・一覧は下が流れるので、見出しの帯に地の色を敷く */
.top { transition: background-color .4s ease, opacity .4s ease; }
body.mode-work .top, body.mode-list .top { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
/* 読み込み中（body.loading。main.js の最初のコマで外れる）：字は全部隠す。フォントが届く前の字・JS が動く前の仮置きを見せない */
body.loading .top, body.loading .hero-head, body.loading .hero-poke, body.loading .hero-scroll,
body.loading .info, body.loading .works, body.loading .hint, body.loading .pager, body.loading .page { opacity: 0 !important; transition: none !important; }
/* 読み込み中に見せる物（線・住人・カセット）は index.html の #ld（three.js より前に出す。2026-11-10） */


.page {
  position: fixed; inset: 0; z-index: 2; overflow-y: auto; overscroll-behavior: contain;
  padding: 96px clamp(16px, 4vw, 56px) 0;
  opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s;
  -webkit-overflow-scrolling: touch;
}
body.mode-work #page-work, body.mode-list #page-list { opacity: 1; visibility: visible; transition: opacity .5s ease .15s, visibility 0s; }
/* 中身は下から順に出てくる */
.page .rise { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.page.shown .rise { opacity: 1; transform: none; }

/* 作品ページ */
.w-grid { display: grid; grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.6fr); gap: clamp(24px, 4vw, 64px); align-items: start; max-width: 1440px; margin: 0 auto; }
.w-side, .w-main { min-width: 0; } /* 横長のスクショが段を押し広げない */
.w-cas { width: 100%; aspect-ratio: 3.1 / 2.15; margin-bottom: 26px; }
/* 題名は1行に収まる大きさにする（字数は JS が --chars に入れる。英字の題名は小さめに収まる） */
.w-side { container-type: inline-size; }
.w-side h1 { font-size: clamp(24px, calc(100cqi / var(--chars, 10) * 0.97), 52px); margin: 4px 0 10px; white-space: nowrap; }
.w-line { margin: 0 0 14px; font-size: 19px; font-weight: 700; letter-spacing: .04em; }
.w-desc { margin: 0 0 26px; color: var(--soft); font-size: 15px; line-height: 1.9; font-weight: 500; max-width: 30em; }
.w-side .acts { gap: 14px; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #111; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.player-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) brightness(.55) saturate(1.2); }
.player video, .player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.player img { object-fit: cover; }
.player video { opacity: 0; transition: opacity .3s; }
.player.playing video { opacity: 1; }
.player.playing img, .player.playing .play { opacity: 0; pointer-events: none; }
.player.no-trailer .play { display: none; }
/* 再生前のキーアートは暗幕をかける（▶ と「トレーラーを再生」がキーアートの題字に重なって読めなかった）。再生が無い作品はそのまま見せる */
.player:not(.playing):not(.no-trailer) img { filter: brightness(.6) saturate(.9); transition: filter .3s; }
.player:not(.playing):not(.no-trailer):hover img { filter: brightness(.5) saturate(.9); }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: none; border: 0; color: #fff; cursor: pointer; font: 700 15px "Noto Sans JP", sans-serif; transition: opacity .3s;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.play em { font-style: normal; white-space: nowrap; padding: 7px 16px; border-radius: 99px; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.play span { width: 84px; height: 84px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; font-size: 26px; padding-left: 6px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(0,0,0,.35); transition: transform .25s ease, background .25s; }
.play:hover span { transform: scale(1.08); background: rgba(255,255,255,.25); }
.shots { display: flex; gap: 14px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.shots::-webkit-scrollbar { display: none; }
.shots img { height: clamp(150px, 22vh, 240px); border-radius: 10px; flex: none; box-shadow: 0 16px 30px -18px rgba(0,0,0,.5); cursor: zoom-in; transition: transform .25s ease; }
.shots img:hover { transform: translateY(-3px); }
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 48px auto 0; max-width: 1440px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec div { padding: 18px 22px; }
.spec div + div { border-left: 1px solid var(--line); }
.spec dt { color: var(--soft); font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.spec dd { margin: 0; font-weight: 700; font-size: 17px; }
.w-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 1440px; margin: 0 auto; padding: 26px 0 calc(34px + env(safe-area-inset-bottom)); font-weight: 700; font-size: 14px; }
.w-foot a { opacity: .8; transition: opacity .2s; }
.w-foot a:hover { opacity: 1; color: var(--accent); }
#w-prev::before { content: "← "; font-family: Inter, sans-serif; }
#w-next::after { content: " →"; font-family: Inter, sans-serif; }
.w-foot b { font-family: Inter, sans-serif; margin-right: 8px; }

/* 拡大表示（スクショ） */
.lightbox { position: fixed; inset: 0; z-index: 10; background: rgba(10,9,8,.86); display: grid; place-items: center; cursor: zoom-out; opacity: 0; transition: opacity .25s; }
.lightbox.on { opacity: 1; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; }

/* 一覧 */
.l-head { display: flex; align-items: center; gap: 28px; max-width: 1440px; margin: 0 auto; }
.l-head h2 { margin: 0; font-size: clamp(36px, 4vw, 58px); font-weight: 900; letter-spacing: .04em; }
.l-rule { flex: 1; height: 1px; background: var(--ink); opacity: .5; }
.l-count { font-weight: 700; font-size: 18px; }
.l-count b { font-family: Inter, sans-serif; font-size: 30px; color: var(--accent); margin-right: 4px; }
.chips { display: flex; gap: 12px; max-width: 1440px; margin: 20px auto 26px; }
.chips button { border: 1.5px solid var(--ink); background: transparent; color: var(--ink); border-radius: 999px; padding: 8px 24px; font: 700 15px "Noto Sans JP", sans-serif; cursor: pointer; transition: background .2s, color .2s; }
.chips button.on { background: var(--ink); color: var(--bg); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 22px; max-width: 1440px; margin: 0 auto; padding-bottom: calc(60px + env(safe-area-inset-bottom)); perspective: 1200px; }
.card {
  --cbg: rgba(255,255,255,.4); --cacc: var(--ink);
  position: relative; display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; align-items: center;
  padding: 22px; border-radius: 16px; background: var(--cbg); color: var(--ink);
  transform-style: preserve-3d; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, opacity .4s;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 40px -30px rgba(0,0,0,.35);
}
.card:hover { box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 30px 50px -30px rgba(0,0,0,.45); }
.card.hide { display: none; }
.card .c-no { font-family: Inter, sans-serif; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 12px; }
.card .c-no::after { content: ""; width: 44px; height: 1px; background: currentColor; opacity: .5; }
.card > div:first-child { container-type: inline-size; min-width: 0; }
.card h3 { margin: 10px 0 14px; font-size: clamp(11px, calc(100cqi / var(--chars, 8) * 0.97), 22px); font-weight: 900; line-height: 1.3; white-space: nowrap; }
.card .c-kind { display: inline-block; white-space: nowrap; border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.4); }
.card .c-kind.steam { background: var(--ink); color: #fff; }
/* カード内のミニカセット（CSS のガラス枠） */
.mini {
  position: relative; aspect-ratio: 3.1 / 2.15; border-radius: 10px; padding: 7% 6% 16%;
  background: linear-gradient(140deg, rgba(255,255,255,.85), rgba(255,255,255,.25) 40%, rgba(255,255,255,.55) 70%, rgba(255,255,255,.2));
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.95), inset 0 -10px 18px -8px rgba(0,0,0,.18), 0 14px 22px -14px rgba(0,0,0,.45);
  clip-path: polygon(8% 0, 92% 0, 100% 11%, 100% 89%, 92% 100%, 8% 100%, 0 89%, 0 11%);
  transform: translateZ(30px);
}
.mini img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; display: block; box-shadow: 0 0 0 3px #15130f; }
.mini::after { /* 金の端子 */
  content: ""; position: absolute; left: 18%; right: 18%; bottom: 5.5%; height: 6%;
  background: repeating-linear-gradient(90deg, #d8a94a 0 5px, transparent 5px 8px);
  opacity: .9;
}
.mini .glare { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, transparent 55%); mix-blend-mode: soft-light; opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover .mini .glare { opacity: 1; }
.card.soon { border: 1.5px dashed var(--line); background: transparent; box-shadow: none; grid-template-columns: 1fr 1.25fr; color: var(--soft); }
.card.soon h3 { letter-spacing: .3em; }
.card.soon .mini { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; font: 800 40px Inter, sans-serif; color: var(--line); }
.card.soon .mini::after { display: none; }
.card.soon p { margin: 0; font-size: 13px; line-height: 1.7; }

@media (max-width: 900px) {
  .w-grid { grid-template-columns: minmax(0, 1fr); }
  .w-cas { width: min(78vw, 420px); margin: 0 auto 18px; }
  .spec div + div { border-left: 0; }
  .spec { grid-template-columns: 1fr 1fr; }
  .spec div { padding: 14px 4px; }
  .page { padding-top: 76px; }
  .l-head { gap: 16px; }
  .card { grid-template-columns: 1fr 1.2fr; padding: 16px; }
  .w-foot { font-size: 13px; }
  #w-list { display: none; }
}
/* 背の低い縦画面：「はじいてみる」は出さない（題名に重なる） */
/* 縦画面：題名のすぐ上の1行に、左に前後ボタン・右にヒント（行の高さは JS の placePager） */
@media (max-aspect-ratio: 1/1) {
  .hint { right: 16px; font-size: 13px; letter-spacing: .03em; }
  .hint .hint-l { display: none; } .hint .hint-s { display: inline; }
  .pager { right: auto; left: 16px; width: auto; gap: 8px; }
  .pager button { width: 34px; height: 34px; font-size: 14px; }
  .pg-no { min-width: 62px; font-size: 14px; }
  .pg-cap { display: none; }
  .info .tag { display: none; } /* 情報欄を低く（Steam の長いボタンで2行になり、前後ボタンがカセットにかぶった） */
}
/* 幅の狭いスマホ：前後ボタンとヒントが1行に収まるよう詰める（360px で重なった） */
@media (max-aspect-ratio: 1/1) and (max-width: 380px) {
  .hint { font-size: 12px; letter-spacing: 0; } .hint i { margin-left: 6px; }
  .pager { gap: 6px; } .pager button { width: 32px; height: 32px; } .pg-no { min-width: 54px; font-size: 13px; } .pg-sep { margin: 0 4px; }
}
@media (max-aspect-ratio: 1/1) and (max-width: 335px) { .hint i { display: none; } }
@media (max-aspect-ratio: 1/1) and (min-aspect-ratio: 1/2) { .line { margin-bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { body { transition: none; } .page .rise { transition: none; } }

/* ---------- ファーストビュー（カセットの山） ---------- */
.hero { position: fixed; inset: 0; z-index: 2; pointer-events: none; visibility: hidden; transition: visibility 0s .7s; }
body.mode-hero .hero { visibility: visible; transition: none; }
.hero-head { position: absolute; left: 16px; right: 16px; top: 7.5vh; text-align: center;
  opacity: 0; transform: translateY(-50px); transition: opacity .5s ease, transform .7s cubic-bezier(.5,0,.75,0); }
body.mode-hero .hero-head { opacity: 1; transform: none; transition: opacity .5s ease, transform .8s cubic-bezier(.2,.8,.2,1); } /* 字が落ちきる（約0.6秒）までに濃くなる */
.hero-logo { margin: 0; font: 800 clamp(64px, 10.5vw, 180px)/.95 Inter, sans-serif; letter-spacing: -.055em; }
.hero-tag { margin: 2vh 0 0; font: 700 clamp(18px, 2.1vw, 32px)/1.1 Inter, sans-serif; letter-spacing: -.01em; }
/* ロゴとサブタイトルは1文字（1語）ずつ動く */
.hero-head .gl { display: inline-block; will-change: transform; }
/* 立体のロゴが出たら、DOM の字は透明に（場所と当たりの大きさだけ使う） */
html.logo-3d .hero-logo .gl { color: transparent; }
.hero-poke { position: absolute; right: clamp(16px, 9vw, 160px); top: 38vh; margin: 0;
  font-weight: 700; font-size: 16px; letter-spacing: .08em; opacity: 0; transition: opacity .5s ease; }
.hero-poke i { font-style: normal; font-family: Inter, sans-serif; margin-left: 8px; }
body.mode-hero .hero-poke { opacity: 1; transition: opacity .8s ease 1.1s; } /* 山が静まる（約1.5秒）ころに */
body.mode-hero .hero-poke.gone { opacity: 0; transition: opacity .5s ease; }
.hero-scroll { position: absolute; left: 50%; bottom: calc(8px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  border: 0; background: none; color: var(--ink); cursor: pointer; pointer-events: auto; touch-action: none; /* ボタンの上から上へ払っても、ブラウザに取られず（pointercancel にならず）ファーストビューを抜けられる */
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 18px;
  font: 700 13px "Noto Sans JP", sans-serif; letter-spacing: .14em; opacity: 0; transition: opacity .4s ease; }
body.mode-hero .hero-scroll { opacity: 1; transition: opacity .8s ease .9s; }
body:not(.mode-hero) .hero-scroll { pointer-events: none; }
.hero-scroll b { width: 1.5px; height: 22px; background: linear-gradient(var(--ink) 50%, transparent 50%) 0 0 / 100% 200%; animation: heroLine 1.8s ease-in-out infinite; }
@keyframes heroLine { 0% { background-position: 0 100%; } 50% { background-position: 0 0; } 100% { background-position: 0 -100%; } }
.hero-scroll .sp { display: none; }
@media (pointer: coarse) { .hero-scroll .pc { display: none; } .hero-scroll .sp { display: inline; } }
/* ファーストビューの間は、いつものトップの文字を隠す。出るときは少し遅れて下から */
body.mode-hero .info { opacity: 0; transform: translateY(24px); pointer-events: none; }
body.mode-hero .info * { pointer-events: none !important; }
body.mode-hero .works { opacity: 0; transform: translateY(20px); pointer-events: none; }
body.mode-hero .hint, body.mode-hero .pager, body.mode-hero .top .logo { opacity: 0; pointer-events: none; }
.top .logo { transition: opacity .5s ease .3s; }
body:not(.mode-hero) .info, body:not(.mode-hero) .works { transition-delay: .35s; }
body:not(.mode-hero) .hint:not(.gone), body:not(.mode-hero) .pager { transition-delay: .9s; }
body.mode-work .info, body.mode-work .works, body.mode-list .info, body.mode-list .works { transition-delay: 0s; }
@media (max-aspect-ratio: 1/1) {
  .hero-head { top: 13vh; }
  .hero-logo { font-size: clamp(56px, 19vw, 120px); }
  .hero-tag { font-size: 20px; }
  .hero-poke { right: 16px; top: 31vh; font-size: 13px; }
}
@media (max-height: 500px) and (min-aspect-ratio: 1/1) {
  .hero-head { top: 15vh; } /* 右上の「作品一覧」の下から（667×375 で i の点に重なった） */
  .hero-logo { font-size: 15vh; }
  .hero-tag { margin-top: 1vh; font-size: 16px; }
  .hero-poke { top: 34vh; }
  /* 山の真下だと前の段にかぶるので、右下の角へ */
  .hero-scroll { left: auto; right: 16px; transform: none; flex-direction: row; bottom: calc(10px + env(safe-area-inset-bottom)); }
  .hero-scroll b { width: 26px; height: 1.5px; background: linear-gradient(90deg, var(--ink) 50%, transparent 50%) 0 0 / 200% 100%; animation: none; }
}

/* ---------- 下のセクション（お知らせ・フッター。トップで下へスクロールすると出る） ---------- */
#page-below:focus { outline: none; }
body.mode-below #page-below { opacity: 1; visibility: visible; transition: opacity .5s ease .22s, visibility 0s; } /* トップが消え終わる（.18s）のを待ってから出す。重なると0.3秒のコマで両方の字が混ざった */
body.mode-below .info { opacity: 0; transform: translateY(-24px); pointer-events: none; transition-delay: 0s; transition-duration: .18s; }
body.mode-below .info * { pointer-events: none !important; }
body.mode-below .works { opacity: 0; transform: translateY(20px); pointer-events: none; transition-delay: 0s; transition-duration: .18s; }
body.mode-below .hint, body.mode-below .hint:not(.gone), body.mode-below .pager { opacity: 0; pointer-events: none; transition-delay: 0s; transition-duration: .18s; } /* 遅れ（.9s）を残すと、下のセクションに入った後も1秒ほどお知らせの本文の後ろに透けた（.hint:not(.gone) は上の遅れの指定に勝つため） */
body.mode-below .top { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#page-below > * { transform: translateY(60px); opacity: 0; transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .6s ease; }
#page-below.shown > * { transform: none; opacity: 1; }
#page-below.shown > :nth-child(2) { transition-delay: .1s; }
.b-sec { max-width: 1100px; margin: 0 auto; padding: 4vh 0 12vh; }
.b-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 28px; }
.b-label { margin: 0; font: 700 13px Inter, sans-serif; letter-spacing: .2em; color: color-mix(in srgb, var(--accent) 82%, var(--ink)); }
.b-sec h2 { margin: 0; font-weight: 900; font-size: clamp(26px, 3.4vw, 44px); }
/* お知らせ：日付・種類・本文の行。作品のある行は押すと作品ページへ */
.news { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.news li { border-bottom: 1px solid var(--line); }
.news a, .news li > div { display: grid; grid-template-columns: 7.2em 3.6em 1fr 1.5em; align-items: baseline; gap: 0 20px; padding: 22px 4px; }
.news time { font: 500 14px Inter, sans-serif; color: var(--soft); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.n-kind { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .1em; padding: 3px 8px 2px; border-radius: 99px; border: 1px solid currentColor; line-height: 1.4; transform: translateY(-1px); }
.n-new { color: color-mix(in srgb, var(--accent) 82%, var(--ink)); }
.n-update { color: var(--soft); }
.n-body { font-size: 15px; line-height: 1.75; font-weight: 500; }
.n-body b { display: block; font-weight: 900; font-size: 16px; margin-bottom: 2px; }
.n-go { font-style: normal; font: 500 18px Inter, sans-serif; justify-self: end; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
/* 乗ったら中身だけ右へずらす（余白を変えると本文が折り返して行の高さが変わった） */
.news a { position: relative; transition: background-color .3s; }
.news a > time, .news a > .n-body { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.news a:focus-visible { background: color-mix(in srgb, var(--ink) 4%, transparent); }
@media (hover: hover) {
  .news a:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
  .news a:hover > time, .news a:hover > .n-body { transform: translateX(8px); }
  .news a:hover .n-go { transform: translateX(4px); }
}
.news-more { display: block; margin: 28px auto 0; padding: 12px 28px; font: 700 14px "Noto Sans JP", sans-serif; color: var(--ink); background: none; border: 1.5px solid var(--ink); border-radius: 99px; cursor: pointer; transition: background-color .2s, color .2s; }
.news-more[hidden] { display: none; }
.news-more:hover { background: var(--ink); color: var(--bg); }
/* フッター */
.b-foot { max-width: 1100px; margin: 0 auto; padding: 56px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ink); }
.f-main { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.f-logo { margin: 0; font: 800 clamp(44px, 7vw, 88px)/0.95 Inter, sans-serif; letter-spacing: -.045em; }
.f-tag { margin: 10px 0 0; font: 500 15px Inter, sans-serif; color: var(--soft); }
.f-note { margin: 18px 0 0; font-size: 14px; line-height: 1.8; color: var(--soft); font-weight: 500; }
.f-follow { display: inline-flex; align-items: center; gap: 14px; padding: 16px 26px 16px 20px; background: var(--ink); color: var(--bg); border-radius: 99px; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.f-follow svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.f-follow span { display: flex; flex-direction: column; line-height: 1.25; }
.f-follow b { font-size: 16px; font-weight: 900; }
.f-follow small { font: 500 12px Inter, sans-serif; opacity: .7; }
.f-follow:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23,20,15,.22); }
.f-nav { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.f-nav a, .f-nav button { font: 700 14px "Noto Sans JP", sans-serif; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
.f-nav a:hover, .f-nav button:hover { text-decoration: underline; text-underline-offset: 4px; }
.f-nav button { margin-left: auto; }
.f-copy { margin: 16px 0 0; color: var(--soft); }
.f-copy small { font: 500 12px Inter, sans-serif; }
@media (max-width: 640px) {
  .b-head { margin-bottom: 18px; }
  .news a, .news li > div { grid-template-columns: auto 1fr 1.2em; gap: 6px 12px; padding: 18px 2px; }
  .news time { grid-column: 1; grid-row: 1; font-size: 13px; }
  .n-kind { grid-column: 2; grid-row: 1; }
  .n-body { grid-column: 1 / 3; grid-row: 2; font-size: 14px; }
  .n-go { grid-column: 3; grid-row: 2; align-self: center; }
  .news li > div .n-body { grid-column: 1 / 4; }
  .b-foot { padding-top: 40px; }
  .f-main { flex-direction: column; align-items: stretch; gap: 24px; }
  .f-follow { justify-content: center; }
  .f-nav { gap: 20px; margin-top: 36px; }
}

/* ---------- 計測表示（URL に ?fps を付けたときだけ。実機で重さを確かめる用） ---------- */
/* 上の真ん中（ロゴとナビの間）。左下だと下の作品の列・作品ページの表に重なった */
#fps { position: fixed; left: 50%; top: 6px; transform: translateX(-50%); z-index: 60; pointer-events: none;
  font: 500 10px/1.35 ui-monospace, Menlo, monospace; color: #fff; background: rgba(23,20,15,.78); padding: 4px 7px; border-radius: 7px; white-space: pre; text-align: center; }
@media (max-aspect-ratio: 1/1) { #fps { top: 3px; font-size: 9px; line-height: 1.2; padding: 2px 6px; } } /* 縦画面はロゴとナビの間（幅約110px）に、上の帯（高さ約58px）からはみ出さない高さで。字は main.js が4行の短い形にする */

/* ---------- オリジナルのカーソル（マウスのときだけ。src/cursor.js） ---------- */
html.own-cursor, html.own-cursor * { cursor: none !important; }
#cur { position: fixed; left: 0; top: 0; z-index: 51; pointer-events: none; color: var(--ink); transition: opacity .2s; }
#cur .dot { display: none; } /* 前の墨の点。今は猫じゃらし */
/* 猫じゃらし（ふだん）：ふさの先っぽが本当の位置。速く振る・リンクの上では揺れた絵 */
#cur .teaser { position: absolute; left: -1.5px; top: -1px; width: 34px; height: auto; transform-origin: 1.5px 1px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); transition: opacity .15s; }
#cur .teaser.wig { left: -2px; top: -4px; width: 34.5px; opacity: 0; }
#cur.wig .teaser { opacity: 0; } #cur.wig .teaser.wig { opacity: 1; }
#cur.finger .teaser { display: none; }
/* 猫の手（作品のところ）：手の先（絵ごとに位置が違う）を本当の位置に合わせる */
#cur .hand { position: absolute; height: auto; display: none; filter: drop-shadow(0 3px 3px rgba(0,0,0,.18)); }
#cur .hand[data-p="point"] { width: 45.5px; left: -4.5px; top: -1.5px; transform-origin: 4.5px 1.5px; }
#cur .hand[data-p="ready"] { width: 51.5px; left: -7px; top: -3.5px; transform-origin: 7px 3.5px; }
#cur .hand[data-p="flick"] { width: 49.5px; left: -5px; top: -1px; transform-origin: 5px 1px; }
#cur.finger .hand.on { display: block; }
#cur .ring { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); box-shadow: 0 0 0 1.5px rgba(255,255,255,.9), inset 0 0 0 1.5px rgba(255,255,255,.9);
  opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s cubic-bezier(.2,.8,.2,1); }
#cur.link .ring { opacity: 1; transform: scale(1); }
/* 小さな住人：足もとの真ん中が基準。点を追いかける */
#cur-pet { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; width: 52px; height: 70px; margin: -70px 0 0 -26px; transform-origin: 26px 70px; transition: opacity .2s; }
#cur-pet img { position: absolute; inset: 0; width: 100%; height: 100%; display: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.12)); }
#cur-pet img.on { display: block; }

/* ページ側の飾り（src/deco-dom.js。2026-11-11）：手描きの部品をセクションの後ろに。大きな字は地の色より少し濃い色で塗る */
.page { overflow-x: clip; }
.b-news, #page-list .l-head, #chips, #cards, #page-work .w-side, #page-work .w-main { position: relative; }
.dk { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.dk-p { position: absolute; display: block; height: auto; pointer-events: none; user-select: none;
  opacity: 0; transform: rotate(var(--r)) scale(.6); transition: opacity .35s ease var(--d), transform .5s cubic-bezier(.3,1.6,.5,1) var(--d); }
.page.shown .dk-p { opacity: 1; transform: rotate(var(--r)); }
.dk-word { background: color-mix(in srgb, var(--bg) 87%, #000); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; transform: none; }
.page.shown .dk-word { transform: none; }
.dk-front { z-index: 3; }
.dk-tape { z-index: 2; }
/* ふだんはゆっくり揺れる（transform と別の translate で） */
.page.shown .dk-p:not(.dk-word):not(.dk-tape) { animation: dk-bob 5.5s ease-in-out infinite alternate; }
.page.shown .dk-p:nth-child(3n) { animation-duration: 7s; }
.page.shown .dk-p:nth-child(3n+1) { animation-duration: 6.2s; animation-delay: -2s; }
@keyframes dk-bob { from { translate: 0 0; } to { translate: 0 -7px; } }
/* スクショはテープで留めた見せ方（テープが切れないよう上に余白） */
.shots { padding-top: 12px; }
.shots .shot { position: relative; flex: none; display: block; }
.shots .shot img { display: block; }
.shots img.dk-tape { height: auto; border-radius: 0; box-shadow: none; cursor: default; flex: none; } /* スクショの高さの指定がテープにも効いて、巨大な斜めの帯になった */
.shots img.dk-tape:hover { transform: rotate(var(--r)); }
@media (max-width: 1399px) { .b-news .dk-m { display: none; } } /* 余白が印の幅より狭いと、画面の端で切れた（1280 で HOT! が HO に） */
@media (max-width: 900px) {
  .dk-wword, #page-work .w-side .dk { display: none; }
  .dk-wb, .dk-wc { display: none; } /* 動画の角の飾りが「遊ぶ」と動画の間に挟まった */
  #cards > .dk .dk-blob:nth-child(2) { top: 18% !important; } /* 右上の色面が絞り込みの右の印を覆った */
}
@media (max-width: 640px) {
  .b-news .dk-word { display: none; } /* 狭いと「お知らせ」の後ろに入る */
  #page-list .l-head .dk { display: none; } /* 狭いと「N作品」の字の後ろに入る。印（絞り込みの右）だけにする */
  .dk-chips .dk-p:nth-child(3), .dk-chips .dk-p:nth-child(4) { display: none; } /* 狭いと右端からはみ出す。きらめきと＋だけ */
}
@media (prefers-reduced-motion: reduce) { .dk-p { transition: none; } .page.shown .dk-p, .page.shown .dk-p:not(.dk-word):not(.dk-tape) { animation: none; } } /* 揺れの指定と同じ強さで止める（弱いと負けて揺れ続けた） */
.dk[hidden], .dk-p[hidden] { display: none !important; } /* 置く空きが無いときに JS が隠す */
@media (max-height: 500px) and (min-aspect-ratio: 1/1) { .b-news .dk-word, #page-list .l-head .dk { display: none; } } /* 背の低い横画面では、大きな字の上が見出しの帯で切れた */
