/* ================================================================
   〈예쁜 소율이를 위한〉 치이카와 게임 랜드 - 통합 허브 & 드림 하우스 스타일
   ================================================================ */

:root {
  --ink: #5a3b2c;
  --ink-soft: #856250;
  --cream: #fffcf7;
  --pink: #ff8fab;
  --yellow: #ffd43b;
  --blue: #74c0fc;
  --mint: #8ce99a;
  --shadow: 0 10px 26px rgba(90, 59, 44, 0.16);
}

.hub-hidden {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* 공통 글로벌 토스트 (3개 게임 & 하우스 어디서든 최상단 표시) */
.hub-global-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: linear-gradient(180deg, #fffdf0, #fff3bf);
  border: 4px solid var(--ink);
  border-radius: 999px;
  padding: 10px 24px;
  font-family: 'Jua', 'Gaegu', 'Malgun Gothic', sans-serif;
  font-size: 1.05rem;
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(90, 59, 44, 0.28);
  pointer-events: none;
  animation: hubToastPop 0.3s ease;
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes hubToastPop {
  from { transform: translate(-50%, -14px) scale(0.9); opacity: 0; }
  to { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

/* ================= 통합 메인 허브 화면 (#view-hub) ================= */
#view-hub {
  position: relative;
  min-height: 100vh;
  font-family: 'Jua', 'Gaegu', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  color: var(--ink);
  padding: 16px 20px 36px;
  background-image: url('../assets/images/bg_meadow.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

#view-hub::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 252, 246, 0.45), rgba(255, 242, 247, 0.72));
  z-index: 0;
  pointer-events: none;
}

.hub-container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
}

/* 허브 상단 통합 지갑 바 */
.hub-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hub-wallet-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hub-pill {
  background: rgba(255, 252, 247, 0.96);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 7px 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 1rem;
  box-shadow: 0 4px 0 rgba(90, 59, 44, 0.16);
}

.hub-pill strong { font-size: 1.15rem; }
.hub-pill-coin strong { color: #e8590c; }
.hub-pill-cozy strong { color: #e64980; }
.hub-pill-bonus {
  background: linear-gradient(90deg, #fff3bf, #ffdeeb);
  color: #b45309;
  font-size: 0.92rem;
}

.hub-btn {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.hub-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--ink);
  filter: brightness(1.04);
}
.hub-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ink);
}

.hub-btn-pink { background: linear-gradient(180deg, #ffd6e0, #ff8fab); }
.hub-btn-yellow { background: linear-gradient(180deg, #fff3b8, #ffd43b); }
.hub-btn-blue { background: linear-gradient(180deg, #d0ebff, #74c0fc); }
.hub-btn-mint { background: linear-gradient(180deg, #d3f9d8, #8ce99a); }

/* 히어로 헤더 */
.hub-hero {
  background: rgba(255, 252, 247, 0.94);
  border: 4px solid var(--ink);
  border-radius: 30px;
  padding: 20px 24px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.hub-dedication {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #ff9ebb, #ffd95a, #ff9ebb);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 4px 22px;
  font-size: 1.1rem;
  box-shadow: 0 4px 0 var(--ink);
  margin-bottom: 10px;
}

.hub-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  color: #ff5c8a;
  text-shadow: 3px 3px 0 #ffffff, -2px -2px 0 #ffffff, 0 5px 0 rgba(90, 59, 44, 0.16);
}

.hub-hero-sub {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--ink-soft);
}

.hub-parade {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(8px, 2.5vw, 26px);
}

.hub-parade img {
  width: clamp(58px, 7.5vw, 88px);
  height: clamp(58px, 7.5vw, 88px);
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(90, 59, 44, 0.16));
  animation: paradeBob 2.4s ease-in-out infinite;
}
.hub-parade img:nth-child(2) { animation-delay: 0.25s; }
.hub-parade img:nth-child(3) { animation-delay: 0.5s; width: clamp(68px, 8.5vw, 98px); height: clamp(68px, 8.5vw, 98px); }
.hub-parade img:nth-child(4) { animation-delay: 0.75s; }
.hub-parade img:nth-child(5) { animation-delay: 1s; }

@keyframes paradeBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* 3개 게임 + 드림 하우스 포털 그리드 */
.hub-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.portal-card {
  background: rgba(255, 252, 247, 0.96);
  border: 4px solid var(--ink);
  border-radius: 26px;
  padding: 18px 18px 16px;
  box-shadow: 0 8px 0 rgba(90, 59, 44, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.portal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 13px 0 rgba(90, 59, 44, 0.22);
}

.portal-tetris { background: linear-gradient(180deg, #fff5f8, #ffe3ec); }
.portal-blast { background: linear-gradient(180deg, #fffdf0, #fff3bf); }
.portal-matchs { background: linear-gradient(180deg, #f0f8ff, #d0ebff); }

.portal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-tag {
  background: #ffffff;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.8rem;
}

.portal-sprites {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  height: 92px;
  background: rgba(255, 255, 255, 0.65);
  border: 2.5px dashed rgba(90, 59, 44, 0.22);
  border-radius: 18px;
}

.portal-sprites img {
  height: 78px;
  width: 78px;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(90, 59, 44, 0.15));
}

.portal-card h2 {
  margin: 0;
  font-size: 1.38rem;
}

.portal-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink-soft);
  flex: 1;
}

.portal-stats {
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid #e6d5c5;
  border-radius: 14px;
  padding: 7px 10px;
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

/* 드림 하우스 통합 배너 카드 */
.portal-house-banner {
  background: linear-gradient(95deg, #fff5f8, #fff9db, #e7f5ff);
  border: 4px solid var(--ink);
  border-radius: 26px;
  padding: 16px 22px;
  box-shadow: 0 8px 0 rgba(90, 59, 44, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.16s ease;
}

.portal-house-banner:hover {
  transform: translateY(-4px);
}

.house-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 260px;
}

.house-banner-ico {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: #ffffff;
  border: 3.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.house-banner-left h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
}

.house-banner-left p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ================= 통합 드림 하우스 화면 (#view-house) ================= */
#view-house {
  width: 100%;
  max-width: 1640px;
  height: 100vh;
  margin: 0 auto;
  padding: 8px 18px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Jua', 'Gaegu', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  background-image: url('../assets/images/bg_picnic.jpg');
  background-size: cover;
  background-position: center;
}

.house-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.house-title-pill {
  background: rgba(255, 252, 247, 0.96);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 5px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  box-shadow: 0 3px 0 rgba(90, 59, 44, 0.16);
}

.rank-mini-badge {
  background: #fff3bf;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.8rem;
  color: #b45309;
}

.house-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.h-mini-btn {
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background: rgba(255, 252, 247, 0.96);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 5px 13px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
  white-space: nowrap;
}
.h-mini-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.h-btn-pink { background: #ffdeeb; }
.h-btn-blue { background: #d0ebff; }
.h-btn-yellow { background: #fff3bf; }

.housing-layout {
  display: grid;
  grid-template-columns: 1.68fr 1fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.housing-layout.photo-mode { grid-template-columns: 1fr; }
.housing-layout.photo-mode .catalog-section { display: none; }

.room-section { min-height: 0; display: flex; }

.room-stage {
  position: relative;
  flex: 1;
  border: 6px solid var(--ink);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(90, 59, 44, 0.25);
  display: flex;
  flex-direction: column;
  background: #fffcf7;
}

.room-wall { position: relative; flex: 62; transition: background 0.4s ease; }
.room-molding {
  position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background: #fffcf7; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
}
.room-window {
  position: absolute; top: 14%; left: 50%; transform: translateX(-50%);
  width: 190px; height: 120px;
  background: linear-gradient(180deg, #a5d8ff, #e7f5ff);
  border: 6px solid #fffcf7; outline: 4px solid var(--ink); border-radius: 18px;
  overflow: hidden; box-shadow: 0 6px 14px rgba(90, 59, 44, 0.16); pointer-events: none;
}
.win-sky { font-size: 2rem; display: flex; justify-content: space-around; align-items: center; height: 100%; }
.win-cross-v {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; transform: translateX(-50%);
  background: #fffcf7; border-left: 2px solid var(--ink); border-right: 2px solid var(--ink);
}
.win-cross-h {
  position: absolute; top: 50%; left: 0; right: 0; height: 6px; transform: translateY(-50%);
  background: #fffcf7; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}

/* 6종 벽지 */
.wp-meadow { background: repeating-linear-gradient(90deg, #fff9ec 0 36px, #f6f0d8 36px 72px); }
.wp-pink {
  background-color: #ffe3ec;
  background-image: radial-gradient(#ff9eb5 3px, transparent 3px), radial-gradient(#fff 4px, transparent 4px);
  background-size: 36px 36px; background-position: 0 0, 18px 18px;
}
.wp-sky { background: linear-gradient(180deg, #bce3ff, #e7f5ff); }
.wp-ramen { background: repeating-linear-gradient(90deg, #fff3bf 0 42px, #ffe8cc 42px 84px); }
.wp-night {
  background: radial-gradient(circle at 20% 30%, #fff3bf 2px, transparent 3px),
              radial-gradient(circle at 75% 25%, #fff3bf 2.5px, transparent 3.5px),
              radial-gradient(circle at 82% 65%, #ffdeeb 2px, transparent 3px),
              linear-gradient(180deg, #5f3dc4, #9775fa);
  background-size: 160px 160px, 190px 190px, 140px 140px, 100% 100%;
}
.wp-pudding { background: repeating-linear-gradient(45deg, #fff0f6 0 24px, #fff9db 24px 48px); }

/* 5종 바닥 */
.room-floor { flex: 38; transition: background 0.4s ease; }
.fl-wood { background: repeating-linear-gradient(0deg, #e8c39e 0 26px, #dfb58c 26px 28px); }
.fl-pink { background: radial-gradient(#ffc9d9 15%, transparent 16%), #ffdce6; background-size: 28px 28px; }
.fl-picnic {
  background-color: #fff5f5;
  background-image: linear-gradient(90deg, rgba(255, 143, 171, 0.35) 50%, transparent 50%),
                    linear-gradient(rgba(255, 143, 171, 0.35) 50%, transparent 50%);
  background-size: 40px 40px;
}
.fl-cloud { background: radial-gradient(circle at 50% 0, #ffffff, #d0ebff 75%); }
.fl-star {
  background-color: #ede9fe;
  background-image: radial-gradient(#ffd43b 2.5px, transparent 3px), radial-gradient(#ff9eb5 2px, transparent 2.5px);
  background-size: 44px 44px; background-position: 0 0, 22px 22px;
}

.room-items-layer { position: absolute; inset: 0; pointer-events: none; }

.placed-item {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: grab; touch-action: none;
}
.placed-item:active { cursor: grabbing; }
.placed-item.selected {
  outline: 3.5px dashed #ff4d8d; outline-offset: 4px; border-radius: 18px;
  filter: drop-shadow(0 6px 14px rgba(255, 77, 141, 0.35));
}
.placed-item-inner svg {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 5px 6px rgba(90, 59, 44, 0.16));
}

.placed-item.is-friend .placed-item-inner { animation: friendBreathe 2.5s ease-in-out infinite; }
@keyframes friendBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* 공식 원작 투명 배경 치이카와 스프라이트 친구! */
.house-friend-sprite {
  position: relative;
  text-align: center;
}
.house-friend-sprite img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 7px 6px rgba(90, 59, 44, 0.22));
}
.house-friend-sprite span {
  display: inline-block;
  margin-top: 2px;
  background: rgba(255, 243, 191, 0.95);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.76rem;
}

.house-friend-sticker { position: relative; text-align: center; }
.house-friend-sticker img {
  width: 100%; aspect-ratio: 1/1; border-radius: 50%; border: 4px solid var(--ink);
  object-fit: cover; background: #fff; display: block;
}
.house-friend-sticker span {
  display: inline-block; margin-top: -10px; background: #ffd43b;
  border: 2px solid var(--ink); border-radius: 999px; padding: 0 9px; font-size: 0.76rem;
}

.friend-pop-bubble {
  position: absolute; bottom: 104%; left: 50%; transform: translateX(-50%);
  background: #fff9db; border: 3px solid var(--ink); border-radius: 16px;
  padding: 6px 12px; font-size: 0.85rem; white-space: nowrap;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.16); z-index: 90;
}
.friend-pop-heart {
  position: absolute; top: -10px; right: -6px; font-size: 1.5rem;
  animation: heartFloat 1.4s ease forwards; pointer-events: none;
}
@keyframes heartFloat {
  0% { transform: translateY(0) scale(0.7); opacity: 1; }
  100% { transform: translateY(-42px) scale(1.3); opacity: 0; }
}

.room-guide-chip {
  position: absolute; top: 10px; left: 12px;
  background: rgba(255, 252, 247, 0.92); border: 2.5px solid var(--ink);
  border-radius: 999px; padding: 4px 14px; font-size: 0.82rem; pointer-events: none;
}

.room-edit-bar {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(255, 252, 247, 0.97); border: 3.5px solid var(--ink);
  border-radius: 999px; padding: 6px 14px; display: flex; align-items: center;
  gap: 6px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22); z-index: 120; white-space: nowrap;
}
.edit-name { font-size: 0.9rem; color: #c2255c; margin-right: 4px; }
.edit-btn {
  font-family: inherit; font-size: 0.82rem; background: #fff3bf;
  border: 2px solid var(--ink); border-radius: 999px; padding: 4px 10px; cursor: pointer; color: var(--ink);
}
.edit-btn:hover { background: #ffd43b; }
.edit-btn.btn-del { background: #ffe3e3; color: #c92a2a; }

/* 우측 꾸미기 상점 */
.catalog-section {
  background: rgba(255, 252, 247, 0.95);
  border: 4px solid var(--ink); border-radius: 24px; padding: 12px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0;
}
.house-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 10px; flex-shrink: 0; }
.house-tab {
  font-family: inherit; font-size: 0.84rem; padding: 7px 4px;
  background: #fff; border: 2.5px solid #e6d4c4; border-radius: 12px; cursor: pointer; color: var(--ink);
}
.house-tab.active { background: #ffdeeb; border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }

.catalog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 10px; overflow-y: auto; padding: 2px 4px 8px; flex: 1;
}
.catalog-card {
  background: #fff; border: 3px solid #e8d8c8; border-radius: 18px;
  padding: 10px 8px 8px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.catalog-card.owned { border-color: #ff9eb5; background: #fffdf9; }
.catalog-card.equipped { border-color: #40c057; background: #ebfbee; }

.cat-thumb { width: 78px; height: 68px; display: flex; align-items: center; justify-content: center; }
.cat-thumb svg { max-width: 76px; max-height: 66px; }
.cat-thumb .house-friend-sprite { width: 64px; }
.cat-thumb .house-friend-sprite span { display: none; }
.cat-thumb .house-friend-sticker { width: 58px; }
.cat-thumb .house-friend-sticker span { display: none; }
.swatch-preview {
  width: 68px; height: 54px; border-radius: 12px; border: 3px solid var(--ink);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.cat-name { font-size: 0.86rem; line-height: 1.2; }
.cat-cozy { font-size: 0.74rem; color: #e64980; }
.cat-btn {
  font-family: inherit; width: 100%; font-size: 0.8rem; padding: 6px;
  border: 2.5px solid var(--ink); border-radius: 999px; cursor: pointer;
  color: var(--ink); box-shadow: 0 3px 0 var(--ink); margin-top: auto;
}
.cat-btn.btn-pink { background: linear-gradient(180deg, #ffd6e0, #ff9eb5); }
.cat-btn.btn-yellow { background: linear-gradient(180deg, #fff3b8, #ffd43b); }
.cat-btn.btn-blue { background: linear-gradient(180deg, #d0ebff, #74c0fc); }
.cat-btn.btn-mint { background: linear-gradient(180deg, #d3f9d8, #8ce99a); opacity: 0.85; cursor: default; }

/* 두근두근 매치 마운트 컨테이너 */
#view-matchs {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
#matchsMount {
  width: 100%;
  height: 100%;
}

/* ================= iOS/iPadOS PWA 앱 만들기 배너 & 모달 ================= */
.ios-tip-bar {
  background: linear-gradient(90deg, #fff9db, #ffdeeb);
  border: 3.5px solid var(--ink);
  border-radius: 22px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 16px rgba(90, 59, 44, 0.16);
}
.ios-tip-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  flex-shrink: 0;
}
.ios-tip-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.94rem;
}
.ios-tip-text span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.ios-tip-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: #fff;
  cursor: pointer;
  font-weight: bold;
  flex-shrink: 0;
}

.pwa-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(74, 46, 31, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: 'Jua', 'Gaegu', 'Malgun Gothic', sans-serif;
  color: var(--ink);
}
.pwa-modal-card {
  background: #fffcf7;
  border: 5px solid var(--ink);
  border-radius: 28px;
  padding: 22px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.pwa-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.pwa-preview-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 3px solid var(--ink);
  box-shadow: 0 4px 10px rgba(90, 59, 44, 0.2);
  flex-shrink: 0;
}
.pwa-modal-head h2 { margin: 0 0 4px; font-size: 1.3rem; }
.pwa-modal-head p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); }

.pwa-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pwa-step {
  background: #fff7ee;
  border: 2.5px solid #ecd9c6;
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.4;
}
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffd43b;
  border: 2.5px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

/* iOS 노치/홈바 Safe Area 대응 */
#view-hub {
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(36px, env(safe-area-inset-bottom));
}
#view-house {
  padding-top: max(8px, env(safe-area-inset-top));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

@media (max-width: 960px) {
  .hub-portal-grid { grid-template-columns: 1fr; }
  #view-house { height: auto; min-height: 100vh; overflow: visible; }
  .housing-layout { grid-template-columns: 1fr; }
  .room-stage { min-height: 400px; }
}
