.zones-screen {
    --zones-fixed-header-height: clamp(170px, 16vw, 240px);
    max-width: 100%;
    overflow-x: hidden;
}

.zones-screen,
.zones-screen *,
.zones-screen *::before,
.zones-screen *::after {
    box-sizing: border-box;
}

.zones-screen .landing-page {
    display: block;
    padding: 0 20px 20px;
    overflow-x: clip;
    height: calc(100vh - 72px);
    overflow-y: hidden;
}

.zones-screen .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
    z-index: 40;
    padding: 20px 20px 0;
    background: linear-gradient(
        to bottom,
        rgba(244, 244, 244, 1) 0%,
        rgba(244, 244, 244, 0.95) 55%,
        rgba(244, 244, 244, 0) 100%
    );
    pointer-events: none;
}

.zones-screen .site-header .title-block {
    pointer-events: auto;
    min-width: 0;
}

.zones-page {
    width: 100%;
    min-width: 0;
    display: grid;
    justify-items: stretch;
    margin-top: calc(var(--zones-fixed-header-height) + 20px);
    height: calc(100% - var(--zones-fixed-header-height) - 20px);
    min-height: 0;
}

.zones-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 2px solid #2a2a2a;
    background: #f7f4ef;
    box-shadow: 4px 4px 0 #2a2a2a;
    padding: clamp(16px, 2vw, 28px);
    height: 100%;
    overflow: auto;
}

.zones-title {
    margin: 0;
    text-transform: uppercase;
    font-size: clamp(1.6rem, 4.2vw, 2.4rem);
    line-height: 0.95;
}

.zones-copy {
    margin: 12px 0 0;
    font-size: 1rem;
    color: #242424;
}

.zones-note {
    margin: 10px 0 0;
    font-size: 0.92rem;
    color: #5f5f5f;
}

.zones-section {
    margin-top: 16px;
    border: 1px solid #2a2a2a;
    background: #f2eee8;
    padding: 12px;
    display: grid;
    gap: 12px;
}

.zones-section--retrieval[hidden] {
    display: none;
}

.zones-section-title {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
}

.zones-address-form {
    display: grid;
    gap: 6px;
}

.zones-search-area[hidden] {
    display: none;
}

.zones-grid {
    margin-top: 2px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 12px;
}

.zones-field {
    position: relative;
    border: 0;
    border-left: 3px solid #2a2a2a;
    background: #f7f4ef;
    padding: 10px;
    display: grid;
    gap: 6px;
}

.zones-label {
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: 0.72rem;
    color: #5f5f5f;
}

.zones-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.zones-help-toggle {
    border: 1px solid #2a2a2a;
    background: #f7f4ef;
    color: #121212;
    width: 18px;
    height: 18px;
    line-height: 1;
    padding: 0;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

.zones-help-toggle:hover,
.zones-help-toggle:focus-visible {
    color: #d64b2a;
    border-color: #d64b2a;
    outline: none;
}

.zones-help-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 8px;
    z-index: 12;
    width: min(300px, calc(100vw - 72px));
    border: 2px solid #2a2a2a;
    box-shadow: 4px 4px 0 rgba(18, 18, 18, 0.82);
    background: #fffef9;
    padding: 10px;
    display: grid;
    gap: 4px;
    overflow: auto;
}

.zones-help-panel.zones-help-panel--up {
    top: auto;
    bottom: calc(100% + 6px);
}

.zones-help-panel[hidden] {
    display: none !important;
}

.zones-field.is-help-open .zones-help-toggle {
    color: #d64b2a;
    border-color: #d64b2a;
}

.zones-help-text {
    margin: 0;
    font-size: 0.76rem;
    color: #3f3f3f;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0.01em;
}

.zones-help-more {
    justify-self: start;
    border: 1px solid #2a2a2a;
    background: #f7f4ef;
    color: #121212;
    text-transform: lowercase;
    font: inherit;
    font-size: 0.71rem;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    cursor: pointer;
}

.zones-help-more:hover,
.zones-help-more:focus-visible {
    color: #d64b2a;
    border-color: #d64b2a;
    outline: none;
}

