/* Şehrin Enleri — sakin, gruplu liste. Mobil, tablet, masaüstü ve uygulama kabuğunda aynı yapı. */
.cb {
    --cb-ink: var(--color-text, #0F172A);
    --cb-muted: #6B6661;
    --cb-line: #E7E5E2;
    --cb-surface: #fff;
    --cb-accent: var(--color-primary, #FFE800);
    --cb-on-accent: var(--color-on-primary, #0F172A);
    padding: 12px 0 calc(24px + env(safe-area-inset-bottom, 0px));
}
.cb__wrap {
    max-width: 760px;
    padding: 0 16px;
}
.cb-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Başlık + il seçici */
.cb__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 14px;
}
.cb__title {
    margin: 0;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.cb__lead {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--cb-muted);
}
.cb__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}
.cb-city {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
}
.cb-city__label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--cb-muted);
    font-size: 13px;
    margin: 0;
}
.cb-city__select {
    appearance: none;
    -webkit-appearance: none;
    min-height: 44px;
    max-width: 180px;
    padding: 0 30px 0 32px;
    border: 1px solid var(--cb-line);
    border-radius: 12px;
    background: var(--cb-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236B6661' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--cb-ink);
    font: inherit;
    font-size: 16px; /* iOS: odakta sayfa yakınlaşmasın */
    font-weight: 600;
}
.cb-city__go {
    margin-left: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: var(--cb-accent);
    color: var(--cb-on-accent);
    font-weight: 600;
}
.cb-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--cb-line);
    border-radius: 12px;
    background: var(--cb-surface);
    color: var(--cb-ink);
    font-size: 16px;
    cursor: pointer;
    list-style: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.cb-iconbtn::-webkit-details-marker { display: none; }
.cb-iconbtn:hover { background: #F6F5F3; }
.cb-iconbtn:active { transform: scale(0.96); }
.cb-iconbtn.is-on { background: var(--cb-accent); border-color: transparent; color: var(--cb-on-accent); }

/* Kategori çipleri */
.cb-chips {
    display: flex;
    gap: 8px;
    margin: 0 -16px;
    padding: 2px 16px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.cb-chips::-webkit-scrollbar { display: none; }
.cb-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--cb-line);
    border-radius: 999px;
    background: var(--cb-surface);
    color: var(--cb-ink);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.cb-chip.is-on {
    background: var(--cb-ink);
    border-color: var(--cb-ink);
    color: #fff;
}
.cb-chip:hover { color: inherit; }
.cb-chip.is-on:hover { color: #fff; }

/* Segment kontrol + sıralama */
.cb-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 10px;
}
.cb-tabs {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 3px;
    border-radius: 12px;
    background: #E9E7E4;
}
.cb-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 4px;
    border-radius: 9px;
    color: var(--cb-muted);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.18s ease, color 0.18s ease;
}
.cb-tab:hover { color: var(--cb-ink); }
.cb-tab.is-on {
    background: var(--cb-surface);
    color: var(--cb-ink);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.cb-sort { position: relative; flex: none; }
.cb-sort__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    min-width: 210px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--cb-line);
    border-radius: 14px;
    background: var(--cb-surface);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}
.cb-sort__opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 9px;
    color: var(--cb-ink);
    font-size: 15px;
    text-decoration: none;
}
.cb-sort__opt:hover { background: #F6F5F3; color: var(--cb-ink); }
.cb-sort__opt.is-on { font-weight: 700; }
.cb-sort__opt.is-on::after { content: "✓"; font-weight: 700; }

.cb-notice {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #F3F1EE;
    color: var(--cb-muted);
    font-size: 13px;
    line-height: 1.4;
}
.cb-notice[hidden] { display: none; }

/* Liste: gruplu, çerçevesiz satırlar */
.cb-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--cb-line);
    border-radius: 16px;
    background: var(--cb-surface);
    overflow: hidden;
}
.cb-item + .cb-item { border-top: 1px solid var(--cb-line); }
.cb-card {
    display: grid;
    grid-template-columns: 24px 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 12px 14px;
    color: var(--cb-ink);
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease;
}
.cb-card:hover,
.cb-card:focus-visible { background: #FAF9F7; color: var(--cb-ink); outline: none; }
.cb-card:focus-visible { box-shadow: inset 0 0 0 2px var(--cb-ink); }
.cb-card:active { background: #F3F1EE; }
.cb-card__rank {
    font-size: 15px;
    font-weight: 700;
    color: var(--cb-muted);
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.cb-item:nth-child(-n+3) .cb-card__rank { color: var(--cb-ink); }
.cb-card__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #EFEDEA;
    color: var(--cb-ink);
    font-size: 17px;
    font-weight: 700;
}
.cb-card__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cb-card__name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cb-card__meta {
    font-size: 13px;
    line-height: 1.35;
    color: var(--cb-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cb-card__value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.cb-card__value small { font-size: 11px; font-weight: 500; color: var(--cb-muted); }
.cb-card__value .fa-star { color: #E0A100; font-size: 13px; margin-right: 2px; }
.cb-card__value--new { font-size: 13px; font-weight: 600; color: var(--cb-muted); }

.cb-empty {
    padding: 36px 16px;
    text-align: center;
    border: 1px dashed var(--cb-line);
    border-radius: 16px;
    color: var(--cb-muted);
}
.cb-empty p { margin: 0 0 14px; }
.cb-empty__cta {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    background: var(--cb-accent);
    color: var(--cb-on-accent);
    font-weight: 600;
    text-decoration: none;
}
.cb-foot { margin: 10px 4px 0; font-size: 12px; color: var(--cb-muted); }

.cb__region { transition: opacity 0.15s ease; }
.cb__region.is-loading { opacity: 0.55; pointer-events: none; }

/* Dar ekran */
@media (max-width: 480px) {
    .cb__head { flex-direction: column; align-items: stretch; }
    .cb__tools { justify-content: space-between; }
    .cb-city { flex: 1; }
    .cb-city__select { width: 100%; max-width: none; }
    .cb__title { font-size: 24px; }
    .cb-card { grid-template-columns: 20px 40px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
    .cb-card__avatar { width: 40px; height: 40px; font-size: 15px; }
}

/* Tablet / masaüstü: ortalanmış sütun, geniş boşluk */
@media (min-width: 900px) {
    .cb { padding-top: 28px; }
    .cb__wrap { max-width: 820px; }
    .cb__title { font-size: 32px; }
    .cb-chips { margin: 0; padding: 2px 0 12px; flex-wrap: wrap; overflow: visible; }
    .cb-card { min-height: 76px; padding: 14px 20px; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .cb-tab, .cb-card, .cb__region { transition: none; }
}
