/* Pixel Pet Studio v2.0.0-alpha.20.2 — world selection */

.pps-realm-chooser-host{display:grid;gap:6px;margin:0 0 12px}
.pps-realm-host-label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#a8c5c1;font-weight:800}
.pps-realm-open{width:100%;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;border:1px solid rgba(91,235,190,.38);border-radius:15px;padding:11px 12px;background:linear-gradient(135deg,rgba(16,54,70,.96),rgba(12,79,76,.82));color:#effff8;text-align:left;cursor:pointer;box-shadow:0 10px 24px rgba(0,0,0,.18)}
.pps-realm-open:hover{border-color:#65efbd;transform:translateY(-1px)}
.pps-realm-open-icon{font-size:24px}.pps-realm-open strong,.pps-realm-open small{display:block}.pps-realm-open small{color:#a9cec5;margin-top:2px}

.pps-world-select[hidden]{display:none!important}
.pps-world-select{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));font-family:system-ui,-apple-system,Segoe UI,sans-serif}
.pps-world-backdrop{position:absolute;inset:0;background:rgba(1,10,17,.78);backdrop-filter:blur(10px)}
.pps-world-panel{position:relative;width:min(1380px,100%);max-height:min(92dvh,920px);display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;border-radius:26px;border:1px solid rgba(112,240,199,.34);background:linear-gradient(160deg,#071723 0%,#0c2530 48%,#0b3132 100%);color:#ecfff8;box-shadow:0 36px 100px rgba(0,0,0,.58)}
.pps-world-header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;padding:24px 28px 18px;border-bottom:1px solid rgba(118,220,193,.18)}
.pps-world-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.18em;color:#5ef0b7;font-weight:900}
.pps-world-header h2{font-size:clamp(25px,4vw,44px);line-height:1.03;margin:7px 0 7px}.pps-world-header p{margin:0;color:#aacbc5;max-width:720px}
.pps-world-header-actions{display:flex;gap:8px;align-items:center}
.pps-world-header button,.pps-world-footer button,.pps-world-actions button{border:1px solid rgba(111,224,189,.35);border-radius:999px;background:#102b36;color:#f2fff9;padding:10px 16px;font-weight:800;cursor:pointer}
.pps-world-close{width:42px;height:42px;padding:0!important;font-size:24px}
.pps-world-save-current:hover,.pps-world-footer button:hover,.pps-world-actions button:hover{border-color:#62edba;background:#17433f}

.pps-world-grid{overflow:auto;padding:22px 26px 28px;display:grid;grid-template-columns:repeat(3,minmax(260px,1fr));grid-auto-rows:max-content;align-items:start;gap:18px;overscroll-behavior:contain}
.pps-world-card{min-width:0;height:max-content;border-radius:22px;overflow:hidden;cursor:pointer;border:1px solid rgba(126,218,190,.22);background:rgba(5,20,28,.86);box-shadow:0 18px 40px rgba(0,0,0,.24);transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.pps-world-card:hover{transform:translateY(-3px);border-color:var(--realm-accent);box-shadow:0 24px 52px rgba(0,0,0,.34)}
.pps-world-card.is-active{outline:2px solid var(--realm-accent);outline-offset:-2px}
.pps-world-art{position:relative;height:150px;overflow:hidden;background:linear-gradient(#83bcc5 0 42%,var(--realm-water) 42% 100%)}
.pps-world-sun{position:absolute;width:48px;height:48px;border-radius:50%;right:24px;top:20px;background:radial-gradient(circle,#fff4b2 0 30%,rgba(255,223,96,.82) 31% 56%,transparent 58%)}
.pps-world-water{position:absolute;inset:58% 0 0;background:repeating-linear-gradient(0deg,rgba(255,255,255,.1) 0 2px,transparent 2px 9px),var(--realm-water)}
.pps-world-land-a,.pps-world-land-b{position:absolute;bottom:19%;width:72%;height:68%;background:linear-gradient(145deg,var(--realm-land),var(--realm-forest));border-radius:58% 45% 18% 20%;transform:rotate(-5deg)}
.pps-world-land-a{left:-18%}.pps-world-land-b{right:-23%;height:55%;transform:rotate(8deg)}
.pps-world-land-a:after,.pps-world-land-b:after{content:"";position:absolute;inset:18% 13% 6%;background:radial-gradient(circle at 15% 30%,var(--realm-forest) 0 5%,transparent 6%),radial-gradient(circle at 55% 25%,var(--realm-forest) 0 6%,transparent 7%),radial-gradient(circle at 75% 62%,var(--realm-forest) 0 5%,transparent 6%),radial-gradient(circle at 34% 72%,var(--realm-forest) 0 5%,transparent 6%);opacity:.88}
.pps-world-icon{position:absolute;left:22px;top:19px;font-size:42px;filter:drop-shadow(0 5px 5px rgba(0,0,0,.28))}
.pps-world-camp{position:absolute;right:24%;bottom:29%;font-size:29px;filter:drop-shadow(0 4px 4px rgba(0,0,0,.3))}
.pps-world-copy{padding:17px 18px 19px}.pps-world-title-row{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.pps-world-title-row small{color:var(--realm-accent);text-transform:uppercase;letter-spacing:.1em;font-weight:900;font-size:10px}.pps-world-title-row h3{font-size:21px;margin:3px 0 0}
.pps-world-current{font-size:10px;text-transform:uppercase;letter-spacing:.09em;background:var(--realm-accent);color:#052118;border-radius:999px;padding:5px 8px;font-weight:900}
.pps-world-copy>p{color:#b6d1cc;line-height:1.48;min-height:44px;margin:12px 0}
.pps-world-tags{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 13px}.pps-world-tags span{font-size:11px;background:rgba(151,218,196,.1);border:1px solid rgba(139,221,197,.15);padding:4px 8px;border-radius:999px}
.pps-world-copy dl{display:grid;gap:8px;margin:0}.pps-world-copy dl div{display:grid;grid-template-columns:58px 1fr;gap:8px}.pps-world-copy dt{font-size:11px;color:#81a9a2;text-transform:uppercase}.pps-world-copy dd{margin:0;color:#dcefe9;font-size:12px;text-transform:capitalize}
.pps-world-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:17px}.pps-world-enter{background:linear-gradient(135deg,#24b97c,#58e5b3)!important;color:#05251a!important;border-color:transparent!important}.pps-world-new{padding-inline:13px!important}
.pps-world-footer{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:13px 27px;border-top:1px solid rgba(118,220,193,.16);color:#9ebdb7;font-size:13px}

.pps-world-card:focus-visible{outline:3px solid var(--realm-accent);outline-offset:3px}
.pps-world-card[aria-disabled="true"]{cursor:wait}
.pps-world-card.is-loading{border-color:var(--realm-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--realm-accent) 55%,transparent),0 24px 52px rgba(0,0,0,.36)}
.pps-world-status{min-height:20px;margin-top:8px;color:#a9cec5;font-size:13px;font-weight:700}
.pps-world-status[data-state="busy"]{color:#ffe18b}
.pps-world-status[data-state="success"]{color:#73f0b9}
.pps-world-status[data-state="error"]{color:#ffaaa9}
.pps-world-loading{display:none;margin-top:12px;color:var(--realm-accent);font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.pps-world-card.is-loading .pps-world-loading{display:block}
.pps-world-select.is-switching .pps-world-card:not(.is-loading){opacity:.58}
.pps-world-actions button:disabled,.pps-world-save-current:disabled{opacity:.55;cursor:wait}

body.pps-world-select-open{overflow:hidden!important}

@media(max-width:1000px){.pps-world-grid{grid-template-columns:repeat(2,minmax(260px,1fr))}}
@media(max-width:680px){
 .pps-world-select{padding:0;height:var(--m-vv-height,100dvh);max-height:var(--m-vv-height,100dvh)}
 .pps-world-panel{width:100%;height:var(--m-vv-height,100dvh);max-height:var(--m-vv-height,100dvh);border-radius:0;border:0}
 .pps-world-header{padding:calc(15px + env(safe-area-inset-top)) 16px 13px;align-items:center}.pps-world-header p{display:none}.pps-world-header h2{font-size:24px;margin-block:4px}
 .pps-world-save-current{display:none}.pps-world-grid{grid-template-columns:1fr;grid-auto-rows:max-content;padding:14px 14px 110px;gap:14px}
 .pps-world-art{height:132px}.pps-world-copy>p{min-height:0}.pps-world-footer{position:absolute;bottom:0;left:0;right:0;padding:11px 14px calc(11px + env(safe-area-inset-bottom));background:rgba(5,19,27,.96)}.pps-world-footer span{display:none}.pps-world-footer button{width:100%}
}
@media(max-width:900px) and (orientation:landscape) and (max-height:560px){
 .pps-world-select{height:var(--m-vv-height,100dvh);max-height:var(--m-vv-height,100dvh)}
 .pps-world-panel{height:var(--m-vv-height,100dvh);max-height:var(--m-vv-height,100dvh);border-radius:0}
 .pps-world-header{padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));align-items:center}
 .pps-world-header h2{font-size:20px;margin:2px 0}.pps-world-kicker{font-size:9px}.pps-world-status{min-height:16px;margin-top:3px;font-size:11px}
 .pps-world-grid{grid-template-columns:repeat(2,minmax(240px,1fr));padding:10px 12px calc(70px + env(safe-area-inset-bottom));gap:10px}
 .pps-world-art{height:86px}.pps-world-copy{padding:11px 12px 13px}.pps-world-copy>p{display:none}
 .pps-world-tags{margin:7px 0 9px}.pps-world-actions{margin-top:10px}
 .pps-world-footer{padding:7px max(12px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
}
@media(prefers-reduced-motion:reduce){.pps-world-card,.pps-realm-open{transition:none!important}}

.pps-mobile-worlds-v20{display:none}
body.m-shell .pps-mobile-worlds-v20{display:flex;align-items:center;gap:5px;margin-left:auto;margin-right:8px;border:1px solid rgba(120,235,200,.3);border-radius:999px;background:rgba(5,28,36,.7);color:#edfff8;padding:8px 10px;font:700 12px/1 system-ui}
@media(max-width:420px){body.m-shell .pps-mobile-worlds-v20 span:last-child{display:none}}

/* Alpha.20.2: a selected entity must never cover or intercept the world
   chooser. The panel is restored automatically when the chooser closes. */
body.pps-world-select-open #inspector,
body.pps-world-select-open .panel-inspector,
body.pps-world-select-open .pps-inspector-panel {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.pps-world-select-open .pps-world-select {
  z-index: 2147483000 !important;
}
