/* Scoped so the games keep their own canvas sizes, typography, and input. */
.house-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.house-skip { position: fixed; top: 8px; left: 8px; z-index: 101; padding: 12px 18px; background: #eeeade; color: #293e34; transform: translateY(-160%); }
.house-skip:focus { transform: none; }
.house-map-open { overflow: hidden !important; }
.house-room-studio, .house-room-garden { box-sizing: border-box; margin: 0; min-height: 100svh; padding: 24px 20px 88px; display: flex; justify-content: center; align-items: flex-start; background: repeating-linear-gradient(90deg, transparent 0 109px, #c6b18418 110px 111px), linear-gradient(#354a39 0 68%, #513b29 68% 100%); }
/* p5 writes inline sizes. Auto sizing preserves the canvas ratio inside its frame. */
.house-room-studio > canvas, .house-room-garden > canvas { display: block; flex: none; max-width: 100%; max-height: calc(100svh - 112px); width: auto !important; height: auto !important; outline: 1px solid #c4ab74; box-shadow: 0 0 0 7px #4c3927, 0 0 0 9px #9b8152, 0 9px 28px #15271b60; }
.house-room-nav, .house-map, .house-map * { box-sizing: border-box; }
.house-room-nav { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 100; display: flex; align-items: center; gap: 13px; width: max-content; max-width: calc(100% - 24px); padding: 6px 13px; color: #eee9d7; background: #243a30f5; border: 1px solid #c2b28188; box-shadow: 0 5px 25px #0f1c1740, inset 0 0 0 3px #243a30; border-radius: 3px; font: 12px/1.4 Georgia, 'Times New Roman', serif; touch-action: manipulation; }
.house-return, .house-room-map { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 34px; padding: 4px 0; color: inherit; text-decoration: none; border: 0; background: none; font: inherit; cursor: pointer; }
.house-return > span { font-size: 18px; color: #c2b281; }
.house-room-map svg { width: 15px; height: 15px; fill: none; stroke: #c2b281; stroke-width: 1; }
.house-room-map > span:last-child { color: #c2b281; margin-left: 5px; }
.house-room-nav-divider { width: 1px; height: 20px; background: #c2b28150; }
.house-room-nav a:hover, .house-room-nav button:hover { color: #e9ce89; }
.house-room-nav a:focus-visible, .house-room-nav button:focus-visible { outline: 2px solid #e9ce89; outline-offset: 3px; }
.house-map { position: fixed; inset: 0; width: min(740px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 35px 38px 25px; color: #293e34; background: #eeeade; border: 1px solid #a09d7e; border-radius: 3px; box-shadow: 0 25px 90px #101e1766; font: 14px/1.5 Georgia, 'Times New Roman', serif; text-align: left; touch-action: pan-y; overscroll-behavior: contain; color-scheme: light; }
.house-map::backdrop { background: #172a24b8; backdrop-filter: blur(5px); }
.house-map a { text-decoration: none; color: inherit; }
.house-map button { font: inherit; cursor: pointer; }
.house-map-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.house-map h2 { margin: 0; font: 36px/1.2 Georgia, 'Times New Roman', serif; letter-spacing: -.8px; }
.house-map-close { width: 38px; height: 38px; border: 1px solid #c6c6b3; color: #293e34; font: 26px/1 Georgia, serif !important; background: transparent; }
.house-map-floors { display: grid; gap: 24px; margin-top: 26px; }
.house-map-current-dot { font-size: 6px !important; }
.house-map h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 9px; font: 11px/1.5 Arial, sans-serif; letter-spacing: 1px; font-weight: 400; }
.house-map-grid { display: grid; border: 2px solid #76816a; gap: 4px; padding: 5px; background: #d5d7c7; }
.house-map-ground { grid-template-columns: 1fr .75fr 1fr; grid-template-rows: auto auto; }
.house-map-garden { grid-column: 1 / 4; min-height: 74px; background: #dde2cb !important; }
.house-map-upper { grid-template-columns: 1fr .75fr 1fr; }
.house-map-room { position: relative; min-height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 13px 10px; border: 1px solid #89927a; background: #e9e5d4; text-align: center; transition: background .15s; }
.house-map-room strong { font-size: 16px; font-weight: 400; }
.house-map-hall { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #f1eedf; text-align: center; padding: 12px 5px; }
.house-map-hall > span { font-size: 24px; line-height: 1; color: #7c886b; }
.house-map-hall strong { font-size: 12px; font-weight: 400; font-style: italic; }
.house-map-room:hover, .house-map-hall:hover { background: #cad2b5 !important; }
.house-map-current { background: #2e4c3d !important; color: #f4edda !important; }
.house-map-current > span, .house-map-current small { color: #d6d3ab !important; }
.house-map-current:hover { background: #3c5a48 !important; }
.house-map a:focus-visible, .house-map button:focus-visible { outline: 2px solid #9c763e; outline-offset: 2px; }
@media (max-width: 600px) {
  .house-room-studio, .house-room-garden { padding: 17px 14px 88px; }
  .house-room-nav { font-size: 11px; gap: 9px; padding: 5px 11px; }
  .house-map { padding: 23px 17px 18px; }
  .house-map h2 { font-size: 30px; }
  .house-map-room { padding: 15px 5px 12px; min-height: 110px; }
  .house-map-room strong { font-size: 13px; }
  .house-map-hall strong { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .house-map-room { transition: none; } }
