.answer-grid.procedural-active{display:block}
.pgame{display:grid;gap:14px;width:100%}
.pgame-note{border:1px solid var(--line);border-radius:10px;padding:10px 12px;color:var(--muted);background:#17120e;font-size:12px}
.pgame-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:4px}
.pgame-counter{font-size:12px;font-weight:900;color:var(--ochre)}
.pgame-select-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.pgame-select{min-height:92px;border:1px solid var(--line);border-radius:12px;background:#16120f;color:var(--ink);padding:12px;text-align:left;cursor:pointer;display:flex;gap:10px;align-items:center}
.pgame-select:hover{border-color:#9a7049;background:#20170f}
.pgame-select.selected{border-color:#c08a55;background:rgba(192,138,85,.14)}
.pgame-select small{display:block;color:var(--muted)}
.pgame-icon{font-size:27px;min-width:34px;text-align:center;color:#f4bc8d}
.pgame-match{display:grid;gap:9px}
.pgame-match-row{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(180px,1fr);gap:10px;align-items:center;border:1px solid var(--line);border-radius:11px;padding:11px;background:#17120e}
.pgame-match-row span{font-weight:750}
.pgame select{width:100%;min-height:46px;border:1px solid var(--line);border-radius:9px;background:#120f0c;color:var(--ink);padding:8px}
.pgame-sequence{display:grid;gap:8px;margin:0;padding:0;list-style:none;counter-reset:step}
.pgame-sequence li{counter-increment:step;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;border:1px solid var(--line);border-radius:11px;padding:10px 10px 10px 44px;background:#17120e;position:relative}
.pgame-sequence li:before{content:counter(step);position:absolute;left:13px;width:22px;height:22px;border:1px solid #8c633d;border-radius:50%;display:grid;place-items:center;color:#f4bc8d;font-size:11px;font-weight:900}
.pgame-order-controls{display:flex;gap:5px}
.pgame-order-controls button{width:38px;height:38px;border:1px solid var(--line);border-radius:8px;background:#21170f;color:var(--ink);font-weight:900}
.pgame-scenes{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pgame-scenes h4{margin:0 0 7px;color:var(--ochre);font-size:11px;letter-spacing:.09em}
.pgame-scene-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.pgame-scene-item{min-height:86px;border:1px solid var(--line);border-radius:10px;background:#17120e;color:var(--ink);display:grid;place-items:center;padding:8px;text-align:center}
.pgame-scene-item span{font-size:24px;color:#f4bc8d}
.pgame-scene-item small{font-size:10px;color:#cdbda9;line-height:1.2}
button.pgame-scene-item.selectable{cursor:pointer}
button.pgame-scene-item.selected{border-color:#c08a55;background:rgba(192,138,85,.14)}
.pgame-clues{display:grid;gap:6px;border:1px solid var(--line);border-radius:12px;padding:12px;background:#17120e;color:#d9cbb8}
.pgame-logic{display:grid;gap:8px}
.pgame-logic label{display:grid;grid-template-columns:minmax(90px,.6fr) 1fr;align-items:center;gap:10px;border-bottom:1px solid rgba(255,255,255,.06);padding:7px 0}
.pgame-logic label span{font-weight:900}
.pgame-maze-meta{display:flex;gap:8px;flex-wrap:wrap}
.pgame-maze-meta span{border:1px solid var(--line);border-radius:999px;padding:6px 9px;font-size:10px;color:var(--muted)}
.pgame-maze{--maze-wall:#d39a62;display:grid;width:min(100%,620px);aspect-ratio:1;margin:0 auto;background:#0d0a08;border:4px solid var(--maze-wall);box-shadow:0 0 0 1px #4b3524,0 10px 30px rgba(0,0,0,.28)}
.pgame-maze-cell{aspect-ratio:1;background:#17110d;color:#ffc184;border-radius:0;padding:0;font-size:clamp(14px,2.2vw,22px);font-weight:900;cursor:pointer;min-width:0;transition:background .12s ease,box-shadow .12s ease}
.pgame-maze-cell.current{background:#6a4324;color:#fff;box-shadow:inset 0 0 0 3px #ffd2a3}
.pgame-maze-cell.goal{background:#162015;color:#bde7ad;box-shadow:inset 0 0 0 3px #8fbd7e}
@media(max-width:700px){
  .pgame-select-grid,.pgame-scenes{grid-template-columns:1fr}
  .pgame-scene-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .pgame-match-row{grid-template-columns:1fr}
  .pgame-actions{justify-content:space-between}
}
@media(max-width:430px){
  .pgame-scene-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pgame-select{min-height:76px}
}
.pgame-maze-cell:hover{background:#241a13}
.pgame-maze-cell.current:hover{background:#6a4324}
.pgame-maze-cell.goal:hover{background:#162015}