.zones-help-deep {
    border-top: 1px solid #cbc2b5;
    padding-top: 5px;
    display: grid;
    gap: 4px;
}

.zones-help-deep[hidden] {
    display: none !important;
}

.zones-help-source {
    margin: 0;
    font-size: 0.7rem;
    color: #6a5f50;
    text-transform: none;
    letter-spacing: 0;
}

.zones-search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.zones-input {
    border: 0;
    border-bottom: 1px solid #6e6e6e;
    background: transparent;
    color: #121212;
    font: inherit;
    font-size: 1.02rem;
    padding: 6px 2px;
    outline: none;
    width: 100%;
}

select.zones-input {
    appearance: none;
    padding-right: 20px;
}

.zones-input:disabled {
    opacity: 0.6;
}

.zones-input:focus {
    border-bottom-color: #d64b2a;
}

.zones-button {
    border: 2px solid #121212;
    background: #f7f4ef;
    color: #121212;
    text-transform: uppercase;
    font: inherit;
    font-size: 0.73rem;
    letter-spacing: 0.07em;
    font-weight: 700;
    padding: 7px 10px;
    cursor: pointer;
}

.zones-button:hover,
.zones-button:focus-visible {
    border-color: #d64b2a;
    color: #d64b2a;
    outline: none;
}

.zones-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.zones-button--inline {
    justify-self: start;
    margin-top: 6px;
}

.zones-status {
    margin: 0;
    font-size: 0.84rem;
    color: #4f4f4f;
}

.zones-status--success {
    color: #2a7a4b;
}

.zones-status--error {
    color: #d64b2a;
}

.zones-status-hint {
    margin: -4px 0 2px;
    font-size: 0.78rem;
    color: #7a3b2a;
}

.zones-status-hint[hidden] {
    display: none;
}

.zones-status-hint a {
    color: #7a3b2a;
}

.zones-status-hint a:hover,
.zones-status-hint a:focus-visible {
    color: #d64b2a;
    outline: none;
}

.zones-results,
.zones-confirmed {
    border: 1px solid #2a2a2a;
    background: #f7f4ef;
    padding: 10px;
}

.zones-field .zones-results {
    margin-top: 4px;
}

.zones-results[hidden] {
    display: none;
}

.zones-results-title {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: 0.72rem;
    color: #5f5f5f;
}

.zones-results-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 7px;
}

.zones-city-suggestions {
    margin-top: 6px;
    border: 1px solid #cfc7bb;
    background: #f2eee8;
    padding: 8px;
}

.zones-city-suggestions[hidden] {
    display: none;
}

