dialog.pg-dialog{width:min(660px,calc(100vw - 24px));max-width:660px;padding:24px;max-height:calc(100dvh - 32px)}.pg-guide{--pg-cell:min(64px,calc((100vw - 110px)/6));--pg-clue-w:48px;--pg-clue-h:34px}.pg-progress{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 18px;color:#766b95;font-size:13px;font-weight:700}.pg-dots{display:flex;gap:8px}#pg-guide .pg-dots button{min-height:34px;width:34px;border-radius:50%;padding:0;font-size:13px;background:#f5f1fc;color:#76678f}#pg-guide .pg-dots button[aria-current=step]{background:#6e56b9;color:#fff;border-color:#6e56b9}#pg-title{margin:0 0 8px;font-size:clamp(19px,3vw,25px);line-height:1.35;letter-spacing:-.045em;color:#342d49}#pg-say{font-size:15px;line-height:1.65;color:#6f657c;margin:0 0 16px}.pg-stage{border:1px solid #e9e0ef;background:linear-gradient(135deg,#faf7fd,#f4faf5);border-radius:20px;padding:22px 8px 20px;min-height:180px;display:grid;place-items:center;overflow:hidden}.pg-board{display:grid;position:relative;width:max-content;isolation:isolate;user-select:none;-webkit-user-select:none}.pg-cell{box-sizing:border-box;width:var(--pg-cell);height:var(--pg-cell);display:grid;place-items:center;border:1px solid #d1c9df;background:#fff;border-radius:4px;font-weight:800;color:#493c62;font-size:calc(var(--pg-cell)*.4);position:relative;line-height:1}#pg-guide .pg-cell{min-height:0;min-width:0;padding:0;border-radius:4px;font-size:calc(var(--pg-cell)*.4);touch-action:manipulation}#pg-guide button.pg-cell:hover:not(.pg-fill):not(.pg-region):not(.pg-lit):not(.pg-lamp-on):not(.pg-entry):not(.pg-intersection){background:#f1eafb;border-color:#7b62ac}#pg-guide .pg-cell:focus-visible{outline:3px solid #db9b30;outline-offset:-3px;z-index:6}.pg-clue{display:grid;place-items:center;color:#6e56b9;font-size:18px;font-weight:850}#pg-board .pg-cell.pg-fill{background:#a991d5;border-color:#8e76b8}.pg-tree{background:#e2efda;font-size:calc(var(--pg-cell)*.55)}.pg-cell.pg-wall{background:#7b728c;color:#fff;border-color:#6b617c}#pg-board .pg-cell.pg-lit:not(.pg-wall){background:#fff0a8;border-color:#e6d391}.pg-cell.pg-focus{box-shadow:inset 0 0 0 3px #a689cf}.pg-cell.pg-bad{box-shadow:inset 0 0 0 3px #d46c60}#pg-board .pg-cell.pg-region{background:var(--pg-region);border-color:#bfb3d0}#pg-board .pg-region.pg-top{border-top:3px solid #746084}#pg-board .pg-region.pg-left{border-left:3px solid #746084}#pg-board .pg-region.pg-bottom{border-bottom:3px solid #746084}#pg-board .pg-region.pg-right{border-right:3px solid #746084}.pg-bridges{background:#deeff5;border-radius:14px;overflow:hidden}.pg-cell.pg-water{background:transparent;border:0}#pg-board .pg-cell.pg-island{background:#d9ebc8;border:2px solid #8bab7b;border-radius:50%;width:84%;height:84%;align-self:center;justify-self:center;z-index:2;color:#3e6246}.pg-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1}.pg-lines line{stroke:#b38b59;stroke-width:.09;stroke-linecap:round}.pg-lines .pg-line-bad{stroke:#cf7160}.pg-bridges button.pg-cell{z-index:3;background:transparent!important;color:#6d8a99;font-size:28px}.pg-hand{position:absolute;font-size:31px;line-height:1;pointer-events:none;z-index:7;filter:drop-shadow(0 2px 1px #fff9)}#pg-caption{min-height:52px;margin:12px 0 6px;padding:12px;border-radius:12px;background:#f3eef9;color:#665079;text-align:center;font-size:14px;font-weight:750;line-height:1.6}#pg-caption.pg-success{background:#e2f2df;color:#3e6c43}#pg-caption.pg-retry{background:#fff1de;color:#92642b}.pg-tools{display:flex;justify-content:center;gap:8px;min-height:42px}#pg-guide .pg-tools button{font-size:12px;min-height:36px;padding:6px 12px;background:transparent;border-color:transparent;color:#796b8c}.pg-footer{display:flex;justify-content:space-between;gap:12px;margin:16px 0}.pg-footer button:last-child{min-width:132px}.pg-details{border-top:1px solid #e9e0ef;padding-top:14px;margin-top:12px;font-size:13px}.pg-details summary{min-height:44px;display:list-item;cursor:pointer;color:#7c7289;padding:10px 0;font-weight:700}.pg-details .pg-full-rules{padding:4px 2px}.pg-full-rules li{font-size:13px!important}.pg-full-rules h3{font-size:14px!important}.pg-guide [hidden]{display:none!important}@media(max-width:480px){dialog.pg-dialog{padding:18px 14px}.pg-stage{padding:18px 2px;min-height:158px}#pg-say{font-size:14px}.pg-progress{margin-bottom:14px}.pg-clue{font-size:16px}.pg-footer{gap:8px}.pg-footer button{padding:9px 12px}.pg-hand{font-size:27px}}@media(prefers-reduced-motion:reduce){.pg-guide *{scroll-behavior:auto!important}}

#pg-guide button{min-height:44px;padding:8px 12px;border:1px solid #dbd3e6;border-radius:12px;background:#fff;color:#493c62;font:inherit;cursor:pointer}#pg-guide button:disabled{opacity:.45;cursor:default}#pg-guide .pg-footer button:last-child{background:#6e56b9;color:#fff}#pg-guide .pg-cell{padding:0;min-height:0}#pg-guide .pg-input{display:flex;justify-content:center;gap:8px;margin-top:12px}#pg-guide .pg-input:empty{display:none}#pg-board .pg-lamp-on{background:#fff0a8;color:#8b631b}#pg-board .pg-lamp-off{background:#e9e4f0;color:#797083}#pg-board .pg-box{background:#ead1a9;color:#664b2c}#pg-board .pg-box-goal{background:#d5ebcc}#pg-board .pg-goal{box-shadow:inset 0 0 0 3px #82a277}#pg-board .pg-given{color:#342d49}#pg-board .pg-entry{color:#6e56b9;background:#f3eefb}#pg-board .pg-sudoku-top{border-top:3px solid #746084}#pg-board .pg-sudoku-left{border-left:3px solid #746084}#pg-board .pg-sudoku-bottom{border-bottom:3px solid #746084}#pg-board .pg-sudoku-right{border-right:3px solid #746084}
#pg-guide .pg-input{flex-wrap:wrap}#pg-board .pg-cell .pg-hand{left:48%;top:48%}#pg-board .pg-long{font-size:14px;white-space:normal;line-height:1.3;overflow-wrap:anywhere}#pg-board .pg-board[class*=pg-cols-]{grid-template-columns:repeat(var(--cols),var(--pg-cell));grid-auto-rows:var(--pg-cell)}#pg-board .pg-cols-1{--cols:1}#pg-board .pg-cols-2{--cols:2}#pg-board .pg-cols-3{--cols:3}#pg-board .pg-cols-4{--cols:4}#pg-board .pg-cols-5{--cols:5}#pg-board .pg-cols-6{--cols:6}#pg-board .pg-cols-7{--cols:7;--pg-cell:min(64px,calc((100vw - 75px)/7))}#pg-board .pg-cols-8{--cols:8;--pg-cell:min(64px,calc((100vw - 75px)/8))}.cg-guide-entry{display:flex;justify-content:center;margin:12px auto}.cg-guide-entry button,.cg-learning-open{padding:10px 18px;min-height:44px;border:1px solid #d7cde8;border-radius:12px;color:#69528e;background:#fff;font-weight:700;cursor:pointer}.cg-learning-page{max-width:880px;margin:auto;padding:24px}.cg-learning-page h1{font-size:28px}.cg-guide-dialog{font-family:'Noto Sans KR',sans-serif;border:1px solid #e0d8ea;border-radius:24px;color:#342d49;box-sizing:border-box}.cg-guide-dialog::backdrop{background:#20233d77;backdrop-filter:blur(3px)}.cg-guide-head{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:18px}.cg-guide-head h2{font-size:19px;margin:0}.cg-guide-head button{padding:9px 14px;border-radius:12px;border:1px solid #d7cde8;background:white;min-height:44px;cursor:pointer}.cg-guide-dialog .pg-details button,.cg-guide-dialog .pg-details a{display:inline-flex;min-height:44px;align-items:center;padding:8px 12px;color:#6e56b9;border:1px solid #d7cde8;border-radius:10px;background:#fff}.cg-guide-dialog .pg-details li{line-height:1.7;margin:8px 0}.game-hub-learn{display:block;padding:10px 20px;text-align:center;border-top:1px solid #eee8f4;color:#77618c;font-size:13px;font-weight:700}.cg-guide-entry [hidden]{display:none!important}
#pg-guide .pg-input button{min-width:44px}
#pg-guide .pg-aim-control{touch-action:none}

#pg-board .pg-gomoku .pg-cell{border:0;border-radius:0;background:linear-gradient(#cbb797,#cbb797) center/100% 1px no-repeat,linear-gradient(#cbb797,#cbb797) center/1px 100% no-repeat}#pg-board .pg-chess .pg-cell,#pg-board .pg-janggi .pg-cell{font-size:calc(var(--pg-cell)*.6)}

#pg-board .pg-hextris .pg-cell[data-guide-cell="4"]{font-size:calc(var(--pg-cell)*.7)}

.pg-dialog [hidden]{display:none!important}
.pg-board.pg-mancala-board{display:grid;width:100%;max-width:560px;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:auto 112px 112px;gap:7px;align-items:stretch}
.pg-seed-hand{grid-column:1/-1;margin:0 0 5px;text-align:center;font-size:13px;font-weight:700;color:#6b528c;min-height:22px}
.pg-seed-pit{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:2px solid #d1bc9b;border-radius:50%;background:#f8eddd;color:#65503b;min-width:0}
.pg-seed-pit.pg-seed-mine{background:#f0e8fa;border-color:#b49ccb;color:#5e4281}
.pg-seed-pit.pg-seed-store{border-radius:32px;background:#e7d8c3}
.pg-seed-pit.pg-seed-store.pg-seed-mine{background:#daceef}
.pg-seed-pit.pg-focus{outline:3px solid #7955a9;outline-offset:1px}
.pg-seed-pit small{font-size:10px;text-align:center;line-height:1.3}
.pg-seed-pit strong{font-size:25px;line-height:1}
.pg-seed-dots{display:grid;grid-template-columns:repeat(3,5px);gap:3px;min-height:13px}
.pg-seed-dots i{width:5px;height:5px;border-radius:50%;background:#a66e27}
.pg-board.pg-hex-board{display:block;width:min(100%,340px);margin:auto}
.pg-hex-board svg{display:block;width:100%;height:auto;overflow:visible}
@media(max-width:480px){.pg-board.pg-mancala-board{gap:3px;grid-template-rows:auto 94px 94px}.pg-seed-pit{gap:5px;border-width:1px}.pg-seed-pit small{font-size:9px}.pg-seed-pit strong{font-size:20px}.pg-seed-pit.pg-seed-store{border-radius:20px}.pg-seed-dots{grid-template-columns:repeat(2,4px);gap:3px}.pg-seed-dots i{width:4px;height:4px}}

#pg-board .pg-safe-edge{background:#deeee6;border-color:#8aafa0}
#pg-board .pg-route-board,#pg-board .pg-route-board .pg-cell{touch-action:none;cursor:crosshair}
#pg-board .pg-route-board:focus-visible{outline:3px solid #db9b30;outline-offset:4px}
.pg-route-progress{display:grid;gap:6px;margin-top:14px;width:min(100%,320px);font-size:13px;font-weight:750;color:#376a56;text-align:center}
.pg-route-progress progress{width:100%;height:14px;accent-color:#408166}
#pg-board .pg-code-board{width:min(100%,260px)}
#pg-board .pg-code-board svg{display:block;width:100%;max-height:220px}
#pg-board .pg-maze-preview{width:max-content;grid-template-columns:repeat(var(--cols),var(--pg-cell))}
.pg-code-workspace{width:min(100%,320px);margin-top:12px;padding:12px;border:1px solid #d4c8e3;border-radius:12px;background:#fff;box-sizing:border-box;font-size:13px}
.pg-code-workspace strong{display:block;margin-bottom:8px;color:#426957}
.pg-code-workspace p{margin:6px 0;color:#6f657c;line-height:1.5}
.pg-command{width:fit-content;max-width:100%;padding:6px 12px;margin-top:3px;border-radius:5px;background:#795396;color:white;font-weight:700;box-sizing:border-box}
.pg-mode-preview{margin:12px 0 0;padding:8px 12px;border:1px solid #bba5d2;border-radius:10px;background:#fff;color:#5b4276;font-size:14px;font-weight:700}
#pg-guide .pg-input button[aria-pressed=true]{background:#e3f0e9;border-color:#55967b;color:#295f48}
.pg-repeat{margin-top:6px;padding:8px;border:3px solid #795396;border-left-width:10px;border-radius:8px;background:#f4eef9}
.pg-repeat>strong{margin:0 0 6px;color:#684786}
#pg-guide .pg-command{display:block;min-height:44px;padding:6px 12px;border-radius:5px;background:#795396;color:#fff;font-size:13px}
#pg-guide .pg-command[aria-pressed=true]{outline:3px solid #db9b30;outline-offset:1px}

/* Mini Sudoku guide contract: host games supply the lesson, never the shell. */
dialog[data-game-guide-style="mini-sudoku-v3"]{position:fixed;inset:0;box-sizing:border-box;width:min(660px,calc(100vw - 24px));max-width:660px;height:min(860px,calc(100svh - 24px));max-height:calc(100svh - 24px);padding:12px;margin:auto!important;border:1px solid #e0d8ea;border-radius:24px;background:#fffaf6;color:#433b52;font:400 16px/1.5 system-ui,-apple-system,sans-serif;letter-spacing:normal;word-break:keep-all;box-shadow:0 16px 48px #44305b22;overflow:hidden}
dialog[data-game-guide-style][open]{display:flex;flex-direction:column;gap:4px}
dialog[data-game-guide-style]:not([open]){display:none!important}
dialog[data-game-guide-style]::backdrop{background:#20233d77;backdrop-filter:blur(3px)}
dialog[data-game-guide-style] *{box-sizing:border-box}
dialog[data-game-guide-style] [data-guide-part="header"]{display:flex;align-items:center;justify-content:space-between;gap:12px;height:44px;min-height:44px;margin:0;padding:0}
dialog[data-game-guide-style] [data-guide-part="header"] h2{font:800 18px/1.3 system-ui,-apple-system,sans-serif;letter-spacing:-.03em;color:#433b52;margin:0;padding:0}
dialog[data-game-guide-style] [data-guide-part="header"] button{font:700 15px/1.25 system-ui,-apple-system,sans-serif;background:#fff;color:#69528e;border:1px solid #d7cde8;border-radius:12px;min-height:44px;min-width:64px;margin:0;padding:8px 12px;box-shadow:none}
dialog[data-game-guide-style] #pg-guide{--pg-cell:min(52px,calc(220px/var(--pg-rows,4)),calc((100vw - 104px)/var(--pg-cols,5)));--pg-clue-w:40px;--pg-clue-h:28px;display:grid;grid-template-rows:44px 32px 40px minmax(234px,1fr) 52px 44px 52px;gap:4px;flex:1;min-height:0;margin:0;padding:0;overflow:auto}
dialog[data-game-guide-style] #pg-guide .pg-progress{display:flex;align-items:center;justify-content:space-between;gap:6px;height:44px;margin:0;color:#76678f;font:700 13px/1.25 system-ui,-apple-system,sans-serif}
dialog[data-game-guide-style] #pg-counter{min-width:38px;white-space:nowrap}
dialog[data-game-guide-style] #pg-dots{display:flex;gap:4px;margin:0;padding:0;align-items:center;justify-content:center}
dialog[data-game-guide-style] #pg-guide button{font:700 16px/1.25 system-ui,-apple-system,sans-serif;letter-spacing:normal;min-height:44px;padding:8px 12px;margin:0;border:1px solid #dbd3e6;border-radius:12px;background:#fff;color:#493c62;box-shadow:none;touch-action:manipulation;transform:none}
dialog[data-game-guide-style] #pg-guide #pg-dots button{width:44px;min-width:44px;min-height:44px;border-radius:50%;padding:0;background:#f5f1fc;color:#76678f;font-size:14px}
dialog[data-game-guide-style] #pg-guide #pg-dots button[aria-current="step"]{background:#6e56b9;color:#fff;border-color:#6e56b9}
dialog[data-game-guide-style] #pg-title{font:800 25px/1.3 system-ui,-apple-system,sans-serif;letter-spacing:-.04em;display:flex;align-items:center;height:32px;color:#342d49;margin:0;padding:0}
dialog[data-game-guide-style] #pg-say{font:400 15px/1.6 system-ui,-apple-system,sans-serif;display:flex;align-items:center;height:40px;color:#6f657c;margin:0;padding:0}
dialog[data-game-guide-style] #pg-board{min-height:234px;height:100%;margin:0;padding:6px;border:1px solid #e9e0ef;border-radius:20px;background:linear-gradient(135deg,#faf7fd,#f4faf5);display:grid;place-items:center;align-content:center;gap:8px;overflow:auto}
dialog[data-game-guide-style] #pg-board.pg-stage-program{grid-template-columns:minmax(160px,1fr) minmax(180px,1fr)}
dialog[data-game-guide-style] #pg-board .pg-board{--pg-cell:min(52px,calc(220px/var(--pg-rows,4)),calc((100vw - 104px)/var(--pg-cols,5)))}
dialog[data-game-guide-style] #pg-board .pg-cell{min-height:0;min-width:0;padding:0;border-radius:4px}
dialog[data-game-guide-style] #pg-board .pg-hex-board{width:min(100%,220px)}
dialog[data-game-guide-style] #pg-board .pg-mancala-board{grid-template-rows:auto 92px 92px;gap:5px}
dialog[data-game-guide-style] #pg-input{height:52px;min-height:52px;display:flex;flex-wrap:wrap;justify-content:center;align-content:center;gap:6px;margin:0;padding:4px 0;overflow:auto}
dialog[data-game-guide-style] #pg-input:empty{display:flex}
dialog[data-game-guide-style] #pg-caption{height:44px;min-height:44px;margin:0;padding:6px 10px;border:0;border-radius:12px;background:#f3eef9;color:#665079;text-align:center;font:750 14px/1.4 system-ui,-apple-system,sans-serif;display:flex;align-items:center;justify-content:center}
dialog[data-game-guide-style] #pg-caption.pg-success{background:#e2f2df;color:#3e6c43}
dialog[data-game-guide-style] #pg-caption.pg-retry{background:#fff1de;color:#92642b}
dialog[data-game-guide-style] #pg-guide .pg-tools{display:flex;align-items:center;justify-content:flex-end;gap:4px;min-height:44px;margin:0;padding:0}
dialog[data-game-guide-style] #pg-guide .pg-tools button{font-size:12px;padding:8px;min-width:82px;background:transparent;border-color:transparent;color:#796b8c}
dialog[data-game-guide-style] #pg-guide .pg-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;height:52px;margin:0;padding:0;position:sticky;bottom:0;background:#fffaf6;z-index:10}
dialog[data-game-guide-style] #pg-guide .pg-footer button{min-width:144px;min-height:52px;padding:12px 16px;font-size:17px;border-radius:14px}
dialog[data-game-guide-style] #pg-guide .pg-footer button:is([data-guide-part="next"],[data-guide-part="start"]){background:#6e56b9;color:#fff;border-color:#6e56b9}
dialog[data-game-guide-style] #pg-guide button:hover:not(:disabled){filter:brightness(.96)}
dialog[data-game-guide-style] #pg-guide button:disabled{opacity:.45;cursor:default}
dialog[data-game-guide-style] :focus-visible{outline:3px solid #db9b30;outline-offset:2px}
dialog[data-game-guide-style] #pg-details{min-height:44px;margin:0;padding:0;border:0;border-top:1px solid #e9e0ef;overflow:auto;font:400 13px/1.6 system-ui,-apple-system,sans-serif}
dialog[data-game-guide-style] #pg-details summary{min-height:44px;margin:0;padding:10px 0;color:#7c7289;font-weight:700;cursor:pointer}
dialog[data-game-guide-style] #pg-details[open]{max-height:35svh;flex-shrink:0}
@media(max-width:600px){dialog[data-game-guide-style="mini-sudoku-v3"]{padding:12px;border-radius:20px}dialog[data-game-guide-style] [data-guide-part="header"] h2{font-size:16px}dialog[data-game-guide-style] #pg-guide{grid-template-rows:88px 56px 72px minmax(180px,1fr) 96px 64px 56px}dialog[data-game-guide-style] #pg-guide .pg-progress{flex-wrap:wrap;height:88px;justify-content:center;column-gap:8px}dialog[data-game-guide-style] #pg-title{height:56px;font-size:22px}dialog[data-game-guide-style] #pg-say{height:72px;font-size:14px}dialog[data-game-guide-style] #pg-caption{height:64px;font-size:13px}dialog[data-game-guide-style] #pg-guide .pg-footer button{min-width:0;padding:10px;font-size:15px}dialog[data-game-guide-style] #pg-board.pg-stage-program{grid-template-columns:minmax(120px,1fr) minmax(140px,1fr)}}

dialog[data-game-guide-style] #pg-input button{font-size:15px;padding:8px}
dialog[data-game-guide-style] #pg-board .pg-hp-board{width:min(100%,225px);max-height:220px}

dialog[data-game-guide-style] #pg-guide .pg-footer button{width:180px;min-width:180px;flex:0 0 180px}
@media(max-width:600px){dialog[data-game-guide-style] #pg-guide .pg-footer button{width:auto;min-width:0;flex:1}}
