.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}


/* POINT8 — MAZE REVISION PATCH */
.pgame-maze-meta{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-bottom:12px}
.pgame-maze-meta span{border:1px solid rgba(226,181,118,.26);border-radius:999px;padding:7px 12px;font-size:10px;letter-spacing:.08em;color:#f0d9ba;background:rgba(15,10,8,.58);box-shadow:inset 0 1px rgba(255,236,210,.08)}
.pgame-maze{--maze-wall:#d9a56e;display:grid;width:min(100%,680px);aspect-ratio:1;margin:0 auto;background:linear-gradient(180deg,rgba(17,11,8,.94),rgba(40,23,13,.92));border:4px solid var(--maze-wall);border-radius:18px;overflow:hidden;box-shadow:0 0 0 1px #4b3524,0 18px 38px rgba(0,0,0,.34),inset 0 0 32px rgba(239,176,108,.08)}
.pgame-maze-cell{aspect-ratio:1;background:linear-gradient(180deg,#17110d,#110c09);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,transform .12s ease}
.pgame-maze-cell.visited{background:linear-gradient(180deg,#261a12,#1a120d);color:#f2d2a7}
.pgame-maze-cell.start{background:linear-gradient(180deg,#282017,#1c140d);color:#f6d9ac}
.pgame-maze-cell.current{background:linear-gradient(180deg,#8c5932,#6a4324);color:#fff;box-shadow:inset 0 0 0 3px #ffd2a3,0 0 18px rgba(239,176,108,.24);transform:scale(1.02)}
.pgame-maze-cell.goal{background:linear-gradient(180deg,#24331d,#162015);color:#d8f0ca;box-shadow:inset 0 0 0 3px #8fbd7e}
.pgame-maze-cell:hover{background:#2a1e16}
.pgame-maze-cell.visited:hover{background:#312217}
.pgame-maze-cell.current:hover{background:linear-gradient(180deg,#8c5932,#6a4324)}
.pgame-maze-cell.goal:hover{background:linear-gradient(180deg,#24331d,#162015)}


/* POINT8 — Maze refresh and procedural readability pass */
.pgame{color:#fff0da}
.pgame-actions .btn{box-shadow:0 8px 24px rgba(0,0,0,.24)}
.pgame-maze-meta{justify-content:center;gap:10px;margin-bottom:10px}
.pgame-maze-meta span{background:rgba(15,10,8,.72);border-color:rgba(238,179,112,.34);color:#ffe1bb;box-shadow:inset 0 1px rgba(255,236,210,.12)}
.pgame-maze{--maze-wall:#e1a261;padding:8px;border-radius:18px;background:linear-gradient(180deg,rgba(24,16,11,.98),rgba(12,8,6,.98));box-shadow:0 0 0 1px rgba(96,61,35,.92),0 14px 34px rgba(0,0,0,.34),inset 0 0 28px rgba(219,104,39,.08)}
.pgame-maze-cell{background:#120c09;color:#f8d2a3;border-radius:12px;box-shadow:inset 0 0 0 1px rgba(255,214,168,.05);font-size:clamp(14px,2.1vw,24px)}
.pgame-maze-cell.visited{background:#22160f;color:#c68d5a}
.pgame-maze-cell.reachable{background:#1a120d;box-shadow:inset 0 0 0 1px rgba(255,187,116,.10),0 0 0 1px rgba(255,187,116,.06)}
.pgame-maze-cell.start{background:#142011;color:#b9e0a6}
.pgame-maze-cell.current{background:#8a4f26;color:#fff8ec;box-shadow:inset 0 0 0 3px #ffd6a5,0 0 18px rgba(234,128,61,.22)}
.pgame-maze-cell.goal{background:#223115;color:#dcffbf;box-shadow:inset 0 0 0 3px #9fd17f,0 0 18px rgba(133,188,99,.14)}
.pgame-maze-cell:hover{background:#2a1c13}
.pgame-maze-cell.reachable:hover{background:#3b2415}
.pgame-sequence li,.pgame-sequence li *{color:#fff0da!important}
.pgame-note{background:rgba(14,10,8,.72);border-color:rgba(238,179,112,.34);color:#f6e3c6}


/* POINT8 — PROCEDURAL CINEMATIC PATCH */
.pgame{color:#fff0da}
.pgame-sequence li,.pgame-match-row,.pgame-clues,.pgame-note,.pgame-select,.pgame-scene-item{background:rgba(12,8,6,.70)!important;border-color:rgba(232,178,114,.28)!important;color:#fff0da!important}
.pgame-sequence li::before{border-color:#d79d67;color:#ffd39e;background:rgba(43,24,13,.72)}
.pgame-order-controls button{background:rgba(32,19,11,.84)!important;border-color:rgba(232,178,114,.30)!important;color:#fff0da!important}
.pgame-maze{background:linear-gradient(180deg,rgba(24,16,11,.98),rgba(12,8,6,.98))!important}
.pgame-maze-cell{transition:background .12s ease,box-shadow .12s ease,transform .12s ease}
.pgame-maze-cell.reachable{box-shadow:inset 0 0 0 1px rgba(255,196,134,.14),0 0 0 1px rgba(255,196,134,.08)!important}


/* TRACES IN TIME — NATURAL CONTEXTUAL MAZE */
.pgame-natural-maze{gap:10px}
.pgame-natural-maze .pgame-maze-meta{margin-bottom:2px}
.pgame-maze-stage{
  width:min(100%,760px);
  margin:0 auto;
  aspect-ratio:12/7;
  overflow:hidden;
  border:1px solid rgba(231,190,132,.34);
  border-radius:16px;
  background:#243a26;
  box-shadow:0 14px 34px rgba(0,0,0,.30),inset 0 0 0 1px rgba(255,255,255,.025);
  touch-action:none;
  outline:none;
}
.pgame-maze-canvas{
  display:block;
  width:100%;
  height:100%;
  aspect-ratio:12/7;
  touch-action:none;
  cursor:grab;
  outline:none;
}
.pgame-maze-canvas:active{cursor:grabbing}
.pgame-natural-maze .pgame-note{
  width:min(100%,760px);
  margin:0 auto;
  padding:8px 10px;
  font-size:11px;
  line-height:1.4;
}
@media(max-width:700px){
  .pgame-maze-stage,.pgame-natural-maze .pgame-note{width:100%}
  .pgame-natural-maze .pgame-maze-meta{gap:6px}
  .pgame-natural-maze .pgame-maze-meta span{padding:5px 8px;font-size:9px}
}
