/* Shared Peta Potensi styles */
/* ---- Peta Potensi Pasangkayu (choropleth premium) ---- */
.potensi-card {
    width: 100%;
    margin: 0;
    padding: 1.1rem 1.15rem 1.2rem;
    background: rgba(255, 255, 255, 0.82);
    box-sizing: border-box;
}

.potensi-card > .panel-head {
    margin-bottom: 1rem;
}

.potensi-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 1.25rem 1.5rem;
    align-items: start;
}

.potensi-layout > * {
    min-width: 0;
}

.potensi-map-pane {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.potensi-stage {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(15, 27, 36, 0.06);
    background: #f4f7fa;
    box-shadow: 0 14px 36px rgba(8, 36, 58, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.potensi-stage-body {
    display: block;
    flex: 1 1 auto;
    min-height: 360px;
    position: relative;
}

.potensi-submenu {
    --menu-accent: #0b4f7a;
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    bottom: 0.55rem;
    width: min(248px, 46%);
    z-index: 450;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.96));
    border: 1px solid rgba(15, 27, 36, 0.08);
    border-radius: 18px;
    box-shadow:
        0 18px 40px rgba(8, 36, 58, 0.16),
        0 0 0 1px rgba(255, 255, 255, 0.65) inset;
    overflow: hidden;
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}

.potensi-submenu-head {
    --menu-accent: #0b4f7a;
    padding: 0.85rem 0.85rem 0.75rem;
    flex-shrink: 0;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--menu-accent) 18%, #fff), rgba(255, 255, 255, 0.92) 55%);
    border-bottom: 1px solid rgba(15, 27, 36, 0.06);
    transition: background 0.35s ease;
}

.potensi-submenu-head.has-selection {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--menu-accent) 28%, #0b1f2a), color-mix(in srgb, var(--menu-accent) 12%, #fff) 70%);
}

.potensi-submenu-head.has-selection .potensi-submenu-eyebrow,
.potensi-submenu-head.has-selection #potensiMenuSubtitle {
    color: rgba(15, 27, 36, 0.62);
}

.potensi-submenu-head-top {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.potensi-submenu-swatch {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    flex-shrink: 0;
    background:
        linear-gradient(145deg, var(--menu-accent), color-mix(in srgb, var(--menu-accent) 55%, #0b1f2a));
    box-shadow:
        0 8px 18px color-mix(in srgb, var(--menu-accent) 35%, transparent),
        0 0 0 2px rgba(255, 255, 255, 0.65);
}

.potensi-submenu-head-copy {
    min-width: 0;
}

.potensi-submenu-eyebrow {
    margin: 0 0 0.12rem;
    font-size: 0.58rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6d7f90;
}

.potensi-submenu-head strong,
#potensiMenuTitle {
    display: block;
    font-size: 0.98rem;
    font-weight: 800;
    color: #0a3550;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

#potensiMenuSubtitle {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    color: #64748b;
    font-weight: 600;
    line-height: 1.35;
}

.potensi-submenu-head-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.7rem;
    flex-wrap: wrap;
}

.potensi-menu-chip {
    display: inline-flex;
    max-width: 100%;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 750;
    color: #0b4f7a;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 27, 36, 0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.potensi-menu-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff;
    background: var(--menu-accent, #0b4f7a);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--menu-accent) 35%, transparent);
}

.potensi-menu-score[hidden] {
    display: none !important;
}

.potensi-submenu-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0.45rem;
    scrollbar-width: thin;
}

.potensi-submenu-list.is-drilled {
    padding-top: 0.35rem;
}

.potensi-menu-kec {
    --item-accent: #4ecdc4;
    margin-bottom: 0.28rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid transparent;
    background: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.potensi-menu-kec.is-active,
.potensi-menu-kec.is-open {
    background: color-mix(in srgb, var(--item-accent) 10%, #fff);
    border-color: color-mix(in srgb, var(--item-accent) 28%, transparent);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--item-accent) 12%, transparent);
}

.potensi-menu-kec-btn {
    width: 100%;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto 12px;
    align-items: center;
    gap: 0.45rem;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.58rem 0.55rem;
    cursor: pointer;
    font: inherit;
    border-radius: 14px;
    color: #0f1b24;
}

.potensi-menu-kec-btn:hover {
    background: rgba(15, 27, 36, 0.03);
}

.potensi-menu-kec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--item-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--item-accent) 22%, transparent);
}

