@import url('hit-regions.css');
/* a little wonder park — 紙と細い線の公園 */

:root {
  --f-serif: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --f-sans: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', system-ui, sans-serif;
  --f-latin: 'Fraunces', 'Zen Old Mincho', Georgia, serif;

  --mast-h: 68px;
  /* 見出し帯の下の端。ノッチのある端末を全画面で開くと、上のセーフエリアの分だけ下がる（M-06） */
  --mast-b: calc(var(--mast-h) + env(safe-area-inset-top, 0px));
  --gutter: clamp(16px, 4vw, 48px);
  /* 左右の余白。横向きのスマホでは、ノッチの側をよける（M-06） */
  --gl: max(var(--gutter), env(safe-area-inset-left, 0px));
  --gr: max(var(--gutter), env(safe-area-inset-right, 0px));
  /* 押せる物の大きさの下限（指で押す子どもも使うので 44。X-34） */
  --tap: 44px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);

  /* 最初の画面の見出しのかたまり（T-05）。見出しは 2 行、その下に 1 行。窓の高さでも縮む。
     --intro-bottom は、かたまりの下の端に息つぎを足した所。絵（.scene）は、左の岩山の頂がここより下に来る大きさまでしか広げない。
     かたまりの高さは、kumi.js の watchIntro() が .intro を測って --intro-h に書く（遊びが行を足しても、岩山が字の下に来る。段 C の検査 C-2）。
     測れないあいだ（読みこみ前・JavaScript なし）は --intro-fallback の式（h1 2 行 + 10 + p 1 行）。低い横向きの窓（下）も同じ形で、数だけ替える */
  --intro-gap: clamp(14px, 4.5vh, 56px);
  --intro-h1: clamp(28px, min(2.8vw, 5.4vh), 44px);
  --intro-p: 14px;
  --intro-fallback: calc(var(--intro-h1) * 2.6 + 10px + var(--intro-p) * 1.8);
  --intro-breath: 14px; /* 測った高さは式より 2〜3px 高い（行の箱）。1440×900 で絵が前と同じ幅（1440）になる数 */
  --intro-bottom: calc(var(--mast-b) + var(--intro-gap) + var(--intro-h, var(--intro-fallback)) + var(--intro-breath));
  /* 公園の高さ（.park の min-height 600px と同じ。低い横向きの窓では 1 画面に収めるので 100svh） */
  --park-h: max(100vh, 600px);
  /* 絵の幅の上限 2 つ：高さの 2.05 倍と、左の岩山の頂（絵の上から 296 / 1000）が見出しのかたまりより下に来る幅。
     --mesa-k = 1600 ÷ (1000 − 296)。296 は backdrop.js の左の岩山 mesa(-40, horizon - 4, 340, 186, 3) の頂（形を変えたら、ここも） */
  --mesa-k: 2.27;
  --scene-max: calc(var(--park-h) * 2.05);
  /* 背の低い窓では、絵が小さくなるぶん、下の道具の棚（高さ 56 + 下 16）が遊具の札（絵の y 878 あたり）にかかる。
     絵をその分だけ持ち上げる（下は backdrop.js が地面を描き足してある）。110 = 棚 68 + ふりがなつきの札 39 + すきま 3、--tag-k = (1000 − 878) ÷ 1600。
     絵の幅が窓の幅で決まるときは 1 つ目、高さで決まるときは 2 つ目（絵の幅 = (公園の高さ − 見出し − 持ち上げ) × --mesa-k を解いた式）。1440×900 では 0（絵は前と同じ） */
  --tag-lift: 110px;
  --tag-k: .07625;
  --park-pb: clamp(0px, max(calc(var(--tag-lift) - min(100vw, var(--scene-max)) * var(--tag-k)), calc((var(--tag-lift) - (var(--park-h) - var(--intro-bottom)) * var(--tag-k) * var(--mesa-k)) / (1 - var(--tag-k) * var(--mesa-k)))), 72px);
  /* 横の公園の絵の幅（.scene と同じ式。見出しの左の位置と、細い遊具の当たりの太さが読む） */
  --scene-px: min(100vw, var(--scene-max), calc((var(--park-h) - var(--intro-bottom) - var(--park-pb)) * var(--mesa-k)));
  /* 見出しの左の端：絵の左の端から余白 1 つ。窓が絵より横長（左右に描き足した帯がある）とき、見出しが帯の空に浮かないように（C-ART-8） */
  --intro-x: max(var(--gl), calc((100vw - var(--scene-px)) / 2 + var(--gl)));
  /* 縦の公園の絵の幅。幅 600 以上（タブレットの縦など）は、高さの 48% まで（最初の画面に入口の札が出る。線の太さがスマホと同じくらいに）。
     ただし 400px より細くしない（見出しの 2 行が入る幅。C-ART-3） */
  --tall-w: 100vw;
}
@supports (height: 100svh) { :root { --park-h: max(100svh, 600px); } }
@media (min-width: 600px) {
  :root { --tall-w: max(min(100vw, 48vh), min(100vw, 400px)); }
  @supports (height: 100svh) { :root { --tall-w: max(min(100vw, 48svh), min(100vw, 400px)); } }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
/* 紙（T-16）：粒のノイズはやめ、漉き目（ごくうすい横の線）と繊維（ゆるく曲がった短い線）を描いた 1 枚（240px 四方のくり返し）を、紙の面にだけ敷く。
   線は、乱数の種 11 で一度だけ描いて書きこんだ決まった絵（いつ来ても同じ紙）。
   線の形は mask の絵（#000 は形で、色ではない）、色は墨（--ink）。夜は墨が生成りになるので、繊維がうすく浮く。
   画面いっぱいの重ね合わせ（multiply）はしない。動画・絵・公園の上には掛からない。乱数でなく決まった絵（いつ来ても同じ紙） */
:root {
  --paper-lines: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath stroke-opacity='.024' stroke-width='.5' d='M0 9.5H240M0 24.5H240M0 39.5H240M0 54.5H240M0 69.5H240M0 84.5H240M0 99.5H240M0 114.5H240M0 129.5H240M0 144.5H240M0 159.5H240M0 174.5H240M0 189.5H240M0 204.5H240M0 219.5H240M0 234.5H240'/%3E%3Cpath stroke-opacity='.11' stroke-width='.6' d='M109 134q5.8 3.0 11.9 5.4M44 123q4.9 -0.2 9.7 1.3M22 194q-3.6 7.9 -3.2 16.5M157 148q4.0 5.6 4.4 12.5M46 58q6.3 -1.5 11.2 -5.7M125 154q6.3 -1.0 12.7 -0.0M239 239q5.8 0.8 10.9 3.8M-1 239q5.8 0.8 10.9 3.8M239 -1q5.8 0.8 10.9 3.8M69 17q7.7 1.6 15.2 4.2M230 203q4.0 7.1 7.8 14.3M235 95q6.5 -4.1 13.9 -6.3M-5 95q6.5 -4.1 13.9 -6.3M21 80q4.9 1.2 8.9 4.5M24 14q-1.8 6.5 -3.9 12.9M46 176q4.5 -2.1 9.3 -3.6M51 65q4.3 4.1 10.2 5.2M51 95q3.8 3.7 9.2 3.4M51 62q6.0 -0.3 11.0 3.1M22 140q5.7 -1.7 11.6 -3.0M230 116q5.3 -1.1 10.4 0.8M-10 116q5.3 -1.1 10.4 0.8M218 196q-0.0 7.7 3.7 14.4M47 228q6.4 0.7 11.5 4.6'/%3E%3C/g%3E%3C/svg%3E");
}
/* mask が使えないブラウザーでは、紙の線は出さない（出すと、墨の色の板が紙を覆ってしまう） */
@supports ((mask-image: none) or (-webkit-mask-image: none)) {
  .guide { isolation: isolate; }
  .guide::before, .sheet::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--ink);
    -webkit-mask: var(--paper-lines) 0 0 / 240px 240px repeat;
    mask: var(--paper-lines) 0 0 / 240px 240px repeat;
  }
  /* 紙のページは中身だけが流れる。紙目は窓に止めておく（固定の紙の上を、字が送られていく） */
  .sheet::before { position: fixed; }
  /* 紙のページの綴じ（左の端に、小さな綴じ穴の列）。うるさくしないよう、髪の毛の線の色で */
  .sheet::after {
    content: '';
    position: fixed;
    left: max(6px, calc(var(--gl) - var(--gutter) + 6px)); /* 本文の左の端（--gl）より、いつも外がわ（段 9） */
    top: calc(var(--mast-b) + 18px);
    bottom: 18px;
    width: 7px;
    pointer-events: none;
    background: var(--hair);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='44'%3E%3Ccircle cx='3.5' cy='22' r='2.2' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") 0 0 / 7px 44px repeat-y;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='44'%3E%3Ccircle cx='3.5' cy='22' r='2.2' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") 0 0 / 7px 44px repeat-y;
  }
}
/* 幅 480 以下では、綴じ穴と本文の左の端のすき間が 3px しかなく窮屈なので、綴じ穴は出さない（C-ART-7） */
@media (max-width: 480px) { .sheet::after { display: none; } }
img, svg, canvas, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .28em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* 読み上げのために移すフォーカス（紙のページの見出しと、紙そのもの。tabindex="-1"）には、わくを出さない。
   iPhone の Safari は、指で開いたときにも :focus-visible にするので、見出しに黒いわくが出ていた（段 9）。押せる物のわくは変えない */
:is(h1, h2, h3, .sheet)[tabindex='-1']:focus-visible { outline: none; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: max(12px, env(safe-area-inset-left, 0px)); top: -60px; z-index: 300; padding: 8px 14px; background: var(--ink); color: var(--paper); border-radius: 4px; }
.skip:focus { top: 12px; }
.eyebrow {
  margin: 0;
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--ink-2);
}

