:root {
    --paper: #f6f1e7;
    --paper-soft: #fbf8f1;
    --ink: #202a25;
    --muted: #6f756f;
    --line: rgba(32, 42, 37, 0.12);
    --green: #1f6b4f;
    --green-dark: #174f3d;
    --shop: #e18a35;
    --cafe: #d9574c;
    --restaurant: #7b3652;
    --white: #fff;
    --shadow: 0 16px 42px rgba(38, 47, 41, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, Manrope, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(31, 107, 79, 0.3);
    outline-offset: 2px;
}

.topbar {
    position: relative;
    z-index: 1200;
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(280px, 620px) minmax(210px, 1fr);
    gap: 28px;
    align-items: center;
    height: 84px;
    padding: 0 26px;
    border-bottom: 1px solid var(--line);
    background: rgba(246, 241, 231, 0.94);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    width: max-content;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    flex: 0 0 auto;
    width: 45px;
    height: 45px;
    place-items: center;
    border-radius: 50% 50% 50% 16%;
    color: var(--white);
    background: var(--green);
    box-shadow: 0 8px 18px rgba(31, 107, 79, 0.23);
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    transform: rotate(-4deg);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.05;
}

.brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.search-box {
    display: flex;
    gap: 12px;
    align-items: center;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.search-box:focus-within {
    border-color: rgba(31, 107, 79, 0.4);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(31, 107, 79, 0.08);
}

.search-box > span {
    color: var(--green);
    font-family: Georgia, serif;
    font-size: 28px;
    line-height: 1;
    transform: rotate(-18deg);
}

.search-box input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
}

.search-box kbd {
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    background: var(--paper-soft);
    font-size: 10px;
    font-weight: 600;
}

.header-actions {
    position: relative;
    display: flex;
    gap: 9px;
    justify-content: flex-end;
}

.icon-button,
.account-button {
    min-height: 44px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.62);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.icon-button:hover,
.account-button:hover {
    border-color: rgba(31, 107, 79, 0.35);
    background: var(--white);
    transform: translateY(-1px);
}

.icon-button {
    display: grid;
    width: 44px;
    place-items: center;
    border-radius: 50%;
    color: var(--green);
    font-size: 23px;
    text-decoration: none;
}

.yandex-button {
    color: #fc3f1d;
    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 900;
}

.account-button {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 5px 14px 5px 6px;
    border-radius: 24px;
    font-weight: 700;
}

.account-avatar {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--green);
    font-size: 13px;
}

.account-menu {
    position: absolute;
    top: 54px;
    right: 0;
    width: 240px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.account-menu strong,
.account-menu span {
    display: block;
}

.account-menu span {
    margin: 4px 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.account-menu button {
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 11px;
    background: var(--paper);
    text-align: left;
}

.app-shell {
    position: relative;
    display: grid;
    grid-template-columns: 415px minmax(0, 1fr);
    height: calc(100% - 84px);
}

.sidebar {
    z-index: 500;
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 18px 18px 0;
    border-right: 1px solid var(--line);
    background: var(--paper);
}

.intro-card {
    position: relative;
    display: flex;
    justify-content: space-between;
    min-height: 160px;
    padding: 20px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #f9f7f0;
    background: var(--green-dark);
}

.intro-card::after {
    position: absolute;
    top: -55px;
    right: -52px;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
}

.eyebrow {
    margin: 0 0 8px;
    color: #bcd3c6;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.intro-card h1 {
    max-width: 275px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 500;
    line-height: 1.04;
}

.intro-card > div > p:last-of-type {
    max-width: 295px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    line-height: 1.45;
}

.intro-card .data-note {
    display: block;
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 9px;
}

.city-pulse {
    position: relative;
    flex: 0 0 48px;
    margin: 36px 3px 0 0;
}

.city-pulse i {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 50%;
    animation: pulse-ring 2.4s infinite ease-out;
}

.city-pulse i:nth-child(2) {
    animation-delay: 0.8s;
}

.city-pulse i:nth-child(3) {
    animation-delay: 1.6s;
}

@keyframes pulse-ring {
    0% { opacity: 0.9; transform: scale(0.12); }
    100% { opacity: 0; transform: scale(1); }
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 14px 0;
    padding: 12px 4px;
    border-block: 1px solid var(--line);
}

.quick-stats div {
    text-align: center;
}

.quick-stats div + div {
    border-left: 1px solid var(--line);
}

.quick-stats strong,
.quick-stats span {
    display: block;
}

.quick-stats strong {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 500;
}

.quick-stats span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.filters {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.view-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 12px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.48);
}

.view-tabs button {
    min-height: 34px;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    font-weight: 800;
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.view-tabs button.active {
    color: var(--green-dark);
    background: var(--white);
    box-shadow: 0 4px 12px rgba(32, 42, 37, 0.08);
}

.filter-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
    display: none;
}

.filter-pill,
.favorite-filter {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    background: var(--paper-soft);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.filter-pill {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 18px;
}

.filter-pill.active {
    border-color: var(--green);
    color: var(--white);
    background: var(--green);
}

.dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 1px currentColor;
}

.dot.shop { color: var(--shop); }
.dot.cafe { color: var(--cafe); }
.dot.restaurant { color: var(--restaurant); }

.filter-controls {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 7px;
    margin-top: 9px;
}

.filter-controls label span {
    display: none;
}

.filter-controls select,
.favorite-filter {
    width: 100%;
    min-height: 35px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: 0;
    background-color: var(--paper-soft);
    font-size: 11px;
}

.favorite-filter {
    grid-column: 1 / -1;
    color: var(--restaurant);
}

.favorite-filter[aria-pressed="true"] {
    border-color: rgba(123, 54, 82, 0.35);
    background: #f7eaf0;
}

.results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 2px 9px;
    font-size: 13px;
}