.potensi-menu-kec-main {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.potensi-menu-kec-name {
    font-size: 0.8rem;
    font-weight: 780;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.potensi-menu-kec-meta {
    font-size: 0.62rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.potensi-menu-kec-score {
    font-size: 0.72rem;
    font-weight: 800;
    color: #0b4f7a;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 27, 36, 0.06);
    border-radius: 999px;
    min-width: 1.85rem;
    height: 1.55rem;
    display: inline-grid;
    place-items: center;
    padding: 0 0.35rem;
}

.potensi-menu-caret {
    width: 7px;
    height: 7px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
    flex-shrink: 0;
    justify-self: end;
}

.potensi-menu-kec.is-open .potensi-menu-caret {
    transform: rotate(-135deg);
    margin-top: 0.15rem;
}

.potensi-menu-desa-list {
    list-style: none;
    margin: 0;
    padding: 0.05rem 0.4rem 0.55rem;
    display: grid;
    gap: 0.18rem;
}

.potensi-menu-desa-label {
    padding: 0.15rem 0.45rem 0.25rem;
    font-size: 0.58rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.potensi-menu-desa-btn {
    --item-accent: #14b8a6;
    width: 100%;
    border: 0;
    background: rgba(255, 255, 255, 0.72);
    text-align: left;
    padding: 0.48rem 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    color: #334155;
    border: 1px solid transparent;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.potensi-menu-desa-btn:hover {
    background: color-mix(in srgb, var(--item-accent) 12%, #fff);
    border-color: color-mix(in srgb, var(--item-accent) 22%, transparent);
}

.potensi-menu-desa-btn.is-active {
    background: color-mix(in srgb, var(--item-accent) 18%, #fff);
    border-color: color-mix(in srgb, var(--item-accent) 40%, transparent);
    color: #0b4f7a;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--item-accent) 16%, transparent);
}

.potensi-menu-desa-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--item-accent);
}

.potensi-menu-desa-copy {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.potensi-menu-desa-name {
    font-size: 0.74rem;
    font-weight: 750;
    line-height: 1.15;
}

.potensi-menu-desa-meta {
    font-size: 0.58rem;
    color: #94a3b8;
    font-weight: 650;
}

.potensi-menu-desa-score {
    font-size: 0.68rem;
    font-weight: 800;
    color: #0f766e;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    min-width: 1.7rem;
    height: 1.45rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(15, 27, 36, 0.06);
}

.potensi-menu-back {
    width: 100%;
    border: 0;
    background: rgba(11, 79, 122, 0.06);
    color: #0b4f7a;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 750;
    text-align: left;
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 0.15rem;
}

.potensi-menu-back:hover {
    background: rgba(11, 79, 122, 0.1);
}

.potensi-stage-body .potensi-map {
    min-width: 0;
    width: 100%;
    height: 100%;
    min-height: 360px;
}

.potensi-map-tools {
    position: relative;
    z-index: 500;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    margin: 0.55rem 0.55rem 0;
    padding: 0.4rem 0.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 22px rgba(8, 36, 58, 0.08);
    flex-shrink: 0;
}

.potensi-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.76rem;
    font-weight: 650;
    color: #64748b;
    min-width: 0;
}

.potensi-crumb button {
    border: 0;
    background: transparent;
    color: #0b4f7a;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0.12rem 0.3rem;
    border-radius: 7px;
}

.potensi-crumb button:hover { background: rgba(29, 126, 240, 0.1); }

.potensi-crumb .is-current {
    color: #0f1b24;
    font-weight: 800;
    padding: 0.12rem 0.3rem;
}

.potensi-crumb .sep { opacity: 0.35; }

.potensi-tool-btns { display: flex; gap: 0.3rem; flex-shrink: 0; }

.potensi-stage .geo-tool-btn {
    background: #fff;
    border-color: rgba(15, 27, 36, 0.08);
}

.potensi-map {
    height: clamp(360px, 52dvh, 560px);
    min-height: 360px;
    border: 0;
    background: #f4f7fa;
    position: relative;
    z-index: 1;
}

.potensi-map .leaflet-container {
    width: 100%;
    height: 100%;
    background: #f4f7fa;
    font: inherit;
}

.potensi-map .leaflet-control-zoom {
    border: 0 !important;
    margin: 0 0.75rem 0.75rem 0 !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(8, 36, 58, 0.1) !important;
}

.potensi-map .leaflet-control-zoom a {
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    border: 0 !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #0b4f7a !important;
    font-weight: 700 !important;
}

.leaflet-control-attribution,
.potensi-map .leaflet-control-attribution,
.inv-map .leaflet-control-attribution {
    display: none !important;
}

.potensi-map path.leaflet-interactive {
    transition: fill-opacity 0.18s ease, stroke-width 0.18s ease;
    cursor: pointer;
    filter: drop-shadow(0 1px 1px rgba(15, 27, 36, 0.06));
}

.potensi-label {
    background: transparent !important;
    border: 0 !important;
}

.potensi-label span {
    display: inline-block;
    max-width: 130px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #1a1a1a;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.95),
        0 0 8px rgba(255, 255, 255, 0.9),
        1px 1px 0 rgba(255, 255, 255, 0.85);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.potensi-tip {
    background: #0f1b24 !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 28px rgba(8, 36, 58, 0.25) !important;
    color: #f8fafc !important;
    font-weight: 600;
    font-size: 0.8rem !important;
    padding: 0.5rem 0.7rem !important;
}

.leaflet-tooltip-top.potensi-tip::before { border-top-color: #0f1b24 !important; }
.leaflet-tooltip-bottom.potensi-tip::before { border-bottom-color: #0f1b24 !important; }
.leaflet-tooltip-left.potensi-tip::before { border-left-color: #0f1b24 !important; }
.leaflet-tooltip-right.potensi-tip::before { border-right-color: #0f1b24 !important; }

.potensi-hint {
    font-size: 0.75rem;
    margin: 0;
    color: #94a3b8;
    font-weight: 550;
}

.potensi-copy {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    min-width: 0;
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 6rem);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.potensi-hero {
    position: relative;
    margin: 0 0 1rem;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #dbe7f3;
    box-shadow: 0 16px 36px rgba(8, 36, 58, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.potensi-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.7s ease, opacity 0.35s ease;
}

.potensi-hero:hover img { transform: scale(1.06); }

.potensi-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(8, 28, 48, 0.72) 100%);
    pointer-events: none;
}

.potensi-hero-cap {
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.75rem;
    z-index: 1;
    display: grid;
    gap: 0.1rem;
    color: #fff;
}

.potensi-hero-cap span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.potensi-hero-cap strong {
    font-family: Sora, 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.potensi-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 0.4rem;
}

.potensi-title {
    font-family: Sora, 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.75rem, 2.6vw, 2.35rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #0f1b24;
    margin: 0 0 0.55rem;
}

.potensi-title em {
    font-style: normal;
    color: #6eb0d4;
}

.potensi-rule {
    width: 112px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #111 0 52%, #6eb0d4 52% 100%);
    margin-bottom: 0.9rem;
}

.potensi-score {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.85rem;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(236, 245, 255, 0.88));
    border: 1px solid rgba(29, 126, 240, 0.12);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 12px 28px rgba(29, 126, 240, 0.08);
}

.potensi-score[hidden] {
    display: none !important;
}

.potensi-score-ring {
    --score: 0;
    position: relative;
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 10px 24px rgba(29, 126, 240, 0.14),
        0 0 0 1px rgba(15, 27, 36, 0.04);
}

.potensi-gauge {
    width: 100%;
    height: 100%;
    display: block;
    transform: rotate(-90deg);
}

.potensi-gauge-track,
.potensi-gauge-value {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
}

.potensi-gauge-track {
    stroke: rgba(15, 27, 36, 0.08);
}

.potensi-gauge-value {
    stroke: url(#potensiGaugeGrad);
    stroke-dasharray: 188.496;
    stroke-dashoffset: 188.496;
    transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 2px 5px rgba(29, 126, 240, 0.32));
}

.potensi-score-core {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    pointer-events: none;
    text-align: center;
}

.potensi-score-core strong {
    font-family: 'Plus Jakarta Sans', Sora, sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f1b24;
    line-height: 1;
}

.potensi-score-core span {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    line-height: 1;
}

.potensi-score-copy {
    display: grid;
    gap: 0.38rem;
    min-width: 0;
}

.potensi-chip {
    display: inline-flex;
    max-width: 100%;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 750;
    color: #0b4f7a;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(29, 126, 240, 0.16);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 12px rgba(8, 36, 58, 0.06);
}

.potensi-score-copy p {
    margin: 0;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

.potensi-chart {
    margin-bottom: 0.95rem;
    padding: 0.8rem 0.85rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 27, 36, 0.06);
    box-shadow: 0 10px 26px rgba(8, 36, 58, 0.05);
}

.potensi-chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.potensi-chart-head strong {
    font-size: 0.82rem;
    color: #0f1b24;
}

.potensi-chart-head span {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 650;
}

.potensi-bars {
    display: grid;
    gap: 0.48rem;
}

.potensi-bar {
    display: grid;
    grid-template-columns: minmax(64px, 78px) minmax(0, 1fr) 28px;
    align-items: center;
    gap: 0.4rem;
}

.potensi-bar .lbl {
    font-size: 0.7rem;
    font-weight: 650;
    color: #64748b;
}

.potensi-bar i {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 27, 36, 0.06);
    position: relative;
    overflow: hidden;
}

.potensi-bar i::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, #1d7ef0, #0f9d8a);
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.potensi-bar[data-key="sdm"] i::after { background: linear-gradient(90deg, #0f9d8a, #4ecdc4); }
.potensi-bar[data-key="infra"] i::after { background: linear-gradient(90deg, #c7a45a, #ffe66d); }
.potensi-bar[data-key="lahan"] i::after { background: linear-gradient(90deg, #aa96da, #fcbad3); }

.potensi-bar em {
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 800;
    color: #0f1b24;
    text-align: right;
    font-family: Sora, sans-serif;
}

.potensi-meta {
    display: grid;
    gap: 0.15rem;
    margin-bottom: 0.65rem;
}

.potensi-meta strong {
    font-size: 0.98rem;
    color: #0f1b24;
}

.potensi-meta span {
    font-size: 0.8rem;
    color: #94a3b8;
}

.potensi-desc {
    color: #556677;
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0 0 0.85rem;
}

.potensi-items-wrap {
    margin-bottom: 1rem;
}

.potensi-items-label {
    margin: 0 0 0.45rem;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.potensi-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.potensi-items li {
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0b4f7a;
    background: rgba(29, 126, 240, 0.08);
    border: 1px solid rgba(29, 126, 240, 0.14);
}

.potensi-legend-note {
    display: grid;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(15, 27, 36, 0.06);
}

.potensi-legend-note li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #445566;
    font-weight: 600;
}

.potensi-legend-note .dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.potensi-error {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--muted);
    font-weight: 600;
}

@media (max-width: 1100px) {
    .potensi-layout {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
        gap: 1.1rem 1.15rem;
    }
}

@media (max-width: 960px) {
    .potensi-layout {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .potensi-copy {
        order: 0;
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0;
    }
    .potensi-stage-body {
        min-height: 420px;
    }
    .potensi-submenu {
        position: absolute;
        top: 0.45rem;
        left: 0.45rem;
        right: auto;
        bottom: auto;
        width: min(240px, calc(100% - 0.9rem));
        max-height: min(220px, 42%);
        border-right: 0;
    }
    .potensi-map {
        height: min(420px, 52dvh) !important;
        min-height: 320px !important;
    }
    .potensi-title { font-size: 1.35rem; }
    .potensi-hero { margin-bottom: 0.55rem; aspect-ratio: 2.2 / 1; }
    .potensi-map-tools {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin: 0.65rem 0.65rem 0;
        z-index: 2;
    }
}


.geo-tool-btn {
    border: 1px solid rgba(15, 27, 36, 0.1);
    background: rgba(255, 255, 255, 0.9);
    color: #0b4f7a;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.geo-tool-btn:hover {
    background: #fff;
    box-shadow: 0 6px 16px rgba(8, 36, 58, 0.1);
}

#peta-potensi {
    scroll-margin-top: 4.75rem;
}

/* Public homepage shell — satu layar (viewport-fit) */
.potensi-public {
    background:
        radial-gradient(900px 420px at 8% 0%, rgba(29, 126, 240, 0.08), transparent 55%),
        radial-gradient(700px 360px at 95% 20%, rgba(15, 157, 138, 0.07), transparent 50%),
        #f3f7fb;
    padding-top: 0.85rem;
    padding-bottom: 1rem;
}

.potensi-public > .container {
    width: min(1280px, calc(100% - 1.5rem));
}

.potensi-public .potensi-card {
    background: #fff;
    border: 1px solid rgba(15, 27, 36, 0.06);
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(8, 36, 58, 0.08);
    padding: 0.7rem 0.8rem 0.75rem;
    height: calc(100dvh - 5.1rem);
    max-height: calc(100dvh - 5.1rem);
    min-height: 560px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.potensi-public .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(15, 27, 36, 0.06);
    flex-shrink: 0;
}

.potensi-public .panel-head h2 {
    margin: 0;
    font-size: clamp(1.05rem, 1.55vw, 1.28rem);
    letter-spacing: -0.02em;
    color: #0a3550;
    line-height: 1.2;
}

.potensi-public .pill-live {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.potensi-public .pill-live::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}

.potensi-public .section-kicker {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6d7f90;
    margin: 0 0 0.12rem;
}

.potensi-public .potensi-layout {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 310px);
    gap: 0.7rem 0.95rem;
    align-items: stretch;
}

.potensi-public .potensi-map-pane {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.potensi-public .potensi-stage {
    flex: 1 1 auto;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
}

.potensi-public .potensi-stage-body {
    flex: 1 1 auto;
    min-height: 360px;
    position: relative;
}

.potensi-public .potensi-map {
    width: 100% !important;
    height: 100% !important;
    min-height: 360px !important;
}

.potensi-public .potensi-submenu {
    top: 0.45rem;
    left: 0.45rem;
    bottom: 0.45rem;
    width: min(248px, 44%);
}

.potensi-public .potensi-submenu-head {
    padding: 0.5rem 0.65rem 0.4rem;
}

.potensi-public .potensi-menu-kec-btn {
    padding: 0.4rem 0.45rem;
}

.potensi-public .potensi-menu-kec-name {
    font-size: 0.72rem;
}

.potensi-public .potensi-menu-desa-name {
    font-size: 0.68rem;
}

.potensi-public .potensi-hint {
    flex-shrink: 0;
    font-size: 0.68rem;
    line-height: 1.3;
}

.potensi-public .potensi-copy {
    position: static;
    height: 100%;
    max-height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    padding-right: 0.15rem;
}

.potensi-public .potensi-hero {
    aspect-ratio: 2.35 / 1;
    margin-bottom: 0.45rem;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(8, 36, 58, 0.1);
}

.potensi-public .potensi-hero-cap strong {
    font-size: 0.92rem;
}

.potensi-public .potensi-kicker {
    font-size: 0.6rem;
    margin: 0 0 0.18rem;
}

.potensi-public .potensi-title {
    font-size: clamp(1.1rem, 1.7vw, 1.4rem);
    margin: 0 0 0.3rem;
    line-height: 1.1;
}

.potensi-public .potensi-rule {
    width: 72px;
    height: 2px;
    margin-bottom: 0.45rem;
}

.potensi-public .potensi-score {
    gap: 0.65rem;
    margin-bottom: 0.45rem;
    padding: 0.5rem 0.65rem;
    border-radius: 14px;
}

.potensi-public .potensi-score-ring {
    width: 56px;
    height: 56px;
}

.potensi-public .potensi-score-core strong {
    font-size: 0.98rem;
}

.potensi-public .potensi-score-core span {
    font-size: 0.52rem;
}

.potensi-public .potensi-chip {
    font-size: 0.66rem;
    padding: 0.22rem 0.55rem;
}

.potensi-public .potensi-score-copy p {
    font-size: 0.72rem;
}

.potensi-public .potensi-chart {
    margin-bottom: 0.45rem;
    padding: 0.5rem 0.6rem 0.55rem;
    border-radius: 12px;
}

.potensi-public .potensi-chart-head {
    margin-bottom: 0.45rem;
}

.potensi-public .potensi-chart-head strong {
    font-size: 0.74rem;
}

.potensi-public .potensi-bars {
    gap: 0.32rem;
}

.potensi-public .potensi-bar {
    grid-template-columns: minmax(58px, 70px) minmax(0, 1fr) 26px;
    gap: 0.3rem;
}

.potensi-public .potensi-bar .lbl,
.potensi-public .potensi-bar em {
    font-size: 0.65rem;
}

.potensi-public .potensi-bar i {
    height: 6px;
}

.potensi-public .potensi-meta {
    margin-bottom: 0.3rem;
}

.potensi-public .potensi-meta strong {
    font-size: 0.86rem;
}

.potensi-public .potensi-meta span {
    font-size: 0.72rem;
}

.potensi-public .potensi-desc {
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0 0 0.4rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.potensi-public .potensi-items-wrap {
    margin-bottom: 0.4rem;
}

.potensi-public .potensi-items-label {
    margin-bottom: 0.3rem;
    font-size: 0.62rem;
}

.potensi-public .potensi-items {
    gap: 0.28rem;
}

.potensi-public .potensi-items li {
    padding: 0.2rem 0.48rem;
    font-size: 0.66rem;
}

.potensi-public .potensi-legend-note {
    gap: 0.22rem;
    padding-top: 0.4rem;
    margin-top: 0.15rem;
}

.potensi-public .potensi-legend-note li {
    font-size: 0.7rem;
    gap: 0.35rem;
}

.potensi-public .potensi-legend-note .dot {
    width: 8px;
    height: 8px;
}

.potensi-public .potensi-map-tools {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin: 0.45rem 0.45rem 0;
    padding: 0.3rem 0.4rem;
}

/* Layar pendek: sembunyikan elemen sekunder agar tetap 1 viewport */
@media (max-height: 780px) {
    .potensi-public .potensi-hero {
        aspect-ratio: 2.8 / 1;
    }
    .potensi-public .potensi-kicker,
    .potensi-public .potensi-rule {
        display: none;
    }
    .potensi-public .potensi-desc {
        -webkit-line-clamp: 1;
    }
}

@media (max-height: 700px) {
    .potensi-public .potensi-hero,
    .potensi-public .section-kicker {
        display: none;
    }
    .potensi-public .potensi-card {
        padding: 0.55rem 0.65rem 0.6rem;
    }
    .potensi-public .panel-head {
        margin-bottom: 0.4rem;
        padding-bottom: 0.35rem;
    }
}

@media (max-width: 960px) {
    .potensi-public .potensi-card {
        height: auto;
        max-height: none;
        overflow: visible;
        padding: 0.85rem;
    }
    .potensi-public .potensi-layout {
        grid-template-columns: 1fr;
        flex: none;
    }
    .potensi-public .potensi-copy {
        order: -1;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .potensi-public .potensi-map-pane,
    .potensi-public .potensi-stage {
        height: auto;
        min-height: 0;
    }
    .potensi-public .potensi-stage-body {
        min-height: 420px;
    }
    .potensi-public .potensi-map {
        height: min(420px, 52dvh) !important;
        min-height: 320px !important;
    }
    .potensi-public .potensi-submenu {
        max-height: min(200px, 40%);
    }
    .potensi-public .potensi-hero {
        display: block;
        aspect-ratio: 2.2 / 1;
    }
    .potensi-public .potensi-desc {
        -webkit-line-clamp: 3;
    }
    .potensi-public .potensi-map-tools {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin: 0.55rem 0.55rem 0;
    }
}