/* ---------- 見出し帯 ---------- */
.mast {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: var(--mast-b);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: env(safe-area-inset-top, 0px) var(--gr) 0 var(--gl);
  transition: background-color .3s, box-shadow .3s;
}
/* 透明なあいだは、帯のすきまの押しを下（空の太陽や月、遊び）へ通す。地が付いたら（.solid・紙のページ）受ける */
.mast { pointer-events: none; }
.mast > *, .mast.solid, body.sheet-open .mast { pointer-events: auto; }
.mast.solid, body.sheet-open .mast { background: var(--paper); background: color-mix(in srgb, var(--paper) 94%, transparent); box-shadow: 0 1px 0 var(--hair); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.brand { display: flex; flex-direction: column; justify-content: center; min-height: var(--tap); text-decoration: none; line-height: 1.2; margin-right: auto; white-space: nowrap; } /* 当たりは 44 の高さ（C3） */
.brand-ja { font-family: var(--f-serif); font-weight: 600; font-size: 20px; letter-spacing: .06em; }
.brand-en { font-family: var(--f-latin); font-style: italic; font-size: 13px; color: var(--ink); letter-spacing: .01em; } /* 空の上の小さい字なので墨（--ink-2 は空の上で 4.5 に届かない。A11Y-10） */
.nav { display: flex; gap: 2px; white-space: nowrap; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap); /* 2 字の「作品」「連絡」も、幅 320 で 44 の当たり（C3） */
  padding: 0 12px;
  font-size: 14px;
  letter-spacing: .08em;
  text-decoration: none;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: 9px;
  height: 1px;
  background: currentColor;
  transform: scaleX(.35);
  transform-origin: left;
  opacity: .5;
  transition: transform .35s var(--ease-out), opacity .35s;
}
.nav a:hover::after, .nav a[aria-current='page']::after { transform: scaleX(1); opacity: 1; }
.nav a[aria-current='page'] { font-weight: 700; }
.sound-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap); min-width: var(--tap);
  padding: 0 12px;
  border: 1px solid var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 72%, transparent); /* 押せる物の輪郭は、空の上でも 3:1 を超える濃さに（A11Y-11） */
  border-radius: 999px;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  font-size: 12px;
  letter-spacing: .06em;
}
.sound-btn svg { width: 18px; height: 18px; }
.sound-btn .on { display: none; }
.sound-btn[aria-pressed='true'] .on { display: inline; }
.sound-btn[aria-pressed='true'] .off { display: none; }
.sound-btn[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- 公園 ---------- */
.park {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  /* 絵の外は、空のいちばん上の色の平塗り（絵の空はここから始まるので、継ぎ目が出ない。M-04） */
  background: var(--c-sky-top);
}
.stage { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: var(--park-pb); }
/* 絵は下ぞろえ。幅は 3 つのうち小さいもの：窓の幅／高さの 2.05 倍／左の岩山の頂（絵の上から 29.6%）が見出しのかたまりより下に来る幅（:root の --scene-px）。
   岩山は縮めない（X-19）。絵が窓より細くなった左右は、backdrop.js が空・丘・地面を描き足してある */
.scene {
  position: relative;
  flex: none;
  width: min(100%, 205vh);
  width: min(100%, var(--scene-px));
  aspect-ratio: 1600 / 1000;
}
.backdrop-slot, .backdrop { position: absolute; inset: 0; width: 100%; height: 100%; }
.backdrop { overflow: visible; } /* 枠の外に描き足した分も見せる。切るのは .park */
.landmarks { position: absolute; inset: 0; }
.scene.zooming { transition: transform .6s cubic-bezier(.6, 0, .9, .5), filter .6s; }

.intro {
  position: absolute;
  left: var(--intro-x);
  top: calc(var(--mast-b) + var(--intro-gap));
  pointer-events: none;
}
/* 見出しは 2 行の明朝。句のまとまり（.ph。main.js が「、」「。」のあとで分ける）の途中では折らず、句と句のあいだで折る。
   幅の上限（13 字ぶん）で、いつも「…人の、／小さな公園。」の 2 行になる */
.intro h1 {
  max-width: 13em;
  margin: 0;
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: var(--intro-h1);
  line-height: 1.3;
  letter-spacing: .04em;
}
.intro .ph { display: inline-block; }
/* 句の中では、ふつうは折れない（字の大きさは、いちばん長い句が窓に入るように決めてある）。持ち主が長い句を書いたときは、句の中でも折れて、はみ出さない */
/* 見出しの中の欧文（AI など）は Fraunces で。和文とのあいだは、書体の空きにまかせて空白を打たない（art.md 9.6） */
.intro h1 .en { font-family: var(--f-latin); font-weight: 300; letter-spacing: .01em; margin-inline-end: .06em; }
/* 句の終わりの「、」「。」のあとの空きを 0.3 字つめる（art.md 10.3）。margin でなく字間で（margin だと Chrome が句の幅を短く見積もり、句の中で折れた） */
.intro h1 .yaku { letter-spacing: -.3em; }
.intro p { margin: 10px 0 0; font-size: var(--intro-p); color: var(--ink); letter-spacing: .04em; } /* 空の上にのるので、見出しと同じ墨（--ink-2 は 4.5:1 に届かない） */

/* 遊具（ボタン） */
.lm {
  position: absolute;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.lm .art { width: 100%; height: auto; overflow: visible; transition: transform .35s var(--ease-out); }
.lm .hit { pointer-events: all; fill: transparent; stroke: none; cursor: pointer; }
/* スコップとジョウロは絵が細い。当たりを絵のまわり 11px ずつ広げる（画面の上の太さ。M-08・--tap）。
   横の公園で絵が小さい窓（横向きのスマホ・拡大）では、細いほうの寸法（スコップの幅 52、ジョウロの高さ 71。絵の単位）＋線が 46px になるまで太くする（C2） */
.lm[data-kind='shovel'] .hit, .lm[data-kind='can'] .hit { stroke: transparent; stroke-width: 22px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
html[data-layout='wide'] .lm[data-kind='shovel'] .hit { stroke-width: max(22px, calc(46px - var(--scene-px) * .0325)); }
html[data-layout='wide'] .lm[data-kind='can'] .hit { stroke-width: max(22px, calc(46px - var(--scene-px) * .0444)); }
.lm[data-kind='can']:hover .art { transform: translateY(-3px) rotate(-1.5deg); }
.lm:hover .tag { background: var(--paper-hi); }
.lm:focus-visible { outline: none; }
.lm[data-notag]:focus-visible { outline: 2px dashed var(--ink); outline-offset: 4px; } /* 札が無いので、遊具そのものに（段 9） */
.lm:focus-visible .tag { background: var(--ink); color: var(--paper); outline: 2px dashed var(--ink); outline-offset: 4px; }
.lm:focus-visible .tag i { color: var(--paper-3); } /* 墨の地の上の小さい字（--ink-2 のままだと 2:1。ART-03） */
.lm.busy .hit { cursor: progress; }
/* 下は、一言の帯（2〜3 行）と道具の棚に、遊具の箱の下に出る札の分を足した幅 */
html[data-layout='tall'] .lm { scroll-margin: 0 0 calc(max(10px, env(safe-area-inset-bottom)) + 175px); }
.tag {
  position: absolute;
  left: var(--tx, 50%);
  top: var(--ty, 100%);
  transform: translate(-50%, 0);
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 3px 10px 4px;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: .06em;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--shade);
  transition: background-color .2s, color .2s, transform .35s var(--ease-out);
}
.tag::before {
  content: '';
  position: absolute;
  left: 50%; top: -9px;
  width: 1px; height: 8px;
  background: var(--ink);
}
.tag b { font-weight: 700; }
.tag i { font-style: normal; font-size: 12px; color: var(--ink-2); }
.tag i::before { content: '—'; margin-right: 6px; opacity: .6; }
.lm:hover .tag { transform: translate(-50%, -2px); }
.lm[data-side] .tag { transform: translate(0, -50%); }
.lm[data-side] .tag::before { left: -9px; top: 50%; width: 8px; height: 1px; }
.lm[data-side]:hover .tag { transform: translate(2px, -50%); }
/* 演出のあいだに押された遊具：札が小さくはずんで「聞こえた」と返す（park.js の heard()。T-19）。動きを減らすと、地の色だけ */
.lm.heard .tag { background: var(--paper-hi); animation: tag-heard .38s var(--ease-out); }
.lm[data-side].heard .tag { animation-name: tag-heard-side; }
@keyframes tag-heard { 40% { transform: translate(-50%, -4px); } }
@keyframes tag-heard-side { 40% { transform: translate(3px, -50%); } }
/* 札のふりがな（W-1-041・DECISIONS §15-4 の試し）。7 歳は「砂場・花壇・連絡」が読めない。札の字の上に 9px で、読み上げでは読ませない（content の / ''）。
   名前の列（b）と行き先の列（i）の上に 1 段。対応しないブラウザーでは段ごと出さない */
@supports (content: 'あ' / '') {
  .lm:not([data-kind='shovel']):not([data-kind='can']) .tag { padding-top: 13px; }
  .tag b, .tag i { position: relative; }
  .tag b::after, .tag i::after {
    position: absolute; left: 50%; bottom: calc(100% - 1px);
    transform: translateX(-50%);
    font-size: 9px; font-weight: 400; font-style: normal; line-height: 1; letter-spacing: -.02em; white-space: nowrap;
    color: var(--ink-2);
  }
  .lm:focus-visible .tag b::after, .lm:focus-visible .tag i::after { color: var(--paper-3); }
  .lm[data-kind='sandbox'] .tag b::after { content: 'すなば' / ''; }
  .lm[data-kind='sandbox'] .tag i::after { content: 'さくひん' / ''; }
  .lm[data-kind='roundabout'] .tag b::after { content: 'かいてんだい' / ''; }
  .lm[data-kind='roundabout'] .tag i::after { content: 'おしらせ' / ''; }
  .lm[data-kind='slide'] .tag b::after { content: 'すべりだい' / ''; }
  .lm[data-kind='slide'] .tag i::after { content: 'れんらく' / ''; }
  .lm[data-kind='flowerbed'] .tag b::after { content: 'かだん' / ''; }
  .lm[data-kind='flowerbed'] .tag i::after { content: 'みずやり' / ''; }
  /* ふりがなの段の分だけ札がのびて、すべり台の札が回転台の屋根にかかる。横の公園では、札の頭を少し上げる。
     札の位置の段（ここと、下の窓の大きさの段）は、park.js が書く --tx/--ty には触らず、札の left/top を直に替える（!important なし。C-4） */
  html[data-layout='wide'] .lm[data-kind='slide'] .tag { top: 96.5%; }
}
/* 砂場は、指で横になぞると熊手の跡。縦は送り、2 本指は拡大のまま（park.js の RAKE_TOUCH。T-06） */
.lm[data-kind='sandbox'] { touch-action: pan-y pinch-zoom; }
.lm[data-kind='shovel'] .tag, .lm[data-kind='can'] .tag { font-size: 12px; padding: 2px 8px; }
.lm[data-notag] .tag { display: none; }
.lm.held { opacity: 0; pointer-events: none; }
.lm.held .hit, .lm.held .tag { pointer-events: none; }
/* スコップは砂に刺さっている。持ち上げても砂山と抜けた跡は残る */
.sv-tool { transition: opacity .25s, transform .35s var(--ease-out); transform-box: view-box; transform-origin: 30px 124px; }
.lm[data-kind='shovel']:hover .sv-tool { transform: rotate(-4deg); }
.lm[data-kind='shovel'].held { opacity: 1; }
.lm[data-kind='shovel'].held .sv-tool, .lm[data-kind='shovel'].held .tag { opacity: 0; }
.sv-dent { opacity: 0; transition: opacity .25s; }
.lm[data-kind='shovel'].held .sv-dent { opacity: 1; }
.lm[data-kind='shovel'], .lm[data-kind='can'] { transition: opacity .25s; }

/* 空と時間帯 */
/* 太陽と月の居場所（絵の座標。単位なし）は、ここにだけ書く。絵と、押せる場所（.sky-btn）が同じ数字を使う。
   絵は原点に描いてある（parts.js）。月は、夜になるまで丘の向こうで待つ */
:root {
  --scene-w: 1600; --scene-h: 1000;
  --sun-x: 1160; --sun-y: 318; --sun-s: 1; --sun-r: 36;
  --moon-x: 1190; --moon-y: 522; --moon-r: 30;
}
:root[data-phase='dawn'] { --sun-x: 1085; --sun-y: 448; }
:root[data-phase='dusk'] { --sun-x: 455; --sun-y: 454; --sun-s: 1.45; }
:root[data-phase='night'] { --sun-x: 455; --sun-y: 648; --sun-s: 1.45; --moon-y: 262; }
/* 横に広い窓・背の低い窓・横向きのスマホのための位置の段（直し A で足したもの）は、段 C でやめた。
   絵の大きさに上限が付き（.scene）、絵の上が切れなくなったので、太陽と月は時間帯ごとの 1 つの位置のままで
   見出し帯・見出しの字・道具の棚にかからない（tmp/b2b-C の数で確かめた） */
/* 縦の公園。時間帯の規則のほうが強いので、上で時間帯が書いた数字は、縦でも時間帯ごとに全部書く */
html[data-layout='tall'] {
  --scene-w: 400; --scene-h: 1040;
  --sun-x: 136; --sun-y: 240; --sun-r: 17;
  --moon-x: 130; --moon-y: 382; --moon-r: 15;
}
html[data-layout='tall'][data-phase='dawn'] { --sun-x: 236; --sun-y: 292; }
html[data-layout='tall'][data-phase='dusk'] { --sun-x: 188; --sun-y: 302; --sun-s: 1.4; }
html[data-layout='tall'][data-phase='night'] { --sun-x: 188; --sun-y: 452; --sun-s: 1.4; --moon-y: 240; }
/* 幅 320px ほどの窓では、絵が小さくなるのに字の高さは変わらず、昼の太陽と夜の月が見出しの下の 2 行にかかる。少し下げる */
@media (max-width: 340px) {
  html[data-layout='tall'][data-phase='day'] { --sun-y: 258; }
  html[data-layout='tall'][data-phase='night'] { --moon-y: 258; }
}
/* 夜：沈みきった太陽を、見えないまま朝の場所の真下へ運ぶ（朝は、まっすぐ昇る）。付けるのは sky.js。運ぶときは流さない */
:root[data-sun-under] { --sun-x: 1085; }
html[data-layout='tall'][data-sun-under] { --sun-x: 236; }

.backdrop .sun, .backdrop .moon {
  transform-box: view-box;
  transform-origin: 0 0;
  transition: transform var(--phase-ms, 1.8s) cubic-bezier(.45, 0, .2, 1), opacity calc(var(--phase-ms, 1.8s) * .66) ease;
}
.backdrop .sun { transform: translate(calc(var(--sun-x) * 1px), calc(var(--sun-y) * 1px)) scale(var(--sun-s)); }
.backdrop .moon { transform: translate(calc(var(--moon-x) * 1px), calc(var(--moon-y) * 1px)); opacity: 0; }
:root[data-phase='night'] .backdrop .sun { opacity: 0; }
/* 運ぶのは夜のあいだだけ流さない（朝へ替わるときは、印がまだ残っていても、ふつうに流れて昇る） */
:root[data-phase='night'][data-sun-under] .backdrop .sun { transition: none; }
:root[data-phase='night'] .backdrop .moon { opacity: 1; }

/* 星は夜だけ。夕方は一番星（.first）だけを薄く。鳥は夜には帰る */
.backdrop .stars, .backdrop .birds, .backdrop .pool, .backdrop .halo { transition: opacity var(--phase-ms, 1.8s) ease; }
.backdrop .stars, .backdrop .pool { opacity: 0; }
:root[data-phase='dusk'] .backdrop .stars.first { opacity: .75; }
:root[data-phase='night'] .backdrop .stars { opacity: 1; }
:root[data-phase='night'] .backdrop .birds { opacity: 0; }
/* 街灯（DECISIONS 4-3・C-ART-2）：灯りは、つぼみの明るい色（C.lit）だけで語る。つぼみのまわりの円（.halo）は出さない。
   足もとは、平塗りの明かりでなく、夜だけ細い墨の破線の輪（光らせない）。ride.js の LIGHT も同じ */
.backdrop .halo { display: none; }
:root[data-phase] .backdrop .pool { fill: none; stroke: var(--c-ink); stroke-width: .8px; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; opacity: 0; }
:root[data-phase='night'] .backdrop .pool { opacity: .45; }
/* 星のまたたき。見えない時間帯は止めておく（消したり付けたりすると、変わり目で星が跳ねる） */
@keyframes star-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.backdrop .stars .tw { animation: star-twinkle 7s ease-in-out infinite; animation-play-state: paused; }
:root[data-phase='night'] .backdrop .stars .tw, :root[data-phase='dusk'] .backdrop .stars.first .tw { animation-play-state: running; }
.backdrop .stars .tw1 { animation-delay: -1.4s; }
.backdrop .stars .tw2 { animation-delay: -2.9s; }
.backdrop .stars .tw3 { animation-delay: -4.3s; }
.backdrop .stars .tw4 { animation-delay: -5.8s; }
.backdrop .stars .tw5 { animation-delay: -7.1s; }
html[data-motion='reduce'] .backdrop .stars .tw { animation: none; }
/* 見出しの字の裏にくる星（窓が短いとき）。park.js の hushStars() が印を付ける */
.backdrop .stars .hush { visibility: hidden; } /* display: none にしない：隠したあとも場所を測りなおせるように */

/* 太陽と月を押す場所。絵より少し大きい丸で、絵と同じ数字で置く（絵が動けば、いっしょに動く） */
.sky-spots { position: absolute; inset: 0; pointer-events: none; }
.sky-btn {
  position: absolute;
  aspect-ratio: 1;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: left var(--phase-ms, 1.8s) cubic-bezier(.45, 0, .2, 1), top var(--phase-ms, 1.8s) cubic-bezier(.45, 0, .2, 1), width var(--phase-ms, 1.8s) cubic-bezier(.45, 0, .2, 1);
}
.sky-btn[hidden] { display: none; }
.sky-btn[data-sky='sun'] {
  left: calc(var(--sun-x) / var(--scene-w) * 100%);
  top: calc(var(--sun-y) / var(--scene-h) * 100%);
  width: max(44px, calc(var(--sun-r) * var(--sun-s) * 2.6 / var(--scene-w) * 100%));
}
.sky-btn[data-sky='moon'] {
  left: calc(var(--moon-x) / var(--scene-w) * 100%);
  top: calc(var(--moon-y) / var(--scene-h) * 100%);
  width: max(44px, calc(var(--moon-r) * 2.8 / var(--scene-w) * 100%));
}
.sky-btn:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 2px; }
/* 押した手ごたえ：絵が少し沈む（光らせない）。sky.js が html に data-sky-press を付ける */
.backdrop .sun .body, .backdrop .moon .body { transform-box: view-box; transform-origin: 0 0; transition: transform .18s var(--ease-out); }
html[data-sky-press='sun'] .backdrop .sun .body { transform: translateY(calc(var(--sun-r) * .07px)) scale(.95); }
html[data-sky-press='moon'] .backdrop .moon .body { transform: translateY(calc(var(--moon-r) * .07px)) scale(.95); }

/* 背景の小さな動き */
/* 雲：1つずつ別の層で、風下（右）へゆっくり流れ続け、ほんの少し上下する。絵の枠の外の帯まで流れる（切るのは .park）。
   見出しの字のうしろは通り道にしない（backdrop.js の雲の高さ）。マスクは掛けない（T-16・perf L） */
.clouds { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.cloud { position: absolute; animation: cloud-run var(--d, 300s) linear var(--delay, 0s) infinite; will-change: transform; }
.cloud svg { display: block; width: 100%; height: 100%; overflow: visible; animation: cloud-bob var(--b, 20s) ease-in-out var(--bd, 0s) infinite alternate; }
@keyframes cloud-run { from { transform: translate3d(var(--from), 0, 0); } to { transform: translate3d(var(--to), 0, 0); } }
@keyframes cloud-bob { from { transform: translate3d(0, calc(var(--by, 2%) * -1), 0); } to { transform: translate3d(0, var(--by, 2%), 0); } }
.isle { animation: bob 7s ease-in-out infinite alternate; }
.swing { animation: sway 4.6s ease-in-out infinite alternate; }
.swing-seat { animation: sway-seat 4.6s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-8px); } }
@keyframes sway { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
@keyframes sway-seat { from { transform: rotate(3.5deg); } to { transform: rotate(-3.5deg); } }
.glint, .dig-glint { animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
/* 見えていないあいだ（紙のページ・裏のタブ・公園が画面の外）は、ずっと動く絵を止める。合図は park.js の quiet()（X-25・T-17）。
   ずっと動く絵を足したら、ここにも足す */
:root[data-quiet] :is(.cloud, .cloud svg, .cloud-drawn, .cloud-drawn svg, .isle, .swing, .swing-seat, .glint, .dig-glint, .play-in), :root[data-quiet] .backdrop .stars .tw { animation-play-state: paused; }
.drift { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
/* タンポポ：押すと綿毛が飛ぶ。球のまわりは指でも押しやすいように広めに */
.dandelion { position: absolute; z-index: 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dandelion svg { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.dandelion::before { content: ''; position: absolute; left: 50%; top: var(--head, 30%); width: max(44px, 100%); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.dandelion:focus-visible { outline: none; }
.dandelion:focus-visible::before { outline: 2px dashed var(--ink); outline-offset: 2px; }
.dl-head { transition: transform .4s var(--ease-out); transform-box: fill-box; transform-origin: 50% 50%; }
.dandelion:hover .dl-head { transform: scale(1.05); }
.dl-ball { opacity: var(--full, 1); transition: opacity 1.4s ease; }
.fluff { position: absolute; pointer-events: none; transform-origin: 50% 28%; }
.fluff svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* 花壇の成長段階 */
.fb-stem, .fb-stem-ink {
  stroke-dasharray: var(--len, 160px) var(--len, 160px); stroke-dashoffset: var(--len, 160px); opacity: 0;
  transition: stroke-dashoffset 1.1s var(--ease-out), opacity .3s;
}
.fb-l1, .fb-l2, .fb-l3, .fb-l4, .fb-curl, .fb-bud, .fb-bloom { transform: scale(0); opacity: 0; transition: transform .8s var(--ease-out), opacity .4s; transform-box: view-box; }
.fb-sprout { transition: transform .6s var(--ease-out); }
[data-stage='1'] .fb-stem, [data-stage='1'] .fb-stem-ink { stroke-dashoffset: calc(var(--len, 160px) * .62); opacity: 1; }
[data-stage='2'] .fb-stem, [data-stage='2'] .fb-stem-ink,
[data-stage='3'] .fb-stem, [data-stage='3'] .fb-stem-ink { stroke-dashoffset: 0; opacity: 1; }
[data-stage='1'] .fb-l1, [data-stage='1'] .fb-l2,
[data-stage='2'] .fb-l1, [data-stage='2'] .fb-l2, [data-stage='2'] .fb-l3, [data-stage='2'] .fb-l4, [data-stage='2'] .fb-curl,
[data-stage='3'] .fb-l1, [data-stage='3'] .fb-l2, [data-stage='3'] .fb-l3, [data-stage='3'] .fb-l4, [data-stage='3'] .fb-curl { transform: scale(1); opacity: 1; }
[data-stage='1'] .fb-l1 { transition-delay: .3s; }
[data-stage='1'] .fb-l2 { transition-delay: .5s; }
[data-stage='2'] .fb-l3 { transition-delay: .5s; }
[data-stage='2'] .fb-l4 { transition-delay: .7s; }
[data-stage='2'] .fb-curl { transition-delay: .4s; }
[data-stage='2'] .fb-bud { transform: scale(1); opacity: 1; transition-delay: .8s; }
[data-stage='3'] .fb-bud { transform: scale(1.2); opacity: 0; }
[data-stage='3'] .fb-bloom { transform: scale(1) rotate(0); opacity: 1; transition: transform 1.2s cubic-bezier(.3, 1.5, .5, 1), opacity .4s; }
.fb-bloom { transform: scale(.2) rotate(-40deg); }
.spore { opacity: 0; }
/* 咲いた瞬間だけ、花粉が少し舞う（読み込み直したときは出さない） */
.blooming .spore { animation: spore 2.4s ease-out var(--d, 0s) 1 both; }
@keyframes spore {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x, 10px), -46px); }
}

/* ---------- 道具の棚 ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: max(12px, calc(env(safe-area-inset-bottom, 0px) + 6px)); /* ホームバーとのあいだに 6px のゆとり（M-06） */
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 4px 0 var(--shade);
  transform: translateX(-50%);
  transition: transform .4s var(--ease-out), opacity .3s;
}
.dock.away { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.dock-title { font-size: 11px; letter-spacing: .12em; padding: 0 8px 0 12px; color: var(--ink-2); white-space: nowrap; }
.tool {
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: var(--tap);
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  letter-spacing: .06em;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.tool svg { width: 22px; height: 22px; flex: none; }
@media (hover: hover) { .tool:hover { background: var(--paper-2); } } /* 指の画面では、押したあとに残るので（段 9） */
.tool[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.status {
  position: fixed;
  /* 真ん中に置き、幅は文の長さだけ。左右 12px まで使える（left: 50% と translate だと、画面の半分で折れていた。M-07） */
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(max(12px, calc(env(safe-area-inset-bottom, 0px) + 6px)) + 70px);
  z-index: 70;
  width: fit-content;
  max-width: min(calc(100% - 24px), 520px);
  margin: 0 auto;
  padding: 7px 16px;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 14px;
  pointer-events: none; /* 読ませるだけ。出ているあいだも、下の札や遊具の押しを取らない（C5） */
  transition: opacity .35s, transform .35s var(--ease-out);
}
.status:empty, .status.quiet { opacity: 0; transform: translateY(6px); pointer-events: none; }
.status.away { opacity: 0; pointer-events: none; }

/* 持っている道具がポインターについてくる */
.cursor-tool {
  position: fixed;
  left: 0; top: 0;
  z-index: 80;
  width: 64px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  will-change: transform;
}
.cursor-tool.on { opacity: 1; }
.cursor-tool svg { width: 100%; height: auto; overflow: visible; }
.cursor-tool svg.cursor-shovel { width: 34px; }

/* ---------- 公園の下 ---------- */
.guide { position: relative; display: flow-root; background: var(--paper); padding: 0 var(--gr) calc(110px + env(safe-area-inset-bottom, 0px)) var(--gl); }
.guide-edge { position: relative; z-index: 1; height: 44px; margin: -40px calc(var(--gr) * -1) 0 calc(var(--gl) * -1); }
.guide-edge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.guide-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: clamp(48px, 8vw, 96px);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(40px, 6vw, 96px);
}
.guide h2 { margin: 2px 0 20px; font-family: var(--f-serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: .04em; }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.how li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hair); }
/* あそびかたの小さな絵は紙にじかに描く線画なので、線は UI の墨で引く（夜は生成りの線になる。お知らせの旗と同じ考え方） */
.how .pic { width: 52px; height: 44px; --c-ink: var(--ink); }
.how .pic svg { width: 100%; height: 100%; overflow: visible; }
.how b { display: block; font-weight: 700; font-size: 14px; letter-spacing: .06em; }
.how span { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.how a { text-decoration: none; }
.how a:hover b { text-decoration: underline; }
/* 入口へのリンクの行（pages.js の renderGuide）：行ごと押せる。遊びが足す行は li が絵と字を持つ */
.how li.how-go { display: block; padding: 0; }
.how-go a { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; min-height: 44px; padding: 10px 0; color: inherit; }
.guide-about p { margin: 0 0 12px; }
.links { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.links a {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap); padding: 0 18px;
  border: 1px solid var(--ink); border-radius: 999px;
  text-decoration: none; font-size: 14px; letter-spacing: .04em;
  transition: background-color .2s, color .2s;
}
.links a svg { width: 15px; height: 15px; }
@media (hover: hover) { .links a:hover { background: var(--ink); color: var(--paper); } }
.foot {
  max-width: 1120px;
  margin: clamp(56px, 8vw, 96px) auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-2);
}
.prefs { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); cursor: pointer; }
.switch input { appearance: none; width: 34px; height: 20px; border: 1px solid var(--ink); border-radius: 999px; position: relative; margin: 0; cursor: pointer; background: var(--paper); transition: background-color .2s; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform .25s var(--ease-out), background-color .2s; }
.switch input:checked { background: var(--leaf); }
/* 入のつまみは、色の地（葉の色）にのる墨で。夜の生成りの墨だと葉の色に沈む（2.7:1）ので、--on-fill にする（昼は --ink と同じ色） */
.switch input:checked::after { transform: translateX(14px); background: var(--on-fill); }
/* 公園の時間：小さな丸をえらぶ。字の大きさと調子は、となりのスイッチに合わせる */
.time-pref { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
.time-pref-label { margin-right: 2px; }
.pick { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--tap); min-width: var(--tap); cursor: pointer; } /* 「朝」「昼」「夜」も 44 の当たり（C3） */
.pick input { appearance: none; position: relative; width: 16px; height: 16px; margin: 0; border: 1px solid var(--ink); border-radius: 50%; background: var(--paper); cursor: pointer; }
.pick input::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .2s var(--ease-out); }
.pick input:checked::after { transform: scale(1); }
.text-btn { border: 0; background: none; padding: 0; min-height: var(--tap); text-decoration: underline; text-underline-offset: .28em; color: inherit; }
/* はじめにもどすボタンと、その下の「何がもどるか」（W-1-092） */
.reset { display: grid; justify-items: start; }
.reset-note { margin: -6px 0 6px; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.copy { margin: 0; font-family: var(--f-latin); }

/* ---------- 紙のページ（作品・お知らせ・連絡・瓶） ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* 紙の右下の角を、小さく折る（折り返しの三角と、折り目の墨の線。どちらも境のはっきりした平塗り。T-16）。
     背景は中身と一緒には流れないので、角はいつも窓の右下にある */
  --fold: 22px;
  background:
    linear-gradient(135deg, transparent calc(50% - .6px), var(--ink) calc(50% - .6px), var(--ink) calc(50% + .4px), transparent calc(50% + .4px)) right bottom / var(--fold) var(--fold) no-repeat,
    linear-gradient(135deg, transparent 50%, var(--paper-2) 50%) right bottom / var(--fold) var(--fold) no-repeat,
    var(--paper);
  outline: none;
}
@media (max-width: 760px) { .sheet { --fold: 16px; } }
.sheet.entering { animation: sheet-in .55s var(--ease-out) both; }
.sheet.leaving { animation: sheet-out .35s ease-in both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(12px); } }
.sheet-inner { max-width: 1160px; margin: 0 auto; padding: clamp(22px, 4vw, 44px) var(--gr) calc(80px + env(safe-area-inset-bottom, 0px)) var(--gl); }
.sheet-band { position: relative; height: clamp(36px, 4.6vw, 56px); margin-top: var(--mast-b); }
.sheet-band svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* お知らせの旗は紙にじかに描く線画なので、綱と旗のふちは UI の墨で引く（夜は生成りの線になる） */
.sheet-band[data-kind='news'] { --c-ink: var(--ink); }
.sheet-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: clamp(26px, 4vw, 44px); }
.sheet-head h2 { margin: 2px 0 0; font-family: var(--f-serif); font-weight: 400; font-size: clamp(26px, 8.2vw, 54px); line-height: 1.25; letter-spacing: .04em; }
.sheet-head .lede { margin: 10px 0 0; color: var(--ink-2); max-width: 36em; }
.back {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap); padding: 0 16px 0 10px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--paper); text-decoration: none; font-size: 14px; letter-spacing: .04em;
  transition: background-color .2s, color .2s;
}
.back svg { width: 18px; height: 18px; }
.back:hover { background: var(--ink); color: var(--paper); }

