/* こっくりさんのことづて：黒背景・明朝・幅 520px まで（ほかのミニゲームと同じ） */
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{height:100%;background:#000;color:#e9e2d2;overflow:hidden;overscroll-behavior:none}
body{font-family:"Hiragino Mincho ProN","Yu Mincho","Noto Serif JP",serif;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
html[lang=ko] body{font-family:"Noto Serif KR","Apple SD Gothic Neo","Malgun Gothic",serif}
button,a{font:inherit;color:inherit}
#app{position:relative;width:100%;max-width:520px;height:100vh;height:100dvh;margin:0 auto;overflow:hidden;background:#0c0806;--py:120px;--pb:120px}
#cv{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}

.mute{position:absolute;top:calc(8px + env(safe-area-inset-top));right:8px;z-index:30;width:40px;height:40px;border:0;border-radius:50%;background:rgba(0,0,0,.35);font-size:17px;opacity:.75;cursor:pointer}

/* 紙の上の文 */
.top{position:absolute;left:0;right:0;top:0;height:var(--py);z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;padding:calc(10px + env(safe-area-inset-top)) 50px 12px;text-align:center;pointer-events:none}
.cmt{font-size:clamp(12.5px,3.6vw,15px);letter-spacing:.08em;color:#e8c9a0;min-height:1.5em;opacity:0;transition:opacity .5s;text-shadow:0 0 10px #000}
.cmt.on{opacity:.95}
.say{font-size:clamp(14px,4.2vw,18px);line-height:1.6;letter-spacing:.12em;color:#d8cfbc;min-height:1.6em;transition:opacity .6s;text-shadow:0 0 12px #000}
.say.off{opacity:0}
.heard{font-family:"Yuji Syuku","Hiragino Mincho ProN","Yu Mincho",serif;font-size:clamp(20px,6.4vw,30px);letter-spacing:.22em;min-height:1.4em;color:#f3ead6;text-shadow:0 0 14px rgba(0,0,0,.9)}
.heard span{display:inline-block;animation:ink 1.1s ease-out both}
@keyframes ink{from{opacity:0;filter:blur(5px)}to{opacity:1;filter:blur(0)}}

/* タイトル：文とボタンだけ重ねる。紙の上は指が通るように触れなくする */
.layer{position:absolute;inset:0;z-index:10;pointer-events:none;transition:opacity .7s}
.layer.gone{opacity:0}
.layer.gone *{pointer-events:none!important}
.t-head{position:absolute;left:0;right:0;top:0;height:var(--py);display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:8px;padding:calc(10px + env(safe-area-inset-top)) 16px 12px;text-align:center}
.logo{font-family:"Yuji Syuku","Hiragino Mincho ProN","Yu Mincho",serif;font-weight:400;font-size:clamp(22px,7vw,34px);letter-spacing:.14em;color:#f3ead6;text-shadow:0 0 18px #000}
.sub{font-size:clamp(12px,3.5vw,15px);line-height:1.7;letter-spacing:.1em;color:#cfc5b0;text-shadow:0 0 10px #000}
.layer.hold .sub{color:#f0c88a;animation:hold 1.2s ease-in-out 3}
@keyframes hold{50%{opacity:.35}}
.t-foot{position:absolute;left:0;right:0;bottom:0;height:var(--pb);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:6px 16px calc(8px + env(safe-area-inset-bottom));text-align:center}
.t-foot>*{pointer-events:auto}
.note{font-size:11px;line-height:1.7;letter-spacing:.08em;color:#9a917f;pointer-events:none!important}
.lang{display:flex;gap:14px;font-size:11px}
.lang button{background:none;border:0;color:#8d8576;letter-spacing:.06em;padding:4px 2px;cursor:pointer}
.lang button.on{color:#e9e2d2;border-bottom:1px solid #e9e2d2}

.menu{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%}
.menu.row{flex-direction:row;justify-content:center}
.btn{display:block;width:min(100%,300px);padding:13px 10px;border:1px solid rgba(233,226,210,.55);background:rgba(10,7,5,.6);color:#f0e8d6;font-size:15px;letter-spacing:.18em;text-align:center;text-decoration:none;cursor:pointer;border-radius:2px}
.btn:active{background:rgba(233,226,210,.14)}
.btn.sm{width:auto;min-width:108px;padding:8px 16px;font-size:12.5px;letter-spacing:.14em;border-color:rgba(233,226,210,.35)}
.btn.line{border-color:rgba(120,200,140,.6)}

/* 最初のポップアップ（出ているあいだは、うしろのタイトル文字を隠して重ならないようにする） */
.layer .t-head,.layer .t-foot{transition:opacity .7s}
.layer.intro .t-head,.layer.intro .t-foot{opacity:0;pointer-events:none}
.layer.intro .t-foot>*{pointer-events:none}
.intro-pop{position:absolute;inset:0;z-index:25;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(5,3,2,.78)}
.intro-pop.show{display:flex;animation:fade .8s ease both}
.intro-box{width:min(92%,400px);text-align:center;padding:clamp(24px,6vw,34px) clamp(20px,5vw,30px);background:#120c08;border:1px solid rgba(233,226,210,.22);border-radius:4px;box-shadow:0 18px 60px rgba(0,0,0,.7)}
.intro-time{font-size:12px;letter-spacing:.4em;color:#d9a35c;margin-bottom:10px}
.intro-title{font-family:"Yuji Syuku","Hiragino Mincho ProN","Yu Mincho",serif;font-weight:400;font-size:clamp(22px,6.6vw,30px);letter-spacing:.12em;line-height:1.4;color:#f3ead6}
.intro-lead{font-size:clamp(13.5px,3.8vw,15.5px);line-height:1.9;letter-spacing:.08em;color:#cfc5b0;margin:16px 0 22px}
.intro-btns{display:flex;flex-direction:column;gap:11px}
.intro-btns button{width:100%;padding:14px 12px;font-size:clamp(15px,4vw,16.5px);letter-spacing:.16em;border:1px solid rgba(233,226,210,.55);background:rgba(10,7,5,.7);color:#f0e8d6;border-radius:2px;cursor:pointer}
.intro-btns button:active{background:rgba(233,226,210,.14)}
.intro-btns .intro-line{color:#c8ecd4;border-color:#2f7a4a;background:rgba(18,30,24,.75)}
.intro-note{margin-top:14px;font-size:11px;letter-spacing:.14em;color:rgba(233,226,210,.5)}

/* 結果・きろく */
.screen{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:calc(56px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom));background:rgba(5,3,2,.93);animation:fade .9s ease both;text-align:center;overflow-y:auto}
@keyframes fade{from{opacity:0}to{opacity:1}}
.r-box{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%}
.r-label{font-size:12px;letter-spacing:.3em;color:#9a917f}
.r-new{font-size:11px;letter-spacing:.2em;color:#d9a35c;border:1px solid rgba(217,163,92,.6);padding:2px 10px}
.r-kana{font-family:"Yuji Syuku","Hiragino Mincho ProN","Yu Mincho",serif;font-size:clamp(24px,8vw,38px);line-height:1.5;letter-spacing:.14em;color:#f6eedb;margin-top:6px;word-break:keep-all;overflow-wrap:anywhere}
.r-gloss{font-size:15px;letter-spacing:.12em;color:#d8cfbc;min-height:1.2em}
.r-note{font-size:15px;line-height:1.7;letter-spacing:.12em;color:#efe6d2;white-space:pre-line;margin-top:8px}
.r-extra{font-size:12.5px;line-height:1.7;letter-spacing:.1em;color:#9a917f;min-height:0}
.r-extra:empty{display:none}
.r-sum{font-size:12.5px;line-height:1.9;letter-spacing:.1em;color:#cfc5b0;white-space:pre-line;margin-top:10px;padding-top:12px;border-top:1px solid rgba(233,226,210,.2);width:min(100%,300px)}
.r-hint{font-size:11.5px;letter-spacing:.08em;color:#8d8576}

#s-rec{justify-content:flex-start;gap:12px}
.p-head{display:flex;justify-content:space-between;width:100%;font-size:14px;letter-spacing:.2em;color:#d8cfbc;border-bottom:1px solid rgba(233,226,210,.25);padding-bottom:8px}
.p-body{flex:1;width:100%;overflow-y:auto;display:flex;flex-direction:column;gap:2px;text-align:left}
.rec{padding:9px 4px;border-bottom:1px dotted rgba(233,226,210,.14)}
.rec b{display:block;font-family:"Yuji Syuku","Hiragino Mincho ProN","Yu Mincho",serif;font-weight:400;font-size:18px;letter-spacing:.14em;color:#f3ead6}
.rec small{display:block;font-size:11.5px;letter-spacing:.06em;color:#a79e8a;margin-top:2px}
.rec.no b{color:#5d564b;letter-spacing:.3em}
.menu.foot{flex:none}

/* アンケート POP */
.endpop{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.72);padding:16px}
.endpop.show{display:flex}
.ep-card{position:relative;width:min(100%,400px);max-height:92vh;overflow-y:auto;background:#16110d;border:1px solid rgba(233,226,210,.3);padding:26px 20px 20px;text-align:center;-webkit-user-select:text;user-select:text}
.ep-x{position:absolute;top:6px;right:8px;background:none;border:0;font-size:24px;color:#9a917f;cursor:pointer;padding:4px 8px}
.ep-head{font-size:15px;letter-spacing:.06em;margin-bottom:16px;padding:0 18px}
.ep-label{font-size:12px;color:#a79e8a;letter-spacing:.1em;margin:10px 0 6px}
.stars{display:flex;justify-content:center;gap:8px}
.star{font-size:30px;color:#4a443b;cursor:pointer}
.star.on{color:#d9a35c}
.fb-text{width:100%;height:84px;background:#0c0806;border:1px solid rgba(233,226,210,.3);color:#e9e2d2;font:inherit;font-size:16px;padding:8px;resize:none}
.fb-err{font-size:12px;color:#d98a6a;min-height:1.4em;margin-top:4px}
.fb-note{font-size:10.5px;line-height:1.6;color:#8d8576;margin-bottom:10px}
.fb-note a{color:#a79e8a}
.fb-send,.portal-btn{width:100%;padding:12px;border:1px solid rgba(233,226,210,.55);background:none;font-size:14px;letter-spacing:.16em;cursor:pointer}
.fb-thanks{display:none;font-size:14px;padding:20px 0}
.line-pitch{font-size:12.5px;line-height:1.7;color:#b9b09c}
.line-btn{display:block;margin:12px auto 0;padding:12px 26px;background:#06c755;color:#fff;border:0;border-radius:24px;font-weight:700;font-size:14.5px;font-family:"Hiragino Sans","Yu Gothic UI","Noto Sans JP",sans-serif;cursor:pointer}
.ep-div{height:1px;background:rgba(233,226,210,.18);margin:18px 0 14px}
.portal-pitch{font-size:12px;line-height:1.7;color:#b9b09c;margin-bottom:10px}
