/* Выбор скалодрома: плашка в шапке и нижнее окно */
.v2-gym-row { display: flex; }
.v2-gym-chip {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 36px; padding: 0 12px;
    border: 1px solid var(--c-line); border-radius: 18px; background: var(--c-surface); color: var(--c-text);
    font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.v2-gym-chip.is-static { cursor: default; }
.v2-gym-chip svg { flex-shrink: 0; color: var(--c-text-dim); }
.v2-gym-chip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-header .v2-gym-chip { max-width: 168px; }

.v2-sheet-lock { overflow: hidden; }
.v2-sheet-overlay {
    position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center;
    background: rgba(10, 11, 13, 0.55); padding: 0;
}
.v2-sheet {
    box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 520px; max-height: 88vh; max-height: 88dvh;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0;
    background: var(--c-surface); color: var(--c-text); outline: none;
}
.v2-sheet-grip { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--c-line); }
.v2-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v2-sheet-title { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.v2-sheet-text { margin: 0; color: var(--c-text-dim); font-size: 14px; }
.v2-gym-search { flex: none; width: 100%; box-sizing: border-box; }
.v2-gym-list { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; padding-bottom: 4px; }
.v2-gym-item {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px; text-align: left;
    border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-surface); color: var(--c-text); font: inherit; cursor: pointer;
}
.v2-gym-item.is-current { border-color: var(--c-accent-text); box-shadow: 0 0 0 2px var(--c-accent-soft); }
.v2-gym-cities { flex: none; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.v2-gym-cities:empty { display: none; }
.v2-gym-cities::-webkit-scrollbar { display: none; }
.v2-gym-city-chip {
    flex: none; min-height: 36px; padding: 0 14px; border: 1px solid var(--c-line); border-radius: 18px;
    background: var(--c-surface); color: var(--c-text-dim); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.v2-gym-city-chip.is-active { border-color: transparent; background: var(--c-accent); color: var(--c-accent-ink); }
.v2-gym-city-chip:focus-visible, .v2-gym-item:focus-visible { outline: 3px solid var(--c-text); outline-offset: 2px; }
.v2-gym-group {
    position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: baseline; padding: 8px 4px 4px;
    background: var(--c-surface); color: var(--c-text-dim); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.v2-gym-group-count { font-variant-numeric: tabular-nums; }
.v2-gym-list.is-grouped { gap: 6px; }
.v2-gym-list.is-grouped .v2-gym-item { min-height: 48px; }
.v2-gym-list.is-grouped .v2-gym-city { display: none; }
.v2-gym-pin { flex-shrink: 0; color: var(--c-text-dim); }
.v2-gym-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v2-gym-name { font-weight: 700; overflow-wrap: anywhere; }
.v2-gym-city { font-size: 13px; color: var(--c-text-dim); }
@media (min-width: 640px) {
    .v2-sheet-overlay { align-items: center; }
    .v2-sheet { border-radius: 24px; }
}
/* Панель вкладок (z-index 10000) не должна перекрывать окно выбора */
body:has(.v2-sheet-overlay) .v2-tabbar { display: none; }
.v2-sheet-overlay { z-index: 10001; }
