/* タロリオ ドット絵デザイン。角は4pxの段々、影は斜めにずらしたベタ、動きはコマ送り */
:root {
  --paper: #fff8ec;
  --ink: #2b1a24;
  --sub: #6d5a63;
  --red: #f03e35;
  --teal: #00938e;
  --gold: #ffc83d;
  --line: #2b1a24;
  --night: #1b1630;
  --gutter: clamp(16px, 4vw, 48px);
  --font: 'DotGothic16', 'MS Gothic', 'Osaka-Mono', monospace;
  /* 4辺だけに線を引き、角を欠けさせる（ドットの角丸） */
  --frame: 0 -4px 0 0 var(--line), 0 4px 0 0 var(--line), -4px 0 0 0 var(--line), 4px 0 0 0 var(--line);
  --drop: 8px 8px 0 0 rgba(43, 26, 36, .18);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--font); line-height: 1.9; letter-spacing: .02em; overflow-x: hidden;
  background: var(--paper);
  background-image: linear-gradient(rgba(43, 26, 36, .045) 2px, transparent 2px), linear-gradient(90deg, rgba(43, 26, 36, .045) 2px, transparent 2px);
  background-size: 16px 16px;
}
h1, h2, h3, b, strong { font-weight: 400; }
h1, h2 { line-height: 1.35; margin: 0; }
a { color: inherit; }
.small { font-size: .82rem; color: var(--sub); }
.chara-svg { display: block; width: 100%; height: auto; overflow: visible; }

/* 1マス跳ねる待機モーションと、コマ送りのまばたき */
.bob { animation: hop 1.4s steps(1) infinite; }
.eye { animation: blink 4.8s steps(1) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes hop { 50% { transform: translateY(-10px); } }
@keyframes blink { 0% { transform: none; } 94% { transform: scaleY(.34); } 97% { transform: none; } }
@keyframes cursor { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bob, .eye, .ticker div, .bar i { animation: none !important; } }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gutter); background: var(--paper); border-bottom: 4px solid var(--line); }
.logo { display: block; width: 150px; line-height: 0; text-decoration: none; color: var(--red); }
.logo-svg { display: block; width: 100%; height: auto; }
.site-header nav { display: flex; gap: clamp(8px, 2.5vw, 26px); }
.site-header nav a { font-size: .95rem; text-decoration: none; white-space: nowrap; }
.site-header nav a::before { content: '▶'; margin-right: 3px; color: var(--red); visibility: hidden; }
.site-header nav a.on::before, .site-header nav a:hover::before { visibility: visible; }