.zones-city-suggestions-list {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.zones-city-suggestion-button {
    border: 1px solid #2a2a2a;
    background: #f7f4ef;
    color: #121212;
    font: inherit;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    padding: 4px 8px;
    cursor: pointer;
}

.zones-city-suggestion-button:hover,
.zones-city-suggestion-button:focus-visible {
    border-color: #d64b2a;
    color: #d64b2a;
    outline: none;
}

.zones-result-item {
    display: grid;
    gap: 4px;
    border-left: 3px solid #dcdcdc;
    padding: 4px 0 4px 8px;
}

.zones-result-address {
    margin: 0;
    font-size: 0.92rem;
    color: #121212;
}

.zones-result-meta {
    margin: 0;
    font-size: 0.75rem;
    color: #5f5f5f;
}

.zones-grid--retrieval {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.zones-result-card {
    position: relative;
    border: 1px solid #2a2a2a;
    background: #f7f4ef;
    padding: 10px;
    display: grid;
    gap: 6px;
}

.zones-result-card[data-refresh-target] {
    padding-right: 42px;
}

.zones-card-shelf-toggle {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 16px;
    height: 24px;
    border: 1px solid #2a2a2a;
    background: #f7f4ef;
    color: #2a2a2a;
    font: inherit;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    z-index: 2;
}

.zones-card-shelf-toggle:hover,
.zones-card-shelf-toggle:focus-visible {
    color: #d64b2a;
    border-color: #d64b2a;
    outline: none;
}

.zones-card-shelf {
    position: absolute;
    right: 8px;
    top: 34px;
    width: 28px;
    min-height: 28px;
    border: 1px solid #2a2a2a;
    background: #f2eee8;
    display: grid;
    place-items: center;
    z-index: 2;
}

.zones-card-shelf[hidden] {
    display: none;
}

.zones-card-refresh {
    width: 22px;
    height: 22px;
    border: 1px solid #2a2a2a;
    background: #f7f4ef;
    color: #2a2a2a;
    font: inherit;
    font-size: 0.83rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.zones-card-refresh:hover,
.zones-card-refresh:focus-visible {
    color: #d64b2a;
    border-color: #d64b2a;
    outline: none;
}

.zones-property-link {
    color: #121212;
    text-decoration: underline;
    font-size: 0.9rem;
}

.zones-property-link:hover,
.zones-property-link:focus-visible {
    color: #d64b2a;
    outline: none;
}

.zones-select-button {
    justify-self: start;
    border: 1px solid #2a2a2a;
    background: #f7f4ef;
    color: #121212;
    text-transform: uppercase;
    font: inherit;
    font-size: 0.69rem;
    letter-spacing: 0.06em;
    padding: 4px 8px;
    cursor: pointer;
}

.zones-select-button:hover,
.zones-select-button:focus-visible {
    border-color: #ef8a24;
    color: #ef8a24;
    outline: none;
}

.zones-select-button.is-primary {
    border-color: #d64b2a;
    color: #d64b2a;
}

.zones-confirmed {
    border-left: 3px solid #2a7a4b;
    background: #eef7ef;
}

.zones-confirmed-address {
    margin: 8px 0 0;
    font-size: 0.94rem;
    color: #121212;
}

.zones-confirmed-meta {
    margin: 4px 0 0;
    font-size: 0.76rem;
    color: #4f4f4f;
}

.zones-confirmed .zones-select-button {
    margin-top: 8px;
}

.panel-rise {
    animation: panelRise 420ms ease both;
}

.zones-modal[hidden] {
    display: none;
}

.zones-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 14px;
}

.zones-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, 0.55);
}

.zones-modal__dialog {
    position: relative;
    width: min(1100px, 98vw);
    max-height: 92vh;
    overflow: auto;
    border: 2px solid #2a2a2a;
    background: #f7f4ef;
    box-shadow: 4px 4px 0 rgba(18, 18, 18, 0.25);
    padding: 14px;
    display: grid;
    gap: 12px;
}

.zones-modal__header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.zones-modal__title {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.94rem;
}

.zones-grid--modal {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.zones-modal__actions {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.zones-modal__results {
    border: 1px solid #2a2a2a;
    background: #f2eee8;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.zones-modal__table {
    display: grid;
    gap: 4px;
}

.zones-modal__section-title {
    margin: 8px 0 2px;
    border-top: 1px solid #d4cec4;
    padding-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    color: #5f5f5f;
}

.zones-modal__row {
    display: grid;
    grid-template-columns: minmax(180px, 320px) 1fr;
    gap: 8px;
    border-bottom: 1px solid #ececec;
    padding-bottom: 4px;
}

.zones-modal__key {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.72rem;
    color: #5f5f5f;
}

.zones-modal__val {
    font-size: 0.82rem;
    color: #121212;
}

@keyframes panelRise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .zones-screen {
        --zones-fixed-header-height: clamp(170px, 46vw, 250px);
    }

    .zones-screen .landing-page {
        padding: 0 12px 12px;
    }

    .zones-screen .site-header {
        padding: 12px 12px 0;
    }

    .zones-page {
        margin-top: calc(var(--zones-fixed-header-height) + 12px);
        height: calc(100% - var(--zones-fixed-header-height) - 12px);
    }

    .zones-grid {
        grid-template-columns: 1fr;
    }

    .zones-modal__row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .zones-search-row {
        grid-template-columns: 1fr;
    }
}
