/* PBBG Content Schema example (assets/pbbg-demo.js; source in tools/pbbg-demo).
   The game screen is dark like Coalition's; the controls follow the page. */
.pd { --pd-ink: #1d1a17; --pd-paper: #f3ead8; --pd-dim: #d8c9a8; --pd-accent: #cd795b; --pd-bad: #f0b39a; --pd-ok: #9fdcc9; margin-top: 8px; }
.pd button { font: 500 14px var(--mono, ui-monospace, monospace); color: inherit; background: transparent; border: 1px solid currentColor; padding: 7px 11px; cursor: pointer; }
.pd button[aria-pressed="true"] { background: var(--pd-ink); color: var(--pd-paper); border-color: var(--pd-ink); }
.pd button:focus-visible, .pd input:focus-visible, .pd .pd-el:focus-visible { outline: 3px solid var(--pd-accent); outline-offset: 2px; }
.pd-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.pd-seg { display: flex; gap: 0; } .pd-seg button + button { margin-left: -1px; }
.pd-stage { position: relative; overflow: hidden; margin-top: 16px; perspective: 1600px; perspective-origin: 50% 0; }
.pd-gl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.pd-scene { display: grid; gap: 0; transform-style: preserve-3d; transition: transform .5s ease; }
.pd-plane { position: relative; padding: 16px 18px; background: var(--pd-ink); color: var(--pd-paper); transition: transform .5s ease, opacity .3s ease, max-height .5s ease, padding .5s ease; transform-style: preserve-3d; }
.pd-tag { display: none; margin-bottom: 6px; font: 600 12px var(--mono, monospace); color: var(--pd-accent); }
.pd-plane p { margin: 0 0 8px; } .pd-plane p:last-child { margin-bottom: 0; }
.pd-h { font-weight: 800; font-size: 21px; }
.pd-quote { font-style: italic; }
.pd-obj { font: 600 15px var(--mono, monospace); color: var(--pd-dim); }
.pd-move { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 12px; margin-top: 8px; border: 1px solid rgba(243, 234, 216, .25); }
.pd-move small { grid-column: 1 / -1; font-size: 14px; color: var(--pd-dim); }
.pd-label { font-weight: 700; }
.pd-chip { font: 500 13px var(--mono, monospace); padding: 2px 6px; background: rgba(243, 234, 216, .12); align-self: start; white-space: nowrap; }
.pd-need .pd-el { font-family: var(--mono, monospace); font-size: 13px; color: #f0b39a; }
.pd-el { cursor: pointer; }
.pd-el.is-sel { outline: 2px solid var(--pd-accent); outline-offset: 2px; }
.pd-err, .pd-stopped { color: #f0b39a; font-family: var(--mono, monospace); font-size: 13px; }
.pd-plane--rules, .pd-plane--policy { max-height: 0; padding-block: 0; opacity: 0; overflow: hidden; }
.pd-plane--rules .pd-slot { display: grid; gap: 6px; font: 13px/1.5 var(--mono, monospace); }
.pd-plane--rules .pd-slot span { display: inline-block; padding: 1px 5px; margin: 0 3px 3px 0; background: rgba(243, 234, 216, .1); }
.pd-plane--policy ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; }
.pd-plane--policy code { color: var(--pd-accent); margin-right: 6px; }
.is-split .pd-scene { transform: rotateX(16deg) rotateY(-8deg); gap: 24px; padding-right: 90px; }
.is-split .pd-stage { padding-bottom: 60px; }
.is-split .pd-tag { display: block; }
.is-split [data-layer="narrative"] { transform: translateZ(60px); }
.is-split [data-layer="interface"] { transform: translateZ(20px) translateX(22px); }
.is-split .pd-plane--rules { max-height: 480px; padding-block: 16px; opacity: 1; transform: translateZ(-20px) translateX(44px); background: #101820; }
.is-split .pd-plane--policy { max-height: 300px; padding-block: 16px; opacity: 1; transform: translateZ(-60px) translateX(66px); background: #2a1d17; }
.pd-state { margin: 14px 0 0; min-height: 1.4em; max-width: 46em; }
.pd-state:empty { display: none; }
.pd-small { font: 13px var(--mono, monospace); color: inherit; opacity: .75; margin: 18px 0 8px; }
.pd-inspect pre { margin: 0; padding: 12px; background: var(--pd-ink); color: var(--pd-paper); font: 12.5px/1.5 var(--mono, monospace); overflow-x: auto; max-height: 340px; }
.pd-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; margin-top: 20px; }
.pd-ctl { display: grid; gap: 6px; font: 13px var(--mono, monospace); }
.pd-ctl input[type="range"] { width: 100%; accent-color: var(--pd-accent); }
.pd-ctl input[type="text"] { width: 100%; font: 15px inherit; padding: 8px; border: 1px solid currentColor; background: transparent; color: inherit; }
.pd-breaks { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-diag { margin-top: 14px; padding: 12px 16px; font-size: 15px; background: var(--pd-ink); color: var(--pd-paper); }
.pd-diag ul { margin: 6px 0 0; padding-left: 18px; }
.pd-diag code { color: var(--pd-accent); margin-right: 4px; }
.pd-ok { color: var(--pd-ok); font-family: var(--mono, monospace); font-size: 14px; }
.pd-bad { color: var(--pd-bad); font-family: var(--mono, monospace); font-size: 14px; margin: 0; }
@media (max-width: 860px) { .is-split .pd-scene { padding-right: 0; } .is-split .pd-scene, .is-split .pd-plane { transform: none !important; } .pd-gl { display: none; } }
@media (prefers-reduced-motion: reduce) { .pd-scene, .pd-plane { transition: none; } }
.pd-wrap { margin: 40px 0 0; }
.pd-note { margin: 14px 0 0; max-width: 46em; font: var(--t-meta, 15px)/1.5 var(--mono, monospace); color: var(--muted, #55556a); }
.pd noscript img { width: 100%; height: auto; }

/* Start with the actual game, then open the editable content model.
   The game image is a screenshot, not a simulated playable instance. */
.pd-opening { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.9fr); background: var(--pd-paper); color: var(--pd-ink); border: 1px solid currentColor; }
.pd-game { margin: 0; padding: 14px; background: #151326; color: #f3ead8; min-width: 0; }
.pd-game img { display: block; width: 100%; height: auto; background: #151326; }
.pd-game figcaption { margin: 12px 0; font-size: 14px; line-height: 1.5; }
.pd .pd-from-screen { color: #f3ead8; border-color: rgba(243,234,216,.6); }
.pd .pd-from-screen:hover { background: rgba(243,234,216,.14); }
.pd-brief { padding: clamp(20px, 3vw, 38px); align-self: center; }
.pd-brief h2 { margin: 0 0 18px; font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -.02em; }
.pd-brief p { margin: 0 0 16px; font-size: 17px; line-height: 1.55; }
.pd .pd-reveal { background: var(--pd-ink); color: var(--pd-paper); border-color: var(--pd-ink); padding: 12px 16px; font-weight: 700; }
.pd .pd-reveal:hover { background: #443a31; }
.pd-brief .pd-game-link { font-size: 15px; margin: 16px 0 0; }
.pd-workshop { margin-top: 26px; padding-top: 16px; border-top: 1px solid currentColor; scroll-margin-top: 24px; }
.pd-workshop[hidden] { display: none; }
.pd-workshop-intro { max-width: 47em; margin-bottom: 18px; }
.pd-workshop-intro h3 { margin: 0 0 8px; font-size: 23px; }
.pd-workshop-intro p { margin: 0; font-size: 17px; line-height: 1.55; }
.pd-inspect-explain { max-width: 50em; margin: 4px 0 10px; font-size: 16px; line-height: 1.5; }
.pd-edit-intro { max-width: 46em; margin: 26px 0 10px; }
.pd-edit-intro h3 { margin: 0 0 6px; font-size: 22px; }
.pd-edit-intro p { margin: 0; font-size: 16px; line-height: 1.55; }
.pd-verdict { margin: 24px 0 8px; padding: 11px 0; font-size: 16px; font-weight: 700; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.pd-verdict.is-failed { color: #8b2913; }
.pd-verdict.is-passed { color: #275e48; }
@media (max-width: 860px) {
  .pd-opening { grid-template-columns: minmax(0, 1fr); }
  .pd-game { padding: 10px; }
  .pd-brief { padding: 22px 18px 26px; }
  .pd-brief h2 { font-size: 28px; }
  .pd-workshop { scroll-margin-top: 12px; }
}
