/* RC://SIGNAL — native Riemann Console mode; Spectrum Easter eggs isolated. */
.signal-main { min-width:0; }
.command-console--signal { margin-top:2.5rem; }
.rc-signal { width:100%; min-width:0; max-width:none; margin:0; padding:0; background:transparent; border:0; color:var(--cyan); font:inherit; overflow-wrap:anywhere; }
.rc-signal__mode { margin:0 0 .75rem; color:var(--cyan); white-space:pre-wrap; text-shadow:0 0 .65rem rgb(81 246 255 / .2); }
/* A fixed terminal aperture, without visible pane chrome or scrollbar. */
.rc-signal__viewport {
  box-sizing:border-box;
  width:100%;
  height:min(22rem, 48dvh);
  min-height:12rem;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  background:transparent;
  border:0;
  padding:0;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.rc-signal__viewport::-webkit-scrollbar { display:none; width:0; height:0; }
.rc-signal__viewport:focus { outline:none; }
.rc-signal__viewport:focus-visible { outline:1px dashed var(--focus); outline-offset:-2px; }
.rc-signal__transcript { min-height:0; padding:0; }
@media (max-height:520px) { .rc-signal__viewport { height:45dvh; min-height:8rem; } }
.rc-signal__line { margin:.7rem 0; color:var(--cyan); white-space:pre-wrap; overflow-wrap:anywhere; }
.rc-signal__entry { display:flex; align-items:baseline; gap:.35rem; width:100%; min-width:0; position:relative; }
.rc-signal__prompt-mark { flex:none; padding:0; color:var(--cyan); white-space:nowrap; }
.rc-signal__entry input,
.rc-signal__entry textarea {
  box-sizing:border-box; min-width:0; margin:0; padding:0; border:0; border-radius:0; outline:0;
  background:transparent; color:var(--cyan); font:inherit; font-size:1rem; line-height:1.5; box-shadow:none;
}
.rc-signal__entry input { width:100%; flex:1 1 auto; caret-color:transparent; }
.rc-signal__entry textarea { width:100%; flex:1; min-height:9rem; max-height:none; resize:vertical; caret-color:transparent; }
.rc-signal__textarea-mirror { position:absolute; overflow:hidden; white-space:pre-wrap; color:transparent; background:transparent; pointer-events:none; user-select:none; }
.rc-signal__mirror-marker { display:inline-block; width:1ch; height:1.08em; background:var(--cyan); box-shadow:0 0 .6rem rgb(81 246 255 / .72); color:transparent; vertical-align:-.17em; animation:terminalBlink 1s steps(2,end) infinite; }
.rc-signal__entry:focus-within { text-shadow:0 0 .35rem rgb(81 246 255 / .2); }
.rc-signal__typing::after,.rc-signal__input-cursor { display:inline-block; width:1ch; height:1.08em; background:var(--cyan); color:var(--bg); box-shadow:0 0 .6rem rgb(81 246 255 / .72); vertical-align:-.17em; pointer-events:none; animation:terminalBlink 1s steps(2,end) infinite; }
.rc-signal__typing::after { content:' '; }
.rc-signal__input-cursor { position:absolute; white-space:pre; }
.rc-signal__entry:focus-within .rc-signal__prompt-mark { text-shadow:0 0 .45rem rgb(81 246 255 / .8); }
.rc-signal__controls { margin:1rem 0; display:flex; align-items:center; flex-wrap:wrap; gap:.75rem; }
.rc-signal__control { font:inherit; color:var(--cyan); border:1px solid var(--line); background:transparent; padding:.45rem .75rem; cursor:pointer; min-height:44px; }
.rc-signal__control:hover,.rc-signal__control:focus-visible { color:var(--bright); border-color:var(--cyan); outline:2px solid var(--focus); outline-offset:2px; }
.rc-signal__error { color:var(--ascii-amber); }
.rc-signal__note { color:var(--dim); font-size:.86rem; margin:1.1rem 0; }
.rc-signal__note a { color:var(--cyan); }
.rc-signal__sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
/* Spectrum mode retains its own intentionally non-console colour palette. */
.rc-signal__spectrum { border:8px solid #c000c0; background:#000; color:#fff; padding:1rem; font:inherit; }
.rc-signal__spectrum canvas { display:block; width:min(100%,768px); max-width:100%; aspect-ratio:4/3; height:auto; margin:auto; background:#000; image-rendering:pixelated; image-rendering:crisp-edges; }
.rc-signal__game-controls { display:flex; justify-content:center; gap:.7rem; margin-top:.7rem; flex-wrap:wrap; }
.rc-signal__game-controls button { min-width:58px; min-height:48px; color:#fff; background:#0000cd; border:2px solid #fff; font:inherit; touch-action:none; }
.rc-signal__game-controls button:focus-visible { outline:3px solid #ff0; }
.rc-signal__spectrum p { white-space:pre-wrap; overflow-wrap:anywhere; }
.rc-signal__spectrum input.rc-signal__control { appearance:none; min-height:0; padding:0; border:0; border-radius:0; outline:0; background:transparent; color:inherit; box-shadow:none; }
@media (max-width:560px) { .rc-signal__entry { gap:.45rem; } .rc-signal__prompt-mark { font-size:.85rem; } }
@media (prefers-reduced-motion:reduce) { .rc-signal *, .rc-signal *::before, .rc-signal *::after { animation:none!important; transition:none!important; } }
@media (forced-colors:active) { .rc-signal__input-cursor,.rc-signal__textarea-mirror { display:none!important; } .rc-signal__entry input,.rc-signal__entry textarea { caret-color:auto; } }

/* The Critical Strip: instant full-viewport takeover; native game bitmap is 256x192. */
.rc-signal__game-modal {
  position:fixed;
  inset:0;
  z-index:2147483647;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  width:100%;
  height:100vh;
  height:100dvh;
  min-width:0;
  padding:clamp(.25rem,1dvh,.65rem) clamp(.35rem,1vw,.85rem);
  overflow:hidden;
  overscroll-behavior:contain;
  background:#000;
  color:#aaa;
  font-family:monospace;
  font-size:.8rem;
  line-height:1.3;
  animation:none;
  transition:none;
}
.rc-signal__game-modal:focus { outline:none; }
.rc-signal__game-header,.rc-signal__game-footer { flex:0 0 auto; }
.rc-signal__game-header { display:flex; justify-content:space-between; align-items:center; min-height:44px; gap:1rem; }
.rc-signal__game-heading { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rc-signal__game-header-actions { display:flex; align-items:center; gap:1rem; }
.rc-signal__game-close { appearance:none; border:1px solid #777; border-radius:0; background:#000; color:#fff; cursor:pointer; font:inherit; min-width:44px; min-height:44px; padding:.35rem .7rem; }
.rc-signal__game-close:hover,.rc-signal__game-close:focus-visible { outline:2px solid #ff0; outline-offset:2px; border-color:#fff; }
.rc-signal__game-stage { flex:1 1 auto; min-height:0; min-width:0; width:100%; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.rc-signal__spectrum--fullscreen {
  position:relative;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  min-width:0;
  width:100%;
  height:100%;
  max-height:100%;
  padding:0;
  border:0;
  background:#000;
  color:#fff;
  overflow:hidden;
  gap:.4rem;
}
.rc-signal__spectrum--fullscreen canvas {
  display:block;
  box-sizing:border-box;
  flex:0 1 auto;
  width:min(100%,calc((100dvh - 8rem)*4/3));
  height:auto;
  max-width:100%;
  max-height:calc(100dvh - 8rem);
  aspect-ratio:4/3;
  object-fit:contain;
  margin:0 auto;
  background:#000;
  image-rendering:pixelated;
  image-rendering:crisp-edges;
  touch-action:manipulation;
}
.rc-signal__spectrum--fullscreen canvas:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.rc-signal__game-help { flex:0 0 auto; border:0; background:#000; color:#aaa; font:inherit; font-size:.75rem; cursor:pointer; min-height:28px; padding:0 .6rem; }
.rc-signal__game-help:hover,.rc-signal__game-help:focus-visible { color:#fff; outline:2px solid #ff0; }
.rc-signal__game-instructions {
  position:absolute;
  z-index:2;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  box-sizing:border-box;
  width:min(90%,42rem);
  max-height:85%;
  overflow:auto;
  padding:clamp(.6rem,3vw,1.5rem);
  border:2px solid #cdcd00;
  background:#000;
  color:#fff;
  text-align:left;
  font-size:clamp(.8rem,1.35vw,1rem);
}
.rc-signal__game-instructions[hidden] { display:none!important; }
.rc-signal__game-instructions h2 { margin:0 0 .7rem; color:#cdcd00; font:inherit; font-weight:bold; }
.rc-signal__game-instructions p { margin:.7rem 0; color:#fff; text-align:left; white-space:normal; }
.rc-signal__game-touch { display:none; }
.rc-signal__game-loading { min-height:2rem; }
.rc-signal__game-footer { display:flex; align-items:center; justify-content:center; text-align:center; min-height:1rem; font-size:.7rem; }
@media (hover:none) and (pointer:coarse) {
  .rc-signal__game-touch { flex:0 0 auto; display:flex; justify-content:center; gap:clamp(.5rem,3vw,1rem); width:100%; touch-action:none; }
  .rc-signal__game-touch button {
    flex:0 1 6rem;
    min-width:54px;
    min-height:48px;
    border:1px solid #888;
    border-radius:0;
    background:#000;
    color:#eee;
    font:inherit;
    touch-action:none;
    user-select:none;
    -webkit-user-select:none;
  }
  .rc-signal__game-touch button:active { color:#ff0; border-color:#ff0; }
  .rc-signal__spectrum--fullscreen canvas {
    width:min(100%,calc((100dvh - 11.5rem)*4/3));
    max-height:calc(100dvh - 11.5rem);
  }
}
@media (max-width:560px) {
  .rc-signal__game-exit-hint { display:none; }
  .rc-signal__game-heading { font-size:.7rem; }
  .rc-signal__game-footer { display:none; }
}
@media (max-height:430px) {
  .rc-signal__game-heading,.rc-signal__game-footer { display:none; }
  .rc-signal__spectrum--fullscreen canvas { max-height:calc(100dvh - 7.5rem); width:min(100%,calc((100dvh - 7.5rem)*4/3)); }
  .rc-signal__game-touch button { min-height:44px; }
}
@media (prefers-reduced-motion:reduce) { .rc-signal__game-modal,.rc-signal__game-modal * { animation:none!important; transition:none!important; } }
