/* Physical switch and terminal UI belong to the console, not the general site styles. */
.console-os-button{
  position:absolute;z-index:6;right:7.1%;bottom:3.2%;display:grid;place-items:center;
  width:clamp(13px,2.8vw,18px);aspect-ratio:1;padding:0;border:1px solid #a68b61;
  border-radius:50%;background:linear-gradient(145deg,#fff0c9,#c9ad7c 72%,#a78a5d);
  box-shadow:inset 0 1px 2px #fff9,0 1px 2px #3b2a184d;cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.console-os-button span{position:relative;width:3px;height:3px;border:0;border-radius:50%;background:#77ed86;box-shadow:0 0 4px 2px #70e77d99}
.console-os-button span::after{content:none}
.console-os-button.is-console-active span{background:#ffb347;box-shadow:0 0 5px 2px #ff9d38bb}
.console-os-button:hover{filter:brightness(1.04)}
.console-os-button:focus-visible{outline:none}

.intrapixel-os,.intrapixel-os[hidden]{display:none}
.intrapixel-os:not([hidden]){
  position:absolute;z-index:5;inset:0;box-sizing:border-box;display:flex;flex-direction:column;gap:0;
  padding:5% 6%;overflow:hidden;border-radius:inherit;color:#9cf5a6;
  background:radial-gradient(ellipse at 50% 25%,#0c2618 0%,#031109 84%);
  font:clamp(8px,1.55vw,10px)/1.4 var(--mono);text-shadow:0 0 5px #5ded7c66;
}
.intrapixel-os::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:.14;background:repeating-linear-gradient(0deg,transparent 0 2px,#84f694 3px,transparent 4px)}
.intrapixel-os__form,.intrapixel-os__output{position:relative;z-index:1}
.intrapixel-os__output{flex:0 1 auto;min-height:0;max-height:calc(100% - 1.6em);overflow:auto;scrollbar-width:thin;scrollbar-color:#4a9b59 transparent;overflow-wrap:anywhere}
.intrapixel-os__line{margin:0;white-space:pre-wrap;color:#9ee9a6}
.intrapixel-os__command-echo,.intrapixel-os__accent{color:#d2ffd3}
.intrapixel-os__form{position:relative;display:flex;align-items:center;gap:0;min-width:0;color:#8be996;white-space:nowrap}
.intrapixel-os__form label{flex:0 0 auto}
.intrapixel-os__input-echo{min-width:0;overflow:hidden;color:#d4ffd8;white-space:pre}
.intrapixel-os__cursor{flex:0 0 auto;color:#caffce;animation:intrapixel-cursor-blink 1s step-end infinite}
.intrapixel-os__form input{position:absolute;z-index:2;inset:0;width:100%;height:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:transparent;font:inherit;caret-color:transparent}
.intrapixel-os__preview{margin:5px auto 8px;max-width:100%;text-align:center}
.intrapixel-os__preview-title{margin-bottom:4px;color:#d2ffd3;text-align:left}
.intrapixel-os__preview img{display:block;width:auto;max-width:100%;max-height:min(28vh,180px);margin:0 auto;object-fit:contain;border:1px solid #56a96866;box-shadow:0 0 9px #58d36b30}
.intrapixel-os__preview figcaption{margin-top:3px;color:#68bd77;font-size:.78em}
.intrapixel-os__error{color:#ff9c75}
.intrapixel-os__muted{color:#68bd77}
.intrapixel-os--game-active:not([hidden]){color:#c4e5ff;text-shadow:0 0 6px #50aaff77;background:radial-gradient(ellipse at 50% 30%,#09213a 0%,#030c18 85%)}
.intrapixel-os--game-active::after{opacity:.12;background:repeating-linear-gradient(0deg,transparent 0 2px,#8bc8ff 3px,transparent 4px)}
.intrapixel-os--game-active:not([hidden]){padding:0}
.intrapixel-os--game-active .intrapixel-os__output{position:absolute;inset:0;display:block;max-height:none;min-height:0;overflow:hidden}
.intrapixel-os--game-active .intrapixel-os__game{width:100%;height:100%;min-height:0}
.intrapixel-os--game-active .intrapixel-os__form{position:absolute;right:5%;bottom:4%;left:5%;box-sizing:border-box;min-height:1.8em;padding:3px 5px;overflow:hidden;background:#061426e8;color:#acd8ff;text-shadow:0 0 5px #409cff99}
.intrapixel-os--game-active .intrapixel-os__input-echo{color:#d9efff}
.intrapixel-os--game-active .intrapixel-os__cursor{color:#d0eaff}
.intrapixel-os__game{position:relative;z-index:1;display:flex;flex-direction:column;gap:3px;overflow:hidden}
.intrapixel-os__game-status{position:absolute;z-index:2;top:14%;left:5%;right:5%;color:#c5e5ff;text-align:center;font-size:.92em;text-shadow:0 0 5px #000,0 0 8px #53aaff}
.intrapixel-os__game-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;max-height:none;object-fit:fill;image-rendering:pixelated;border:0;background:#071a28;box-shadow:none}
@media(max-width:560px){
  .console-os-button{right:7.1%;bottom:3.2%;width:14px}
  .intrapixel-os:not([hidden]){padding:5% 5%;font-size:clamp(7px,2.1vw,9px)}
  .intrapixel-os--game-active:not([hidden]){padding:0}
  .intrapixel-os__preview img{max-height:min(22vh,120px)}
}
@media(prefers-reduced-motion:reduce){.console-os-button:hover{filter:none}}
@keyframes intrapixel-cursor-blink{50%{opacity:0}}
