.food-atlas {
    width: 100%;
    margin: 2rem auto;
    padding: 0 1rem;
}
.food-atlas button, .food-atlas input, .food-atlas select {
    font: inherit;
    color: inherit;
}
.food-atlas button:focus-visible, .food-atlas a:focus-visible,
.china-region:focus-visible, .restaurant-dot:focus-visible {
    outline: 2px solid var(--border-color);
    outline-offset: 3px;
}
.atlas-heading {
    margin-bottom: 1rem;
}
.atlas-back {
    font-size: var(--font-small-size);
}
.atlas-heading h1 {
    margin: 0.5rem 0;
}
.atlas-heading p {
    font-size: var(--font-small-size);
    color: var(--font-muted-color);
}
.atlas-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.atlas-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: min(28rem, 100%);
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
}
.atlas-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
}
.atlas-search input::placeholder {
    color: var(--font-muted-color);
}
.atlas-search:focus-within {
    outline: 2px solid var(--border-color);
    outline-offset: 2px;
}
.atlas-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}
.filter-chip {
    padding: 0.25rem 0.5rem;
    background: var(--highlight);
    border-radius: 0;
    font-size: var(--font-small-size) !important;
}
.atlas-reset {
    margin-left: auto;
    font-size: var(--font-small-size) !important;
}
.atlas-reset[hidden], .map-status[hidden] {
    display: none;
}
.atlas-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1.1fr) minmax(0, 1fr);
    height: clamp(500px, calc(100dvh - 280px), 820px);
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
}
.atlas-panel {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.atlas-panel + .atlas-panel {
    border-left: 1px solid var(--border-color);
}
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    min-height: 5rem;
}
.panel-heading h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}
.heading-translation, .panel-hint {
    color: var(--font-muted-color);
    font-size: var(--font-small-size);
    font-weight: normal;
}
.panel-hint {
    text-align: right;
}
.count-pill {
    font-size: var(--font-small-size);
    font-weight: normal;
}
.china-map-wrap {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    position: relative;
}
#china-map {
    width: 100%;
    flex: 1;
    min-height: 180px;
    background: var(--background-color);
    font-family: var(--font-family);
}
.food-atlas .regional-label {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 0.7rem;
    color: var(--background-content-color);
    text-shadow: 1px 1px var(--background-color), -1px -1px var(--background-color);
}
.province-hover {
    min-height: 3rem;
    text-align: center;
    color: var(--font-muted-color);
    font-size: var(--font-small-size);
}
.province-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: var(--font-small-size);
}
.province-picker select {
    max-width: 65%;
    padding: 0.25rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 0;
}
.china-footer, .destination-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--font-muted-color);
}
.china-footer p {
    margin-bottom: 0.25rem;
}
.restaurant-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
}
.restaurant-card {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-family-sans);
}
.restaurant-card:last-child {
    border-bottom: 0;
}
.restaurant-card:hover, .restaurant-card.selected {
    background: var(--highlight);
}
.restaurant-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.restaurant-thumbnail {
    position: relative;
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 0;
    background: var(--highlight);
}
.restaurant-thumbnail iframe {
    width: 180px;
    height: 180px;
    max-width: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
}
.thumbnail-pin {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    color: var(--background-content-color);
}
.restaurant-info {
    flex: 1;
    min-width: 0;
}
.restaurant-name {
    display: block;
    text-align: left;
    font-weight: 600 !important;
    line-height: 1.3;
}
.restaurant-name:hover {
    text-decoration: underline;
}
.restaurant-region {
    margin-left: auto;
    flex: 0 1 35%;
    text-align: right;
    font-size: var(--font-small-size);
    color: var(--font-muted-color);
}
.restaurant-address {
    display: block;
    text-align: left;
    font-size: var(--font-small-size) !important;
    color: var(--font-muted-color) !important;
    text-decoration: underline dotted;
    text-underline-offset: 0.2em;
}
.list-message {
    padding: 1rem;
    color: var(--font-muted-color);
}
.sf-map-wrap {
    flex: 1;
    position: relative;
    min-height: 0;
}
#sf-map {
    width: 100%;
    height: 100%;
    background: var(--highlight);
    font-family: var(--font-family);
}
.map-shortcuts {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 800;
}
.map-shortcuts button {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--background-color);
    font-size: var(--font-small-size);
}
.destination-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.destination-footer button {
    margin-left: auto;
    text-decoration: underline;
}
.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 0;
    background: var(--background-content-color);
}
.district-number {
    color: var(--font-muted-color);
    text-align: center;
    line-height: 24px;
    font-family: var(--font-family);
    pointer-events: none;
}
.restaurant-dot {
    cursor: pointer;
}
.restaurant-dot:hover {
    stroke-width: 4;
}
.food-atlas .leaflet-tooltip {
    font: var(--font-small-size) var(--font-family);
    color: var(--background-content-color);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    box-shadow: none;
}
.food-atlas .leaflet-tooltip::before {
    display: none;
}
.food-atlas .leaflet-control-attribution {
    background: var(--background-color);
    color: var(--font-muted-color);
    font-size: 0.6rem;
}
.food-atlas .leaflet-control-attribution a {
    color: inherit;
}
.food-atlas .leaflet-control-zoom a {
    background: var(--background-color);
    color: var(--background-content-color);
    border-color: var(--border-color);
}
.food-atlas .leaflet-control-zoom {
    border: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
}
.map-status {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    padding: 0.75rem;
    background: var(--background-color);
    font-size: var(--font-small-size);
}
.atlas-about {
    padding: 1rem 0;
    font-size: var(--font-small-size);
}
.atlas-about summary {
    cursor: pointer;
}
.atlas-about > div {
    max-width: 800px;
    padding-top: 0.75rem;
}
.atlas-about p {
    margin-bottom: 0.75rem;
}
.atlas-location-sheet {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 80dvh;
    margin: 0 auto;
    padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: var(--background-color);
    color: var(--background-content-color);
    font-family: var(--font-family-sans);
    overflow-y: auto;
}
.atlas-location-sheet::backdrop {
    background: rgb(0 0 0 / 0.45);
}
.atlas-location-sheet header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.atlas-location-sheet h2 {
    font-size: 1.15rem;
}
.atlas-location-sheet #close-location {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 0;
}
.atlas-location-sheet p {
    margin: 0.5rem 0 1rem;
}
#location-links {
    display: grid;
    gap: 0.25rem;
}
#location-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
    background: transparent;
}
#location-links img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: none;
}
#copy-address {
    min-height: 48px;
    text-decoration: underline;
}
#copy-status:empty {
    display: none;
}
.atlas-mobile-tabs {
    display: none;
}
@media (min-width: 600px) and (max-width: 999px) {
    .atlas-panels {
        grid-template-columns: 1fr;
        height: auto;
    }
    .atlas-panel {
        height: 550px;
    }
    .atlas-panel + .atlas-panel {
        border-left: 0;
        border-top: 1px solid var(--border-color);
    }
}
@media (min-width: 1000px) and (max-width: 1100px) {
    .panel-heading {
        padding: 0.75rem;
    }
    .panel-hint, .heading-translation {
        display: none;
    }
    .restaurant-card {
        padding: 0.75rem;
    }
    .restaurant-thumbnail {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }
    .card-research {
        margin-left: 76px;
    }
}
@media (max-width: 599px) {
    .atlas-heading h1 {
        font-size: 1.5rem;
    }
    .atlas-search {
        width: 100%;
    }
    .atlas-mobile-tabs {
        display: flex;
        gap: 0.25rem;
        margin-bottom: 1rem;
    }
    .atlas-mobile-tabs button {
        flex: 1;
        padding: 0.5rem 0.25rem;
        font-size: var(--font-small-size);
        border-bottom: 1px solid var(--border-color);
    }
    .atlas-mobile-tabs button[aria-pressed=true] {
        background: var(--highlight);
    }
    .atlas-panels {
        display: block;
        height: min(700px, 70dvh);
        min-height: 450px;
    }
    .atlas-panel {
        height: 100%;
        border-left: 0 !important;
    }
    .food-atlas[data-mobile-view=restaurants] .origin-panel, .food-atlas[data-mobile-view=restaurants] .destination-panel,
    .food-atlas[data-mobile-view=china] .restaurants-panel, .food-atlas[data-mobile-view=china] .destination-panel,
    .food-atlas[data-mobile-view=sf] .origin-panel, .food-atlas[data-mobile-view=sf] .restaurants-panel {
        display: none;
    }
}

.food-atlas .leaflet-bar a:first-child,
.food-atlas .leaflet-bar a:last-child {
    border-radius: 0;
}

.food-atlas .map-reset {
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--background-content-color);
    border-radius: 0;
}
