/* しまなみ ぶんちょう家 公式サイト
   配色は番組と同じ絵本の色（黄色の壁・赤・青・緑）。紫〜青のグラデーションや光る枠は使わない（全体の決まり「AI感を出さない」） */
:root {
  --wall: #fde27c;
  --wall2: #f6cf5a;
  --red: #e0523f;
  --blue: #3f8fd0;
  --sea: #3d9ad8;
  --green: #8fd0a6;
  --ink: #4a3a30;
  --paper: #fff8ee;
  --pink: #ff8fb3;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--wall);
  font-family: 'Zen Maru Gothic', sans-serif; font-weight: 500; line-height: 1.8;
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* 読み込み：茶色の幕が丸く開く */
#loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 6px;
  background: #3a2a22; color: var(--paper); font-weight: 900;
  clip-path: circle(150% at 50% 50%); transition: clip-path .9s cubic-bezier(.7, 0, .3, 1);
}
#loader.open { clip-path: circle(0% at 50% 45%); }
.loader-bird { animation: hop .6s ease-in-out infinite; }
.loader-text { margin: 0; letter-spacing: .2em; }
@keyframes hop { 50% { transform: translateY(-14px) rotate(-6deg); } }

/* 上の帯 */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar-logo {
  font-weight: 900; font-size: 20px; color: var(--paper); text-decoration: none;
  -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; opacity: 0; transition: opacity .3s;
}
.bar-logo span { color: var(--red); }
.scrolled .bar-logo { opacity: 1; }
.menu-btn {
  display: flex; align-items: center; gap: 4px; background: var(--paper); border: 3px solid var(--ink);
  border-radius: 999px; padding: 4px 14px 4px 8px; font-weight: 900; letter-spacing: .1em; font-size: 14px;
  box-shadow: 0 3px 0 var(--ink); transition: transform .15s;
}
.menu-btn:active { transform: translateY(3px); box-shadow: none; }

