/* Styles for Avatar Homes, My Room, House Builder, Neighborhood Builder and World Builder. */
.wd-homestage { position: relative; padding: 0; overflow: hidden; aspect-ratio: 16 / 10; }
.wd-homestage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wd-homepic { position: absolute; left: 50%; bottom: 4%; width: 56%; transform: translateX(-58%); line-height: 0; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.wd-homepic svg { width: 100%; height: auto; }
.wd-homeme { position: absolute; right: 12%; bottom: 3%; width: 17%; line-height: 0; } .wd-homeme svg { width: 100%; height: auto; }
.wd-homes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.wd-home { background: var(--panel2); border: 3px solid var(--line); border-radius: 18px; padding: 8px; cursor: pointer; color: var(--text); font: inherit; display: grid; gap: 4px; text-align: center; }
.wd-home svg { width: 100%; height: auto; background: linear-gradient(180deg, #bfe6ff, #dff3ff 70%, #8fd98f 70%); border-radius: 12px; } .wd-home.on { border-color: var(--gold); } .wd-home b { font-size: 13px; }
.wd-room .wd-wall { position: absolute; inset: 0 0 30% 0; } .wd-room .wd-floor { position: absolute; inset: 70% 0 0 0; box-shadow: inset 0 8px 0 rgba(0,0,0,.12); }
.wd-win::after { content: ""; position: absolute; inset: 14% 16% 21% 16%; background: linear-gradient(#f4f0e6, #f4f0e6) center / 7% 100% no-repeat, linear-gradient(#f4f0e6, #f4f0e6) center / 100% 7% no-repeat, var(--view) center / cover; border-radius: 3px; }
.wd-housestage { padding: 0; overflow: hidden; line-height: 0; max-width: max(280px, calc((calc(100 * var(--vh)) - 280px) * 1.2)); margin: 0 auto; } .wd-housestage svg { width: 100%; height: auto; display: block; }
.wd-gridstage { padding: 6px; max-width: max(312px, calc((calc(100 * var(--vh)) - 300px) * var(--ratio, 1.5))); margin: 0 auto; }
.wd-grid { display: grid; grid-template-columns: repeat(var(--w), 1fr); gap: 1px; background: rgba(0,0,0,.25); border-radius: 10px; overflow: hidden; user-select: none; -webkit-user-select: none; }
.wd-c { position: relative; aspect-ratio: 1; border: 0; padding: 0; margin: 0; cursor: pointer; display: block; line-height: 0; min-width: 0; overflow: visible; }
.wd-grid .wd-c:focus-visible { outline: 3px solid #fff; outline-offset: -3px; z-index: 2; }
.wd-c > svg { position: absolute; inset: 4%; width: 92%; height: 92%; pointer-events: none; }
.t-g { background: #62c66f; } .t-f { background: #3f9f58; } .t-s { background: #f2d79b; } .t-d { background: #e3b96a; } .t-k { background: #9aa5b8; } .t-n { background: #f4faff; } .t-p { background: #d9c9a8; }
.t-w { background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35) 0 8%, transparent 9%), radial-gradient(circle at 70% 70%, rgba(255,255,255,.25) 0 7%, transparent 8%), #3d8bff; }
.t-r { background: #6b7280; }
.t-r.rh { background: linear-gradient(90deg, #ffe27f 0 30%, transparent 30% 70%, #ffe27f 70%) center / 100% 8% no-repeat, #6b7280; }
.t-r.rv { background: linear-gradient(180deg, #ffe27f 0 30%, transparent 30% 70%, #ffe27f 70%) center / 8% 100% no-repeat, #6b7280; }
.t-r.rh.rv { background: #6b7280; }
.wd-pal { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-swatch { width: calc(44px * var(--k)); height: calc(44px * var(--k)); aspect-ratio: auto; border-radius: 12px; border: 3px solid var(--line2); cursor: pointer; padding: 3px; line-height: 0; position: relative; font-size: 18px; }
.wd-swatch:not(.wd-c) { background-color: var(--panel2); }
.wd-swatch svg { width: 100%; height: 100%; position: static; } .wd-swatch.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,203,61,.35); } .wd-swatch.erase { line-height: 1; }
.wd-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 14px; margin-top: 8px; font-size: calc(14px * var(--k)); } .wd-goals .done { color: var(--ok, #2ec46d); font-weight: 600; }
.wd-me, .wd-star { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; pointer-events: none; line-height: 1; }
.wd-me svg { width: 110%; height: auto; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); } .wd-star { font-size: clamp(10px, calc(2.2 * var(--vw)), 22px); animation: wd-bob 1.2s ease-in-out infinite; }
@keyframes wd-bob { 50% { transform: translateY(-12%); } } body.calm .wd-star { animation: none; }
.wd-dpad { display: grid; gap: 6px; justify-items: center; margin: 10px 0; } .wd-dpad > div { display: flex; gap: 46px; } .wd-dpad .kbtn { min-width: 60px; }
@media (min-width: 900px) { .wd-stick { position: sticky; top: 8px; align-self: start; } }
/* look-around view */
.wd-look { position: fixed; inset: 0; z-index: 170; background: #000; touch-action: none; overflow: hidden; }
.wd-look canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wd-lookhome, .wd-lookme { position: absolute; bottom: 12%; transform: translateX(-50%); line-height: 0; pointer-events: none; filter: drop-shadow(0 8px 12px rgba(0,0,0,.4)); }
.wd-lookhome { width: min(calc(58 * var(--vh)), calc(70 * var(--vw))); } .wd-lookme { width: min(calc(18 * var(--vh)), calc(22 * var(--vw))); bottom: 10%; } .wd-lookhome svg, .wd-lookme svg { width: 100%; height: auto; }
.wd-lookbar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(0,0,0,.6), transparent); color: #fff; flex-wrap: wrap; text-align: center; }
