/* Lucy, her room. Scene controls are drawn in WebGL. This sheet loads the QUINE fonts,
   styles the browser's return link, paints the void behind the canvas, and hides text
   mirrors from sight while keeping them for readers. */
@import url('tokens/fonts.css');
@import url('tokens/colors.css');
@import url('tokens/typography.css');
@import url('tokens/spacing.css');
@import url('tokens/effects.css');
html, body { margin: 0; height: 100%; background: #0B0B10; color: #C9C8C2; overflow: hidden; overscroll-behavior: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#scene:active { cursor: grabbing; }
.room-back { position: fixed; z-index: 1; top: calc(80px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 0 14px; border: 1px solid #34343F; border-radius: 10px; background: #14141CEB; color: #C9C8C2; font: 13px/1.4 'IBM Plex Mono', ui-monospace, monospace; text-decoration: none; white-space: nowrap; }
.room-back:hover { color: #FF6B35; border-color: currentColor; }
.room-back:focus-visible { outline: 2px solid #FF6B35; outline-offset: 3px; }
.font-preload { position: absolute; left: -9999px; top: 0; opacity: 0; pointer-events: none; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.note { position: fixed; inset: 16px; font: 14px/1.5 'IBM Plex Mono', ui-monospace, monospace; }

/* ── The conversation (roadmap/N9.md): Ask Lucy, in QUINE ── */
body.view-chat #scene, body.view-chat .room-back, body.view-chat .room-return { display: none; }
body.view-scene .ask { display: none; }
.room-return { position: fixed; z-index: 2; top: calc(132px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); min-height: 44px; padding: 0 14px; border: 1px solid #34343F; border-radius: 10px; background: #14141CEB; color: #C9C8C2; font: 13px/1.4 'IBM Plex Mono', ui-monospace, monospace; cursor: pointer; }
.room-return:hover { color: #FF6B35; border-color: currentColor; }
.ask { box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; width: min(860px, 100%); height: 100dvh; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-left, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)); color: var(--text-body, #C9C8C2); font: 14.5px/1.55 var(--font-sans, 'IBM Plex Sans', system-ui, sans-serif); }
.ask *, .ask *::before, .ask *::after { box-sizing: border-box; }
.ask-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border-subtle, #2A2A38); }
.ask-title { display: flex; align-items: baseline; gap: 2px; margin: 0; }
.ask-name { font: 600 19px/1 var(--font-display, 'Space Grotesk', sans-serif); letter-spacing: -0.03em; color: var(--text-strong, #F4F3EF); }
.ask-stop { font: 600 19px/1 var(--font-display, 'Space Grotesk', sans-serif); color: #F2542D; margin-right: 10px; }
.ask-pill { align-self: center; padding: 2px 8px; border: 1px solid #38E3A655; border-radius: 4px; color: #8BF0CE; background: #38E3A61F; font: 500 10.5px/1.6 var(--font-mono, 'IBM Plex Mono', monospace); letter-spacing: 0.12em; text-transform: uppercase; }
.ask-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.q-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--border-strong, #3A3A4A); border-radius: 6px; background: #111119; color: var(--text-body, #C9C8C2); font: 500 12.5px/1.2 var(--font-mono, 'IBM Plex Mono', monospace); font-variant-ligatures: none; text-decoration: none; cursor: pointer; }
.q-btn:hover { color: var(--text-strong, #F4F3EF); border-color: #F2542D88; }
.q-btn:focus-visible, .ask-chip:focus-visible, .ask-pill-btn:focus-visible, .ask-link:focus-visible { outline: 2px solid #F2542D; outline-offset: 2px; }
.q-btn.primary { background: #F2542D; border-color: #F2542D; color: #2A0A00; }
.q-btn.primary:hover { background: #FF9A6F; box-shadow: 0 0 0 1px #F2542D59, 0 6px 28px #F2542D52; }
.q-btn.danger { border-color: #FF4D5E; color: #FF4D5E; }
.ask-panel { position: relative; padding: 16px; border: 1px solid var(--border-subtle, #2A2A38); border-top: 2px solid #F2542D; border-radius: 10px; background: #111119; }
.ask-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; background: none; color: var(--text-muted, #908F9A); font-size: 20px; cursor: pointer; }
.ask-eyebrow { margin: 0 0 8px; color: var(--text-muted, #908F9A); font: 500 11px/1.4 var(--font-mono, 'IBM Plex Mono', monospace); letter-spacing: 0.08em; }
.ask-option { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--border-subtle, #2A2A38); border-radius: 8px; }
.ask-option.on { border-color: #F2542D88; background: #F2542D0F; }
.ask-option-btn { padding: 0; border: 0; background: none; color: var(--text-strong, #F4F3EF); font: 600 14px/1.4 var(--font-sans, 'IBM Plex Sans', sans-serif); cursor: pointer; }
.ask-note { margin: 4px 0; color: var(--text-muted, #908F9A); font-size: 13px; }
.ask-note.warn { color: #F5B544; }
.ask-field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font: 500 11.5px/1.4 var(--font-mono, 'IBM Plex Mono', monospace); color: var(--text-muted, #908F9A); }
.ask-field input, .ask-field select, .ask-filter { min-height: 36px; padding: 6px 10px; border: 1px solid var(--border-strong, #3A3A4A); border-radius: 6px; background: #07070A; color: var(--text-strong, #F4F3EF); font: 13px/1.4 var(--font-mono, 'IBM Plex Mono', monospace); }
.ask-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.ask-peers { margin: 8px 0; padding-left: 18px; color: var(--text-muted, #908F9A); font: 12px/1.5 var(--font-mono, 'IBM Plex Mono', monospace); }
.ask-notice { margin: 0; padding: 10px 12px; border-left: 3px solid #F5B544; border-radius: 6px; background: #F5B5441A; color: var(--text-strong, #F4F3EF); }
.ask-log { flex: 1 1 auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ask-empty { padding: 20px; border: 1px solid var(--border-subtle, #2A2A38); border-top: 2px solid #F2542D; border-radius: 10px; background: #111119 linear-gradient(#ffffff06 1px, transparent 1px) 0 0 / 24px 24px; }
.ask-hero { margin: 4px 0 8px; color: var(--text-strong, #F4F3EF); font: 600 clamp(34px, 8vw, 52px)/1 var(--font-display, 'Space Grotesk', sans-serif); letter-spacing: -0.03em; }
.ask-lead { margin: 0 0 14px; max-width: 62ch; }
.ask-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-pill-btn { min-height: 36px; padding: 0 12px; border: 1px solid var(--border-strong, #3A3A4A); border-radius: 18px; background: none; color: var(--text-body, #C9C8C2); font: 13px/1.2 var(--font-sans, 'IBM Plex Sans', sans-serif); cursor: pointer; }
.ask-pill-btn:hover { border-color: #F2542D; color: var(--text-strong, #F4F3EF); }
.ask-divider { align-self: center; margin: 0; color: var(--text-faint, #8B8A95); font: 11px/1.4 var(--font-mono, 'IBM Plex Mono', monospace); letter-spacing: 0.08em; text-transform: uppercase; }
.ask-msg { display: flex; gap: 10px; max-width: 100%; }
.ask-msg.me { align-self: flex-end; max-width: min(78%, 620px); padding: 10px 14px; border: 1px solid #703934; border-radius: 10px 10px 2px 10px; background: #372024; color: var(--text-strong, #F4F3EF); }
.ask-msg.me .ask-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-avatar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: #F2542D; color: #2A0A00; font: 600 14px/1 var(--font-display, 'Space Grotesk', sans-serif); }
.ask-card { min-width: 0; max-width: min(88%, 680px); padding: 10px 14px; border: 1px solid var(--border-subtle, #2A2A38); border-radius: 2px 10px 10px 10px; background: #181822; }
.ask-card .ask-text { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-badge { display: inline-block; padding: 1px 6px; border: 1px solid #F2542D66; border-radius: 4px; color: #FF9A6F; font: 500 10.5px/1.6 var(--font-mono, 'IBM Plex Mono', monospace); letter-spacing: 0.12em; text-transform: uppercase; }
.ask-badge.words { border: 1px dashed #8B7CF6; color: #B6A8FF; }
.ask-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.ask-link { padding: 0; border: 0; background: none; color: var(--text-muted, #908F9A); font: 12px/1.4 var(--font-mono, 'IBM Plex Mono', monospace); cursor: pointer; }
.ask-link:hover { color: #FF9A6F; }
.ask-refs summary { color: var(--text-muted, #908F9A); font: 12px/1.4 var(--font-mono, 'IBM Plex Mono', monospace); cursor: pointer; }
.ask-refs ul { margin: 6px 0 0; padding-left: 12px; border-left: 3px solid #38E3A655; color: var(--text-muted, #908F9A); font: 12px/1.5 var(--font-mono, 'IBM Plex Mono', monospace); list-style: none; overflow-wrap: anywhere; }
[data-live="true"] .ask-badge { animation: ask-pulse 1.2s ease-in-out infinite; }
@keyframes ask-pulse { 50% { opacity: 0.45; } }
.ask-chips { flex: none; display: flex; flex-wrap: wrap; gap: 6px; max-height: 22vh; overflow-y: auto; }
.ask-filter { flex: 1 1 100%; }
.ask-chip { min-height: 32px; padding: 0 10px; border: 1px solid var(--border-strong, #3A3A4A); border-radius: 4px; background: #111119; color: var(--text-body, #C9C8C2); font: 12px/1.2 var(--font-mono, 'IBM Plex Mono', monospace); cursor: pointer; }
.ask-chip:hover { border-color: #F2542D88; color: var(--text-strong, #F4F3EF); }
.ask-chip.on { border-color: #F2542D; background: #F2542D22; color: var(--text-strong, #F4F3EF); }
.ask-composer { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 12px; border: 1px solid var(--border-strong, #3A3A4A); border-radius: 6px; background: #07070A; }
.ask-composer:focus-within { border-color: #F2542D; box-shadow: 0 0 0 3px #F2542D2E; }
.ask-prompt { color: #F2542D; font: 600 15px/36px var(--font-mono, 'IBM Plex Mono', monospace); }
#ask-input { flex: 1; min-height: 36px; max-height: 30vh; padding: 7px 0; border: 0; outline: none; resize: none; background: none; color: var(--text-strong, #F4F3EF); font: 14px/1.5 var(--font-mono, 'IBM Plex Mono', monospace); font-variant-ligatures: none; }
.ask-hint { margin: 0; color: var(--text-faint, #8B8A95); font: 11px/1.4 var(--font-mono, 'IBM Plex Mono', monospace); text-align: center; }
@media (max-width: 600px) {
  .ask { gap: 10px; }
  .ask-msg.me { max-width: 88%; }
  .ask-card { max-width: calc(100% - 38px); }
  .q-btn { min-height: 44px; }
  .ask-chip, .ask-pill-btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { [data-live="true"] .ask-badge { animation: none; } }