/* 作品一覧：上の段（作品）と下の段（解説） */
.sheet-inner.shelf-top { padding-bottom: clamp(64px, 9vw, 112px); }
.shelf-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 clamp(20px, 3vw, 36px); }
.shelf-nav button {
  display: flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 6px 14px 6px 16px;
  border: 1px solid var(--ink); border-radius: 14px;
  background: var(--paper); text-align: left;
  transition: background-color .2s, box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}
.shelf-nav button[data-jump='talks-shelf'] { background: var(--paper-2); }
.shelf-nav button:hover { transform: translateY(-2px); box-shadow: 3px 4px 0 var(--shade); }
.shelf-nav .no { font-family: var(--f-latin); font-style: italic; font-size: 18px; color: var(--coral-2); }
.shelf-nav [data-jump='talks-shelf'] .no { color: var(--blue-2); }
.shelf-nav b { font-family: var(--f-serif); font-weight: 600; font-size: 19px; letter-spacing: .06em; }
.shelf-nav .n { margin-left: auto; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.shelf-nav .num { margin: 0 1px 0 2px; font-family: var(--f-latin); font-size: 19px; color: var(--ink); }
.shelf-nav svg { width: 18px; height: 18px; transform: rotate(-90deg); flex: none; }
html, .sheet { scroll-padding-top: calc(var(--mast-b) + 12px); } /* 見出し帯の分（段 9） */
.shelf { scroll-margin-top: 4px; }
.shelf-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px;
  margin: 0 0 clamp(14px, 2vw, 24px); padding-bottom: 10px;
  border-bottom: 1px solid var(--hair);
}
.shelf-head .no { font-family: var(--f-latin); font-style: italic; font-weight: 300; font-size: clamp(30px, 3.6vw, 44px); line-height: .85; color: var(--coral-2); }
.shelf-head > div { flex: 1 1 14em; min-width: 0; }
.shelf-head h3 { margin: 0; font-family: var(--f-serif); font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: .06em; line-height: 1.3; }
.shelf-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }
.shelf-head .ext { margin-left: auto; }
.grid.works-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }

