*{box-sizing:border-box}body{margin:0;background:#2b1a0e;color:#fff6e5;font:16px Hiragino Maru Gothic ProN,Arial Rounded MT Bold,system-ui,sans-serif;overflow:hidden}main{position:relative;height:100dvh;--gap: 12px;--head: 66px;--tray: 128px;--hud-top: calc(var(--gap) + var(--head) + 8px)}header{position:absolute;z-index:1;top:var(--gap);left:var(--gap);right:var(--gap);display:flex;align-items:center;gap:12px;height:var(--head)}.wallet{background:#3b2412d9;border-radius:18px;padding:5px 12px}small{font-size:11px;letter-spacing:2px;color:#f2cf9b}.wallet{margin-left:auto;flex:none;white-space:nowrap;font-size:26px;color:#ffd166}.wallet small{display:block;font-size:11px;letter-spacing:0}button{font:inherit;color:inherit;background:#5a361a;border:1px solid #a8703f;border-radius:18px;min-height:48px;cursor:pointer;touch-action:manipulation;transition:filter .12s,scale 80ms}@media(hover:hover){button:hover:not(:disabled){filter:brightness(1.18)}}button:active:not(:disabled){filter:brightness(.92);scale:.96}button:focus-visible{outline:3px solid #ffd166;outline-offset:2px}button:disabled{opacity:.48;cursor:default}header button{width:48px;flex:0 0 48px;font-weight:700}#field{position:absolute;inset:0;overflow:hidden;background:#b9ac96}canvas{width:100%;height:100%;display:block}#field>canvas{height:min(100%,calc((100% - var(--gap) - var(--tray)) / .88))}#clock{flex:none;background:#3b2412d9;border-radius:8px;padding:7px;font-size:13px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}#notice{position:absolute;top:var(--hud-top);left:0;right:0;text-align:center;color:#3b2412;font-size:13px;font-weight:700;pointer-events:none}#notice.paused{font-size:44px}footer{position:absolute;z-index:1;left:var(--gap);right:var(--gap);bottom:var(--gap);display:flex;gap:12px;height:var(--tray)}#tray{display:flex;flex:1;gap:8px}#tray button{flex:1;min-width:0;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;background:linear-gradient(#8a5229e6,#4b2810e6)}.portrait{height:92px;width:auto}button b{font-size:13px;display:block;color:#ffd166}.utilities{display:flex;flex-direction:column;gap:8px;width:180px}.utilities button{flex:1;font-size:13px;display:flex;align-items:center;justify-content:center;gap:8px;position:relative}.utilities i{font-style:normal;font-size:24px;line-height:1;color:#ffd166}#tray button,#burst{overflow:hidden}#tray button:after,#burst:after{content:"";position:absolute;inset:0 0 auto;height:calc(var(--cd, 0) * 100%);background:#1e0f05d9;pointer-events:none}#tray button.full:before{content:"満員";position:absolute;z-index:1;top:18px;background:#3b2412;border-radius:5px;padding:2px 4px;font-size:12px}#tray button:disabled,#burst:disabled{opacity:.7}@media(max-width:600px){main{--gap: 8px;--head: 58px;--tray: 178px}header{gap:6px}.wallet{padding:4px 8px}header button{width:40px;min-height:42px}.wallet{font-size:22px}footer{flex-direction:column;gap:7px}#tray{min-height:107px;gap:5px}.utilities{width:auto;flex-direction:row;height:55px}.utilities button{font-size:12px}#clock{padding:5px;font-size:11px}.portrait{height:64px}#notice{font-size:11px}}@media(max-height:480px){main{--gap: 6px;--head: 42px;--tray: 92px}.wallet{padding:4px 8px;font-size:19px}.wallet small{font-size:10px}footer{flex-direction:row}#tray{min-height:0}.portrait{height:56px}.utilities{width:150px;height:auto;flex-direction:column}.utilities button{min-height:40px}}header #sound{width:44px;flex-basis:44px;min-height:44px}header #pause{width:44px;flex-basis:44px;min-width:44px;min-height:44px}button[hidden]{display:none}@media(max-width:600px){header{gap:4px}header #sound{min-width:44px}header button{width:36px}.wallet{font-size:19px}.wallet small{font-size:10px}}#stage-name{background:#3b2412d9;border-radius:12px;padding:6px 10px;font-size:13px;color:#ffd166;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}#tray button small{position:absolute;top:4px;left:8px;font-size:10px;letter-spacing:0}#tray button.special{background:linear-gradient(#4f6b8f,#24324a);border-color:#8fb3e0}dialog{width:min(860px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);border:1px solid #c98a4b;border-radius:20px;background:#4b2810;color:#fff6e5;padding:0;box-shadow:0 20px 80px #0008}dialog[open]{display:flex;flex-direction:column}dialog::backdrop{background:#1e0f05aa}.sheet{overflow-y:auto;padding:20px 22px 8px;min-height:0}.actions{padding:10px 22px 16px;border-top:1px solid #7a4722}.actions button{width:100%;background:#3f8f4a;font-weight:700;font-size:18px}dialog h2{margin:0;color:#ffd166}dialog h3{margin:16px 0 6px;font-size:15px;color:#ffd166}dialog h3 small{margin-left:6px;letter-spacing:0}dialog p{line-height:1.7;font-size:14px;margin:8px 0}#report{list-style:none;padding:0;margin:8px 0;display:grid;gap:4px;font-size:13px}#report:empty{display:none}#report li{background:#3b2412;border-radius:10px;padding:6px 10px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}#report img{height:44px}#map{position:fixed;inset:0;z-index:5;display:flex;flex-direction:column;background:radial-gradient(circle at 50% 120%,#6b4220 0,transparent 60%),repeating-conic-gradient(#3d2512 0 25%,#452a15 0 50%) 0 0 / 56px 56px}#map[hidden]{display:none}.map-bar{display:flex;align-items:center;gap:12px;padding:10px max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));background:#2b1a0ee6;border-bottom:2px solid #7a4722}.map-bar h2{margin:0;white-space:nowrap;font-size:20px;color:#ffd166}#map-coins{margin-left:auto;white-space:nowrap;color:#ffd166}.map-bar button{white-space:nowrap;min-height:44px;padding:0 16px}#world{position:relative;flex:1;min-height:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain}#stages{position:relative;height:100%;min-width:100%}.band{position:absolute;top:8px;bottom:8px;border-radius:32px;background:color-mix(in srgb,var(--area) 28%,transparent);border:2px solid color-mix(in srgb,var(--area) 55%,transparent)}.band span{position:absolute;top:8px;left:14px;padding:3px 12px;border-radius:10px;background:#fff6e5;color:#3b2412;font-size:13px;font-weight:700;box-shadow:0 3px #0005}.trail{position:absolute;inset:0;width:100%;height:100%}.trail polyline{fill:none;stroke:#2a170a;stroke-width:14;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.trail polyline+polyline{stroke:#b07a45;stroke-width:5;stroke-dasharray:2 12}.stage{--boss: clamp(56px, 14dvh, 112px);position:absolute;display:flex;flex-direction:column;align-items:center;width:128px;min-height:0;padding:0;border:none;border-radius:0;background:none;translate:-50% calc(-1 * var(--boss) - 16px)}.stage img{position:relative;height:var(--boss);filter:drop-shadow(0 4px 2px #0006)}.stage.king{--boss: clamp(64px, 17dvh, 136px)}.stage b i{font-style:normal;font-size:14px;margin-right:2px}.stage b{display:flex;align-items:center;justify-content:center;min-width:64px;height:30px;margin-top:-14px;padding:0 8px;border-radius:50%;background:color-mix(in srgb,var(--area) 70%,#5a361a);border:2px solid #2a170a;color:#2a170a;font-size:15px;box-shadow:0 4px #2a170a}.stage small{margin-top:6px;padding:1px 6px;border-radius:6px;background:#2b1a0ecc;color:#fff6e5;font-size:11px;letter-spacing:0;line-height:1.3;max-width:120px}.stage.cleared img{filter:grayscale(.85) brightness(.8) drop-shadow(0 4px 2px #0006)}.stage.next img{animation:boss-bob 1.1s ease-in-out infinite alternate}@keyframes boss-bob{to{translate:0 -6px}}@media(prefers-reduced-motion:reduce){.stage.next img{animation:none}}.stage[aria-pressed=true] b{background:#ffd166;outline:3px solid #fff6e5;outline-offset:2px}.stage.sealed img{filter:brightness(0) opacity(.45)}.stage.sealed b{background:#3b2412;border-style:dashed;border-color:#a06a3c;color:#a06a3c;box-shadow:none}.map-panel{display:flex;align-items:center;gap:12px;padding:10px max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));background:#2b1a0ef0;border-top:2px solid #7a4722}#boss{height:64px;flex:none}#stage-info{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;font-size:14px}#stage-info strong{color:#ffd166;font-size:17px}#stage-info small{letter-spacing:0}.foes{display:flex;align-items:center;flex-wrap:wrap;font-size:12px}.foes img{height:30px}#go{flex:none;min-width:180px;padding:0 20px;background:#3f8f4a;font-weight:700;font-size:18px}#roster,#shop{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:6px}#roster,#shop{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}.roster-card{position:relative;min-width:0}.roster-card button.unit{width:100%;height:100%;padding-right:52px}.roster-card .slot{right:48px}.unit-info{position:absolute;right:2px;top:50%;translate:0 -50%;width:44px;min-height:44px;padding:0;border-radius:50%;background:#3b2412;color:#ffd166;font-size:25px}dialog.unit-detail{width:min(420px,calc(100vw - 32px));padding:20px;overflow-y:auto}.detail-heading{display:flex;align-items:center;gap:12px}.detail-heading img{width:80px;height:80px;object-fit:contain}.unit-detail .detail-close{width:100%;margin-top:12px;font-weight:700}button.unit{position:relative;display:flex;align-items:center;gap:6px;padding:4px 8px 4px 2px;text-align:left;border-radius:12px;min-height:64px}button.unit.special{background:#2f3f56;border-color:#6d8fbb}button.unit[aria-pressed=true]{outline:3px solid #ffd166;outline-offset:-2px}button.unit img{height:56px;flex:none}button.unit span{display:flex;flex-direction:column;min-width:0;font-size:13px;line-height:1.3;flex:1}button.unit small{font-size:11px;color:#f2cf9b;letter-spacing:0}button.unit em{font-style:normal;font-size:10px;color:#bfe6ff}button.unit i{display:block;height:3px;margin-top:3px;background:linear-gradient(90deg,#ffd166 calc(var(--x) * 100%),#2a170a 0);border-radius:2px}.slot{position:absolute;top:4px;right:6px;background:#ffd166;color:#3b2412;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;font-size:12px}#shop-section[hidden]{display:none}button.link{background:none;border:none;min-height:32px;margin-top:12px;font-size:11px;color:#c9a07a;text-decoration:underline}@media(max-width:600px){.map-panel{flex-wrap:wrap}#go{width:100%}.sheet{padding:16px 14px 6px}.actions{padding:8px 14px 12px}#roster,#shop{grid-template-columns:1fr}button.unit img{height:40px}button.unit span{font-size:11px}button.unit small{font-size:10px}#tray button small{top:2px;left:4px}}@media(max-height:480px){dialog p{font-size:12px;line-height:1.4}dialog h2{font-size:18px}.actions button{min-height:40px}}@media(max-height:480px){.map-bar{padding-block:4px}.map-bar h2{font-size:16px}#boss{height:44px}#stage-info small:last-child{display:none}}@media(max-width:600px){.map-bar{gap:8px}.map-bar h2{font-size:17px}.map-bar small{letter-spacing:0;white-space:nowrap}}
