[hidden]{display:none!important}
:root{--ink:#2a2118;--paper:#fbf7ee;--red:#b8342a;--indigo:#2f4a86;--lamp:#ffd98a}
*{box-sizing:border-box;margin:0;padding:0}
html{touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%;background:#2a2016;height:100%}
body{height:100%;overflow:hidden;color:var(--ink);font-family:"Kosugi Maru","Hiragino Maru Gothic ProN","Hiragino Sans",sans-serif;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
button,a{font-family:inherit;color:inherit;touch-action:manipulation;cursor:pointer;-webkit-tap-highlight-color:transparent}
button{border:0;background:none}
#view{position:fixed;inset:0;width:100vw;height:100svh;display:block;touch-action:none}
#flash{position:fixed;inset:0;pointer-events:none;background:#fff;opacity:0;z-index:5}
main{position:fixed;inset:0;height:100svh;overflow:hidden;z-index:3}
.hand{font-family:"Zen Kurenaido","Hiragino Maru Gothic ProN",sans-serif}

/* タイトル: 冷蔵庫に磁石で留めた、チラシの裏のメモ */
#vTitle{display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:calc(env(safe-area-inset-top) + 7svh) 16px calc(env(safe-area-inset-bottom) + 5svh);pointer-events:none}
#vTitle button{pointer-events:auto}
.memo{position:relative;background:#fffdf8;padding:24px 20px 16px 24px;transform:rotate(-2.5deg);box-shadow:0 10px 26px rgba(0,0,0,.4);width:min(86vw,340px);
}
.memo::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 0 88%,rgba(0,0,0,.05) 88% 100%);pointer-events:none}
.magnet{position:absolute;left:50%;top:-14px;width:30px;height:30px;margin-left:-15px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#ff8d7a,#c8382c 60%,#8a2018);box-shadow:0 3px 5px rgba(0,0,0,.4)}
.memo h1{font-family:"Zen Kurenaido",sans-serif;font-weight:400;line-height:1.05;color:#1c1712}
.memo h1 span{display:block;font-size:clamp(25px,7.6vw,32px)}
.memo h1 b{display:block;font-weight:400;font-size:clamp(44px,14vw,60px);color:var(--red);margin-left:-.04em;letter-spacing:-.02em;white-space:nowrap}
.memo p{font-family:"Zen Kurenaido",sans-serif;font-size:16px;margin-top:8px;color:#4c4236}
.tbtns{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%}
.tbtns .row{display:flex;gap:10px}
/* いちばん押してほしいボタンだけ、しゃもじの形と厚み */
.go{position:relative;letter-spacing:-.06em;font-family:"Zen Kurenaido",sans-serif;font-size:26px;min-width:220px;min-height:60px;padding:0 34px 0 30px;border-radius:30px 46px 46px 30px;background:linear-gradient(#f3dfb2,#e2c288);color:#3a2610;box-shadow:0 5px 0 #9a7440,inset 0 2px 0 rgba(255,255,255,.6)}
.go::after{content:"";position:absolute;right:-30px;top:50%;width:40px;height:14px;margin-top:-7px;border-radius:0 7px 7px 0;background:#e2c288;box-shadow:0 4px 0 #9a7440;z-index:-1}
.go:active{transform:translateY(4px);box-shadow:0 1px 0 #9a7440}
.small{font-size:15px;min-height:40px;padding:0 16px;border-radius:2px;background:#fffdf8;font-family:"Zen Kurenaido",sans-serif;transform:rotate(-1.5deg);color:var(--ink);display:inline-flex;align-items:center;justify-content:center;text-decoration:none;box-shadow:0 2px 6px rgba(0,0,0,.25)}

/* 遊び方: 広告の裏 */
#vHow{display:flex;align-items:center;justify-content:center;background:rgba(18,14,10,.6);padding:16px}
.howpaper{background:#fffdf8;width:min(400px,100%);max-height:calc(100svh - 32px);padding:16px 16px 10px;transform:rotate(.6deg);display:flex;flex-direction:column;gap:8px;box-shadow:0 10px 26px rgba(0,0,0,.4)}
.howpaper h2{font-family:"Zen Kurenaido",sans-serif;font-weight:400;font-size:24px}
#howRules{list-style:none;display:flex;flex-direction:column;gap:6px}
#howRules li{display:flex;align-items:center;gap:10px;font-size:clamp(14px,4vw,16px);line-height:1.3}
#howRules img,#howRules svg{flex:none;width:clamp(42px,12vw,54px);height:clamp(42px,12vw,54px);object-fit:contain}
#howRules b{display:block;font-family:"Zen Kurenaido",sans-serif;font-weight:400;font-size:clamp(17px,5vw,20px);color:var(--red)}
#howSpots{list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:4px 8px;padding-top:6px;border-top:1px dashed rgba(60,50,40,.3)}
#howSpots li{display:flex;align-items:center;gap:6px;font-size:clamp(12px,3.3vw,14px);line-height:1.25;white-space:nowrap}
html[lang=en] #howSpots li{white-space:normal}
#howSpots img{flex:none;width:clamp(32px,9vw,40px);height:clamp(32px,9vw,40px);object-fit:contain}
#howSpots b{display:block;font-size:clamp(13px,3.7vw,15px)}
.howpaper .warn{font-family:"Zen Kurenaido",sans-serif;font-size:17px;line-height:1.4;color:var(--red);text-align:center}
.small2{font-size:20px;min-height:48px;min-width:160px;align-self:center;margin:2px 30px 0 0}
.foot{display:flex;flex-direction:column;align-items:center;gap:0;font-size:11px;color:#7a6e60;text-align:center}
.foot a{display:inline-flex;align-items:center;min-height:36px;padding:0 10px;color:var(--indigo);font-size:13px}

/* 遊び中 */
#vPlay{pointer-events:none}
#vPlay button,#bowlArea{pointer-events:auto}
.bubble{position:absolute;left:0;top:0;max-width:88vw;background:#fff;color:#1c1712;font-family:"Zen Kurenaido",sans-serif;font-size:clamp(19px,5.6vw,23px);line-height:1.2;padding:8px 14px;border-radius:16px;
  box-shadow:2px 4px 8px rgba(0,0,0,.3);border:2.5px solid #1c1712;white-space:nowrap;transform-origin:50% 100%;animation:pop .2s ease-out;z-index:3}
.bubble::after{content:"";position:absolute;left:var(--tail,50%);bottom:-13px;margin-left:-7px;border:7px solid transparent;border-top:10px solid #1c1712}
.bubble.spot{background:#fff6d8;font-size:clamp(16px,4.6vw,19px);padding:6px 11px}
.bubble.loud{background:#ffe1d8;border-color:#8a1f16;color:#8a1f16;font-size:clamp(22px,6.6vw,27px)}
html[lang=en] .bubble{white-space:normal;max-width:70vw}
@keyframes pop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
.hint{position:absolute;left:16px;right:16px;top:calc(env(safe-area-inset-top) + 58px);text-align:center;font-family:"Zen Kurenaido",sans-serif;font-size:clamp(22px,6.4vw,27px);line-height:1.25;color:#fff;text-shadow:0 2px 0 #000,0 0 10px #000,0 0 3px #000;white-space:pre-line}
.skip{position:absolute;right:62px;top:calc(env(safe-area-inset-top) + 10px);min-height:40px;padding:0 14px;border-radius:20px;background:rgba(20,16,12,.6);color:#fff;font-size:13px}
/* 時間は蚊取り線香が燃えていく */
#coil{position:absolute;left:10px;top:calc(env(safe-area-inset-top) + 6px);width:62px;height:62px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.5))}
#coil svg{width:100%;height:100%;overflow:visible}
/* お茶碗 */
#bowlArea{position:absolute;left:50%;bottom:calc(env(safe-area-inset-bottom) + 50px);width:min(46vw,200px);height:min(34vw,150px);margin-left:calc(min(46vw,200px) / -2);touch-action:none;cursor:grab}
#bowlSvg{position:absolute;left:0;right:0;bottom:0;width:100%;height:auto;filter:drop-shadow(0 6px 6px rgba(0,0,0,.4))}
#pile{position:absolute;left:8%;right:8%;bottom:56%;height:0}
#pile img{position:absolute;bottom:0;width:38%;transform-origin:50% 100%;filter:drop-shadow(0 2px 2px rgba(0,0,0,.35));transition:transform .15s}
#pile img.new{animation:drop .32s ease-out}
#pile img.bit{-webkit-mask:radial-gradient(circle at 92% 12%,transparent 0 26%,#000 27%);mask:radial-gradient(circle at 92% 12%,transparent 0 26%,#000 27%)}
@keyframes drop{from{transform:translateY(-80px) rotate(-20deg);opacity:0}to{opacity:1}}
#bowlArea.chew{animation:chew .45s ease-out}
@keyframes chew{30%{transform:translateY(5px) scale(1.03,.97)}}
/* ベルト（お腹の限界） */
#belt{position:absolute;left:0;right:0;bottom:0;height:calc(env(safe-area-inset-bottom) + 46px);pointer-events:none}
#belt svg{position:absolute;left:0;right:0;top:0;width:100%;height:46px}
#belt.strain svg{animation:strain .25s infinite alternate}
@keyframes strain{to{transform:scaleY(1.06)}}
/* 指で運んでいるおかず */
#drag{position:fixed;left:0;top:0;width:70px;height:70px;margin:-35px 0 0 -35px;pointer-events:none;z-index:8;will-change:transform}
#drag img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 6px 6px rgba(0,0,0,.45))}
#rings{position:absolute;inset:0;pointer-events:none}
#rings i{position:absolute;width:76px;height:76px;margin:-38px 0 0 -38px;border-radius:50%;border:3px dashed rgba(255,250,230,.9);box-shadow:0 0 0 2px rgba(0,0,0,.25);transition:transform .12s,background .12s}
#rings i.hot{transform:scale(1.25);background:rgba(255,240,180,.35);border-style:solid}
.finger{position:fixed;width:46px;height:46px;pointer-events:none;z-index:9;margin:-6px 0 0 -14px}

#bMute{position:fixed;z-index:6;right:12px;top:calc(env(safe-area-inset-top) + 10px);width:42px;height:42px;border-radius:21px;background:rgba(20,16,12,.55);color:#fff;display:flex;align-items:center;justify-content:center}
#bMute svg{width:24px;height:24px}
#bMute.off #mWave{display:none}#bMute:not(.off) #mX{display:none}

/* 結果: 体重計のカード */
#vResult{background:#3a2a1c;display:flex;flex-direction:column;align-items:center;padding:calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 6px);gap:8px}
#card{flex:none;display:block;transform:rotate(-.8deg);box-shadow:0 8px 22px rgba(0,0,0,.5)}
.cardbox{flex:1;min-height:0;width:100%;display:flex;align-items:center;justify-content:center}
.rbtns{display:flex;gap:14px;flex:none}
.rbtns .small:nth-child(2){transform:rotate(1.8deg)}
.rrow{display:flex;flex:none;padding-right:30px}
#vResult .go{min-height:52px;font-size:22px}
.more{flex:none;font-size:12px;color:#d9c9a8;text-decoration:none;min-height:30px;display:inline-flex;align-items:center}

/* 読み込み: 湯気の立つお茶碗 */
#boot{position:fixed;inset:0;z-index:20;background:#2a2016;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;transition:opacity .4s;color:#f2e6cf}
#boot.gone{opacity:0;pointer-events:none}
#boot svg{width:150px}
#boot .steam path{fill:none;stroke:#f2e6cf;stroke-width:4;stroke-linecap:round;opacity:.7;animation:steam 1.8s ease-in-out infinite}
#boot .steam path:nth-child(2){animation-delay:.5s}#boot .steam path:nth-child(3){animation-delay:1s}
@keyframes steam{0%{transform:translateY(8px);opacity:0}50%{opacity:.7}100%{transform:translateY(-10px);opacity:0}}
#boot .chop{animation:chop 1.2s ease-in-out infinite;transform-origin:150px 40px}
@keyframes chop{50%{transform:rotate(-4deg)}}
#boot p{font-family:"Zen Kurenaido",sans-serif;font-size:18px}
.boot-bar{width:160px;height:4px;background:rgba(255,255,255,.15);border-radius:2px;overflow:hidden}
.boot-bar i{display:block;height:100%;background:var(--lamp);transform:scaleX(0);transform-origin:0 50%;transition:transform .25s}
#bootErr{position:fixed;left:8px;right:8px;bottom:8px;z-index:30;background:#fff;color:#b00;font:12px/1.4 monospace;white-space:pre-wrap;padding:10px;border-radius:8px}
@media (max-height:700px){
  .memo{padding:18px 18px 12px 20px}.go{min-height:52px}
  #bowlArea{bottom:calc(env(safe-area-inset-bottom) + 44px);width:min(40vw,170px);height:min(30vw,128px);margin-left:calc(min(40vw,170px) / -2)}
  #howRules img,#howRules svg{width:38px;height:38px}#howSpots img{width:30px;height:30px}
  .howpaper{gap:5px;padding:12px 14px 8px}
}
