/* Extracted from web_server.py — entity settings modal */
/* Entity settings modal (world / server pack) */
.entity-settings-root {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: none;
    /* block so children can be viewport-positioned independently */
    padding: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.entity-settings-root.is-open { display: block; }
/*
 * Settings stage
 * World: centered main panel only.
 * Server: LEFT = properties cluster (props + connected offshoots + global save/revert)
 *         RIGHT = pack title / rename / danger panel.
 */
.entity-settings-stage {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    overflow: auto;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(0.75rem, env(safe-area-inset-top, 0px))
             max(0.85rem, env(safe-area-inset-right, 0px))
             max(0.75rem, env(safe-area-inset-bottom, 0px))
             max(0.85rem, env(safe-area-inset-left, 0px));
    gap: 1rem;
}
.entity-settings-panel,
.entity-props-panel,
.entity-float-panel {
    pointer-events: auto;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-radius: 1.15rem;
    border: 1px solid rgba(125, 211, 252, 0.32);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.99), rgba(2, 6, 23, 0.99));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    padding: 1.15rem 1.2rem 1rem;
    color: #e2e8f0;
    position: relative;
    margin: 0;
    z-index: 2;
}
.entity-settings-panel {
    width: min(28rem, calc(100vw - 2rem));
    max-height: min(88vh, 44rem);
}
.entity-props-panel h3,
.entity-float-panel h3 {
    font-size: 1.02rem;
    font-weight: 750;
    color: #f8fafc;
    margin: 0 1.75rem 0.3rem 0;
}
.entity-props-panel .es-props,
.entity-float-panel .es-props {
    grid-template-columns: 1fr;
}
/* ---- Left cluster: narrow props + offshoots (MOTD beside knobs, no scroll) ---- */
.entity-props-cluster {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    flex: 0 0 auto;
    width: auto;
    max-width: min(42rem, calc(100vw - 18rem));
    /* Reach further down the viewport */
    max-height: min(96vh, 56rem);
    align-self: stretch;
}
.entity-settings-root.is-server-layout .entity-props-cluster {
    display: flex;
}
.entity-settings-root.is-server-layout .entity-settings-stage {
    align-items: stretch;
    justify-content: space-between;
    /* Left column has Save/Revert bar above props; nudge mid/right to match props top */
    --es-server-right-nudge: 2.75rem;
}
/* Top bar: Save / Revert top-right, no help blurb */
.entity-props-cluster-bar {
    display: none;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    padding: 0.35rem 0;
    background: transparent;
    border: none;
    box-shadow: none;
    order: -1;
}
.entity-settings-root.is-server-layout .entity-props-cluster-bar {
    display: flex;
}
.entity-props-cluster-bar .es-msg {
    margin: 0;
    margin-right: auto;
    font-size: 0.75rem;
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
}
.entity-props-cluster-bar .es-btn {
    flex: 0 0 auto;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
}
.entity-props-cluster-bar .es-btn.primary {
    background: linear-gradient(180deg, #0ea5e9, #0284c7);
    border-color: rgba(56, 189, 248, 0.55);
    color: #f0f9ff;
    font-weight: 700;
}
.entity-props-cluster-bar .es-btn.ghost {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}
.entity-props-cluster-bar .es-btn:disabled,
.entity-props-cluster-bar .es-btn.is-disabled {
    opacity: 0.42;
    cursor: not-allowed;
    filter: grayscale(0.4);
    pointer-events: none;
}
.entity-props-cluster-bar .es-btn.primary:disabled,
.entity-props-cluster-bar .es-btn.primary.is-disabled {
    background: linear-gradient(180deg, #475569, #334155);
    border-color: rgba(100, 116, 139, 0.45);
    color: rgba(226, 232, 240, 0.65);
}
.entity-props-cluster-body {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
    flex: 1 1 auto;
    gap: 0;
    /* Let properties run most of the viewport height */
    max-height: min(92vh, 52rem);
    min-height: min(78vh, 44rem);
}
/* Properties list — ~20% wider than previous 13.25rem, tall column */
.entity-props-panel {
    display: none;
    flex: 0 0 15.9rem;
    width: 15.9rem;
    max-width: 15.9rem;
    min-width: 14rem;
    max-height: none;
    height: auto;
    align-self: stretch;
    padding: 0.85rem 0.8rem 0.75rem;
    border-color: rgba(148, 163, 184, 0.3);
    border-radius: 1.05rem 0 0 1.05rem;
    border-right: 1px solid rgba(125, 211, 252, 0.22);
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 0, 0, 0.22);
}
.entity-props-panel.is-open { display: block; }
.entity-props-panel h3 { font-size: 0.95rem; margin-right: 1.4rem; }
.entity-props-panel .es-sub { font-size: 0.72rem; }
.entity-props-panel .es-bubble {
    padding: 0.55rem 0.6rem;
    /* Use remaining height inside the tall panel */
    max-height: calc(100% - 3.2rem);
    overflow-y: auto;
}
.entity-props-panel .es-props label { font-size: 0.65rem; }
.entity-props-panel .es-props input {
    padding: 0.35rem 0.45rem;
    font-size: 0.78rem;
}
/* Bot Bender: full properties list is view-only */
.entity-props-panel .es-props-readonly input:disabled,
.es-props-readonly input:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    color: rgba(226, 232, 240, 0.75);
    background: rgba(15, 23, 42, 0.55);
}
/*
 * Offshoot rail: hug content (no stretch gap under knobs).
 * MOTD sits directly under the compact controls.
 */
