/* LifePolitical Dynmap extension */
.lp-country-popup .leaflet-popup-content-wrapper {
    background:#202326;color:#eee9e0;padding:0;border:1px solid #4b4338;border-radius:10px;
    box-shadow:0 12px 35px rgba(0,0,0,.45);
}
.lp-country-popup .leaflet-popup-content {
    margin:0;width:380px!important;max-width:calc(100vw - 56px);line-height:1.45;
}
.lp-country-popup .leaflet-popup-tip {background:#202326;box-shadow:none;}
.lp-country-popup .leaflet-popup-content > div,
.lp-country-popup .MarkerPopup {margin:0;}
.lp-country-popup .lp-country-card {
    box-sizing:border-box;width:100%;padding:10px 16px 14px!important;overflow-wrap:anywhere;border-radius:9px;
    background:#202326;color:#eee9e0;font:14px/1.45 Arial,sans-serif;
}
.lp-country-popup .lp-country-title {
    display:block;width:100%;text-align:center!important;margin:0 0 10px!important;
}
.lp-country-popup a.leaflet-popup-close-button {
    top:6px;right:6px;padding:0;width:24px;height:24px;background:transparent;
    color:#a8a094;font:20px/24px Arial,sans-serif;text-align:center;
}
.lp-country-popup a.leaflet-popup-close-button:hover {color:#e6be8a;}
.lp-country-popup a[href^="#lifepolitical-country-"] {cursor:default;}
.lp-country-tooltip.leaflet-tooltip {
    border:1px solid #5d5141;border-radius:5px;padding:5px 10px;
    background:#202326;color:#f1e4ce;font:13px/1.4 Arial,sans-serif;
    box-shadow:0 3px 12px rgba(0,0,0,.35);
}
.lp-country-tooltip.leaflet-tooltip-top:before {border-top-color:#5d5141;}
.lp-country-tooltip.leaflet-tooltip-bottom:before {border-bottom-color:#5d5141;}
.lp-country-tooltip.leaflet-tooltip-left:before {border-left-color:#5d5141;}
.lp-country-tooltip.leaflet-tooltip-right:before {border-right-color:#5d5141;}

/* --- Interactive Settlement Management Extensions --- */

.lp-popup-manage-btn {
    display: block; width: 100%; margin-top: 10px; padding: 7px 12px;
    background: linear-gradient(135deg, #d4af37, #aa820a); color: #181a1b;
    border: none; border-radius: 6px; font-weight: bold; font-size: 13px;
    cursor: pointer; transition: transform 0.15s ease, filter 0.15s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3); text-align: center;
}
.lp-popup-manage-btn:hover {
    filter: brightness(1.15); transform: translateY(-1px);
}
.lp-popup-manage-btn:active {
    transform: translateY(1px);
}

/* Modal Backdrop */
.lp-modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10, 12, 14, 0.75); backdrop-filter: blur(8px);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.lp-modal-backdrop.lp-show {
    opacity: 1; pointer-events: auto;
}

/* Modal Window */
.lp-modal {
    width: 620px; max-width: 94vw; max-height: 88vh;
    background: #1e2226; border: 1px solid #54493b; border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.65), 0 0 20px rgba(230, 190, 138, 0.15);
    color: #eee9e0; font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    display: flex; flex-direction: column; overflow: hidden;
    transform: scale(0.95); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.lp-modal-backdrop.lp-show .lp-modal {
    transform: scale(1);
}

/* Modal Header */
.lp-modal-header {
    padding: 16px 20px; background: #262b30; border-bottom: 1px solid #433b30;
    display: flex; align-items: center; justify-content: space-between;
}
.lp-modal-title-wrap {
    display: flex; align-items: center; gap: 10px;
}
.lp-modal-color-dot {
    width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff;
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
}
.lp-modal-title {
    font-size: 20px; font-weight: 700; color: #f6ead7; margin: 0;
}
.lp-modal-close {
    background: transparent; border: none; color: #9c9488; font-size: 24px;
    cursor: pointer; line-height: 1; padding: 2px 6px; border-radius: 4px;
}
.lp-modal-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* Navigation Tabs */
.lp-nav-tabs {
    display: flex; background: #191c1f; border-bottom: 1px solid #3d352b;
    padding: 0 12px; gap: 4px; overflow-x: auto;
}
.lp-tab-btn {
    background: transparent; border: none; border-bottom: 2px solid transparent;
    color: #a8a094; padding: 12px 14px; font-size: 13.5px; font-weight: 600;
    cursor: pointer; transition: all 0.15s ease; white-space: nowrap;
}
.lp-tab-btn:hover { color: #f1e4ce; }
.lp-tab-btn.lp-active {
    color: #e6be8a; border-bottom-color: #e6be8a;
}

/* Content Area */
.lp-modal-body {
    padding: 20px; overflow-y: auto; flex: 1;
}

/* Authentication Screen */
.lp-auth-card {
    background: #252a2f; border: 1px solid #453c30; border-radius: 10px;
    padding: 24px; text-align: center;
}
.lp-auth-icon { font-size: 40px; margin-bottom: 12px; }
.lp-auth-title { font-size: 18px; font-weight: bold; color: #e6be8a; margin-bottom: 6px; }
.lp-auth-desc { font-size: 13.5px; color: #aba296; margin-bottom: 18px; line-height: 1.5; }
.lp-code-input {
    width: 220px; padding: 10px 14px; font-size: 22px; font-weight: bold;
    letter-spacing: 5px; text-align: center; background: #181a1d; color: #6dc9a0;
    border: 2px solid #5a4f40; border-radius: 8px; margin-bottom: 16px; outline: none;
    text-transform: uppercase;
}
.lp-code-input:focus { border-color: #e6be8a; box-shadow: 0 0 10px rgba(230, 190, 138, 0.25); }
.lp-btn-primary {
    background: #e6be8a; color: #181a1b; border: none; border-radius: 6px;
    padding: 10px 24px; font-size: 14px; font-weight: bold; cursor: pointer;
    transition: filter 0.15s ease;
}
.lp-btn-primary:hover { filter: brightness(1.1); }
.lp-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.lp-auth-help {
    margin-top: 20px; text-align: left; background: #1a1d20; border-radius: 8px;
    padding: 14px; font-size: 12.5px; color: #aba296; line-height: 1.5;
}
.lp-auth-help strong { color: #f6ead7; }

/* Grid Cards & Badges */
.lp-grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px;
}
.lp-card {
    background: #252a2f; border: 1px solid #433b30; border-radius: 8px;
    padding: 12px 14px;
}
.lp-card-label { font-size: 11.5px; text-transform: uppercase; color: #9c9488; letter-spacing: 0.5px; margin-bottom: 4px; }
.lp-card-value { font-size: 15px; font-weight: 600; color: #f6ead7; }

/* Members List */
.lp-members-list {
    display: flex; flex-direction: column; gap: 10px; margin-top: 14px;
}
.lp-member-row {
    background: #252a2f; border: 1px solid #40382d; border-radius: 8px;
    padding: 12px; display: flex; flex-direction: column; gap: 10px;
}
.lp-member-header {
    display: flex; align-items: center; justify-content: space-between;
}
.lp-member-info {
    display: flex; align-items: center; gap: 10px;
}
.lp-member-avatar {
    width: 32px; height: 32px; border-radius: 6px; background: #333;
}
.lp-member-name {
    font-weight: 600; color: #f6ead7; font-size: 14.5px;
}
.lp-member-actions {
    display: flex; gap: 6px; align-items: center;
}
.lp-btn-sm {
    padding: 4px 10px; font-size: 12px; font-weight: 600; border-radius: 4px;
    cursor: pointer; border: 1px solid transparent; transition: all 0.15s ease;
}
.lp-btn-danger {
    background: rgba(220, 53, 69, 0.2); color: #f87171; border-color: rgba(220, 53, 69, 0.4);
}
.lp-btn-danger:hover {
    background: rgba(220, 53, 69, 0.4); color: #fff;
}
.lp-btn-secondary {
    background: #343a40; color: #e9ecef; border-color: #495057;
}
.lp-btn-secondary:hover {
    background: #495057;
}

/* Permissions Matrix */
.lp-perms-panel {
    background: #1c2023; border: 1px solid #363026; border-radius: 6px;
    padding: 10px; margin-top: 6px;
}
.lp-perms-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px;
}
.lp-perm-item {
    display: flex; align-items: center; gap: 6px; font-size: 12px; color: #ccc;
    cursor: pointer;
}
.lp-perm-item input { cursor: pointer; }

/* Territory & Claim Mode */
.lp-territory-banner {
    background: linear-gradient(135deg, rgba(109, 201, 160, 0.15), rgba(71, 133, 106, 0.1));
    border: 1px solid #6dc9a0; border-radius: 8px; padding: 14px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.lp-claim-mode-btn {
    background: #6dc9a0; color: #11291d; border: none; border-radius: 6px;
    padding: 9px 16px; font-size: 13.5px; font-weight: bold; cursor: pointer;
    transition: filter 0.15s ease; display: inline-flex; align-items: center; gap: 6px;
}
.lp-claim-mode-btn:hover { filter: brightness(1.15); }

/* Floating Claim Bar on Map */
.lp-claim-floating-bar {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: #1e2226; border: 2px solid #6dc9a0; border-radius: 30px;
    padding: 10px 22px; z-index: 99990; box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    display: flex; align-items: center; gap: 16px; color: #eee9e0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    font-size: 14px; animation: lpPulse 2s infinite;
}
@keyframes lpPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(109, 201, 160, 0.4); }
    50% { box-shadow: 0 0 25px rgba(109, 201, 160, 0.8); }
}

/* Claimable adjacent chunk outlines on Leaflet */
.lp-claimable-chunk {
    stroke-dasharray: 6, 6;
    animation: lpDash 2s linear infinite;
    cursor: pointer;
    transition: all 0.2s ease;
}
@keyframes lpDash {
    to { stroke-dashoffset: -12; }
}

/* Chunk interactive badges */
.lp-chunk-badge-icon {
    background: transparent !important;
    border: none !important;
}
.lp-chunk-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(22, 26, 30, 0.92);
    border: 1.5px solid #ffc83b;
    border-radius: 14px;
    padding: 2px 7px;
    color: #ffd966;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Segoe UI', system-ui, sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.lp-chunk-badge:hover {
    transform: scale(1.12);
    background: #ffc83b;
    color: #15181b;
}
.lp-chunk-badge .lp-plus {
    font-size: 10px;
}

.lp-chunk-owned-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 38, 28, 0.9);
    border: 1.5px solid #6dc9a0;
    border-radius: 12px;
    padding: 1px 7px;
    color: #92eec0;
    font-size: 10.5px;
    font-weight: 700;
    font-family: 'Segoe UI', system-ui, sans-serif;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    pointer-events: none;
    white-space: nowrap;
}

/* Toast Notification */
.lp-toast {
    position: fixed; top: 20px; right: 20px; z-index: 100000;
    background: #252a2f; border: 1px solid #6dc9a0; border-radius: 8px;
    padding: 12px 18px; color: #eee9e0; font-size: 13.5px; font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5); transform: translateY(-30px); opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.lp-toast.lp-toast-show {
    transform: translateY(0); opacity: 1;
}
.lp-toast.lp-toast-error {
    border-color: #f87171; color: #fca5a5;
}

/* Purchase Chunk Confirm Modal */
.lp-confirm-backdrop {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10, 13, 16, 0.78); backdrop-filter: blur(10px);
    z-index: 100000; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
}
.lp-confirm-backdrop.lp-show {
    opacity: 1; pointer-events: auto;
}
.lp-confirm-card {
    position: relative;
    width: 440px; max-width: 92vw;
    background: #191c20;
    border: 1px solid #4a3f32;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(230, 190, 138, 0.12);
    color: #eee9e0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    overflow: hidden;
    transform: scale(0.93) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.lp-confirm-backdrop.lp-show .lp-confirm-card {
    transform: scale(1) translateY(0);
}
.lp-confirm-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 120px;
    background: radial-gradient(ellipse at top, rgba(230, 190, 138, 0.15), transparent 75%);
    pointer-events: none;
}
.lp-confirm-header {
    padding: 20px 22px 14px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(84, 73, 59, 0.4);
    position: relative;
}
.lp-confirm-header-content {
    display: flex; align-items: center; gap: 12px;
}
.lp-confirm-icon-box {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, rgba(230, 190, 138, 0.2), rgba(230, 190, 138, 0.05));
    border: 1px solid rgba(230, 190, 138, 0.35);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.lp-confirm-title {
    font-size: 17px; font-weight: 700; color: #f7ede0; line-height: 1.25;
}
.lp-confirm-subtitle {
    font-size: 12px; color: #aba296; margin-top: 2px;
}
.lp-confirm-close {
    background: transparent; border: none; color: #8e8578; font-size: 24px;
    cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px;
    transition: all 0.15s ease;
}
.lp-confirm-close:hover {
    color: #fff; background: rgba(255,255,255,0.08);
}
.lp-confirm-body {
    padding: 20px 22px;
    display: flex; flex-direction: column; gap: 14px;
    position: relative;
}
.lp-confirm-chunk-info {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    background: #202429;
    border: 1px solid #3d352b;
    border-radius: 10px;
    padding: 12px 14px;
}
.lp-confirm-stat {
    display: flex; flex-direction: column; gap: 3px;
}
.lp-confirm-stat-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
    color: #9c9488; font-weight: 600;
}
.lp-confirm-stat-val {
    font-size: 13.5px; font-weight: 700; color: #6dc9a0;
    font-family: Consolas, 'Liberation Mono', Menlo, monospace;
}
.lp-confirm-price-card {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, rgba(255, 200, 59, 0.08), rgba(255, 200, 59, 0.02));
    border: 1px solid rgba(255, 200, 59, 0.28);
    border-radius: 10px;
    padding: 12px 16px;
}
.lp-confirm-price-label {
    font-size: 13.5px; font-weight: 600; color: #e6be8a;
}
.lp-confirm-price-sub {
    font-size: 11.5px; color: #a49b8e; margin-top: 2px;
}
.lp-confirm-price-value {
    font-size: 18px; font-weight: 800; color: #ffc83b;
    text-shadow: 0 0 12px rgba(255, 200, 59, 0.35);
    background: rgba(255, 200, 59, 0.12);
    border: 1px solid rgba(255, 200, 59, 0.35);
    padding: 4px 12px;
    border-radius: 8px;
    white-space: nowrap;
}
.lp-confirm-bank-balance {
    font-size: 12px; color: #aba296; text-align: right; padding-right: 4px;
}
.lp-confirm-bank-balance strong {
    color: #6dc9a0; font-weight: 700;
}
.lp-confirm-actions {
    padding: 14px 22px 20px;
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    border-top: 1px solid rgba(84, 73, 59, 0.35);
    background: rgba(20, 24, 28, 0.6);
}
.lp-btn-confirm-cancel {
    background: #252a2f; border: 1px solid #433b30; color: #c4bcb0;
    padding: 9px 18px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
    cursor: pointer; transition: all 0.15s ease;
}
.lp-btn-confirm-cancel:hover {
    background: #2e343a; color: #fff; border-color: #5c5243;
}
.lp-btn-confirm-ok {
    background: linear-gradient(135deg, #2ea44f 0%, #238636 100%);
    border: 1px solid #3fb950; color: #fff;
    padding: 9px 20px; border-radius: 8px; font-size: 13.5px; font-weight: 700;
    cursor: pointer; box-shadow: 0 4px 14px rgba(46, 164, 79, 0.35);
    transition: all 0.15s ease; display: inline-flex; align-items: center; gap: 6px;
}
.lp-btn-confirm-ok:hover {
    background: linear-gradient(135deg, #34b356 0%, #29933c 100%);
    box-shadow: 0 6px 18px rgba(46, 164, 79, 0.5);
    transform: translateY(-1px);
}
.lp-btn-confirm-ok:active {
    transform: translateY(1px);
}

/* Contemporary dark surfaces; Minecraft detail lives in the world scenery. */
:root {
    --lp-panel: #151d23;
    --lp-slot: #1b252c;
    --lp-edge: rgba(176, 198, 210, .15);
    --lp-ink: #e7ecee;
    --lp-gold: #d8c29a;
    --lp-bevel: inset 0 1px 0 rgba(255,255,255,.04);
    --lp-frame: 0 10px 30px rgba(3,8,13,.28), inset 0 1px 0 rgba(255,255,255,.035);
}
.lp-ui-icon { width:18px; height:18px; display:inline-block; vertical-align:-3px; flex-shrink:0; }
.lp-auth-icon .lp-ui-icon { width:44px; height:44px; color:var(--lp-gold); }
.lp-confirm-icon-box .lp-ui-icon { width:24px; height:24px; color:var(--lp-gold); }
.lp-country-popup .leaflet-popup-content-wrapper,
.lp-modal, .lp-confirm-card, .lp-toast, .lp-claim-floating-bar {
    background:var(--lp-panel); border:1px solid var(--lp-edge); border-radius:16px;
    box-shadow:var(--lp-frame); color:var(--lp-ink);
}
.lp-country-popup .lp-country-card {
    background:transparent!important; border-radius:10px; padding:16px 18px!important;
}
.lp-country-popup .lp-country-title {
    padding:4px 20px 12px; box-sizing:border-box;
    border-bottom:1px solid var(--lp-edge); text-shadow:none;
}
.lp-country-popup .lp-country-card > div:not(.lp-country-title) {
    padding:4px 0; line-height:1.5;
}
.lp-country-popup .lp-country-card hr { border-top-color:#ffffff12!important; }
.lp-country-popup .leaflet-popup-tip { background:var(--lp-panel); }
.lp-country-tooltip.leaflet-tooltip {
    border:1px solid var(--lp-edge); border-radius:10px; background:#1d2629;
    box-shadow:0 6px 20px #0004; color:var(--lp-ink);
}
.lp-country-tooltip.leaflet-tooltip-top:before { border-top-color:#1d2629; }
.lp-country-tooltip.leaflet-tooltip-bottom:before { border-bottom-color:#1d2629; }
.lp-country-tooltip.leaflet-tooltip-left:before { border-left-color:#1d2629; }
.lp-country-tooltip.leaflet-tooltip-right:before { border-right-color:#1d2629; }
.lp-modal-header, .lp-confirm-header { background:#1c282f; border-bottom:1px solid var(--lp-edge); }
.lp-modal-title, .lp-confirm-title { text-shadow:none; }
.lp-modal-title-wrap { min-width:0; }
.lp-modal-title { overflow-wrap:anywhere; }
.lp-modal-color-dot { border-radius:10px; box-shadow:none; flex-shrink:0; }
.lp-modal-body { min-height:0; }
.lp-modal-backdrop, .lp-confirm-backdrop { backdrop-filter:blur(3px); }
.lp-modal, .lp-confirm-card { transform:translateY(12px); transition:transform 220ms ease-out; }
.lp-modal-backdrop.lp-show .lp-modal, .lp-confirm-backdrop.lp-show .lp-confirm-card { transform:translateY(0); }
.lp-card, .lp-auth-card, .lp-auth-help, .lp-member-row, .lp-perms-panel,
.lp-confirm-chunk-info, .lp-confirm-price-card, .lp-confirm-icon-box, .lp-territory-banner {
    background:var(--lp-slot); border:1px solid; border-color:var(--lp-edge);
    border-radius:10px; box-shadow:none;
}
.lp-card-label, .lp-confirm-stat-label { color:#a9b9b8; }
.lp-card-value { overflow-wrap:anywhere; }
.lp-confirm-price-value { border-radius:10px; text-shadow:none; background:#333327; border-color:#7b714b; }
.lp-confirm-card::before { display:none; }
.lp-member-avatar { border-radius:10px; image-rendering:pixelated; box-shadow:none; }
.lp-nav-tabs { background:#141c22; border-bottom:1px solid var(--lp-edge); padding:8px; gap:4px; }
.lp-tab-btn { border:1px solid transparent; border-radius:8px; padding:10px; font-size:13px; display:inline-flex; align-items:center; gap:7px; }
.lp-tab-btn.lp-active { background:#1c282f; border-color:#9ebead26; color:var(--lp-gold); }
.lp-popup-manage-btn, .lp-btn-primary, .lp-btn-sm, .lp-claim-mode-btn,
.lp-btn-confirm-ok, .lp-btn-confirm-cancel, .lp-modal-close, .lp-confirm-close {
    border:1px solid var(--lp-edge); border-radius:10px; background:#202c34; color:#f2f2e7;
    box-shadow:var(--lp-bevel); text-shadow:none;
    transition:background-color 120ms ease, transform 120ms ease;
}
.lp-popup-manage-btn { background:#2a3c40; }
.lp-btn-primary, .lp-btn-confirm-ok, .lp-claim-mode-btn { background:#335c50; }
.lp-btn-danger { background:#482c32; color:#ffdfda; }
.lp-modal-close, .lp-confirm-close { min-width:32px; min-height:32px; font-family:monospace; }
.lp-popup-manage-btn:hover, .lp-btn-primary:hover, .lp-btn-sm:hover,
.lp-claim-mode-btn:hover, .lp-btn-confirm-ok:hover, .lp-btn-confirm-cancel:hover,
.lp-modal-close:hover, .lp-confirm-close:hover {
    background:#2c4145; color:#fff1bf; filter:none; transform:none;
    box-shadow:inset 0 0 0 1px #adc7bc26;
}
.lp-btn-danger:hover { background:#61363d; }
.lp-popup-manage-btn:active, .lp-btn-primary:active, .lp-btn-sm:active,
.lp-claim-mode-btn:active, .lp-btn-confirm-ok:active, .lp-btn-confirm-cancel:active {
    transform:translateY(1px); box-shadow:inset 0 1px 4px #0003;
}
.lp-code-input, .lp-text-input {
    box-sizing:border-box; border:1px solid; border-color:var(--lp-edge);
    border-radius:10px; background:#131b20; color:#e3f0dd; box-shadow:none;
}
.lp-text-input { flex:1; min-width:0; padding:8px 12px; font:inherit; font-size:14px; }
.lp-code-input { max-width:100%; }
.lp-code-input:focus { border-color:var(--lp-gold); box-shadow:none; }
.lp-territory-slot { background:#202b2d; border:1px solid var(--lp-edge); border-radius:6px; padding:4px 8px; font-size:12px; color:#eee; }
.lp-chunk-badge, .lp-chunk-owned-badge { border-radius:10px; border-width:1px; box-shadow:0 4px 12px #0003; }
.lp-chunk-badge:hover { transform:translateY(-1px); }
.lp-claim-floating-bar { animation:none; max-width:calc(100vw - 140px); box-sizing:border-box; padding:12px 16px; }
.lp-perm-item input, .leaflet-control-layers input { accent-color:#91b67f; }
.lp-modal :focus-visible, .lp-confirm-card :focus-visible,
.lp-country-popup a:focus-visible, .lp-country-popup button:focus-visible,
.lp-reload-map-btn:focus-visible, .lp-compass-widget:focus-visible, .leaflet-control a:focus-visible,
.dynmap .sidebar :focus-visible {
    outline:2px solid #a9cabb!important; outline-offset:3px;
}

/* Compact floating toolbar with quiet hover and pressed states. */
.leaflet-top.leaflet-left {
    display:flex!important; flex-direction:row!important; align-items:flex-start!important;
    gap:8px!important; top:16px!important; left:16px!important; margin:0!important; padding:0!important;
}
.leaflet-top.leaflet-left .leaflet-control { margin:0!important; float:none!important; clear:none!important; }
.leaflet-control-zoom {
    display:flex!important; flex-direction:row!important; gap:1px!important;
    padding:3px!important; background:#151e25!important; border:1px solid var(--lp-edge)!important;
    border-radius:10px!important; box-shadow:var(--lp-frame)!important;
}
.leaflet-control-zoom a,
.leaflet-control-layers:not(.leaflet-control-layers-expanded) .leaflet-control-layers-toggle {
    position:relative!important; display:block!important; box-sizing:border-box!important;
    width:40px!important; height:40px!important; padding:0!important; margin:0!important;
    border:0!important; border-radius:9px!important;
    background-color:transparent!important; box-shadow:none!important;
    transition:background-color 120ms ease, box-shadow 120ms ease!important;
}
.leaflet-control-zoom a { font-size:0!important; text-indent:-9999px!important; }
.leaflet-control-zoom-in::before, .leaflet-control-zoom-out::before,
.leaflet-control-zoom-in::after {
    content:""; position:absolute; background:#eef0e4;
    top:50%; left:50%; transform:translate(-50%,-50%); box-shadow:none; border-radius:2px;
}
.leaflet-control-zoom-in::before, .leaflet-control-zoom-out::before { width:16px; height:2px; }
.leaflet-control-zoom-in::after { width:2px; height:16px; }
.leaflet-control-zoom a:hover,
.leaflet-control-layers:not(.leaflet-control-layers-expanded) .leaflet-control-layers-toggle:hover {
    background-color:#2c3c44!important;
    box-shadow:none!important;
}
.leaflet-control-zoom a:active,
.leaflet-control-layers:not(.leaflet-control-layers-expanded) .leaflet-control-layers-toggle:active {
    box-shadow:inset 0 1px 4px #0003!important;
}
.leaflet-control-zoom a.leaflet-disabled { background-color:transparent!important; cursor:default!important; }
.leaflet-control-zoom a.leaflet-disabled::before,
.leaflet-control-zoom a.leaflet-disabled::after { background:#737f7e; box-shadow:none; }
.leaflet-control-layers:not(.leaflet-control-layers-expanded) {
    border:1px solid var(--lp-edge)!important; border-radius:12px!important; padding:3px!important;
    background:#151e25!important; box-shadow:var(--lp-frame)!important;
}
.leaflet-control-layers-toggle {
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dce5e7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5M3 16l9 5 9-5'/%3E%3C/svg%3E")!important;
    background-size:20px 20px!important; background-position:center!important; background-repeat:no-repeat!important;
}
/* The button stays in place; only the dropdown surface moves. Keep the list
   mounted so both opening and closing can transition instead of display:none. */
.leaflet-control-layers,
.leaflet-control-layers-expanded {
    position:relative!important; top:auto!important; left:auto!important;
    width:48px!important; height:48px!important; min-width:0!important;
    box-sizing:border-box!important; padding:3px!important; margin:0!important;
    border:1px solid var(--lp-edge)!important; border-radius:12px!important;
    background:#151e25!important; box-shadow:var(--lp-frame)!important;
    overflow:visible!important;
}
.leaflet-control-layers .leaflet-control-layers-toggle {
    display:block!important; visibility:visible!important;
    width:40px!important; height:40px!important; border:0!important;
    border-radius:9px!important; background-color:transparent!important;
    transition:background-color 180ms ease, transform 180ms ease!important;
}
.leaflet-control-layers .leaflet-control-layers-toggle:hover,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
    background-color:#2c3c44!important; transform:translateY(-1px);
}
.leaflet-control-layers .leaflet-control-layers-toggle:active { transform:scale(.96); }
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers > form {
    display:block!important; position:absolute!important; top:calc(100% + 10px); left:0;
    min-width:190px; max-width:calc(100vw - 132px); max-height:65vh!important;
    box-sizing:border-box; padding:12px 16px!important; margin:0!important;
    border:1px solid var(--lp-edge); border-radius:14px;
    background:#151e25; color:#e4e8df; box-shadow:var(--lp-frame);
    font:13px/1.6 "Segoe UI",sans-serif; overflow-y:auto;
    opacity:0; visibility:hidden; pointer-events:none;
    transform:translateY(-6px) scale(.98); transform-origin:top left;
    transition:opacity 180ms ease, transform 220ms cubic-bezier(.2,.75,.25,1), visibility 0s linear 220ms;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list,
.leaflet-control-layers-expanded > form {
    opacity:1; visibility:visible; pointer-events:auto; transform:translateY(0) scale(1);
    transition-delay:0s;
}
/* Bridge the visual gap so moving the pointer into the list does not close it. */
.leaflet-control-layers-expanded::after {
    content:""; position:absolute; top:100%; left:0; width:100%; height:11px;
}
.leaflet-control-layers-expanded label { padding:4px 0; }
.leaflet-control-layers-separator { border-top:1px solid #ffffff12!important; margin:8px 0!important; }

/* ==========================================================================
   Hidden Dynmap Elements (Requested by user)
   ========================================================================== */

/* 1. Hide Chat & Chat Input */
#chat,
.chat,
.chatinput,
.chatline,
.chatinputbox,
.messagelist,
.leaflet-control-chat,
.dynmap .chat {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 2. Hide Coordinates / Location Box ("Location: -360,64,132") */
.coord-control,
.coordinates,
.leaflet-control-coordinates,
.coord_control,
.leaflet-control:has(.coord-control),
.leaflet-control:has(.coordinates) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 3. Hide Old Compass */
.compass,
.compass_control,
.leaflet-control-compass,
.compass_rose,
img[src*="compass"],
.leaflet-control:has(.compass) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 4. Hide Link Button (Chain Icon) in Bottom-Left */
.linkbutton,
.link-control,
.leaflet-control-link,
.leaflet-control.linkbutton,
a.linkbutton,
a[href*="link"],
.leaflet-control:has(.linkbutton),
.leaflet-control:has(a[href*="link"]),
.leaflet-bottom.leaflet-left .leaflet-control {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 5. Hide Map Types section in Sidebar (Leave ONLY Players!) */
.dynmap .sidebar .section.maptypes,
.dynmap .sidebar .maptypes,
.dynmap .sidebar [class*="maptype"] {
    display: none !important;
}


/* Preserve Dynmap's native sliding offsets, hover and pin behavior. */
.dynmap .sidebar {
    position:fixed!important; z-index:1000!important;
    background:#151e25!important; color:#e4e8df!important;
    border-left:1px solid var(--lp-edge)!important; box-shadow:-12px 0 40px #0004!important;
    font-family:"Segoe UI",sans-serif!important;
    transition:margin-right 280ms cubic-bezier(.2,.75,.25,1), right 280ms cubic-bezier(.2,.75,.25,1)!important;
}
.dynmap .sidebar .panel { position:static!important; background:transparent!important; color:inherit!important; }
.dynmap .sidebar fieldset, .dynmap .sidebar .section {
    border:0; border-top:1px solid var(--lp-edge); margin-top:16px;
}
.dynmap .sidebar legend, .dynmap .sidebar .legend {
    color:#c2cecf!important; font-size:13px; font-weight:600; letter-spacing:.6px; text-shadow:none;
}
.dynmap .sidebar .playerlist .player {
    box-sizing:border-box; width:100%; margin:3px 0; padding:7px 6px;
    border:1px solid; border-color:transparent; border-radius:10px;
    background:#192327; transition:background-color 140ms ease;
}
.dynmap .sidebar .playerlist .player:hover { background:#344740; }
.dynmap .sidebar .playerlist .player.following {
    width:100%; padding:7px 6px; border:1px solid #8ab9a54d; border-radius:10px; background:#29433c;
}
.dynmap .sidebar .playerlist .player a { color:#e4e8df; font-size:13px; line-height:20px; }
.dynmap .sidebar img { image-rendering:pixelated; border-radius:4px; }
.dynmap .sidebar .hitbar,
.dynmap .sidebar:hover .hitbar,
.dynmap .sidebar.pinned .hitbar {
    position:absolute!important; left:-24px!important; right:auto!important;
    top:0!important; height:100%!important; margin:0!important;
    transform:none!important; transition:none!important;
    width:24px!important; border:0!important; background:transparent!important;
}
.dynmap .hitbar::before {
    content:""; position:absolute; top:50%; left:0; width:24px; height:54px;
    transform:translateY(-50%); box-sizing:border-box; border:1px solid var(--lp-edge); border-radius:12px 0 0 12px;
    background:#18242d; box-shadow:0 4px 16px #0004;
}
.dynmap .hitbar::after {
    content:""; position:absolute; top:50%; left:10px; width:6px; height:6px;
    transform:translateY(-50%) rotate(45deg);
    border-left:1.5px solid #b8c6cb; border-bottom:1.5px solid #b8c6cb;
    transition:transform 220ms ease, border-color 160ms ease;
}
.dynmap .sidebar:hover .hitbar::after,
.dynmap .sidebar.pinned .hitbar::after { transform:translateY(-50%) rotate(225deg); }
.dynmap .hitbar:hover::before { background:#2c3c44; }
.dynmap .sidebar .panel > .pin {
    width:24px!important; height:24px!important; top:6px!important;
    box-sizing:border-box; border:1px solid var(--lp-edge); border-radius:7px; box-shadow:var(--lp-bevel); background:#202c34!important;
}
.dynmap .sidebar .panel > .pin::before,
.dynmap .sidebar .panel > .pin::after {
    content:""; position:absolute; top:10px; left:5px; width:12px; height:1.5px;
    border-radius:1px; background:#b8c6cb; transform:rotate(45deg);
}
.dynmap .sidebar .panel > .pin::after { transform:rotate(-45deg); }
.dynmap .sidebar .scrollup, .dynmap .sidebar .scrolldown {
    border:1px solid var(--lp-edge); border-radius:10px; background-color:#202c34; box-shadow:var(--lp-bevel);
}
.dynmap .playerName, .dynmap .playerNameSm, .dynmap .playerNameLg {
    background:#172024; border:1px solid var(--lp-edge); border-radius:5px; text-shadow:none;
}
.dynmap .healthContainer, .dynmap .healthContainerSm, .dynmap .healthContainerLg { background:#172024; border-radius:4px; }
.lp-modal-body, .leaflet-control-layers-list, .dynmap .sidebar { scrollbar-color:#708078 #172024; scrollbar-width:thin; }

.lp-reload-map-btn {
    position:fixed; bottom:16px; left:16px; z-index:900;
    display:flex; align-items:center; justify-content:center; width:48px; height:48px; padding:0;
    border:1px solid var(--lp-edge); border-radius:12px; background:#151e25; color:#e4e8df;
    box-shadow:var(--lp-frame); cursor:pointer;
    transition:background-color 120ms ease, box-shadow 120ms ease;
}
.lp-reload-map-btn:hover { background:#2c3c44; color:#fff1bf; }
.lp-reload-map-btn:active { box-shadow:inset 0 1px 4px #0003; }
.lp-reload-icon { display:flex; transform-origin:center; }
.lp-reload-icon .lp-ui-icon { width:20px; height:20px; }
.lp-reload-map-btn.lp-spin .lp-reload-icon { animation:lp-refresh-turn 500ms cubic-bezier(.4,0,.2,1) both; }
.lp-reload-map-btn:disabled { cursor:wait; }
@keyframes lp-refresh-turn { from { transform:rotate(0); } to { transform:rotate(360deg); } }
.lp-compass-widget {
    position:fixed!important; top:16px!important; right:32px!important;
    width:112px!important; height:112px!important; z-index:10!important;
    box-sizing:border-box; padding:2px; border:1px solid var(--lp-edge); border-radius:50%;
    background:rgba(18,27,34,.94); box-shadow:var(--lp-frame); user-select:none;
    cursor:pointer; color:#c4d0d4; transition:background-color 180ms ease, border-color 180ms ease;
}
.lp-compass-widget:hover { background:#1e2d35; border-color:#a9cabb66; }
.lp-compass-widget:disabled { cursor:default; }
.lp-compass-hint {
    position:absolute; top:calc(100% + 8px); left:50%; transform:translate(-50%,-3px);
    padding:5px 9px; border:1px solid var(--lp-edge); border-radius:8px; background:#151e25;
    font:12px/1.4 "Segoe UI",sans-serif; white-space:nowrap; opacity:0; pointer-events:none;
    transition:opacity 180ms ease, transform 180ms ease;
}
.lp-compass-widget:hover .lp-compass-hint,
.lp-compass-widget:focus-visible .lp-compass-hint { opacity:1; transform:translate(-50%,0); }
.lp-compass-svg { width:100%; height:100%; display:block; }
.lp-compass-needle { transition:transform 350ms ease-out; transform-origin:50px 50px; }
@media (max-width:640px) {
    .leaflet-top.leaflet-left { top:10px!important; left:10px!important; gap:6px!important; }
    .lp-compass-widget { width:88px!important; height:88px!important; top:10px!important; right:28px!important; }
    .lp-reload-map-btn { bottom:12px; left:10px; }
    .lp-modal-body { padding:12px; }
    .lp-grid-2 { gap:8px; }
    .lp-card { padding:10px; }
    .lp-territory-banner, .lp-member-header { flex-wrap:wrap; gap:12px; }
    .lp-claim-floating-bar { bottom:12px; max-width:calc(100vw - 96px); left:auto; right:12px; transform:none; flex-wrap:wrap; gap:8px; }
}
@media (max-width:380px) { .lp-grid-2 { grid-template-columns:1fr; } }
@media (prefers-reduced-motion:reduce) {
    .leaflet-control-layers *, .dynmap .hitbar::after, .lp-compass-hint { transition:none!important; }
    .lp-reload-map-btn.lp-spin .lp-reload-icon { animation:none!important; }
    .dynmap .sidebar, .dynmap .hitbar, .lp-compass-needle, .lp-reload-icon,
    .lp-modal, .lp-modal-backdrop, .lp-confirm-card, .lp-confirm-backdrop, .lp-toast {
        transition:none!important;
    }
    .lp-claimable-chunk { animation:none; }
}

/* A quiet, compact instrument for the world clock and weather. */
.lp-clock-widget {
    position: fixed !important;
    top: 16px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 100 !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    height: 72px !important;
    padding: 0 17px 0 12px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(176, 198, 210, .15) !important;
    border-radius: 16px !important;
    background: rgba(17, 22, 27, 0.95) !important;
    box-shadow: var(--lp-frame) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    color: #f1f1ed !important;
    font-family: "Segoe UI", system-ui, sans-serif !important;
    user-select: none !important;
    pointer-events: auto !important;
}

.lp-sky-window {
    position: relative !important;
    flex: none !important;
    width: 104px !important;
    height: 48px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(216, 229, 233, 0.23) !important;
    border-radius: 9px !important;
    background: linear-gradient(180deg, #152336, #334458) !important;
    isolation: isolate !important;
}

.lp-sky-tone {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    transition: opacity 2.5s ease !important;
}
.lp-sky-tone-day { background: linear-gradient(180deg, #6b99ad, #a7c4bf) !important; }
.lp-sky-tone-dawn { background: linear-gradient(180deg, #5e5c79, #d3a080) !important; }
.lp-sky-tone-dusk { background: linear-gradient(180deg, #425370, #c9866f) !important; }
.lp-sky-day .lp-sky-tone-day,
.lp-sky-dawn .lp-sky-tone-dawn,
.lp-sky-dusk .lp-sky-tone-dusk { opacity: 1 !important; }

.lp-sky-star {
    position: absolute !important;
    z-index: 1 !important;
    width: 2px !important;
    height: 2px !important;
    background: #e9eff0 !important;
    opacity: 0 !important;
    transition: opacity 1.8s ease !important;
}
.lp-sky-night .lp-sky-star { opacity: 0.75 !important; }
.lp-sky-rain .lp-sky-star { opacity: 0 !important; }
.lp-s1 { left: 16px !important; top: 8px !important; }
.lp-s2 { left: 47px !important; top: 16px !important; }
.lp-s3 { left: 75px !important; top: 7px !important; }
.lp-s4 { left: 89px !important; top: 24px !important; }

.lp-sky-weather-shade {
    position: absolute !important;
    z-index: 1 !important;
    inset: 0 !important;
    background: linear-gradient(180deg, #263747, #435466) !important;
    opacity: 0 !important;
    transition: opacity 1.6s ease !important;
}
.lp-sky-rain .lp-sky-weather-shade { opacity: 0.38 !important; }
.lp-sky-thunder .lp-sky-weather-shade { opacity: 0.58 !important; }

.lp-sky-cloud {
    position: absolute !important;
    z-index: 3 !important;
    width: 32px !important;
    height: 11px !important;
    background: #dbe6e3 !important;
    clip-path: polygon(0 45%, 16% 45%, 16% 25%, 31% 25%, 31% 0,
        69% 0, 69% 20%, 84% 20%, 84% 45%, 100% 45%, 100% 100%, 0 100%) !important;
    opacity: 0 !important;
    filter: drop-shadow(0 1px 0 rgba(39, 61, 70, 0.25)) !important;
    transition: opacity 1.3s ease, background-color 1.3s ease !important;
    animation: lp-cloud-float 18s ease-in-out infinite alternate !important;
}
.lp-cloud-a { top: 12px !important; left: 5px !important; width: 25px !important; }
.lp-cloud-b { top: 5px !important; left: 42px !important; animation-duration: 22s !important; animation-delay: -8s !important; }
.lp-cloud-c { top: 16px !important; left: 75px !important; width: 26px !important; animation-duration: 16s !important; animation-delay: -5s !important; }
.lp-sky-day .lp-cloud-a,
.lp-sky-dawn .lp-cloud-a,
.lp-sky-dusk .lp-cloud-a { opacity: 0.3 !important; }
.lp-sky-night .lp-cloud-a { opacity: 0.17 !important; }
.lp-sky-rain .lp-sky-cloud { opacity: 0.7 !important; background: #b7c9cc !important; }
.lp-sky-thunder .lp-sky-cloud { opacity: 0.83 !important; background: #8d9ea8 !important; }
@keyframes lp-cloud-float {
    from { transform: translateX(-4px); }
    to { transform: translateX(5px); }
}

.lp-celestial-sun,
.lp-celestial-moon {
    position: absolute !important;
    z-index: 2 !important;
    left: 3px;
    top: 30px;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    opacity: 0;
    pointer-events: none !important;
    transition: left 0.22s linear, top 0.22s linear, opacity 0.45s ease, transform 0.45s ease !important;
}
.lp-celestial-sun svg,
.lp-celestial-moon svg {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    image-rendering: pixelated !important;
}
.lp-celestial-sun { filter: drop-shadow(0 0 5px rgba(255, 196, 91, 0.55)) !important; }
.lp-celestial-moon { filter: drop-shadow(0 0 4px rgba(215, 233, 234, 0.4)) !important; }

.lp-sky-precipitation {
    position: absolute !important;
    z-index: 4 !important;
    inset: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.8s ease !important;
}
.lp-sky-window.lp-sky-rain .lp-sky-precipitation { opacity: 0.8 !important; }
.lp-sky-precipitation i {
    position: absolute !important;
    top: 11px !important;
    width: 2px !important;
    height: 7px !important;
    background: #d8e8e8 !important;
    box-shadow: 1px 0 rgba(73, 124, 153, 0.45) !important;
    animation: lp-sky-rainfall 0.95s linear infinite !important;
}
.lp-sky-precipitation i:nth-child(1) { left: 13px !important; animation-delay: -0.12s !important; }
.lp-sky-precipitation i:nth-child(2) { left: 35px !important; animation-delay: -0.55s !important; }
.lp-sky-precipitation i:nth-child(3) { left: 55px !important; animation-delay: -0.28s !important; }
.lp-sky-precipitation i:nth-child(4) { left: 74px !important; animation-delay: -0.77s !important; }
.lp-sky-precipitation i:nth-child(5) { left: 94px !important; animation-delay: -0.42s !important; }
@keyframes lp-sky-rainfall {
    0% { transform: translateY(-6px); opacity: 0; }
    25% { opacity: 0.9; }
    100% { transform: translateY(29px); opacity: 0; }
}
.lp-sky-thunder::after {
    content: "" !important;
    position: absolute !important;
    z-index: 5 !important;
    inset: 0 !important;
    background: #e7f0ee !important;
    opacity: 0 !important;
    pointer-events: none !important;
    animation: lp-sky-flash 7s ease-in-out infinite !important;
}
@keyframes lp-sky-flash {
    0%, 87%, 91%, 100% { opacity: 0; }
    88%, 90% { opacity: 0.18; }
}

.lp-sky-ridge {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transition: background-color 2s ease !important;
}
.lp-sky-ridge-back {
    z-index: 5 !important;
    height: 15px !important;
    background: #647e80 !important;
    clip-path: polygon(0 52%, 13% 52%, 13% 35%, 29% 35%, 29% 60%,
        48% 60%, 48% 20%, 62% 20%, 62% 48%, 82% 48%, 82% 30%, 100% 30%, 100% 100%, 0 100%) !important;
}
.lp-sky-ridge-front {
    z-index: 6 !important;
    height: 11px !important;
    background: #334e58 !important;
    clip-path: polygon(0 35%, 19% 35%, 19% 58%, 41% 58%, 41% 28%,
        60% 28%, 60% 52%, 77% 52%, 77% 18%, 100% 18%, 100% 100%, 0 100%) !important;
}
.lp-sky-night .lp-sky-ridge-back { background: #334353 !important; }
.lp-sky-night .lp-sky-ridge-front { background: #1f303f !important; }
.lp-sky-dawn .lp-sky-ridge-back,
.lp-sky-dusk .lp-sky-ridge-back { background: #695d66 !important; }
.lp-sky-dawn .lp-sky-ridge-front,
.lp-sky-dusk .lp-sky-ridge-front { background: #3d4657 !important; }
.lp-sky-rain .lp-sky-ridge-back { background: #4b5d66 !important; }
.lp-sky-rain .lp-sky-ridge-front { background: #293e4e !important; }

.lp-sky-horizon {
    position: absolute !important;
    z-index: 7 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 7px !important;
    height: 1px !important;
    background: rgba(247, 226, 181, 0.32) !important;
    opacity: 0.6 !important;
    transition: opacity 1.5s ease !important;
}
.lp-sky-dawn .lp-sky-horizon,
.lp-sky-dusk .lp-sky-horizon { opacity: 1 !important; }

.lp-clock-center-col,
.lp-weather-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
}

.lp-clock-center-col { min-width: 84px !important; }

.lp-clock-caption,
.lp-weather-caption {
    color: #91a0a8 !important;
    font-size: 9px !important;
    font-weight: 650 !important;
    line-height: 1.1 !important;
    letter-spacing: 1.2px !important;
    white-space: nowrap !important;
}

.lp-clock-time {
    display: flex !important;
    margin-top: 3px !important;
    color: #f2f2ed !important;
    font-family: "Segoe UI", system-ui, sans-serif !important;
    font-size: 22px !important;
    font-weight: 620 !important;
    font-variant-numeric: tabular-nums !important;
    letter-spacing: -0.7px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.lp-time-colon { color: #a5b1b5 !important; margin: 0 1px !important; }

.lp-clock-sub-badge {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin-top: 4px !important;
    color: #c0c9c9 !important;
    font-size: 10px !important;
    line-height: 1 !important;
}

.lp-period-dot {
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: #aebcc4 !important;
    transition: background-color 1s ease !important;
}

.lp-clock-widget.day .lp-period-dot { background: #f1cb8d !important; }
.lp-clock-widget.dawn .lp-period-dot { background: #efb4a0 !important; }
.lp-clock-widget.dusk .lp-period-dot { background: #df9e91 !important; }

.lp-clock-divider {
    width: 1px !important;
    height: 29px !important;
    flex: none !important;
    background: rgba(217, 228, 229, 0.18) !important;
}

.lp-weather-card {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    min-width: 85px !important;
    color: #e4bc7c !important;
    transition: color 0.6s ease !important;
}

.lp-weather-rain { color: #99c3d3 !important; }
.lp-weather-thunder { color: #e6c191 !important; }
.lp-weather-unknown { color: #8fa2ad !important; }

.lp-weather-anim-box {
    position: relative !important;
    display: block !important;
    width: 25px !important;
    height: 25px !important;
    flex: none !important;
}

.lp-weather-card .lp-weather-icon {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 25px !important;
    height: 25px !important;
    overflow: visible !important;
    fill: currentColor !important;
    stroke: none !important;
    image-rendering: pixelated !important;
    opacity: 0 !important;
    transform: translateY(3px) scale(0.92) !important;
    transition: opacity 0.45s ease, transform 0.45s ease !important;
}

.lp-weather-unknown .lp-anim-unknown,
.lp-weather-clear .lp-anim-clear,
.lp-weather-rain .lp-anim-rain,
.lp-weather-thunder .lp-anim-thunder {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.lp-weather-clear .lp-anim-clear { animation: lp-clear-breathe 5s ease-in-out infinite !important; }
@keyframes lp-clear-breathe {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(246, 210, 149, 0)); }
    50% { filter: drop-shadow(0 0 3px rgba(246, 210, 149, 0.35)); }
}

.lp-weather-rain .lp-weather-drop {
    animation: lp-drop 1.5s ease-in infinite !important;
}
.lp-weather-rain .lp-rd2 { animation-delay: 0.35s !important; }
.lp-weather-rain .lp-rd3 { animation-delay: 0.7s !important; }
@keyframes lp-drop {
    0% { opacity: 0; transform: translateY(-2px); }
    30% { opacity: 0.9; }
    100% { opacity: 0; transform: translateY(3px); }
}

.lp-weather-thunder .lp-lightning-bolt {
    animation: lp-lightning 5s ease-in-out infinite !important;
}
@keyframes lp-lightning {
    0%, 87%, 91%, 100% { opacity: 0.5; }
    88%, 90% { opacity: 1; }
}

.lp-weather-text { gap: 4px !important; }
.lp-weather-title {
    color: #e6e9e6 !important;
    font-size: 13px !important;
    font-weight: 550 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

@media (max-width: 740px) {
    .lp-clock-widget { top:140px!important; }
}
@media (max-width: 640px) {
    .lp-clock-widget { top:112px!important; }
}
@media (max-width: 420px) {
    .lp-clock-widget {
        top: 112px !important;
        height: 66px !important;
        gap: 10px !important;
        padding: 0 11px !important;
    }
    .lp-sky-window { width: 88px !important; }
    .lp-clock-center-col { min-width: 77px !important; }
    .lp-clock-time { font-size: 20px !important; }
    .lp-weather-card { min-width: 74px !important; gap: 6px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-clock-widget *,
    .lp-clock-widget *::before,
    .lp-clock-widget *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   AGRESSIVELY HIDE ALL OLD DYNMAP CLOCKS & CELESTIAL CONTROLS
   ========================================================================== */
.clock,
.largeclock,
.digitalclock,
fieldset.clock,
fieldset.digitalclock,
.timeofday,
.timeofday_night,
.timeofday_day,
.dynmap .clock,
.dynmap .largeclock,
.dynmap-clock,
div.time,
div.weather:not(.lp-weather-anim-box):not(.lp-weather-card),
div.moon:not(.lp-celestial-moon),
div.sun:not(.lp-celestial-sun),
.leaflet-control-clock,
.leaflet-top.leaflet-center .clock,
.leaflet-top.leaflet-center .largeclock,
.leaflet-top.leaflet-center > div:not(#lp-clock-widget),
.leaflet-top.leaflet-left > div.clock,
.leaflet-top.leaflet-left > div.largeclock,
.leaflet-control.clock {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}





