/* House Quest menu and HUD. Scene geometry and hidden-object hit areas remain in house-quest.css. */
:is(.hq-menu, .hq-session, .hq-result) { max-width: 1440px; padding-inline: clamp(16px, 3vw, 40px); }
:is(.hq-menu, .hq-session, .hq-result) .hq-topbar { min-height: 70px; gap: 12px; }
:is(.hq-menu, .hq-session, .hq-result) .hq-brand-seal { width: 32px; height: 32px; border: 0; }
:is(.hq-menu, .hq-session, .hq-result) .hq-brand { gap: 6px; }
:is(.hq-menu, .hq-session, .hq-result) .hq-brand b { font-size: 1.45rem; }
:is(.hq-menu, .hq-session, .hq-result) .hq-brand small { display: none; }
:is(.hq-menu, .hq-session, .hq-result) .hq-back { border-color: transparent; }
.hq-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.hq-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 0 24px; }
.hq-menu-heading h1 { font-size: clamp(1.6rem, 2.4vw, 2rem); letter-spacing: -.035em; }
.hq-menu-heading p { margin-top: 7px; color: var(--hq-muted); font-size: .86rem; line-height: 1.5; }
.hq-campaign-progress { display: inline-block; margin-top: 10px; font-size: .72rem; color: var(--hq-gold); }
.hq-language-control { display: grid !important; gap: 6px; min-width: 170px; }
.hq-language-control select { min-height: 42px; padding: 8px 12px; font-size: .85rem; }
.hq-menu-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
.hq-menu-world { min-width: 0; }
.hq-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.hq-section-heading h2 { font-size: 1rem; font-weight: 650; }
.hq-section-heading > span { font-size: .72rem; color: var(--hq-muted); }
.hq-world-preview { overflow: hidden; border: 1px solid var(--hq-line); border-radius: 14px; background: #101626; }
.hq-world-preview .hq-scene { height: clamp(220px, 21vw, 290px); aspect-ratio: auto; }
.hq-world-preview .hq-scene-image { object-fit: cover; object-position: center 45%; }
.hq-world-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px; border-top: 1px solid var(--hq-line); }
.hq-world-caption strong { font-size: .85rem; }
.hq-world-caption .hq-explore-link { min-height: 38px; font-size: .73rem; color: var(--hq-muted); padding: 4px 0; }
.hq-world-caption .hq-explore-link:hover { color: var(--hq-gold); }
.hq-menu .hq-houses { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hq-menu .hq-house-choice { position: relative; grid-template-columns: 1fr; gap: 7px; min-height: 76px; padding: 10px; align-content: start; border-radius: 10px; box-shadow: none; }
.hq-menu .hq-house-choice img { display: none; }
.hq-menu .hq-house-choice strong { font-size: .73rem; line-height: 1.35; padding-right: 12px; margin-bottom: 5px; }
.hq-menu .hq-house-choice small { font-size: .63rem; line-height: 1.45; }
.hq-choice-check { position: absolute; right: 8px; top: 10px; color: var(--hq-gold); }
.hq-choice-check svg { width: 14px; height: 14px; }
.hq-menu .hq-quest-catalog { margin: 24px 0 0; padding-top: 0; border: 0; }
.hq-menu .hq-quest-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 0; }
.hq-menu .hq-quest-choice { position: relative; flex-direction: row; align-items: flex-start; gap: 10px; padding: 14px 26px 14px 12px; min-height: 110px; border-radius: 10px; background: #11182a; }
.hq-menu .hq-quest-choice.is-selected { background: #252735; border-color: var(--hq-gold); }
.hq-menu .hq-quest-choice:disabled { opacity: 1; background: #101627; border-color: #343c50; }
.hq-menu .hq-quest-choice:disabled strong { color: #bfc7d8; }
.hq-menu .hq-quest-choice:disabled .hq-quest-icon { color: var(--hq-muted); }
.hq-menu .hq-quest-choice.is-completed .hq-quest-icon { color: #b9d1b2; }
.hq-quest-content .hq-quest-requirement { font-size: .7rem; color: #c6b793; line-height: 1.5; }
.hq-quest-icon { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 8px; background: #283147; color: var(--hq-muted); }
.hq-quest-icon svg { width: 16px; height: 16px; }
.hq-quest-choice.is-selected .hq-quest-icon { color: var(--hq-gold); background: #e9c88712; }
.hq-quest-content { display: grid; gap: 6px; min-width: 0; }
.hq-quest-content strong { font-size: .84rem; line-height: 1.35; }
.hq-quest-content > span { color: var(--hq-muted); font-size: .74rem; line-height: 1.45; }
.hq-quest-content small { color: var(--hq-muted); font-size: .65rem; line-height: 1.5; }
.hq-quest-recommended { color: var(--hq-gold); font-size: inherit; }
.hq-launch-card { position: sticky; top: 20px; padding: 24px; min-width: 0; border: 1px solid #49516a; border-radius: 14px; background: #172034; }
.hq-launch-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .7rem; color: var(--hq-muted); }
.hq-launch-meta > span:first-child { color: var(--hq-gold); }
.hq-launch-card h2 { margin-top: 15px; font-size: 1.5rem; line-height: 1.22; letter-spacing: -.025em; }
.hq-launch-intro { margin-top: 12px !important; color: var(--hq-muted); font-size: .81rem; line-height: 1.65; }
.hq-menu .hq-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 24px 0 8px; }
.hq-menu .hq-levels legend { margin-bottom: 10px; }
.hq-menu .hq-level { position: relative; display: grid; grid-template-columns: 1fr; min-height: 66px; gap: 0; padding: 12px 6px; text-align: center; box-shadow: none; }
.hq-menu .hq-level strong { font-size: .9rem; margin: 0 0 5px; }
.hq-menu .hq-level small { font-size: .65rem; }
.hq-menu .hq-level-dot { display: none; }
.hq-menu .hq-level.is-selected { background: #32313b; }
.hq-level-help { min-height: 42px; font-size: .74rem; line-height: 1.6; color: var(--hq-muted); }
.hq-menu .hq-best { margin-top: 14px !important; font-size: .73rem; }
.hq-launch-actions { display: grid; gap: 10px; margin-top: 20px; }
.hq-launch-actions .hq-primary { min-height: 52px; border-radius: 10px; font-size: .95rem; }
.hq-launch-actions .hq-save-note { display: flex; justify-content: center; align-items: center; gap: 5px; font-size: .63rem; }
.hq-launch-actions .hq-save-note svg { width: 12px; height: 12px; }
.hq-resume-context { color: var(--hq-muted); font-size: .71rem; line-height: 1.5; text-align: center; }
.hq-launch-actions .hq-text-button { min-height: 36px; font-size: .75rem; }
.hq-menu-help { border-top: 1px solid var(--hq-line); margin-top: 18px; padding-top: 4px; }
.hq-menu-help > summary { min-height: 44px; align-content: center; cursor: pointer; color: var(--hq-muted); font-size: .77rem; }
.hq-menu-help > div { display: grid; gap: 8px; margin-top: 8px; }
.hq-menu-help .hq-how { grid-template-columns: 1fr; padding: 10px 0; gap: 14px; }
.hq-menu-help .hq-how li > b { font-family: inherit; font-size: .75rem; }
.hq-menu-help .hq-floor-vocabulary { margin-top: 14px; }
.hq-menu-help .hq-floor-vocabulary h3 { color: var(--hq-muted); font-size: .7rem; }
.hq-menu-rules { display: grid; gap: 7px; color: var(--hq-muted); font-size: .7rem; line-height: 1.65; margin-top: 16px !important; }
.hq-mobile-quest-picker { display: none; }
.hq-session-hud { display: flex; align-items: center; gap: 20px; padding: 15px 0; color: var(--hq-muted); font-size: .75rem; }
.hq-session-level { flex: 1; }
.hq-session-progress { display: grid; gap: 7px; min-width: 180px; }
.hq-session-progress b { color: var(--hq-text); margin-right: 4px; }
.hq-progress-track { height: 4px; background: #343d52; border-radius: 10px; overflow: hidden; }
.hq-progress-track > span { display: block; height: 100%; background: var(--hq-gold); border-radius: inherit; }
.hq-session-score { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; }
.hq-session-score b, .hq-session-score svg { color: var(--hq-gold); }
.hq-session-score svg { width: 15px; height: 15px; }
.hq-session .hq-story-banner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--hq-line); border-radius: 12px; background: #172034; }
.hq-current-objective { display: flex; align-items: flex-start; gap: 12px; }
.hq-objective-icon { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 8px; color: var(--hq-gold); background: #e9c8870d; }
.hq-objective-icon svg { width: 17px; height: 17px; }
.hq-current-objective strong { font-size: .85rem; }
.hq-session .hq-current-objective p { margin-top: 6px; font-size: .81rem; line-height: 1.5; color: var(--hq-muted); }
.hq-story-context { margin: 0; }
.hq-story-context[open] { grid-column: 1 / -1; margin-left: 42px; }
.hq-story-context summary { min-height: 30px; align-content: center; color: var(--hq-muted); cursor: pointer; font-size: .69rem; }
.hq-session .hq-story-context > p { font-size: .8rem; line-height: 1.7; margin-block: 10px; }
.hq-session .hq-steps { padding: 10px 0 0; font-size: .69rem; gap: 12px; }
.hq-session .hq-steps li { max-width: none; }
.hq-session .hq-play-grid { gap: 20px; grid-template-columns: minmax(0, 1fr) 340px; }
.hq-session .hq-play-grid > div.hq-stage { display: block; grid-row: auto; min-width: 0; scroll-margin-top: 80px; }
.hq-session .hq-play-grid > aside { grid-row: auto; scroll-margin-top: 80px; }
.hq-session .hq-scene-card { border-color: var(--hq-line); border-radius: 12px; }
.hq-session .hq-scene-header { padding: 10px 16px; min-height: 64px; }
.hq-session .hq-scene-header h1 { font-size: 1.1rem; line-height: 1.3; margin-top: 3px; }
.hq-session .hq-scene-header .hq-kicker { color: var(--hq-muted); font-size: .55rem; letter-spacing: .08em; }
.hq-session .hq-floor-badge { font-size: .69rem; margin-top: 4px !important; }
.hq-session .hq-scene-tools .hq-back { font-size: .73rem; padding-inline: 8px; }
.hq-session .hq-zoom-control { display: inline-flex; width: auto; min-width: 44px; border-radius: 8px; gap: 7px; font-size: .74rem; background: #242d43; color: var(--hq-text); border-color: var(--hq-line); }
.hq-directory { border-top: 1px solid var(--hq-line); }
.hq-directory summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; cursor: pointer; font-size: .74rem; color: var(--hq-muted); }
.hq-directory summary::after { content: '+'; margin-left: auto; font-size: 1rem; }
.hq-directory[open] summary::after { content: '−'; }
.hq-directory .hq-floor-nav { border-top: 1px solid var(--hq-line); }
.hq-progress-board { margin-top: 16px; scroll-margin-top: 80px; }
.hq-progress-board > :is(.hq-journal,.hq-mystery-dossier) { margin: 0; border-radius: 12px; }
.hq-session .hq-investigation-panel { gap: 10px; }
.hq-session .hq-play-grid:has(.hq-answer-form,.hq-solved-card) .hq-journal { display: block; }
.hq-session :is(.hq-clue-card,.hq-answer-form,.hq-place-panel,.hq-solved-card) { border-radius: 12px; padding: 20px; }
.hq-session .hq-clue-card { background: #172034; border-color: #49516a; }
.hq-session .hq-clue-part h3 { color: var(--hq-muted); font-size: .7rem; }
.hq-session .hq-clue-part > span { color: var(--hq-gold); background: #e9c88712; }
.hq-session .hq-clue { font-size: .92rem; gap: 14px; }
.hq-session .hq-clue-part + .hq-clue-part { border-top-color: var(--hq-line); }
.hq-session .hq-hint-button { background: #252f45; border-color: #4c5670; color: var(--hq-text); }
.hq-session .hq-learning-guide { border-radius: 10px; }
.hq-session .hq-search-prompt { padding: 0 8px; }
.hq-keyboard-drawer { border-top: 1px solid var(--hq-line); }
.hq-keyboard-drawer summary { min-height: 40px; align-content: center; font-size: .75rem; color: var(--hq-muted); cursor: pointer; }
.hq-mobile-tools { display: none; }
.hq-unlock-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px; margin-top: 20px; border: 1px solid #847049; border-radius: 12px; background: #252735; }
.hq-unlock-notice.is-new-unlock { animation: hq-unlock-in .24s ease-out; }
.hq-unlock-notice > span { color: var(--hq-gold); }
.hq-unlock-notice > div { display: grid; flex: 1; gap: 5px; }
.hq-unlock-notice small { color: var(--hq-gold); font-size: .74rem; }
.hq-unlock-notice strong { font-size: .9rem; line-height: 1.5; }
.hq-unlock-notice .hq-primary { width: 100%; min-height: 44px; }
.hq-unlock-notice + .hq-completion-actions { margin-top: 14px; }
@keyframes hq-unlock-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .hq-unlock-notice.is-new-unlock { animation: none; } }
@media (min-width: 901px) {
  .hq-session .hq-investigation-panel { position: sticky; top: 20px; }
}
@media (max-width: 1100px) {
  .hq-menu-grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; }
  .hq-menu .hq-houses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hq-session .hq-play-grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; }
}
@media (max-width: 900px) {
  .hq-menu, .hq-session { padding-inline: 16px; padding-bottom: 100px; }
  .hq-menu .hq-topbar, .hq-session .hq-topbar { min-height: 60px; grid-template-columns: auto 1fr; }
  .hq-menu .hq-brand, .hq-session .hq-brand { justify-self: end; }
  .hq-menu .hq-top-note, .hq-session .hq-top-note { display: none; }
  .hq-menu-heading { padding: 20px 0; gap: 16px; }
  .hq-menu-heading h1 { font-size: 1.65rem; }
  .hq-menu-heading p { font-size: .78rem; max-width: 280px; }
  .hq-menu-grid { grid-template-columns: 1fr; }
  .hq-menu-world { display: contents; }
  .hq-world-selection { grid-row: 1; }
  .hq-launch-card { grid-row: 2; position: static; padding: 20px; }
  .hq-menu .hq-quest-catalog { display: block; grid-row: 3; margin-top: 0; }
  .hq-mobile-quest-picker { display: grid; gap: 8px; margin: 0 0 20px; }
  .hq-menu .hq-levels { margin-top: 18px; }
  .hq-launch-actions .hq-primary { position: fixed; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: 16px; width: calc(100% - 32px); z-index: 500; box-shadow: 0 8px 35px #0009; }
  .hq-session .hq-play-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hq-session .hq-play-grid > div.hq-stage { grid-row: 1; }
  .hq-session .hq-play-grid > aside.hq-investigation-panel { grid-row: 2; }
  .hq-session .hq-topbar { position: sticky; top: 0; z-index: 500; background: #11182bf5; }
  .hq-session-hud { flex-wrap: wrap; gap: 10px; padding: 12px 0; font-size: .7rem; }
  .hq-session-progress { min-width: 0; flex: 1; }
  .hq-session-score { font-size: .65rem; }
  .hq-session .hq-story-banner { padding: 14px; margin-bottom: 14px; }
  .hq-mobile-tools { position: fixed; z-index: 500; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px; display: flex; gap: 4px; padding: 6px; border: 1px solid #525b72; border-radius: 14px; background: #172034fa; box-shadow: 0 6px 25px #0008; }
  .hq-mobile-tools button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; border-radius: 8px; padding: 8px 5px; background: transparent; color: var(--hq-text); font-size: .74rem; }
  .hq-mobile-tools button:hover, .hq-mobile-tools button:focus-visible { background: #303c55; }
  .hq-mobile-tools svg { width: 17px; height: 17px; color: var(--hq-gold); }
}
@media (max-width: 560px) {
  .hq-menu, .hq-session { padding-inline: 12px; }
  .hq-menu-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .hq-language-control { display: flex !important; align-items: center; gap: 12px; width: 100%; }
  .hq-language-control select { flex: 1; }
  .hq-world-preview .hq-scene { height: 175px; }
  .hq-world-selection { display: flex; flex-direction: column; }
  .hq-world-selection .hq-section-heading { order: 0; }
  .hq-world-selection .hq-houses { order: 1; margin-top: 0; margin-bottom: 12px; }
  .hq-world-selection .hq-world-preview { order: 2; }
  .hq-world-caption { padding-inline: 10px; gap: 8px; }
  .hq-world-caption strong { font-size: .75rem; }
  .hq-world-caption .hq-explore-link { font-size: .65rem; gap: 4px; }
  .hq-world-caption .hq-explore-link svg { width: 14px; height: 14px; }
  .hq-menu .hq-house-choice { min-height: 73px; }
  .hq-menu .hq-quest-cards { grid-template-columns: 1fr; }
  .hq-launch-card { padding: 18px; }
  .hq-launch-card h2 { font-size: 1.3rem; }
  .hq-session-level { flex: 0 0 100%; }
  .hq-session .hq-story-context { margin-left: 0; }
  .hq-session .hq-story-banner { grid-template-columns: 1fr; gap: 4px; }
  .hq-session .hq-current-objective p { font-size: .77rem; }
  .hq-session .hq-scene-header { padding: 9px 10px; gap: 6px; }
  .hq-session .hq-scene-header h1 { font-size: .94rem; }
  .hq-session .hq-scene-tools { gap: 4px; }
  .hq-session .hq-scene-tools .hq-back { padding: 5px 6px; min-height: 44px; }
  .hq-session .hq-zoom-control { padding: 8px; }
  .hq-zoom-control > span { display: none; }
  .hq-session .hq-floor-row { grid-template-columns: 85px minmax(0, 1fr); }
  .hq-session .hq-floor-row .hq-room-nav button { flex-basis: auto; font-size: .65rem; }
  .hq-session :is(.hq-clue-card,.hq-answer-form,.hq-place-panel,.hq-solved-card) { padding: 18px; }
  .hq-mobile-tools button { font-size: .69rem; gap: 5px; }
}
