/* 空間模擬 */
.wrap.sim { max-width: 960px; }
.stage { position: relative; width: 100%; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--paper); }
.stage canvas, .stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-loading { position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.8rem; }
.stage-loading[hidden] { display: none; }

.current-floor { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 18px; }
.cf-name { margin: 0; font-size: 1.2rem; font-weight: 700; }
.cf-series { margin: 2px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.cf-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ctrl-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ctrl-label { flex: 0 0 2.4em; font-weight: 700; font-size: 0.9rem; color: var(--wood-dark); padding-top: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--paper); color: var(--ink-soft); padding: 7px 14px; border-radius: 999px; font-family: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--wood-light); }
.chip.active { background: var(--wood); border-color: var(--wood); color: var(--on-accent, #fff); font-weight: 600; }
.chip i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.2); display: inline-block; }
.chip-line { background: #06c755; border-color: #06c755; color: #fff; font-weight: 700; }
.chip-line[hidden] { display: none; }
.series-select { border: 1px solid var(--border); border-radius: 999px; background: var(--paper); color: var(--ink); padding: 8px 14px; font-family: inherit; font-size: 0.9rem; }

.floor-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; max-height: 330px; overflow-y: auto; padding: 4px; margin-top: 6px; }
.floor-item { border: 2px solid transparent; background: var(--paper); border-radius: 8px; padding: 0; cursor: pointer; overflow: hidden; box-shadow: var(--shadow); font-family: inherit; color: var(--ink); }
.floor-item.active { border-color: var(--wood-dark); box-shadow: 0 0 0 2px var(--wood-dark); }
/* 只露出照片下半部的木紋 */
.floor-item .thumb { display: block; aspect-ratio: 1; overflow: hidden; }
/* 放大並靠下對齊，照片上方的品名和 Logo 不會出現在縮圖裡 */
.floor-item img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; transform: scale(1.35); transform-origin: 50% 100%; display: block; }
.floor-item span { display: block; font-size: 0.72rem; line-height: 1.35; padding: 5px 4px 7px; }
.sim-note { font-size: 0.8rem; color: var(--ink-soft); margin: 14px 0 30px; text-align: center; }

/* 我家照片 */
.stage[hidden], .ctrl-row[hidden], .photo-room[hidden] { display: none; }
.photo-stage { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--paper); box-shadow: var(--shadow-lg); }
.photo-stage canvas { display: none; width: 100%; height: auto; max-height: 76vh; object-fit: contain; margin: 0 auto; touch-action: none; cursor: crosshair; background: #2b2b2b; }
.photo-stage.has-photo canvas { display: block; width: auto; max-width: 100%; }
.photo-stage.has-photo { background: #2b2b2b; }
.photo-stage.has-photo .photo-empty { display: none; }
.photo-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 48px 20px; min-height: 340px; border: 2px dashed var(--wood-light); border-radius: var(--radius); }
.photo-empty-title { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--wood-dark); }
.photo-pick { display: inline-block; background: var(--wood); color: var(--on-accent, #fff); font-weight: 700; padding: 14px 30px; border-radius: 999px; cursor: pointer; }
.photo-privacy { margin: 0; font-size: 0.85rem; line-height: 1.8; color: var(--ink-soft); }
.photo-busy { position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.8rem; }
.photo-busy[hidden] { display: none; }
.photo-tools { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.photo-tools[hidden], .brush-row[hidden] { display: none; }
.photo-hint { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--ink); background: var(--paper); border-left: 4px solid #06c755; padding: 10px 14px; border-radius: 6px; }
.mini { font-size: 0.85rem; color: var(--ink-soft); align-self: center; }
.size-row { display: flex; gap: 12px; align-items: center; }
.size-row input { flex: 1; max-width: 280px; accent-color: var(--wood); }
#peekBtn { user-select: none; -webkit-user-select: none; touch-action: none; }

.view-row[hidden] { display: none; }
.photo-busy { max-width: calc(100% - 24px); }

.inapp-tip { margin: 0; padding: 12px 16px; background: #fff3cd; color: #6b4e00; font-size: 0.9rem; line-height: 1.6; }
.inapp-tip[hidden] { display: none; }

.photo-tools [hidden] { display: none; }
