.bg-stage{--bg-ink:#493755;--bg-muted:#725e7c;--bg-accent:#725393;--bg-soft:#ece3f3;--bg-line:#d6cadf;--bg-paper:#fcf9fd;color:var(--bg-ink);min-width:0;width:100%;font-family:Manrope,Arial,sans-serif}
.bg-stage button,.bg-stage input{font:inherit}.bg-stage button{cursor:pointer;color:var(--bg-ink);touch-action:manipulation}.bg-stage button:focus-visible,.bg-stage summary:focus-visible,.bg-flight:focus-visible{outline:3px solid #765495;outline-offset:4px}.bg-stage button:disabled{cursor:default}.bg-instructions{max-width:690px;margin:0 auto 20px;text-align:center}.bg-instructions strong{font-family:Geologica,Arial,sans-serif;font-size:20px;font-weight:500}.bg-instructions p{font-size:14px;line-height:1.65;color:var(--bg-muted);margin:9px 0 0}.bg-feedback{min-height:26px;text-align:center;line-height:1.6;font-size:14px;color:#5d466f;margin:16px auto 0;max-width:680px}.bg-game-meta{font-size:13px;font-weight:600;text-align:center;color:#6d587b;margin:16px 0;line-height:1.6;font-variant-numeric:tabular-nums}.bg-action,.bg-order-actions button{border:1px solid var(--bg-line);border-radius:24px;background:#fff;padding:12px 22px;min-height:48px}.bg-action{background:var(--bg-accent)!important;color:white!important;border-color:var(--bg-accent)!important}.bg-order-actions button:disabled{opacity:.45}
.bg-garden{max-width:500px;height:58px;display:flex;align-items:end;justify-content:center;gap:14px;margin:0 auto 20px;padding:0 16px 10px;border-bottom:2px solid #c6b4a9;background:radial-gradient(ellipse at bottom,#edf0df,transparent 72%);border-radius:50% 50% 20% 20%}.bg-sprout{position:relative;width:22px;height:9px;border-radius:50%;background:#dacbb9;transition:height .3s}.bg-sprout.bg-grown{height:38px;background:transparent;border-bottom:0}.bg-grown:before{content:'';position:absolute;width:3px;height:30px;bottom:0;left:10px;background:#69816b;border-radius:4px}.bg-grown:after,.bg-grown i{content:'';position:absolute;bottom:14px;width:14px;height:9px;left:0;background:#90a38a;border-radius:0 100% 0 100%;transform:rotate(8deg)}.bg-grown i{left:10px;bottom:23px;transform:scaleX(-1)}
.bg-mole-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 30px;width:min(100%,530px);margin:auto;padding:14px 16px 18px;background:radial-gradient(ellipse at center,#f1ebe2,#e8e4ed);border:1px solid #e2d9e4;border-radius:32px}.bg-hole{isolation:isolate;position:relative;aspect-ratio:1.15;min-width:0;min-height:72px;overflow:hidden;border:0;border-radius:50%;background:transparent;padding:0;user-select:none;-webkit-user-select:none;touch-action:none}.bg-hole:after{content:'';position:absolute;left:2%;right:2%;height:25%;bottom:4%;background:#a18d82;border:7px solid #d2beb1;border-radius:50%;z-index:-1;box-shadow:inset 0 8px 8px #6a565d33}.bg-mole-body{position:absolute;inset:10% 16% 10%;transform:translateY(115%);transition:transform .16s ease-out;pointer-events:none}.bg-present .bg-mole-body{transform:translateY(0)}.bg-mole-body>svg{width:100%;height:100%}.bg-gesture{position:absolute;bottom:2px;left:50%;transform:translateX(-50%);font-size:10px;letter-spacing:.08em;font-weight:800;background:#fff8e9;color:#6e5345;padding:3px 9px;border-radius:20px}.bg-hold .bg-gesture{background:linear-gradient(90deg,#c9b3e3 calc(var(--bg-hold-progress,0)*100%),#f1e7fc 0);color:#5e3d7c}.bg-hole kbd{position:absolute;bottom:0;right:9%;font-family:inherit;font-size:10px;opacity:.5;pointer-events:none}.bg-hole-ring{position:absolute;left:9%;right:9%;bottom:3%;height:8px;border-radius:8px;background:#cdbbda;transform-origin:left;transform:scaleX(var(--bg-life,0));pointer-events:none}.bg-hold .bg-hole-ring{background:#8e6eac}
.bg-flight{position:relative;overflow:hidden;border-radius:28px;border:1px solid #d5c5e3;max-width:650px;margin:auto;touch-action:none;background:#e6def0}.bg-flight>svg{display:block;width:100%;aspect-ratio:600/430}.bg-flight-wind{position:absolute;left:16px;top:14px;border:1px solid #e9e0f0;background:#ffffffc9;border-radius:22px;padding:6px 14px;color:#624b76;font-size:12px;font-weight:700}.bg-flight-guide:after{content:'';position:absolute;width:2px;top:10%;bottom:10%;left:50%;background:repeating-linear-gradient(to bottom,#fff 0 9px,transparent 9px 18px);pointer-events:none;opacity:.65}.bg-steer{display:flex;align-items:center;justify-content:center;gap:20px;margin:14px auto 0;max-width:650px}.bg-steer button{min-width:105px;min-height:48px;border:1px solid var(--bg-line);border-radius:26px;background:#f3ecf8;padding:10px 18px;user-select:none;touch-action:none}.bg-steer>span{color:var(--bg-muted);font-size:12px;text-align:center}.bg-steer button:active{background:#d6c4e6}
.bg-order-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(210px,1fr);gap:26px;max-width:930px;margin:auto}.bg-room{display:grid;grid-template-columns:repeat(var(--bg-cols),minmax(0,1fr));gap:12px;padding:30px 18px 22px;border:1px solid #cbd3bf;border-bottom:12px solid #c0aa93;border-radius:24px 24px 12px 12px;background:linear-gradient(#edf0e6 0 47%,#d9e0ce 47% 49%,#e8dfd2 49%);position:relative}.bg-room:before{content:'';position:absolute;top:7px;left:50%;transform:translateX(-50%);width:45%;height:12px;background:#f9f3d7;border-radius:6px}.bg-room-rose{background:linear-gradient(#f4e8e5 0 47%,#e8cfc7 47% 49%,#e9ddd3 49%)}.bg-room-lavender{background:linear-gradient(#eee6f4 0 47%,#d5c5e2 47% 49%,#e5dcd9 49%)}.bg-room-cell{aspect-ratio:1;min-width:0;min-height:72px;border:1px dashed #9c958f;border-radius:15px;background:#ffffff65;position:relative;padding:5px}.bg-room-cell:hover{background:#fff9}.bg-room-cell.bg-selected{outline:3px solid #876a9e;outline-offset:0}.bg-room-cell svg{width:70%;max-height:90px;display:block;margin:auto}.bg-room-cell small{font-size:11px;display:block;color:#54445e}.bg-position{position:absolute;left:8px;top:5px;font-size:10px;opacity:.65}.bg-object-tray{display:flex;gap:7px;justify-content:center;margin:16px 0;flex-wrap:wrap}.bg-object-tray button{border:1px solid #dcd2e3;background:#f8f4fb;border-radius:14px;flex:1;min-width:58px;max-width:90px;padding:4px 3px 8px;font-size:11px}.bg-object-tray button svg{width:54px;display:block;margin:auto;max-width:100%}.bg-object-tray button[aria-pressed=true]{background:#e4d7ef;border-color:#8b6ba3;box-shadow:0 0 0 2px #8b6ba3}.bg-object-tray button.bg-placed:not([aria-pressed=true]){background:#eef0e9}.bg-order-actions{display:flex;justify-content:center;gap:10px}.bg-clues{background:#f8f4fb;border:1px solid #e3d9ea;border-radius:22px;padding:20px}.bg-clues h3{font-family:Geologica,Arial,sans-serif;font-size:17px;font-weight:500;margin:0 0 14px}.bg-clues ol{margin:0;padding-left:22px}.bg-clues li{padding:7px 3px;font-size:13px;line-height:1.65;border-bottom:1px solid #e9e1ef}.bg-clues li span{font-size:10px;font-weight:800;display:block}.bg-clue-ok{color:#42684f}.bg-clue-wrong{color:#98596c}.bg-clue-hint{background:#e7d9f0;border-radius:7px}.bg-decor{border:0;display:flex;align-items:center;justify-content:center;gap:16px;padding:0;margin-top:18px;font-size:12px}.bg-decor legend{font-size:11px;color:var(--bg-muted);text-align:center;margin-bottom:7px}.bg-decor label{display:flex;align-items:center;gap:4px;text-transform:capitalize;min-height:32px;cursor:pointer}.bg-decor input{accent-color:#816292}
.bg-landscape{max-width:740px;margin:auto;border-radius:24px;overflow:hidden;border:1px solid #ded1e9;line-height:0}.bg-landscape svg{display:block;width:100%}.bg-pattern-history{display:flex;gap:10px;max-width:720px;overflow-x:auto;margin:18px auto;padding:4px 2px 12px;scrollbar-width:thin}.bg-pattern-token{flex:0 0 84px;text-align:center;border:1px solid #dfd3e7;background:#faf7fc;border-radius:14px;padding:5px 5px 0}.bg-pattern-token small{font-size:10px;font-weight:600;color:#796585}.bg-pattern-token svg{display:block;width:80px;max-width:100%;height:80px}.bg-next-label{font-family:Geologica,Arial,sans-serif;font-size:16px;text-align:center;margin:14px 0}.bg-pattern-choices{display:flex;justify-content:center;gap:16px;max-width:600px;margin:auto}.bg-pattern-choices button{flex:1;max-width:125px;min-width:0;border:1px solid #d4c3e0;border-radius:18px;background:#f8f2fc;padding:9px 8px;font-size:11px;transition:background .15s,transform .15s}.bg-pattern-choices button:hover:not(:disabled){transform:translateY(-3px);background:#e7d8f3}.bg-pattern-choices button svg{width:100%;display:block}.bg-pattern-choices button span{display:block;margin:4px 0;font-weight:700}.bg-pattern-choices button:disabled{opacity:.5;background:#e7e1e9}.bg-rule-guide{max-width:720px;margin:22px auto 0;padding:13px 18px;border:1px solid #e1d5e9;border-radius:16px;font-size:12px;line-height:1.7;color:#6f587b}.bg-rule-guide summary{cursor:pointer;font-weight:700;min-height:24px}.bg-rule-guide p{margin:10px 0 2px}
@media(max-width:650px){.bg-instructions{margin-bottom:16px}.bg-instructions strong{font-size:18px}.bg-instructions p{font-size:12px}.bg-mole-grid{gap:16px;padding:12px 10px}.bg-hole{min-height:78px}.bg-mole-body{inset:5% 10% 10%}.bg-garden{gap:8px;height:45px}.bg-order-layout{grid-template-columns:1fr;gap:16px}.bg-clues{padding:16px}.bg-clues ol{columns:2;column-gap:22px}.bg-clues li{break-inside:avoid;font-size:12px}.bg-room{max-width:460px;margin:auto}.bg-object-tray button{min-width:45px}.bg-object-tray button svg{width:44px}.bg-pattern-history{gap:7px}.bg-pattern-token{flex-basis:69px}.bg-pattern-token svg{height:65px}.bg-pattern-choices{gap:8px}.bg-pattern-choices button{padding:6px}.bg-flight{border-radius:20px}.bg-steer{gap:9px}.bg-steer button{min-width:86px;padding:8px 12px}.bg-steer>span{font-size:10px}.bg-game-meta{font-size:11px}.bg-feedback{font-size:12px}}
@media(prefers-reduced-motion:reduce){.bg-stage *{transition:none!important;scroll-behavior:auto!important}.bg-pattern-choices button:hover:not(:disabled){transform:none}}
/* Evening owns stage surfaces as well as shell tokens. Scene-only paint below
   leaves question shapes, object identities, timing and difficulty unchanged. */
.bret-games.is-evening .bg-stage {
  --bg-ink:#f2eaf8;
  --bg-muted:#c3b5ce;
  --bg-accent:#c5ade4;
  --bg-on-accent:#2c203b;
  --bg-soft:#493957;
  --bg-line:#9b88ab;
  --bg-paper:#332a40;
  --bg-focus:#dfc5ff;
}
.bret-games.is-evening .bg-stage button:focus-visible,
.bret-games.is-evening .bg-stage summary:focus-visible,
.bret-games.is-evening .bg-flight:focus-visible {outline-color:var(--bg-focus)}
.bret-games.is-evening .bg-feedback {color:#d5bedf}
.bret-games.is-evening .bg-game-meta {color:var(--bg-muted)}
.bret-games.is-evening .bg-action {color:var(--bg-on-accent)!important}
.bret-games.is-evening .bg-order-actions button:not(.bg-action),
.bret-games.is-evening .bg-steer button {background:#493957}
.bret-games.is-evening .bg-steer button:active {background:#654b79}
.bret-games.is-evening .bg-garden {border-color:#8a7687;background:radial-gradient(ellipse at bottom,#4a5144,transparent 72%)}
.bret-games.is-evening .bg-sprout {background:#9b897c}
.bret-games.is-evening .bg-grown {background:transparent}
.bret-games.is-evening .bg-grown:before {background:#a3bb9b}
.bret-games.is-evening .bg-grown:after,
.bret-games.is-evening .bg-grown i {background:#90ad8d}
.bret-games.is-evening .bg-mole-grid {background:radial-gradient(ellipse at center,#38323e,#44364e);border-color:#9b88ab}
.bret-games.is-evening .bg-hole:after {background:#74616b;border-color:#9e8792}
.bret-games.is-evening .bg-gesture {background:#e3cfaf;color:#493755}
.bret-games.is-evening .bg-hold .bg-gesture {background:linear-gradient(90deg,#b69bd5 calc(var(--bg-hold-progress,0)*100%),#e2d1ef 0);color:#392449}
.bret-games.is-evening .bg-hole kbd {opacity:1;color:#f0e3f5;background:#332a40;border-radius:4px;padding:1px 4px}
.bret-games.is-evening .bg-hole-ring {background:#d9c2ed}
.bret-games.is-evening .bg-hold .bg-hole-ring {background:#b99bd7}
.bret-games.is-evening .bg-flight {background:#362c47;border-color:#9b88ab}
.bret-games.is-evening .bg-flight-wind {background:#44344f;color:#f1dfc2;border-color:#a08caa}
.bret-games.is-evening .bg-flight>svg>rect {fill:#362c47}
.bret-games.is-evening .bg-flight>svg>circle {fill:#bfa775}
.bret-games.is-evening .bg-flight>svg>path:nth-of-type(1) {fill:#655674}
.bret-games.is-evening .bg-flight>svg>path:nth-of-type(2) {fill:#4f425e}
.bret-games.is-evening .bg-flight>svg>path:nth-of-type(3) {fill:#627b73}
.bret-games.is-evening .bg-room {background:linear-gradient(#393341 0 47%,#62536b 47% 49%,#49404e 49%);border-color:#9b88ab;border-bottom-color:#887285}
.bret-games.is-evening .bg-room-rose {background:linear-gradient(#45333e 0 47%,#735563 47% 49%,#51404b 49%)}
.bret-games.is-evening .bg-room-lavender {background:linear-gradient(#3d3349 0 47%,#6b567a 47% 49%,#4a4056 49%)}
.bret-games.is-evening .bg-room:before {background:#baa784}
/* Object wells retain enough lightness for the original labelled illustrations. */
.bret-games.is-evening .bg-room-cell {background:#c0b3cb;border-color:#62516e}
.bret-games.is-evening .bg-room-cell:hover {background:#d3c4df}
.bret-games.is-evening .bg-room-cell.bg-selected {outline-color:#e7cffd}
.bret-games.is-evening .bg-room-cell small,
.bret-games.is-evening .bg-position {color:#30263f}
.bret-games.is-evening .bg-position {opacity:1}
.bret-games.is-evening .bg-object-tray button {background:#c0b3cb;color:#30263f;border-color:#9b88ab}
.bret-games.is-evening .bg-object-tray button[aria-pressed=true] {background:#dac4ed;border-color:#573b6c;box-shadow:0 0 0 2px #573b6c}
.bret-games.is-evening .bg-object-tray button.bg-placed:not([aria-pressed=true]) {background:#b3bcae}
/* Retain each object's silhouette and fill hue with readable outline detail. */
.bret-games.is-evening :is(.bg-room-cell,.bg-object-tray) svg [stroke] {stroke:#55445f}
.bret-games.is-evening .bg-clues {background:#3d3348;border-color:#9b88ab}
.bret-games.is-evening .bg-clues li {border-color:#75627f}
.bret-games.is-evening .bg-clue-ok {color:#b1d6b4}
.bret-games.is-evening .bg-clue-wrong {color:#efb6c8}
.bret-games.is-evening .bg-clue-hint {background:#52405f}
.bret-games.is-evening .bg-decor input {accent-color:#c5ade4}
.bret-games.is-evening .bg-landscape {border-color:#9b88ab}
.bret-games.is-evening .bg-landscape>svg>rect:first-child {fill:#362c47}
.bret-games.is-evening .bg-landscape>svg>rect[opacity] {fill:#332a40}
.bret-games.is-evening .bg-landscape>svg>circle {fill:#bfa775}
.bret-games.is-evening .bg-landscape>svg>path:nth-of-type(1) {fill:#655674}
.bret-games.is-evening .bg-landscape>svg>path:nth-of-type(2) {fill:#4f425e}
.bret-games.is-evening .bg-landscape>svg>path:nth-of-type(3) {fill:#627b73}
.bret-games.is-evening .bg-pattern-token,
.bret-games.is-evening .bg-pattern-choices button {background:#40364a;border-color:#9b88ab}
.bret-games.is-evening .bg-pattern-token small {color:#c3b5ce}
.bret-games.is-evening .bg-pattern-choices button:hover:not(:disabled) {background:#574063}
.bret-games.is-evening .bg-pattern-choices button:disabled {background:#302a38}
/* Only orientation pointers and count marks become light; shape hues stay data-stable. */
.bret-games.is-evening :is(.bg-pattern-token,.bg-pattern-choices) svg g>path:first-child,
.bret-games.is-evening :is(.bg-pattern-token,.bg-pattern-choices) svg>circle {fill:#e4d3f1}
.bret-games.is-evening .bg-rule-guide {background:#3d3348;color:#c3b5ce;border-color:#9b88ab}
/* System-colour boundaries remain the final layer in both themes. */
@media(forced-colors:active){.bg-stage button,.bg-clues,.bg-pattern-token,.bg-rule-guide,.bg-room{border:1px solid ButtonText}.bg-hole:after{background:Canvas;border-color:ButtonText}.bg-hole-ring{background:Highlight}.bg-present{outline:2px solid Highlight}.bg-room-cell{border:1px solid ButtonText}.bg-stage svg{forced-color-adjust:none}}
@media(forced-colors:active){.bret-games.is-evening .bg-stage button,.bret-games.is-evening .bg-clues,.bret-games.is-evening .bg-pattern-token,.bret-games.is-evening .bg-rule-guide,.bret-games.is-evening .bg-room,.bret-games.is-evening .bg-room-cell{border-color:ButtonText}.bret-games.is-evening .bg-hole:after{background:Canvas;border-color:ButtonText}.bret-games.is-evening .bg-hole-ring{background:Highlight}.bret-games.is-evening .bg-stage button:focus-visible,.bret-games.is-evening .bg-stage summary:focus-visible,.bret-games.is-evening .bg-flight:focus-visible{outline-color:Highlight}}

@media(forced-colors:active) {
  .bret-games .bg-object-tray button[aria-pressed=true],
  .bret-games.is-evening .bg-object-tray button[aria-pressed=true] {
    background:Highlight; color:HighlightText; border:2px solid Highlight;
    box-shadow:none; forced-color-adjust:none;
  }
}
