.pokeworld-page {
    --pw-accent: #2f8a63;
    --pw-accent-strong: #173f33;
    --pw-accent-soft: rgba(47, 138, 99, .12);
    --pw-text: var(--my-white-text, #111213);
    --pw-muted: #68736f;
    --pw-surface: var(--my-white-bg-subtle, #ffffffee);
    --pw-surface-solid: var(--my-white-bg-subtle-solid, #fff);
    --pw-page: var(--my-white-bg, #f0f0f0);
    --pw-border: var(--my-white-border, #f1f1f1);
    position: relative;
    min-height: 100vh;
    padding: 0 0 5rem;
    color: var(--pw-text);
    background-color: transparent;
}

html[data-bs-theme="dark"] .pokeworld-page {
    --pw-accent: #77d3a7;
    --pw-accent-strong: #dff8eb;
    --pw-accent-soft: rgba(119, 211, 167, .12);
    --pw-text: var(--my-dark-text, #e4e4e4);
    --pw-muted: #a8b0ad;
    --pw-surface: var(--my-dark-bg-subtle, #16171be5);
    --pw-surface-solid: var(--my-dark-bg-subtle-solid, #16171b);
    --pw-page: var(--my-dark-bg, #0f0f0f);
    --pw-border: var(--my-dark-border, #2e2f33);
}

.pokeworld-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: clamp(280px, 32vh, 350px);
    padding: 2rem 1rem 1.25rem;
}

#pokeworld-page #header-page.pokeworld-header { min-height: clamp(420px, 55vh, 520px); }

.pokeworld-header > .row { width: 100%; }
.pokeworld-header h1 {
    color: var(--pw-text);
    font-size: clamp(2.45rem, 6vw, 5.3rem);
    line-height: .92;
    letter-spacing: -.045em;
}
.pokeworld-header .lead { color: var(--pw-muted); }
.pokeworld-header .pokedex-view-switcher { flex-wrap: wrap; justify-content: center; }
.pokeworld-header .pokedex-view-switcher__link {
    border: 1px solid var(--pw-border);
    color: var(--pw-muted);
    background: color-mix(in srgb, var(--pw-surface-solid) 90%, transparent);
    box-shadow: var(--xds-shadow-mini);
    text-shadow: none;
}
.pokeworld-header .pokedex-view-switcher__link:hover,
.pokeworld-header .pokedex-view-switcher__link:focus-visible {
    color: var(--pw-text);
    background: var(--pw-surface-solid);
}
.pokeworld-header .pokedex-view-switcher__link.is-active {
    border-color: #267a56;
    color: #fff;
    background: #267a56;
}
.pokeworld-header .pokedex-view-switcher__link.is-active .pokedex-view-switcher__icon,
.pokeworld-header .pokedex-view-switcher__link.is-active .pokedex-view-switcher__icon svg {
    color: #111 !important;
}
html[data-bs-theme="dark"] .pokeworld-header .pokedex-view-switcher__link.is-active {
    border-color: var(--pw-accent);
    color: #111;
    background: var(--pw-accent);
}
.pokeworld-header .pokeworld-eyebrow { color: var(--pw-accent) !important; }

.pokeworld-eyebrow {
    color: var(--pw-accent);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.pokeworld-status,
.pokeworld-error {
    width: min(92vw, 760px);
    margin: 1rem auto 2rem;
    text-align: center;
}

.pokeworld-workspace {
    display: flex;
    flex-direction: column;
    gap: var(--card-spacing, 1rem);
    width: min(1880px, calc(100% - 2rem));
    margin: 0 auto;
    scroll-margin-top: 6rem;
}

.pokeworld-content { display: grid; min-width: 0; gap: .8rem; }
.pokeworld-tools { display: grid; gap: .8rem; color: var(--pw-text); }

.pokeworld-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 82px;
    padding: .25rem .45rem;
}

.pokeworld-content-header h2 { color: var(--pw-text); font-weight: 850; }
.pokeworld-content-header .text-muted { color: var(--pw-muted) !important; }
.pokeworld-scene-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; }
.pokeworld-phase-chip,
.pokeworld-weather-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    gap: .3rem;
    padding: .22rem .5rem;
    border: 1px solid var(--pw-border);
    border-radius: 999px;
    color: var(--pw-muted);
    background: var(--pw-accent-soft);
    font-size: .65rem;
    font-weight: 750;
    line-height: 1;
}
.pokeworld-phase-icon,
.pokeworld-phase-label { display: inline-flex; align-items: center; align-self: center; height: 14px; line-height: 14px; }
.pokeworld-phase-icon { justify-content: center; flex: 0 0 14px; width: 14px; }
.pokeworld-phase-icon .icon { display: flex; align-items: center; justify-content: center; width: 14px; height: 14px; line-height: 0; }
.pokeworld-phase-icon svg { display: block; width: 14px; height: 14px; margin: 0; vertical-align: middle; }
.pokeworld-phase-icon--moon { display: none; }
.pokeworld-page[data-world-phase="night"] .pokeworld-phase-icon--sun { display: none; }
.pokeworld-page[data-world-phase="night"] .pokeworld-phase-icon--moon { display: inline-flex; }
.pokeworld-content-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.pokeworld-save-status { display: inline-flex; align-items: center; min-height: 31px; padding: .35rem .62rem; border: 1px solid var(--pw-border); border-radius: 999px; color: var(--pw-muted); background: var(--pw-surface-solid); font-size: .65rem; font-weight: 800; }
.pokeworld-save-status::before { width: 7px; height: 7px; margin-right: .35rem; border-radius: 50%; background: var(--pw-accent); content: ''; }
.pokeworld-save-status[data-status="saving"]::before { animation: pokeworldSavePulse .9s ease-in-out infinite; }
.pokeworld-save-status[data-status="error"] { color: #dc3545; }
.pokeworld-save-status[data-status="error"]::before { background: #dc3545; }
.pokeworld-save-status[hidden] { display: none !important; }
@keyframes pokeworldSavePulse { 50% { opacity: .35; transform: scale(.72); } }
.pokeworld-content-actions .btn-outline-dark {
    color: var(--pw-text);
    border-color: color-mix(in srgb, var(--pw-text) 28%, transparent);
}
.pokeworld-content-actions .btn-outline-dark:hover,
.pokeworld-content-actions .btn-outline-dark:focus-visible {
    color: var(--pw-page);
    border-color: var(--pw-text);
    background: var(--pw-text);
}
.pokeworld-readonly-badge {
    padding: .55rem .8rem;
    border-radius: 999px;
    background: var(--pw-accent-strong);
    color: var(--pw-page);
    font-size: .72rem;
    font-weight: 800;
}

.pokeworld-canvas-shell {
    position: relative;
    width: 100%;
    height: clamp(620px, 72vh, 820px);
    overflow: hidden;
    isolation: isolate;
    background: #6fca68;
    box-shadow: 0 22px 60px rgba(10, 33, 24, .2) !important;
}
.pokeworld-weather-picker { position: relative; z-index: 8; display: inline-flex; }
.pokeworld-weather-chip {
    --pw-weather-color: #52636b;
    appearance: none;
    cursor: pointer;
    border-color: color-mix(in srgb, var(--pw-weather-color) 28%, var(--pw-border));
    color: color-mix(in srgb, var(--pw-weather-color) 78%, var(--pw-text));
    background: color-mix(in srgb, var(--pw-weather-color) 14%, var(--pw-surface-solid));
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.pokeworld-weather-chip:hover,
.pokeworld-weather-chip:focus-visible { border-color: color-mix(in srgb, var(--pw-weather-color) 58%, var(--pw-border)); background: color-mix(in srgb, var(--pw-weather-color) 20%, var(--pw-surface-solid)); }
.pokeworld-weather-chip[aria-expanded="true"] { transform: translateY(-1px); }
.pokeworld-weather-chip[data-weather="clear"] { --pw-weather-color: #a47d13; }
.pokeworld-weather-chip[data-weather="cloudy"] { --pw-weather-color: #60757f; }
.pokeworld-weather-chip[data-weather="rain"] { --pw-weather-color: #39759d; }
.pokeworld-weather-chip[data-weather="snow"] { --pw-weather-color: #5f879a; }
.pokeworld-weather-chip[data-weather="fog"] { --pw-weather-color: #738185; }
.pokeworld-weather-chip[data-weather="storm"] { --pw-weather-color: #6a6498; }
.pokeworld-weather-icon { --pw-weather-icon: url("../icons/utils/sun-dVerdON.svg"); display: inline-flex; flex: 0 0 14px; width: 14px; height: 14px; background: var(--pw-weather-color); -webkit-mask: var(--pw-weather-icon) center / contain no-repeat; mask: var(--pw-weather-icon) center / contain no-repeat; }
.pokeworld-weather-chip[data-weather="cloudy"] .pokeworld-weather-icon { --pw-weather-icon: url("../icons/utils/cloud-Y9OtYml.svg"); }
.pokeworld-weather-chip[data-weather="rain"] .pokeworld-weather-icon { --pw-weather-icon: url("../icons/utils/cloud-rain-XEhOj49.svg"); }
.pokeworld-weather-chip[data-weather="snow"] .pokeworld-weather-icon { --pw-weather-icon: url("../icons/utils/cloud-snow-6x-yMiF.svg"); }
.pokeworld-weather-chip[data-weather="fog"] .pokeworld-weather-icon { --pw-weather-icon: url("../icons/utils/cloud-fog-CMzKI3m.svg"); }
.pokeworld-weather-chip[data-weather="storm"] .pokeworld-weather-icon { --pw-weather-icon: url("../icons/utils/cloud-lightning-3qQm2rx.svg"); }
.pokeworld-weather-preview {
    position: absolute;
    z-index: 12;
    top: calc(100% + .45rem);
    left: 0;
    width: max-content;
    max-width: min(330px, calc(100vw - 2rem));
    padding: .65rem;
    border: 1px solid var(--pw-border);
    border-radius: 14px;
    color: var(--pw-text);
    background: color-mix(in srgb, var(--pw-surface-solid) 94%, transparent);
    box-shadow: 0 16px 38px rgba(0,0,0,.24);
    backdrop-filter: blur(14px);
}
.pokeworld-weather-preview[hidden] { display: none; }
.pokeworld-weather-preview__title { display: block; margin: 0 0 .5rem; color: var(--pw-muted); font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.pokeworld-weather-preview__options { display: grid; grid-template-columns: repeat(3, minmax(74px, 1fr)); gap: .35rem; }
.pokeworld-weather-preview__options button,
.pokeworld-weather-preview__reset { border: 1px solid var(--pw-border); color: var(--pw-text); background: var(--pw-accent-soft); }
.pokeworld-weather-preview__options button { display: inline-flex; align-items: center; justify-content: flex-start; gap: .35rem; min-height: 32px; padding: .3rem .45rem; border-radius: 9px; font-size: .62rem; font-weight: 750; }
.pokeworld-weather-preview__options button[aria-pressed="true"] { border-color: #267a56 !important; color: #fff !important; background: #267a56 !important; }
html[data-bs-theme="dark"] .pokeworld-weather-preview__options button[aria-pressed="true"] { border-color: var(--pw-accent) !important; color: #111213 !important; background: var(--pw-accent) !important; }
.pokeworld-weather-preview__options .icon,
.pokeworld-weather-preview__options svg { display: block; flex: 0 0 15px; width: 15px !important; height: 15px !important; color: inherit !important; stroke: currentColor; }
.pokeworld-weather-preview__icon { display: block; flex: 0 0 15px; width: 15px; height: 15px; background: currentColor; -webkit-mask: var(--pw-weather-icon) center / contain no-repeat; mask: var(--pw-weather-icon) center / contain no-repeat; }
.pokeworld-weather-preview__reset { width: 100%; margin-top: .45rem; padding: .35rem .5rem; border-radius: 9px; font-size: .6rem; font-weight: 800; }
.pokeworld-canvas-shell::after { position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(255, 244, 184, .08), transparent 35%, rgba(20, 80, 52, .06)); content: ''; pointer-events: none; }
.pokeworld-page[data-world-phase="evening"] .pokeworld-canvas-shell::after { background: linear-gradient(180deg, rgba(255, 163, 91, .14), rgba(109, 80, 155, .08) 58%, rgba(30, 54, 82, .12)); }
.pokeworld-page[data-world-phase="night"] .pokeworld-canvas-shell::after { background: linear-gradient(180deg, rgba(22, 40, 92, .22), rgba(19, 37, 63, .12) 60%, rgba(7, 18, 35, .2)); }

.pokeworld-weather-overlay {
    --pw-weather-intensity: .2;
    position: absolute;
    z-index: 2;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.pokeworld-weather-overlay::before,
.pokeworld-weather-overlay::after { position: absolute; inset: -22%; content: ''; pointer-events: none; will-change: transform, opacity; }

.pokeworld-weather-overlay[data-weather="clear"] { background: linear-gradient(135deg, rgba(255,255,255,.035), transparent 52%); }
.pokeworld-weather-overlay[data-weather="clear"]::before,
.pokeworld-weather-overlay[data-weather="cloudy"]::before,
.pokeworld-weather-overlay[data-weather="clear"]::after,
.pokeworld-weather-overlay[data-weather="cloudy"]::after { display: none; }
.pokeworld-weather-overlay[data-weather="cloudy"] { background: linear-gradient(180deg, rgba(83, 105, 120, .13), rgba(65, 90, 82, .035) 66%, transparent); }

.pokeworld-weather-overlay[data-weather="rain"] { background: linear-gradient(180deg, rgba(74, 108, 126, .075), rgba(47, 84, 74, .025) 72%, transparent); }
.pokeworld-weather-overlay[data-weather="rain"]::before,
.pokeworld-weather-overlay[data-weather="storm"]::before {
    opacity: calc(var(--pw-weather-intensity) * .72);
    background: radial-gradient(ellipse at 28% 30%, rgba(41, 62, 69, .42), transparent 62%), radial-gradient(ellipse at 76% 64%, rgba(39, 60, 66, .34), transparent 66%);
    filter: blur(35px);
    animation: pokeworldRainCloudDrift 24s ease-in-out infinite alternate;
}
.pokeworld-weather-overlay[data-weather="rain"]::after {
    inset: 54% -8% -18%;
    opacity: calc(var(--pw-weather-intensity) * .34);
    background: linear-gradient(180deg, transparent, rgba(210, 229, 234, .45));
    filter: blur(24px);
    animation: pokeworldRainMist 6s ease-in-out infinite alternate;
}

.pokeworld-weather-overlay[data-weather="snow"] { background: linear-gradient(180deg, rgba(221, 240, 247, .085), rgba(255,255,255,.02) 70%, transparent); }
.pokeworld-weather-overlay[data-weather="snow"]::before { opacity: calc(var(--pw-weather-intensity) * .45); background: linear-gradient(180deg, rgba(245, 251, 253, .34), transparent 48%); filter: blur(20px); animation: pokeworldSnowHaze 8s ease-in-out infinite alternate; }
.pokeworld-weather-overlay[data-weather="snow"]::after { display: none; }

.pokeworld-weather-particles { position: absolute; z-index: 1; inset: 0; overflow: hidden; pointer-events: none; }
.pokeworld-weather-particle { position: absolute; display: none; pointer-events: none; will-change: transform, opacity; }
.pokeworld-weather-cloud-shadow {
    position: absolute;
    top: var(--pw-cloud-top);
    left: -75%;
    display: none;
    width: var(--pw-cloud-width);
    height: var(--pw-cloud-height);
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(ellipse at 20% 56%, rgba(19, 56, 39, .58) 0 28%, rgba(19, 56, 39, .42) 39%, transparent 65%), radial-gradient(ellipse at 49% 43%, rgba(18, 54, 37, .62) 0 34%, rgba(18, 54, 37, .4) 47%, transparent 70%), radial-gradient(ellipse at 78% 57%, rgba(20, 59, 41, .55) 0 29%, rgba(20, 59, 41, .36) 44%, transparent 67%);
    filter: blur(28px);
    mix-blend-mode: multiply;
    will-change: transform, opacity;
    animation: pokeworldCloudShadowRandom var(--pw-cloud-duration) linear var(--pw-cloud-delay) infinite;
}
.pokeworld-weather-overlay:is([data-weather="clear"], [data-weather="cloudy"]) .pokeworld-weather-cloud-shadow { display: block; }
.pokeworld-weather-overlay[data-weather="fog"] .pokeworld-weather-cloud-shadow {
    display: block;
    background: radial-gradient(ellipse at 20% 56%, rgba(255,255,255,.78) 0 28%, rgba(255,255,255,.38) 44%, transparent 68%), radial-gradient(ellipse at 49% 43%, rgba(248,252,252,.82) 0 34%, rgba(248,252,252,.4) 48%, transparent 72%), radial-gradient(ellipse at 78% 57%, rgba(255,255,255,.72) 0 29%, rgba(255,255,255,.34) 45%, transparent 69%);
    filter: blur(32px);
    mix-blend-mode: screen;
    animation-name: pokeworldFogCloudRandom;
}
.pokeworld-weather-overlay:is([data-weather="rain"], [data-weather="storm"]) .pokeworld-weather-particle--rain {
    --pw-rain-opacity: 1.35;
    top: -12%;
    left: var(--pw-particle-x);
    display: block;
    width: 1.35px;
    height: var(--pw-particle-length);
    border-radius: 999px;
    opacity: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.95));
    animation: pokeworldRainParticle var(--pw-particle-duration) linear var(--pw-particle-delay) infinite;
}
.pokeworld-weather-overlay:is([data-weather="rain"], [data-weather="storm"]) .pokeworld-weather-particle--rain.is-distant { --pw-rain-opacity: .78; width: 1px; filter: blur(.25px); }
.pokeworld-weather-overlay[data-weather="snow"] .pokeworld-weather-particle--snow {
    --pw-snow-opacity: 1.85;
    top: -6%;
    left: var(--pw-particle-x);
    display: block;
    width: var(--pw-particle-size);
    height: var(--pw-particle-size);
    border-radius: 50%;
    opacity: 0;
    background: rgba(255,255,255,.94);
    box-shadow: 0 0 3px rgba(235,248,255,.72);
    animation: pokeworldSnowParticle var(--pw-particle-duration) linear var(--pw-particle-delay) infinite;
}
.pokeworld-weather-overlay[data-weather="snow"] .pokeworld-weather-particle--snow.is-distant { --pw-snow-opacity: 1.25; filter: blur(.55px); }

.pokeworld-weather-overlay[data-weather="storm"] { background: linear-gradient(180deg, rgba(39, 44, 78, .24), rgba(35, 62, 70, .09) 68%, rgba(18, 38, 35, .04)); animation: pokeworldStormAmbient 7.5s linear infinite; }
.pokeworld-weather-overlay[data-weather="storm"]::before { opacity: calc(var(--pw-weather-intensity) * .9); animation-duration: 18s; }
.pokeworld-weather-overlay[data-weather="storm"]::after {
    z-index: 2;
    inset: 4% auto auto 58%;
    width: 12%;
    height: 48%;
    opacity: 0;
    background: linear-gradient(180deg, #f9fbff, #dbeaff 52%, #fff4bd);
    clip-path: polygon(58% 0, 31% 43%, 52% 43%, 22% 100%, 83% 35%, 61% 35%, 76% 0);
    filter: drop-shadow(0 0 9px rgba(225,238,255,.95)) drop-shadow(0 0 20px rgba(185,214,255,.7));
    animation: pokeworldLightningBolt 7.5s linear infinite;
}

@keyframes pokeworldCloudShadowRandom {
    0% { opacity: 0; transform: translate3d(0, var(--pw-cloud-y-start), 0) scale(.82); }
    14%, 68% { opacity: calc(var(--pw-weather-intensity) * var(--pw-cloud-strength)); }
    44% { transform: translate3d(140%, var(--pw-cloud-y-mid), 0) scale(1.08); }
    78% { opacity: calc(var(--pw-weather-intensity) * var(--pw-cloud-strength) * .82); transform: translate3d(210%, var(--pw-cloud-y-end), 0) scale(1.02); }
    100% { opacity: 0; transform: translate3d(270%, var(--pw-cloud-y-end), 0) scale(.88); }
}
@keyframes pokeworldFogCloudRandom {
    0% { opacity: 0; transform: translate3d(0, var(--pw-cloud-y-start), 0) scale(.82); }
    14%, 68% { opacity: calc(var(--pw-weather-intensity) * .72); }
    44% { transform: translate3d(140%, var(--pw-cloud-y-mid), 0) scale(1.08); }
    78% { opacity: calc(var(--pw-weather-intensity) * .58); transform: translate3d(210%, var(--pw-cloud-y-end), 0) scale(1.02); }
    100% { opacity: 0; transform: translate3d(270%, var(--pw-cloud-y-end), 0) scale(.88); }
}
@keyframes pokeworldRainCloudDrift { to { transform: translate3d(7%, 3%, 0) scale(1.04); } }
@keyframes pokeworldRainMist { to { opacity: calc(var(--pw-weather-intensity) * .48); transform: translate3d(0, -2%, 0); } }
@keyframes pokeworldRainParticle {
    0% { opacity: 0; transform: translate3d(0, -10vh, 0); }
    12%, 78% { opacity: calc(var(--pw-weather-intensity) * var(--pw-rain-opacity)); }
    100% { opacity: 0; transform: translate3d(var(--pw-particle-drift), 118vh, 0); }
}
@keyframes pokeworldSnowParticle {
    0% { opacity: 0; transform: translate3d(0, -10vh, 0) rotate(0deg); }
    10% { opacity: calc(var(--pw-weather-intensity) * var(--pw-snow-opacity)); }
    28% { transform: translate3d(var(--pw-particle-sway), 25vh, 0) rotate(80deg); }
    55% { transform: translate3d(calc(0px - var(--pw-particle-sway)), 58vh, 0) rotate(170deg); }
    78% { opacity: calc(var(--pw-weather-intensity) * var(--pw-snow-opacity) * .9); transform: translate3d(var(--pw-particle-sway), 88vh, 0) rotate(250deg); }
    100% { opacity: 0; transform: translate3d(0, 116vh, 0) rotate(340deg); }
}
@keyframes pokeworldSnowHaze { to { opacity: calc(var(--pw-weather-intensity) * .62); transform: translate3d(0, 2%, 0); } }
@keyframes pokeworldStormAmbient { 0%, 70%, 74%, 100% { filter: brightness(1); } 71% { filter: brightness(1.23); } 72% { filter: brightness(.96); } 73% { filter: brightness(1.14); } }
@keyframes pokeworldLightningBolt { 0%, 70%, 72%, 74%, 100% { opacity: 0; } 70.5% { opacity: .82; } 71.2% { opacity: .12; } 72.7% { opacity: .62; } 73.5% { opacity: 0; } }

.pokeworld-canvas-viewport { width: 100%; height: 100%; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
.pokeworld-canvas-viewport::-webkit-scrollbar { display: none; width: 0; height: 0; }
.pokeworld-canvas-viewport[data-scrollable="true"] canvas { cursor: grab; }
.pokeworld-canvas-shell.is-panning .pokeworld-canvas-viewport canvas { cursor: grabbing; }
.pokeworld-canvas-stage { width: max(1880px, 100%); min-width: 1880px; height: 720px; }
@media (min-width: 992px) {
    .pokeworld-canvas-shell,
    .pokeworld-canvas-stage { height: 720px; }
    .pokeworld-canvas-stage { width: 100%; min-width: 100%; }
}
.pokeworld-canvas-shell canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; touch-action: pan-x; }
.pokeworld-canvas-shell canvas:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.pokeworld-canvas-shell.is-editing canvas { cursor: grab; touch-action: none; }
.pokeworld-canvas-shell:not(.is-editing) canvas[data-discovery-opportunity="visible"] { cursor: pointer; }
.pokeworld-canvas-shell.is-zoomed canvas { cursor: grab; touch-action: none; }
.pokeworld-canvas-shell.is-dragging canvas,
.pokeworld-canvas-shell.is-panning canvas { cursor: grabbing; }
.pokeworld-canvas-shell.is-selecting canvas { cursor: crosshair; }
.pokeworld-canvas-shell.is-multi-selecting canvas { cursor: crosshair; }
.pokeworld-canvas-controls {
    position: absolute;
    z-index: 4;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: .25rem;
    width: max-content;
    max-width: calc(100% - 2rem);
    overflow-x: auto;
    scrollbar-width: none;
    padding: .35rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    background: rgba(15, 25, 22, .72);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
    backdrop-filter: blur(10px);
}
.pokeworld-canvas-controls::-webkit-scrollbar { display: none; }
.pokeworld-canvas-control { display: grid; place-items: center; align-items: center; justify-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; color: #fff; background: transparent; line-height: 1; transition: color .16s ease, background-color .16s ease, opacity .16s ease; }
.pokeworld-canvas-control--wide { display: inline-flex; width: auto; min-width: 32px; gap: .32rem; padding-inline: .5rem; font-size: .62rem; font-weight: 800; }
.pokeworld-canvas-control:hover, .pokeworld-canvas-control:focus-visible { color: #fff; background: rgba(255, 255, 255, .16); }
.pokeworld-canvas-control[aria-pressed="true"] { color: #fff; background: var(--pw-accent); }
.pokeworld-canvas-control:disabled { cursor: not-allowed; opacity: .38; }
.pokeworld-canvas-control .icon, .pokeworld-canvas-control svg { display: block; width: 17px; height: 17px; }
.pokeworld-canvas-control > .icon { display: inline-flex; flex: 0 0 17px; align-items: center; justify-content: center; width: 17px; height: 17px; margin: 0 !important; line-height: 0; vertical-align: middle; }
.pokeworld-canvas-control > .icon svg { display: block; flex: 0 0 17px; width: 17px; height: 17px; margin: 0; }
.pokeworld-canvas-zoom-value { min-width: 42px; color: #fff; font-size: .66rem; font-weight: 800; text-align: center; }
.pokeworld-canvas-brightness output { min-width: 34px; color: #fff; font-size: .6rem; font-weight: 800; text-align: center; }
.pokeworld-canvas-brightness { display: flex; align-items: center; gap: .4rem; margin-left: .2rem; padding-left: .55rem; border-left: 1px solid rgba(255, 255, 255, .18); color: #fff; font-size: .62rem; }
.pokeworld-canvas-brightness__label { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.pokeworld-canvas-brightness__label .icon, .pokeworld-canvas-brightness__label svg { width: 14px; height: 14px; }
.pokeworld-canvas-brightness__label > .icon { display: inline-flex; flex: 0 0 14px; align-items: center; justify-content: center; line-height: 0; }
.pokeworld-canvas-brightness__label > .icon svg { display: block; width: 14px; height: 14px; margin: 0; }
.pokeworld-canvas-brightness input { width: 64px; height: 18px; accent-color: var(--pw-accent); }
.pokeworld-canvas-hint {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 2rem);
    margin: 0;
    padding: .5rem .85rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 15, 15, .72);
    box-shadow: var(--xds-shadow-mini);
    font-size: .72rem;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: opacity .25s ease, visibility .25s ease;
}
.pokeworld-canvas-hint:empty { display: none; }
.pokeworld-canvas-hint.is-hidden { visibility: hidden; opacity: 0; pointer-events: none; }
.pokeworld-selection {
    min-height: 0;
    padding: .8rem;
    border: 1px solid color-mix(in srgb, var(--pw-accent) 25%, var(--pw-border));
    border-radius: var(--border-radius-20, 20px);
    background: linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 8%, var(--pw-surface-solid)), var(--pw-surface-solid));
    box-shadow: 0 15px 36px rgba(28, 75, 55, .12);
}
.pokeworld-selection:empty { display: none; }
.pokeworld-selection:not(:empty) { display: block; }
.pokeworld-selection-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, auto); align-items: center; gap: .45rem 1rem; }
.pokeworld-selection-header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.pokeworld-selection-kicker { color: var(--pw-accent); font-size: .62rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.pokeworld-selection-close { display: inline-grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: var(--pw-muted); background: transparent; font-size: 1.35rem; line-height: 1; transition: color .18s ease, transform .18s ease; }
.pokeworld-selection-close:hover, .pokeworld-selection-close:focus-visible { border-color: transparent; color: var(--pw-text); background: transparent; transform: scale(1.08); }
.pokeworld-selection-close .icon, .pokeworld-selection-close svg { display: block; width: 16px; height: 16px; color: currentColor !important; }
.pokeworld-selection-hero { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.pokeworld-selection-visual { display: grid; place-items: center; flex: 0 0 68px; width: 68px; height: 68px; background: transparent; }
.pokeworld-selection-visual img,
.pokeworld-selection-visual .pokeworld-sprite-preview { display: block; width: 68px; height: 68px; overflow: hidden; object-fit: contain; image-rendering: pixelated; background: transparent; background-repeat: no-repeat; background-position: 0 0; background-size: 400% 400%; }
.pokeworld-selection-details { min-width: 0; }
.pokeworld-selection-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; min-width: 0; }
.pokeworld-selection-title-row .pokeworld-resident-status { flex: 0 0 auto; margin: 0; }
.pokeworld-selection-details h3 { overflow: hidden; margin: 0; color: var(--pw-text); font-size: 1.15rem; text-overflow: ellipsis; white-space: nowrap; }
.pokeworld-selection-details p { margin: .18rem 0 .35rem; color: var(--pw-muted); font-size: .76rem; }
.pokeworld-selection-types { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.pokeworld-selection-types .pokedex-type-chip { min-height: 1.55rem; color: #fff; font-size: .66rem; }
.pokeworld-selection-types .pokedex-type-chip__icon svg,
.pokeworld-selection-types .pokedex-type-chip__icon img { width: 14px; height: 14px; }
.pokeworld-selection-types .pokeworld-selection-region { min-height: 1.55rem; font-size: .6rem; }
.pokeworld-selection-note { grid-column: 1; margin: 0; color: var(--pw-muted); font-size: .68rem; line-height: 1.35; }
.pokeworld-selection-actions { display: flex; grid-column: 2; grid-row: 2 / span 2; align-items: center; align-self: center; justify-content: flex-end; flex-wrap: wrap; gap: .4rem; margin-top: 0; padding-top: 0; border-top: 0; }
.pokeworld-selection .btn { margin: 0; }
.pokeworld-action-button { display: inline-flex; align-items: center; justify-content: center; gap: .38rem; border-radius: var(--border-radius-10, .5rem); font-weight: 700; box-shadow: 0 5px 12px rgba(20, 45, 35, .09); transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
.pokeworld-action-button:hover, .pokeworld-action-button:focus-visible { filter: saturate(1.12); transform: translateY(-1px); box-shadow: 0 8px 16px rgba(20, 45, 35, .14); }
.pokeworld-action-button__icon { display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; font-size: .95rem; line-height: 1; }

.pokeworld-canvas-shell > .pokeworld-selection {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 5;
    width: min(480px, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    overflow-x: hidden;
    overflow-y: auto;
    padding: .75rem;
    border-color: color-mix(in srgb, var(--pw-accent) 34%, var(--pw-border));
    background: color-mix(in srgb, var(--pw-surface-solid) 90%, var(--pw-accent) 10%);
    box-shadow: 0 18px 42px rgba(9, 26, 20, .3);
    backdrop-filter: blur(14px) saturate(1.05);
}
.pokeworld-canvas-shell > .pokeworld-selection .pokeworld-selection-panel {
    grid-template-columns: auto minmax(0, 1fr);
    gap: .35rem .7rem;
}
.pokeworld-canvas-shell > .pokeworld-selection .pokeworld-selection-header,
.pokeworld-canvas-shell > .pokeworld-selection .pokeworld-selection-hero,
.pokeworld-canvas-shell > .pokeworld-selection .pokeworld-selection-note,
.pokeworld-canvas-shell > .pokeworld-selection .pokeworld-selection-actions {
    grid-column: 1 / -1;
}
.pokeworld-canvas-shell > .pokeworld-selection .pokeworld-selection-actions {
    grid-row: auto;
    justify-content: flex-start;
    margin-top: .35rem;
    padding-top: .55rem;
    border-top: 1px solid color-mix(in srgb, var(--pw-accent) 20%, var(--pw-border));
}

.pokeworld-tools-nav {
    position: sticky;
    top: 4.5rem;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .4rem;
    padding: .7rem;
    border: 1px solid var(--pw-border) !important;
    background: color-mix(in srgb, var(--pw-surface-solid) 88%, var(--pw-accent) 12%);
    backdrop-filter: blur(14px) saturate(1.05);
}
.pokeworld-tools-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    padding: .55rem .65rem;
    border: 0;
    border-radius: var(--border-radius-10, 10px);
    color: var(--pw-muted);
    background: transparent;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.pokeworld-tools-nav button:hover,
.pokeworld-tools-nav button:focus-visible { color: var(--pw-text); background: var(--pw-accent-soft); }
.pokeworld-tools-nav button:focus-visible { outline: 2px solid var(--pw-accent); outline-offset: -2px; }
.pokeworld-tools-nav button.is-active {
    color: #fff;
    background: #267a56;
    box-shadow: var(--xds-shadow-mini);
}
html[data-bs-theme="dark"] .pokeworld-tools-nav button.is-active { color: #111; background: var(--pw-accent); }
.pokeworld-tools-nav button.is-active .pokeworld-tab-icon,
.pokeworld-tools-nav button.is-active .pokeworld-tab-icon svg,
.pokeworld-decor-filters button.is-active > span,
.pokeworld-decor-filters button.is-active svg { color: #111 !important; }
.pokeworld-tab-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 17px; width: 17px; height: 17px; line-height: 0; }
.pokeworld-tab-icon svg { display: block; width: 16px; height: 16px; color: currentColor !important; }
.pokeworld-tools-collapse { display: none; }

.pokeworld-tools-body {
    overflow: hidden;
    border: 1px solid var(--pw-border) !important;
    color: var(--pw-text);
    background-color: var(--pw-surface) !important;
}
.pokeworld-panel { padding: clamp(1rem, 2vw, 1.75rem); }
.pokeworld-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.pokeworld-panel-header h2 { color: var(--pw-text); }
.pokeworld-panel .btn-outline-dark {
    color: var(--pw-text);
    border-color: color-mix(in srgb, var(--pw-text) 30%, transparent);
}
.pokeworld-panel .btn-outline-dark:hover,
.pokeworld-panel .btn-outline-dark:focus-visible {
    color: var(--pw-page);
    border-color: var(--pw-text);
    background: var(--pw-text);
}

.pokeworld-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.pokeworld-settings-grid label { display: grid; gap: .35rem; font-size: .76rem; font-weight: 800; }
.pokeworld-setting-help {
    margin: .85rem 0;
    padding: .75rem .85rem;
    border-left: 3px solid var(--pw-accent);
    color: var(--pw-text);
    background: var(--pw-accent-soft);
    font-size: .78rem;
}
.pokeworld-share-status { color: var(--pw-accent); font-size: .78rem; }
.pokeworld-reset-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem; border: 1px solid color-mix(in srgb, #dc3545 35%, var(--pw-border)); border-radius: 14px; background: color-mix(in srgb, #dc3545 5%, var(--pw-surface-solid)); }
.pokeworld-reset-card p { color: var(--pw-muted); font-size: .75rem; line-height: 1.45; }
.pokeworld-reset-card small { color: var(--pw-text); font-size: .7rem; font-weight: 750; }
.pokeworld-reset-overlay { position: fixed; inset: 0; z-index: 1080; display: grid; place-items: center; padding: 1rem; background: rgba(15, 23, 42, .32); backdrop-filter: blur(3px); }
.pokeworld-reset-overlay[hidden] { display: none !important; pointer-events: none; }
.pokeworld-reset-dialog { width: min(440px, 100%); display: grid; justify-items: center; color: var(--bs-body-color); text-align: center; }
.pokeworld-reset-dialog__icon { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: .5rem; color: var(--bs-primary); font-size: 3.4rem; line-height: 1; }
.pokeworld-reset-dialog__cost { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .75rem; color: var(--bs-body-color); background: var(--bs-secondary-bg); border-radius: 10px; }
.pokeworld-reset-dialog__cost img { width: 28px; height: 28px; object-fit: contain; }
.pokeworld-management-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; margin: 1rem 0; }
.pokeworld-management-summary > div,
.pokeworld-catalog-card,
.pokeworld-resident-card {
    border: 1px solid var(--pw-border);
    background: var(--pw-surface-solid);
}
.pokeworld-management-summary > div { padding: .6rem .2rem; border-radius: 12px; text-align: center; }
.pokeworld-management-summary strong { display: block; color: var(--pw-text); font-size: 1.15rem; }
.pokeworld-management-summary span { color: var(--pw-muted); font-size: .61rem; text-transform: uppercase; }

.pokeworld-accordion { border-top: 1px solid var(--pw-border); }
.pokeworld-accordion summary { padding: .9rem 0; cursor: pointer; font-weight: 850; }
.pokeworld-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; margin-bottom: .7rem; }
.pokeworld-search-row .btn { padding-inline: .65rem; }
.pokeworld-arrange-nav {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
    margin-bottom: .75rem;
    padding: .35rem;
    border: 1px solid var(--pw-border);
    border-radius: 14px;
    background: var(--pw-accent-soft);
}
.pokeworld-arrange-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 42px;
    padding: .45rem;
    border: 0;
    border-radius: 10px;
    color: var(--pw-muted);
    background: transparent;
    font-size: .7rem;
    font-weight: 800;
    line-height: 1;
}
.pokeworld-arrange-nav button.is-active { color: #fff; background: #267a56; }
.pokeworld-arrange-nav button.is-active > span,
.pokeworld-arrange-nav button.is-active .icon,
.pokeworld-arrange-nav button.is-active svg { color: #fff !important; }
.pokeworld-arrange-nav button > span { display: inline-flex; flex: 0 0 16px; align-items: center; justify-content: center; width: 16px; height: 16px; line-height: 0; vertical-align: middle; }
.pokeworld-arrange-nav button > span .icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; line-height: 0; }
.pokeworld-arrange-nav svg { display: block; width: 16px; height: 16px; margin: 0; }
.pokeworld-arrange-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1rem;
}
.pokeworld-arrange-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.pokeworld-arrange-section + .pokeworld-arrange-section { padding-left: 1rem; border-left: 1px solid var(--pw-border); }
.pokeworld-arrange-section > header { display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem; }
.pokeworld-arrange-section > header > span { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; color: var(--pw-accent); background: transparent; line-height: 0; }
.pokeworld-arrange-section > header svg { display: block; width: 22px; height: 22px; }
.pokeworld-arrange-section > header p { margin: 0; color: var(--pw-muted); font-size: .56rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pokeworld-arrange-section > header h3 { margin: 0; color: var(--pw-text); font-size: .95rem; font-weight: 850; }
.pokeworld-arrange-section [data-pokemon-catalog] { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.pokeworld-arrange-section [data-trainer-catalog] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pokeworld-arrange-section [data-object-catalog] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pokeworld-catalog,
[data-object-catalog],
[data-pokemon-catalog],
[data-trainer-catalog] { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-auto-rows: 1fr; gap: .65rem; }
.pokeworld-catalog-card {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    min-height: 74px;
    padding: .65rem;
    overflow: hidden;
    border-radius: 14px;
    font-size: .76rem;
    height: 100%;
}
.pokeworld-catalog-card__visual {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.pokeworld-catalog-card__content {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    gap: .2rem;
    min-width: 0;
}
.pokeworld-catalog-card__name { overflow: hidden; color: var(--pw-text); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.pokeworld-catalog-card__meta { color: var(--pw-muted); font-size: .64rem; }
.pokeworld-catalog-card__actions {
    position: relative;
    z-index: 1;
    display: grid;
    gap: .35rem;
    min-width: 112px;
}
.pokeworld-catalog-card__actions .btn { display: inline-flex; align-items: center; justify-content: center; margin: 0; line-height: 1.15; }
.pokeworld-catalog-card img,
.pokeworld-catalog-card .pokeworld-sprite-preview,
.pokeworld-catalog-card .pokeworld-decor-preview { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.pokeworld-decor-preview { display: block; background-repeat: no-repeat; image-rendering: pixelated; }
.pokeworld-catalog-card--pokemon {
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: 52px minmax(36px, auto);
    gap: .45rem;
    min-height: 114px;
    padding: .5rem;
    background: linear-gradient(135deg, var(--pw-surface-solid), color-mix(in srgb, var(--pw-surface-solid) 87%, var(--pw-accent) 13%));
}
.pokeworld-catalog-card--pokemon::after {
    position: absolute;
    right: 12px;
    bottom: 10px;
    width: 58px;
    height: 58px;
    opacity: .055;
    background: url("../icons/utils/pokeball-nEbt2ql.svg") center / contain no-repeat;
    content: '';
    pointer-events: none;
}
.pokeworld-catalog-card--pokemon .pokeworld-catalog-card__visual {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.pokeworld-catalog-card--pokemon img,
.pokeworld-catalog-card--pokemon .pokeworld-sprite-preview { width: 50px; height: 50px; }
.pokeworld-catalog-card--pokemon .pokeworld-catalog-card__actions { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); width: 100%; }
.pokeworld-catalog-card--trainer {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: 52px minmax(36px, auto);
    gap: .45rem;
    min-height: 114px;
    padding: .5rem;
}
.pokeworld-catalog-card--trainer .pokeworld-catalog-card__visual { width: 48px; height: 48px; }
.pokeworld-catalog-card--trainer .pokeworld-catalog-card__actions { grid-column: 1 / -1; min-width: 0; width: 100%; }
.pokeworld-catalog-card--trainer .btn,
.pokeworld-catalog-card--trainer > .btn { grid-column: 1 / -1; width: 100%; }
.pokeworld-catalog-card--object {
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: 52px minmax(36px, auto);
    gap: .45rem;
    min-height: 114px;
    padding: .5rem;
}
.pokeworld-catalog-card--object img,
.pokeworld-catalog-card--object .pokeworld-decor-preview { width: 52px; height: 52px; background-position-y: center; }
.pokeworld-catalog-card--object > .btn,
.pokeworld-catalog-card--object > .pokeworld-object-status,
.pokeworld-catalog-card--object > .pokeworld-object-actions { grid-column: 1 / -1; width: 100%; }
.pokeworld-catalog-card--object > .btn { display: inline-flex; align-items: center; justify-content: center; }
.pokeworld-object-actions { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: .35rem; }
.pokeworld-object-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-width: 0; margin: 0; }
.pokeworld-object-add { padding-inline: 0; font-size: 1rem; font-weight: 900; line-height: 1; }
.pokeworld-object-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: .35rem .55rem;
    border: 1px solid var(--pw-border);
    border-radius: 8px;
    color: var(--pw-muted);
    background: color-mix(in srgb, var(--pw-muted) 6%, transparent);
    font-size: .62rem;
    font-weight: 800;
    text-align: center;
}
.pokeworld-arrange-section .pokeworld-catalog-card__actions .btn,
.pokeworld-arrange-section .pokeworld-catalog-card--trainer > .btn,
.pokeworld-arrange-section .pokeworld-object-actions .btn,
.pokeworld-arrange-section .pokeworld-object-status { min-height: 36px; height: 36px; }

@media (min-width: 576px) {
    .pokeworld-arrange-section .pokeworld-catalog-card--pokemon,
    .pokeworld-arrange-section .pokeworld-catalog-card--trainer,
    .pokeworld-arrange-section .pokeworld-catalog-card--object { min-height: 114px; height: 114px; }
}
.pokeworld-object-status.is-active { border-color: color-mix(in srgb, var(--pw-accent) 45%, var(--pw-border)); color: var(--pw-accent); background: var(--pw-accent-soft); }
.pokeworld-catalog-card--object.is-placed { border-color: color-mix(in srgb, var(--pw-accent) 50%, var(--pw-border)); }
.pokeworld-catalog-card--object.is-active-building { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pw-accent) 35%, transparent); }
.pokeworld-catalog-empty { grid-column: 1 / -1; margin: 0; padding: 1rem; color: var(--pw-muted); text-align: center; }
.pokeworld-decor-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .5rem;
    margin-bottom: .7rem;
}
.pokeworld-decor-filters button {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .3rem;
    min-height: 42px;
    padding: .3rem .4rem;
    border: 1px solid var(--pw-border);
    border-radius: 12px;
    color: var(--pw-muted);
    background: transparent;
    text-align: center;
    transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}
.pokeworld-decor-filters button:hover,
.pokeworld-decor-filters button:focus-visible { border-color: color-mix(in srgb, var(--pw-accent) 55%, var(--pw-border)); color: var(--pw-text); background: var(--pw-accent-soft); }
.pokeworld-decor-filters button.is-active { border-color: #267a56; color: #fff; background: #267a56; }
.pokeworld-decor-filters button > span { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; line-height: 0; }
.pokeworld-decor-filters button > span .icon { display: grid; place-items: center; width: 20px; height: 20px; }
.pokeworld-decor-filters svg { display: block; width: 20px !important; height: 20px !important; }
.pokeworld-decor-filters strong { overflow: hidden; font-size: .58rem; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.pokeworld-decor-filters small { position: absolute; top: .35rem; right: .45rem; font-size: .55rem; font-weight: 850; }
.pokeworld-path-palette {
    margin-bottom: .8rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.pokeworld-path-palette__heading h4 { margin: 0; color: var(--pw-text); font-size: .92rem; font-weight: 850; }
.pokeworld-path-palette__heading p { max-width: 760px; margin: .25rem 0 .75rem; color: var(--pw-muted); font-size: .68rem; line-height: 1.45; }
.pokeworld-pattern-groups { display: grid; justify-items: center; gap: 1.15rem; width: 100%; }
.pokeworld-pattern-group { display: grid; justify-items: center; gap: .35rem; width: 100%; }
.pokeworld-pattern-group__title { margin: 0; color: var(--pw-text); font-size: .78rem; font-weight: 850; text-align: center; }
.pokeworld-ground-palette {
    position: relative;
    width: min(100%, 270px);
    margin-inline: auto;
    aspect-ratio: 5 / 3;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    image-rendering: pixelated;
    box-shadow: none;
}
.pokeworld-ground-palette__grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 1fr); gap: .28rem; width: 100%; height: 100%; padding: .28rem; }
.pokeworld-ground-palette__cell {
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    image-rendering: pixelated;
    cursor: pointer;
    transition: box-shadow .16s ease;
}
.pokeworld-ground-palette__cell:hover,
.pokeworld-ground-palette__cell:focus-visible { z-index: 1; background-color: transparent; box-shadow: 0 0 0 2px var(--pw-accent); }
.pokeworld-ground-palette__cell:disabled { cursor: not-allowed; filter: grayscale(.8); opacity: .55; }
.pokeworld-path-palette__footer { margin: .6rem 0 0; color: var(--pw-muted); font-size: .62rem; }
.pokeworld-catalog-card--pokemon.has-shiny { border-color: rgba(225, 177, 38, .48); }
.pokeworld-catalog-card--pokemon.is-shiny-only { background: linear-gradient(135deg, rgba(245, 190, 54, .2), var(--pw-surface-solid) 58%, rgba(255, 223, 112, .1)); }
.pokeworld-catalog-card--pokemon.has-shiny .pokeworld-catalog-card__visual { border: 0; background: transparent; }
.pokeworld-catalog-card__actions .btn-outline-warning { border-color: rgba(225, 177, 38, .7); color: #8b6500; background: rgba(245, 190, 54, .12); }
html[data-bs-theme="dark"] .pokeworld-catalog-card__actions .btn-outline-warning { color: #f4cf67; }
.pokeworld-catalog-card__actions .btn-outline-warning:hover,
.pokeworld-catalog-card__actions .btn-outline-warning:focus-visible { color: #1d1705; border-color: #e1b126; background: #e9bf45; }
.pokeworld-catalog-card__availability { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.pokeworld-availability {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    width: max-content;
    padding: .18rem .4rem;
    border-radius: 999px;
    color: var(--pw-muted);
    background: color-mix(in srgb, var(--pw-muted) 9%, transparent);
    font-size: .58rem;
    line-height: 1;
}
.pokeworld-availability strong { color: var(--pw-text); }
.pokeworld-availability.is-shiny { color: #8b6500; background: rgba(245, 190, 54, .16); }
html[data-bs-theme="dark"] .pokeworld-availability.is-shiny { color: #f4cf67; }
.pokeworld-pagination { display: flex; justify-content: center; width: 100%; margin-top: .8rem; }
.pokeworld-pagination .xds-pagniation {
    display: grid;
    grid-template-columns: repeat(3, minmax(44px, 1fr));
    align-items: center;
    width: min(100%, 240px);
    gap: .25rem;
}
.pokeworld-pagination .page-item,
.pokeworld-pagination .page-link { width: 100%; min-width: 0; }
.pokeworld-pagination__count {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    padding: 0;
    color: var(--pw-muted);
    font-size: .62rem;
    font-weight: 750;
    text-align: center;
    white-space: nowrap;
}
.pokeworld-arrange-section .pokeworld-pagination { margin-top: auto; padding-top: .8rem; }

.pokeworld-resident-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.pokeworld-empty-state {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 130px;
    padding: 1.1rem;
    border: 1px dashed color-mix(in srgb, var(--pw-accent) 46%, var(--pw-border));
    border-radius: 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 10%, var(--pw-surface-solid)), var(--pw-surface-solid));
}
.pokeworld-empty-state__visual { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; color: var(--pw-page); background: var(--pw-accent); font-size: 2rem; font-weight: 300; box-shadow: 0 12px 28px color-mix(in srgb, var(--pw-accent) 28%, transparent); }
.pokeworld-empty-state h3 { margin: 0 0 .25rem; color: var(--pw-text); font-size: 1rem; font-weight: 850; }
.pokeworld-empty-state p { max-width: 44rem; margin: 0; color: var(--pw-muted); font-size: .78rem; line-height: 1.5; }
.pokeworld-empty-state__action { min-height: 42px; white-space: nowrap; }
.pokeworld-resident-card {
    width: 100%;
    padding: .75rem;
    border-radius: 14px;
    color: var(--pw-text);
    text-align: left;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.pokeworld-resident-card:hover { border-color: color-mix(in srgb, var(--pw-accent) 50%, var(--pw-border)); transform: translateY(-2px); }
.pokeworld-resident-card.is-selected { border-color: var(--pw-accent); box-shadow: 0 0 0 2px var(--pw-accent-soft), 0 12px 24px rgba(28, 75, 55, .12); }
.pokeworld-resident-card.is-good { background: linear-gradient(145deg, var(--pw-surface-solid), rgba(70, 180, 118, .09)); }
.pokeworld-resident-card.is-attention { background: linear-gradient(145deg, var(--pw-surface-solid), rgba(245, 158, 11, .1)); }
.pokeworld-resident-card.is-critical { background: linear-gradient(145deg, var(--pw-surface-solid), rgba(239, 68, 68, .1)); }
.pokeworld-resident-heading { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: .6rem; margin-bottom: .55rem; }
.pokeworld-resident-title { min-width: 0; }
.pokeworld-resident-heading img,
.pokeworld-resident-heading .pokeworld-sprite-preview { flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.pokeworld-resident-status {
    align-self: start;
    padding: .2rem .42rem;
    border-radius: 999px;
    color: #17633f;
    background: rgba(70, 180, 118, .14);
    font-size: .56rem;
    font-weight: 800;
    white-space: nowrap;
}
.pokeworld-resident-status.is-attention { color: #8a5a09; background: rgba(245, 158, 11, .16); }
.pokeworld-resident-status.is-critical { color: #a52c2c; background: rgba(239, 68, 68, .14); }
html[data-bs-theme="dark"] .pokeworld-resident-status.is-good { color: #8fe0b2; }
html[data-bs-theme="dark"] .pokeworld-resident-status.is-attention { color: #f6c96f; }
html[data-bs-theme="dark"] .pokeworld-resident-status.is-critical { color: #f69a9a; }
.pokeworld-sprite-preview { display: block; background-repeat: no-repeat; background-position: 0 0; background-size: 400% 400%; }
.pokeworld-needs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-top: .7rem; }
.pokeworld-need-gauge { --gauge-color: #62b987; display: grid; justify-items: center; gap: .3rem; min-width: 0; color: var(--pw-muted); font-size: .62rem; text-align: center; }
.pokeworld-need-gauge--hunger { --gauge-color: #d99a46; }
.pokeworld-need-gauge--energy { --gauge-color: #538ed3; }
.pokeworld-need-gauge--happiness { --gauge-color: #cf6898; }
.pokeworld-need-gauge.is-attention { --gauge-color: #e5a93f; }
.pokeworld-need-gauge.is-critical { --gauge-color: #dc6262; }
.pokeworld-need-gauge__dial { display: grid; place-items: center; width: 64px; height: 64px; padding: 6px; border-radius: 50%; background: conic-gradient(from -45deg, var(--gauge-color) var(--gauge-value), color-mix(in srgb, var(--gauge-color) 14%, transparent) 0); box-shadow: 0 6px 14px color-mix(in srgb, var(--gauge-color) 18%, transparent); }
.pokeworld-need-gauge__center { display: grid; place-items: center; width: 100%; height: 100%; border: 4px solid var(--pw-surface-solid); border-radius: 50%; background: var(--pw-surface-solid); }
.pokeworld-need-gauge__icon { color: var(--gauge-color); font-size: .9rem; font-weight: 900; line-height: 1; }
.pokeworld-need-gauge__center strong { margin-top: -.1rem; color: var(--pw-text); font-size: .8rem; line-height: 1; }
.pokeworld-need-gauge > small { overflow: hidden; color: var(--pw-muted); font-size: .6rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.pokeworld-journal li { color: var(--pw-text); background: var(--pw-accent-soft); }
.pokeworld-food-drawer { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; flex-basis: 100%; gap: .45rem; width: 100%; margin-top: .1rem; padding: .45rem 0 0; border-top: 1px solid var(--pw-border); color: var(--pw-text); background: transparent; }
.pokeworld-food-label { color: var(--pw-muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.pokeworld-food-drawer [data-food-list] { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 0; }
.pokeworld-food-choice { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 2.9rem; min-height: 2.25rem; padding: .2rem .4rem; border: 1px solid color-mix(in srgb, #4caf78 48%, var(--pw-border)); border-radius: .65rem; color: var(--pw-text); background: var(--pw-surface-solid); box-shadow: 0 3px 8px rgba(20, 45, 35, .08); transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.pokeworld-food-choice:hover, .pokeworld-food-choice:focus-visible { border-color: #267a56; background: color-mix(in srgb, #4caf78 12%, var(--pw-surface-solid)); transform: translateY(-1px); box-shadow: 0 6px 12px rgba(20, 45, 35, .13); }
.pokeworld-food-choice__icon { display: grid; place-items: center; width: 1.65rem; height: 1.65rem; overflow: hidden; border-radius: .45rem; font-size: 1.05rem; line-height: 1; }
.pokeworld-food-choice__icon img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.pokeworld-food-choice__quantity { display: inline-flex; align-items: center; justify-content: center; min-width: 1.45rem; min-height: 1.2rem; padding: .08rem .28rem; border-radius: 999px; color: #fff; background: #267a56; font-size: .68rem; font-weight: 900; line-height: 1; }
.pokeworld-nursery-header { align-items: flex-start; flex-wrap: wrap; margin-bottom: .85rem; }
.pokeworld-nursery-header > div:first-child { flex: 1 1 280px; min-width: 0; }
.pokeworld-nursery-header h2 { color: var(--pw-text); }
.pokeworld-nursery-header p:last-child { max-width: 540px; margin: .55rem 0 0; color: var(--pw-muted); font-size: .77rem; line-height: 1.55; }
.pokeworld-egg-variants { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: .65rem 1rem; width: max-content; max-width: 100%; }
.pokeworld-egg-variant { display: grid; flex: 0 0 52px; justify-items: center; gap: .35rem; min-width: 0; color: var(--pokeworld-egg-accent); }
.pokeworld-egg-variant .pokeworld-egg-sprite { width: 48px; height: 52px; transition: transform .2s ease; }
.pokeworld-egg-variant:hover .pokeworld-egg-sprite { transform: translateY(-3px); }
.pokeworld-egg-variant small { overflow: hidden; width: 100%; color: var(--pw-muted); font-size: .56rem; font-weight: 750; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.pokeworld-egg-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.pokeworld-egg-list > .text-muted { grid-column: 1 / -1; margin: 0; padding: 1rem 0; font-size: .76rem; text-align: center; }
.pokeworld-egg-card {
    --pokeworld-egg-accent: #65a76c;
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: .9rem;
    min-height: 154px;
    min-width: 0;
    overflow: hidden;
    padding: .9rem;
    border: 1px solid color-mix(in srgb, var(--pokeworld-egg-accent) 42%, var(--pw-border));
    border-radius: 16px;
    color: var(--pw-text);
    background: linear-gradient(135deg, color-mix(in srgb, var(--pokeworld-egg-accent) 11%, var(--pw-surface-solid)), var(--pw-surface-solid) 68%);
    box-shadow: 0 8px 26px rgba(16, 24, 20, .05);
}
.pokeworld-egg-card::after {
    position: absolute;
    top: -48px;
    left: -46px;
    width: 145px;
    height: 145px;
    border: 22px solid color-mix(in srgb, var(--pokeworld-egg-accent) 9%, transparent);
    border-radius: 50%;
    content: '';
    pointer-events: none;
}
.pokeworld-egg-card.is-ready { box-shadow: 0 0 0 1px color-mix(in srgb, var(--pokeworld-egg-accent) 28%, transparent), 0 12px 34px color-mix(in srgb, var(--pokeworld-egg-accent) 14%, transparent); }
.pokeworld-egg-card__visual { z-index: 1; width: 92px; height: 98px; }
.pokeworld-egg-card__copy { display: grid; align-content: center; gap: .5rem; min-width: 0; }
.pokeworld-egg-card__heading { display: grid; gap: .35rem; }
.pokeworld-egg-card__heading strong { color: var(--pw-text); font-size: .92rem; }
.pokeworld-egg-card__copy p { color: var(--pw-muted); font-size: .72rem; line-height: 1.45; }
.pokeworld-egg-card__hatch { width: 100%; }
.pokeworld-egg-progress { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; width: 100%; }
.pokeworld-egg-progress span { height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--pw-muted) 20%, transparent); }
.pokeworld-egg-progress span.is-reached { background: var(--pokeworld-egg-accent); }
.pokeworld-egg-rarity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 22px;
    padding: .2rem .55rem;
    border-radius: 999px;
    color: color-mix(in srgb, var(--pokeworld-egg-accent) 74%, var(--pw-text));
    background: color-mix(in srgb, var(--pokeworld-egg-accent) 14%, transparent);
    font-size: .6rem;
    font-weight: 850;
    text-transform: uppercase;
}
.pokeworld-egg-sprite {
    display: block;
    flex: 0 0 auto;
    background-repeat: no-repeat;
    background-position: var(--pokeworld-egg-position, 0%) center;
    background-size: 717.857% 100%;
    image-rendering: pixelated;
    filter: drop-shadow(0 10px 10px rgba(20, 32, 26, .2));
}
[data-rarity="common"] { --pokeworld-egg-accent: #65a76c; }
[data-rarity="uncommon"] { --pokeworld-egg-accent: #4d91c8; }
[data-rarity="rare"] { --pokeworld-egg-accent: #d4a739; }
[data-rarity="epic"] { --pokeworld-egg-accent: #8c67ca; }
[data-rarity="special"] { --pokeworld-egg-accent: #35aaa0; }
[data-rarity="legendary"] { --pokeworld-egg-accent: #c45145; }
[data-rarity="mythical"] { --pokeworld-egg-accent: #d56fa4; }
[data-rarity="uncommon"] .pokeworld-egg-sprite { filter: hue-rotate(82deg) saturate(1.15) drop-shadow(0 10px 10px rgba(20, 32, 26, .2)); }
[data-rarity="rare"] .pokeworld-egg-sprite { filter: hue-rotate(300deg) saturate(1.35) brightness(1.04) drop-shadow(0 10px 10px rgba(20, 32, 26, .2)); }
[data-rarity="epic"] .pokeworld-egg-sprite { filter: hue-rotate(165deg) saturate(1.25) drop-shadow(0 10px 10px rgba(20, 32, 26, .2)); }
[data-rarity="special"] .pokeworld-egg-sprite { filter: hue-rotate(48deg) saturate(1.2) drop-shadow(0 10px 10px rgba(20, 32, 26, .2)); }
[data-rarity="legendary"] .pokeworld-egg-sprite { filter: hue-rotate(250deg) saturate(1.4) drop-shadow(0 10px 10px rgba(20, 32, 26, .2)); }
[data-rarity="mythical"] .pokeworld-egg-sprite { filter: hue-rotate(215deg) saturate(1.25) brightness(1.05) drop-shadow(0 10px 10px rgba(20, 32, 26, .2)); }

.pokeworld-gift-modal { --modal-rarity-color: color-mix(in srgb, var(--pokeworld-egg-accent) 42%, transparent); --modal-sparkle-color: var(--pokeworld-egg-accent); }
.pokeworld-gift-stage { position: relative; display: grid; place-items: center; min-height: 238px; isolation: isolate; overflow: hidden; }
.pokeworld-gift-glow {
    position: absolute;
    z-index: -1;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--pokeworld-egg-accent) 38%, #fff), transparent 68%);
    filter: blur(15px);
    opacity: .7;
}
.pokeworld-gift-icon {
    width: 126px;
    height: 126px;
    border: 8px solid color-mix(in srgb, var(--pokeworld-egg-accent) 34%, #fff);
    border-radius: 34px;
    background-color: rgba(255, 255, 255, .76);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 78%;
    box-shadow: 0 18px 30px rgba(25, 31, 47, .2), inset 0 0 0 1px rgba(255, 255, 255, .72);
    image-rendering: pixelated;
    transform: rotate(-3deg);
    animation: pokeworldGiftFloat 1.8s ease-in-out infinite;
}
.pokeworld-gift-copy { display: grid; justify-items: center; gap: .45rem; color: var(--pw-text); }
.pokeworld-gift-copy p { color: var(--pw-muted); max-width: 32rem; }
.pokeworld-gift-rarity { color: var(--pokeworld-egg-accent); font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.pokeworld-gift-details { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: .2rem; }
.pokeworld-gift-details span { padding: .35rem .55rem; border: 1px solid color-mix(in srgb, var(--pokeworld-egg-accent) 24%, var(--pw-border)); border-radius: 999px; color: var(--pw-muted); font-size: .7rem; font-weight: 750; }
[data-rarity="uncommon"] .pokeworld-gift-icon { filter: hue-rotate(82deg) saturate(1.15); }
[data-rarity="rare"] .pokeworld-gift-icon { filter: hue-rotate(300deg) saturate(1.35) brightness(1.04); }
[data-rarity="epic"] .pokeworld-gift-icon { filter: hue-rotate(165deg) saturate(1.25); }
[data-rarity="special"] .pokeworld-gift-icon { filter: hue-rotate(48deg) saturate(1.2); }
[data-rarity="legendary"] .pokeworld-gift-icon { filter: hue-rotate(250deg) saturate(1.4); }
[data-rarity="mythical"] .pokeworld-gift-icon { filter: hue-rotate(215deg) saturate(1.25) brightness(1.05); }

.pokeworld-hatch-modal { --modal-rarity-color: color-mix(in srgb, var(--pokeworld-egg-accent) 42%, transparent); --modal-sparkle-color: var(--pokeworld-egg-accent); }
.pokeworld-hatch-stage { position: relative; display: grid; place-items: center; min-height: 300px; isolation: isolate; overflow: hidden; }
.pokeworld-hatch-glow {
    position: absolute;
    z-index: -1;
    width: 174px;
    height: 174px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--pokeworld-egg-accent) 34%, #fff), transparent 68%);
    filter: blur(15px);
    opacity: .58;
    transform: scale(.88);
    transition: transform .45s ease, opacity .45s ease;
}
.pokeworld-hatch-egg { width: 140px; height: 150px; transition: opacity .22s ease, transform .22s ease; }
.pokeworld-hatch-pokemon { z-index: 2; width: 190px; height: 190px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 20px 24px rgba(25, 31, 47, .3)); }
.pokeworld-hatch-copy { display: grid; justify-items: center; gap: .65rem; color: var(--pw-text); }
.pokeworld-hatch-copy p { color: var(--pw-muted); }
.pokeworld-hatch-sparkles { position: absolute; inset: 0; pointer-events: none; }
.pokeworld-hatch-sparkle { position: absolute; display: grid; place-items: center; width: 24px; height: 24px; color: var(--pokeworld-egg-accent); opacity: 0; transform: scale(.35) rotate(-16deg); }
.pokeworld-hatch-sparkle svg { display: block; width: 100%; height: 100%; }
.pokeworld-hatch-sparkle--1 { top: 16%; left: 22%; }
.pokeworld-hatch-sparkle--2 { top: 26%; right: 19%; animation-delay: .12s !important; }
.pokeworld-hatch-sparkle--3 { top: 54%; left: 15%; animation-delay: .24s !important; }
.pokeworld-hatch-sparkle--4 { top: 60%; right: 15%; animation-delay: .36s !important; }
.pokeworld-hatch-sparkle--5 { bottom: 12%; left: 31%; animation-delay: .48s !important; }
.pokeworld-hatch-sparkle--6 { right: 30%; bottom: 10%; animation-delay: .6s !important; }
.pokeworld-hatch-modal.is-hatching .pokeworld-hatch-egg { animation: pokeworldEggShake .52s ease-in-out infinite; }
.pokeworld-hatch-modal.is-hatching .pokeworld-hatch-sparkle,
.pokeworld-hatch-modal.is-revealed .pokeworld-hatch-sparkle { animation: pokeworldEggSparkle 1.15s ease-in-out infinite; }
.pokeworld-hatch-modal.is-preview .pokeworld-hatch-glow,
.pokeworld-hatch-modal.is-preview .pokeworld-hatch-sparkles { opacity: 0; animation: none; }
.pokeworld-hatch-modal.is-preview .pokeworld-hatch-egg { animation: none; }
.pokeworld-hatch-modal.is-revealed .pokeworld-hatch-glow { opacity: 1; transform: scale(1.18); }
.pokeworld-hatch-modal.is-revealed .pokeworld-hatch-pokemon { animation: pokeworldPokemonReveal .58s cubic-bezier(.2, .85, .28, 1.2) both; }
.pokeworld-hatch-stage::after {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: min(250px, 76%);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .82) 0%, rgba(255, 255, 255, .42) 34%, rgba(255, 255, 255, 0) 72%);
    content: '';
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(.55);
}
.pokeworld-hatch-stage.is-flashing::after { animation: pokeworldHatchFlash .58s ease-out both; }
.pokeworld-hatch-modal.is-hatch-error .pokeworld-hatch-egg { animation: none; }

@keyframes pokeworldEggShake {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-5px) rotate(-2deg); }
    75% { transform: translateX(5px) rotate(2deg); }
}
@keyframes pokeworldEggSparkle {
    0%, 100% { opacity: 0; transform: scale(.35) rotate(-16deg); }
    45% { opacity: 1; transform: scale(1.12) rotate(8deg); }
}
@keyframes pokeworldPokemonReveal {
    from { opacity: 0; transform: translateY(18px) scale(.55); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pokeworldHatchFlash {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.45); }
    35% { opacity: .88; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.14); }
}
@keyframes pokeworldGiftFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}
.pokeworld-journal { display: grid; gap: .55rem; margin: 0; padding-left: 1.1rem; }
.pokeworld-journal li { padding: .5rem .65rem; border-radius: 9px; font-size: .78rem; }
.pokeworld-settings-activity { margin-top: 1rem; border-top: 1px solid var(--pw-border); }
.pokeworld-settings-activity summary { padding: .85rem 0; cursor: pointer; color: var(--pw-text); font-size: .76rem; font-weight: 850; }

@media (max-width: 1199.98px) {
    .pokeworld-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .pokeworld-workspace { width: calc(100% - 1.25rem); }
    .pokeworld-tools-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pokeworld-canvas-shell { height: clamp(540px, 68svh, 720px); }
    .pokeworld-resident-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pokeworld-egg-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .pokeworld-egg-variants { width: min(100%, calc(208px + 3rem)); margin-inline: auto; column-gap: 1rem; }
    .pokeworld-tools-collapse { display: none; }
    .pokeworld-tools.is-collapsed .pokeworld-tools-body { display: none; }
    .pokeworld-arrange-nav { display: grid; }
    .pokeworld-arrange-grid { grid-template-columns: 1fr; }
    .pokeworld-search-row { grid-template-columns: 1fr; }
    .pokeworld-search-row [data-load-pokemon],
    .pokeworld-search-row [data-load-trainers] { display: none; }
    .pokeworld-decor-filters { position: sticky; bottom: .5rem; z-index: 4; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .35rem; padding: .35rem; border: 1px solid var(--pw-border); border-radius: 14px; background: color-mix(in srgb, var(--pw-surface-solid) 94%, transparent); box-shadow: 0 12px 30px rgba(0, 0, 0, .18); }
    .pokeworld-decor-filters button { min-height: 44px; border: 0; }
    .pokeworld-decor-filters strong { display: none; }
    .pokeworld-decor-filters button > span,
    .pokeworld-decor-filters button > span .icon { width: 24px; height: 24px; }
    .pokeworld-decor-filters button > span { flex-basis: 24px; }
    .pokeworld-decor-filters svg { width: 24px !important; height: 24px !important; }
    .pokeworld-arrange-section + .pokeworld-arrange-section { padding-left: 0; border-left: 0; }
    .pokeworld-arrange-section[hidden] { display: none; }
}

@media (max-width: 575.98px) {
    .pokeworld-egg-list { grid-template-columns: 1fr; }
    .pokeworld-egg-card { min-height: 142px; }
}

@media (max-width: 575.98px) {
    .pokeworld-page { padding-bottom: 3rem; }
    #pokeworld-page #header-page.pokeworld-header { min-height: clamp(300px, 42svh, 350px); margin: .5rem !important; padding: 3.25rem .85rem 1.35rem; }
    .pokeworld-header > .row { --bs-gutter-x: .5rem; }
    .pokeworld-header h1 { font-size: clamp(1.85rem, 10vw, 2.65rem); letter-spacing: -.035em; }
    .pokeworld-header .lead { font-size: .95rem; }
    .pokeworld-header .pokedex-view-switcher__link { gap: .22rem; padding: .5rem .25rem; font-size: .68rem; }
    .pokeworld-header .pokedex-view-switcher__link.is-active { flex-grow: 1.15; }
    .pokeworld-workspace { gap: .75rem; width: calc(100% - 1rem); }
    .pokeworld-content-header { flex-direction: column; align-items: flex-start; min-height: 0; padding: .35rem .15rem; }
    .pokeworld-content-actions { justify-content: flex-start; width: 100%; }
    .pokeworld-canvas-controls { top: .65rem; right: auto; left: .65rem; width: max-content; max-width: calc(100% - 1.3rem); justify-content: flex-start; padding: .28rem; transform: none; }
    .pokeworld-canvas-control { position: relative; display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; padding: 0; line-height: 0; }
    .pokeworld-canvas-control--wide { width: 30px; min-width: 30px; padding: 0; font-size: .54rem; }
    .pokeworld-canvas-control > .icon { position: absolute; top: 50%; left: 50%; margin: 0 !important; transform: translate(-50%, -50%); }
    .pokeworld-canvas-zoom-value { flex: 0 0 36px; min-width: 36px; }
    .pokeworld-canvas-brightness { flex: 0 0 auto; justify-content: flex-start; gap: .25rem; margin: 0 0 0 .1rem; padding: 0 0 0 .4rem; border-top: 0; border-left: 1px solid rgba(255,255,255,.18); }
    .pokeworld-canvas-brightness__label > span { display: none; }
    .pokeworld-canvas-brightness input { flex: 0 0 72px; width: 72px; max-width: 72px; height: 30px; }
    .pokeworld-canvas-brightness output { display: none; }
    .pokeworld-canvas-hint { right: .65rem; left: .65rem; width: auto; max-width: none; white-space: normal; transform: none; }
    .pokeworld-canvas-shell > .pokeworld-selection { right: .5rem; bottom: .5rem; width: calc(100% - 1rem); max-height: 58%; padding: .6rem; }
    .pokeworld-panel { padding: 1rem; }
    .pokeworld-tools-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: .5rem;
        top: 4.1rem;
    }
    .pokeworld-tools-nav button { min-height: 40px; }
    .pokeworld-settings-grid { grid-template-columns: 1fr; }
    .pokeworld-resident-list,
    .pokeworld-arrange-section [data-pokemon-catalog] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .pokeworld-catalog,
    [data-object-catalog],
    [data-trainer-catalog] { grid-template-columns: 1fr; }
    .pokeworld-management-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pokeworld-search-row { grid-template-columns: 1fr; }
    .pokeworld-catalog-card--pokemon { grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: 40px auto; gap: .4rem; min-height: 104px; padding: .5rem; }
    .pokeworld-catalog-card--pokemon .pokeworld-catalog-card__visual,
    .pokeworld-catalog-card--pokemon img,
    .pokeworld-catalog-card--pokemon .pokeworld-sprite-preview { width: 40px; height: 40px; }
    .pokeworld-catalog-card--pokemon .pokeworld-catalog-card__content { min-width: 0; }
    .pokeworld-catalog-card--pokemon .pokeworld-catalog-card__name { font-size: .7rem; }
    .pokeworld-catalog-card--pokemon .pokeworld-catalog-card__actions { grid-column: 1 / -1; grid-template-columns: 1fr; width: 100%; }
    .pokeworld-arrange-section .pokeworld-catalog-card--pokemon .btn { min-height: 34px; height: 34px; padding: .35rem .2rem; font-size: .57rem; white-space: normal; }
    .pokeworld-resident-card { padding: .5rem; }
    .pokeworld-empty-state { grid-template-columns: auto minmax(0, 1fr); padding: .85rem; }
    .pokeworld-empty-state__visual { width: 48px; height: 48px; border-radius: 14px; font-size: 1.5rem; }
    .pokeworld-empty-state__action { grid-column: 1 / -1; width: 100%; }
    .pokeworld-resident-heading { grid-template-columns: 36px minmax(0, 1fr); gap: .35rem; margin-bottom: .4rem; }
    .pokeworld-resident-heading img,
    .pokeworld-resident-heading .pokeworld-sprite-preview { width: 36px; height: 36px; }
    .pokeworld-resident-title,
    .pokeworld-resident-heading > div { min-width: 0; }
    .pokeworld-resident-heading strong { display: block; overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
    .pokeworld-resident-heading small { overflow: hidden; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
    .pokeworld-resident-status { grid-column: 1 / -1; justify-self: start; padding: .17rem .32rem; font-size: .5rem; }
    .pokeworld-needs-grid { gap: .2rem; }
    .pokeworld-need-gauge__dial { width: 44px; height: 44px; }
    .pokeworld-need-gauge__center { border-width: 3px; }
    .pokeworld-selection-panel { grid-template-columns: 1fr; gap: .55rem; }
    .pokeworld-selection-note { grid-column: 1; }
    .pokeworld-selection-actions { grid-column: 1; grid-row: auto; width: 100%; align-items: stretch; justify-content: stretch; margin-top: .55rem; padding-top: .7rem; border-top: 1px solid color-mix(in srgb, var(--pw-accent) 16%, var(--pw-border)); }
    .pokeworld-selection-actions .pokeworld-action-button { flex: 1 1 calc(50% - .4rem); }
}

@media (prefers-reduced-motion: reduce) {
    .pokeworld-tools-nav button { transition: none; }
    .pokeworld-weather-overlay,
    .pokeworld-weather-overlay::before,
    .pokeworld-weather-overlay::after { animation: none !important; }
    .pokeworld-weather-cloud-shadow { display: none !important; animation: none !important; }
    .pokeworld-weather-particle { display: none !important; animation: none !important; }
    .pokeworld-hatch-modal.is-hatching .pokeworld-hatch-egg,
    .pokeworld-hatch-modal.is-hatching .pokeworld-hatch-sparkle,
    .pokeworld-hatch-modal.is-revealed .pokeworld-hatch-sparkle,
    .pokeworld-hatch-modal.is-revealed .pokeworld-hatch-pokemon,
    .pokeworld-hatch-stage.is-flashing::after { animation-duration: .01ms; animation-iteration-count: 1; }
    .pokeworld-gift-icon { animation-duration: .01ms; animation-iteration-count: 1; }
}

.pokeworld-catalog-card img.is-missing,
.pokeworld-sprite-preview.is-missing {
    border: 1px dashed color-mix(in srgb, var(--pw-accent) 45%, var(--pw-border));
    background: repeating-linear-gradient(135deg, rgba(255,255,255,.75) 0 8px, color-mix(in srgb, var(--pw-accent) 10%, white) 8px 16px);
    color: var(--pw-text-muted);
    object-fit: contain;
}
