:root{--ink:#395c60;--paper:#faf6ec;--sage:#8dbfb0;--coral:#ed947d;--gold:#efbe59;--purple:#b29bd0}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;color:var(--ink);background:radial-gradient(ellipse at 0 15%,#fbe0d0,transparent 45%),radial-gradient(ellipse at 95% 55%,#e9e4f6,transparent 50%),var(--paper);font-family:'Hiragino Kaku Gothic ProN','Yu Gothic',Meiryo,sans-serif}button,select,input{font:inherit}button{cursor:pointer;border:1px solid #cfbfaa;border-radius:16px;padding:10px 16px;background:#fffcf5;color:var(--ink);font-weight:800;touch-action:manipulation}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #a188c5;outline-offset:3px}header{max-width:1220px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:15px 20px;gap:15px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:#7d8b87;font-size:11px}.brand img{width:140px;height:auto}.subtitle{font-size:12px}main{max-width:1220px;margin:auto;padding:0 20px 35px}.intro{display:flex;justify-content:space-between;align-items:center;padding:16px 12px 23px}.eyebrow{font-size:10px;letter-spacing:.17em;color:#9c85b4;font-weight:900}h1{font-size:clamp(27px,4vw,44px);letter-spacing:-.06em;margin:9px 0}h1 span{color:#d78c72}.intro p{margin:0;font-size:13px}.intro-cats{display:flex;align-items:center}.intro-cats img{width:100px;height:100px;object-fit:contain}.intro-cats span{font-size:12px;color:#9e80ad;transform:rotate(6deg)}.game-shell{background:#eee5d4;border:2px solid #c8b698;border-radius:26px;padding:10px;box-shadow:0 7px 0 #ccb895,0 16px 40px #8970501b;position:relative}.hud{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:3px 10px 10px;font-size:11px}.hud>b{letter-spacing:.1em;color:#9075aa}.hud strong{font-size:19px;display:inline-block;margin-left:5px}.hud button{font-size:11px;padding:7px 12px}.arena{position:relative;overflow:hidden;border:3px solid #6c9992;border-radius:16px;background:#dff1ed}canvas{display:block;width:100%;height:auto;aspect-ratio:1000/480;touch-action:none}.cover{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;background:#f9f6ebed;padding:20px;backdrop-filter:blur(3px)}.cover>span{font-size:11px;letter-spacing:.13em;color:#a18cbb;font-weight:900}.cover h2{font-size:clamp(24px,4vw,40px);margin:12px 0}.cover p{font-size:13px;max-width:500px;line-height:1.8}.cover-actions{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}.cover button{background:#ffd575;border:2px solid #fff6d6;box-shadow:0 4px 0 #c6a052;padding:13px 24px}.cover #continue{background:#d7ebdf}.cover #next{background:#d7c4ec}.deck{display:grid;grid-template-columns:85px 1fr 85px;gap:20px;align-items:center;max-width:720px;margin:10px auto 5px}.deck button{width:76px;height:65px;border-radius:50%;border:3px solid #fff8e7;box-shadow:0 5px 0 #739589,0 7px 0 3px #b8ac97;background:radial-gradient(circle at 30% 20%,#e6fff3,#99c9b7);font-size:24px;padding:3px;touch-action:none;user-select:none;-webkit-user-select:none}.deck button:active,.deck button.held{transform:translateY(4px);box-shadow:0 1px 0 #739589,0 3px 0 3px #b8ac97}.deck button small{display:block;font-size:9px}.deck p{text-align:center;font-size:11px;line-height:1.7;margin:0}.deck p span{display:block;color:#948977;font-size:10px}.underbar{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:10px;padding:8px 10px 1px}.underbar label{display:flex;align-items:center;gap:5px}.underbar input{width:80px;accent-color:#a58bbc}.underbar button{font-size:10px;padding:6px 12px}.announcement{position:absolute;left:15%;right:15%;top:20%;text-align:center;font-size:clamp(20px,4vw,38px);font-weight:1000;color:#f0a356;-webkit-text-stroke:5px #fffcf1;paint-order:stroke fill;pointer-events:none;text-shadow:0 3px 0 #9a74a2;opacity:0}.announcement.show{animation:pop 1.5s both}.rotate-hint{display:none}.section-head{display:flex;align-items:center;justify-content:space-between;gap:15px}.section-head h2{font-size:21px}.selection,.guide,.records{margin-top:30px;padding:22px;background:#fffdf7b8;border:1px solid #e4dac9;border-radius:24px}.stages{display:grid;grid-template-columns:repeat(10,1fr);gap:9px;margin-top:18px}.stages button{padding:10px 3px;border-radius:12px;box-shadow:0 3px 0 #e1d5c1;font-size:17px}.stages button span{display:block;font-size:11px;color:#d3a046;margin-top:3px}.stages button.selected{border:2px solid #a18ac2;background:#efe7f7}.section-head>button{background:#e9e2f4}.section-head>button small{display:block;font-size:9px;margin-top:4px}.guide-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:25px}.guide p{font-size:12px;line-height:1.9;color:#7a827b}.guide b{font-size:13px}.records ol{padding-left:25px;max-height:260px;overflow:auto}.records li{padding:9px;font-size:13px;border-bottom:1px dashed #ded4c5}.records li b{color:#a47b58}.note{font-size:11px;line-height:1.8;color:#8e8479}.account{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.account span{font-size:11px}.account button{font-size:12px}select{padding:8px;border:1px solid #d8cdbb;border-radius:9px;background:#fffaf0;color:var(--ink)}footer{text-align:center;padding:25px;font-size:10px;color:#9d9184}footer a{font-size:13px;color:#846e99}footer p{line-height:1.8}@keyframes pop{0%{opacity:0;transform:scale(.4) rotate(-6deg)}15%,75%{opacity:1;transform:scale(1) rotate(-4deg)}100%{opacity:0;transform:translateY(-20px)}}
.game-shell:fullscreen{border:0;border-radius:0;width:100%;height:100%;padding:env(safe-area-inset-top,4px) max(8px,env(safe-area-inset-right)) env(safe-area-inset-bottom,4px) max(8px,env(safe-area-inset-left));display:flex;flex-direction:column;align-items:center;background:#f5eddf}.game-shell:fullscreen .hud{width:100%}.game-shell:fullscreen .arena{width:min(100%,calc((100dvh - 136px)*1000/480));flex:0 1 auto}.game-shell:fullscreen .deck{width:min(100%,720px)}.game-shell:fullscreen .underbar{width:100%}
@media(max-width:700px){header{padding:10px}.brand img{width:110px}.subtitle{display:none}main{padding:0 8px 20px}.intro{padding:10px 6px 18px}.intro .eyebrow{font-size:8px}.intro-cats img{width:70px;height:70px}.intro-cats span{display:none}.game-shell{padding:5px;border-radius:17px}.hud{flex-wrap:wrap;gap:6px;font-size:9px;padding:4px}.hud strong{font-size:15px}.hud button{font-size:9px;padding:6px 8px}.deck{grid-template-columns:64px 1fr 64px;gap:8px}.deck button{width:59px;height:55px}.deck p{font-size:9px}.deck p span{font-size:8px}.underbar{flex-wrap:wrap;font-size:9px;padding:8px 4px}.cover{padding:12px}.cover h2{font-size:22px;margin:7px}.cover p{font-size:10px;margin:6px}.cover button{padding:8px 12px;font-size:11px}.cover>span{font-size:8px}.rotate-hint{display:block;position:absolute;left:0;right:0;bottom:4px;text-align:center;font-size:9px;color:#4f7571;pointer-events:none}.stages{grid-template-columns:repeat(5,1fr)}.selection,.guide,.records{padding:16px}.section-head h2{font-size:17px}.section-head>button{font-size:12px;padding:9px}.guide-grid{grid-template-columns:1fr;gap:8px}}
@media(orientation:landscape) and (max-height:600px){body.playing header,body.playing .intro,body.playing .selection,body.playing .guide,body.playing .records,body.playing footer{display:none}body.playing main{padding:0 5px}body.playing .game-shell{border-radius:0;max-width:1100px;margin:auto;padding:3px 8px;display:flex;flex-direction:column;align-items:center}.game-shell .arena{width:min(100%,calc((100dvh - 146px)*1000/480))}.game-shell .hud{width:100%;padding:1px 0 5px}.game-shell .deck{width:min(100%,750px);margin:5px auto 3px;grid-template-columns:65px 1fr 65px}.game-shell .deck button{width:58px;height:46px;font-size:19px}.game-shell .underbar{width:100%;padding:3px;font-size:9px}.hud strong{font-size:15px}.hud button{padding:4px 7px}.rotate-hint{display:none}.cover h2{font-size:26px}.cover p{font-size:11px}.cover button{padding:8px 17px}}
@media(prefers-reduced-motion:reduce){.announcement.show{animation:none;opacity:1}}

@media(orientation:landscape) and (max-height:600px){body.playing{overflow:hidden}.game-shell .underbar{flex-wrap:nowrap}.game-shell .underbar #run-note{max-width:36%;font-size:9px}.game-shell .hud{flex-wrap:nowrap}.game-shell .hud strong{white-space:nowrap}.game-shell .hud .combo-hud{color:#9067a6}}

.deck,.game-shell .deck{display:flex;flex-direction:column;gap:3px;width:min(95%,600px);margin:7px auto 3px}#paw-slider{position:relative;width:100%;height:54px;border-radius:30px;border:3px solid #fff9eb;background:linear-gradient(#d2e7db,#a6cbbd);box-shadow:inset 0 3px 5px #6c998a55,0 3px 0 #b4a58e;display:flex;align-items:center;justify-content:space-between;padding:0 24px;touch-action:none;user-select:none;cursor:ew-resize}#paw{position:absolute;left:4%;width:62px;height:48px;display:grid;place-items:center;border-radius:50%;font-size:32px;background:#fff2dc;border:2px solid #dba58d;box-shadow:0 2px 0 #bd8d7b;transition:left .18s ease;pointer-events:none}#paw-slider.right #paw{left:calc(96% - 62px)}.rail-label{font-size:12px;color:#517d70}.deck p{font-size:10px}.deck p span{display:inline;font-size:9px}#paw-slider:focus-visible{outline:3px solid #a188c5}@media(orientation:landscape) and (max-height:600px){#paw-slider{height:46px}#paw{height:42px;font-size:28px}.deck p{font-size:9px}.game-shell .arena{width:min(100%,calc((100dvh - 150px)*1000/480))}}

#paw{transition:none;will-change:left}.game-shell #paw-slider.right #paw{left:auto}

/* Shared supplied title artwork; preserve the full 3:1 composition. */
.intro{justify-content:center;text-align:center;padding:8px 0 20px}.intro>div{width:100%}.intro h1{margin:0 auto 10px;max-width:780px;line-height:0}.rescue-title{display:block;width:100%;height:auto;object-fit:contain;border-radius:18px}.intro p{margin-top:8px}@media(max-width:600px){.intro{padding:4px 0 14px}.rescue-title{border-radius:10px}}

/* In-arena controls and simulation-timed messages. */
.hud .arena-pause{flex-shrink:0;width:44px;height:44px;padding:0;font-size:25px;background:#fffaf2ed}
.level-up{position:absolute;top:6px;left:28%;right:28%;pointer-events:none;text-align:center;color:#895d9e;background:#fff7dbe8;border-radius:14px;font-size:clamp(13px,2.3vw,24px);font-weight:900;padding:5px}
.announcement.show{animation:none;opacity:1}.announcement{top:30%;font-size:clamp(14px,2.5vw,26px)}
#screen,#screen-game{min-width:44px;min-height:44px}#screen{font-size:20px}#screen-game{font-size:24px;padding:4px 10px}
.cover{z-index:4}.cover button{min-height:44px}
@media(orientation:landscape) and (max-height:600px){.game-shell .arena{width:min(100%,calc((100dvh - 172px)*1000/480))}.game-shell .underbar{gap:6px}}
#screen-game{height:44px;line-height:1;flex-shrink:0}.game-shell:fullscreen .arena{width:min(100%,calc((100dvh - 194px)*1000/480))}
@media(orientation:landscape) and (max-height:600px){.game-shell .arena{width:min(100%,calc((100dvh - 194px)*1000/480))}}

/* Landscape: one control row leaves the largest possible undistorted playfield. */
@media(orientation:landscape) and (max-height:600px){
 body.playing .game-shell,.game-shell:fullscreen{display:grid;grid-template-columns:minmax(180px,1fr) auto;grid-template-rows:44px auto 50px;gap:4px 12px;align-items:center;justify-items:center;max-width:none;width:100%;padding:3px max(6px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));border:0}
 body.playing main{max-width:none;padding:0}
 .game-shell .hud{grid-column:1/-1;grid-row:1;padding:0;gap:6px;height:44px}
 .game-shell .arena,.game-shell:fullscreen .arena{grid-column:1/-1;grid-row:2;width:min(100%,calc((100dvh - 114px - env(safe-area-inset-bottom))*1000/480));flex:none}
 .game-shell .deck,.game-shell:fullscreen .deck{grid-column:1;grid-row:3;width:100%;max-width:600px;margin:0;gap:0}
 .game-shell .deck p,.game-shell #run-note{display:none}
 .game-shell .underbar,.game-shell:fullscreen .underbar{grid-column:2;grid-row:3;width:auto;padding:0;gap:6px;flex-wrap:nowrap}
 .game-shell .underbar input{width:55px}.game-shell .underbar label{gap:3px}
 .game-shell .underbar button{min-height:44px;padding:4px 8px;white-space:nowrap}
}

/* The rail and canvas have identical borders, horizontal origin and content width. */
.game-shell .deck,.game-shell:fullscreen .deck{width:100%;max-width:none}
#paw-slider{padding-inline:0}
#paw{left:28%;width:min(62px,14.8%);transform:translateX(-50%);transition:none}
.game-shell #paw-slider.right #paw{left:28%}
.rail-label{padding-inline:12px;pointer-events:none}
.game-shell:fullscreen .deck{width:min(100%,calc((100dvh - 194px)*1000/480))}
@media(orientation:landscape) and (max-height:600px){
 .game-shell{--play-width:min(100%,calc((100dvh - 114px - env(safe-area-inset-bottom))*1000/480))}
 .game-shell .hud{grid-column:1;min-width:0}
 .game-shell .underbar,.game-shell:fullscreen .underbar{grid-column:2;grid-row:1}
 .game-shell .arena,.game-shell:fullscreen .arena{width:var(--play-width)}
 .game-shell .deck,.game-shell:fullscreen .deck{grid-column:1/-1;grid-row:3;width:var(--play-width);max-width:none}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:740px){
 /* Narrow landscape needs another row to retain accessible controls without overlap. */
 body.playing .game-shell,.game-shell:fullscreen{grid-template-rows:44px auto 50px 44px;--play-width:min(100%,calc((100dvh - 162px - env(safe-area-inset-bottom))*1000/480))}
 .game-shell .hud{grid-column:1/-1}
 .game-shell .underbar,.game-shell:fullscreen .underbar{grid-column:1/-1;grid-row:4}
}

/* Life indicators and brief, non-interactive level rewards. */
.hud .life-hud strong{display:inline-flex;gap:.11em;margin:0;white-space:nowrap;color:#b83661}
.life-hud .empty{color:#897d7b;opacity:.57}
.life-hud .restored:not(.empty){color:#c01a56;text-shadow:0 0 4px #fff,0 0 9px #fdb624,0 0 14px #fdb624}
#life-up{position:absolute;top:6px;right:2%;z-index:2;pointer-events:none;padding:5px 9px;border-radius:12px;background:#fff5d7;color:#9a3155;font-size:clamp(11px,2vw,20px);font-weight:900}
#flying-heart{position:absolute;top:0;left:0;z-index:3;pointer-events:none;color:#c01a56;font-size:28px;text-shadow:0 0 5px white,0 0 9px #fdb624}
.rank-filters{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
@media(max-width:380px){.hud .combo-hud{order:1}.rank-filters select{padding:5px}}

/* Active play is isolated; pause and the page outside the shell remain scrollable. */
body.is-rescue-active .game-shell{touch-action:none;overscroll-behavior:contain;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
body.is-rescue-active #game,body.is-rescue-active #paw-slider{touch-action:none}
@font-face{font-family:NekomekiPopNumbers;src:url('../assets/fonts/nekomeki-pop-numbers.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:NekomekiMochiy;src:url('../assets/fonts/crane-pop.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
#announcement,#level-up,#life-up{font-family:NekomekiPopNumbers,NekomekiMochiy,"Hiragino Maru Gothic ProN","Yu Gothic",Meiryo,system-ui,sans-serif;font-weight:900;line-height:1.35;paint-order:stroke fill;-webkit-text-stroke:2px #fff8e9;text-shadow:0 2px 0 #b77e54,0 3px 3px #754c3f44;letter-spacing:.01em}
#announcement{color:#b76550;background:#fff5d9f2;border:1px solid #f1ce95;box-shadow:0 4px 0 #d8a96e60}
#level-up{color:#eaa33d;background:#fff5d9f2;border:1px solid #f1ce95}
#life-up{color:#e27f77;background:#fff5d9f2;border:1px solid #f1ce95}
@font-face{font-family:NekomekiMaruDisplay;src:url('../assets/fonts/nekomeki-maru-display.ttf') format('truetype');font-weight:400 900;font-style:normal;font-display:swap}
#announcement,#level-up,#life-up{font-family:NekomekiPopNumbers,NekomekiMaruDisplay,"Hiragino Maru Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-weight:400;-webkit-text-stroke:0;text-shadow:0 1px 0 #fff3dd;line-height:1.45}
#announcement{color:#8e4c42}
#level-up{color:#9b651e}
#life-up{color:#a54755}

#level-up{top:9%;left:18%;right:18%;font-size:clamp(13px,2.2vw,22px);line-height:1.4;padding:5px 8px;max-width:none}
#announcement{top:auto;bottom:9%;left:7%;right:7%;font-size:clamp(12px,2vw,18px);line-height:1.5;padding:5px 8px;white-space:normal}
#life-up{top:5px;right:5px;font-size:clamp(11px,1.8vw,16px);line-height:1.4;padding:4px 6px}
.cover h2{font-size:clamp(18px,3.5vw,28px);line-height:1.45;overflow-wrap:anywhere}