.shelf-talks { position: relative; background: var(--paper-2); scroll-margin-top: 24px; }
.shelf-edge { position: absolute; left: 0; right: 0; top: -40px; height: 48px; pointer-events: none; }
.shelf-edge svg { display: block; width: 100%; height: 100%; }
.shelf-talks > .sheet-inner { padding-top: clamp(24px, 3.4vw, 40px); }
.shelf-talks .shelf-head .no { color: var(--blue-2); }
.detail-part.talks { display: block; } /* 一覧の .talks（2 列）と名前が同じ（段 9） */
.talks { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(250px, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.talk-now { margin-top: 14px; }
.talk-now h4 { margin: 2px 0 4px; font-family: var(--f-serif); font-weight: 600; font-size: clamp(18px, 2vw, 22px); line-height: 1.45; }
.talk-now p { margin: 0; font-size: 14px; color: var(--ink-2); }
.talk-now .ext-links { margin-top: 10px; }
.talk-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }

/* 砂に埋めて、5件ずつ掘り出す（もっと見る） */
.dig-wrap { position: relative; }
.dig-wrap.has-sand { padding-bottom: 86px; }
.dig-wrap.has-sand .dig-clip, .dig-wrap.digging .dig-clip { overflow: hidden; }
.dig-clip > .buried { pointer-events: none; }
.dig-sand {
  position: absolute; left: -6px; right: -6px; height: 132px;
  display: block; padding: 0; border: 0; background: none;
  /* カーソルはスコップ */
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3h8M25 3 15.5 19' stroke='%23fffaf2' stroke-width='5'/%3E%3Cpath d='M12.5 17l6 3.4c.9 3.4-.6 7-3.5 9.2L10.4 32 9 26.4c-.6-3.4.6-6.8 3.5-9.4z' stroke='%23fffaf2' stroke-width='4'/%3E%3Cpath d='M21 3h8M25 3 15.5 19' stroke='%233a2d3c' stroke-width='2'/%3E%3Cpath d='M12.5 17l6 3.4c.9 3.4-.6 7-3.5 9.2L10.4 32 9 26.4c-.6-3.4.6-6.8 3.5-9.4z' fill='%23dfe3df' stroke='%233a2d3c' stroke-width='1.6'/%3E%3C/g%3E%3C/svg%3E") 10 30, pointer;
  -webkit-tap-highlight-color: transparent;
}
.dig-edge { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 34px; }
.dig-body { position: absolute; left: 0; right: 0; top: 33px; bottom: 0; background-color: var(--sand); }
/* 砂の粒と風紋は、#global-defs に置いた <pattern> で塗る（色は var() のままなので、時間帯についてくる） */
.dig-body svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.dig-sand::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.shelf-talks .dig-sand::after { background: linear-gradient(transparent, var(--paper-2)); }
.dig-label {
  position: absolute; left: 50%; top: 44px; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 12px; white-space: nowrap;
  font-size: 14px; letter-spacing: .06em;
  background: var(--paper); border: 1px solid var(--ink); border-radius: 999px;
  box-shadow: 2px 3px 0 var(--shade);
  transform: translateX(-50%);
  transition: transform .35s var(--ease-out), background-color .2s;
}
.dig-label svg { width: 18px; height: 18px; }
.dig-label b { font-weight: 700; }
.dig-label small { font-size: 12px; color: var(--ink-2); }
/* 砂の下を出しきったあとの 1 行（dig.js。W-1-152） */
.dig-end { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--ink-2); letter-spacing: .04em; }
.dig-sand:hover .dig-label { transform: translate(-50%, -3px); background: var(--paper-hi); }
.dig-sand:focus-visible { outline: none; }
.dig-sand:focus-visible .dig-label { outline: 2px dashed var(--c-ink); outline-offset: 3px; } /* 砂の上は、絵の墨（段 9） */
.dig-grain { position: absolute; z-index: 2; border-radius: 50%; border: .7px solid var(--ink); pointer-events: none; }
.talk-row {
  display: grid; grid-template-columns: 116px 1fr; gap: 12px; align-items: center;
  width: 100%; padding: 10px 10px 10px 8px;
  border: 0; border-bottom: 1px solid var(--hair);
  background: none; text-align: left;
  transition: background-color .2s;
}
.talk-row:hover { background: var(--wash); }
.talk-row[aria-current='true'] { background: var(--paper); box-shadow: inset 3px 0 0 var(--blue-2); }
.talk-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--ink); background: var(--paper-3); }
.talk-thumb img, .talk-thumb svg { display: block; width: 100%; height: 100%; object-fit: cover; }
/* いま開いている動画の印（W-1-158）。読ませない（aria-current が伝える） */
.talk-row[aria-current='true'] .talk-thumb::after {
  content: 'いまここ'; content: 'いまここ' / ''; position: absolute; left: 4px; bottom: 4px;
  padding: 0 6px; font-size: 10.5px; line-height: 1.7;
  background: var(--paper); border: 1px solid var(--ink);
}
.talk-text b { display: block; font-weight: 500; font-size: 14px; line-height: 1.5; }
.talk-text small { display: block; margin-top: 2px; font-family: var(--f-latin); font-size: 12px; color: var(--ink-2); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.chip {
  min-height: var(--tap); padding: 0 16px;
  border: 1px solid var(--ink-3); border-radius: 999px; /* 押せる物の輪郭は 3:1 以上（--hair は 1.5:1。A11Y-11） */
  background: transparent; font-size: 13px; letter-spacing: .06em;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(28px, 3.4vw, 44px) clamp(18px, 2.4vw, 32px); }
.card { display: block; text-decoration: none; }
.card.featured { grid-column: span 2; }
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--paper-2);
}
.thumb img, .thumb svg { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.card:hover .thumb img, .card:hover .thumb svg { transform: scale(1.035); }
.thumb .play {
  position: absolute; right: 12px; bottom: 12px;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--ink);
  transition: transform .35s var(--ease-out);
}
.thumb .play svg { width: 16px; height: 16px; transform: translateX(1px); }
.thumb .dur {
  position: absolute; left: 10px; bottom: 10px;
  padding: 1px 8px; font-family: var(--f-latin); font-size: 12px; letter-spacing: .03em;
  background: var(--paper); border: 1px solid var(--ink);
}
/* Vimeo のサムネイルは届いてから、公園の絵の上にふわっと重ねる */
img.late { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .5s ease, transform .6s var(--ease-out); }
img.late.in { opacity: 1; }
.card:hover .play { transform: scale(1.08); }
.card h4 { margin: 14px 0 2px; font-family: var(--f-serif); font-weight: 600; font-size: 20px; line-height: 1.45; letter-spacing: .02em; }
.card.featured h4 { font-size: 26px; }
.card p { margin: 0; font-size: 13px; color: var(--ink-2); }
.meta { display: flex; gap: 10px; align-items: baseline; font-size: 12px; letter-spacing: .08em; color: var(--ink-2); }
.meta .yr { font-family: var(--f-latin); font-size: 13px; letter-spacing: .02em; }
.card .meta { margin-top: 8px; }
.empty { padding: 40px 0; color: var(--ink-2); }
.empty .chip { display: block; margin-top: 14px; min-height: var(--tap); border-color: var(--ink); color: var(--ink); }