.results-heading button {
    border: 0;
    color: var(--green);
    background: transparent;
    font-size: 11px;
    font-weight: 700;
}

.places-list {
    min-height: 0;
    padding: 0 4px 20px 0;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-color: rgba(31, 107, 79, 0.25) transparent;
    scrollbar-width: thin;
}

.place-card {
    position: relative;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
    text-align: left;
    transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, box-shadow 170ms ease;
    animation: card-in 300ms both;
}

.place-card:hover,
.place-card.active {
    border-color: rgba(31, 107, 79, 0.23);
    background: var(--white);
    box-shadow: 0 9px 25px rgba(39, 47, 42, 0.08);
    transform: translateX(2px);
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.place-symbol {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: 700;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.place-symbol.shop { background: var(--shop); }
.place-symbol.cafe { background: var(--cafe); }
.place-symbol.restaurant { background: var(--restaurant); }

.place-avatar {
    --avatar-accent: var(--green);
    position: relative;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(145deg, hsl(var(--avatar-hue) 54% 55%), var(--avatar-accent));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 7px 16px rgba(32, 42, 37, 0.2);
    font-family: Georgia, serif;
    font-weight: 700;
    line-height: 1;
}

.place-avatar.shop { --avatar-accent: var(--shop); }
.place-avatar.cafe { --avatar-accent: var(--cafe); }
.place-avatar.restaurant { --avatar-accent: var(--restaurant); }

.place-avatar > img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.list-avatar {
    width: 44px;
    height: 44px;
    font-size: 15px;
}

.reviewed-badge {
    position: absolute;
    z-index: 2;
    top: -5px;
    right: -5px;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    border: 3px solid var(--paper-soft);
    border-radius: 50%;
    color: var(--white);
    background: #178251;
    box-shadow: 0 3px 8px rgba(23, 130, 81, 0.35);
    font-family: Arial, sans-serif;
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
}

.place-card-main {
    min-width: 0;
}

.place-card-main strong,
.place-card-main span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.place-card-main strong {
    font-size: 13px;
}

.place-card-main span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.place-rating {
    min-width: 48px;
    text-align: right;
}

.place-rating strong {
    font-family: Georgia, serif;
    font-size: 17px;
}

.place-rating small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.place-rating .new-place {
    color: var(--green);
    font-family: inherit;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.empty-results {
    padding: 34px 22px;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
}

.empty-results strong {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-family: Georgia, serif;
    font-size: 20px;
}

.map-wrap {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: #dfe4d8;
}

#map {
    width: 100%;
    height: 100%;
    background: #e6e4d8;
}

.leaflet-container {
    font-family: inherit;
}

.leaflet-control-zoom {
    overflow: hidden;
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: var(--shadow) !important;
}

.leaflet-control-zoom a {
    width: 38px !important;
    height: 38px !important;
    color: var(--ink) !important;
    line-height: 38px !important;
}

.leaflet-control-attribution {
    padding: 3px 8px !important;
    border-radius: 9px 0 0 0;
    background: rgba(255, 255, 255, 0.82) !important;
    font-size: 9px !important;
}

.place-marker-shell {
    border: 0;
    background: transparent;
}

.marker-avatar {
    width: 46px;
    height: 46px;
    border: 4px solid #fffdf7;
    font-size: 15px;
}

.marker-avatar .reviewed-badge {
    top: -8px;
    right: -8px;
    border-color: #fffdf7;
}

.place-marker-path {
    transform-origin: center center;
    transition: filter 160ms ease, transform 160ms ease, opacity 160ms ease;
    filter: drop-shadow(0 4px 5px rgba(32, 42, 37, 0.3));
}

.place-marker-path:hover,
.place-marker-path.marker-active {
    transform: scale(1.24);
    filter: drop-shadow(0 6px 8px rgba(32, 42, 37, 0.34));
}

.city-boundary {
    animation: boundary-in 700ms ease both;
}

@keyframes boundary-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.place-tooltip {
    padding: 7px 10px !important;
    border: 0 !important;
    border-radius: 11px !important;
    color: var(--white) !important;
    background: var(--ink) !important;
    box-shadow: var(--shadow) !important;
    font-size: 11px !important;
    font-weight: 700;
}

.place-tooltip::before {
    border-top-color: var(--ink) !important;
}

.map-legend {
    position: absolute;
    z-index: 500;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 14px;
    padding: 10px 13px;
    border: 1px solid rgba(32, 42, 37, 0.08);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 22px rgba(38, 47, 41, 0.12);
    backdrop-filter: blur(10px);
    font-size: 10px;
    font-weight: 700;
}

.location-status {
    position: absolute;
    z-index: 650;
    top: 16px;
    left: 16px;
    max-width: min(360px, calc(100% - 32px));
    padding: 10px 13px;
    border: 1px solid rgba(35, 118, 216, 0.2);
    border-radius: 15px;
    color: #174a82;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 22px rgba(38, 47, 41, 0.12);
    backdrop-filter: blur(10px);
    font-size: 10px;
    font-weight: 800;
}

.location-status.locating::before {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border: 2px solid rgba(35, 118, 216, 0.22);
    border-top-color: #2376d8;
    border-radius: 50%;
    content: '';
    animation: spin 700ms linear infinite;
}

.locate-button[aria-pressed="true"] {
    border-color: rgba(35, 118, 216, 0.35);
    color: #2376d8;
    background: #edf6ff;
}

.user-location-shell {
    border: 0;
    background: transparent;
}

.user-location-marker {
    position: relative;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
}

.user-location-marker::before,
.user-location-marker::after {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: rgba(35, 118, 216, 0.18);
    content: '';
    animation: location-pulse 2s ease-out infinite;
}

.user-location-marker::after {
    animation-delay: 1s;
}

.user-location-marker i {
    position: relative;
    z-index: 1;
    width: 15px;
    height: 15px;
    border: 4px solid var(--white);
    border-radius: 50%;
    background: #2376d8;
    box-shadow: 0 3px 10px rgba(35, 118, 216, 0.45);
}

@keyframes location-pulse {
    from { opacity: 0.9; transform: scale(0.45); }
    to { opacity: 0; transform: scale(1.35); }
}

.map-legend span {
    display: flex;
    gap: 6px;
    align-items: center;
}

.mobile-list-toggle {
    display: none;
}

.map-loading {
    position: absolute;
    z-index: 800;
    inset: 0;
    display: flex;
    gap: 13px;
    align-items: center;
    justify-content: center;
    color: var(--green-dark);
    background: var(--paper);
    font-size: 13px;
    font-weight: 700;
    transition: opacity 350ms ease, visibility 350ms ease;
}

.map-loading.hidden {
    visibility: hidden;
    opacity: 0;
}

.map-loading span {
    width: 23px;
    height: 23px;
    border: 3px solid rgba(31, 107, 79, 0.18);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.details-panel {
    position: absolute;
    z-index: 1000;
    top: 14px;
    right: 14px;
    bottom: 14px;
    width: min(420px, calc(100% - 450px));
    overflow-y: auto;
    border: 1px solid rgba(32, 42, 37, 0.1);
    border-radius: 24px;
    background: rgba(251, 248, 241, 0.97);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    animation: panel-in 260ms ease both;
}

@keyframes panel-in {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

.panel-close,
.modal-close {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);
    font-size: 24px;
    line-height: 1;
}

.panel-close {
    position: sticky;
    z-index: 2;
    top: 14px;
    float: right;
    margin: 14px 14px -50px 0;
}

.detail-hero {
    padding: 27px 25px 22px;
    color: var(--white);
    background: var(--green-dark);
}

.detail-hero.shop { background: #9f5c25; }
.detail-hero.cafe { background: #9f3f3a; }
.detail-hero.restaurant { background: #5a293e; }

.detail-identity {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 15px;
    align-items: center;
    padding-right: 38px;
}

.detail-avatar {
    width: 72px;
    height: 72px;
    border: 4px solid rgba(255, 255, 255, 0.86);
    font-size: 22px;
}

.detail-avatar .reviewed-badge {
    top: -6px;
    right: -6px;
    border-color: rgba(255, 255, 255, 0.95);
}

.detail-category {
    color: rgba(255, 255, 255, 0.68);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.detail-hero h2 {
    max-width: 320px;
    margin: 10px 0 5px;
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.05;
}

.detail-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 12px;
}

.detail-score {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-top: 22px;
}

.detail-score strong {
    font-family: Georgia, serif;
    font-size: 42px;
    font-weight: 400;
}

.detail-score span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
}

.detail-body {
    padding: 20px 22px 28px;
}

.detail-actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    margin-bottom: 18px;
}

.primary-button,
.secondary-button,
.danger-button {
    min-height: 42px;
    padding: 0 15px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
}

.primary-button {
    border: 1px solid var(--green);
    color: var(--white);
    background: var(--green);
    transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}

.route-link {
    display: grid;
    place-items: center;
    margin-bottom: 6px;
    text-decoration: none;
}

.secondary-button {
    border: 1px solid var(--line);
    background: var(--white);
}

.secondary-button.active {
    border-color: rgba(123, 54, 82, 0.35);
    color: var(--restaurant);
    background: #f7eaf0;
}

.danger-button {
    border: 1px solid rgba(183, 62, 62, 0.24);
    color: #a13333;
    background: #fff5f3;
}

.detail-info {
    display: grid;
    gap: 9px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.detail-info li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.detail-info a {
    color: var(--green);
    text-decoration: none;
}

.external-ratings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.external-rating {
    position: relative;
    display: grid;
    gap: 10px;
    min-height: 94px;
    padding: 13px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    color: var(--ink);
    background: var(--white);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.external-rating:hover {
    border-color: rgba(31, 107, 79, 0.3);
    box-shadow: 0 8px 20px rgba(32, 42, 37, 0.08);
    transform: translateY(-2px);
}

.external-rating > i {
    position: absolute;
    top: 10px;
    right: 11px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.external-provider {
    padding-right: 18px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.external-score {
    display: flex;
    gap: 7px;
    align-items: baseline;
}

.external-score strong {
    font-family: Georgia, serif;
    font-size: 27px;
    font-weight: 500;
}

.external-score small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.25;
}

.external-rating.google { box-shadow: inset 3px 0 #4285f4; }
.external-rating.yandex { box-shadow: inset 3px 0 #fc3f1d; }

.tier-list {
    display: grid;
    gap: 14px;
}

.tier-group {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
}

.tier-group > header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    color: var(--white);
    background: var(--green);
    text-align: center;
}

.tier-group > header strong {
    font-family: Georgia, serif;
    font-size: 28px;
}

.tier-group > header span {
    margin-top: 4px;
    font-size: 7px;
    line-height: 1.2;
    text-transform: uppercase;
}

.tier-s > header { background: #8d6526; }
.tier-a > header { background: #1f6b4f; }
.tier-b > header { background: #527496; }
.tier-c > header { background: #8d6b62; }

.tier-place {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    width: 100%;
    padding: 9px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    text-align: left;
}

.tier-place:last-child { border-bottom: 0; }
.tier-place:hover { background: var(--white); }

.tier-avatar {
    width: 34px;
    height: 34px;
    font-size: 11px;
}

.tier-avatar .reviewed-badge {
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    border-width: 2px;
    font-size: 8px;
}

.tier-place > span:not(.place-avatar) {
    min-width: 0;
}

.tier-place > span > strong,
.tier-place > span > small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tier-place > span > strong { font-size: 11px; }
.tier-place > span > small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.tier-place > b {
    font-family: Georgia, serif;
    font-size: 17px;
}

.tier-place > b small {
    color: var(--muted);
    font-family: inherit;
    font-size: 8px;
    font-weight: 400;
}

.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 22px 0 13px;
}

.section-title h3 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 500;
}

.section-title span {
    color: var(--muted);
    font-size: 10px;
}

.criterion-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 35px;
    gap: 5px 12px;
    margin-bottom: 10px;
}

.criterion-row label {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.criterion-row strong {
    grid-row: span 2;
    align-self: center;
    font-family: Georgia, serif;
    text-align: right;
}

.criterion-track {
    height: 5px;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(32, 42, 37, 0.1);
}

.criterion-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
    transform-origin: left;
    animation: bar-grow 500ms ease both;
}

@keyframes bar-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.review-card {
    margin-bottom: 9px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.58);
}

.review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.review-author {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
}

.review-author i {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--green);
    font-style: normal;
    font-size: 10px;
}

.review-head > strong {
    color: var(--restaurant);
    font-family: Georgia, serif;
    font-size: 18px;
}

.review-card p {
    margin: 10px 0 7px;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.review-card time {
    color: var(--muted);
    font-size: 9px;
}

.no-reviews {
    padding: 20px;
    border: 1px dashed var(--line);
    border-radius: 15px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
}

.modal {
    width: min(520px, calc(100% - 28px));
    max-height: calc(100% - 34px);
    padding: 28px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 26px;
    color: var(--ink);
    background: var(--paper-soft);
    box-shadow: 0 28px 80px rgba(24, 31, 27, 0.3);
}

.modal::backdrop {
    background: rgba(22, 30, 26, 0.56);
    backdrop-filter: blur(7px);
}

.modal[open] {
    animation: modal-in 220ms ease both;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: sticky;
    z-index: 2;
    top: 0;
    float: right;
    margin: -10px -10px 0 0;
}

.modal-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.modal h2 {
    margin: 0 0 7px;
    font-family: Georgia, serif;
    font-size: 29px;
    font-weight: 500;
    text-align: center;
}

.modal-lead {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.stack-form {
    display: grid;
    gap: 13px;
}

.stack-form label,
.comment-field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.stack-form input,
.comment-field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    color: var(--ink);
    background: var(--white);
}

.stack-form input {
    height: 45px;
    padding: 0 13px;
}

.comment-field textarea {
    min-height: 110px;
    padding: 12px;
    resize: vertical;
    line-height: 1.5;
}

.stack-form input:focus,
.comment-field textarea:focus {
    border-color: rgba(31, 107, 79, 0.45);
    box-shadow: 0 0 0 4px rgba(31, 107, 79, 0.07);
}

.form-hint,
.form-error {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
}

.form-hint {
    color: var(--muted);
}

.form-error {
    min-height: 14px;
    color: #aa3636;
}

.auth-switch {
    display: block;
    margin: 17px auto 0;
    border: 0;
    color: var(--green);
    background: transparent;
    font-size: 11px;
    font-weight: 800;
}

.review-modal {
    width: min(700px, calc(100% - 28px));
}

.review-modal > .eyebrow {
    color: var(--green);
    text-align: center;
}

.criteria-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin: 20px 0;
}

.score-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 31px;
    gap: 7px 10px;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.52);
}

.score-field label {
    min-height: 28px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
}

.score-field output {
    grid-row: span 2;
    color: var(--green);
    font-family: Georgia, serif;
    font-size: 22px;
    text-align: right;
}

.score-field input[type="range"] {
    width: 100%;
    height: 5px;
    accent-color: var(--green);
}

.comment-field {
    position: relative;
}

.comment-field small {
    position: absolute;
    right: 10px;
    bottom: 8px;
    font-weight: 500;
}

.review-actions {
    display: flex;
    gap: 9px;
    justify-content: flex-end;
    margin-top: 15px;
}

.toast-stack {
    position: fixed;
    z-index: 3000;
    right: 18px;
    bottom: 18px;
    display: grid;
    gap: 8px;
    width: min(340px, calc(100% - 36px));
}

.toast {
    padding: 13px 15px;
    border-radius: 13px;
    color: var(--white);
    background: var(--ink);
    box-shadow: var(--shadow);
    font-size: 12px;
    line-height: 1.4;
    animation: toast-in 220ms ease both;
}

.toast.error {
    background: #8f3434;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}

.noscript {
    position: fixed;
    z-index: 5000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 30px;
    color: var(--white);
    background: var(--green-dark);
    text-align: center;
}

@media (max-width: 1080px) {
    .topbar {
        grid-template-columns: 220px minmax(240px, 1fr) auto;
        gap: 15px;
        padding: 0 18px;
    }

    .app-shell {
        grid-template-columns: 350px minmax(0, 1fr);
    }

    .intro-card h1 {
        font-size: 22px;
    }

    .details-panel {
        width: min(390px, calc(100% - 382px));
    }

    .map-legend {
        display: none;
    }
}

@media (max-width: 760px) {
    html,
    body {
        overflow: hidden;
    }

    .topbar {
        grid-template-columns: 1fr auto;
        gap: 10px;
        height: 68px;
        padding: 0 12px;
    }

    .brand small,
    .search-box kbd,
    .account-label {
        display: none;
    }

    .brand-mark {
        width: 39px;
        height: 39px;
        font-size: 19px;
    }

    .brand strong {
        font-size: 19px;
    }

    .search-box {
        position: absolute;
        top: 74px;
        right: 12px;
        left: 12px;
        z-index: 1000;
        height: 44px;
        box-shadow: 0 8px 28px rgba(38, 47, 41, 0.12);
    }

    .account-button {
        width: 44px;
        padding: 5px;
    }

    .app-shell {
        display: block;
        height: calc(100% - 68px);
    }

    .map-wrap {
        width: 100%;
        height: 100%;
    }

    .location-status {
        top: 58px;
        right: 12px;
        left: 12px;
        max-width: none;
        text-align: center;
    }

    .sidebar {
        position: absolute;
        z-index: 900;
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        height: min(72vh, 650px);
        padding: 16px 14px 0;
        overflow-y: auto;
        border: 0;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -14px 45px rgba(32, 42, 37, 0.16);
        transform: translateY(calc(100% + 20px));
        transition: transform 260ms ease;
    }

    body.list-open .sidebar {
        transform: translateY(0);
    }

    .sidebar::before {
        display: block;
        width: 42px;
        height: 4px;
        margin: 0 auto 13px;
        border-radius: 4px;
        background: rgba(32, 42, 37, 0.2);
        content: "";
    }

    .intro-card {
        display: none;
    }

    .quick-stats {
        margin-top: 0;
    }

    .places-list {
        min-height: 300px;
        overflow: visible;
    }

    .mobile-list-toggle {
        position: absolute;
        z-index: 700;
        right: auto;
        bottom: 25px;
        left: 50%;
        display: block;
        min-height: 44px;
        padding: 0 17px;
        border: 0;
        border-radius: 23px;
        color: var(--white);
        background: var(--green-dark);
        box-shadow: var(--shadow);
        font-size: 12px;
        font-weight: 800;
        transform: translateX(-50%);
    }

    body.list-open .mobile-list-toggle {
        z-index: 950;
        bottom: calc(min(72vh, 650px) - 22px);
    }

    .details-panel {
        position: absolute;
        z-index: 1100;
        inset: auto 0 0;
        width: 100%;
        max-height: 78vh;
        border: 0;
        border-radius: 24px 24px 0 0;
        animation-name: panel-up;
    }

    @keyframes panel-up {
        from { opacity: 0; transform: translateY(40px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .detail-hero {
        padding-top: 30px;
    }

    .criteria-form {
        grid-template-columns: 1fr;
    }

    .modal {
        max-height: 88vh;
        padding: 22px;
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
