/* 커밍 홈즈 · 캐릭터 꾸미기 (온유 2026-11-12). 휴대폰 세로 기준: 위에 큰 미리보기, 아래에 고르는 칸. */
#char { position: fixed; inset: 0; display: none; flex-direction: column; background: #fff8ec; color: var(--ink); padding: calc(10px + env(safe-area-inset-top)) 14px calc(12px + env(safe-area-inset-bottom)); gap: 10px; }
body.char #char { display: flex; }
body.char #town, body.char #pickBar, body.char #say, body.char #start { display: none; }
#char h2 { margin: 0; font-size: 20px; text-align: center; }
#chStage { display: flex; align-items: center; justify-content: center; gap: 14px; background: linear-gradient(#cfe9ff, #e9f6e2 70%, #b9d8a4 70%); border-radius: 18px; padding: 10px; flex: none; }
#chPreview { width: 112px; height: 224px; image-rendering: pixelated; image-rendering: crisp-edges; }
#chStage .turn { width: 44px; height: 44px; padding: 0; font-size: 20px; background: rgba(255, 255, 255, 0.85); color: var(--ink); border: 2px solid #e9dcc8; }
#chRow { display: flex; gap: 8px; flex: none; }
#chRow input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 2px solid #e9dcc8; border-radius: 12px; background: #fff; color: var(--ink); }
#chRow button { font-size: 14px; padding: 8px 12px; background: #fff; color: var(--ink); border: 2px solid #e9dcc8; white-space: nowrap; }
#chErr { color: #c0392b; font-size: 13px; min-height: 16px; margin: -6px 2px 0; flex: none; }
#chTabs { display: flex; gap: 6px; flex: none; }
#chTabs button { flex: 1; font-size: 15px; padding: 8px 0; background: #f1e6d3; color: var(--ink); box-shadow: none; border-radius: 12px 12px 0 0; }
#chTabs button[aria-pressed="true"] { background: var(--accent); color: #fff; }
#chColors { display: flex; gap: 6px; overflow-x: auto; flex: none; padding: 2px 0 6px; margin-top: -6px; }
#chGrid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; grid-auto-rows: 72px; align-content: start; padding: 2px; margin-top: -6px; }
.chT { position: relative; width: 100%; height: 72px; min-width: 46px; padding: 0; background: #fff; border: 2px solid #e9dcc8; border-radius: 10px; box-shadow: none; overflow: hidden; flex: none; }
#chColors .chT { width: 46px; }
.chT.on { border-color: var(--accent); background: #ffe9d6; }
.chT i { position: absolute; left: 50%; top: 50%; width: 32px; height: 64px; margin: -34px 0 0 -16px; background-size: auto 64px; background-repeat: no-repeat; image-rendering: pixelated; image-rendering: crisp-edges; }
.chT span { font-size: 12px; color: #8a7a6a; }
#chDone { flex: none; background: var(--accent); color: #fff; box-shadow: 0 4px 0 var(--accent-dk); font-size: 18px; }
#chCredit { text-align: center; font-size: 11px; color: #a89a88; flex: none; font-family: system-ui, sans-serif; }
#chCredit a { color: inherit; }
@media (min-width: 720px) { #char { max-width: 560px; margin: 0 auto; box-shadow: 0 0 0 100vmax #55604f; } }
@media (max-height: 640px) { #chPreview { width: 80px; height: 160px; } }
/* the change of screen (사장님 11-12): a mosaic that sizzles in and away. One canvas pixel per block, stretched hard-edged. */
#fade { position: fixed; inset: 0; width: 100%; height: 100%; display: none; pointer-events: none; z-index: 50; image-rendering: pixelated; image-rendering: crisp-edges; }
#fade.on { display: block; pointer-events: auto; }
#chFree { flex: none; margin: -8px 0 0; padding: 6px 10px; font-size: 12px; color: #8a5a2b; background: #ffe9d6; border-radius: 0 0 10px 10px; text-align: center; }