/* 作品詳細 */
.detail { max-width: 980px; margin: 0 auto; }
.detail-head { margin: 8px 0 22px; }
.detail-head h2 { margin: 6px 0 0; font-family: var(--f-serif); font-weight: 400; font-size: clamp(28px, 4vw, 46px); line-height: 1.3; }
.detail-head .en { margin: 4px 0 0; font-family: var(--f-latin); font-style: italic; font-size: 15px; color: var(--ink-2); }
.detail-head .laurel { margin: 10px 0 0; font-size: 13px; letter-spacing: .04em; }
.detail-wrap > .detail > .sheet-head { margin-bottom: 8px; }
.player {
  position: relative;
  /* 縦長・正方形の作品は Vimeo から縦横比を受け取り、画面の高さに収める */
  aspect-ratio: var(--ar, 16 / 9);
  width: min(100%, calc(78svh * var(--arn, 1.7778)));
  margin-inline: auto;
  border: 1px solid var(--ink); background: var(--screen); overflow: hidden;
}
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; }
.player .poster img, .player .poster svg, .player > img, .player > svg { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 表紙のボタンのフォーカス：枠の内側に、墨と紙の 2 本の線（どんな絵の上でも見える。枠の外は切れるので内側に） */
.player .poster:focus-visible { outline: none; }
.player .poster:focus-visible::after { content: ''; position: absolute; inset: 6px; border: 2px solid var(--ink); outline: 2px solid var(--paper); pointer-events: none; }
.player iframe:focus-visible, .player video:focus-visible { outline: 2px solid var(--paper); outline-offset: -4px; }
.player .poster .play {
  position: absolute; left: 50%; top: 50%;
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--ink);
  transform: translate(-50%, -50%);
  transition: transform .35s var(--ease-out);
  box-shadow: 3px 4px 0 var(--shade-2);
}
.player .poster .play svg { width: 26px; height: 26px; transform: translateX(2px); }
.player .poster:hover .play { transform: translate(-50%, -50%) scale(1.07); }
.player .poster .note { position: absolute; left: 12px; bottom: 10px; display: flex; align-items: baseline; gap: 8px; padding: 3px 10px; font-size: 13px; text-align: left; background: var(--paper); border: 1px solid var(--ink); }
.player .poster .note b { font-weight: 700; letter-spacing: .06em; }
.player .poster .note small { font-size: 11.5px; color: var(--ink-2); }
/* 動画がまだ無い作品の一言（持ち主の soon） */
.player .soon { position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 3px 10px; font-size: 13px; background: var(--paper); border: 1px solid var(--ink); }
/* 読みこみ中・読めない・時間切れの札（T-10）。線の絵と言葉。光らせない */
.player-say {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  display: grid; justify-items: center; gap: 6px;
  width: min(86%, 340px); padding: 12px 16px 14px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink);
  box-shadow: 3px 4px 0 var(--shade-2);
  transform: translate(-50%, -50%);
  text-align: center; font-size: 13px; line-height: 1.6;
}
.player-say[data-state='wait'] { pointer-events: none; }
.player-say svg { width: 70px; height: 44px; overflow: visible; }
.player-say p { margin: 0; }
.player-say p span { display: block; }
.player-say .chip { border-color: var(--ink); }
.player-say:focus { outline: none; }
.player-say .spokes { transform-box: fill-box; transform-origin: center; }
.player-say[data-state='wait'] .spokes { animation: reel 2.6s linear infinite; }
@keyframes reel { to { transform: rotate(360deg); } }
.detail-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(24px, 4vw, 56px); margin-top: 28px; }
.detail-body p { margin: 0 0 1em; }
.credits { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 13px; border-top: 1px solid var(--hair); padding-top: 14px; }
.credits dt { color: var(--ink-2); }
.credits dd { margin: 0; }
/* あれば出る段（受賞・上映／メモ／つくり方：IA-24） */
.detail-part { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--hair); }
.detail-part h3 { margin: 0 0 10px; font-family: var(--f-serif); font-weight: 600; font-size: 17px; letter-spacing: .06em; }
.detail-part ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.detail-part li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.detail-part .yr { font-family: var(--f-latin); font-size: 13px; color: var(--ink-2); }
.detail-part .note h4 { margin: 12px 0 4px; font-size: 14px; font-weight: 700; }
.detail-part .note p { margin: 0; font-size: 14px; }
.detail-part li a { display: inline-flex; align-items: center; min-height: var(--tap); }
.ext-links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 16px 0 0; }
.ext { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-size: 14px; }
.ext svg { width: 15px; height: 15px; }
.detail-part li a:not(.ext) svg, .keepsakes a:not(.ext) svg { display: inline-block; flex: none; width: 15px; height: 15px; margin-left: 6px; vertical-align: -2px; } /* 段 9 */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--hair); }
.pager a { display: block; text-decoration: none; padding: 8px 0; }
.pager a:last-child { text-align: right; }
.pager .next { grid-column: 2; }
.pager small { display: block; font-size: 12px; color: var(--ink-2); letter-spacing: .08em; }
.pager span { font-family: var(--f-serif); font-size: 16px; }
.pager a:hover span { text-decoration: underline; }

