.catalog-layout--territory.is-map-mode {
    grid-template-columns: minmax(0, 1fr);
}

.catalog-layout--territory.is-map-mode > .catalog-satisfaction {
    display: none;
}

.catalog-view-panel[hidden],
.catalog-territory[hidden] {
    display: none !important;
}

.catalog-presentation-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 22px 0 14px;
    padding: 10px 10px 10px 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.catalog-presentation-switch__intro {
    display: grid;
    gap: 2px;
}

.catalog-presentation-switch__intro span {
    color: var(--brand-700, #0369a1);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.catalog-presentation-switch__intro strong {
    color: #334155;
    font-size: 0.9rem;
}

.catalog-presentation-switch__tabs {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 13px;
    background: #edf3f8;
}

.catalog-presentation-switch__button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border: 0;
    border-radius: 10px;
    color: #64748b;
    background: transparent;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 750;
    white-space: nowrap;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.catalog-presentation-switch__button svg {
    width: 18px;
    height: 18px;
}

.catalog-presentation-switch__button[aria-selected='true'] {
    color: #0f172a;
    background: #fff;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.1);
}

.catalog-presentation-switch__button:hover,
.catalog-presentation-switch__button:focus-visible {
    color: var(--brand-700, #0369a1);
    outline: none;
}

.catalog-presentation-switch__button:active {
    transform: scale(0.98);
}

.catalog-territory {
    position: relative;
    isolation: isolate;
    margin: 14px 0 38px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: clamp(22px, 3vw, 34px);
    color: #0f172a;
    background-color: #f8fbff;
    background:
        radial-gradient(circle at 9% 5%, rgba(186, 230, 253, 0.62), transparent 31%),
        radial-gradient(circle at 93% 88%, rgba(219, 234, 254, 0.78), transparent 34%),
        linear-gradient(145deg, #ffffff 0%, #f5f9fd 50%, #edf5fb 100%);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.1);
}

.catalog-territory::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0.32;
    background-image: radial-gradient(rgba(14, 116, 144, 0.2) 0.7px, transparent 0.7px);
    background-size: 18px 18px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
    content: '';
}

.catalog-territory__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: clamp(24px, 3vw, 36px) clamp(24px, 4vw, 50px) 12px;
}

.catalog-territory__heading {
    max-width: 790px;
}

.catalog-territory__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 11px;
    color: var(--brand-700, #0369a1);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.catalog-territory__eyebrow::before {
    width: 23px;
    height: 1px;
    background: currentColor;
    content: '';
}

.catalog-territory__header h3 {
    max-width: 720px;
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.65rem, 2.6vw, 2.6rem);
    font-weight: 720;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.catalog-territory__header p:last-child {
    max-width: 700px;
    margin: 15px 0 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.65;
}

.catalog-territory__proofs {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
}

.catalog-territory__proof {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    color: #334155;
    background: rgba(255, 255, 255, 0.76);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    backdrop-filter: blur(14px);
}

.catalog-territory__proof-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.12), 0 0 18px rgba(52, 211, 153, 0.28);
}

.catalog-territory__body {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(410px, 0.92fr);
    gap: clamp(16px, 2.2vw, 28px);
    padding: 12px clamp(16px, 2.7vw, 32px) 24px;
}