.entity-props-offshoots {
    display: none;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas:
        "head head"
        "diff players"
        "dist dist"
        "motd motd"
        "motdpreview motdpreview";
    gap: 0.3rem;
    flex: 0 0 auto;
    align-self: flex-start; /* critical: don't stretch empty rail to props height */
    width: min(17.5rem, 36vw);
    min-width: 15.5rem;
    height: fit-content;
    max-height: none;
    padding: 0.55rem 0.35rem 0.35rem 0.4rem;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(8, 47, 73, 0.35), rgba(2, 6, 23, 0.55));
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-left: none;
    border-radius: 0 1.05rem 1.05rem 0;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
    overflow: visible;
}
.entity-settings-root.is-server-layout .entity-props-offshoots {
    display: grid;
}
/* Section title — same role as "Properties" on the left panel */
.entity-offshoots-head {
    grid-area: head;
    padding: 0 0.2rem 0.15rem;
    margin: 0;
    min-width: 0;
}
.entity-offshoots-head h3 {
    display: block;
    font-size: 0.95rem;
    font-weight: 750;
    color: #f8fafc;
    margin: 0;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.25;
}
.entity-float-panel {
    display: none;
    width: 100%;
    max-height: none;
    height: auto;
    border-radius: 0.5rem;
    border-color: rgba(125, 211, 252, 0.26);
    padding: 0.35rem 0.4rem 0.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
    overflow: visible;
}
.entity-float-panel.is-open { display: block; }
.entity-float-panel .entity-settings-close { display: none; }
/* No h3 / subtitle chrome on knob cards — label on the field is enough */
.entity-float-panel h3,
.entity-float-panel > .es-sub { display: none; }
.entity-float-panel .es-props { margin: 0; gap: 0.25rem; }
.entity-float-panel .es-props label {
    font-size: 0.6rem;
    gap: 0.14rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(186, 230, 253, 0.72);
}
.entity-float-panel .es-props input,
.entity-float-panel .es-props select {
    padding: 0.26rem 0.32rem;
    font-size: 0.75rem;
}
/* Hide number-input spinner arrows (Chrome/Edge/Safari/Firefox) */
.entity-props-cluster input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
.entity-props-cluster input[type="number"]::-webkit-outer-spin-button,
.entity-props-cluster input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Distances: stack full names */
#entity-quick-dist-panel .es-props {
    grid-template-columns: 1fr;
    gap: 0.28rem;
}
/* Max players top-left, difficulty top-right */
#entity-quick-diff-panel { grid-area: players; }
#entity-quick-players-panel { grid-area: diff; }
#entity-quick-dist-panel { grid-area: dist; }
#entity-quick-motd-panel {
    grid-area: motd;
    display: none;
    overflow: visible;
    padding: 0.4rem 0.45rem 0.4rem;
    margin: 0;
}
#entity-quick-motd-panel.is-open { display: block; }
#entity-quick-motd-panel h3 {
    display: block;
    font-size: 0.78rem;
    margin: 0 0 0.2rem;
    text-transform: none;
    letter-spacing: 0;
}
#entity-quick-motd-panel .es-motd-tools { gap: 0.22rem; margin-top: 0.1rem !important; }
#entity-quick-motd-panel .es-motd-swatches { gap: 0.18rem; }
#entity-quick-motd-panel .es-motd-swatch {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 0.18rem;
}
#entity-quick-motd-panel .es-motd-fmt { gap: 0.18rem; flex-wrap: wrap; }
#entity-quick-motd-panel .es-motd-fmt .es-btn {
    padding: 0.14rem 0.28rem;
    font-size: 0.64rem;
    min-height: 0;
}
#entity-quick-motd-panel .es-motd-input {
    min-height: 3.6rem;
    max-height: 7rem;
    height: 4.5rem;
    font-size: 0.76rem;
    padding: 0.35rem 0.4rem;
    margin-top: 0.25rem;
    resize: vertical;
}
/* Pack icon + MOTD bubble: under MOTD creator (grid), not under pack config */
#entity-props-offshoots > #entity-pack-preview-panel {
    grid-area: motdpreview;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0.55rem 0.6rem 0.6rem;
    border-radius: 0.5rem;
    box-sizing: border-box;
}
.entity-settings-root.is-server-layout #entity-props-offshoots > #entity-pack-preview-panel.is-open {
    display: block;
}
#entity-props-offshoots .es-pack-preview-row {
    gap: 0.55rem;
}
#entity-props-offshoots .es-pack-preview-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.55rem;
}
#entity-props-offshoots .es-pack-preview-motd {
    min-height: 2.2rem;
    max-height: 5.5rem;
    overflow: auto;
    font-size: 0.95rem;
    line-height: 1.4;
}
/* Mid column: datapacks library (to the left of pack config) */
.entity-settings-datapacks-col {
    display: none;
    flex-direction: column;
    gap: 0.65rem;
    flex: 0 0 min(18rem, 22vw);
    width: min(18rem, 22vw);
    max-width: 20rem;
    align-self: flex-start;
    position: sticky;
    top: 0.5rem;
    min-width: 0;
    margin-left: auto;
}
.entity-settings-root.is-server-layout .entity-settings-datapacks-col {
    display: flex;
    /* Align with left props bubbles (below Save/Revert bar), not stage top */
    margin-top: var(--es-server-right-nudge, 2.75rem);
    top: calc(0.5rem + var(--es-server-right-nudge, 2.75rem));
}
.entity-datapacks-panel {
    width: 100%;
    max-width: none;
    max-height: min(70vh, 36rem);
    margin-left: 0;
    align-self: stretch;
    position: relative;
    top: auto;
}
.entity-datapacks-panel h3 {
    font-size: 1.02rem;
    font-weight: 750;
    color: #f8fafc;
    margin: 0 0 0.3rem 0;
}
.entity-datapacks-panel h3.dp-heading {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
/* Right column: pack config card, then Statistics as own card under it */
.entity-settings-right-col {
    display: none;
    flex-direction: column;
    gap: 0.95rem;
    flex: 0 0 min(24rem, 30vw);
    width: min(24rem, 30vw);
    max-width: 26rem;
    margin-left: 0;
    align-self: flex-start;
    position: sticky;
    top: 0.5rem;
    min-width: 0;
}
.entity-settings-root.is-server-layout .entity-settings-right-col {
    display: flex;
    /* Same vertical start as datapacks + left props bubbles */
    margin-top: var(--es-server-right-nudge, 2.75rem);
    top: calc(0.5rem + var(--es-server-right-nudge, 2.75rem));
}
/* World mode: right col not used; main panel is direct child and centered */
/* World settings: single bubble dead-center in the modal */
.entity-settings-root:not(.is-server-layout) .entity-settings-stage {
    align-items: center;
    justify-content: center;
}
.entity-settings-root:not(.is-server-layout) .entity-settings-right-col {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    width: min(28rem, calc(100vw - 2rem));
    max-width: none;
    flex: 0 0 auto;
    position: relative;
    top: auto;
    align-self: center;
    /* Do not inherit sticky/top from server-layout right-col */
    position: relative;
}
.entity-settings-root:not(.is-server-layout) .entity-settings-right-col > .entity-settings-panel {
    width: 100%;
    max-width: min(28rem, calc(100vw - 2rem));
    max-height: min(88vh, 44rem);
    margin: 0 auto;
    align-self: center;
}
.entity-settings-root:not(.is-server-layout) .entity-pack-stats-panel {
    display: none !important;
}
.entity-settings-root.is-server-layout .entity-settings-panel {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    max-height: min(50vh, 28rem);
    margin-left: 0;
    align-self: stretch;
    position: relative;
    top: auto;
}
/* Statistics: own card under pack config — never inside rename/delete */
.entity-pack-stats-panel {
    display: none;
    max-height: min(50vh, 28rem);
    margin-top: 0;
    border-color: rgba(148, 163, 184, 0.28);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
    flex: 0 0 auto;
}
.entity-settings-root.is-server-layout .entity-pack-stats-panel.is-open {
    display: block;
}
/* Pack config card only: do not stretch to swallow stats */
.entity-settings-root.is-server-layout .entity-settings-right-col > .entity-settings-panel:not(.entity-pack-stats-panel) {
    flex: 0 0 auto;
    max-height: min(42vh, 22rem);
}
.entity-pack-stats-panel h3 {
    font-size: 1.02rem;
    font-weight: 750;
    color: #f8fafc;
    margin: 0 0 0.25rem 0;
}
.entity-pack-preview-panel {
    display: none;
    flex: 0 0 auto;
    width: 100%;
    max-height: min(42vh, 22rem);
    border-radius: 1.15rem;
    border: 1px solid rgba(125, 211, 252, 0.3);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.99), rgba(2, 6, 23, 0.99));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    padding: 0.9rem 1rem 0.95rem;
    box-sizing: border-box;
    overflow: hidden;
}
/* Pack preview under right-col is unused; under-MOTD placement uses offshoots selector */
.entity-settings-right-col .entity-pack-preview-panel {
    display: none !important;
}
.es-pack-preview-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.es-pack-preview-row.es-pack-preview-icon-only {
    align-items: center;
}
.es-pack-preview-icon {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 0.75rem;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    background: rgba(2, 6, 23, 0.85);
    image-rendering: pixelated;
}
.es-pack-preview-motd-wrap {
    flex: 1 1 auto;
    min-width: 0;
}
.es-pack-preview-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(186, 230, 253, 0.65);
    margin: 0 0 0.35rem;
}
.es-pack-preview-motd {
    font-family: 'Minecraft', ui-monospace, monospace;
    font-size: 0.95rem;
    line-height: 1.35;
    color: #aaaaaa;
    word-break: break-word;
    min-height: 2.4rem;
    padding: 0.55rem 0.6rem;
    border-radius: 0.55rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.es-pack-preview-motd .m-bold { font-weight: 700; }
.es-pack-preview-motd .m-italic { font-style: italic; }
.es-pack-preview-motd .m-under { text-decoration: underline; }
.es-pack-preview-motd .m-strike { text-decoration: line-through; }
.es-pack-preview-empty {
    color: rgba(148, 163, 184, 0.55);
    font-family: 'Minecraft', ui-monospace, monospace;
    font-size: 0.85rem;
}
.entity-settings-panel::-webkit-scrollbar,
.entity-props-panel::-webkit-scrollbar,
.entity-float-panel::-webkit-scrollbar { width: 0; height: 0; display: none; }
@media (max-width: 1100px) {
    .entity-settings-root.is-server-layout .entity-settings-stage {
        flex-wrap: wrap;
        align-content: flex-start;
    }
    .entity-props-cluster {
        max-width: 100%;
    }
    .entity-settings-root.is-server-layout .entity-settings-datapacks-col {
        flex: 1 1 auto;
        width: min(100%, 22rem);
        max-width: none;
        margin-left: 0;
        margin-top: 0; /* stacked: no need to clear Save bar */
        align-self: center;
        position: relative;
        top: auto;
    }
    .entity-settings-root.is-server-layout .entity-settings-right-col {
        flex: 1 1 100%;
        width: min(100%, 28rem);
        max-width: none;
        margin-left: 0;
        margin-top: 0;
        align-self: center;
        position: relative;
        top: auto;
    }
}
@media (max-width: 720px) {
    .entity-props-cluster-body {
        flex-direction: column;
        max-height: none;
    }
    .entity-props-panel {
        flex: none;
        width: 100%;
        max-width: none;
        border-radius: 1.05rem 1.05rem 0 0;
        border-right: 1px solid rgba(148, 163, 184, 0.3);
        border-bottom: none;
    }
    .entity-props-offshoots {
        width: 100%;
        min-width: 0;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "head head"
            "diff players"
            "dist dist"
            "motd motd"
            "motdpreview motdpreview";
        border-left: 1px solid rgba(125, 211, 252, 0.28);
        border-top: none;
        border-radius: 0 0 1.05rem 1.05rem;
    }
    .entity-settings-panel,
    .entity-settings-right-col,
    .entity-props-cluster {
        width: min(100%, 28rem);
        max-width: 100%;
    }
}
.entity-settings-panel h3 {
    font-size: 1.2rem;
    font-weight: 750;
    color: #f8fafc;
    margin: 0 1.75rem 0.2rem 0;
    line-height: 1.3;
}
.entity-settings-close {
    position: absolute;
    top: 0.7rem;
    right: 0.8rem;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: rgba(226, 232, 240, 0.8);
    font-size: 1.15rem;
    cursor: pointer;
    line-height: 1;
    display: grid;
    place-items: center;
}
.entity-settings-close:hover {
    color: #fff;
    background: rgba(51, 65, 85, 0.9);
}
.es-sub {
    font-size: 0.8rem;
    color: rgba(186, 230, 253, 0.62);
    margin: 0 0 0.15rem;
}
.es-bubbles {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1rem;
}
.es-bubble {
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.72);
    padding: 0.9rem 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.es-bubble h4 {
    margin: 0 0 0.55rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(186, 230, 253, 0.7);
}
.es-bubble.danger {
    border-color: rgba(248, 113, 113, 0.28);
    background: rgba(69, 10, 10, 0.28);
}
.es-bubble.danger h4 { color: rgba(252, 165, 165, 0.85); }
.es-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.es-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin: 0;
}
.es-row input[type="text"],
.es-row input[type="number"],
.es-row select,
.es-props input {
    flex: 1 1 10rem;
    min-width: 0;
    background: rgba(2, 6, 23, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 0.5rem;
    color: #e2e8f0;
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
}
.es-props {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.75rem;
}
@media (max-width: 560px) {
    .es-props { grid-template-columns: 1fr; }
    .entity-settings-panel { width: min(100%, 100%); padding: 1.1rem; }
}
.es-props label {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    font-size: 0.72rem;
    font-weight: 650;
    color: rgba(186, 230, 253, 0.72);
    letter-spacing: 0.02em;
}
.es-props label input,
.es-props label select {
    flex: none;
    width: 100%;
    font-weight: 500;
    color: #e2e8f0;
    background: rgba(2, 6, 23, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 0.5rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.85rem;
}
.es-props label.span-2 { grid-column: 1 / -1; }
.es-btn {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
    border-radius: 0.55rem;
    padding: 0.48rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}
.es-btn:hover { filter: brightness(1.08); }
.es-btn.primary {
    background: rgba(5, 150, 105, 0.88);
    border-color: rgba(52, 211, 153, 0.45);
}
.es-btn.danger {
    background: rgba(153, 27, 27, 0.8);
    border-color: rgba(248, 113, 113, 0.42);
    color: #fecaca;
}
.es-btn:disabled,
.es-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.55);
    pointer-events: none;
}
.es-btn.danger:disabled,
.es-btn.danger.is-disabled {
    background: rgba(71, 85, 105, 0.75);
    border-color: rgba(148, 163, 184, 0.35);
    color: rgba(226, 232, 240, 0.7);
    filter: grayscale(0.65);
}
.es-btn.linkish {
    background: rgba(14, 116, 144, 0.6);
    border-color: rgba(56, 189, 248, 0.4);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.es-msg {
    min-height: 1.15rem;
    font-size: 0.82rem;
    margin-top: 0.75rem;
}
.es-msg .ok { color: #6ee7b7; }
.es-msg .err { color: #fca5a5; }

/* Statistics: horizontal bubble grid (count + size together) */
.es-stat-bubbles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.35rem;
}
.es-stat-bubble {
    box-sizing: border-box;
    min-width: 0;
    padding: 0.5rem 0.55rem 0.48rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.82);
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}
.es-stat-bubble-label {
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: rgba(186, 230, 253, 0.72);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.es-stat-bubble-main {
    font-size: 1.05rem;
    font-weight: 750;
    color: #f1f5f9;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.es-stat-bubble-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(186, 230, 253, 0.78);
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}
.es-stat-bubble-sub strong {
    color: #e0f2fe;
    font-weight: 750;
}
.es-stat-bubble.is-total,
.es-stat-bubble.is-server-dir {
    border-color: rgba(56, 189, 248, 0.35);
    background: linear-gradient(160deg, rgba(14, 116, 144, 0.22), rgba(15, 23, 42, 0.9));
}
.es-stat-bubble.is-total .es-stat-bubble-sub {
    margin-top: 0.1rem;
    padding-top: 0.2rem;
    border-top: 1px solid rgba(125, 211, 252, 0.22);
}
.es-stat-list {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    margin-top: 0.2rem;
}
.es-stat-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.65rem;
    font-size: 0.82rem;
    line-height: 1.3;
}
.es-stat-label {
    color: rgba(186, 230, 253, 0.72);
    font-weight: 550;
    min-width: 0;
}
.es-stat-value {
    color: #f1f5f9;
    font-weight: 650;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.es-stat-value code {
    font-size: 0.78rem;
    color: #bae6fd;
}
.es-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.14rem 0.45rem;
    border-radius: 0.35rem;
    margin-left: 0.4rem;
    vertical-align: middle;
}
.es-badge.on {
    background: rgba(6, 78, 59, 0.6);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.35);
}
.es-badge.off {
    background: rgba(69, 26, 3, 0.5);
    color: #fdba74;
    border: 1px solid rgba(251, 146, 60, 0.35);
}
.es-confirm-box {
    display: none;
    margin-top: 0.55rem;
    padding: 0.65rem 0.7rem;
    border-radius: 0.65rem;
    background: rgba(127, 29, 29, 0.35);
    border: 1px solid rgba(248, 113, 113, 0.4);
    font-size: 0.82rem;
}
.es-confirm-box.is-open { display: block; }
.es-confirm-box p { margin: 0 0 0.5rem; }
.es-bubble-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    margin-bottom: 0;
}
.es-bubble-head h4 { margin: 0; }
.es-fold {
    display: none;
    margin-top: 0.7rem;
}
.es-fold.is-open { display: block; }
.es-motd-tools {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}
.es-motd-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
}
.es-motd-swatch {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.es-motd-swatch:hover { transform: scale(1.08); }
.es-motd-fmt {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.es-motd-fmt .es-btn {
    min-width: 2rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
}
.es-motd-input {
    width: 100%;
    min-height: 4.5rem;
    resize: vertical;
    background: rgba(2, 6, 23, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 0.55rem;
    color: #e2e8f0;
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    line-height: 1.4;
}
.es-motd-preview-wrap {
    margin-top: 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    /* Multiplayer server list–ish dark panel */
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent 40%),
        #1b1b1b;
    padding: 0.65rem 0.75rem 0.7rem;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.es-motd-preview-label {
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(186, 230, 253, 0.55);
    margin-bottom: 0.4rem;
    font-family: inherit;
}
.es-motd-preview {
    font-family: 'Minecraft', monospace;
    font-size: 1.05rem;
    line-height: 1.55;
    letter-spacing: 0.01em;
    color: #aaaaaa;
    min-height: 2.6em;
    white-space: pre-wrap;
    word-break: break-word;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    font-smooth: never;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85);
}
.es-motd-preview .m-bold { font-weight: 700; }
.es-motd-preview .m-italic { font-style: italic; }
.es-motd-preview .m-under { text-decoration: underline; }
.es-motd-preview .m-strike { text-decoration: line-through; }
.es-props-raw label span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    color: rgba(203, 213, 225, 0.85);
    letter-spacing: 0;
    text-transform: none;
    font-weight: 600;
}