/* ヒーロー */
.hero { padding: clamp(32px, 5vw, 64px) var(--gutter); max-width: 960px; margin: auto; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: .95rem; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); text-shadow: 4px 4px 0 var(--gold); }
.lead { font-size: 1.05rem; max-width: 34em; margin: 18px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 28px; }
.parade { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; margin-top: 40px; }
.parade a:hover { transform: translateY(-8px); }
.btn { display: inline-block; font-family: var(--font); font-size: 1rem; padding: 8px 20px; margin: 4px; background: #fff; text-decoration: none; box-shadow: var(--frame), inset -4px -4px 0 0 #d9c8b4; }
.btn:hover { transform: translateY(4px); }
.btn.primary { background: var(--red); color: #fff; box-shadow: var(--frame), inset -4px -4px 0 0 #b8221b; }

.ticker { overflow: hidden; background: var(--red); color: #fff; border-block: 4px solid var(--line); white-space: nowrap; padding: 6px 0; }
.ticker div { display: inline-block; animation: tick 60s steps(600) infinite; }
@keyframes tick { to { transform: translateX(-50%); } }

/* 共通セクション */
.section { max-width: 1240px; margin: auto; padding: clamp(36px, 5vw, 64px) var(--gutter); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.section-head h2, .rules h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.section-head h2::before, .rules h2::before, .detail-sub h2::before, .info-block h2::before { content: '■'; color: var(--red); margin-right: 8px; font-size: .7em; vertical-align: .15em; }
.page-top { padding-top: clamp(28px, 4vw, 48px); }
.page-title { font-size: clamp(2rem, 5vw, 3.2rem); text-shadow: 4px 4px 0 var(--gold); }
.narrow { max-width: 780px; }

/* カード */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; margin-top: 28px; }
.section-head + .grid { margin-top: 0; }
.card { position: relative; display: flex; flex-direction: column; margin: 4px; padding: 14px; background: #fff; text-decoration: none; box-shadow: var(--frame), var(--drop); }
.card:hover { transform: translate(0, -8px); }
.card:hover .card-name::before { visibility: visible; }
.label { display: inline-block; align-self: flex-start; font-size: .75rem; letter-spacing: .06em; padding: 0 8px; background: var(--ink); color: #fff; }
.dish { display: block; margin: 12px 0; padding: 6%; background: var(--t); aspect-ratio: 1; box-shadow: inset 0 0 0 4px var(--line), inset 0 0 0 8px #fff; }
.card-title { font-size: .82rem; color: var(--sub); }
.card-name { font-size: 1.3rem; line-height: 1.4; }
.card-name::before { content: '▶'; color: var(--red); margin-right: 2px; visibility: hidden; }

/* 掟 */
.rule-list { list-style: none; counter-reset: r; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 26px 36px; }
.rule-list li { counter-increment: r; border-top: 4px dotted var(--line); padding-top: 10px; }
.rule-list li::before { content: counter(r, decimal-leading-zero); color: #fff; background: var(--red); padding: 0 6px; margin-right: 10px; }
.rule-list b { font-size: 1.1rem; }
.rule-list b::after { content: ''; display: block; }

/* 詳細 */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); max-width: 1240px; margin: auto; padding: clamp(28px, 4vw, 56px) var(--gutter) 0; }
.detail h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); text-shadow: 4px 4px 0 var(--t); }
.kana { margin: 2px 0 0; color: var(--sub); }
.detail-art .dish.big { padding: 6%; margin: 12px 4px; box-shadow: var(--frame), var(--drop), inset 0 0 0 4px #fff; }
blockquote { margin: 20px 4px; padding: 12px 18px; background: var(--night); color: #fff; font-size: 1.05rem; box-shadow: 0 -4px 0 0 #fff, 0 4px 0 0 #fff, -4px 0 0 0 #fff, 4px 0 0 0 #fff, 0 0 0 8px var(--line); }
.chart { margin: 24px 0 0; border-top: 4px solid var(--line); }
.chart div { display: grid; grid-template-columns: 5.5em 1fr; gap: 10px; padding: 8px 0; border-bottom: 2px dotted #bda895; }
.chart dt { color: var(--sub); }
.chart dd { margin: 0; }
.chart i { display: block; font-size: .88rem; color: var(--sub); }
.detail-sub { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); }
.detail-sub h2 { font-size: 1.5rem; margin-bottom: 14px; }
.anatomy ul { list-style: none; margin: 0; padding: 0; }
.anatomy li { padding: 11px 0; border-top: 2px dotted #bda895; }
.anatomy b { display: block; color: var(--teal); }
.truth { margin: 4px; padding: 24px; background: #fff; align-self: start; box-shadow: var(--frame), var(--drop); }
.truth p { margin: 0 0 18px; }
.pager { display: flex; justify-content: space-between; gap: 16px; padding-top: 0; }

/* キャラの顔の枠（ゲームのパイでも使う） */
.face { display: block; background: var(--t); padding: 5px; }

/* フリー素材 */
.terms { margin: 28px 4px; padding: 20px 24px; background: #fff; box-shadow: var(--frame), var(--drop); }
.terms h2 { font-size: 1.3rem; }
.terms ul { margin: 8px 0; padding-left: 1.2em; }
.terms .btn { margin-top: 8px; }
.sozai-jump { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 32px 0 8px; }
.sozai-chara { margin-top: 40px; scroll-margin-top: 80px; }
.sozai-chara h2 { font-size: 1.5rem; margin-bottom: 14px; }
.sozai-chara h2::before { content: '■'; color: var(--red); margin-right: 8px; font-size: .7em; vertical-align: .15em; }
.sozai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px; }
.sozai-item { display: block; margin: 4px; padding: 8px; background: #fff; text-decoration: none; text-align: center; font-size: .82rem; box-shadow: var(--frame); }
.sozai-item:hover { transform: translateY(-4px); }
.sozai-item img { display: block; width: 100%; height: auto; image-rendering: pixelated; background: var(--paper); }
.sozai-item i { font-style: normal; margin-left: 4px; padding: 0 4px; background: var(--teal); color: #fff; font-size: .7rem; }

/* 検査の話 */
.info-block { margin-top: 30px; padding-top: 14px; border-top: 4px dotted var(--line); }
.info-block h2 { font-size: 1.35rem; margin-bottom: 8px; }
.info-block p { margin: 0; }
.links { margin: 0; padding-left: 1.2em; }

/* フッター */
.site-footer { background: var(--ink); color: #fff; padding: 36px var(--gutter); text-align: center; border-top: 4px solid var(--gold); }
.site-footer p { margin: 4px auto; max-width: 720px; }
.footer-logo { width: 130px; line-height: 0; color: var(--gold); margin-bottom: 14px !important; }
.site-footer .small { color: #cfc0c8; margin-top: 14px; }

:focus-visible { outline: 4px solid var(--teal); outline-offset: 4px; }

/* ミニゲーム */
.game { max-width: 560px; margin: 8px auto 20px; }
.game-hud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 4px; }
.game-hud div { background: #fff; box-shadow: var(--frame); padding: 4px 8px; text-align: center; }
.game-hud span { display: block; font-size: .75rem; color: var(--sub); }
.game-hud strong { font-size: clamp(1.1rem, 4vw, 1.5rem); font-weight: normal; }
.game-time { height: 14px; margin: 18px 4px; background: #fff; box-shadow: var(--frame); }
.game-time i { display: block; height: 100%; background: var(--teal); transform-origin: left; will-change: transform; }
.nikaku-game .game-time i { transition: transform .25s linear; }
.game-time.low i { background: var(--red); animation: blink-bar .5s steps(1) infinite; }
@keyframes blink-bar { 50% { opacity: .4; } }
.game-stage { position: relative; margin: 4px; box-shadow: var(--frame), var(--drop); }
.game-board { position: relative; aspect-ratio: 1; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: repeating-conic-gradient(#fff3df 0 25%, #ffe6c2 0 50%) 0 0 / 25% 25%; }
.tile { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; cursor: pointer; transition: transform .2s cubic-bezier(.3,.8,.3,1); will-change: transform; }
.tile .chara-svg { display: block; width: 88%; height: auto; margin: 6%; -webkit-user-drag: none; }
.tile .bob, .tile .eye { animation: none; }
.tile.sel { background: rgba(255, 200, 61, .7); }
.tile.sel .chara-svg { animation: tile-hop .5s ease-in-out infinite alternate; }
@keyframes tile-hop { to { transform: translateY(-9%); } }
.tile.hint { animation: hint 1s ease-in-out infinite; }
@keyframes hint { 50% { background: rgba(0, 147, 142, .35); } }
.tile.pop .chara-svg { animation: pop .26s cubic-bezier(.3,.6,.4,1) forwards; }
@keyframes pop { 35% { transform: scale(1.3) rotate(-6deg); } to { transform: scale(0) rotate(10deg); opacity: 0; } }
.game-pop { position: absolute; left: 50%; top: 42%; z-index: 3; transform: translate(-50%, -50%); color: #fff; font-size: clamp(1.1rem, 4.5vw, 1.8rem); white-space: nowrap; pointer-events: none; text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink); animation: float-up .9s cubic-bezier(.2,.7,.3,1) forwards; }
/* レベルアップ: 盤面の上に大きく出す */
.game-level { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; pointer-events: none; color: #fff; background: rgba(27, 22, 48, .55); text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink); animation: level-in .45s cubic-bezier(.2,.9,.3,1.2) both; }
.game-level p { margin: 0; }
.game-level-title { color: var(--gold); font-size: clamp(2.2rem, 11vw, 4rem); line-height: 1.1; }
.game-level-new { display: flex; align-items: center; gap: 8px; font-size: clamp(1rem, 4.5vw, 1.4rem); }
.game-level-new .chara-svg { width: clamp(44px, 14vw, 72px); }
.game-level-note { font-size: clamp(.85rem, 3.6vw, 1.05rem); }
.game-level.out { animation: level-out .3s ease-out forwards; }
@keyframes level-in { from { opacity: 0; transform: scale(1.4); } to { opacity: 1; transform: none; } }
@keyframes level-out { to { opacity: 0; } }
.game-pop.big { color: var(--gold); font-size: clamp(1.5rem, 6vw, 2.6rem); }
@keyframes float-up { from { transform: translate(-50%, -50%) scale(.6); } 18% { transform: translate(-50%, -50%) scale(1.12); } 30% { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(-50%, calc(-50% - 48px)); opacity: 0; } }
.game-over { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 16px; background: rgba(27, 22, 48, .86); color: #fff; text-align: center; }
.game-over[hidden] { display: none; }
.game-over p { margin: 4px 0; }
.game-over .go-title { font-size: clamp(1.5rem, 6vw, 2.4rem); color: var(--gold); text-shadow: 3px 3px 0 var(--red); }
.game-over .go-score { font-size: clamp(2rem, 9vw, 3.4rem); }
.game-over .go-score small { font-size: .45em; margin-left: 4px; }
.game-over .go-note { font-size: .85rem; color: #d8cfe6; margin-bottom: 12px; }
.game-over .btn { color: var(--ink); cursor: pointer; border: 0; }
.game-over .btn.primary { color: #fff; }
.game-quota { list-style: none; display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: clamp(4px, 1.5vw, 8px); margin: 18px 4px 0; padding: 0; }
.game-quota li { position: relative; padding: 4px 2px 6px; background: #fff; box-shadow: var(--frame); text-align: center; }
.game-quota li.done { background: #fff1b8; }
.game-quota .chara-svg { width: 80%; margin: auto; }
.game-quota .bob, .game-quota .eye { animation: none; }
.game-quota b { display: block; font-weight: normal; font-size: clamp(.6rem, 2.4vw, .85rem); }
.game-quota i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--teal); }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile.sel .chara-svg, .tile.hint, .nk.hint, .pr.hint { animation: none; } .nikaku-game .game-time i { transition: none; } }

/* 二角取り */
.nk-board { position: relative; z-index: 0; width: min(100%, 620px); margin: 0 auto 14px; background: #f3e6cc; box-shadow: var(--frame); }
.nk { position: absolute; cursor: pointer; }
.nk.sel .face { background: #fff1b8; }
.nk.sel { outline: 3px solid var(--red); outline-offset: -1px; z-index: 2; }
.nk.gone { z-index: 3; }
.nk.hint { animation: hint 1s ease-in-out infinite; }
.nk.hint .face { background: #c9f0e6; }
.nk-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.nk-line polyline { fill: none; stroke: var(--red); stroke-width: .14; stroke-linejoin: miter; stroke-dasharray: 1 1; }
.nikaku-game .game-time { margin-top: 14px; }
.game-back { display: inline-block; margin-bottom: 12px; font-size: .95rem; }
.game-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 28px; margin-top: 24px; }
.game-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px; background: #fff; text-decoration: none; box-shadow: var(--frame), var(--drop); }
.game-card:hover { background: #fff8d6; }
.game-card-art { display: flex; gap: 6px; width: 100%; padding: 12px; background: repeating-conic-gradient(#fff3df 0 25%, #ffe6c2 0 50%) 0 0 / 24px 24px; box-shadow: inset 0 0 0 2px var(--line); }
.game-card-art .chara-svg { width: calc(33.3% - 4px); }
.game-card strong { font-size: 1.5rem; font-weight: normal; }
.game-card-text { color: var(--sub); line-height: 1.7; }
.game-card .btn { margin: 6px 0 0; }

/* 3つ集めるパズル */
.tile-area { position: relative; min-height: 440px; padding: 8px 4px 0; }
.tile-area.menu { min-height: 680px; }
.tile-area .game-over { overflow-y: auto; justify-content: safe center; }
.tile-wrap { display: flex; justify-content: center; padding: 6px 0 14px; }
.tile-board { position: relative; z-index: 0; }
/* 麻雀パイ: 緑の背、象牙色の側面、白い表面を重ねて、右下に厚みを見せる。角は丸く */
.pai { position: absolute; display: block; padding: 0; border: 0; border-radius: 18% / 14%; font: inherit; background: #1f7a52; box-shadow: inset 0 0 0 2px var(--line), inset 3px 3px 0 0 #2f9a68; }
.pai::before { content: ''; position: absolute; left: 0; top: 0; right: 9%; bottom: 7%; border-radius: inherit; background: #e6d4ac; box-shadow: inset 0 0 0 2px var(--line); }
.pai .face { position: absolute; left: 0; top: 0; right: 15%; bottom: 12%; border-radius: inherit; display: flex; align-items: center; justify-content: center; background: #fffaf0; box-shadow: inset 0 0 0 2px var(--line), inset -3px -3px 0 0 #efe2c4; }
.pai .chara-svg { width: 92%; height: auto; }
/* 二角取りとペアくずしは、パイいっぱいに絵柄を描く */
.nk .face, .pr .face { padding: 1px; }
.nk .chara-svg, .pr .chara-svg { width: 100%; }
.pai .bob, .pai .eye { animation: none; }
.tt { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; transition: transform .12s ease-out; }
.tt .face { transition: background-color .18s ease-out; }
.tt .chara-svg { display: block; transition: filter .18s ease-out; -webkit-user-drag: none; }
.tt:not(.blocked):active { transform: translateY(2px) scale(.97); }
.tt.blocked { cursor: default; }
.tt.blocked .face { background: #b9ad97; box-shadow: inset 0 0 0 2px var(--line), inset -3px -3px 0 0 #a89c86; }
.tt.blocked .chara-svg { filter: brightness(.6) saturate(.5); }
.tt.blocked .face.back { background: #2f9a68; box-shadow: inset 0 0 0 2px var(--line), inset 0 0 0 5px #2f9a68, inset 0 0 0 7px #24855a; }
.tt:not(.blocked):hover .face { background: #fff1b8; }
/* ペアくずし: 段ごとに影を落とし、下の段ほど表面を暗くして、高さを見せる */
.pr { filter: drop-shadow(3px 4px 0 rgba(43, 26, 36, .4)); }
.pr.z0:not(.blocked) .face { background: #f1e6cf; }
.pr.z1:not(.blocked) .face { background: #f8f0de; }
.pr.z0.blocked .face { background: #9d927d; }
.pr.z1.blocked .face { background: #ab9f89; }
.pr-h { position: absolute; left: 9%; top: 6%; display: flex; gap: 2px; pointer-events: none; }
.pr-h b { width: 5px; height: 5px; background: #e0562f; box-shadow: 0 0 0 1px var(--line); }
.pr.blocked .pr-h b { background: #8a6a5a; }
.pr:not(.blocked):hover .face, .pr.sel:not(.blocked) .face { background: #fff1b8; }
.pr.sel { outline: 3px solid var(--red); outline-offset: -2px; }
.pr.hint { animation: hint 1s ease-in-out infinite; }
.pr.hint:not(.blocked) .face { background: #c9f0e6; }
.pai.flying { position: fixed; z-index: 50; pointer-events: none; transform-origin: 0 0; will-change: transform; }
.tray { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 8px; margin: 0 auto; max-width: 440px; background: #6b4a3a; box-shadow: var(--frame), var(--drop); }
.slot { aspect-ratio: 1 / 1.3; background: #4d3429; }
.tray-tile { position: relative; width: 100%; height: 100%; }
.tray-tile.fly { visibility: hidden; }
.tray-tile.pop, .pop-ghost { animation: pop-tile .26s cubic-bezier(.3,.6,.4,1) forwards; }
.pop-ghost { z-index: 49; pointer-events: none; }
@keyframes pop-tile { 35% { transform: scale(1.22) rotate(-4deg); } to { transform: scale(0) rotate(8deg); opacity: 0; } }
.tile-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 14px 0 0; }
.tile-tools .btn { cursor: pointer; border: 0; font-size: .9rem; padding: 6px 14px; }
.tile-tools .btn:disabled { opacity: .45; cursor: default; }
.stage-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: min(100%, 420px); margin-top: 6px; }
.stage-btn { padding: 6px 2px; border: 0; font: inherit; color: var(--ink); background: #fff; cursor: pointer; box-shadow: var(--frame), inset -3px -3px 0 0 #d9c8b4; }
.stage-btn b { display: block; font-size: 1.3rem; font-weight: normal; }
.stage-btn small { display: block; font-size: .62rem; white-space: nowrap; }
.stage-btn.cleared { background: var(--gold); }
.stage-btn:disabled { background: #6d6378; color: #b8afc4; cursor: default; box-shadow: var(--frame); }

@media (max-width: 760px) {
  .detail, .detail-sub { grid-template-columns: minmax(0, 1fr); }
  .site-header { flex-wrap: wrap; padding-block: 8px; }
  .logo { width: 120px; }
  .site-header nav { flex-wrap: wrap; row-gap: 2px; }
  .site-header nav a { font-size: .86rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .parade { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .card { padding: 10px; }
  .card-name { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) { .tray-tile.pop { animation-duration: .01s; } .tt, .tt .face, .tt .chara-svg { transition: none; } }

/* タロリオ劇場 */
.manga-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.manga-filter button { font: inherit; font-size: .9rem; padding: 4px 12px; margin: 4px; border: 0; background: #fff; color: var(--ink); cursor: pointer; box-shadow: var(--frame); }
.manga-filter button.on { background: var(--ink); color: #fff; }
.manga-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 26px 22px; margin-top: 24px; }
.manga-card { display: flex; flex-direction: column; margin: 4px; background: #fff; text-decoration: none; box-shadow: var(--frame), var(--drop); }
.manga-card[hidden] { display: none; }
.manga-card:hover { background: #fff8d6; }
.manga-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-bottom: 4px solid var(--line); }
.manga-card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 16px; }
.manga-card strong { font-size: 1.15rem; font-weight: normal; }
.manga-card-text { color: var(--sub); font-size: .88rem; line-height: 1.6; }
.manga-title { margin-top: 10px; font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
.manga-pages { display: grid; gap: 18px; margin: 24px 4px 0; }
.manga-pages img { display: block; width: 100%; height: auto; box-shadow: var(--frame), var(--drop); }
.manga-sum { margin: 26px 4px 0; padding: 14px 18px; background: #fff; box-shadow: var(--frame); line-height: 1.7; }

/* トップの劇場・ゲーム */
.home-feature-lead { margin: -8px 0 0; color: var(--sub); }
.home-feature .manga-list { margin-top: 18px; }
.home-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 22px 18px; margin-top: 18px; }
.home-game { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 4px; padding: 12px; background: #fff; text-decoration: none; box-shadow: var(--frame), var(--drop); }
.home-game:hover { background: #fff8d6; }
.home-game .game-card-art { padding: 8px; }
.home-game strong { font-size: 1.05rem; font-weight: normal; }
@media (max-width: 520px) {
  .home-feature .manga-list, .home-games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .home-feature .manga-card-text { display: none; }
  .home-feature .manga-card-body { padding: 8px 10px 10px; }
  .home-feature .manga-card strong, .home-game strong { font-size: .9rem; }
  .home-game { padding: 8px; }
  .home-game .game-card-art { padding: 4px; }
}

/* フリー素材: 人物・体の部位などのまとまり */
.sozai-group { padding-top: 8px; border-top: 4px dotted #d8c7b2; }
.sozai-group-lead { margin: 0 0 10px; color: var(--sub); }
.sozai-edu { margin: 0 0 12px; padding: 8px 12px; background: #fff3d6; box-shadow: var(--frame); font-size: .9rem; }
.sozai-group > .btn { margin: 0 4px 16px; }

/* 全画面であそぶ（js/full.js）。ゲームの部分を画面に固定して重ね、幅は full.js が高さに合わせて決める */
.play-full-entry { margin: 0 0 4px; text-align: center; }
.play-full-entry { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.play-full-entry .btn { cursor: pointer; border: 0; margin: 0; }
html.play-full, html.play-full body { overflow: hidden; overscroll-behavior: none; }
.game.full { position: fixed; inset: 0; z-index: 1000; max-width: none; margin: 0; padding: calc(40px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; background: var(--paper); }
.game.full .shoot-wrap, .game.full .ys-wrap, .game.full .fy-wrap, .game.full .run-stage { width: 100%; max-width: none; }
.game.full .game-hud { gap: 6px; }
.game.full .game-hud div { padding: 2px 4px; }
.game.full .game-hud span { font-size: .65rem; }
.game.full .game-hud strong { font-size: 1rem !important; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.game.full .shoot-pad { margin-top: 8px; }
.game.full .shoot-pad .btn { padding: 8px 4px; white-space: nowrap; font-size: .9rem; }
.game.full > :first-child { margin-top: 0 !important; }
.play-full-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1001; display: flex; justify-content: flex-end; align-items: center; height: calc(40px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0; background: var(--paper); }
.play-full-bar .btn { cursor: pointer; border: 0; margin: 0; padding: 4px 12px; font-size: .85rem; }

/* ホーム画面に追加（js/install.js）。ホーム画面のアイコンから開いているときはボタンを出さない */
.install-btn { cursor: pointer; border: 0; margin: 0; }
html.standalone .install-btn, html.standalone .install-row { display: none; }
.install-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 18px 0 0; }
.install-row span { font-size: .9rem; color: var(--sub); }
.install-help { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(27, 22, 48, .6); }
.install-box { width: min(100%, 420px); max-height: 100%; overflow-y: auto; padding: 18px 20px; background: #fff; box-shadow: var(--frame), var(--drop); }
.install-title { margin: 0 0 8px; font-size: 1.2rem; }
.install-box ol { margin: 0; padding-left: 1.4em; line-height: 1.7; }
.install-box li { margin: 6px 0; }
.install-box small { color: var(--sub); }
.install-share { display: inline-block; padding: 0 4px; border: 2px solid var(--ink); line-height: 1.1; }
.install-note { font-size: .9rem; line-height: 1.7; margin: 12px 0; }
.install-box .btn { cursor: pointer; border: 0; margin: 0; }

/* ゲームの中は、連打や長押しで文字の選択・コピーのメニュー・拡大が出ないようにする（iPhone） */
.game, .play-full-bar { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.game button, .game canvas, .play-full-bar button { touch-action: manipulation; }
