/* 色は Lives 本編の scripts/ui/paper_style.gd から */
:root {
  color-scheme: light;
  --paper: #f0eddb;
  --paper-deep: #dbdbc9;
  --card: #f9f4e7;
  --frame: #f2ecd8;
  --ink: #29241c;
  --ink-dim: #6f6b60;
  --ink-faint: #a9a595;
  --mint: #c4e6d4;
  --mint-deep: #8fc4ab;
  --seal: #c75445;
  --salmon: #f0b3a3;
  --butter: #f3e7a0;
  --head: "RocknRoll One", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --hand: "Zen Kurenaido", "Zen Maru Gothic", sans-serif;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .16  0 0 0 0 .14  0 0 0 0 .11  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  line-height: 1.8;
  background-color: var(--paper);
  background-image: var(--grain);
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
html[data-lang="ja"] .en, html[data-lang="en"] .ja { display: none !important; }
.sp { display: none; }
@media (max-width: 640px) { .sp { display: inline; } }

/* ---------------------------------------------------------------- 手描きの枠
   線・塗り・影は ::before に描いて、ノイズでゆがめる（中の絵と文字はゆがめない） */
.paper, .btn, .chip, .tb-btn, .tb-round, .tb-lang, .newsbar, .news-demo, .hint {
  --bw: 2.5px; --bc: var(--ink); --bg: var(--card); --sh: none; --rf: url(#rough-a);
  position: relative; isolation: isolate;
}
.paper::before, .btn::before, .chip::before, .tb-btn::before, .tb-round::before, .tb-lang::before,
.newsbar::before, .news-demo::before, .hint::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border: var(--bw) solid var(--bc); border-radius: inherit; background: var(--bg); box-shadow: var(--sh);
  filter: var(--rf);
  transition: background-color .15s, box-shadow .15s, transform .15s;
}
.paper { border-radius: 16px 13px 17px 12px / 12px 17px 13px 16px; --sh: 3px 4px 0 rgba(41, 36, 28, .14); }
.paper:nth-child(3n+2)::before { filter: url(#rough-b); }
.paper:nth-child(3n)::before { filter: url(#rough-c); }

/* ---------------------------------------------------------------- ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 10px 24px;
  font-weight: 700; font-size: 16px; line-height: 1.3; text-decoration: none; text-align: center;
  border-radius: 999px 980px 999px 960px / 960px 999px 980px 999px;
  transition: transform .12s;
  --sh: 3px 4px 0 rgba(41, 36, 28, .9);
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:hover { transform: translate(-1px, -2px); }
.btn:hover::before { --sh: 5px 6px 0 rgba(41, 36, 28, .9); }
.btn:active { transform: translate(2px, 3px); }
.btn:active::before { --sh: 0 0 0 rgba(41, 36, 28, .9); }
.btn:focus-visible { outline: 3px solid var(--seal); outline-offset: 4px; }
.btn-steam { color: var(--paper); --bg: #2a3440; }
.btn-steam:hover::before { --bg: #34414f; }
.btn-x { --bg: var(--card); }
.btn-x:hover::before { --bg: #fffaf0; }
.btn-x svg { width: 18px; height: 18px; }
.btn-small { min-height: 42px; padding: 8px 18px; font-size: 14px; }
.btn-small svg { width: 18px; height: 18px; }
.btn-big { min-height: 62px; padding: 12px 32px; font-size: 18px; }
.btn[data-pending] { cursor: pointer; }

/* ---------------------------------------------------------------- ヒーロー（窓） */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(12px, 2.4vw, 28px) 16px 28px;
  position: relative;
}
.window {
  width: min(1340px, 100%);
  height: clamp(380px, calc(100svh - 230px), 820px);
  padding: clamp(9px, 1.2vw, 15px);
  border-radius: 38px 34px 40px 32px / 34px 40px 32px 38px;
  position: relative; isolation: isolate;
}
.window::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--frame); border: 2.5px solid var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 6px 10px 0 rgba(41,36,28,.12), 0 24px 60px -24px rgba(41,36,28,.35);
  filter: url(#rough-big);
}
.window-view {
  position: relative; width: 100%; height: 100%;
  overflow: hidden;
  border-radius: 24px 20px 26px 20px / 20px 26px 20px 24px;
  background: #cfe3c4;
  cursor: url("assets/cursor_hand_open.svg") 16 16, default;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.window-view::after {
  content: ""; position: absolute; inset: 0; z-index: 8; pointer-events: none;
  border: 2.5px solid var(--ink); border-radius: inherit; filter: url(#rough-a);
}
.window-view.is-over-creature { cursor: url("assets/cursor_camera.svg") 16 16, crosshair; }

.river-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.river-layer { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; user-select: none; -webkit-user-drag: none; }
.river-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.grass {
  position: absolute; left: -2%; bottom: -3%; z-index: 3;
  width: clamp(120px, 21%, 300px); pointer-events: none;
  transform-origin: 20% 100%;
  animation: grass 3.2s steps(1) infinite;
}
@keyframes grass {
  0% { transform: skewX(0deg); } 12% { transform: skewX(-1.6deg); } 25% { transform: skewX(-3deg); }
  37% { transform: skewX(-2deg); } 50% { transform: skewX(-0.5deg); } 62% { transform: skewX(1.2deg); }
  75% { transform: skewX(2deg); } 87% { transform: skewX(0.8deg); }
}

/* 窓の帯 */
.titlebar {
  position: absolute; z-index: 6; left: 0; right: 0; top: 0;
  display: flex; align-items: center; gap: clamp(8px, 1.4vw, 18px);
  padding: clamp(8px, 1.2vw, 14px) clamp(10px, 1.4vw, 18px);
  pointer-events: none;
}
.titlebar > * { pointer-events: auto; }
.tb-left { display: flex; align-items: center; gap: clamp(4px, .6vw, 8px); flex: none; }
.tb-btn {
  width: clamp(26px, 2.6vw, 36px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; --bw: 2.4px;
}
.tb-close { --bg: var(--salmon); }
.tb-min { --bg: var(--butter); }
.tb-max { --bg: var(--card); }
.tb-btn i { position: relative; width: 44%; height: 44%; display: block; }
.tb-close i::before, .tb-close i::after { content: ""; position: absolute; left: 45%; top: -5%; width: 2.4px; height: 110%; background: var(--ink); border-radius: 2px; transform: rotate(45deg); }
.tb-close i::after { transform: rotate(-45deg); }
.tb-min i::before { content: ""; position: absolute; left: 0; right: 0; top: 45%; height: 2.4px; background: var(--ink); border-radius: 2px; }
.tb-max i { border: 2.3px solid var(--ink); border-radius: 3px; width: 46%; height: 46%; }
.tb-logo { margin: 0 0 0 clamp(2px, .5vw, 8px); line-height: 0; }
.tb-logo img { height: clamp(34px, 4.2vw, 56px); width: auto; display: block; filter: drop-shadow(1px 2px 0 rgba(41,36,28,.18)); }

.newsbar, .news-demo {
  flex: 1 1 auto; min-width: 0; max-width: 620px; margin: 0 auto;
  height: clamp(36px, 3.6vw, 48px);
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  border-radius: 8px 10px 7px 11px;
  --bg: var(--mint);
  --sh: inset 0 0 0 4px var(--mint), inset 0 0 0 5.4px rgba(41,36,28,.75), 2px 3px 0 rgba(41,36,28,.15);
}
.news-diamond { font-size: 14px; flex: none; }
.news-track { position: relative; overflow: hidden; flex: 1; height: 100%; display: flex; align-items: center;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.news-text { white-space: nowrap; font-weight: 700; font-size: clamp(13px, 1.25vw, 16px); letter-spacing: .04em; will-change: transform; position: absolute; left: 0; }

.tb-right { display: flex; align-items: center; gap: clamp(6px, .8vw, 10px); flex: none; }
.tb-round, .tb-lang {
  height: clamp(32px, 3.2vw, 42px); width: clamp(32px, 3.2vw, 42px); border-radius: 50%; flex: none;
  display: grid; place-items: center; border: 0; background: none; padding: 0;
  --bw: 2.3px; --bg: var(--card); --sh: 2px 3px 0 rgba(41,36,28,.18);
  text-decoration: none;
}
.tb-round svg { width: 50%; height: 50%; }
.tb-round:hover::before, .tb-lang:hover::before { --bg: #fffaf0; }
.tb-round.on::before { --bg: var(--butter); }
.tb-round .snd-on, .tb-round.on .snd-off { display: none; }
.tb-round.on .snd-on { display: block; }
.tb-lang { width: auto; border-radius: 999px; padding: 0 12px; font-size: 13px; font-weight: 700; }
.tb-x svg { width: 42%; height: 42%; }
.tb-book { position: relative; line-height: 0; display: block; transition: transform .15s; }
.tb-book img { height: clamp(40px, 4.4vw, 58px); width: auto; filter: drop-shadow(2px 3px 0 rgba(41,36,28,.18)); }
.tb-book:hover { transform: rotate(-4deg) translateY(-2px); }
.found-count {
  position: absolute; right: -10px; bottom: -6px; line-height: 1.2;
  background: var(--seal); color: #fff; font-size: 11px; font-weight: 900; padding: 2px 6px; border-radius: 99px;
  border: 2px solid var(--ink);
}

.hint {
  position: absolute; z-index: 5; left: 50%; bottom: clamp(10px, 1.6vw, 18px); transform: translateX(-50%);
  padding: 4px 16px; border-radius: 99px; white-space: nowrap;
  font-size: clamp(11px, 1.05vw, 13.5px); font-weight: 700; color: var(--ink);
  --bw: 2px; --bg: rgba(249, 244, 231, .92);
  pointer-events: none;
}

.flash { position: absolute; inset: 0; z-index: 9; background: #fff; opacity: 0; pointer-events: none; }
.flash.on { animation: flash .55s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }

.focus-ring {
  position: absolute; z-index: 4; width: calc(var(--r, 60px) * 2); aspect-ratio: 1; left: 50%; top: 50%;
  border-radius: 50%; pointer-events: none; opacity: 0;
  transform: translate(-50%, -50%) scale(3);
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 200vmax rgba(36, 31, 24, .38);
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.15), opacity .3s;
  filter: url(#rough-big);
}
.focus-ring.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* 発見のカード */
.discover {
  position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; padding: clamp(56px, 7vw, 76px) 16px 14px;
  opacity: 0; transition: opacity .25s;
}
.discover.on { opacity: 1; }
.discover[hidden] { display: none; }
.discover-card {
  width: min(620px, 100%); padding: 16px 22px 18px;
  transform: rotate(-1.2deg) translateY(16px) scale(.96); transition: transform .35s cubic-bezier(.2, .9, .25, 1.2);
  --sh: 6px 8px 0 rgba(41,36,28,.25);
  max-height: 100%; overflow: auto;
}
.discover.on .discover-card { transform: rotate(-1.2deg); }
.dc-close {
  position: absolute; right: 10px; top: 6px; width: 38px; height: 38px;
  border: 0; background: none; font-size: 26px; line-height: 1; color: var(--ink-dim);
}
.dc-close:hover { color: var(--ink); }
.dc-stamp {
  display: inline-block; font-family: var(--head); font-size: clamp(22px, 2.6vw, 30px); color: var(--seal);
  border: 3px solid var(--seal); padding: 0 14px; border-radius: 10px 6px 12px 7px; transform: rotate(-4deg);
  margin: 0 0 8px; letter-spacing: .06em;
  animation: stamp .45s cubic-bezier(.3, 1.6, .5, 1) both .1s;
}
.dc-stamp.again { color: var(--ink-dim); border-color: var(--ink-dim); }
@keyframes stamp { from { transform: rotate(-12deg) scale(1.8); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
.dc-body { display: grid; grid-template-columns: clamp(140px, 15vw, 200px) 1fr; gap: 18px; align-items: start; }
.dc-pic {
  position: relative; background: #fbf8ee; border-radius: 10px; padding: 10px; aspect-ratio: 1;
  display: grid; place-items: center;
  background-image: linear-gradient(rgba(143, 196, 171, .25) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 196, 171, .25) 1px, transparent 1px);
  background-size: 14px 14px;
  border: 2px dashed var(--ink-faint);
}
.dc-sprite { width: 100%; max-height: 100%; background-repeat: no-repeat; }
.dc-no { position: absolute; left: 8px; top: 4px; font-family: var(--head); font-size: 14px; color: var(--ink-dim); }
.dc-memo { margin: 0 0 10px; font-family: var(--hand); font-size: clamp(14px, 1.2vw, 16px); line-height: 1.65; }
.dc-name { display: flex; align-items: baseline; gap: 12px; padding: 4px 0 6px; border-bottom: 2px dashed var(--ink-faint); margin-bottom: 10px; }
.dc-name-label { font-size: 13px; color: var(--ink-dim); }
.dc-name-blank { font-family: var(--head); color: var(--ink-faint); font-size: 18px; }
.dc-note { font-size: 12.5px; color: var(--ink-dim); margin: 0 0 10px; line-height: 1.6; }

/* ヒーローの下 */
.hero-copy { text-align: center; padding-top: clamp(18px, 3svh, 30px); }
.tagline {
  margin: 0 0 18px; font-family: var(--head); font-weight: 400;
  font-size: clamp(20px, 2.6vw, 34px); line-height: 1.5; letter-spacing: .04em;
}
.tagline > span { background: linear-gradient(transparent 62%, var(--mint) 62% 92%, transparent 92%); padding: 0 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cta-row { display: flex; gap: 14px 18px; justify-content: center; flex-wrap: wrap; }
.platform { margin: 14px 0 0; font-size: 13px; color: var(--ink-dim); letter-spacing: .08em; }
.platform .dot { margin: 0 .4em; }
.scroll-cue { position: absolute; left: 50%; bottom: 6px; width: 30px; height: 30px; transform: translateX(-50%); opacity: .5; }
.scroll-cue span { position: absolute; left: 9px; top: 4px; width: 12px; height: 12px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); animation: cue 2s steps(4) infinite; }
@keyframes cue { 0%, 100% { translate: 0 0; } 50% { translate: 0 6px; } }

/* ---------------------------------------------------------------- セクション */
.sec { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.two { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.two.rev > :first-child { order: 2; }
.center { text-align: center; }
.h2 {
  margin: 0 0 22px; font-family: var(--head); font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px); line-height: 1.4; letter-spacing: .03em;
}
.h2 > span { background: linear-gradient(transparent 64%, var(--mint) 64% 92%, transparent 92%); padding: 0 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lead { font-size: clamp(15px, 1.35vw, 17px); line-height: 2; margin: 0 0 18px; }
.lead.center { max-width: 640px; margin: 0 auto 44px; }
.lead b { background: linear-gradient(transparent 70%, rgba(199, 84, 69, .22) 70%); }

.facts { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.facts li { padding-left: 34px; position: relative; display: grid; }
.facts li::before {
  content: ""; position: absolute; left: 2px; top: 7px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--mint); border: 2.4px solid var(--ink); filter: url(#rough-a);
}
.facts b { font-size: 16px; }
.facts span { color: var(--ink-dim); font-size: 14px; }

/* デスクトップの見本 */
.desk { position: relative; }
.desk-screen {
  position: relative; aspect-ratio: 16 / 10.4; border-radius: 18px 16px 20px 15px;
  padding: 12px; background: #2f2a22; box-shadow: 8px 12px 0 rgba(41,36,28,.15);
  overflow: hidden;
}
.desk-screen::after {
  content: ""; position: absolute; inset: 12px; border-radius: 8px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.06), transparent 40%);
}
.desk-screen > * { position: relative; }
.desk-bar {
  position: absolute; left: 12px; right: 12px; top: 12px; height: 22px; z-index: 2;
  display: flex; align-items: center; gap: 6px; padding: 0 10px;
  background: rgba(249, 244, 231, .85); border-radius: 8px 8px 0 0; font-size: 10px; color: var(--ink-dim);
}
.desk-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); }
.desk-bar span { margin-left: 8px; }
.desk-doc {
  position: absolute; inset: 12px; padding: 36px 9% 0 7%;
  background: linear-gradient(170deg, #e9ecef, #d9dee3); border-radius: 8px;
}
.desk-line { height: 7px; width: var(--w); background: #b9c0c8; border-radius: 4px; margin: 0 0 13px; }
.desk-line:nth-child(3n) { background: #9fb2c6; }
.desk-lives {
  position: absolute; right: 4%; bottom: 6%; width: 44%; aspect-ratio: 520 / 360;
  padding: 2.4%; border-radius: 16px 14px 17px 13px; z-index: 3;
  background: var(--frame); border: 2px solid var(--ink);
  box-shadow: 4px 6px 0 rgba(41,36,28,.25), 0 10px 30px rgba(0,0,0,.25);
  animation: bob 6s steps(12) infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.desk-lives-view { position: relative; width: 100%; height: 100%; border-radius: 10px; overflow: hidden; border: 1.6px solid var(--ink); background: #cfe3c4; }
.desk-stand { width: 22%; height: 26px; margin: 0 auto; background: #2f2a22; clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); opacity: .85; }

/* 遊び方 */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { padding: 0 20px 24px; }
.step:nth-child(even) { transform: rotate(.7deg); }
.step:nth-child(odd) { transform: rotate(-.6deg); }
.step-art { position: relative; height: 150px; margin: 0 -20px 6px; overflow: hidden; border-radius: 16px 13px 0 0; }
.step-no {
  position: absolute; top: 120px; left: 16px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--head); font-size: 20px; background: var(--butter);
  border: 2.4px solid var(--ink); z-index: 2;
}
.step h3 { margin: 22px 0 6px; font-family: var(--head); font-weight: 400; font-size: 22px; }
.step p { margin: 0; font-size: 14.5px; line-height: 1.85; color: #3f392e; }
.art-notice { background: linear-gradient(#e8eccf, #e6dfbf); }
.art-notice::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(transparent, rgba(143, 196, 171, .25)); }
.sprite { background-repeat: no-repeat; }
.runner { position: absolute; bottom: 26px; left: 0; height: 52px; animation: run 6s steps(48) infinite; }
@keyframes run {
  0% { transform: translateX(-120%); }
  30% { transform: translateX(110px); }
  52% { transform: translateX(110px); }
  80%, 100% { transform: translateX(420px); }
}
.art-zoom { background: radial-gradient(circle at 50% 55%, #e9e2c2, #ddd5b0); display: grid; place-items: center; }
.zoom-lens {
  width: 112px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: #f1ead2; border: 3px solid var(--ink); box-shadow: 0 0 0 200px rgba(41,36,28,.22);
  animation: lens 4s steps(16) infinite;
}
.zoom-lens .sprite { width: 120%; }
@keyframes lens { 0%, 100% { transform: scale(.72); } 45%, 70% { transform: scale(1.12); } }
.zoom-x { position: absolute; right: 16px; top: 12px; font-family: var(--head); font-size: 20px; color: var(--seal); }
.art-find { background: #fbf8ee; display: grid; place-items: center; }
.art-find img { height: 128px; width: auto; mix-blend-mode: multiply; clip-path: inset(0 100% 0 0); animation: draw 5s steps(14) infinite; }
@keyframes draw { 0% { clip-path: inset(0 100% 0 0); } 55%, 100% { clip-path: inset(0 0 0 0); } }
.mini-stamp {
  position: absolute; right: 14px; top: 14px; color: var(--seal); border: 2.5px solid var(--seal); border-radius: 8px;
  padding: 0 8px; font-family: var(--head); transform: rotate(8deg); opacity: 0; animation: ministamp 5s infinite;
}
@keyframes ministamp { 0%, 56% { opacity: 0; transform: rotate(8deg) scale(1.6); } 62%, 100% { opacity: 1; transform: rotate(8deg) scale(1); } }
.art-name { background: linear-gradient(#e3efe6, #d6e8dc); display: grid; place-items: center; }
.name-tag {
  min-width: 70%; padding: 10px 18px; background: var(--card); border: 2.4px solid var(--ink); border-radius: 6px;
  font-family: var(--head); font-size: 22px; text-align: center; transform: rotate(-2deg);
  box-shadow: 3px 4px 0 rgba(41,36,28,.18); filter: url(#rough-a);
}
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--ink); margin-left: 3px; vertical-align: -0.15em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* 会 */
.society-art { display: grid; gap: 24px; }
.news-demo { max-width: none; margin: 0; width: 100%; height: 48px; transform: rotate(-1deg); }
.naming { padding: 20px 22px 22px; transform: rotate(1deg); }
.naming-head { font-family: var(--head); font-size: 18px; display: flex; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.naming-no { font-size: 14px; color: var(--ink-dim); }
.naming-body { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.naming-field { font-family: var(--head); font-size: 26px; border-bottom: 2.5px solid var(--ink); padding: 0 4px 2px; margin-bottom: 10px; }
.naming-rank { margin: 0; font-weight: 700; }
.naming-rank b { font-family: var(--head); font-size: 26px; color: var(--seal); margin: 0 2px; }
.naming-sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-dim); }

/* 図鑑 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.card { padding: 14px 16px 18px; display: flex; flex-direction: column; }
.card:nth-child(4n+1) { transform: rotate(-.6deg); }
.card:nth-child(4n+3) { transform: rotate(.6deg); }
.card-pic {
  height: 128px; display: grid; place-items: center; border-radius: 10px; margin-bottom: 10px;
  background: #f1ecd8;
  background-image: linear-gradient(rgba(143, 196, 171, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 196, 171, .22) 1px, transparent 1px);
  background-size: 12px 12px;
}
.card-pic .sprite { height: calc(118px * var(--k, 1)); max-width: 100%; }
.card-pic img { max-height: 90px; width: auto; opacity: .85; filter: blur(.3px); }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.card-no { font-family: var(--head); font-size: 18px; }
.rarity { display: inline-flex; gap: 4px; color: var(--ink-dim); font-family: var(--head); }
.rarity i { width: 9px; height: 9px; border-radius: 50%; border: 1.8px solid var(--ink); display: inline-block; }
.rarity i.f { background: var(--seal); border-color: var(--seal); }
.card-name { font-weight: 700; color: var(--ink-dim); font-size: 13.5px; margin: 2px 0 6px; }
.card-memo { margin: 0 0 12px; font-family: var(--hand); font-size: 14.5px; line-height: 1.7; flex: 1; }
.card-tags { display: flex; gap: 6px; }
.chip { font-size: 12px; font-weight: 700; padding: 1px 10px; border-radius: 99px; --bw: 1.8px; --bg: var(--mint); }
.seen-stamp {
  position: absolute; right: 12px; top: 12px; color: var(--seal); border: 2.5px solid var(--seal); border-radius: 8px;
  padding: 0 8px; font-family: var(--head); font-size: 15px; transform: rotate(12deg) scale(1.6); opacity: 0;
  transition: opacity .2s, transform .35s cubic-bezier(.3, 1.6, .5, 1); background: rgba(249, 244, 231, .7);
}
.card.is-found .seen-stamp { opacity: 1; transform: rotate(12deg) scale(1); }
.card-unknown { --bg: transparent; --bc: var(--ink-faint); --sh: none; }
.card-unknown::before { border-style: dashed; }
.card-unknown .card-no { color: var(--ink-dim); }

/* CTA */
.cta { overflow: hidden; background: linear-gradient(#dcebe6 0%, #e9efe0 55%, var(--paper) 100%); padding-bottom: clamp(100px, 12vw, 160px); }
.cta-inner { position: relative; z-index: 2; }
.cta-logo { width: clamp(200px, 26vw, 300px); height: auto; margin-bottom: 8px; filter: drop-shadow(3px 4px 0 rgba(41,36,28,.15)); }
.sky { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; height: auto; opacity: .95; animation: drift linear infinite; }
.c1 { width: 210px; top: 12%; animation-duration: 90s; animation-delay: -20s; }
.c2 { width: 280px; top: 48%; animation-duration: 120s; animation-delay: -70s; }
.c3 { width: 170px; top: 70%; animation-duration: 100s; animation-delay: -45s; opacity: .8; }
.c4 { width: 240px; top: 26%; animation-duration: 140s; animation-delay: -110s; }
@keyframes drift { from { transform: translateX(-320px); left: 0; } to { transform: translateX(calc(100vw + 40px)); left: 0; } }
.swallow { position: absolute; width: 74px; aspect-ratio: 1; top: 18%; left: 0; animation: fly 16s linear infinite; }
.swallow img { position: absolute; inset: 0; width: 100%; opacity: 0; animation: flap .375s steps(1) infinite; }
.swallow img:nth-child(2) { animation-delay: -.125s; }
.swallow img:nth-child(3) { animation-delay: -.25s; }
@keyframes flap { 0%, 33% { opacity: 1; } 34%, 100% { opacity: 0; } }
@keyframes fly {
  0% { transform: translate(-120px, 60px) rotate(-6deg); }
  50% { transform: translate(50vw, -10px) rotate(4deg); }
  100% { transform: translate(calc(100vw + 120px), 40px) rotate(-4deg); }
}

/* フッター */
.foot { padding: 34px 0 46px; border-top: 2px dashed var(--ink-faint); font-size: 13px; color: var(--ink-dim); }
.foot-inner { display: flex; gap: 12px 24px; justify-content: space-between; flex-wrap: wrap; }
.foot-links { display: flex; gap: 18px; }
.foot a { text-decoration: none; font-weight: 700; color: var(--ink); }
.foot a:hover { text-decoration: underline; }

/* 右下のウィッシュリスト */
.float-cta {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; min-height: 46px; padding: 8px 18px; font-size: 14px;
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.float-cta.on { opacity: 1; transform: none; pointer-events: auto; }
.float-cta.on.hide { opacity: 0; transform: translateY(20px); pointer-events: none; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; padding: 10px 20px; font-weight: 700; font-size: 14px;
  transform: translate(-50%, 30px); opacity: 0; transition: .25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ふわっと出す */
.reveal { opacity: 0; translate: 0 16px; transition: opacity .7s ease, translate .7s ease; }
.reveal.in { opacity: 1; translate: 0 0; }

/* ---------------------------------------------------------------- 狭い画面 */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .two { grid-template-columns: 1fr; }
  .two.rev > :first-child { order: 0; }
  .tb-left .tb-btn { display: none; }
  .newsbar { display: none; }
  .titlebar { justify-content: space-between; }
}
@media (max-width: 640px) {
  .hero { padding: 10px 10px 22px; }
  .window { height: calc(100svh - 270px); min-height: 360px; border-radius: 26px 24px 28px 22px; }
  .window-view { border-radius: 16px 14px 18px 13px; }
  .hint { bottom: 8px; }
  .steps { grid-template-columns: 1fr; }
  .dc-body { grid-template-columns: 1fr; }
  .dc-pic { width: 150px; margin: 0 auto; }
  .discover { padding: 56px 10px 10px; align-items: end; }
  .discover-card { padding: 16px 16px 18px; }
  .naming-body { grid-template-columns: 96px 1fr; }
  .cta-row .btn { width: 100%; max-width: 360px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 14px; }
  .card { padding: 10px 10px 14px; }
  .card-pic { height: 96px; }
  .card-pic .sprite { height: calc(88px * var(--k, 1)); }
  .card-memo { font-size: 13px; }
  .tb-lang { padding: 0 9px; font-size: 12px; }
}
@media (max-width: 380px) {
  .cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .reveal { opacity: 1; translate: none; }
}
