/* 커뮤니티 집 방문 — 세로 화면 카드(논리 320×670을 화면에 맞게 키운다)
   UI 는 본 수조(coral-bronze: 청록 슬레이트 + 낡은 황동, coralTheme.css)와 같은 판·버튼·머리 그림과 글꼴을 쓴다. */
.community-house {
  position: fixed;
  inset: 0;
  z-index: 2147482000; /* 장면 로딩(2147483000) 아래, 일반 패널 위 */
  box-sizing: border-box;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  --house-panel: url('../../assets/ui/coral-bronze/panel.webp');
  --house-inset: url('../../assets/ui/coral-bronze/inset-plate.webp');
  --house-button: url('../../assets/ui/coral-bronze/button.webp');
  --house-header: url('../../assets/ui/coral-bronze/header.webp');
  background: #000;
  color: #f0e3c1;
  font-family: var(--ui-font-body, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.community-house[hidden] { display: none; }
.community-house:focus { outline: none; }
.community-house *, .community-house *::before, .community-house *::after { box-sizing: border-box; }

.house-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  background: #000;
}
/* Match the tank visit title and pixel hotkeys in its logical coordinate space. */
.house-place {
  position: absolute; z-index: 8;
  top: calc(37px * var(--house-scale, 1)); left: 50%; transform: translateX(-50%);
  max-width: calc(150px * var(--house-scale, 1));
  padding: calc(3px * var(--house-scale, 1)) calc(8px * var(--house-scale, 1));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #f0e3c1; font: 700 calc(11px * var(--house-scale, 1))/1.2 var(--pixel11, Galmuri11, monospace);
  text-align: center; text-shadow: 0 1px 0 #000c, 0 0 3px #0009;
  pointer-events: none;
}
/* 방문 중에는 오른쪽에 버튼이 셋(5 + 34×3 + 4×2 = 115px)이라, 제목은 그 왼쪽 빈자리(0~205px)의 가운데에 둔다. */
.community-house[data-house-mode="visit"] .house-place { left: calc(102px * var(--house-scale, 1)); max-width: calc(190px * var(--house-scale, 1)); }
.house-visit-topbar {
  position: absolute; z-index: 8;
  top: calc(37px * var(--house-scale, 1)); right: calc(5px * var(--house-scale, 1));
  display: flex; align-items: flex-start; gap: calc(4px * var(--house-scale, 1));
}
.house-visit-topbar .house-btn {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: calc(34px * var(--house-scale, 1)); height: calc(34px * var(--house-scale, 1));
  min-width: 0; min-height: 0; padding: 0; line-height: 0;
  border: 1px solid transparent; border-image: var(--house-button) 90 fill / 5px / 0 stretch;
  border-radius: 0; background: #3b5046; box-shadow: 0 2px 3px #0008;
}
.house-visit-topbar .house-btn[hidden] { display: none; }
.house-design-btn[aria-pressed="true"] { filter: brightness(1.25); }
.house-design-btn svg { image-rendering: pixelated; }
.house-visit-topbar :is(.visit-hotkey-icon,.guestbook-icon) { width: calc(18px * var(--house-scale, 1)); height: calc(18px * var(--house-scale, 1)); image-rendering: pixelated; }
.house-heart-btn[aria-pressed="true"] .visit-like-heart { fill: #ff5a6e; }
.house-heart-btn[aria-pressed="true"] .visit-hotkey-icon { filter: drop-shadow(0 0 3px #ff5a6eb3); }
.house-gallery-panel {
  position: absolute; left: 0; right: 0; bottom: calc(20px * var(--house-scale, 1));
  height: calc(40px * var(--house-scale, 1)); z-index: 8;
  display: flex; align-items: center; justify-content: center;
  background:#13272a; border-top:1px solid transparent;
  border-image:url('../../assets/ui/coral-bronze/hud-rail.webp') 20% 12% 20% 12% fill / calc(7px * var(--house-scale,1)) calc(10px * var(--house-scale,1)) calc(6px * var(--house-scale,1)) / 0 stretch;
  border-radius:0;box-shadow:0 -2px 5px #001014b3;
  color: #f0e3c1; font: calc(11px * var(--house-scale, 1)) var(--ui-font-body, sans-serif); letter-spacing: .06em;
}
.house-view {
  position: absolute;
  left: 0;
  width: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: translateY(calc(-1 * var(--house-design-lift, 0px)));
}

.house-btn {
  font: inherit;
  color: #f0dfb6;
  cursor: pointer;
  touch-action: manipulation;
}
.house-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 6px 12px;
  /* 본 수조 대화상자 버튼과 같은 판 */
  border: 1px solid #9b916c;
  border-radius: 5px;
  background: linear-gradient(#576a5d, #314940);
  box-shadow: inset 0 1px #e2dbb44a, inset 0 -2px #0a1b1c99, 0 1px 2px #0007;
  color: #f0dfb6;
  text-shadow: 0 1px 1px #091b1c;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.house-btn:disabled { background: #203332; color: #95a399; border-color: #53655b; box-shadow: inset 0 1px #72837233; opacity: .68; cursor: default; }
.house-primary, .house-btn[aria-pressed="true"] { border-color: #e1c588; background: linear-gradient(#68785a, #3a5945); box-shadow: inset 0 1px #ffe3a166, 0 0 0 1px #d3bc7026; color: #fff0c6; }
.house-btn:not(:disabled):hover { filter: brightness(1.1); }
.house-btn:not(:disabled):active { filter: brightness(.78); }
.house-btn:focus-visible, .house-sort-btn:focus-visible, .house-tank-btn:focus-visible, .house-leave-input:focus-visible {
  outline: 2px solid #f7df99;
  outline-offset: 2px;
}
.house-sr-only {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.house-prep-chip {
  position: absolute;
  right: 8px;
  top: calc(var(--house-scale, 1) * 76px);
  z-index: 7;
  padding: 4px 8px;
  border: 1px solid #a79569;
  border-radius: 6px;
  background: #153334f2;
  color: #eddfbf;
  font-size: 12px;
}

/* 갤러리: 다가간 액자의 큰 미리보기(위쪽) */
.house-preview {
  position: absolute;
  left: 8px;
  right: 8px;
  /* 오른쪽 위 버튼(👥·나가기) 아래에서 시작해 겹치지 않는다. */
  top: calc(var(--house-scale, 1) * 78px);
  z-index: 7;
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 2px solid #aa9664;
  border-image: var(--house-panel) 145 fill / 16px / 0 stretch;
  border-radius: 9px;
  background: #112729;
  box-shadow: 0 8px 24px #0009, 0 1px 0 #dfc89466;
  color: #f0e3c1;
}
.house-preview[hidden] { display: none; }
.community-house .house-preview .house-btn.house-preview-close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; min-width: 0; min-height: 0; padding: 0; font-size: 18px; line-height: 1; }
.house-preview-close[hidden] { display: none; }
.house-preview-frame {
  position: relative;
  flex: none;
  width: calc(var(--house-scale, 1) * 80px);
  aspect-ratio: 1 / 2;
  border: 3px solid #a18d61;
  box-shadow: inset 0 0 0 1px #1a2e31, 0 1px #e5d39e22;
  background: #07171c;
}
.house-preview-frame canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.house-preview-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 4px; color: #c6f1ec; font-size: 12px; text-align: center; }
.house-preview-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-right: 26px; }
.house-preview-title { font: 700 15px/1.3 var(--ui-font-display, serif); color: #eddaab; overflow-wrap: anywhere; }
.house-preview-status { font-size: 12px; color: #a6b9ad; }
.house-preview-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 2px 0 0; padding: 8px 0 0; border-top: 1px solid #aa966444; font-size: 12px; }
.house-preview-facts:empty { display: none; }
.house-preview-facts dt { color: #a6b9ad; }
.house-preview-facts dd { margin: 0; color: #f0e3c1; font-weight: 600; overflow-wrap: anywhere; }
.house-preview-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* 문 앞 인사 */
.house-talk {
  position: absolute;
  left: 10px;
  right: 10px;
  /* 인물(머리 ≈ 장면 아래에서 183 논리 px)을 가리지 않게 그 위에 띄운다. */
  bottom: calc(var(--house-scale, 1) * 196px);
  z-index: 9;
  padding: 14px 16px;
  border: 2px solid #aa9664;
  border-image: var(--house-panel) 145 fill / 16px / 0 stretch;
  border-radius: 9px;
  background: #112729;
  box-shadow: 0 8px 24px #0009, 0 1px 0 #dfc89466;
  color: #f0e3c1;
}
.house-talk[hidden] { display: none; }
.house-talk-text { margin: 0 0 10px; min-height: 2.6em; font-size: 15px; line-height: 1.45; color: #f0e3c1; }
.house-talk-choices { display: flex; flex-wrap: wrap; gap: 6px; }

.house-bottom {
  position: absolute;
  inset: auto 0 calc(60px * var(--house-scale, 1)) 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 10px 4px;
  pointer-events: none;
}
.house-bottom[hidden] { display: none; }

/* The panel and canvas share one animation progress; world/collision coordinates stay fixed. */
.house-design-panel {
  position: absolute; z-index: 12;
  left: calc(8px * var(--house-scale, 1)); right: calc(8px * var(--house-scale, 1));
  bottom: calc(20px * var(--house-scale,1));
  height: calc(245px * var(--house-scale, 1));
  transform: translateY(100%);
  display: flex; flex-direction: column; min-height: 0;
  border: 2px solid #aa9664;
  border-image: var(--house-panel) 145 fill / 10px / 0 stretch;
  background: #102829; box-shadow: 0 -4px 16px #000a;
  color: #f0e3c1;
}
.house-design-panel[hidden] { display: none; }
.house-design-head, .house-design-tabs, .house-design-foot { flex: none; display: flex; align-items: center; gap: 4px; padding: calc(3px * var(--house-scale, 1)); }
.house-design-head { justify-content: space-between; background: #193a3b var(--house-header) center / 100% 100% no-repeat; font: 700 calc(11px * var(--house-scale, 1)) var(--pixel11, Galmuri11, monospace); }
.house-design-panel .house-btn, .house-design-tab, .house-design-choice {
  border: 1px solid #a99665; border-image: var(--house-button) 90 fill / 5px / 0 stretch;
  border-radius: 0; background: #3b5046; color: #f0e3c1; cursor: pointer;
  font: 700 calc(10px * var(--house-scale, 1)) var(--pixel11, Galmuri11, monospace);
}
.house-design-panel .house-btn { min-height: calc(25px * var(--house-scale, 1)); padding: 3px 7px; }
.house-design-tabs .house-design-tab { flex: 1; min-width: 0; min-height: calc(29px * var(--house-scale, 1)); padding: 3px 2px; }
.house-design-tab[aria-selected="true"] { color: #ffdf94; filter: brightness(1.24); }
.house-design-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: #aa9564 #11282a; }
.house-design-choice { display: flex; align-items: center; gap: 8px; width: 100%; min-height: calc(49px * var(--house-scale, 1)); padding: 5px 8px; text-align: left; touch-action: pan-y; }
.house-design-choice[aria-pressed="true"] { outline: 2px solid #ffdf94; outline-offset: -2px; }
.house-design-choice[data-applied="true"] { box-shadow: inset 0 -2px #acd18d; }
.house-design-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; image-rendering: pixelated; }
.house-design-name { flex: 1; min-width: 0; }
.house-design-free { color: #d6e5ad; }
.house-design-soon { justify-content: center; color: #aab4b4; }
.house-design-choice:disabled { cursor: default; opacity: .7; }
.house-design-foot { min-height: calc(32px * var(--house-scale, 1)); border-top: 1px solid #a99665; }
.house-design-status { flex: 1; min-width: 0; font-size: calc(9px * var(--house-scale, 1)); }
.house-design-panel :is(button:focus-visible) { outline: 2px solid #ffdf94; outline-offset: -2px; }
.house-bottom > * { pointer-events: auto; }
.house-hint {
  max-width: 300px;
  padding: 6px 10px;
  border: 1px solid #a79569;
  border-radius: 6px;
  background: #153334f2;
  color: #eddfbf;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}
.house-hint[hidden] { display: none; }
.house-controls { display: flex; align-items: flex-end; justify-content: center; width: 100%; gap: 24px; }
.house-action { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 96px; }
.house-action[hidden], .house-act-btn[hidden] { display: none; }
.house-act-label {
  max-width: 144px;
  padding: 3px 6px;
  border: 1px solid #8d805b;
  border-radius: 3px;
  background: #14282ce8;
  color: #f0e1b9;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}
.house-act-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: url('../../assets/ui/coral-bronze/painted-key.webp') center / 36px 36px no-repeat;
  box-shadow: none;
  font-size: 17px;
}

/* 집주인 목록, 떠나기 대화상자 */
.house-sheet, .house-exhibit, .house-leave, .house-mail, .house-dex {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  max-height: 86%;
  overflow: auto;
  padding: 18px 18px 20px;
  border: 2px solid #aa9664;
  border-image: var(--house-panel) 145 fill / 16px / 0 stretch;
  border-radius: 9px 9px 0 0;
  background: #112729;
  box-shadow: 0 8px 24px #0009, 0 1px 0 #dfc89466;
  color: #f0e3c1;
  scrollbar-width: thin;
  scrollbar-color: #aa9564 #11282a;
  touch-action: pan-y;
  user-select: text;
  -webkit-user-select: text;
}
.house-sheet[hidden], .house-exhibit[hidden], .house-leave[hidden], .house-mail[hidden], .house-dex[hidden] { display: none; }
.house-sheet h2, .house-exhibit h2, .house-leave h2, .house-mail h2, .house-dex h2 { margin: 0 0 8px; font: 700 17px/1.3 var(--ui-font-display, serif); color: #eed9a7; text-shadow: 0 2px 3px #071b1d; }
.house-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* 햄버거 메뉴의 중앙 창: 논리 폭 300px, 높이 86%, 사방 16px 여백. */
.community-house .house-menu-panel {
  left: 50%; right: auto; top: 50%; bottom: auto;
  transform: translate(-50%, -50%);
  width: min(calc(300px * var(--house-scale, 1)), calc(100% - 32px));
  height: min(86%, calc(100% - 32px));
  max-height: none;
  padding: 0;
  border: 3px solid rgba(255, 211, 110, .52);
  border-image: none;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.09), transparent 45%), #10202b;
  box-shadow: inset 0 1px rgba(255,255,255,.22), 0 12px 28px #000a;
}
.house-menu-panel .house-sheet-head {
  min-height: calc(49px * var(--house-scale, 1));
  padding: 6px 10px;
  border-bottom: 3px solid rgba(255, 211, 110, .52);
  background: rgba(255, 211, 110, .12);
}
.house-menu-panel .house-sheet-head h2 { margin: 0; color: #ffd36e; }
.house-menu-panel .house-sort, .house-menu-panel .house-list,
.house-menu-panel .house-pager, .house-menu-panel .house-exhibit-stage,
.house-menu-panel .house-exhibit-slots, .house-menu-panel .house-exhibit-caution,
.house-menu-panel .house-exhibit-notice { margin-left: 10px; margin-right: 10px; }
.house-menu-panel .house-pager { margin-bottom: 10px; }
.house-leave-input {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #748777;
  border-radius: 5px;
  background: #102426;
  box-shadow: inset 0 2px 4px #0007, 0 1px #e5d39e22;
  font: inherit;
  font-size: 16px; /* iOS 자동 확대 방지 */
  color: #f0e6cc;
  caret-color: #efcf86;
}
.house-leave-input::placeholder { color: #879c94; opacity: 1; }
.house-leave-input { resize: vertical; }
.house-sort { display: flex; gap: 6px; margin: 8px 0; }
.house-sort-btn {
  position: relative;
  flex: 1;
  min-height: 44px;
  padding: 5px 10px 5px 16px;
  border: 1px solid #4b5559;
  border-radius: 4px;
  background: linear-gradient(#2b3134, #161b1d);
  color: #c9d3cc;
  font: 700 12px var(--ui-font-body, sans-serif);
  cursor: pointer;
}
.house-sort-btn::before { content: ''; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px; margin-top: -2px; border-radius: 50%; background: #3b4541; }
.house-sort-btn.active { color: #eafff1; border-color: #4fae7d; }
.house-sort-btn.active::before { background: #3fe08a; box-shadow: 0 0 4px #3fe08a; }
.house-tank-list { display: grid; gap: 6px; width: 100%; min-width: 0; }
.community-house .house-tank-btn {
  width: 100%;
  min-width: 0;
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid #708073;
  border-radius: 6px;
  background: linear-gradient(110deg, #304344, #1a2e31 72%);
  box-shadow: inset 0 1px #c8d5c438, inset 0 -2px #061819b3, 0 2px 3px #0007;
  font: 12px var(--ui-font-body, sans-serif);
  color: #f0e3c1;
  text-align: left;
  cursor: pointer;
}
.house-tank-btn:hover { border-color: #ffd36e; background: #1b2632; }
.house-tank-portrait { position: relative; flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid #819185; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #314f4f, #07191e); box-shadow: inset 0 1px 4px #000a, 0 1px #c6b47b40; }
.house-tank-portrait::after { content: ''; position: absolute; left: 7px; top: 10px; width: 16px; height: 12px; border: 2px solid #bfae77; background: linear-gradient(#397c95 0 62%, #537158 63%); image-rendering: pixelated; }
.house-tank-info { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 1px; }
.house-tank-info > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-house .house-tank-info .community-published-owner { color: #e7e8cb; font-size: 12px; }
.community-house .house-tank-info .community-published-meta { color: #9fd0c2; font-size: 10px; }
.house-tank-arrow { color: #9fd0c2; font-size: 22px; }
.house-empty { margin: 10px 0; font-size: 14px; line-height: 1.5; }
.house-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 13px; }
.house-exhibit-stage { display: flex; gap: 12px; margin: 8px 0 10px; }
.house-exhibit-preview { flex: 0 0 100px; height: 178px; border: 3px solid #a18d61; background: #07171c; box-shadow: inset 0 0 0 1px #1a2e31; }
.house-exhibit-preview canvas { display: block; width: 94px; height: 172px; image-rendering: pixelated; }
.house-exhibit-side { display: flex; flex: 1; flex-direction: column; gap: 7px; min-width: 0; }
.house-exhibit-selection { margin: 0 auto; color: #ddc98f; font-size: 12px; line-height: 1.3; }
.house-exhibit-side .house-btn { width: 100%; }
.house-exhibit-slot-list { display: grid; gap: 4px; }
.community-house .house-exhibit-slot {
  display: flex; align-items: center; gap: 7px; width: 100%; min-height: 44px;
  padding: 5px 8px; border: 1px solid #708073; border-radius: 6px;
  background: linear-gradient(110deg, #304344, #1a2e31 72%); box-shadow: inset 0 1px #c8d5c438, inset 0 -2px #061819b3, 0 2px 3px #0007; color: #f0e3c1;
  font: 11px var(--ui-font-body, sans-serif); cursor: pointer;
}
.community-house .house-exhibit-slot[data-state="published"] { border-color: #b8574a; box-shadow: inset 3px 0 0 #ff5a45; }
.community-house .house-exhibit-slot[aria-pressed="true"] { outline: 2px solid #e1c588; outline-offset: -2px; }
.community-house .house-exhibit-slot:disabled { opacity: .55; cursor: default; }
.house-exhibit-slot .community-my-tank-screen { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid #819185; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #314f4f, #07191e); color: #e4d4a6; box-shadow: inset 0 1px 4px #000a, 0 1px #c6b47b40; }
.house-exhibit-slot-name { flex: 1; text-align: left; }
.house-exhibit-select { color: #9fd0c2; }
.house-exhibit-caution { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 11px; line-height: 1.4; }
.house-exhibit-caution input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: #3fe08a; }
.house-exhibit-notice { min-height: 1.4em; margin: 6px 0 0; color: #bdccb9; font-size: 11px; line-height: 1.4; }
.house-mail-actions { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.house-mail-actions[hidden] { display: none; }
.house-mail-actions .house-btn { min-height: 48px; padding: 5px 9px; font-size: 12px; }
.house-mail-host { min-width: 0; }
.house-mail #weeklyMount { width: 100%; min-height: 0; }
.house-mail #weeklyMount > .card { margin: 8px 0 0; }
.house-mail #weeklyMount .head { display: none; }
.house-mail #weeklyMount .body { padding: 8px 0; }
.house-mail #weeklyMount .wr-panel { display: flex; flex-direction: column; gap: 10px; }
.house-mail #weeklyMount .wr-cycle { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.house-mail #weeklyMount .wr-day { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; height: 36px; border: 2px solid #586d60; background: #142d2c; }
.house-mail #weeklyMount .wr-day-claimed { border-color: #56886b; }
.house-mail #weeklyMount .wr-day-next { border-color: #e1c588; background: #394537; }
.house-mail #weeklyMount .wr-day-num { position: absolute; top: 1px; left: 2px; font-size: 8px; color: #c4cbbb; }
.house-mail #weeklyMount .wr-day-icon { font-size: 15px; line-height: 1; }
.house-mail #weeklyMount .wr-day-check { position: absolute; right: 1px; bottom: 0; font-size: 9px; color: #f1d68e; }
.house-mail #weeklyMount .wr-action { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.house-mail #weeklyMount .wr-next-msg, .house-mail #weeklyMount .wr-claimed-msg { font-size: 12px; text-align: center; }
.house-mail #weeklyMount .wr-claim-btn { min-height: 38px; padding: 5px 16px; border: 1px solid #9b916c; border-radius: 5px; background: #314940; color: #f0dfb6; font: 700 12px var(--ui-font-body, sans-serif); }
.house-mail #weeklyMount .wr-claim-btn-active { border-color: #e1c588; background: #68785a; }
.house-mail #weeklyMount .wr-total { font-size: 10px; text-align: right; color: #bdccb9; }
.house-mail .guestbook-inline { position: static; inset: auto; width: 100%; min-height: 0; padding: 0; background: none; box-shadow: none; }
.house-mail .guestbook-inline .guestbook-card { width: 100%; max-width: none; max-height: none; }
.house-community-btn.quest-guide-highlight, .community-house .house-view-btn.quest-guide-highlight { outline: 2px solid #75eaa3; outline-offset: 1px; box-shadow: 0 0 4px #3fe08a, 0 0 10px #3fe08a99 !important; }
.house-leave-target, .house-leave-note, .house-leave-notice, .house-restore-status { margin: 6px 0; font-size: 13px; line-height: 1.45; }
.house-leave-note, .house-restore-status { color: #a6b9ad; }
.house-leave-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.house-fade {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #0c1230;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s linear;
}

.house-visit-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .house-fade { transition: none; }
}

/* 본 수조 바의 집 버튼 */
.house-hotkey-btn svg { display: block; }

/* The same painted panel, header, button and inset plate used by the hamburger menus. */
.community-house .house-menu-panel {
  width: min(calc(300px * var(--house-scale, 1)), calc(100% - 16px * var(--house-scale, 1)));
  padding: 9px 9px 11px;
  border: 2px solid #aa9664;
  border-image: var(--house-panel) 145 fill / 16px / 0 stretch;
  border-radius: 9px;
  background: #112729;
  box-shadow: 0 8px 24px #0009, 0 1px 0 #dfc89466;
  font-size: 12px;
  line-height: 1.35;
}
.house-menu-panel .house-sheet-head {
  min-height: 37px;
  padding: 3px 8px 3px 12px;
  border: 1px solid #ae9766;
  border-radius: 6px;
  background: #193a3b var(--house-header) center / 100% 100% no-repeat;
  box-shadow: 0 2px 4px #0006;
}
.house-menu-panel .house-sheet-head h2 { color: #f1dfad; font-size: 14px; line-height: 1.25; }
.house-menu-panel :is(.house-sort, .house-list, .house-pager, .house-exhibit-stage,
  .house-exhibit-slots, .house-exhibit-caution, .house-exhibit-notice) { margin-left: 0; margin-right: 0; }
.community-house :is(.house-menu-panel, .house-mail, .house-talk, .house-preview) .house-btn,
.community-house .house-sort-btn {
  position: relative;
  isolation: isolate;
  min-height: 44px;
  padding: 7px 10px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 12px;
  color: #f0dfb6;
}
.community-house :is(.house-menu-panel, .house-mail, .house-talk, .house-preview) .house-btn::before,
.community-house .house-sort-btn::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 4px 0;
  width: auto; height: auto; margin: 0;
  border: 1px solid transparent;
  border-image: var(--house-button) 90 fill / 5px / 0 stretch;
  border-radius: 0;
  background: #43554b;
  box-shadow: 0 1px 2px #0009;
}
.community-house :is(.house-menu-panel, .house-mail) :is(.house-btn[aria-pressed="true"], .house-sort-btn.active)::before {
  box-shadow: inset 0 -3px #acd18d, 0 1px 2px #0009;
}
.community-house :is(.house-menu-panel, .house-mail) .house-btn:disabled::before { filter: grayscale(.6) brightness(.65); }
.community-house :is(.house-tank-btn, .house-exhibit-slot) {
  border: 1px solid transparent;
  border-image: var(--house-inset) 19% 12% 20% 12% fill / 5px / 0 stretch;
  border-radius: 0;
  background: #142b2c;
  box-shadow: 0 1px 3px #0008;
  image-rendering: auto;
}
.community-house :is(.house-tank-btn, .house-exhibit-slot):hover { outline: 1px solid #bea875; outline-offset: -2px; }
.house-menu-panel .house-exhibit-side .house-btn { width: min(100%, 104px); }
.house-menu-panel .house-leave-target { margin: 10px 0; }
.house-menu-panel .house-leave-input { min-height: 100px; }
.house-menu-panel .house-leave-actions { flex-wrap: wrap; gap: 6px; }
.house-menu-panel .house-leave-actions .house-btn { flex: 0 1 auto; }
.house-mail .guestbook-inline .guestbook-close-btn { display: none; }

/* Mail is one fixed menu, with the same two physical bookmark materials. */
.community-house .house-mail.house-menu-panel { display: flex; flex-direction: column; gap: 7px; overflow: hidden; box-sizing: border-box; }
.community-house .house-mail[hidden] { display: none; }
.house-mail .house-sheet-head { flex: 0 0 auto; }
.house-mail-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; flex-shrink: 0; }
.house-mail-tab { min-width: 0; min-height: 44px; padding: 6px 4px; font: 600 11px/1.2 var(--ui-font-body,sans-serif); color: #e6d9b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid transparent; border-image: var(--house-inset) 19% 12% 20% 12% fill / 5px / 0 stretch; border-radius: 0; background: #253a35; box-shadow: 0 1px 2px #0008; cursor: pointer; }
.house-mail-tab[aria-selected="true"] { border-image: var(--house-button) 90 fill / 5px / 0 stretch; color: #fff0c6; box-shadow: inset 0 -2px #d6bb7e,0 1px 2px #0008; }
.house-mail-tab:focus-visible { outline: 2px solid #fff0b7; outline-offset: -2px; }
.house-mail-host { flex: 1; min-height: 0; overflow: hidden; overflow-wrap: anywhere; }
.house-mail #weeklyMount { height: 100%; overflow-y: auto; overflow-x: hidden; }
.house-mail #weeklyMount > .card { margin: 0; }
.house-mail .guestbook-inline { display: flex; height: 100%; max-height: none; align-items: stretch; justify-content: stretch; box-sizing: border-box; }
.house-mail .guestbook-inline[hidden] { display: none; }
.house-mail .guestbook-inline .guestbook-card { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 0; padding: 0; border: 0; border-image: none; background: none; box-shadow: none; box-sizing: border-box; }
.house-mail .guestbook-header { display: none; }
.house-mail .guestbook-notice { flex-shrink: 0; max-height: 40px; overflow-y: auto; }
.house-mail .guestbook-page { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 6px; }
.house-mail .guestbook-entry { flex: 0 0 auto; min-width: 0; padding: 6px 8px; border: 1px solid transparent; border-image: var(--house-inset) 19% 12% 20% 12% fill / 5px / 0 stretch; background: #142b2c; box-shadow: 0 1px 3px #0008; }
.guestbook-entry-toggle { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.guestbook-entry-toggle .guestbook-body { display: block; }
.guestbook-entry-toggle .guestbook-preview { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.house-mail .guestbook-entry-head { display: flex; min-width: 0; justify-content: space-between; gap: 6px; }
.house-mail .guestbook-author { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.house-mail .guestbook-date { flex-shrink: 0; font-size: 10px; }
.house-mail .guestbook-body { font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.house-mail .guestbook-actions { flex-wrap: wrap; gap: 4px; }
.house-mail :is(.guestbook-action-btn,.guestbook-page-btn,.guestbook-submit-btn,.wr-claim-btn) { min-height: 44px; padding: 6px 10px; border: 1px solid transparent; border-image: var(--house-button) 90 fill / 5px / 0 stretch; border-radius: 0; background: #43554b; color: #f0dfb6; font: 600 11px/1.2 var(--ui-font-body,sans-serif); }
.house-mail .guestbook-pager { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 12px; }
.house-mail .guestbook-page-num { font-size: 11px; }
.house-mail .guestbook-page-btn:disabled { opacity: .4; }
.house-mail .wr-received { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 32px; color: #a5d49c; }
.house-mail-open { position: relative; isolation: isolate; width: 48px; min-height: 48px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.house-mail-open::before { content: ''; position: absolute; z-index: -1; inset: 6px; background: var(--house-button) center/100% 100% no-repeat; }
.community-house .house-menu-panel :is(.house-sheet-close,.house-exhibit-close,.house-mail-close,.house-leave-close) { width: 44px; flex-shrink: 0; padding: 4px; font-size: 18px; }
#houseHotkeyBtn:disabled, #communityOnAirHotkeyBtn:disabled { filter: grayscale(1) brightness(.55); opacity: .65; cursor: default; }

.house-mail-tabs[hidden] { display: none; }
.house-mail .guestbook-composer { flex: 0 0 auto; min-width: 0; }
.house-mail .guestbook-input { width: 100%; min-height: 72px; max-height: 120px; resize: none; }
.house-mail .guestbook-composer-row { display: flex; align-items: center; gap: 8px; }
.house-mail .guestbook-privacy { flex: 1; font-size: 10px; line-height: 1.3; }


.house-exhibit-stage{display:block;}
.house-exhibit-preview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;width:auto;height:auto;}
.house-exhibit-preview>div{min-width:0;text-align:center;font-size:10px;}
.house-exhibit-preview canvas{width:100%!important;height:auto!important;aspect-ratio:1/2;}
.house-exhibit-side{margin-top:8px;}
#communityPublishTankPreview{display:flex;gap:6px;}
.community-batch-preview{min-width:0;flex:1;text-align:center;}
.community-batch-preview canvas{width:100%!important;height:auto!important;aspect-ratio:1/2;}
.house-exhibit-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
.house-exhibit-selection{grid-column:1/-1;}
.house-exhibit-slot-list{grid-template-columns:repeat(2,minmax(0,1fr));}
.community-house .house-exhibit-slot{display:grid;grid-template-columns:24px minmax(0,1fr);gap:2px 4px;}
.house-exhibit-slot .community-my-tank-screen{grid-row:1/3;width:24px;height:24px;}
.house-exhibit-slot .community-my-tank-badge{font-size:9px;}
.house-exhibit-slot .house-exhibit-select{display:none;}
.community-house .house-exhibit-slot:disabled{opacity:1;}
.community-house .house-exhibit-slot[data-state="locked"]{opacity:.5;}
.house-exhibit{overflow-y:auto;overscroll-behavior:contain;}


.house-design-sync-notice { position: absolute; z-index: 3; top: calc(76px * var(--house-scale, 1)); left: 5px; right: 5px; padding: 3px 5px; background: #153638ed; color: #f3dfb3; font-size: calc(9px * var(--house-scale, 1)); text-align: center; pointer-events: none; }
.house-design-sync-notice[hidden] { display: none; }
.house-design-foot:has(.house-design-use-cloud:not([hidden])) { flex-wrap: wrap; }
.house-design-foot:has(.house-design-use-cloud:not([hidden])) .house-design-status { flex-basis: 100%; }

/* 갤러리 도감: 아래 띠(누르면 펼침)와 5×5 도감 판. 초상은 픽셀 그대로 키운다. */
.house-dex-bar {
  width: 100%; margin: 0; padding: 0 calc(10px * var(--house-scale, 1));
  gap: calc(8px * var(--house-scale, 1)); justify-content: space-between;
  font: inherit; color: inherit; letter-spacing: normal; cursor: pointer;
}
.house-dex-bar:focus-visible { outline: 2px solid #ffd36e; outline-offset: -3px; }
.house-dex-label { margin: 0 auto; letter-spacing: .06em; }   /* 별점을 아직 모를 때(예전처럼 가운데 글자) */
.house-dex-stars { flex: none; color: #ffd36e; font: 700 calc(12px * var(--house-scale, 1))/1 var(--pixel11, Galmuri11, monospace); text-shadow: 0 1px 0 #000c; }
.house-dex-recent, .house-dex-next { display: flex; align-items: center; gap: calc(4px * var(--house-scale, 1)); min-width: 0; }
.house-dex-face { width: calc(28px * var(--house-scale, 1)); height: calc(28px * var(--house-scale, 1)); image-rendering: pixelated; object-fit: contain; }
.house-dex-meter { width: calc(44px * var(--house-scale, 1)); height: calc(5px * var(--house-scale, 1)); background: #0a1718; border: 1px solid #aa956488; }
.house-dex-meter i { display: block; height: 100%; background: #ffd36e; }
.house-dex-need { color: #d9c79a; font: calc(10px * var(--house-scale, 1))/1 var(--pixel11, Galmuri11, monospace); }
.house-dex-done { color: #ffd36e; font-size: calc(10px * var(--house-scale, 1)); }
/* 도감 판은 내용 높이만큼(목록 창처럼 86% 고정이 아니다) */
.community-house .house-dex.house-menu-panel { height: auto; max-height: min(86%, calc(100% - 32px)); overflow: auto; }
.house-dex .house-sheet-head { min-height: calc(49px * var(--house-scale, 1)); padding: 6px 10px; border-bottom: 3px solid rgba(255, 211, 110, .52); background: rgba(255, 211, 110, .12); }
.house-dex .house-sheet-head h2 { margin: 0; color: #ffd36e; font-size: 14px; }
.community-house .house-dex .house-dex-close { width: 44px; flex-shrink: 0; padding: 4px; font-size: 18px; }
.house-dex-summary { margin: 10px 12px 8px; color: #ffd36e; font: 700 12px/1.3 var(--pixel11, Galmuri11, monospace); text-align: center; }
.house-dex-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 12px; }
.house-dex-cell {
  position: relative; aspect-ratio: 1; min-width: 0; padding: 4px; border: 1px solid #aa956466; border-radius: 4px;
  background: radial-gradient(circle at 60% 35%, #3a2b1c 0, #1a1c1c 70%); cursor: pointer;
}
.house-dex-cell.is-locked { background: #0d1a1c; }
.house-dex-cell[aria-pressed="true"] { border-color: #ffd36e; box-shadow: 0 0 0 1px #ffd36e inset; }
.house-dex-cell:focus-visible { outline: 2px solid #ffd36e; outline-offset: 1px; }
.house-dex-portrait { width: 100%; height: 100%; image-rendering: pixelated; object-fit: contain; display: block; }
.house-dex-cell-need { position: absolute; right: 3px; bottom: 2px; color: #d9c79a; font: 9px/1 var(--pixel11, Galmuri11, monospace); text-shadow: 0 1px 0 #000; }
.house-dex-detail { margin: 10px 12px 12px; min-height: 1.3em; color: #f0e3c1; font-size: 12px; text-align: center; }
