#gateway-layers { max-width: min(96vw, 935px); flex-wrap: wrap; justify-content: center; }
#gateway-layers .map-layer-buttons { flex-wrap: wrap; justify-content: center; }
.gateway-layer-menu { position: relative; }
.gateway-layer-menu summary { cursor: pointer; list-style: none; }
.gateway-layer-menu summary::-webkit-details-marker { display: none; }
.gateway-layer-menu[open] summary, #gateway-layers [aria-pressed="true"] {
    color: #ffe4a0;
    background: #654d24;
    border-color: #cba858;
}
.gateway-layer-options {
    position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
    width: min(375px, 88vw); padding: 11px; background: #131210; color: #eee2cc;
    border: 1px solid #b2924b; border-radius: 10px; box-shadow: 0 14px 35px #0009;
}
.gateway-layer-options p { margin: 8px 0 0; font-size: .78rem; line-height: 1.4; }
.gateway-layer-options a { color: #eecb7d; text-decoration: underline; }
.gateway-layer-options select { margin: 7px 0 0; background: #25211b; color: #fff1d0; border-radius: 6px; padding: 5px 8px; }
.gateway-pvp-view { display: inline-flex; align-items: center; gap: 5px; margin: 0 5px; font-size: .8rem; white-space: nowrap; }
.gateway-pvp-view input { accent-color: #e9bb5c; }
#gateway-pvp-status, #gateway-heat-note { font-size: .75rem; color: #f0d8a1; }
#gateway-pvp-status:empty { display: none; }
.gateway-layer-options [hidden], .gateway-map-layer[hidden] { display: none; }
.gateway-map-layer { position: absolute; inset: 0; pointer-events: none; }
#gateway-heat { width: 100%; height: 100%; }
.gateway-resource-pin, .gateway-pvp-marker { position: absolute; transform: translate(-50%, -50%) scale(var(--gateway-inverse, 1)); }
.gateway-resource-pin {
    width: 17px; height: 17px; display: grid; place-content: center;
    background: #13191e; color: var(--gateway-pin); border: 1px solid currentColor;
    border-radius: 50%; box-shadow: 0 1px 4px #000; font-size: 9px; pointer-events: auto;
    padding: 0; cursor: help;
}
.gateway-resource-pin:is(:hover,:focus) { z-index: 2; outline: 1px solid white; }
.gateway-resource-tooltip {
    display: none; position: absolute; width: max-content; max-width: 180px; bottom: calc(100% + 5px); left: 50%;
    transform: translateX(-50%); background: #12100e; color: #fff4dc; border: 1px solid #947338;
    border-radius: 5px; padding: 5px 8px; font: 600 11px/1.35 Arial,sans-serif;
}
.gateway-resource-pin:is(:hover,:focus) .gateway-resource-tooltip { display: block; }
#gateway-layer-water { --gateway-pin: #7ee1ff; z-index: 3; }
#gateway-layer-salt { --gateway-pin: #ece9d8; z-index: 4; }
#gateway-layer-animals { --gateway-pin: #efc574; z-index: 5; }
#gateway-pvp-markers { z-index: 6; }
.gateway-pvp-marker {
    background: #742526; color: #fff4dc; border: 1px solid #ffa89e;
    border-radius: 8px; font: 800 10px/1.15 Arial,sans-serif; padding: 3px 5px;
    box-shadow: 0 0 10px #ff4a4a9e;
}
#gateway-pvp-consent {
    color: #f7ebd0; background: #181510; border: 1px solid #b2924b; border-radius: 12px;
    padding: 20px; width: min(440px, 90vw); line-height: 1.5;
}
#gateway-pvp-consent::backdrop { background: #000a; }
#gateway-pvp-consent h2 { margin: 0 0 10px; font-size: 1.2rem; font-weight: 800; }
#gateway-pvp-consent form { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 760px) {
    .gateway-layer-options { top: calc(100% + 8px); bottom: auto; }
}
#gateway-layers:has(.gateway-layer-menu[open]) { z-index: 46; }
.gateway-layer-options { max-height: min(55dvh, 310px); overflow-y: auto; }
#gateway-layers {
    position: absolute; left: auto; right: 16px; bottom: auto;
    top: var(--gateway-panel-top, 148px); padding: 0; transform: none;
    width: min(315px, calc(100% - 32px)); max-width: none; display: block;
    background: none; border: 0; box-shadow: none; backdrop-filter: none;
}
#gateway-layers details { width: 100%; display: grid; justify-items: end; }
#gateway-layers summary {
    width: max-content; max-width: 100%; min-height: 48px; display: flex; align-items: center; gap: 9px;
    padding: 10px 16px; color: #f6e3b4; background: #1d1912; border: 1px solid #ab8b43;
    border-radius: 10px; font-size: .95rem; font-weight: 800; box-shadow: 0 8px 24px #0008;
}
#gateway-layers summary:focus-visible, #gateway-layers button:focus-visible, #gateway-layers select:focus-visible {
    outline: 2px solid #f6d079; outline-offset: 2px;
}
#gateway-layers details[open] > summary .fa-chevron-down { transform: rotate(180deg); }
#gateway-active-pvp { display: none; color: #ffb4a8; }
#gateway-panel-summary.is-sharing #gateway-active-pvp { display: inline; }
#gateway-layers .gateway-layer-options {
    position: static; transform: none; margin-top: 8px; width: 100%;
    padding: 12px; max-height: var(--gateway-panel-height, 55dvh);
    background: #12110ff7;
}
#gateway-layers .gateway-layer-heading {
    margin: 0 0 7px; font: 750 .86rem/1.25 system-ui,sans-serif; color: #fff0ce;
}
#gateway-layers .gateway-layer-heading:not(:first-child) { margin-top: 14px; }
#gateway-layers .map-layer-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
#gateway-layers .map-control-btn {
    display: inline-flex; width: 100%; align-items: center; justify-content: flex-start;
    gap: 7px; min-height: 44px; height: auto; padding: 8px 10px; border-radius: 7px;
    color: #e9e0d0; font: 650 .86rem/1.2 system-ui,sans-serif; text-transform: none; letter-spacing: 0;
    white-space: normal; background: #24211b; border: 1px solid #faf2d428;
}
#gateway-layers .map-control-btn:hover { background: #373023; }
#gateway-layers .map-control-btn[aria-pressed=true] {
    color: #fff0c3; background: #504020; border-color: #bc9953;
}
#gateway-layers .gateway-pvp-view { margin: 0 0 7px; }
#gateway-layers a.map-control-btn { text-decoration: none; }
.gateway-species-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.gateway-species-row select { margin: 0; max-width: 155px; }
#gateway-species-preview:empty { display: none; }
#gateway-species-preview img { display: block; width: 34px; height: 30px; object-fit: cover; border-radius: 5px; }
.gateway-animal-pin {
    width: 24px; height: 24px; border-color: #ffe0a7; background: #f2e6cc; padding: 0;
}
.gateway-animal-pin img, .map-stage .gateway-animal-pin img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: 50%; pointer-events: none;
}
#mini .gateway-animal-pin { width: 17px; height: 17px; transform: translate(-50%, -50%); }
#mini-animals { z-index: 2; }
#mini-animals-options { color: #e7d4ab; padding: 3px 0; min-width: 0; }
#mini-animals-options select { width: 100%; background: #1c1912; color: #f4e4bc; padding: 3px; }
#mini-animals-status { display: block; margin-top: 2px; font-size: 9px; }
@media (max-width: 520px) {
    .map-fullscreen-page:not(.map-overlay) #gateway-layers {
        top: var(--gateway-panel-top, 234px) !important; right: 10px; left: auto;
        width: min(300px, calc(100% - 20px));
    }
}
#mini-animals-options[hidden] { display: none; }

/* 0.18.15: zonas de aparición de fauna como puntos del color del animal, algo más grandes que la IA */
.gateway-animal-pin.gateway-wild-dot { width:24px; height:24px; background:color-mix(in srgb, var(--wild,#efc574) 26%, transparent); border:2px solid var(--wild,#efc574); box-shadow:0 0 0 1px #000a, 0 0 8px var(--wild,#efc574); }
.gateway-animal-pin.gateway-wild-dot img { display:none; }
#mini .gateway-animal-pin.gateway-wild-dot { width:20px; height:20px; }
