diff --git a/src/ui/crt.css b/src/ui/crt.css index 4c06e91..9cd9b28 100644 --- a/src/ui/crt.css +++ b/src/ui/crt.css @@ -179,7 +179,6 @@ white-space: pre-wrap; } -[data-mystery-input]:disabled { - opacity: 0.4; - cursor: not-allowed; +[data-mystery-input].ended { + opacity: 0.55; } diff --git a/src/ui/terminal.ts b/src/ui/terminal.ts index 349828a..6ea55ee 100644 --- a/src/ui/terminal.ts +++ b/src/ui/terminal.ts @@ -34,7 +34,11 @@ if (!transcriptEl || !inputEl) { } const syncEndedUI = (): void => { - inputEl!.disabled = state.endedWith !== null + // Don't disable the input — the player still needs to type `restart` or + // `undo`. A `disabled` input rejects keydown events entirely. Use a class + // for visual styling instead; the keydown handler enforces the input + // restriction. + inputEl!.classList.toggle('ended', state.endedWith !== null) } const buildParserContext = (s: GameState): ParserContext => {