/* ドパガキ観察日記 — 縦画面優先。ドアの外から部屋を見守る視点で統一（幅320pxから） */
:root {
  --ink: #2a2440; --muted: #6a6480; --paper: #fbf7f0; --line: #e6dccb; --wood: #5a4030; --wood2: #3e2a20;
  --yu: #e8604c; --you: #3d6fd0; --gold: #f2a03d; --night: #2a2440;
  --font: "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --pop: cubic-bezier(.2, 1.3, .4, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--night); min-height: 100vh; overflow-x: hidden; background-image: radial-gradient(rgba(255, 255, 255, .06) 1.5px, transparent 1.5px); background-size: 24px 24px; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, textarea:focus-visible, input:focus-visible, .hot:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.app { position: relative; max-width: 720px; margin: 0 auto; min-height: 100vh; min-height: 100svh; background: var(--paper); overflow-x: hidden; box-shadow: 0 0 60px rgba(0, 0, 0, .45); }
.screen { display: none; }
.screen.is-active { display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 16px; font-weight: 800; font-size: 16px; line-height: 1.3; text-align: center; transition: transform .12s; }
.btn:active { transform: translateY(2px); }
.btn-main { background: var(--ink); color: #fff; box-shadow: 0 5px 0 #120f20; }
.btn-sub { background: #fff; color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.btn-x { background: #000; color: #fff; box-shadow: 0 4px 0 #555; }
.btn-text { min-height: 44px; padding: 0 12px; border: 0; background: none; font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.fine { margin: 0; padding: 14px 18px 22px; text-align: center; font-size: 12px; line-height: 1.7; color: var(--muted); }
.pop { animation: pop .4s var(--pop) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.in { animation: inUp .35s ease both; }
@keyframes inUp { from { transform: translateY(10px); opacity: 0; } }

/* ---------- 部屋（ドアの外から） ---------- */
.doorway { position: relative; height: 100%; aspect-ratio: 360 / 420; max-width: 100%; margin: 0 auto; overflow: hidden; border-radius: 6px 6px 0 0; }
.doorway > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.frame { position: absolute; inset: 0; pointer-events: none; }
.frame .fl, .frame .fr { position: absolute; top: 0; bottom: 0; width: 6%; background: linear-gradient(90deg, var(--wood2), var(--wood)); box-shadow: inset -4px 0 8px rgba(0, 0, 0, .35); }
.frame .fl { left: 0; } .frame .fr { right: 0; transform: scaleX(-1); }
.frame .ft { position: absolute; left: 0; right: 0; top: 0; height: 4%; background: linear-gradient(var(--wood2), var(--wood)); }
.frame:after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 75% at 55% 55%, transparent 60%, rgba(20, 14, 30, .35)); }
.dpanel { position: absolute; top: 4%; bottom: 0; left: 6%; width: 0; background: linear-gradient(90deg, #8a6446, #7a5638); box-shadow: 6px 0 14px rgba(0, 0, 0, .35); transition: width .9s cubic-bezier(.6, 0, .3, 1); overflow: hidden; }
.doorway.closing .dpanel { animation: closeOpen 1.3s ease both; }
@keyframes closeOpen { 0% { width: 0; } 40%, 60% { width: 80%; } 100% { width: 0; } }
.doorway.closed .dpanel { width: 82%; }
.doorway.slam .dpanel { width: 70%; transition-duration: .25s; }
.note-st { position: absolute; left: 50%; top: 40%; transform: translateX(-50%) rotate(-4deg); width: 70%; padding: 12px 10px; background: #fff38a; color: #4a3a20; font-size: clamp(12px, 3.6vw, 15px); font-weight: 800; line-height: 1.5; text-align: center; box-shadow: 3px 4px 0 rgba(0, 0, 0, .2); }
.hot { cursor: pointer; transition: filter .2s; }
.hot:hover { filter: brightness(1.12) drop-shadow(0 0 4px #fff); }
.hot.seen { animation: seen .6s var(--pop); transform-box: fill-box; transform-origin: center; }
@keyframes seen { 40% { transform: scale(1.12); } }

/* 窓・おやつ */
#curL, #curR { transform-box: fill-box; transition: transform 1s ease; }
#curL { transform-origin: left top; } #curR { transform-origin: right top; }
#window.open #curL { transform: scaleX(.55) skewX(4deg); animation: sway 3s ease-in-out infinite alternate; }
#window.open #curR { transform: scaleX(.55) skewX(-4deg); animation: sway 3.4s ease-in-out infinite alternate; }
@keyframes sway { to { transform: scaleX(.62) skewX(-6deg); } }
#window.open #breeze { opacity: .8; animation: breeze 2.4s linear infinite; }
@keyframes breeze { from { transform: translateX(-20px); opacity: 0; } 40% { opacity: .8; } to { transform: translateX(30px); opacity: 0; } }
#snack { transition: opacity .6s, transform .6s var(--pop); transform: translateY(-20px); }
#snack.on { opacity: 1 !important; transform: none; }
#cookies { transition: opacity .6s; }
#cookies.eaten { opacity: .15; }
#stars circle { animation: twinkle 3s ease-in-out infinite alternate; }
#stars circle:nth-child(3n) { animation-delay: 1s; } #stars circle:nth-child(3n+1) { animation-delay: 2s; }
@keyframes twinkle { to { opacity: .3; } }
#sky1, #sky2, #wall, #cel, #dark, #lampglow, #stars { transition: all 1.4s ease; }
#hh, #mh { transition: transform 1.2s ease; }
#ndot.ping { animation: ndot 2s ease; }
@keyframes ndot { 10%, 80% { opacity: 1; transform: scale(1.4); } 100% { opacity: 0; } }

/* ---------- ユウの姿勢（持続） ---------- */
#kid *, #kid { transform-box: view-box; }
#head, #kid-body, #pup, #phone, #armR, #buds, #hoodup, #press, #hair { transition: transform .7s var(--pop), opacity .5s; }
#head { transform-origin: 210px 236px; }
#phone { transform-origin: 212px 290px; transform: rotate(-8deg); }
#kid-body { transform-origin: 210px 320px; }
#armR { transform-origin: 246px 270px; }
#pglow { transition: opacity .8s; }
.k-phone #head { transform: rotate(5deg) translateY(4px); }
.k-phone #pup { transform: translate(1px, 4px); }
.k-phone #thumb, .k-turned #thumb, .k-deep #thumb { animation: scroll 1.1s ease-in-out infinite; }
@keyframes scroll { 0%, 100% { transform: translateY(5px); } 50% { transform: translateY(-6px); } }
.k-up #head { transform: rotate(-2deg) translateY(-2px); }
.k-up #pup { transform: translate(0, 0); }
.k-up #phone { transform: translate(-4px, 14px) rotate(-14deg); }
.k-up #buds, .k-together #buds, .k-rest #buds { opacity: 0; }
.k-turned #kid-body { transform: translateX(24px) rotate(8deg); }
.k-turned #head { transform: rotate(16deg) translate(6px, 4px); }
.k-turned #pup { transform: translate(4px, 4px); }
.k-deep #kid-body { transform: translateX(28px) rotate(10deg); }
.k-deep #head { transform: rotate(18deg) translate(6px, 6px); }
.k-deep #pup { transform: translate(4px, 5px); }
.k-deep #hoodup, .k-deep #press { opacity: 1 !important; }
.k-window #head { transform: rotate(-10deg) translate(4px, -2px); }
.k-window #pup { transform: translate(5px, -3px); }
.k-together #phone { transform: translate(-6px, -6px) rotate(8deg) scale(1.35); transform-origin: 212px 290px; }
.k-together #head { transform: rotate(-4deg); }
.k-together #pup { transform: translate(-1px, 2px); }
.k-stand #kid-body { transform: translateY(-24px); }
.k-stand #phone { opacity: 0; }
.k-stand #head { transform: rotate(-3deg); }
.k-rest #phone { transform: translate(78px, 38px) rotate(84deg); transform-origin: 212px 290px; }
.k-rest #head { transform: rotate(-8deg) translateY(-3px); }
.k-rest #pup { transform: translate(0, 1px); }

/* ---------- 一瞬の動き ---------- */
.fx-freeze #thumb { animation: none !important; }
.fx-freeze #pup { animation: jitter .9s ease; }
@keyframes jitter { 20% { transform: translate(-3px, 1px); } 40% { transform: translate(2px, 0); } 60% { transform: translate(-1px, 2px); } }
.fx-glance #pup { animation: glance 1.4s ease; }
@keyframes glance { 20%, 60% { transform: translate(0, -1px); } }
.fx-flinch #kid-body { animation: flinch .5s ease; }
@keyframes flinch { 30% { transform: translateX(14px) rotate(4deg); } }
.fx-reach #armR { animation: reach 2.2s ease .6s; }
@keyframes reach { 30%, 55% { transform: rotate(-40deg) translate(16px, 26px); } }
.fx-bounce #head { animation: bounceH .7s var(--pop); }
@keyframes bounceH { 40% { transform: translateY(-10px) rotate(-3deg); } }
.fx-bud #budR { animation: bud .8s ease forwards; }
@keyframes bud { to { transform: translate(26px, -10px); opacity: 0; } }
.fx-glow #scr { animation: glowP 1.2s ease; }
@keyframes glowP { 40% { fill: #ffffff; } }
.fx-glow ~ #pglow { animation: glowO 1.4s ease; }
@keyframes glowO { 40% { opacity: .95; transform: scale(1.12); } }
#pglow { transform-box: fill-box; transform-origin: center; }
.fx-take ~ #hand { animation: hand 1.2s ease; }
@keyframes hand { 0% { opacity: 0; transform: translateY(60px); } 40%, 70% { opacity: 1; transform: translateY(-14px); } 100% { opacity: 0; transform: translateY(60px); } }

/* ---------- タイトル ---------- */
#s-title.is-active { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.t-art { height: clamp(250px, 46svh, 420px); padding: 14px 14px 0; background: var(--night); display: flex; justify-content: center; }
.t-art .doorway { animation: inUp .8s ease both; }
.t-copy { padding: 16px 18px 0; text-align: center; }
.brand { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.t-title { margin: 0; line-height: 1.1; }
.t-title .t1 { display: block; white-space: nowrap; font-size: clamp(30px, 9.6vw, 60px); font-weight: 900; letter-spacing: -.01em; color: var(--ink); text-shadow: 3px 3px 0 #ffd7a6; animation: titleIn .8s .1s var(--pop) both; }
.t-title .t2 { display: inline-block; margin-top: 8px; font-size: clamp(16px, 5vw, 24px); font-weight: 800; color: var(--yu); animation: titleIn .8s .3s var(--pop) both; }
@keyframes titleIn { from { transform: translateY(20px); opacity: 0; } }
.t-hook { margin: 12px 0 0; font-size: 14.5px; line-height: 1.8; font-weight: 700; }
@media (max-width: 360px) { .t-hook { font-size: 13px; } }
.t-actions { display: grid; justify-items: center; gap: 6px; padding: 14px 18px 4px; }
.t-actions .btn-main { width: min(100%, 340px); min-height: 58px; font-size: 18px; }
.t-row { display: flex; gap: 8px; }
.t-meta, .t-seen { margin: 0; font-size: 12.5px; color: var(--muted); }
.t-seen { color: var(--yu); font-weight: 800; }

/* ---------- 観察画面 ---------- */
#s-play.is-active { display: flex; flex-direction: column; height: 100vh; height: 100svh; min-height: 480px; background: var(--night); }
.bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px 6px 12px; padding-top: max(6px, env(safe-area-inset-top)); color: #fff; }
.bar-l { margin: 0; display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; }
.bar-l b { overflow: hidden; text-overflow: ellipsis; }
.clock { font-size: 18px; font-weight: 900; color: #ffd7a6; font-variant-numeric: tabular-nums; }
.bar-r { display: flex; gap: 4px; flex: none; }
.hb { min-width: 44px; min-height: 44px; border: 2px solid rgba(255, 255, 255, .25); border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 17px; display: grid; place-items: center; }
.scene { position: relative; flex: 1 1 auto; min-height: 230px; padding: 0 8px; display: flex; justify-content: center; overflow: hidden; cursor: pointer; }
.bub { position: absolute; z-index: 5; left: 50%; max-width: min(78%, 330px); padding: 8px 12px; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); font-size: 13.5px; font-weight: 800; line-height: 1.5; pointer-events: none; }
.sbub { top: 6%; transform: translateX(-30%); border: 3px solid var(--yu); }
.sbub:after { content: ''; position: absolute; left: 30%; bottom: -12px; border: 8px solid transparent; border-top-color: var(--yu); }
.nbub { top: auto; bottom: 3%; transform: translateX(-42%); background: #1d2233; color: #e8f4ff; border: 2px solid #7fc4ff; }
.nbub b { display: block; font-size: 11.5px; color: #7fc4ff; }
.nbub em { display: block; margin-top: 4px; font-style: normal; font-size: 11.5px; color: #ffd7a6; }
.nbub em.blur { color: #9aa3b8; }
.nbub:not(.read) { filter: blur(.2px); opacity: .92; }
.chap { position: absolute; inset: 0; z-index: 8; display: grid; place-content: center; text-align: center; background: rgba(20, 14, 30, .78); color: #fff; padding: 20px; }
.chap.run { animation: chap 1.9s ease both; }
@keyframes chap { 0% { opacity: 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; } }
.c-t { margin: 0; font-size: clamp(22px, 7vw, 32px); font-weight: 900; letter-spacing: .04em; }
.c-s { margin: 8px 0 0; font-size: 14px; color: #ffd7a6; }
.panel { position: relative; flex: none; padding: 10px 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); background: var(--paper); border-radius: 18px 18px 0 0; min-height: 150px; }
.line { position: relative; min-height: 112px; padding: 4px 4px 18px; cursor: pointer; }
.l-who { margin: 0 0 4px; display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 13px; font-weight: 900; color: #fff; }
.l-who:empty { display: none; }
.w-yu .l-who { background: var(--yu); } .w-you .l-who { background: var(--you); }
.l-txt { margin: 0; font-size: 16.5px; line-height: 1.8; font-weight: 700; overflow-wrap: anywhere; }
.w-sys .l-txt { color: #4a4460; font-weight: 600; }
.w-you .l-txt { color: #2d4f99; }
.l-next { position: absolute; right: 8px; bottom: 2px; color: var(--yu); font-size: 13px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.acts-q { margin: 0 0 8px; font-size: 14px; font-weight: 900; line-height: 1.6; }
.acts-q span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.acts-q .clue { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: #efe6ff; color: #6a4fc0; font-size: 12px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.card { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 64px; padding: 6px 2px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; box-shadow: 0 3px 0 var(--ink); transition: transform .12s, background .2s; }
.card:hover { background: #fff6e6; }
.card:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.ci { font-size: 22px; line-height: 1; }
.cl { font-size: 12px; font-weight: 800; line-height: 1.3; text-align: center; }
.card.warn { border-color: #b8433a; box-shadow: 0 3px 0 #b8433a; }
.acts.in .card { animation: cardIn .35s calc(var(--i, 0) * .03s) var(--pop) both; }
@keyframes cardIn { from { transform: translateY(12px); opacity: 0; } }
.subs { position: absolute; left: 10px; right: 10px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 4; display: grid; gap: 6px; padding: 12px; border-radius: 16px; background: #fff; border: 2px solid var(--ink); box-shadow: 0 -6px 24px rgba(0, 0, 0, .18); }
.subs-h { margin: 0; font-weight: 900; font-size: 14px; }
.sub { min-height: 46px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; text-align: left; font-size: 14.5px; font-weight: 800; }
.sub:hover { background: #fff6e6; }
.sub.cancel { border-style: dashed; color: var(--muted); text-align: center; }
@media (min-width: 560px) { .cl { font-size: 13px; } .card { min-height: 70px; } .l-txt { font-size: 17.5px; } }
@media (max-height: 620px) { .panel { min-height: 0; } .line { min-height: 92px; } .l-txt { font-size: 15px; line-height: 1.7; } .card { min-height: 56px; } .ci { font-size: 19px; } }

/* ---------- 結末の大きな演出 ---------- */
.endfx { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.scene:before { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 1.4s; }
.end-talk:before, .end-nickname:before { opacity: 1; background: radial-gradient(ellipse at 55% 45%, rgba(255, 200, 120, .35), transparent 70%); }
.end-clash:before { opacity: 1; background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(180, 40, 40, .35)); }
.end-together:before { opacity: 1; background: radial-gradient(ellipse at 55% 60%, rgba(140, 200, 255, .45), transparent 70%); }
.end-boundary:before { opacity: 1; background: linear-gradient(rgba(10, 14, 40, .1), rgba(10, 14, 40, .35)); }
.bigphone { position: absolute; left: 50%; top: 50%; width: min(60%, 240px); padding: 30px 16px 40px; border-radius: 28px; background: #1d2233; border: 6px solid #0f1220; color: #fff; text-align: center; transform: translate(-50%, -50%); box-shadow: 0 0 60px rgba(127, 196, 255, .6); }
.endfx.go .bigphone { animation: phoneZoom 1.4s var(--pop) both; }
@keyframes phoneZoom { from { transform: translate(-50%, 40%) scale(.3); opacity: 0; } }
.bp-app { margin: 0; font-size: 13px; color: #7fc4ff; font-weight: 800; } .bp-t { margin: 8px 0; font-size: 22px; font-weight: 900; } .bp-time { margin: 0; font-size: 12px; color: #9aa3b8; }
.sparks i, .stars2 i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #bfe6ff; left: calc(10% + (var(--n, 0) * 1%)); }
.sparks i:nth-child(odd), .stars2 i:nth-child(odd) { background: #ffd7a6; }
.endfx.go .sparks i { animation: spark 2.4s ease-out both; }
@keyframes spark { from { transform: translate(0, 0) scale(.4); opacity: 0; } 30% { opacity: 1; } to { transform: translate(var(--dx, 0), var(--dy, -120px)) scale(1); opacity: 0; } }
.endfx.go .stars2 i { animation: star2 3s ease both; }
@keyframes star2 { from { opacity: 0; } 50% { opacity: 1; } to { opacity: .6; } }

/* ---------- 観察日記（結果） ---------- */
#s-result { --ec: var(--gold); padding: 18px 0 10px; background: linear-gradient(180deg, var(--night) 0, var(--night) 210px, var(--paper) 210px); }
.diary { position: relative; margin: 0 14px; padding: 20px 18px 14px; border-radius: 6px; background: #fffdf6; background-image: repeating-linear-gradient(#fffdf6 0 31px, #ece2cf 31px 32px); box-shadow: 0 14px 30px rgba(0, 0, 0, .25); text-align: center; }
.diary:before { content: ''; position: absolute; top: -10px; left: 50%; width: 110px; height: 24px; margin-left: -55px; background: rgba(255, 215, 166, .85); transform: rotate(-2deg); }
.diary.in { animation: diaryIn .8s var(--pop) both; }
@keyframes diaryIn { from { transform: translateY(40px) rotate(-3deg); opacity: 0; } }
.d-k { margin: 6px 0 0; font-size: 12.5px; font-weight: 900; letter-spacing: .1em; color: var(--muted); }
.d-face { width: 150px; height: 140px; margin: 10px auto 0; border-radius: 50%; overflow: hidden; border: 5px solid var(--ec); background: #fff; }
.d-face svg { width: 100%; height: 100%; display: block; }
.d-quote { margin: 12px 0 0; font-size: 17px; font-weight: 900; line-height: 1.6; color: var(--ink); }
.d-list { margin: 14px 0 0; display: grid; gap: 8px; text-align: left; }
.d-list div { padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .85); border-left: 6px solid var(--ec); }
.d-list dt { font-size: 12px; font-weight: 800; color: var(--muted); }
.d-list dd { margin: 2px 0 0; font-size: 16px; font-weight: 900; line-height: 1.5; outline: 0; }
.d-list .end { background: var(--ec); border-color: var(--ink); }
.d-list .end dt { color: rgba(255, 255, 255, .85); } .d-list .end dd { color: #fff; font-size: 18px; }
.d-foot { margin: 12px 0 0; font-size: 11px; font-weight: 800; color: var(--muted); }
.note { margin: 14px 18px 0; padding: 10px 12px; border-radius: 12px; background: #efeaf6; font-size: 12.5px; line-height: 1.7; font-weight: 700; text-align: center; }
.block { margin: 14px 14px 0; padding: 16px; border-radius: 18px; background: #fff; border: 2px solid var(--line); }
.block h3 { margin: 0 0 8px; font-size: 17px; font-weight: 900; }
.block p { margin: 0; font-size: 14.5px; line-height: 1.8; }
.steps { margin: 10px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.steps li { padding: 6px 8px; border-radius: 10px; background: #f6f1e8; font-size: 12.5px; font-weight: 800; }
.steps li span { display: block; font-size: 11px; color: var(--muted); }
.tpl { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 800; }
.chip.is-on { background: var(--ink); color: #fff; }
.share-label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
textarea { width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; font: inherit; font-size: 15px; line-height: 1.6; resize: vertical; }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.share-btns .btn { padding: 0 8px; font-size: 14.5px; }
@media (max-width: 360px) { .share-btns { grid-template-columns: 1fr; } }
.help { margin-top: 10px !important; font-size: 12.5px !important; color: var(--muted); line-height: 1.6 !important; }
.r-actions { display: grid; justify-items: center; gap: 8px; margin: 20px 14px 0; }
.r-actions .btn { width: min(100%, 360px); }
.hint { margin: 0; max-width: 420px; padding: 8px 12px; border-radius: 12px; background: #fff3df; font-size: 13px; font-weight: 700; line-height: 1.6; text-align: center; }

/* ダイアログ */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 14px; background: rgba(20, 14, 30, .7); }
.modal.m-in .m-box { animation: pop .35s var(--pop) both; }
.m-box { width: min(100%, 480px); max-height: calc(100svh - 28px); overflow-y: auto; padding: 20px 18px; background: var(--paper); border-radius: 20px; border: 3px solid var(--ink); }
.m-small { width: min(100%, 360px); text-align: center; }
.m-box h2 { margin: 0 0 10px; font-size: 20px; font-weight: 900; }
.m-note { margin: 8px 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.m-close { margin-top: 14px; width: 100%; }
.m-btns { display: grid; gap: 4px; }
.set { margin: 0 0 12px; padding: 12px; border: 2px solid var(--line); border-radius: 12px; }
.set legend { padding: 0 6px; font-weight: 900; }
.sw { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; }
.sw input { width: 24px; height: 24px; accent-color: var(--yu); }
.vol { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; }
.vol input { flex: 1; accent-color: var(--yu); min-height: 32px; }
.al-h { margin: 12px 0 6px; font-size: 15px; }
.album { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.album li { padding: 8px 12px; border-radius: 10px; background: #efecf3; border-left: 6px solid #c9c3d6; font-size: 13px; line-height: 1.5; }
.album li.got { background: #fff; border-left-color: var(--c); }
.album li b { display: block; font-size: 14px; } .album li span { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; margin: 0; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; transform: translate(-50%, 200%); opacity: 0; pointer-events: none; }
.toast.show { animation: toast 2.4s ease both; }
@keyframes toast { 10%, 85% { transform: translate(-50%, 0); opacity: 1; } }
.nojs { padding: 20px; text-align: center; background: #fff; }

/* 動きを減らす */
html.rm *, html.rm *:before, html.rm *:after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
@media (max-width: 360px) { .bar-l .cn { display: none; } .bar-l { font-size: 12.5px; gap: 8px; } }

/* ===================== v2：拡張ぶんのデザインと動き ===================== */
.hot.locked { display: none; }
/* 姿勢の追加 */
.k-hype #kid-body { transform: translateY(-6px) rotate(-6deg); }
.k-hype #head { transform: rotate(-10deg) translateY(-6px); }
.k-hype #armR { transform: rotate(-70deg) translate(6px, -10px); }
.k-hype #pup { transform: translate(-1px, -2px); }
.k-upside #kid { transform: none; }
.k-upside #kid-body { transform: translate(40px, 30px) rotate(-96deg); transform-origin: 210px 300px; }
.k-upside #pup { transform: translate(2px, 2px); }
/* 一瞬の動き（意味のある反応） */
.fx-eyesOnly #pup { animation: eyesOnly 1.6s ease; }
@keyframes eyesOnly { 15%, 70% { transform: translate(-3px, -2px); } }
.fx-budOne #budL { animation: budOne 1.8s ease; }
@keyframes budOne { 30%, 75% { transform: translate(-16px, 10px); } }
.fx-hype #kid-body { animation: hypeB .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes hypeB { 30% { transform: translateY(-18px) rotate(-8deg) scale(1.04); } }
.fx-sneak #armR { animation: reach 1.4s ease .3s; }
.fx-sneak #pup { animation: none; transform: translate(1px, 4px); }
.fx-later #armR { animation: reach 1.4s ease 1.2s; }
.fx-yawn #head { animation: yawnH 1.6s ease; }
@keyframes yawnH { 40% { transform: rotate(-6deg) translateY(-4px) scale(1.03); } }
.fx-fist #armR { animation: fist .8s ease 2; }
@keyframes fist { 50% { transform: rotate(-30deg) translate(4px, -8px); } }
.fx-giggle #kid-body { animation: giggle .5s ease 3; }
@keyframes giggle { 50% { transform: translateY(-3px) rotate(1.5deg); } }
.fx-mash #thumb { animation: mash .12s linear 14; }
@keyframes mash { 50% { transform: translate(3px, -4px); } }
.fx-toPhoto #head { animation: toPhoto 2s ease; }
@keyframes toPhoto { 25%, 70% { transform: rotate(-14deg) translate(-6px, -2px); } }
.fx-toPhoto #pup { animation: toPhotoP 2s ease; }
@keyframes toPhotoP { 25%, 70% { transform: translate(-6px, -3px); } }
.fx-toWindow #kid-body { animation: toWin 1.6s ease; }
@keyframes toWin { 40%, 70% { transform: translateX(26px) translateY(-8px); } }
.fx-shiver #kid-body { animation: shiver .12s linear 10; }
@keyframes shiver { 50% { transform: translateX(2px); } }
.fx-jump #kid-body { animation: jumpK .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes jumpK { 35% { transform: translateY(-34px); } }
/* 部屋の小物の反応 */
.hot.wobble { animation: wobble .8s ease; transform-box: fill-box; transform-origin: center bottom; }
@keyframes wobble { 25% { transform: rotate(-8deg); } 55% { transform: rotate(6deg); } 80% { transform: rotate(-2deg); } }
.hot.shake { animation: shakeO .5s ease; transform-box: fill-box; transform-origin: center; }
@keyframes shakeO { 25%, 75% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
#window.gust #curL, #window.gust #curR { animation: gust .9s ease 2; }
@keyframes gust { 50% { transform: scaleX(.35) skewX(10deg); } }
.w-wind #curL, .w-wind #curR { animation: sway 2s ease-in-out infinite alternate; }
.w-rain #rain { animation: rainF .6s linear infinite; }
@keyframes rainF { to { transform: translate(-4px, 14px); } }
.w-snow #snow { animation: snowF 6s linear infinite; }
@keyframes snowF { to { transform: translate(-8px, 30px); } }
#clouds { animation: drift 30s linear infinite alternate; }
@keyframes drift { to { transform: translateX(-20px); } }
#wash.washOn { animation: wash 1.3s ease; }
@keyframes wash { 25% { opacity: .55; } 100% { opacity: 0; } }
#beam.beamOn { animation: beam 3s ease forwards; }
@keyframes beam { 20%, 100% { opacity: .35; } }
#crumbs.crumbOn { animation: crumb 2s ease forwards; }
@keyframes crumb { from { opacity: 0; transform: translateY(-10px); } 30%, 100% { opacity: 1; transform: none; } }
/* 本音の場面：動きをおさえて、間をとる */
.scene.quiet .doorway { transition: filter 1s; filter: saturate(.75) brightness(.92); }
.scene.quiet #thumb { animation: none !important; }
/* 今夜の小事件カード */
.inc { position: absolute; z-index: 7; left: 50%; top: 10px; transform: translateX(-50%); min-width: min(84%, 320px); padding: 8px 16px 10px; border-radius: 14px; background: #fff3c4; border: 3px solid var(--ink); text-align: center; box-shadow: 0 8px 0 rgba(0, 0, 0, .25); pointer-events: none; }
.inc.drop { animation: drop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes drop { from { transform: translate(-50%, -140%) rotate(-6deg); } }
.i-k { margin: 0; font-size: 11.5px; font-weight: 900; letter-spacing: .14em; color: #b8433a; }
.i-t { margin: 2px 0 0; font-size: 19px; font-weight: 900; }
/* ドパガキ同盟チャット */
.chat { position: absolute; z-index: 7; left: 50%; bottom: 4%; transform: translateX(-50%); width: min(86%, 320px); padding: 10px; border-radius: 22px; background: #1d2233; border: 4px solid #0f1220; color: #e8f4ff; box-shadow: 0 0 30px rgba(127, 196, 255, .5); }
.ch-h { margin: 0 0 6px; font-size: 12px; font-weight: 900; color: #7fc4ff; text-align: center; }
.ch-b { display: grid; gap: 5px; }
.cm { margin: 0; justify-self: start; max-width: 85%; padding: 5px 10px; border-radius: 4px 12px 12px 12px; background: #2e3550; font-size: 13.5px; line-height: 1.45; animation: pop .35s cubic-bezier(.2, 1.3, .4, 1) both; }
.cm b { display: block; font-size: 10.5px; color: #ffd7a6; }
.cm.me { justify-self: end; background: #3d6fd0; border-radius: 12px 4px 12px 12px; }
.ch-n { margin: 6px 0 0; font-size: 11px; text-align: center; color: #9aa3b8; }
/* 話し手の追加 */
.w-memo .l-who { background: #6a8f7a; } .w-memo .l-txt { color: #3d5a4a; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-weight: 700; }
.w-fam .l-who { background: #8a6fd0; } .w-notif .l-who { background: #1d2233; }
/* 結末の演出（追加ぶん） */
.bigphone.game { box-shadow: 0 0 60px rgba(255, 210, 63, .6); }
.bp-run { margin: 6px 0; font-size: 34px; letter-spacing: 10px; }
.endfx.go .bp-run span { display: inline-block; animation: runner .5s ease-in-out infinite alternate; }
.endfx.go .bp-run span + span { animation-delay: .25s; }
@keyframes runner { to { transform: translateY(-6px); } }
.notebook { position: absolute; left: 50%; top: 52%; width: min(62%, 240px); padding: 16px 16px 12px 30px; transform: translate(-50%, -50%) rotate(-3deg); background: #fffdf0; background-image: repeating-linear-gradient(#fffdf0 0 23px, #cfe0f0 23px 24px); border-left: 4px solid #e8604c; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); font-weight: 800; font-size: 15px; line-height: 24px; color: #2a3a6a; }
.notebook p { margin: 0; }
.endfx.go .notebook { animation: phoneZoom 1.2s cubic-bezier(.2, 1.3, .4, 1) both; }
.endfx.go .notebook .scrib { animation: blink 1s infinite; }
.crumbs2 i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #c98a45; top: -10px; }
.crumbs2 i:nth-child(odd) { background: #e0b070; width: 6px; height: 6px; }
.endfx.go .crumbs2 i { animation: fall 2.2s ease-in both; }
.crumbs2 i:nth-child(1) { left: 12%; animation-delay: .1s; } .crumbs2 i:nth-child(2) { left: 24%; animation-delay: .5s; } .crumbs2 i:nth-child(3) { left: 36%; animation-delay: .2s; } .crumbs2 i:nth-child(4) { left: 48%; animation-delay: .7s; } .crumbs2 i:nth-child(5) { left: 60%; animation-delay: .3s; } .crumbs2 i:nth-child(6) { left: 72%; animation-delay: .6s; } .crumbs2 i:nth-child(7) { left: 84%; animation-delay: .4s; } .crumbs2 i:nth-child(8) { left: 18%; animation-delay: .9s; } .crumbs2 i:nth-child(9) { left: 42%; animation-delay: 1s; } .crumbs2 i:nth-child(10) { left: 66%; animation-delay: .8s; }
@keyframes fall { to { transform: translateY(420px) rotate(240deg); } }
.handoff { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); text-align: center; }
.handoff span { display: block; font-size: 46px; }
.handoff em { display: inline-block; margin-top: 6px; padding: 4px 14px; border-radius: 999px; background: #fff; font-style: normal; font-weight: 900; color: #4a8fd0; }
.endfx.go .handoff span { animation: hand2 2s ease both; }
@keyframes hand2 { from { transform: translate(30px, -30px) rotate(20deg); opacity: 0; } 60% { opacity: 1; } }
.end-promise:before { opacity: 1; background: radial-gradient(ellipse at 50% 60%, rgba(140, 190, 255, .35), transparent 70%); }
.end-rikuonline:before { opacity: 1; background: radial-gradient(ellipse at 55% 55%, rgba(255, 210, 100, .35), transparent 70%); }
.end-help:before { opacity: 1; background: radial-gradient(ellipse at 20% 45%, rgba(255, 226, 160, .45), transparent 70%); }
.end-snackthief:before { opacity: 1; background: radial-gradient(ellipse at 60% 75%, rgba(255, 190, 120, .4), transparent 70%); }
/* 結果：今回見つけたこと */
.found .night { margin: 0 0 6px; font-size: 13.5px; font-weight: 800; color: var(--muted); }
.sub-h { margin: 12px 0 6px !important; font-size: 12.5px !important; font-weight: 900; color: var(--muted); }
.flist { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.flist li { padding: 6px 10px; border-radius: 10px; background: #f6f1e8; font-size: 13.5px; font-weight: 700; }
.flist em, .unlock em { font-style: normal; font-size: 11px; font-weight: 900; color: #fff; background: var(--yu); padding: 1px 6px; border-radius: 999px; }
.unlock { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.unlock li { padding: 8px 12px; border-radius: 10px; background: #efe6ff; color: #5a3fb0; font-size: 13.5px; font-weight: 800; animation: pop .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.left { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.left li { display: grid; grid-template-columns: 7.5em 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.meter { height: 10px; border-radius: 5px; background: #ece4d6; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ec); border-radius: 5px; transform-origin: left; animation: grow 1s ease both .3s; }
@keyframes grow { from { transform: scaleX(0); } }
.album.chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
