.p-thinking-game{--pt-ink:#263d48;--pt-line:#d8e4df;color:var(--pt-ink);width:100%;max-width:760px;margin-inline:auto;min-width:0;text-align:center}
.p-thinking-game *{box-sizing:border-box}
.p-thinking-game .pt-stage{display:flex;flex-direction:column;align-items:center;gap:20px;min-width:0}
.p-thinking-game button{font:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
.p-thinking-game button:focus-visible,.p-thinking-game:focus-visible{outline:4px solid #185d7c;outline-offset:4px}
.p-thinking-game button:disabled{cursor:default}
.p-thinking-game .pt-options{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;width:100%}
.p-thinking-game .pt-options>.p-choice{min-width:72px;min-height:76px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-weight:800;font-size:clamp(1.5rem,6vw,2.6rem);border:2px solid var(--pt-ink);border-radius:20px;background:#fffdf6;color:var(--pt-ink);box-shadow:0 4px 0 #d7e1dc;padding:10px 16px}
.p-thinking-game .pt-options>.p-choice svg{width:60px;height:60px}
.p-thinking-game .pt-options>.p-choice:has(svg){font-size:.95rem;padding:8px;min-width:80px}
.p-thinking-game .pt-options>.p-choice:active{transform:translateY(3px);box-shadow:0 1px 0 #d7e1dc}
.p-thinking-game .p-hint{min-height:3em;line-height:1.8;margin:18px auto 0;max-width:38em;font-size:1rem}
.p-thinking-game .pt-garden{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;background:#eef5d9;border:2px solid #dce7bd;border-radius:28px;padding:16px;width:min(100%,430px)}
.p-thinking-game .pt-flower{padding:0;min-width:44px;min-height:64px;background:transparent;border:2px solid transparent;border-radius:16px;position:relative}
.p-thinking-game .pt-flower svg{width:100%;height:auto;display:block}
.p-thinking-game .pt-flower.is-counted{background:#fffdf5;border-color:#77a16b}
.p-thinking-game .pt-train{display:flex;gap:6px;align-items:center;justify-content:center;flex-wrap:wrap;width:100%;padding:14px 0 20px}
.p-thinking-game .pt-carriage{display:flex;align-items:center;justify-content:center;position:relative;width:clamp(42px,10vw,76px);height:clamp(48px,12vw,86px);background:#fff8e6;border:2px solid #9caeaf;border-radius:12px}
.p-thinking-game .pt-carriage:after{content:"";position:absolute;left:12%;right:12%;bottom:-9px;height:12px;border-left:10px solid #263d48;border-right:10px solid #263d48}
.p-thinking-game .pt-carriage svg{width:88%;height:88%}
.p-thinking-game .pt-missing{font-size:2rem;color:#56676a;border-style:dashed}
.p-thinking-game .pt-memory{display:grid;grid-template-columns:repeat(var(--pt-columns,4),minmax(0,1fr));gap:12px;width:min(100%,440px)}
.p-thinking-game .pt-memory-card{aspect-ratio:1;min-height:64px;min-width:44px;position:relative;border:3px solid #263d48;border-radius:18px;padding:8px;background:#c7e8e7;box-shadow:0 4px 0 #a1c6c6;color:#263d48}
.p-thinking-game .pt-card-back{font-size:clamp(1.6rem,6vw,2.5rem);font-weight:800;display:flex;align-items:center;justify-content:center;height:100%}
.p-thinking-game .pt-card-front{display:none;align-items:center;justify-content:center;height:100%}
.p-thinking-game .pt-card-front svg{display:block;width:100%;height:100%;max-height:100px}
.p-thinking-game .pt-memory-card.is-open,.p-thinking-game .pt-memory-card.is-matched{background:#fffdf5}
.p-thinking-game .pt-memory-card.is-open .pt-card-front{display:flex}
.p-thinking-game .pt-memory-card.is-open .pt-card-back{display:none}
.p-thinking-game .pt-memory-card.is-matched{border-color:#45815f;box-shadow:0 4px 0 #a5c5ac}
.p-thinking-game .pt-number-options{max-width:460px}
.p-thinking-game .pt-number-options>.p-choice{flex:0 1 76px;min-width:64px;padding:8px}
.p-thinking-game .pt-number-options>.p-choice.is-found{background:#e1f0df;color:#537458;border-color:#7e9e83;box-shadow:none;opacity:.65}
.p-thinking-game .pt-number-trail{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;min-height:42px;width:100%}
.p-thinking-game .pt-number-trail span{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#e1f0df;font-weight:800;border:1px solid #8eaa8e}
.p-thinking-game .pt-word-picture{width:150px;height:150px;background:#fff6df;border-radius:30px;padding:16px}
.p-thinking-game .pt-word-name{font-size:2.25rem;letter-spacing:.2em;font-weight:800;margin:0}
.p-thinking-game .pt-path-board{display:grid;grid-template-columns:repeat(var(--pt-size,3),minmax(0,1fr));width:min(100%,330px);gap:5px;background:#d8e9cb;border:8px solid #d8e9cb;border-radius:20px}
.p-thinking-game .pt-path-cell{aspect-ratio:1;position:relative;display:grid;place-items:center;border-radius:10px;min-width:0}
.p-thinking-game .pt-path-cell.is-path{background:#fffdf5;border:1px solid #dddac7}
.p-thinking-game .pt-path-cell.is-garden{background:#8fbd78;background-image:radial-gradient(#c8dfa7 2px,transparent 3px);background-size:15px 15px}
.p-thinking-game .pt-path-cell>svg{width:82%;height:82%}
.p-thinking-game .pt-walker{position:absolute;inset:8%;display:grid;place-items:center}
.p-thinking-game .pt-walker svg{width:100%;height:100%}
.p-thinking-game .pt-path-position{font-size:.9rem;line-height:1.6;margin:0}
.p-thinking-game .pt-directions{display:grid;grid-template-columns:repeat(3,76px);grid-template-areas:". up ." "left down right";gap:9px}
.p-thinking-game .pt-direction{min-width:64px;min-height:70px;border:2px solid #263d48;border-radius:18px;background:#ffe9a3;color:#263d48;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:700;box-shadow:0 4px 0 #cfbd88;padding:4px}
.p-thinking-game .pt-direction svg{width:30px;height:30px}
.p-thinking-game .pt-direction-うえ{grid-area:up}.p-thinking-game .pt-direction-ひだり{grid-area:left}.p-thinking-game .pt-direction-みぎ{grid-area:right}.p-thinking-game .pt-direction-した{grid-area:down}
@media(max-width:380px){.p-thinking-game .pt-garden{gap:4px;padding:8px}.p-thinking-game .pt-memory{gap:8px}.p-thinking-game .pt-memory-card{border-radius:13px;padding:4px}.p-thinking-game .pt-train{gap:4px}.p-thinking-game .pt-carriage{width:42px;height:50px}.p-thinking-game .pt-options{gap:8px}.p-thinking-game .pt-options>.p-choice{min-width:68px;min-height:72px;padding:8px}.p-thinking-game .pt-options>.p-choice:has(svg){min-width:76px}.p-thinking-game .pt-number-options>.p-choice{flex-basis:64px;min-width:56px}}
@media(prefers-reduced-motion:reduce){.p-thinking-game *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
