
  html, body { margin: 0; height: 100%; background: #040309; overflow: hidden; }
  body { display: flex; align-items: center; justify-content: center; }
  canvas { display: block; image-rendering: pixelated; touch-action: none; cursor: grab; }
  #hud { position: fixed; left: 12px; top: 10px; color: #e9e2cf; font: 12px/1.4 ui-monospace, Menlo, monospace;
         background: rgba(4, 3, 9, 0.55); padding: 4px 8px; pointer-events: none; white-space: pre-wrap;
         max-width: calc(100vw - 9.5rem); overflow-wrap: anywhere; }
  #gate { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #f4ecd8;
          font: 14px/1.6 ui-monospace, Menlo, monospace; letter-spacing: 0.06em; background: rgba(4, 3, 9, 0.35); cursor: pointer;
          text-align: center; padding: 16px; }
  #panel { position: fixed; right: 12px; top: 48px; bottom: 10px; width: min(300px, calc(100vw - 24px)); overflow-y: auto; display: none;
           background: rgba(6, 5, 14, 0.82); color: #e9e2cf; font: 12px/1.35 ui-monospace, Menlo, monospace;
           border: 1px solid rgba(233, 226, 207, 0.15); padding: 10px 12px; backdrop-filter: blur(6px); }
  #panel .ph { font-weight: bold; letter-spacing: 0.12em; margin-bottom: 6px; display: flex; justify-content: space-between; }
  #panel .ph span { font-weight: normal; opacity: 0.5; letter-spacing: 0; }
  #panel .sec { margin: 10px 0 4px; color: #f2b26b; letter-spacing: 0.1em; text-transform: uppercase; font-size: 11px; }
  #panel .row { display: grid; grid-template-columns: 92px 1fr 58px; align-items: center; gap: 6px; margin: 3px 0; }
  #panel input[type=range] { width: 100%; accent-color: #f2b26b; }
  #panel select { background: #15121f; color: #e9e2cf; border: 1px solid #3a3350; font: inherit; }
  #panel b { font-weight: normal; text-align: right; opacity: 0.8; }
  #panel .pre { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
  #panel button { background: #1b1728; color: #e9e2cf; border: 1px solid #3a3350; font: inherit; padding: 3px 7px; cursor: pointer; }
  #panel button:hover { border-color: #f2b26b; }
  #panel .keys { margin-top: 8px; opacity: 0.55; font-size: 11px; }
  #gate small { display:block; opacity: 0.6; max-width: 42em; margin-top: 8px; white-space: normal; line-height: 1.45; padding: 0 12px; }
  #search { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); width: min(720px, 90vw); display: none;
            background: rgba(6, 5, 14, 0.86); border: 1px solid rgba(242, 178, 107, 0.5); padding: 8px 10px; }
  #search input { width: 100%; box-sizing: border-box; background: transparent; border: none; outline: none; color: #f4ecd8;
                  font: 16px/1.4 ui-monospace, Menlo, monospace; letter-spacing: 0.04em; }
  #search #si { color: #f2b26b; font: 11px/1.4 ui-monospace, Menlo, monospace; margin-top: 4px; min-height: 1.4em;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ascii-back{position:fixed;top:12px;right:14px;z-index:40;font:11px/1.4 ui-monospace,Menlo,monospace;letter-spacing:.08em;text-transform:uppercase;color:#c9c0a8;text-decoration:none;border:1px solid #3a3350;background:#15121f;padding:6px 10px}
.ascii-back:hover{border-color:#f2b26b;color:#f2b26b}
body.film .ascii-back,body.hide .ascii-back{opacity:0;pointer-events:none}
body.film,body.film canvas,body.is-idle canvas,body.is-idle{cursor:none}
body.is-drag,body.is-drag canvas{cursor:grabbing}
canvas{cursor:grab;width:var(--stage-w, auto);height:var(--stage-h, auto)}
#hud.is-off,#panel.is-off,#gate.is-off,#search.is-off{display:none}
#search.is-on{display:block}
.differs{color:#f2b26b}
@media (prefers-reduced-motion: reduce){*{transition:none !important;animation:none !important}}

#panel.is-on{display:block}