/* お知らせ */
.news { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; }
.news-item { display: grid; grid-template-columns: 112px 1fr; gap: 6px 28px; padding: 26px 0 28px; border-top: 1px solid var(--hair); }
.news-item:last-child { border-bottom: 1px solid var(--hair); }
.news-date { font-family: var(--f-latin); line-height: 1.1; }
.news-date b { display: block; font-weight: 400; font-size: 30px; letter-spacing: .01em; }
.news-date small { font-size: 13px; color: var(--ink-2); }
.kind { display: inline-block; font-size: 11px; letter-spacing: .12em; padding: 1px 9px; border: 1px solid var(--ink); border-radius: 999px; margin-bottom: 8px; }
/* 色の地にのせる字は --on-fill（夜も暗い字）。紙の色の地（info）は --ink のまま */
.kind[data-kind='work'] { background: var(--coral); color: var(--on-fill); }
.kind[data-kind='event'] { background: var(--yellow); color: var(--on-fill); }
.kind[data-kind='note'] { background: var(--blue); color: var(--on-fill); }
.kind[data-kind='info'] { background: var(--paper-2); }
.news-item h3 { margin: 0 0 6px; font-family: var(--f-serif); font-weight: 600; font-size: 21px; line-height: 1.5; letter-spacing: .02em; }
.news-item p { margin: 0; color: var(--ink-2); }
.news-item .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; min-height: var(--tap); }
.news-item .more svg { width: 14px; height: 14px; }
.news-empty { max-width: 860px; margin: 0 auto; padding: 36px 0 12px; border-top: 1px solid var(--hair); }
.news-empty p { margin: 0 0 10px; color: var(--ink-2); }
.news-empty .news-blank { font-family: var(--f-serif); font-size: 21px; color: var(--ink); }
.news-empty .back { margin-top: 8px; padding: 0 16px; }
.news-item.fresh { animation: rise .7s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px) rotate(-.6deg); } }