.catalog-territory__map-stage {
    position: relative;
    display: grid;
    min-height: 640px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 25px;
    background:
        linear-gradient(rgba(14, 116, 144, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 116, 144, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 50% 48%, rgba(186, 230, 253, 0.42), rgba(255, 255, 255, 0.84) 64%);
    background-size: 48px 48px, 48px 48px, auto;
}

.catalog-territory__map-stage::after {
    position: absolute;
    inset: 10% 14%;
    z-index: 0;
    border-radius: 50%;
    background: rgba(125, 211, 252, 0.26);
    background: color-mix(in srgb, var(--brand-500, #0ea5e9) 16%, transparent);
    filter: blur(65px);
    content: '';
    pointer-events: none;
}

.catalog-territory__map-canvas {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(88%, 670px);
    min-height: 535px;
    place-items: center;
}

.catalog-territory__map-canvas svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 24px 32px rgba(71, 85, 105, 0.2));
}

.catalog-territory__map-canvas path {
    fill: #dce6ef;
    stroke: rgba(255, 255, 255, 0.94);
    stroke-width: 1.05;
    vector-effect: non-scaling-stroke;
    transition: fill 170ms ease, stroke 170ms ease, filter 170ms ease, opacity 170ms ease;
}

.catalog-territory__map-canvas path.is-available {
    fill: var(--brand-500, #0ea5e9);
    fill: color-mix(in srgb, var(--brand-500, #0ea5e9) 76%, #38bdf8);
    stroke: rgba(255, 255, 255, 0.96);
    stroke-width: 1.15;
    cursor: pointer;
    filter: drop-shadow(0 0 5px color-mix(in srgb, var(--brand-400, #38bdf8) 46%, transparent));
}

.catalog-territory__map-canvas path.is-available:hover,
.catalog-territory__map-canvas path.is-available:focus-visible {
    fill: #7dd3fc;
    fill: color-mix(in srgb, var(--brand-300, #7dd3fc) 78%, #fff);
    stroke: #fff;
    outline: none;
    filter: brightness(1.08) drop-shadow(0 0 11px color-mix(in srgb, var(--brand-300, #7dd3fc) 68%, transparent));
}

.catalog-territory__map-canvas path.is-selected {
    fill: var(--brand-700, #0369a1);
    stroke: #fff;
    stroke-width: 2.5;
    filter: drop-shadow(0 6px 14px rgba(3, 105, 161, 0.3));
}

.catalog-territory__loading {
    display: grid;
    width: min(72%, 430px);
    aspect-ratio: 1.04;
    place-items: center;
    border-radius: 46% 54% 51% 49% / 41% 44% 56% 59%;
    color: #64748b;
    background: rgba(224, 242, 254, 0.76);
    font-size: 0.85rem;
    animation: catalog-map-breathe 1.8s ease-in-out infinite;
}

.catalog-territory.is-ready .catalog-territory__loading {
    display: none;
}

.catalog-territory__map-fallback {
    max-width: 350px;
    margin: 0;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.catalog-territory__legend {
    position: absolute;
    z-index: 3;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 10px 13px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 15px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    font-size: 0.72rem;
    backdrop-filter: blur(16px);
}

.catalog-territory__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.catalog-territory__legend-swatch {
    width: 13px;
    height: 13px;
    border: 1px solid rgba(100, 116, 139, 0.28);
    border-radius: 4px;
    background: #dce6ef;
}

.catalog-territory__legend-swatch--active {
    background: var(--brand-500, #0ea5e9);
    box-shadow: 0 0 12px color-mix(in srgb, var(--brand-400, #38bdf8) 55%, transparent);
}

.catalog-territory__attribution {
    margin-left: auto;
    color: #94a3b8;
}

.catalog-territory__attribution a {
    color: inherit;
}

.catalog-territory__tooltip {
    position: absolute;
    z-index: 8;
    top: 0;
    left: 0;
    min-width: 150px;
    max-width: 230px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 13px;
    color: #f8fafc;
    background: rgba(2, 8, 23, 0.92);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
    font-size: 0.73rem;
    line-height: 1.45;
    pointer-events: none;
    transform: translate(12px, 12px);
    backdrop-filter: blur(18px);
}

.catalog-territory__tooltip strong,
.catalog-territory__tooltip span {
    display: block;
}

.catalog-territory__tooltip span {
    margin-top: 2px;
    color: rgba(226, 232, 240, 0.68);
}

.catalog-territory__tooltip[aria-hidden='true'] {
    display: none;
}

.catalog-territory__panel {
    display: flex;
    min-height: 640px;
    flex-direction: column;
    padding: clamp(24px, 3vw, 34px);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(20px);
}

.catalog-territory__panel-code {
    display: inline-flex;
    width: fit-content;
    min-height: 29px;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 999px;
    color: var(--brand-700, #0369a1);
    background: rgba(14, 165, 233, 0.08);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.catalog-territory__panel h4 {
    margin: 19px 0 9px;
    color: #0f172a;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.14;
    letter-spacing: -0.035em;
}

.catalog-territory__panel-copy {
    min-height: 48px;
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.58;
}

.catalog-territory__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 23px 0;
}

.catalog-territory__metric {
    padding: 14px;
    border: 1px solid rgba(14, 165, 233, 0.12);
    border-radius: 16px;
    background: linear-gradient(145deg, #f0f9ff, #f8fafc);
}

.catalog-territory__metric strong,
.catalog-territory__metric span {
    display: block;
}

.catalog-territory__metric strong {
    color: var(--brand-700, #0369a1);
    font-size: 1.35rem;
    line-height: 1;
}

.catalog-territory__metric span {
    margin-top: 7px;
    color: #64748b;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.catalog-territory__next-label {
    margin: 1px 0 10px;
    color: #64748b;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.catalog-territory__sessions {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    max-height: 330px;
    overflow-y: auto;
    padding-right: 4px;
    list-style: none;
    scrollbar-color: rgba(14, 165, 233, 0.36) transparent;
}

.catalog-territory__session-empty {
    padding: 15px;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    border-radius: 15px;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.5;
}

.catalog-territory__session-card {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 15px;
    color: #0f172a;
    background: #fff;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.catalog-territory__session-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
    background: #fbfdff;
    transform: translateY(-1px);
}

.catalog-territory__session-content {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.catalog-territory__session-content strong {
    overflow: hidden;
    color: #1e293b;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-territory__session-content span {
    color: #64748b;
    font-size: 0.75rem;
}

.catalog-territory__session-button {
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--brand-600, #0284c7);
    border-radius: 10px;
    color: #fff;
    background: var(--brand-600, #0284c7);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}

.catalog-territory__session-button:hover,
.catalog-territory__session-button:focus-visible {
    border-color: var(--brand-700, #0369a1);
    outline: none;
    color: #fff;
    background: var(--brand-700, #0369a1);
}

.catalog-territory__panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: auto;
    padding-top: 23px;
}

.catalog-territory__action {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 13px;
    color: #475569;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 750;
    cursor: pointer;
}

.catalog-territory__action--primary {
    border-color: var(--brand-600, #0284c7);
    color: #fff;
    background: var(--brand-600, #0284c7);
}

.catalog-territory__action[hidden] {
    display: none;
}

.catalog-territory__overseas {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 clamp(24px, 4.5vw, 58px) clamp(28px, 4vw, 40px);
}

.catalog-territory__overseas-label {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.catalog-territory__overseas-list {
    display: flex;
    min-width: 0;
    flex: 1;
    gap: 8px;
    overflow-x: auto;
    padding: 3px 1px 7px;
    scrollbar-width: thin;
}

.catalog-territory__overseas-button {
    display: inline-flex;
    min-width: max-content;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 11px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.68);
    font-size: 0.75rem;
}

.catalog-territory__overseas-button.is-available {
    border-color: rgba(125, 211, 252, 0.35);
    border-color: color-mix(in srgb, var(--brand-300, #7dd3fc) 35%, transparent);
    color: var(--brand-700, #0369a1);
    background: rgba(14, 165, 233, 0.1);
    background: color-mix(in srgb, var(--brand-500, #0ea5e9) 10%, transparent);
    cursor: pointer;
}

.catalog-territory__overseas-button.is-selected {
    border-color: var(--brand-600, #0284c7);
    color: #fff;
    background: var(--brand-600, #0284c7);
}

.catalog-territory__overseas-button:disabled {
    cursor: default;
}

.catalog-training-card[hidden],
.catalog-session[hidden] {
    display: none !important;
}

@keyframes catalog-map-breathe {
    0%, 100% { opacity: 0.58; transform: scale(0.98); }
    50% { opacity: 0.9; transform: scale(1.01); }
}

@media (max-width: 1080px) {
    .catalog-territory__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .catalog-territory__proofs {
        justify-content: flex-start;
    }

    .catalog-territory__body {
        grid-template-columns: 1fr;
    }

    .catalog-territory__panel {
        min-height: 0;
    }
}

@media (max-width: 680px) {
    .catalog-presentation-switch {
        align-items: stretch;
        flex-direction: column;
        padding: 14px;
    }

    .catalog-presentation-switch__tabs {
        width: 100%;
    }

    .catalog-presentation-switch__button {
        padding-inline: 9px;
        white-space: normal;
    }

    .catalog-territory {
        margin-inline: -4px;
        border-radius: 25px;
    }

    .catalog-territory__header {
        padding: 25px 20px 13px;
    }

    .catalog-territory__header h3 {
        font-size: 1.75rem;
    }

    .catalog-territory__body {
        padding: 8px 10px 18px;
    }

    .catalog-territory__map-stage {
        min-height: 435px;
        border-radius: 21px;
    }

    .catalog-territory__map-canvas {
        width: 94%;
        min-height: 360px;
        padding-bottom: 44px;
    }

    .catalog-territory__legend {
        gap: 10px;
        right: 10px;
        bottom: 10px;
        left: 10px;
    }

    .catalog-territory__attribution {
        width: 100%;
        margin-left: 0;
    }

    .catalog-territory__panel {
        padding: 23px 19px;
        border-radius: 21px;
    }

    .catalog-territory__session-card {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .catalog-territory__session-button {
        width: 100%;
    }

    .catalog-territory__overseas {
        align-items: flex-start;
        flex-direction: column;
        padding: 0 20px 26px;
    }

    .catalog-territory__overseas-list {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-territory__loading,
    .catalog-territory__map-canvas path,
    .catalog-territory__session-card,
    .catalog-territory__session-button,
    .catalog-presentation-switch__button {
        animation: none;
        transition: none;
    }
}