/* ことばの切り替え（日本語・英語・繁体字・韓国語）。時間帯のボタンと同じ形 */
.bar-right { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; gap: 1px; background: #ffffffcc; border: 2px solid var(--ink); border-radius: 999px; padding: 2px; }
.lang button { font-size: 12px; font-weight: 900; padding: 1px 8px; border-radius: 999px; line-height: 1.6; white-space: nowrap; }
.lang button.on { background: var(--ink); color: var(--paper); }
/* 字の形：繁体字は Noto Sans TC、韓国語は Noto Sans KR。日本語のまま残す所（題字・台詞）は丸い字のまま */
[lang="zh-Hant"] { font-family: 'Noto Sans TC', 'Zen Maru Gothic', sans-serif; }
[lang="ko"] { font-family: 'Noto Sans KR', 'Zen Maru Gothic', sans-serif; }
[lang="ja"] { font-family: 'Zen Maru Gothic', sans-serif; }
.bar-logo { white-space: nowrap; }
/* 携帯の幅で、ことばボタンが出ているときは帯がいっぱいになるので、上の小さな題字は出さない（いまは英語だけでボタンを隠している） */
@media (max-width: 420px) { .bar:has(.lang:not([hidden])) .bar-logo { display: none; } }
.lang[hidden], .lang button[hidden] { display: none; }
.head small:empty, .menu small:empty { display: none; }
@media (max-width: 340px) { .lang button { padding: 1px 6px; } }
.menu-open .menu-btn svg { animation: flap .3s ease-in-out infinite; }
@keyframes flap { 50% { transform: rotate(-14deg); } }

/* メニュー：海が下から上がってくる */
.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--sea); display: grid; place-items: center;
  transform: translateY(calc(100% + 70px)); transition: transform .55s cubic-bezier(.7, 0, .2, 1);   /* 上の波の分も下げて、閉じているときは見せない */
}
.menu-open .menu { transform: none; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: center; }
.menu a { display: block; text-decoration: none; color: #fff; }
.menu b { display: block; font-size: 24px; font-weight: 900; -webkit-text-stroke: 6px #1e5aa8; paint-order: stroke fill; transition: transform .2s; }
.menu small { font-size: 11px; letter-spacing: .3em; color: #cfe9fb; }
.menu a:hover b, .menu a:focus b { transform: rotate(-3deg) scale(1.08); }
.menu-sea { position: absolute; top: -59px; left: 0; width: 100%; height: 60px; animation: sway 3s ease-in-out infinite alternate; }
@keyframes sway { to { transform: translateX(-20px); } }

/* 表紙 */
.home {
  position: relative; min-height: 100svh; padding: 70px 16px 24px; display: flex; flex-direction: column; align-items: center;
  background:
    radial-gradient(circle at 20% 30%, #fff0a855 0 18%, transparent 19%),
    radial-gradient(circle at 80% 60%, #f6cf5a44 0 22%, transparent 23%),
    var(--wall);
  overflow: hidden;
}
.home::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: #e9a85e; z-index: 0; }
.window {
  position: absolute; top: 56px; left: 50%; width: min(86vw, 460px); aspect-ratio: 400 / 260; transform: translateX(-50%);
  border: 12px solid #fff; border-radius: 4px; box-shadow: 0 6px 0 #00000014; overflow: hidden;
}
.window::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 8px; margin-left: -4px; background: #fff; }
.window svg { width: 100%; height: 100%; display: block; }
.window { z-index: 2; }
/* 朝・昼・夕・夜の色は main.js が入れる。切り替わるときは、ゆっくり変わる */
#view * { transition: fill 2s, stroke 2s, opacity 2s, stop-color 2s; }
#view stop { transition: stop-color 2s; }
.waves { animation: shimmer 2.4s ease-in-out infinite alternate; }
/* 部屋の明るさ：夜は青く暗く、夕方は橙に */
.home::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--tint, transparent); transition: background 2s; }
.tod {
  position: absolute; z-index: 3; top: 76px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px;
  background: #ffffffcc; border: 2px solid var(--ink); border-radius: 999px; padding: 2px;
}
.tod button { font-size: 12px; font-weight: 900; padding: 1px 10px; border-radius: 999px; white-space: nowrap; }
.tod button.on { background: var(--ink); color: var(--paper); }
@keyframes shimmer { to { transform: translateX(12px); opacity: .6; } }

/* 題字：雲で囲んだ2行（2026-11-09）。雲の形は main.js が字の幅を測って描く（左右対称） */
.title {
  position: relative; z-index: 2; margin: calc(min(86vw, 460px) * 0.65 + 34px) 0 0; padding: .55em .9em .5em;
  font-size: clamp(24px, 6.8vw, 46px); font-weight: 900; text-align: center; line-height: 1.3; cursor: pointer;
}
.t-cloud { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: -1; }
.t-line { display: block; width: fit-content; margin: 0 auto; position: relative; }
.t-ja .t-l2 { transform: translateX(.2em); }                                      /* 日本語だけ：「。」の右の空きの分、見た目の真ん中に戻す */
.t-blue { color: var(--blue); }
.t-red { color: var(--red); }
.t-bird { position: absolute; width: 2.2em; transform-origin: 50% 90%; animation: perch 3.2s ease-in-out infinite; cursor: pointer; }
@keyframes perch { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg) translateY(-4px); } 90% { transform: rotate(6deg); } }
.title .letter { display: inline-block; }
.title.boing .letter { animation: boing .5s ease both; animation-delay: calc(var(--i) * 40ms); }
@keyframes boing { 40% { transform: translateY(-12px) scaleY(1.1); } 70% { transform: translateY(2px) scaleY(.92); } }

.catch { position: relative; z-index: 2; text-align: center; font-weight: 700; margin: 8px 0 0; }
/* 題字とひと言の訳（日本語以外のとき） */
.title-sub { position: relative; z-index: 2; margin: 6px 0 0; font-size: 13px; font-weight: 900; line-height: 1.5; color: var(--ink); -webkit-text-stroke: 4px #fdf6e8; paint-order: stroke fill; text-align: center; }
.catch-sub { position: relative; z-index: 2; margin: 2px 0 0; font-size: 12px; text-align: center; line-height: 1.5; opacity: .8; }

.room { position: relative; z-index: 2; width: min(100%, 460px); height: 200px; margin-top: 14px; }
.rug { position: absolute; left: 4%; right: 4%; bottom: 0; height: 46px; background: var(--green); border-radius: 50%; z-index: -1; }
.who { position: absolute; bottom: 14px; transform-origin: 50% 100%; animation: breathe 2.6s ease-in-out infinite; }
.who img {
  width: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none;
  transform-origin: 50% 100%; transform: rotate(var(--tilt, 0deg)) translateY(var(--lift, 0px)) scale(var(--grow, 1));
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
/* マウスのある端末だけ：乗せると浮き上がって、うれしい顔（顔の差し替えは main.js） */
@media (hover: hover) {
  .who:hover { --lift: -10px; --grow: 1.05; }
  .who:hover img { filter: drop-shadow(0 8px 0 #00000018); }
  .who.pii:hover svg { transform: translateY(-4px); transition: transform .2s; }
}
.who.papa { left: 6%; width: 30%; }
.who.mama { left: 34%; width: 29%; bottom: 22px; animation-delay: -.6s; }
.who.musume { left: 61%; width: 22%; animation-delay: -1.2s; }
.who.pii { right: 0; width: 17%; bottom: 8px; animation: none; }
.who.pii svg { width: 100%; display: block; overflow: visible; }
@keyframes breathe { 50% { transform: scaleY(1.025) rotate(.6deg); } }
.who.jump { animation: jump .5s ease; }
@keyframes jump { 30% { transform: translateY(-26px) scaleY(1.06); } 60% { transform: translateY(0) scaleY(.92); } }
.pii-bird.hop { animation: piihop .45s ease; transform-box: fill-box; }
@keyframes piihop { 40% { translate: 0 -18px; } }
.hint { position: relative; z-index: 2; font-size: 13px; margin: 10px 0 0; opacity: .75; }
.home .hint { color: var(--paper); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; font-weight: 700; opacity: 1; }

/* ふきだし（タップしたとき） */
.bubble {
  position: absolute; z-index: 30; transform: translate(-50%, -100%); background: #fff; border: 4px solid var(--ink);
  border-radius: 26px; padding: 6px 16px; font-weight: 900; font-size: 16px; white-space: nowrap; pointer-events: none;
  animation: pop .25s ease-out, fade .4s ease-in 1.7s forwards;
}
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -14px; margin-left: -9px; border: 9px solid transparent; border-top: 12px solid var(--ink); border-bottom: 0; }
.bubble.kandaka { border-color: #e0679a; color: #d0457e; background: #fff2f7; }
.bubble.kandaka::after { border-top-color: #e0679a; }
.bubble.tantan { border-radius: 10px; color: #4a4a52; border-color: #7a7a86; font-weight: 700; }
.bubble.tantan::after { border-top-color: #7a7a86; }
.bubble.pii { color: #b8862a; border-color: #d9a640; background: #fffaf0; }
.bubble.pii::after { border-top-color: #d9a640; }
/* 台詞の訳：日本語の下に、点線で区切って小さく（動画の「日本語とセット」と同じ形） */
.bubble .sub, .say .sub { display: block; font-size: 12px; font-weight: 700; line-height: 1.4; }
.bubble .sub { border-top: 2px dotted currentColor; margin-top: 3px; padding-top: 2px; opacity: .85; }
.say .sub { color: var(--ink); opacity: .75; }
@keyframes pop { from { transform: translate(-50%, -80%) scale(.6); } }
@keyframes fade { to { opacity: 0; transform: translate(-50%, -130%); } }

/* 文字を選ぶと出る、元の日本語（英語などのときだけ） */
.ja-pop {
  position: fixed; z-index: 70; max-width: min(340px, calc(100vw - 16px)); background: var(--paper); border: 3px solid var(--ink);
  border-radius: 14px; padding: 4px 14px 8px; box-shadow: 0 4px 0 var(--ink); pointer-events: none; animation: pop .2s ease-out;
}
.ja-pop[hidden] { display: none; }
.ja-pop small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .1em; opacity: .6; }
.ja-pop span { display: block; font-size: 16px; font-weight: 900; line-height: 1.5; white-space: pre-line; }
.home .tip { margin-top: 4px; font-size: 12px; }
.home .tip[hidden] { display: none; }

/* 背景を押すと出る「ぴっ」 */
.pip { position: absolute; z-index: 30; pointer-events: none; font-weight: 900; color: #d9a640; -webkit-text-stroke: 4px #fff; paint-order: stroke fill; animation: pipup .9s ease-out forwards; }
@keyframes pipup { to { transform: translateY(-50px) rotate(-10deg); opacity: 0; } }

/* 各かたまり */
.sec { padding: 64px 16px; position: relative; }
.head { margin: 0 auto 26px; text-align: center; line-height: 1.1; }
.head span {
  display: inline-block; font-size: 30px; font-weight: 900; color: var(--paper); -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill;
  filter: url(#wobble); transform: rotate(-2deg);
}
.head small { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .4em; color: var(--ink); opacity: .6; }

.about { background: var(--paper); }
.about::before, .family::before, .episodes::before, .sandan::before, .feed::before, .fish::before, .gacha::before, .watch::before {
  content: ''; position: absolute; left: 0; right: 0; top: -18px; height: 20px;
  background: radial-gradient(circle at 12px 20px, currentColor 12px, transparent 13px) 0 0 / 24px 20px repeat-x;
}
.about::before { color: var(--paper); }
.about-body { max-width: 520px; margin: 0 auto; text-align: center; }
.about-body p { margin: 0 0 14px; }
.note { font-size: 12px; opacity: .7; }

.family { background: var(--green); color: var(--ink); }
.family::before { color: var(--green); }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 640px; margin: 0 auto; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 12px 10px 14px; text-align: center;
  box-shadow: 0 5px 0 var(--ink); cursor: pointer; transition: transform .2s; position: relative;
}
.card:nth-child(odd) { transform: rotate(-1.5deg); }
.card:nth-child(even) { transform: rotate(1.2deg); }
.card:hover, .card:focus { transform: rotate(0) translateY(-4px); outline: none; }
.card-face { height: 120px; display: grid; place-items: center; }
.card-face img { height: 110px; width: auto; transition: transform .3s; }
.card.talk .card-face img, .card.talk .card-face svg { animation: jump .5s ease; }
.pii-face svg { width: 110px; }
.card h3 { margin: 6px 0 0; font-size: 20px; font-weight: 900; }
.role { margin: 0; font-size: 12px; display: inline-block; background: var(--wall); border-radius: 999px; padding: 0 10px; }
.desc { font-size: 13px; margin: 8px 0 0; line-height: 1.6; }
.say { min-height: 1.6em; margin: 6px 0 0; font-weight: 900; font-size: 14px; color: var(--red); }

.episodes { background: var(--wall); }
.episodes::before { color: var(--wall); }
.drag-hint { text-align: center; font-size: 13px; margin: -12px 0 12px; }
.drag-hint i { font-style: normal; }
.drag-hint span { display: inline-block; animation: nudge 1.2s ease-in-out infinite; }
.drag-hint span:last-child { animation-direction: reverse; }
@keyframes nudge { 50% { transform: translateX(-5px); } }
.strip {
  display: flex; gap: 14px; overflow-x: auto; padding: 8px 16px 18px; margin: 0 -16px; cursor: grab;
  scroll-snap-type: x proximity; scrollbar-width: none; user-select: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip.dragging { cursor: grabbing; scroll-snap-type: none; }
.ep {
  flex: 0 0 150px; scroll-snap-align: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px;
  overflow: hidden; box-shadow: 0 5px 0 var(--ink); transition: transform .2s;
}
.ep:nth-child(3n) { transform: rotate(-2deg); }
.ep:nth-child(3n+1) { transform: rotate(1.5deg); }
.ep:hover { transform: translateY(-6px) rotate(0); }
.ep img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.ep p { margin: 0; padding: 6px 8px 8px; font-size: 12px; line-height: 1.4; font-weight: 700; }
.ep b { display: block; font-size: 11px; color: var(--red); }
.ep-sub { display: block; margin-top: 3px; font-size: 11px; font-weight: 500; opacity: .75; }
.soon { text-align: center; font-size: 13px; margin: 10px 0 0; }

.sandan { background: var(--paper); }
.sandan::before { color: var(--paper); }
.machine { max-width: 520px; margin: 0 auto; display: grid; gap: 14px; justify-items: center; }
.m-papa img { height: 140px; width: auto; transform-origin: 50% 100%; }
.m-papa.dance img { animation: dance .35s ease-in-out infinite alternate; }
@keyframes dance { from { transform: rotate(-10deg) translateY(0); } to { transform: rotate(10deg) translateY(-8px); } }
.m-form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: end; }
.m-form label { display: grid; font-size: 12px; font-weight: 700; }
.m-form input {
  width: 130px; font: inherit; font-weight: 900; font-size: 16px; padding: 6px 10px; border: 3px solid var(--ink); border-radius: 12px;
  background: #fff; color: var(--ink);
}
.btn {
  background: var(--red); color: #fff; font-weight: 900; padding: 8px 18px; border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
}
.btn:active { transform: translateY(4px); box-shadow: none; }
.m-out { list-style: none; margin: 0; padding: 0; text-align: center; min-height: 7em; font-weight: 900; }
.m-out li { opacity: 0; transform: translateY(8px); transition: .3s; }
.m-out li.on { opacity: 1; transform: none; }
.m-out li:last-child { font-size: 22px; color: #d0457e; }

.feed { background: #f2c49b; }
.feed::before { color: #f2c49b; }
.feed-text { text-align: center; margin: -10px 0 12px; }
.feed-stage { position: relative; max-width: 420px; height: 300px; margin: 0 auto; background: var(--wall); border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; touch-action: none; }
.feed-cage { position: absolute; right: 8%; bottom: 6px; width: 46%; }
.feed-cage svg { width: 100%; overflow: visible; display: block; }
.feed-cage.yum .pii-bird { animation: piihop .45s ease 3; }
.feed-cage.near { filter: drop-shadow(0 0 0 transparent); }
.feed-cage.near svg { transform: scale(1.04); transition: transform .15s; }
.awa { position: absolute; left: 14%; top: 60px; cursor: grab; touch-action: none; transform-origin: 50% 100%; animation: wiggle 2s ease-in-out infinite; }
.awa.held { cursor: grabbing; animation: none; transform: rotate(-12deg) scale(1.1); }
@keyframes wiggle { 50% { transform: rotate(6deg); } }
.feed-count { text-align: center; margin: 14px 0 0; font-weight: 700; }
.feed-count b { font-size: 22px; color: var(--red); }

/* パパの釣り（2026-11-10）：空と海の舞台。舟のパパ・糸・浮き・場所の札・ゲージ・釣れたもの */
.fish { background: #cfe8f2; }
/* 携帯で「巻く」を長押しすると近くの字が選ばれてしまう（11/10 本人）→ 指で操作する端末だけ、釣りの節の字を選べないようにする。
   パソコン（マウス）では選べるままにする：字を選ぶと元の日本語が出る仕組みを、釣りでも使えるように（11/10 本人） */
@media (hover: none) { .fish { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; } }
.fish::before { color: #cfe8f2; }
.fish-text { text-align: center; margin: -10px auto 12px; max-width: 420px; min-height: 3.6em; font-weight: 700; }
.fish-stage { position: relative; max-width: 420px; height: 320px; margin: 0 auto; border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; touch-action: none;
  background: linear-gradient(#bfe6ff 0 calc(36% + 2px), var(--sea) 0 100%); }   /* 空を波の頭より2px下まで伸ばす。36% ちょうどで切ると、端数の行に海の色が細い横線になって出ていた（11/10 本人） */
.fish-stage::before { content: ''; position: absolute; left: 0; right: 0; top: 36%; height: 10px; background: radial-gradient(circle at 10px 0, #bfe6ff 9px, transparent 10px) 0 0 / 20px 10px repeat-x; }
.fish-boat { position: absolute; left: 4%; top: 12%; width: 30%; z-index: 2; animation: sway2 3s ease-in-out infinite alternate; }
.fish-boat img { display: block; width: 62%; margin: 0 0 -14% 18%; position: relative; transform-origin: 50% 90%; transition: transform .12s ease-out; }
/* パパの動き（2026-11-10 本人「パパも引きに合わせて動きが欲しい」）：引かれると前へ、巻くとのけぞる（JS で傾ける）。釣れたら跳ね、逃げたらがっくり */
.fish-boat img.yay { animation: fishyay .45s ease-in-out 3; }
.fish-boat img.gaan { animation: fishgaan .7s ease-out forwards; }
.fish-boat img.jolt { animation: fishjolt .3s ease-out; }
@keyframes fishyay { 40% { transform: translateY(-22%) rotate(-6deg); } 70% { transform: translateY(2%) scaleY(.94); } }
@keyframes fishgaan { 30% { transform: rotate(10deg) translateY(4%); } 100% { transform: rotate(14deg) translateY(8%) scaleY(.92); } }
@keyframes fishjolt { 30% { transform: rotate(12deg) translateX(6%); } }
.fish-boat .hull { display: block; width: 100%; }
/* 糸のゲージが赤（張り 85% 以上）になったら、パパが汗をかく（11/10 本人）。頭の左右から汗が飛ぶ */
.sweat { position: absolute; left: 18%; top: 0; width: 62%; height: 60%; pointer-events: none; opacity: 0; transition: opacity .15s; transform-origin: 50% 90%; }   /* 枠と傾きは JS がパパの絵に合わせる */
.sweat.on { opacity: 1; }
.sweat i { position: absolute; width: 10px; height: 14px; border: 2px solid var(--ink); border-radius: 50% 0 50% 50%; background: #9fd3ef; opacity: 0; }
.sweat i:nth-child(1) { right: -8%; top: 6%; transform: rotate(-45deg); }
.sweat i:nth-child(2) { right: -14%; top: 26%; transform: rotate(-30deg); }
.sweat i:nth-child(3) { left: -8%; top: 8%; transform: rotate(-135deg); }
.sweat.on i { animation: sweat .6s ease-out infinite; }
.sweat.on i:nth-child(2) { animation-delay: .2s; }
.sweat.on i:nth-child(3) { animation-delay: .4s; }
@keyframes sweat { 0% { opacity: 0; translate: 0 0; } 15%, 65% { opacity: 1; } 100% { opacity: 0; translate: var(--dx, 7px) 9px; } }
.sweat i:nth-child(3) { --dx: -6px; }
@keyframes sway2 { to { transform: rotate(3deg) translateY(3px); } }
.fish-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }   /* 浮きは岩や島の手前に落ちるので、糸も岩や島の手前に描く（ゲージと釣れた札はあとに書いてあるので、その下になる） */
.bobber { position: absolute; left: var(--x, 50%); top: var(--y, 60%); width: 20px; height: 26px; margin: -13px 0 0 -10px; z-index: 3; opacity: 0; transition: left .5s ease-out, top .5s ease-out, opacity .2s; }
.bobber i { display: block; width: 100%; height: 100%; border-radius: 50% 50% 45% 45%; border: 3px solid var(--ink); background: linear-gradient(var(--red) 0 50%, #fff 50%); }
.bobber.on { opacity: 1; }
.bobber.on i { animation: bob 1.2s ease-in-out infinite; }
.bobber.bite i { animation: dunk .35s ease-in-out infinite; }
.bobber.pull i { animation: dunk .2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }
@keyframes dunk { 50% { transform: translateY(12px); } }
/* 場所の絵（岩礁・小島・鳥山）。押せることは、ゆれと手前の波紋で伝える */
.fish-spots .spot { position: absolute; left: var(--x); top: var(--y); width: var(--w); transform: translate(-50%, -50%); z-index: 3; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fish-spots .spot svg { display: block; width: 100%; animation: spotbob 2.4s ease-in-out infinite alternate; transition: transform .15s; }
.fish-spots .spot:nth-child(2) svg { animation-delay: -.8s; }
.fish-spots .spot:nth-child(3) svg { animation-delay: -1.6s; }
.fish-spots .spot:hover svg, .fish-spots .spot:focus-visible svg { transform: scale(1.08); }
.fish-spots .spot:active svg { transform: scale(.94); }
.fish-spots .spot .gull { animation: gull .6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.fish-spots .spot .g2 { animation-delay: -.2s; } .fish-spots .spot .g3 { animation-delay: -.4s; }
@keyframes spotbob { to { transform: translateY(2px); } }
@keyframes gull { to { transform: scaleY(.6) translateY(2px); } }
/* 沖の鳥山（11/10 本人「おすすめで」）：カモメが輪を描いて回り、魚がときどき跳ねる。投げたあとは跳ねを止めて、浮きを見やすくする */
.fish-spots .spot[data-spot="far"] svg { overflow: visible; }
.fish-spots .spot .orbit { animation: orbit 5s linear infinite; }
.fish-spots .spot .o2 { animation-duration: 6.5s; animation-delay: -2s; animation-direction: reverse; }
.fish-spots .spot .o3 { animation-duration: 5.8s; animation-delay: -3.5s; }
@keyframes orbit { 0% { transform: translate(0, 0); } 25% { transform: translate(10px, 4px); } 50% { transform: translate(0, 8px); } 75% { transform: translate(-10px, 4px); } 100% { transform: translate(0, 0); } }
.fish-spots .spot .jump { animation: spotjump 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; opacity: 0; }
@keyframes spotjump { 0% { transform: translate(-10px, 12px) rotate(-35deg); opacity: 0; } 4% { opacity: 1; } 14% { transform: translate(0, -10px) rotate(0); } 26% { transform: translate(10px, 12px) rotate(40deg); opacity: 1; } 28%, 100% { transform: translate(10px, 12px) rotate(40deg); opacity: 0; } }
.fish-spots .spot .drop { animation: drop 3.6s ease-out infinite; transform-box: fill-box; transform-origin: center; opacity: 0; }
@keyframes drop { 0%, 22% { opacity: 0; transform: translateY(2px); } 27% { opacity: 1; transform: translateY(-3px); } 40%, 100% { opacity: 0; transform: translateY(-7px); } }
.fish-spots.off .spot .jump, .fish-spots.off .spot .drop { animation: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .fish-spots .spot svg, .fish-spots .spot svg * { animation: none !important; } .fish-spots .spot .jump { opacity: 1; } }
.fish-spots .spot .cast { position: absolute; left: 50%; top: calc(100% + 16px); width: 0; height: 0; }   /* 浮きが落ちる所＝下の波紋の真ん中 */
.fish-spots .spot::after { content: ''; position: absolute; left: 50%; top: 100%; width: 34px; height: 10px; margin: 6px 0 0 -17px; border: 2px solid #fff8; border-radius: 50%; animation: ripple 1.6s ease-out infinite; }
@keyframes ripple { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.fish-spots.off .spot { pointer-events: none; }   /* 投げたあとも景色として残す（押せないだけ） */
.fish-spots.off .spot::after { display: none; }
/* 大漁（みかん・長靴以外の4種がそろったとき、1回だけ）：大漁旗がはためいて、紙吹雪 */
.tairyo { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 10px; background: #1d2a35; cursor: pointer; animation: tairyoin .3s ease-out; }
.tairyo[hidden] { display: none; }
.tairyo-flag { width: 74%; max-width: 300px; transform-origin: 0 50%; animation: flagin .6s cubic-bezier(.3, 1.6, .5, 1), flagwave 1.2s ease-in-out .6s infinite alternate; }
.tairyo-flag svg { display: block; width: 100%; filter: drop-shadow(0 4px 0 #4a3a30); }
.tairyo-msg { margin: 0 16px; padding: 6px 14px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; font-weight: 900; font-size: 14px; text-align: center; }
.kami i { position: absolute; top: -12px; width: 8px; height: 12px; background: var(--red); animation: kami 2.4s linear infinite; }
.kami i:nth-child(3n+1) { background: #f3b13c; } .kami i:nth-child(3n+2) { background: #3b8fd0; }
.kami i:nth-child(1) { left: 6%; animation-delay: 0s; }    .kami i:nth-child(2) { left: 14%; animation-delay: -.9s; }
.kami i:nth-child(3) { left: 22%; animation-delay: -1.7s; } .kami i:nth-child(4) { left: 31%; animation-delay: -.4s; }
.kami i:nth-child(5) { left: 40%; animation-delay: -1.2s; } .kami i:nth-child(6) { left: 49%; animation-delay: -2s; }
.kami i:nth-child(7) { left: 58%; animation-delay: -.6s; }  .kami i:nth-child(8) { left: 66%; animation-delay: -1.5s; }
.kami i:nth-child(9) { left: 74%; animation-delay: -.2s; }  .kami i:nth-child(10) { left: 82%; animation-delay: -1.1s; }
.kami i:nth-child(11) { left: 90%; animation-delay: -1.9s; } .kami i:nth-child(12) { left: 96%; animation-delay: -.8s; }
.tairyo-tai { animation: taijump .9s ease-in-out infinite alternate; }   /* 旗の上で真鯛が跳ねる */
.tairyo-drop { animation: taidrop .9s ease-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes taijump { from { transform: translate(-3px, 5px) rotate(-6deg); } to { transform: translate(3px, -5px) rotate(8deg); } }
@keyframes taidrop { from { transform: scale(.6); opacity: .5; } to { transform: scale(1.1) translateY(-3px); opacity: 1; } }
@keyframes tairyoin { from { opacity: 0; } }
@keyframes flagin { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
@keyframes flagwave { from { transform: skewY(-3deg) scaleX(.97); } to { transform: skewY(3deg) scaleX(1); } }
@keyframes kami { to { transform: translateY(360px) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .tairyo-flag, .kami i, .tairyo-tai, .tairyo-drop { animation: none; } }
.fish-gauge[hidden], .catch[hidden] { display: none; }   /* display: grid が hidden を打ち消して、見えない枠が場所の札を押せなくしていた */
.fish-gauge { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 4; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center;
  background: #fff8eee6; border: 3px solid var(--ink); border-radius: 12px; padding: 6px 10px; font-size: 12px; }
.fish-gauge span { height: 12px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.fish-gauge i { display: block; height: 100%; width: 0; background: var(--green); }
.fish-gauge .prog i { background: var(--blue); }
.catch { position: absolute; inset: 14px; z-index: 5; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 10px; animation: pop2 .3s ease-out; }
@keyframes pop2 { from { transform: scale(.7); opacity: 0; } }
.catch-pic svg { width: 120px; height: 80px; display: block; }
.catch-name { margin: 0; font-size: 20px; font-weight: 900; }
.catch-logic { list-style: none; margin: 0; padding: 0; text-align: center; font-weight: 700; font-size: 14px; line-height: 1.5; }
.catch-logic li { opacity: 0; transform: translateY(6px); transition: .3s; }
.catch-logic li.on { opacity: 1; transform: none; }
.catch-logic li:last-child { color: #d0457e; font-weight: 900; }
.fish-ctrl { text-align: center; margin-top: 14px; min-height: 48px; }
.fish-btn { font: inherit; font-weight: 900; font-size: 18px; padding: 10px 28px; touch-action: none; user-select: none; -webkit-user-select: none; }
.fish-btn.hold { transform: translateY(4px); box-shadow: none; }
.fish-book-head { text-align: center; margin: 10px 0 0; font-size: 16px; }   /* 見出しは図鑑の下に置く（ボタンの近くに字を置かない。11/10 本人） */
.fish-book { list-style: none; margin: 40px auto 0; padding: 0; max-width: 420px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fish-book li { background: #fff8ee; border: 3px solid var(--ink); border-radius: 12px; padding: 6px 4px; text-align: center; font-size: 12px; font-weight: 700; }
.fish-book li svg { width: 64px; height: 42px; display: block; margin: 0 auto; }
.fish-book li.none svg { filter: brightness(0) opacity(.18); }
.fish-book li { min-height: 103px; display: flex; flex-direction: column; justify-content: center; }   /* 釣れる前と後で札の高さが変わらないように */
.fish-book li.none { position: relative; align-items: center; }   /* まだ釣れていない札：シルエットを真ん中に、？？？ をその上に重ねる */
.fish-book li.none .q { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--ink); }
.fish-book li b { display: block; color: var(--red); }

/* くう子のガチャ（2026-11-11）：くう子のリボンの桃色。お店の壁と床の2色。名物の絵は 制作\meibutsu と同じ */
.gacha { background: #ffe1ea; }
.gacha::before { color: #ffe1ea; }
@media (hover: none) { .gacha { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; } }
.gacha-stage { position: relative; max-width: 420px; height: 320px; margin: 0 auto; border: 3px solid var(--ink); border-radius: 20px; overflow: hidden;
  background: linear-gradient(var(--paper) 0 74%, var(--ink) 74% calc(74% + 3px), #f2c79c calc(74% + 3px)); }
.gacha-kuuko { position: absolute; left: 4%; bottom: 8%; width: 30%; transform-origin: 50% 90%; }
.gacha-kuuko.push { animation: kpush .3s ease-in-out 3; }
.gacha-kuuko.yay { animation: fishyay .45s ease-in-out 3; }
.gacha-kuuko.doki { animation: kdoki .5s ease-in-out infinite alternate; }   /* カプセルを待つあいだ、ドキドキで小さく弾む */
@keyframes kdoki { to { transform: translateY(-4%) scale(1.03); } }
@keyframes kpush { 50% { transform: rotate(6deg) translateX(4%); } }
.gacha-machine { position: absolute; right: 5%; bottom: 5%; width: 44%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gacha-machine svg { display: block; width: 100%; }
.gacha-machine:focus-visible { outline: 3px dashed var(--ink); outline-offset: 4px; border-radius: 12px; }
.gacha-machine .gacha-handle { transform-box: fill-box; transform-origin: center; }
.gacha-machine.spin { animation: gshake .15s ease-in-out 8; }
.gacha-machine.spin .gacha-handle { animation: gturn 1.2s ease-in-out; }
.gacha-machine.spin #gachaBalls { animation: gballs .2s ease-in-out 6 alternate; }
@keyframes gshake { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
@keyframes gturn { to { transform: rotate(720deg); } }
@keyframes gballs { to { transform: translateY(-6px); } }
.gacha-cap { position: absolute; z-index: 3; width: 54px; height: 54px; margin: -27px 0 0 -27px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gacha-cap[hidden] { display: none; }
.gacha-cap i { position: absolute; left: 0; right: 0; height: 50%; border: 4px solid var(--ink); transition: transform .35s ease-in, opacity .35s; }
.gacha-cap .top { top: 0; border-radius: 27px 27px 0 0; background: var(--cap, var(--red)); border-bottom-width: 2px; }
.gacha-cap .bot { bottom: 0; border-radius: 0 0 27px 27px; background: var(--paper); border-top-width: 2px; }
.gacha-cap.drop { animation: gdrop .7s cubic-bezier(.3, 1.5, .5, 1), gwait 1s ease-in-out .7s infinite alternate; }
.gacha-cap.open { animation: none; }
.gacha-cap.open .top { transform: translate(-18px, -34px) rotate(-40deg); opacity: 0; }
.gacha-cap.open .bot { transform: translate(18px, 30px) rotate(30deg); opacity: 0; }
@keyframes gdrop { from { transform: translate(var(--dx, 0), var(--dy, -34px)) scale(.4) rotate(-200deg); opacity: 0; } 20% { opacity: 1; } }
@keyframes gwait { to { transform: scale(1.08) rotate(6deg); } }
.gacha-card { position: absolute; inset: 14px; z-index: 5; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; display: grid; justify-items: center; align-content: center; gap: 2px; padding: 10px; text-align: center; animation: pop2 .3s ease-out; }
.gacha-card[hidden], .gacha-comp[hidden] { display: none; }
.gacha-pic svg { width: 136px; height: 136px; display: block; }
.gacha-name { margin: 0; font-size: 20px; font-weight: 900; line-height: 1.3; }
.gacha-place { margin: 0; font-size: 12px; font-weight: 700; opacity: .7; }
.gacha-say { margin: 6px 0 0; font-size: 15px; font-weight: 900; color: #d0457e; line-height: 1.5; }
.gacha-new { position: absolute; top: 12px; right: 12px; background: var(--red); color: #fff; font-weight: 900; font-size: 13px; padding: 2px 10px; border: 3px solid var(--ink); border-radius: 999px; transform: rotate(8deg); }
.gacha-new[hidden] { display: none; }
.gacha-comp { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 12px; background: #3a2a35; cursor: pointer; animation: tairyoin .3s ease-out; }
.gacha-comp-big { margin: 0; font-size: 40px; font-weight: 900; color: var(--pink); -webkit-text-stroke: 8px var(--paper); paint-order: stroke fill; animation: flagin .6s cubic-bezier(.3, 1.6, .5, 1); }
@media (prefers-reduced-motion: reduce) { .gacha-machine.spin, .gacha-machine.spin *, .gacha-cap.drop, .gacha-kuuko, .gacha-comp-big { animation: none !important; } }
.gacha-book { list-style: none; margin: 40px auto 0; padding: 0; max-width: 420px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }   /* 18品＝6列×3段 */
.gacha-book li { background: var(--paper); border: 3px solid var(--ink); border-radius: 10px; padding: 3px 1px; text-align: center; font-size: 9px; font-weight: 700; line-height: 1.25;
  min-height: 92px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; overflow-wrap: anywhere; }
.gacha-book li svg { width: 42px; height: 42px; display: block; }
.gacha-book li.none svg { filter: brightness(0) opacity(.18); }
.gacha-book li.none .q { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); font-size: 12px; }
.gacha-book li b { display: block; color: var(--red); }

.watch { background: var(--blue); color: #fff; }
.watch::before { color: var(--blue); }
.watch .head span { -webkit-text-stroke-color: #1e3a68; }
.watch .head small { color: #fff; }
.sns { list-style: none; padding: 0; margin: 0 auto; max-width: 420px; display: grid; gap: 10px; }
.sns li { display: flex; justify-content: space-between; align-items: center; background: #ffffff1f; border: 2px dashed #ffffff88; border-radius: 14px; padding: 10px 16px; }
.sns-name { font-weight: 900; font-size: 18px; }
.sns-state { font-size: 12px; background: #fff; color: var(--blue); border-radius: 999px; padding: 0 10px; font-weight: 700; }
a.sns-name { color: #fff; text-decoration: none; }
a.sns-state.on { background: var(--red); color: #fff; padding: 2px 14px; font-size: 13px; text-decoration: none; box-shadow: 0 3px 0 #1e3a68; }
/* 各話の帯：公開した回は YouTube へ。まだの回は「次」の札 */
a.ep { color: inherit; text-decoration: none; }
.ep.next { display: grid; place-content: center; text-align: center; padding: 16px 10px; background: #fff8eeaa; border-style: dashed; aspect-ratio: auto; }
.ep.next p { padding: 0; }
.ep.next .soon-small { margin-top: 10px; font-size: 11px; font-weight: 500; opacity: .7; }

.foot { background: #3a2a22; color: var(--paper); text-align: center; padding: 30px 16px 36px; font-size: 12px; }
.copy { margin: 4px 0 0; font-size: 11px; color: #fff8ee73; letter-spacing: .04em; }   /* コピーライトは目立たせない（本人） */
.to-top { display: inline-grid; justify-items: center; color: var(--paper); font-weight: 700; margin-bottom: 8px; }
.to-top.fly svg { animation: fly .8s ease-in forwards; }
@keyframes fly { to { transform: translate(40px, -160px) rotate(-20deg); opacity: 0; } }

/* 出てくるときに、ひょこっと */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.reveal.in { opacity: 1; transform: none; }

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