/* Deep Breach: the canvas fills the stage; menus are HTML panels over it */
.db { display: flex; flex-direction: column; color: #e8fff4; }
.db-stage { position: relative; width: 100%; height: min(80vh, 700px); min-height: 380px; background: #000; overflow: hidden; border-radius: 10px;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
@media (max-width: 600px) { .db-stage { height: auto; aspect-ratio: 420 / 640; max-height: 82vh; min-height: 0; border-radius: 8px; } }
#db-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: none; touch-action: none; outline: none; }
.db-help { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px 12px; user-select: none; -webkit-user-select: none; }
.db-help .hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .db-help .hint-kb { display: none; } .db-help .hint-touch { display: inline; } }
.db-btns { display: inline-flex; gap: 8px; }
.db-tool { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; border-radius: 999px; border: 1px solid #1c3a2a; background: #04140b;
  color: #9dffc9; font: inherit; font-size: 12.5px; cursor: pointer; touch-action: manipulation; }
@media (hover: hover) { .db-tool:hover { border-color: #00ff6a; } }
.db-tool svg { width: 15px; height: 15px; flex: none; }
@media (pointer: coarse) { .db-tool { min-height: 44px; padding: 6px 16px 6px 13px; font-size: 14px; } .db-tool svg { width: 18px; height: 18px; } }
#db-sound .off { display: none; } #db-sound[aria-pressed="true"] { color: #6c8a7a; } #db-sound[aria-pressed="true"] .on { display: none; } #db-sound[aria-pressed="true"] .off { display: inline; }
.db-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* panels */
.db-overlay[hidden] { display: none; }
.db-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(0,20,10,0.55), rgba(0,0,0,0.75)); z-index: 2; }
.db-panel { width: min(100%, 380px); text-align: center; font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; padding: 26px 22px 22px;
  border: 1px solid rgba(0,255,106,0.45); border-radius: 14px; background: rgba(0,10,5,0.88); box-shadow: 0 0 40px rgba(0,255,106,0.18), inset 0 0 30px rgba(0,255,106,0.06);
  animation: db-in .25s cubic-bezier(.2,.8,.2,1); }
@keyframes db-in { from { opacity: 0; transform: scale(.96) translateY(6px); } }
.db-logo { position: relative; margin: 0 0 10px; font-size: clamp(30px, 9vw, 40px); font-weight: 900; letter-spacing: 0.08em; color: #eafff3;
  text-shadow: 0 0 12px rgba(0,255,106,0.9), 0 0 30px rgba(0,255,106,0.5); }
.db-logo::before, .db-logo::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
.db-logo::before { color: #ff2bd6; mix-blend-mode: screen; animation: db-glitch 2.6s infinite steps(1); }
.db-logo::after { color: #00e5ff; mix-blend-mode: screen; animation: db-glitch 2.6s infinite steps(1) reverse; }
@keyframes db-glitch { 0%, 88%, 100% { transform: none; clip-path: inset(0 0 0 0); opacity: 0; } 90% { transform: translate(-3px, 1px); clip-path: inset(10% 0 55% 0); opacity: 1; } 93% { transform: translate(3px, -1px); clip-path: inset(60% 0 8% 0); opacity: 1; } 96% { transform: translate(-2px, 0); clip-path: inset(35% 0 40% 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .db-logo::before, .db-logo::after { animation: none; } }
.db-head { margin: 0 0 8px; font-size: 22px; letter-spacing: 0.12em; color: #00ff6a; text-shadow: 0 0 14px rgba(0,255,106,0.7); }
.db-red { color: #ff1744; text-shadow: 0 0 14px rgba(255,23,68,0.7); font-size: 19px; }
.db-tag { margin: 0 0 14px; color: rgba(232,255,244,0.78); font-size: 13px; line-height: 1.5; }
.db-score { margin: 4px 0 4px; font-size: 38px; font-weight: 900; color: #fff; text-shadow: 0 0 18px rgba(0,255,106,0.6); }
.db-stats { margin: -4px 0 16px; font-size: 12px; color: rgba(232,255,244,0.6); } .db-stats b { color: #00ff6a; }
.db-actions { display: flex; flex-direction: column; gap: 9px; }
.db-btn { font: inherit; font-weight: 800; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; padding: 12px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(0,255,106,0.5); background: rgba(0,255,106,0.06); color: #b9ffd6; touch-action: manipulation; transition: background .15s, transform .1s; }
@media (hover: hover) { .db-btn:hover { background: rgba(0,255,106,0.16); } }
.db-btn:active { transform: translateY(1px); }
.db-btn:focus-visible { outline: 2px solid #eafff3; outline-offset: 2px; }
.db-btn-primary { background: #00ff6a; color: #001a0b; border-color: #00ff6a; box-shadow: 0 0 22px rgba(0,255,106,0.45); }
@media (hover: hover) { .db-btn-primary:hover { background: #5cffa0; } }
.db-checkpoints { margin-top: 16px; font-size: 11px; color: rgba(232,255,244,0.55); letter-spacing: 0.06em; text-transform: uppercase; }
.db-checkpoints div { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 7px; }
.db-btn-small { padding: 7px 11px; font-size: 12px; }

/* full screen: the stage takes every pixel above a slim control row */
.stage.is-immersive .stage-body > .db { min-height: 0; }
.stage.is-immersive .db-stage { flex: 1 1 auto; height: auto; aspect-ratio: auto; max-height: none; min-height: 0; border-radius: 0; }
.stage.is-immersive .db-help { flex: none; padding: 6px 12px 8px; font-size: 12px; }
@media (orientation: landscape) and (max-height: 520px) {
  .stage.is-immersive .db-help { position: absolute; right: 10px; bottom: 10px; padding: 0; z-index: 3; }
  .stage.is-immersive .db-help .hint-kb, .stage.is-immersive .db-help .hint-touch { display: none; }
  .stage.is-immersive .db-tool .label { display: none; }
  .stage.is-immersive .db-tool { min-width: 44px; min-height: 44px; justify-content: center; padding: 0; }
}
.stage .db-help { padding: 10px 14px 12px; }   /* beats the shared .stage .help padding, which has no side gutter */
