.doom-player { min-width: 0; margin-top: 1rem; }
.doom-terminal { width: 100%; min-width: 0; }
.doom-screen { padding: 0; font: 400 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; color: #e5e5df; }
.doom-player[hidden], .doom-player [hidden] { display: none !important; }
.doom-heading, .doom-toolbar, .doom-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.doom-heading { align-items: flex-end; margin-bottom: 1.5rem; }
.doom-command { margin: 0 0 0.65rem; color: #90968f; font-size: 0.75rem; overflow-wrap: anywhere; }
.doom-heading h2 { margin: 0; color: #f1f3ed; font-size: 1.8rem; font-weight: 500; letter-spacing: 0; line-height: 1.2; }
.doom-edition { flex-shrink: 0; color: #a1b196; font-size: 0.7rem; }
.doom-toolbar { flex-wrap: wrap; padding-bottom: 0.75rem; }
.doom-difficulty { display: flex; align-items: center; gap: 0.7rem; color: #9ca49c; }
.doom-difficulty select { min-height: 40px; border: 1px solid #434b43; border-radius: 3px; padding: 0.3rem 1.6rem 0.3rem 0.6rem; font: inherit; color: #e5e5df; background: #151914; color-scheme: dark; }
.doom-difficulty select:disabled { opacity: 0.55; }
.doom-actions { display: flex; align-items: center; gap: 0.35rem; }
.doom-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; flex-shrink: 0; border: 1px solid #414841; border-radius: 3px; background: #161b17; color: #f2f2ec; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; }
.doom-icon img, .doom-start img { display: block; pointer-events: none; }
.doom-icon:hover, .doom-icon.is-pressed { border-color: #adc691; background: #2e3a29; }
.doom-icon:disabled { opacity: 0.3; cursor: default; }
.doom-icon:focus-visible, .doom-start:focus-visible, .doom-screen select:focus-visible, .doom-screen input:focus-visible, .doom-screen a:focus-visible, .doom-credits summary:focus-visible { outline: 2px solid #c3dba9; outline-offset: 3px; }
.doom-viewport { position: relative; display: grid; place-items: center; width: 100%; max-width: 800px; margin-inline: auto; aspect-ratio: 4 / 3; overflow: hidden; isolation: isolate; background: #070908; container-type: size; }
.doom-poster, #doomCanvas { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
#doomCanvas { touch-action: none; outline: 0; object-fit: fill; }
@supports (width: 1cqw) { #doomCanvas { width: min(100cqw, 133.333cqh); height: min(100cqh, 75cqw); } }
#doomCanvas:focus-visible { outline: 2px solid #c3dba9; outline-offset: -2px; }
.doom-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; text-align: center; background: rgb(2 5 3 / 62%); }
.doom-overlay p { margin: 0; color: #eff3e8; font-size: 1.15rem; }
.doom-start { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; gap: 0.65rem; padding: 0.6rem 1.2rem; border: 1px solid #b8cf9f; border-radius: 3px; background: #1f2b1d; color: #e8f3dc; cursor: pointer; font: inherit; }
.doom-start:hover { background: #35482b; }
.doom-start:disabled { opacity: 0.65; cursor: wait; }
.doom-touch { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; max-width: 800px; margin: 1rem auto 0; }
.doom-dpad { display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(2, 52px); gap: 5px; }
.doom-dpad .doom-icon { width: 52px; height: 52px; }
.doom-dpad .doom-icon:first-child { grid-column: 2; }
.doom-dpad .doom-icon:nth-child(2) { grid-column: 1; grid-row: 2; }
.doom-dpad .doom-icon:nth-child(3) { grid-column: 2; grid-row: 2; }
.doom-dpad .doom-icon:nth-child(4) { grid-column: 3; grid-row: 2; }
.doom-combat { display: grid; grid-template-columns: repeat(3, 52px); gap: 5px; }
.doom-combat .doom-icon { width: 52px; height: 52px; }
.doom-combat .doom-fire { grid-column: span 2; width: 109px; border-color: #916b5c; background: #35231f; }
.doom-fire:hover, .doom-fire.is-pressed { background: #60392a; border-color: #c7967b; }
.doom-bottom { margin-top: 1rem; flex-wrap: wrap; }
#doomStatus { margin: 0; color: #a4b199; font-size: 0.72rem; overflow-wrap: anywhere; }
.doom-audio { display: flex; align-items: center; gap: 0.8rem; }
.doom-audio label { display: flex; align-items: center; gap: 0.45rem; cursor: pointer; font-size: 0.72rem; }
.doom-audio input { accent-color: #b9cc9c; }
.doom-audio input[type=range] { width: 90px; min-height: 32px; margin: 0; }
.doom-audio input[type=checkbox] { width: 18px; height: 18px; }
.doom-credits { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid #30362f; color: #969d95; font-size: 0.7rem; overflow-wrap: anywhere; }
.doom-credits summary { cursor: pointer; width: fit-content; padding: 0.4rem 0; }
.doom-credits a { color: #c3d2b5; text-underline-offset: 3px; }
.doom-terminal:fullscreen, .doom-terminal.is-fullscreen { display: flex; flex-direction: column; width: 100%; height: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; background: #090c09; }
.doom-terminal.is-fullscreen { position: fixed; inset: 0; z-index: 10000; height: 100dvh; }
.doom-terminal:fullscreen .doom-screen, .doom-terminal.is-fullscreen .doom-screen { min-height: 0; flex: 1; display: flex; flex-direction: column; padding: 0.75rem max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left)); overflow-y: auto; }
.doom-terminal:fullscreen .doom-heading, .doom-terminal.is-fullscreen .doom-heading, .doom-terminal:fullscreen .doom-credits, .doom-terminal.is-fullscreen .doom-credits { display: none; }
.doom-terminal:fullscreen .doom-viewport, .doom-terminal.is-fullscreen .doom-viewport { flex: 1; min-height: 120px; max-width: none; aspect-ratio: auto; }
.doom-terminal:fullscreen .doom-touch, .doom-terminal.is-fullscreen .doom-touch { width: 100%; flex-shrink: 0; }
.is-doom-fullscreen .companion { visibility: hidden; }
@media (max-width: 600px) {
  .doom-heading h2 { font-size: 1.45rem; }
  .doom-edition { display: none; }
  .doom-toolbar { gap: 0.5rem; }
  .doom-difficulty { font-size: 0.72rem; gap: 0.4rem; }
  .doom-difficulty select { max-width: 100px; }
  .doom-icon { width: 38px; height: 40px; }
  .doom-touch { gap: 0.4rem; }
  .doom-dpad, .doom-combat { grid-template-columns: repeat(3, 44px); gap: 4px; }
  .doom-dpad { grid-template-rows: repeat(2, 48px); }
  .doom-dpad .doom-icon, .doom-combat .doom-icon { width: 44px; height: 48px; }
  .doom-combat .doom-fire { width: 92px; }
  .doom-overlay p { font-size: 0.95rem; }
}
@media (max-width: 370px) {
  .doom-screen { padding: 0.65rem; }
  .doom-touch { flex-wrap: wrap; justify-content: space-around; }
  .doom-dpad, .doom-combat { grid-template-columns: repeat(3, 42px); gap: 3px; }
  .doom-dpad .doom-icon, .doom-combat .doom-icon { width: 42px; }
  .doom-combat .doom-fire { width: 87px; }
}