/* 連絡 */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.contact-side p { margin: 0 0 14px; }
.contact-side .alt { font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--hair); padding-top: 14px; margin-top: 20px; }
.form {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 34px);
  background: var(--paper-2);
  background: color-mix(in srgb, var(--paper-2) 55%, var(--paper));
  border: 1px solid var(--ink);
  box-shadow: 4px 5px 0 var(--shade);
}
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; letter-spacing: .06em; }
.field label .req { font-size: 12px; color: var(--ink-2); margin-left: 2px; }
.field .help { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%;
  padding: 11px 12px;
  font-size: 16px;
  line-height: 1.6;
  border: 1px solid var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 65%, transparent);
  border-radius: 2px;
  background: var(--paper);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); } /* フォーカスの輪は、ほかと同じ墨の線（うすい青の輪は 1.2:1 で見えなかった。A11Y-11） */
.field [aria-invalid='true'] { border-color: var(--coral-2); }
.field .err { min-height: 0; margin: 0; font-size: 12px; color: var(--coral-2); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 15px; letter-spacing: .08em;
  transition: transform .2s, opacity .2s;
}
.send:hover { transform: translateY(-1px); }
.send[disabled], .send[aria-disabled='true'] { opacity: .6; cursor: progress; }
.form-note { margin: 0; font-size: 12px; color: var(--ink-2); }
.form-demo { font-size: 13px; color: var(--ink); padding: 8px 12px; border: 1px dashed var(--ink); background: var(--paper); }
.form-fix { margin: 0; font-size: 13px; color: var(--coral-2); }
.form-result:focus { outline: 2px solid var(--ink); outline-offset: 3px; }
.form-after { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.form-result { padding: 16px 18px; border: 1px solid var(--ink); background: var(--paper); }
.form-result h3 { margin: 0 0 6px; font-family: var(--f-serif); font-weight: 600; font-size: 20px; }
.form-result p { margin: 0 0 8px; font-size: 14px; }
.form-result.bad { border-color: var(--coral-2); }

/* 瓶の手紙 */
.letter-wrap { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 5vw, 72px); align-items: start; max-width: 940px; margin: 0 auto; }
.bottle-pic svg { width: 100%; height: auto; overflow: visible; }
.letter {
  position: relative;
  padding: clamp(24px, 4vw, 44px);
  background: var(--letter);
  border: 1px solid var(--ink);
  box-shadow: 4px 5px 0 var(--shade);
  transform: rotate(-.6deg);
  background-image: repeating-linear-gradient(transparent 0 33px, var(--rule) 33px 34px);
  background-position: 0 14px;
}
.letter p { margin: 0 0 1em; font-family: var(--f-serif); font-size: 17px; line-height: 2; }
.letter .sign { text-align: right; font-size: 14px; color: var(--ink-2); }
.letter-empty p { margin: 0; }
.keepsakes { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 10px; }
.keepsakes li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--hair); font-size: 14px; }
.keepsakes b { font-weight: 700; }
.keepsakes span { display: block; color: var(--ink-2); font-size: 13px; }
.locked-note { text-align: center; padding: 60px 0; }

/* ---------- 演出の重ね ---------- */
.ride { position: fixed; inset: 0; z-index: 85; background: var(--sky); }
.ride canvas { width: 100%; height: 100%; }
.ride-skip {
  position: absolute; right: var(--gr); top: calc(var(--mast-b) + 10px);
  min-height: var(--tap); padding: 0 18px;
  border: 1px solid var(--ink); border-radius: 999px; background: var(--paper);
  font-size: 14px; letter-spacing: .06em;
}
.ride-caption {
  position: absolute; left: 50%; bottom: max(26px, env(safe-area-inset-bottom));
  margin: 0; padding: 4px 14px; font-size: 13px; white-space: nowrap;
  background: var(--paper); border: 1px solid var(--ink);
  transform: translateX(-50%);
}
.veil { position: fixed; inset: 0; z-index: 86; width: 100%; height: 100%; pointer-events: none; }
.paper-fly {
  position: fixed; z-index: 86; pointer-events: none;
  background: var(--paper); border: 1px solid var(--ink);
  box-shadow: 3px 4px 0 var(--shade);
  transform-origin: 50% 100%;
}
.paper-fly::before, .paper-fly::after { content: ''; position: absolute; left: 14%; right: 22%; height: 1px; background: var(--hair); }
.paper-fly::before { top: 34%; }
.paper-fly::after { top: 52%; right: 34%; }
.noscript { padding: 120px 24px; text-align: center; }

/* ---------- スマホ：縦の公園 ---------- */
/* ---------- 縦の公園（スマホ・縦向きのタブレット） ---------- */
html[data-layout='tall'] .park { height: auto; min-height: 0; background: none; }
html[data-layout='tall'] .stage { position: relative; display: block; padding-bottom: 0; }
/* 絵の幅は --tall-w（スマホは窓の幅。幅 600 以上は高さの 48% までで、真ん中に置く。左右は backdrop.js の描き足しが埋める。C-ART-3） */
html[data-layout='tall'] .scene { width: min(100%, var(--tall-w)); margin-inline: auto; aspect-ratio: 400 / 1040; }
/* 縦の公園の見出し：2 行の明朝が絵の幅いっぱい、その下の 2 文は左に寄せて 2 行（右の浮き島をよける）。
   字の大きさと左右の余白は絵の幅（--tall-w）から決める（スマホでは窓の幅と同じ。絵が真ん中で細いときも、見出しは絵の上にのる） */
html[data-layout='tall'] .intro {
  --tall-band: max(0px, (100vw - var(--tall-w)) / 2);
  top: calc(var(--mast-b) + 14px);
  left: calc(var(--tall-band) + max(18px, var(--tall-w) * .046, env(safe-area-inset-left, 0px)));
  right: calc(var(--tall-band) + max(18px, var(--tall-w) * .046));
}
html[data-layout='tall'] .intro h1 { font-size: clamp(21px, calc(var(--tall-w) * .071), 52px); }
html[data-layout='tall'] .intro p { max-width: 60%; margin-top: 8px; font-size: clamp(13px, calc(var(--tall-w) * .02), 16px); line-height: 1.65; }
html[data-layout='tall'] .intro p .ph { display: block; }
@media (max-width: 340px) { html[data-layout='tall'] .intro p { max-width: none; font-size: 12px; } } /* 2 文が 1 行ずつに入る大きさ */
html[data-layout='tall'] .dock { width: min(calc(100% - 24px), 520px); justify-content: space-between; bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) + 6px)); }
html[data-layout='tall'] .dock-title { display: none; }
html[data-layout='tall'] .tool { flex: 1; justify-content: center; padding: 0 8px; font-size: 13px; gap: 5px; }
html[data-layout='tall'] .status { bottom: calc(max(10px, calc(env(safe-area-inset-bottom, 0px) + 6px)) + 64px); font-size: 12.5px; }

