.ap-game{--ap-ink:#29483f;position:relative;max-width:530px;margin:auto;padding:22px 18px;color:var(--ap-ink);font-family:inherit}
.ap-game button,.ap-game select{font:inherit;color:inherit}.ap-game button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ap-game button:focus-visible,.ap-game select:focus-visible{outline:3px solid #c28b3b;outline-offset:2px}.ap-game button:disabled{cursor:default}.ap-toolbar{display:flex;gap:12px;align-items:flex-end;justify-content:space-between;margin-bottom:12px}.ap-level-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;flex:1;min-width:0}.ap-level-label select{display:block;width:100%;margin-top:5px;border:1px solid #c7d4c9;border-radius:9px;padding:10px 28px 10px 10px;background:#fff;font-size:13px;letter-spacing:0;text-transform:none;min-height:44px}.ap-progress{font-size:12px;white-space:nowrap;padding-bottom:13px;font-variant-numeric:tabular-nums}.ap-intro{font-size:13px;line-height:1.6;margin:0 0 16px;color:#62766a}
.ap-board-wrap{position:relative;max-width:440px;margin:auto;overflow:hidden;border:1px solid #ccd7c9;border-radius:14px;background:#fbfcf5;box-shadow:0 5px 0 #dce3d5}.ap-board{display:grid;grid-template-columns:repeat(var(--ap-cols),minmax(0,1fr));grid-template-rows:repeat(var(--ap-rows),minmax(0,1fr));width:100%;background-image:radial-gradient(circle,#dce3d5 1.2px,transparent 1.8px);background-size:calc(100% / var(--ap-cols)) calc(100% / var(--ap-rows));position:relative;isolation:isolate}.ap-ray{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}.ap-arrow{padding:0;border:0;background:transparent;min-width:0;min-height:0;position:relative;z-index:1;border-radius:12px;color:var(--ap-color)!important;transition:background .12s;outline-offset:-2px!important}.ap-arrow svg{width:100%;height:100%;display:block;overflow:visible}.ap-line{fill:none;stroke:currentColor;stroke-width:4.5;stroke-linejoin:round;stroke-linecap:round}.ap-label-disc{fill:#fbfcf5;stroke:currentColor;stroke-width:1.7}.ap-arrow text{font-size:11px;fill:currentColor;font-family:inherit;font-weight:700}.ap-arrow:hover{background:#496a4b0a}.ap-arrow:focus-visible{outline-color:#c18b39;background:#edd7a139}.ap-hinted{box-shadow:inset 0 0 0 2px #b28b48;background:#f3e7c75e}.ap-blocked{box-shadow:inset 0 0 0 2px #b05d47;background:#f7e9e2;color:#a94c36!important}.ap-blocker{background:#f5ded452;box-shadow:inset 0 0 0 1px #bc807066}.ap-leaving{animation:ap-leave .21s ease-in forwards;pointer-events:none}.ap-leaving[data-direction=right]{--ap-x:28px;--ap-y:0px}.ap-leaving[data-direction=left]{--ap-x:-28px;--ap-y:0px}.ap-leaving[data-direction=down]{--ap-x:0px;--ap-y:28px}.ap-leaving[data-direction=up]{--ap-x:0px;--ap-y:-28px}@keyframes ap-leave{to{transform:translate(var(--ap-x),var(--ap-y));opacity:0}}
.ap-tools{display:flex;gap:10px;max-width:440px;margin:18px auto 0}.ap-tools button,.ap-complete button,.ap-confirm button{border:1px solid #ccd6c8;background:#fffdf6;border-radius:8px;min-height:44px;padding:8px 15px;font-size:13px;font-weight:600}.ap-tools button{flex:1}.ap-tools button:disabled{opacity:.5}.ap-complete{display:flex;gap:12px;align-items:center;max-width:440px;margin:18px auto 0;padding:14px;border-radius:10px;background:#e9efd8;border:1px solid #c5d1ac}.ap-complete[hidden]{display:none}.ap-complete>span{font-size:29px;color:#819143}.ap-complete strong{font-size:16px}.ap-complete p{margin:4px 0 0;font-size:12px;line-height:1.45}.ap-complete button{margin-left:auto;flex-shrink:0;font-size:12px}.ap-status{min-height:40px;max-width:440px;margin:14px auto 8px;font-size:13px;text-align:center;line-height:1.5}.ap-footnote{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 15px;font-size:10px;line-height:1.5;color:#71806b}.ap-help{max-width:440px;margin:14px auto 0;font-size:11px;line-height:1.7;color:#63745f}.ap-help summary{cursor:pointer;text-align:center}.ap-help p{margin-bottom:0}.ap-confirm{max-width:min(400px,calc(100vw - 36px));padding:24px;border:1px solid #c6d1bd;border-radius:16px;color:var(--ap-ink);box-shadow:0 20px 80px #1d32294d}.ap-confirm::backdrop{background:#21372e75}.ap-confirm h2{font-size:20px;margin:0 0 10px}.ap-confirm p{font-size:14px;line-height:1.6}.ap-confirm>div{display:flex;gap:8px;justify-content:flex-end}.ap-confirm .ap-confirm-yes{background:#466c52;color:#fff;border-color:#466c52}
@media(max-width:440px){.ap-game{padding:16px 8px}.ap-toolbar{gap:7px}.ap-progress{font-size:11px}.ap-level-label select{font-size:12px}.ap-complete{gap:8px;padding:11px}.ap-complete>span{display:none}.ap-complete strong{font-size:14px}.ap-help{font-size:12px}.ap-arrow{border-radius:8px}}
@media(prefers-reduced-motion:reduce){.ap-arrow{transition:none}.ap-leaving{animation:none;opacity:0}}
