:root{font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;color:oklch(from #16334c l c h);background:oklch(from #000f3f l c h);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid oklch(85% .18 85);outline-offset:3px}button:disabled{cursor:default;opacity:.6}[hidden]{display:none!important}
.wig-game{--wig-ink:oklch(from #16334c l c h);--wig-cream:oklch(from #fffaf0 l c h);--wig-orange:oklch(from #e9592d l c h)}
.game-frame{position:relative;container-type:inline-size;isolation:isolate;background:oklch(from #f9eacc l c h)}
#game{display:block;inline-size:100%;block-size:100%;touch-action:none;user-select:none;outline-offset:-4px}
.hud{position:absolute;inset-block-start:.625rem;inset-inline:4.5%;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.375rem .5rem;border-radius:.5rem;background:color-mix(in oklch,oklch(from #173953 l c h) 92%,transparent);color:oklch(1 0 none);pointer-events:none}
.hud>div{min-inline-size:0;display:flex;flex-direction:column;gap:.125rem}.hud small{display:block;font-size:clamp(.375rem,2.6cqi,.625rem);white-space:nowrap}.hud strong{font-size:clamp(.625rem,5cqi,1.25rem);font-variant-numeric:tabular-nums;line-height:1.05;white-space:nowrap}.hud strong>span{font-size:.55em;margin-inline-start:.125rem}
.wig-game.is-expanded .hud>div{flex-direction:row;align-items:center;gap:.25rem}.wig-game.is-expanded .hud strong{font-size:clamp(.625rem,4cqi,1.125rem)}
#lives .remaining-lives{color:oklch(from #ffc05c l c h)}#lives .lost-lives{color:oklch(1 0 none / .25)}#lives span{font-size:1em;margin:0;letter-spacing:.1em}
.overlay{position:absolute;inset:0;z-index:4;display:flex;align-items:center;justify-content:center;padding-block:4.75rem .5rem;padding-inline:.5rem;background:oklch(from #143451 l c h / .27);overflow-y:auto}
.card{flex:none;inline-size:min(100%,300px);max-block-size:100%;overflow-y:auto;text-align:center;color:var(--wig-ink);background:var(--wig-cream);border:2px solid oklch(1 0 none);border-radius:1rem;padding:.75rem .625rem;box-shadow:0 .5rem 1.5rem oklch(20% .04 250 / .2)}
.tag{font-size:clamp(.5rem,3cqi,.6875rem);color:oklch(from #b84a22 l c h);font-weight:800;letter-spacing:.05em;margin:0 0 .5rem}
.wig-game .overlay h2{font-size:clamp(1rem,6cqi,1.5rem);line-height:1.25;margin:0 0 .5rem;font-weight:900}
.card>p:not(.tag){font-size:clamp(.5625rem,3cqi,.75rem);line-height:1.65;margin:.375rem 0}.card .fine{font-size:clamp(.5rem,2.5cqi,.625rem);color:oklch(from #526878 l c h)}
.primary{display:block;inline-size:100%;min-block-size:44px;padding:.5rem .75rem;border:0;border-block-end:3px solid oklch(from #b83d17 l c h);border-radius:.75rem;margin-block-start:.625rem;color:oklch(1 0 none);background:var(--wig-orange);font-size:clamp(.75rem,4cqi,1rem);font-weight:900}.primary:active{translate:0 2px}
.move-controls{position:absolute;inset-inline:.5rem;inset-block-end:.375rem;z-index:2;display:grid;grid-template-columns:1fr 1.2fr 1fr;align-items:center;gap:.375rem;padding:.25rem;background:color-mix(in oklch,var(--wig-ink) 93%,transparent);border-radius:.625rem}
.move-controls button{min-inline-size:44px;min-block-size:44px;padding:.25rem;border:0;border-block-end:3px solid oklch(from #cc9a3e l c h);border-radius:.5rem;background:oklch(from #ffcd71 l c h);color:var(--wig-ink);font-size:clamp(.5625rem,3.4cqi,.875rem);font-weight:900}.move-controls button:active{translate:0 2px}
#shield-label{text-align:center;font-size:clamp(.5rem,2.7cqi,.6875rem);font-weight:800;color:oklch(from #bbc8d1 l c h)}#shield-label.active{color:oklch(from #ffdc8d l c h)}
.result-panel{display:flex;justify-content:center;align-items:center;gap:.375rem;margin:.5rem 0}
#result-face{inline-size:clamp(3.25rem,30cqi,7.5rem);block-size:auto;border-radius:50%;background:radial-gradient(ellipse,oklch(from #ffe0a5 l c h) 35%,transparent 72%)}
.result-panel small{font-size:clamp(.4375rem,2.6cqi,.625rem);color:oklch(from #526878 l c h)}#result{margin:.25rem 0 0;font-size:clamp(.875rem,6cqi,1.625rem);font-weight:900;color:oklch(from #d94e25 l c h);white-space:nowrap;font-variant-numeric:tabular-nums}
.cutin{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;justify-content:center;gap:1rem;background:oklch(from #ffbc32 l c h);overflow:clip;pointer-events:none}
.hero-crop{inline-size:100%;aspect-ratio:478/354;background-image:url('assets/character-sheet.webp');background-repeat:no-repeat;background-size:321.339% 289.27%;background-position:100% 100%;box-shadow:0 6px 0 var(--wig-ink)}
.hero-copy{padding:clamp(.5rem,4cqi,1.375rem) .375rem;text-align:center;background:oklch(from #173953 l c h);color:oklch(1 0 none);rotate:-3deg;box-shadow:0 5px 0 oklch(from #d94e25 l c h)}.hero-copy small,.hero-copy span{display:block;font-size:clamp(.5rem,3cqi,.8125rem);color:oklch(from #ffdc8d l c h)}.hero-copy strong{display:block;font-size:clamp(.75rem,6cqi,1.5625rem);margin:.25rem 0}
.toast{position:absolute;inset-inline:.625rem;inset-block-start:35%;z-index:3;padding:.375rem;border-radius:.5rem;text-align:center;font-size:clamp(.625rem,4cqi,1rem);font-weight:900;color:oklch(1 0 none);background:color-mix(in oklch,var(--wig-ink) 90%,transparent);opacity:0;pointer-events:none}.toast.show{opacity:1}.overlay.is-result:not([hidden])~.toast{display:none}
dialog{border:1px solid oklch(1 0 none);border-radius:1rem;inline-size:min(420px,92vw);max-block-size:calc(100dvh - 24px);overflow-y:auto;padding:1.25rem;color:var(--wig-ink);background:var(--wig-cream)}dialog::backdrop{background:oklch(15% .05 250 / .75)}dialog h2{font-size:1.25rem;margin-block:0 .75rem}dialog ol{padding-inline-start:1.25rem;font-size:.8125rem;line-height:1.8}dialog li+li{margin-block-start:.5rem}dialog p{font-size:.6875rem;line-height:1.6;color:oklch(from #526878 l c h)}
.status:empty{display:none}.status{font-size:.75rem;text-align:center;color:oklch(1 0 none)}
@container (max-width:230px){.card .tag,.card #overlay-copy,.card #overlay-note,.wig-game.is-expanded .hud small{display:none}.card{padding:.5rem}.result-panel{margin:.25rem 0}.wig-game .overlay h2{font-size:1rem}.primary{margin-block-start:.375rem}.hero-copy{rotate:0}}
@media (prefers-reduced-motion:no-preference){.toast{transition:opacity .15s linear}.cutin{animation:hero-arrive .16s ease-out}@keyframes hero-arrive{from{translate:100% 0}to{translate:0 0}}}
