:root{--ink:#26372e;--muted:#637064;--line:#deded1;--paper:#f7f6ef;--soft:#edeee4;--accent:#335e45;--sans:Arial,Helvetica,sans-serif;--mono:"Courier New",monospace}
.game-shell canvas{height:auto!important}.intro .template-explainer{font-size:12px;line-height:1.6;border-left:2px solid #b8c2af;padding-left:12px;margin-top:14px}.share-link-wrap{margin-top:14px}.share-link-wrap input{width:100%;min-height:44px;padding:8px;border:1px solid #bfc6b9;background:#fffefb;border-radius:4px;font:12px var(--mono)}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.55 var(--sans)}a{color:var(--accent);text-underline-offset:3px}.site-header{max-width:1248px;margin:auto;padding:18px 28px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:16px}.brand{font-weight:800;font-size:20px;letter-spacing:-.6px;text-decoration:none;color:var(--ink)}.home-link{display:inline-flex;align-items:center;min-height:44px;padding:0 8px;font-size:14px;font-weight:700;text-decoration:none}main{max-width:1248px;margin:auto;padding:32px 28px 64px}.generator{padding-bottom:12px}.intro{max-width:820px}.intro>p:not(.template-explainer){margin:10px 0;max-width:76ch;color:var(--muted);font-size:15px}.eyebrow,.section-label{margin:0 0 8px;color:var(--accent);font:700 11px/1.3 var(--mono);letter-spacing:.1em;text-transform:uppercase}h1,h2{margin-top:0;line-height:1.18}h1{font:normal clamp(32px,3.5vw,48px)/1.1 Georgia,serif;letter-spacing:-1.4px;margin-bottom:12px}h2{font-size:26px;margin-bottom:12px}.tool-grid{display:grid;grid-template-columns:320px minmax(0,1fr);gap:22px;margin-top:26px;align-items:start}.prompt-panel,.game-panel{border:1px solid var(--line);background:#fffef9;min-width:0}.prompt-panel{padding:22px}.prompt-panel h2{font:normal 26px/1.1 Georgia,serif;letter-spacing:-.5px;margin-bottom:24px}.prompt-panel label{display:block;font:700 11px/1.3 var(--mono);margin-bottom:9px}textarea{display:block;width:100%;min-height:112px;resize:vertical;padding:12px;border:1px solid #bfc6b9;border-radius:4px;background:#fffefb;color:var(--ink);font:16px/1.5 var(--sans)}button{min-height:44px;padding:11px 15px;border:1px solid var(--accent);border-radius:4px;background:var(--accent);color:#fff;font:700 13px var(--sans);cursor:pointer}button:hover{background:#244532}button:disabled{opacity:.6;cursor:wait}.prompt-panel>button{width:100%;margin-top:10px}.secondary-button{background:transparent;color:var(--accent)}.secondary-button:hover{background:var(--soft)}.prompt-examples{display:grid;gap:0;margin:22px 0}.prompt-examples>span{font-size:11px;color:var(--muted);margin-bottom:7px}.prompt-examples button{display:flex;align-items:center;justify-content:space-between;padding:7px 0;min-height:38px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);text-align:left;font-size:12px;font-weight:400}.prompt-examples button:hover{color:var(--accent);background:var(--soft)}.prompt-examples button span{color:var(--muted)}.tool-note,.game-status{margin:12px 0 0;color:var(--muted);font-size:11px}.tool-note{line-height:1.7}.supported-words{margin-top:18px;padding-top:14px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}summary{cursor:pointer}.supported-words p{font-size:12px}.game-panel{overflow:hidden}.stage-header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px 16px}.stage-header h2{font:normal 28px/1.1 Georgia,serif;letter-spacing:-.5px;margin:0}.stage-header .section-label{font-size:10px;color:var(--muted);margin-bottom:6px}.live-badge{display:inline-flex;align-items:center;gap:7px;font:11px var(--mono);color:var(--accent);border:1px solid #d8dfd0;padding:7px 9px;border-radius:20px;background:#f0f3e9}.live-badge:before{content:'';width:5px;height:5px;background:#5d8b5e;border-radius:50%}.objective-strip{display:flex;gap:24px;background:#eeeee5;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:11px 24px;font:11px var(--mono);color:var(--muted)}[data-state=unlocked] #key-progress,[data-state=won] #key-progress,[data-state=won] #door-progress{color:var(--accent);font-weight:bold}.game-shell{display:flex;justify-content:center;align-items:start;width:100%;padding:12px 0;background:#17252d;overflow:hidden}.game-shell canvas{display:block;image-rendering:pixelated;image-rendering:crisp-edges;touch-action:none;outline-offset:-2px}.stage-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;background:#fafbf5;border-bottom:1px solid var(--line)}.stage-footer h3{font-size:16px;margin:0 0 3px;line-height:1.2}.game-status{font-size:12px;margin:0;min-height:19px}.stage-footer button{flex-shrink:0}.game-panel[data-state=lost] .stage-footer{background:#f7e8e0}.game-panel[data-state=won] .stage-footer,.game-panel[data-state=unlocked] .stage-footer{background:#e6efdc}.play-legend{padding:13px 24px;display:flex;gap:18px;align-items:center;flex-wrap:wrap;color:var(--muted);font-size:11px}.play-legend>span{display:inline-flex;gap:6px;align-items:center}.play-legend i{display:inline-block;width:8px;height:8px}.legend-player{background:#63b4d1;border:1px solid #17252d}.legend-key{background:#e8c868;transform:rotate(45deg)}.legend-danger{background:#df6c6c;clip-path:polygon(50% 0,100% 100%,0 100%)}.play-legend .keyboard-hint{margin-left:auto;gap:3px;font-size:10px}kbd{font:10px var(--mono);background:#eeeee5;border:1px solid #deded1;padding:1px 3px;border-radius:2px}.play-legend .touch-hint{display:none}.fact-line{grid-column:1/-1;margin:0;font-size:12px;color:var(--accent);font-weight:700;display:flex;gap:14px;justify-content:center;padding:0 0 6px}.fact-line span{font-weight:400;color:var(--muted)}.content-block{border-top:1px solid var(--line);padding-top:28px;margin-top:32px}.content-block h2{font:normal 30px Georgia,serif}.table-wrap{overflow-x:auto;border:1px solid var(--line)}table{width:100%;border-collapse:collapse;min-width:640px;background:#fffef9;font-size:13px}th,td{text-align:left;vertical-align:top;padding:14px;border-bottom:1px solid var(--line)}th{background:var(--soft);font-size:11px}tr:last-child td{border-bottom:0}.audit-conclusion{margin:16px 0 0;font-weight:700;font-size:13px}.faq details{padding:15px 0;border-top:1px solid var(--line)}.faq details:last-child{border-bottom:1px solid var(--line)}.faq summary{font-weight:700;font-size:14px}.faq p{max-width:72ch;margin:10px 0 0;color:var(--muted);font-size:14px}:focus-visible{outline:3px solid #da9c65;outline-offset:3px}.skip{position:absolute;top:-80px;left:16px;padding:10px;background:#fff;z-index:10}.skip:focus{top:8px}
@media(max-width:1100px) and (min-width:761px){.tool-grid{grid-template-columns:250px minmax(0,1fr);gap:16px}.prompt-panel{padding:16px}.play-legend .keyboard-hint{margin-left:0}.stage-header,.objective-strip,.stage-footer,.play-legend{padding-left:16px;padding-right:16px}}
@media(max-width:760px){.site-header{padding:13px 12px}.brand{font-size:18px}.home-link{font-size:13px}main{padding:22px 8px 48px}.intro{padding:0 6px}.tool-grid{grid-template-columns:1fr;gap:14px;margin-top:20px}.game-panel{grid-row:1}.prompt-panel{padding:20px}.fact-line{grid-row:2;display:block;text-align:center;font-size:11px}.fact-line span{display:block;margin-top:4px}.intro>p:not(.template-explainer){font-size:13px;line-height:1.6}h1{font-size:34px;max-width:15ch}.stage-header{padding:16px}.stage-header h2{font-size:24px}.stage-header .section-label{font-size:9px}.live-badge{font-size:9px;padding:6px 8px}.objective-strip{padding:10px 14px;gap:16px;font-size:9px;justify-content:space-between}.game-shell{padding:8px 0}.game-shell canvas{width:100%!important;max-width:420px;height:auto!important}.game-status{font-size:11px;max-width:25ch}.stage-footer{padding:14px;gap:10px}.stage-footer h3{font-size:15px}.stage-footer button{font-size:11px;padding:10px;min-height:44px}.play-legend{padding:12px 14px;gap:14px;font-size:10px}.play-legend .keyboard-hint{display:none}.play-legend .touch-hint{display:inline-flex;margin-left:auto;font-size:9px}.content-block{margin-left:6px;margin-right:6px}.content-block h2{font-size:26px}}

/* Keep the editable tool in the first viewport and the preserved example in the next section. */
.tools-nav{max-width:1248px;margin:auto;padding:4px 28px;display:flex;align-items:center;flex-wrap:wrap;gap:4px 16px;border-bottom:1px solid var(--line)}
.tools-nav>span{font:700 11px var(--mono);color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.tools-nav a{display:inline-flex;align-items:center;min-height:40px;padding:0 12px;font-size:13px;text-decoration:none;border-radius:3px;overflow-wrap:anywhere}
.tools-nav a[aria-current=page]{background:var(--accent);color:#fff;font-weight:700}
main{padding-top:16px}.generator{min-height:calc(100svh - 130px);padding-bottom:12px}.tool-grid{margin-top:0;gap:16px}
.prompt-panel{padding:18px}.tool-editor h1{font:normal clamp(26px,2.4vw,34px)/1.12 Georgia,serif;letter-spacing:-.8px;max-width:none;margin:0 0 10px}
.tool-editor textarea{min-height:80px}.tool-editor>button{width:100%;margin-top:10px;font-size:15px;font-weight:800;min-height:48px}.tool-actions{margin-top:18px}
.delivery-actions{display:flex;flex-wrap:wrap;gap:8px}.delivery-actions button{flex:1;min-width:0;font-size:12px;padding:10px 8px}
.prompt-help{margin-top:18px}.prompt-help .prompt-examples{margin:10px 0}.prompt-help>summary{min-height:24px}
.generator .game-shell canvas,.example-page .game-shell canvas{max-width:100%;height:auto!important}
.generator .stage-header{padding:14px 18px}.generator .stage-footer{padding:14px 18px}.generator .play-legend{padding:10px 18px}
.playable-example{margin-top:24px;padding-top:24px}.example-heading{display:flex;justify-content:space-between;align-items:end;gap:12px;flex-wrap:wrap}
.example-heading h2{margin:0 0 12px}.example-heading>p{font-size:13px;color:var(--muted);margin:0 0 12px}
.playable-example iframe{display:block;width:100%;height:560px;border:1px solid var(--line);background:var(--paper)}
.intro.content-block{max-width:none}.intro h2{font:normal 30px Georgia,serif}.home-guide{max-width:828px;margin-left:auto;margin-right:auto}
.home-guide h2{font:700 25px/1.35 var(--sans);margin-top:30px}.home-guide p,.home-guide li{font-size:16px;line-height:1.8}.home-guide blockquote{margin:16px 0;padding:8px 18px;border-left:3px solid var(--line);background:#fffef9}.home-guide .table-scroll{max-width:100%;overflow-x:auto}
/* Preserve the original homepage footer dimensions and theme independently of the tool. */
footer{--ink:#20342c;--muted:#58675f;--accent:#176749;--line:#dce6de;max-width:1000px;margin:auto;padding:25px 26px 34px;border-top:1px solid var(--line);color:var(--muted);font:14px/1.75 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}footer p{margin:0 0 6px}footer nav{display:flex;flex-wrap:wrap;gap:4px 10px}footer nav a{display:inline-flex;align-items:center;min-height:44px;padding:0 6px;font-size:13px;text-decoration:none;text-underline-offset:4px}footer nav a[aria-current=page]{font-weight:750;text-decoration:underline}
.example-page main{max-width:600px;padding:12px;margin:auto}.example-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px}.example-controls p{font-size:13px;margin:0}.example-controls button{flex-shrink:0}.example-instructions{font-size:12px;color:var(--muted);margin:10px 0 0}.example-instructions span{display:block}.example-instructions .touch-hint{display:none}
@media(max-width:760px){
  .tools-nav{padding:3px 12px;gap:4px 10px}.tools-nav a{min-height:34px;font-size:12px}.tools-nav>span{font-size:10px}
  main{padding-top:8px}.generator{min-height:calc(100svh - 106px)}.tool-grid{gap:8px}.prompt-panel{display:contents}
  .tool-editor{grid-row:1;padding:10px 12px;border:1px solid var(--line);background:#fffef9}.tool-editor h1{font-size:26px;margin-bottom:8px}.tool-editor .tool-lead{font-size:14px;margin-bottom:8px}.tool-editor label{display:block;font:700 10px var(--mono);margin-bottom:5px}.tool-editor textarea{min-height:48px;height:48px;padding:8px 10px;line-height:1.4}.tool-editor>button{margin-top:6px;font-size:14px;min-height:48px}
  .generator .game-panel{grid-row:2}.generator .stage-header{padding:8px 12px}.generator .stage-header .section-label{display:none}.generator .stage-header h2{font-size:22px}.generator .objective-strip{padding:8px 12px}.generator .game-shell{padding:0}.generator .stage-footer{padding:8px 12px}.generator .stage-footer h3{font-size:14px}.generator .play-legend{padding:8px 12px;font-size:10px}
  .generator .game-shell canvas,.example-page .game-shell canvas{width:288px!important}
  .tool-actions{grid-row:3;margin:0;padding:0 4px}.tool-actions .tool-note{margin:6px 0 0;line-height:1.5}.tool-actions .delivery-actions button{min-height:40px}.fact-line{grid-row:4;margin-top:0;padding:0}.fact-line span{margin-top:0}.prompt-help{grid-row:5;margin:0;padding:8px 4px;border-top:1px solid var(--line)}
  .playable-example iframe{height:440px}.example-heading h2{font-size:24px}.example-heading>p{font-size:12px}.home-guide{margin-left:6px;margin-right:6px}.home-guide p,.home-guide li{font-size:14px}.home-guide blockquote{padding:8px 12px}.example-page main{padding:8px}.example-controls p{font-size:11px}.example-controls button{font-size:11px;padding:10px}.example-instructions{font-size:11px}.example-instructions .keyboard-hint{display:none}.example-instructions .touch-hint{display:block}
}

/* The homepage names the fixed template limits before the playable result. */
.tool-editor .tool-lead{margin:0 0 10px;font-size:15px;line-height:1.5}.tool-editor .tool-capability{max-width:58ch;margin:0 0 12px;color:#4d5a4f;font-size:13px;line-height:1.5}

/* Homepage: keep the editor and playable room legible at every width. */
body:has(.generator){--ink:#1d2925;--muted:#4e6259;--line:#d9e2dc;--paper:#f7f8f6;--soft:#edf3ee;--accent:#286344}
body:has(.generator) .site-header{max-width:1256px}
body:has(.generator) .tool-grid{grid-template-columns:380px minmax(0,1fr);gap:20px}
body:has(.generator) .prompt-panel,body:has(.generator) .game-panel{background:#fff;border-color:var(--line)}
body:has(.generator) .prompt-panel{padding:22px}
body:has(.generator) .tool-editor h1{font-size:34px;line-height:1.16;letter-spacing:0}
body:has(.generator) .tool-editor .tool-lead{font-size:16px;line-height:1.5}
body:has(.generator) .tool-editor .tool-capability{font-size:14px;line-height:1.5;color:var(--muted)}
body:has(.generator) .tool-editor label{font:600 13px/1.4 var(--sans)}
body:has(.generator) .objective-strip{font:600 13px/1.4 var(--sans);color:#42564c;gap:16px}
body:has(.generator) .game-status,body:has(.generator) .tool-note{font-size:13px;line-height:1.5}
body:has(.generator) .play-legend{font-size:12px}
@media(max-width:1100px) and (min-width:761px){body:has(.generator) .tool-grid{grid-template-columns:320px minmax(0,1fr);gap:16px}}
@media(max-width:760px){
  body:has(.generator) .site-header{padding:10px 16px}
  body:has(.generator) main{padding-left:12px;padding-right:12px}
  body:has(.generator) .tool-grid{grid-template-columns:minmax(0,1fr);gap:10px}
  body:has(.generator) .prompt-panel{padding:0}
  body:has(.generator) .tool-editor{padding:14px 14px 16px;background:#fff}
  body:has(.generator) .tool-editor h1{font-size:27px;line-height:1.16;margin-bottom:8px}
  body:has(.generator) .tool-editor .tool-lead{font-size:15px;line-height:1.45;margin:0 0 6px}
  body:has(.generator) .tool-editor .tool-capability{font-size:13px;line-height:1.45;margin:0 0 10px}
  body:has(.generator) .tool-editor label{font:600 13px/1.4 var(--sans);margin-bottom:6px}
  body:has(.generator) .tool-editor textarea{font-size:16px}
  body:has(.generator) .generator .objective-strip{font-size:12px;line-height:1.4;gap:8px}
  body:has(.generator) .generator .stage-footer h3{font-size:15px}
  body:has(.generator) .game-status{font-size:13px;max-width:none}
  body:has(.generator) .generator .play-legend{font-size:12px}
  body:has(.generator) .play-legend .touch-hint{font-size:12px}
  body:has(.generator) .tool-actions .delivery-actions button{min-height:44px}
}