@media (max-width: 760px) {
  :root { --mast-h: 60px; }
  body { font-size: 15px; }
  /* 上のセーフエリアの分を残したまま、左右だけ詰める（shorthand で padding-top を消さない。M-06） */
  .mast { gap: 8px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .brand-ja { font-size: 17px; }
  .brand-en { font-size: 11.5px; }
  .nav a { padding: 0 8px; font-size: 13px; letter-spacing: .04em; }
  .nav a::after { left: 8px; right: 8px; }
  .sound-btn { padding: 0 10px; }
  /* 「音」の字は見せないが、読み上げの名前（音を鳴らす）には残す */
  .sound-btn .sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tag { font-size: 12px; padding: 2px 8px 3px; gap: 5px; }
  .tag i { font-size: 11px; }
  .tag i::before { margin-right: 4px; }
  .lm[data-kind='shovel'] .tag, .lm[data-kind='can'] .tag { font-size: 11px; padding: 1px 6px; }
  .guide-inner { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .card.featured { grid-column: auto; }
  .card.featured h4 { font-size: 20px; }
  .detail-body { grid-template-columns: 1fr; }
  .talks { grid-template-columns: 1fr; }
  .talk-list { max-height: none; }
  .talk-row { grid-template-columns: 104px 1fr; }
  .shelf-nav { gap: 8px; }
  .shelf-nav button { min-height: 46px; padding: 5px 10px 5px 12px; gap: 6px; border-radius: 12px; flex-wrap: wrap; align-content: center; row-gap: 0; }
  .shelf-nav .n { flex: 1 0 100%; margin-left: 0; line-height: 1.4; }
  .shelf-nav b { font-size: 16px; }
  .shelf-nav .no { font-size: 15px; }
  .shelf-nav .num { font-size: 16px; }
  .news-item { grid-template-columns: 1fr; gap: 4px; padding: 20px 0 22px; }
  .news-date b { display: inline; font-size: 22px; margin-right: 8px; }
  .news-item h3 { font-size: 18px; }
  .contact { grid-template-columns: 1fr; }
  .letter-wrap { grid-template-columns: 1fr; }
  .bottle-pic { width: 150px; margin: 0 auto; }
  .letter p { font-size: 16px; }
}
@media (max-width: 420px) {
  .shelf-nav svg { display: none; }
}
@media (max-width: 360px) {
  .mast { gap: 4px; padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  .brand-ja { font-size: 15px; letter-spacing: .03em; }
  .brand-en { font-size: 10.5px; }
  .nav a { padding: 0 5px; font-size: 12px; letter-spacing: .02em; }
  .nav a::after { left: 5px; right: 5px; }
  .sound-btn { min-width: var(--tap); padding: 0 8px; }
  .tool { font-size: 12px; padding: 0 6px; }
  .tool svg { width: 19px; height: 19px; }
}

/* 背の低い横長の窓では絵が小さくなるので、札も一回り小さく（となりの札とぶつからないように） */
@media (orientation: landscape) and (max-height: 660px) {
  .tag { font-size: 12px; padding: 2px 8px 3px; gap: 5px; }
  .tag i { font-size: 11px; }
  .lm[data-kind='shovel'] .tag, .lm[data-kind='can'] .tag { font-size: 11px; padding: 1px 6px; }
  html[data-layout='wide'] .lm[data-kind='can'] .tag { left: 30%; } /* 花壇の札と並ぶので、少し左へ（横の公園だけ。縦の公園の横向きの窓には効かせない。C-4） */
}

/* ---------- 横長で背の低い窓（ノートの画面・スマホの横向き）：道具の棚は右の端に縦に（T-15・M-03） ----------
   絵が高さで決まり、左右に描き足した帯ができる窓。棚を帯へ出すと、下の札とぶつからないので、絵を持ち上げなくてよい（--park-pb: 0）。
   指の画面（pointer: coarse）では棚は絵だけ（名前は読み上げに残す）。マウスの画面は名前も出す（拡大しても字が消えない。WCAG 1.4.4・C-3）。一言は見出しの下。
   公園は 1 画面に収める（.park の 600px の下限をやめ、絵の大きさも窓の高さから）。
   幅 760 以下のマウスの画面（拡大したパソコン）は縦の公園になる（boot.js）ので、ここの規則は横の公園だけに効かせる */
@media (orientation: landscape) and (max-height: 520px), (orientation: landscape) and (max-height: 800px) and (min-aspect-ratio: 17/10) {
  :root { --park-pb: 0px; --park-h: 100vh; }
  @supports (height: 100svh) { :root { --park-h: 100svh; } }
  html[data-layout='wide'] .park { min-height: 0; }
  html[data-layout='wide'] .dock {
    left: auto; right: max(10px, env(safe-area-inset-right, 0px)); bottom: auto;
    top: calc(50% + var(--mast-b) / 2); transform: translateY(-50%);
    flex-direction: column; align-items: stretch; border-radius: 27px;
  }
  html[data-layout='wide'] .dock.away { transform: translate(140%, -50%); }
  html[data-layout='wide'] .dock-title { display: none; }
  @media (pointer: coarse) {
    html[data-layout='wide'] .tool { width: var(--tap); padding: 0; justify-content: center; }
    html[data-layout='wide'] .tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  }
  html[data-layout='wide'] .status {
    left: var(--intro-x); right: auto; bottom: auto;
    top: var(--intro-bottom); margin: 0;
    max-width: min(calc(100% - 96px), 360px);
    text-align: left;
  }
  html[data-layout='wide'] .status:is(:empty, .quiet) { transform: translateY(-4px); }
  /* 絵が小さいので、すべり台の札（下の端から下がる）が回転台の屋根にかかる。すべり台の足もとの高さまで上げる */
  html[data-layout='wide'] .lm[data-kind='slide'] .tag { top: 86%; }
}
/* 高さ 600 以下の横の公園：すべり台の札は、スコップの札・回転台の屋根にかぶらないよう、すべり台の足もと（右寄り）へ */
@media (orientation: landscape) and (max-height: 600px) {
  html[data-layout='wide'] .lm[data-kind='slide'] .tag { left: 60%; top: 90%; }
}
/* 低い横向きの窓（スマホの横向き・ブラウザーの拡大など。高さ 520px 以下）：公園は 1 画面に収める。
   指の画面（pointer: coarse）だけ、見出し帯・見出しを小さく、札は名前だけにする。マウスの画面は、拡大したときに字が大きくなり、
   札の行き先も消えないように、ふつうの大きさのまま（WCAG 1.4.4・段 C の検査 C-3） */
@media (orientation: landscape) and (max-height: 520px) {
  /* 見出しは窓の左の余白のまま（字が絵に対して大きいので、絵の上へ寄せると右の空の鳥や月に届く） */
  :root { --intro-x: var(--gl); }
  /* 絵が小さいので、札は 1 段小さく（行き先の字は残す）。花壇とジョウロの札はならぶので、花壇は少し右、ジョウロは左の端へ */
  html[data-layout='wide'] .tag { font-size: 11px; padding: 1px 7px 2px; gap: 4px; }
  html[data-layout='wide'] .tag i { font-size: 10.5px; }
  html[data-layout='wide'] .lm:is([data-kind='shovel'], [data-kind='can']) .tag { font-size: 10.5px; padding: 1px 6px; }
  html[data-layout='wide'] .lm[data-kind='can'] .tag { left: -6%; }
  html[data-layout='wide'] .lm[data-kind='flowerbed'] .tag { left: 62%; }
  @media (pointer: coarse) {
    /* 見出しのかたまり：帯 + 6 + 見出し 2 行 + 4 + 説明 2 行 + 息つぎ 10（:root と同じ形。数だけ替える） */
    :root { --mast-h: 48px; --intro-gap: 6px; --intro-h1: clamp(17px, 4.6vh, 22px); --intro-p: 12px; --intro-fallback: calc(var(--intro-h1) * 2.5 + 4px + var(--intro-p) * 3.2); --intro-breath: 10px; }
    .brand-ja { font-size: 16px; }
    .brand-en { font-size: 11px; }
    .intro h1 { line-height: 1.25; }
    .intro p { margin-top: 4px; line-height: 1.6; }
    .intro p .ph { display: block; }
    .tag i { display: none; }
    .status { font-size: 12.5px; max-width: min(calc(100% - 96px), 340px); }
    /* スマホの横向き：1 画面に収めると絵が小さすぎて、押す所（44px の丸）がとなりと重なる（iPhone の Safari は、帯の分だけ窓が低い。段 9）。
       絵を窓の幅いっぱいにして、公園は縦に送って見る。高さ = 見出しのかたまり + 絵の幅 ÷ --mesa-k（左の岩山の頂が、見出しの下に来る高さ） */
    :root { --park-h: calc(var(--intro-bottom) + 100vw / var(--mesa-k)); }
    html[data-layout='wide'] .park { height: var(--park-h); }
  }
}

/* ---------- 強制カラー（Windows のコントラスト テーマ）：入・切と、えらんでいる物を、システムの色で見せる（段 9） ---------- */
@media (forced-colors: active) {
  .switch input::after, .pick input::after { background: CanvasText; }
  .switch input:checked::after { background: Highlight; }
  .tool[aria-pressed='true'], .chip[aria-pressed='true'] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
}

/* ---------- 印刷：昼の色で、空のもの（太陽・月・星・明かり）と、画面のための物は刷らない（DECISIONS 9-4・SV9・SC2） ---------- */
@media print {
  .backdrop .sun, .backdrop .moon, .backdrop .stars, .backdrop .pool, .backdrop .halo, .sky-spots, .clouds,
  .dock, .status, .cursor-tool, .skip, .sound-btn, .ride, .veil, .guide-edge, .prefs,
  .guide::before, .sheet::before, .sheet::after { display: none !important; }
  .mast { position: static; background: none; box-shadow: none; }
  .park { height: auto; min-height: 0; background: none; }
  .stage { position: relative; }
  html[data-layout] .scene { width: 100%; margin-inline: 0; }
  .sheet { position: static; overflow: visible; }
  body.sheet-open #home { display: none; }
}

/* 動きを減らす */
html[data-motion='reduce'] *, html[data-motion='reduce'] *::before, html[data-motion='reduce'] *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}
html[data-motion='reduce'] .fluff { display: none; }
[data-stage='1'] .fb-sprout, [data-stage='2'] .fb-sprout, [data-stage='3'] .fb-sprout { transform: scale(.7); }
/* 種の花（flower）が番号の花に描きかえるまで、咲いた花を隠す（boot.js が付ける）。読めなくても 3 秒で出る */
html.p-flower-wait .lm[data-kind='flowerbed'] .fb-plant { opacity: 0; animation: flower-late .3s 3s forwards; }
@keyframes flower-late { to { opacity: 1; } }

/* ---------- 遊び（js/plays/）が置くもの。置く道具は js/stage.js、書き方は plan/API.md ---------- */
/* 小さな場所：押せる点。押しやすいように 44px より小さくしない。フォーカスの輪はタンポポと同じ */
.spot { position: absolute; z-index: 0; padding: 0; margin: 0; border: 0; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.spot.over { z-index: 7; }
.spot svg { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.spot::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(44px, 100%); height: max(44px, 100%); border-radius: 22px; transform: translate(-50%, -50%); }
.spot:focus-visible { outline: none; }
.spot:focus-visible::before { outline: 2px dashed var(--ink); outline-offset: 2px; }
.sky-spots .spot { pointer-events: auto; }
/* 空の台：置いているあいだだけ、空の何もない所の押しを受ける。なぞれるのは wide だけ（tall は縦のスクロールを通す） */
.sky-pad { position: absolute; left: 0; top: 0; width: 100%; z-index: 0; }
html[data-layout='wide'] .sky-pad { touch-action: none; }
/* スマホの横向き（指の画面の低い窓）は、公園を縦に送って見る。空の台は縦の送りを通す（指は「おす」だけ。cloud.js の SHORT_WIDE と同じ条件。段 9） */
@media (orientation: landscape) and (max-height: 520px) and (pointer: coarse) {
  html[data-layout='wide'] .sky-pad { touch-action: pan-y pinch-zoom; }
}
/* 飛ぶもの・落ちるもの（.drift の中。押せない）と、雲の層に置いたもの */
.fly, .clouds > [data-by] { position: absolute; }
.fly svg, .clouds > [data-by] > svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* あとから読みこんだ遊びの絵は、ぱっと出さず静かに */
.play-in { animation: play-in .6s ease-out both; }
@keyframes play-in { from { opacity: 0; } }
html[data-motion='reduce'] .play-in { animation: none; }
/* あそびかたの下の 1 行 */
.how-note { margin: 18px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
