:root {
    color-scheme: light;
    --bg: #f8f3eb;
    --card: #fffaf3;
    --ink: #211b17;
    --muted: #786b60;
    --accent: #b4492f;
    --accent-dark: #82321f;
    --line: #eadfce;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, #fff1d4, transparent 30%), var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

body.modal-open {
    padding-right: 0 !important;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    align-items: center;
    background: rgba(255, 250, 243, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    display: flex;
    justify-content: space-between;
    padding: 18px max(18px, calc((100vw - 1120px) / 2));
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 700;
}

nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.header-search {
    align-items: center;
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    display: flex;
    flex: 1 1 300px;
    gap: 4px;
    margin: 0 18px;
    max-width: 420px;
    padding: 5px 8px 5px 5px;
}

.site-header .header-search input {
    appearance: none;
    background: transparent;
    border: 0 !important;
    border-radius: 999px;
    box-shadow: none;
    min-width: 0;
    outline: 0;
    padding: 8px 10px 8px 14px;
}

.site-header .header-search input:focus {
    box-shadow: none;
    outline: 0;
}

.site-header .header-search input::-webkit-search-cancel-button,
.site-header .header-search input::-webkit-search-decoration {
    appearance: none;
}

.header-search button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    flex: 0 0 auto;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.header-search button:hover {
    background: transparent;
    color: var(--accent-dark);
}

nav > a {
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    padding: 9px 12px;
}

nav > a:hover {
    background: #f1dfcc;
    color: var(--accent-dark);
}

nav form {
    margin: 0;
}

.search-summary {
    align-items: center;
    background: #fff6e8;
    border: 1px solid var(--line);
    border-radius: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 auto 18px;
    max-width: 620px;
    padding: 12px 14px;
}

.search-summary span {
    color: var(--muted);
}

.search-summary a {
    color: var(--accent-dark);
    font-weight: 800;
    margin-left: auto;
    text-decoration: underline;
    text-underline-offset: 3px;
}

nav .whats-new-trigger {
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--accent-dark);
    font-weight: 700;
    padding: 10px 16px;
}

nav .whats-new-trigger:hover {
    background: #f1dfcc;
    color: var(--accent-dark);
}

button,
.button-link,
.primary,
.secondary {
    background: var(--accent);
    border: 0;
    border-radius: 999px;
    color: white;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    padding: 11px 18px;
}

button:hover,
.button-link:hover,
.primary:hover,
.secondary:hover {
    background: var(--accent-dark);
}

.secondary {
    background: rgba(255, 250, 243, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.danger {
    background: #8f1f1f;
    width: 100%;
}

.danger:hover {
    background: #651313;
}

.container {
    margin: 0 auto;
    max-width: 1120px;
    padding: 28px 18px 56px;
}

.site-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    margin: 0 auto;
    max-width: 1120px;
    padding: 22px 18px 34px;
}

.site-footer p {
    margin: 0;
}

.page-head {
    margin-bottom: 24px;
}

.page-head h1 {
    font-family: Georgia, serif;
    font-size: clamp(34px, 6vw, 58px);
    margin: 8px 0 10px;
}

.updates-list {
    display: grid;
    gap: 16px;
}

.update-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(61, 45, 32, 0.08);
    padding: 22px;
}

.update-card time {
    color: var(--accent-dark);
    font-weight: 700;
}

.update-card h2 {
    margin: 8px 0 10px;
}

.whats-new-panel {
    background: var(--bg);
    border-left: 1px solid var(--line);
    width: min(440px, 100vw) !important;
}

.whats-new-panel .offcanvas-header {
    align-items: flex-start;
    background: white;
    border-bottom: 1px solid var(--line);
}

.whats-new-panel h2 {
    font-family: Georgia, serif;
    margin: 4px 0 0;
}

.side-update-card {
    margin-bottom: 14px;
}

.side-update-card h3 {
    font-size: 20px;
    margin: 8px 0 10px;
}

.hero,
.profile-head {
    align-items: end;
    background: linear-gradient(135deg, #2d4d3d, #8d4b2f);
    border-radius: 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: clamp(26px, 5vw, 54px);
}

.home-landing {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    min-height: calc(100dvh - 84px);
    overflow: hidden;
}

.russia-hero {
    background: linear-gradient(180deg, #9ed4ee 0%, #d9f1dc 54%, #f7e2bb 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 0;
    box-shadow: 0 24px 60px rgba(48, 68, 49, 0.16);
    color: #173626;
    min-height: calc(100dvh - 84px);
    overflow: hidden;
    padding: clamp(24px, 4vw, 44px);
    position: relative;
}

.hero-copy {
    max-width: 560px;
    position: relative;
    z-index: 2;
}

.hero-copy h1 {
    font-family: Georgia, serif;
    font-size: clamp(40px, 6.5vw, 74px);
    line-height: 0.95;
    margin: 8px 0 16px;
}

.hero-copy p:last-child {
    color: #355241;
    font-size: 19px;
    max-width: 460px;
}

.landscape {
    inset: 0;
    position: absolute;
}

.sun {
    animation: sun-glow 5s ease-in-out infinite;
    background: #ffd36b;
    border-radius: 50%;
    box-shadow: 0 0 70px rgba(255, 211, 107, 0.85);
    height: 98px;
    position: absolute;
    right: 12%;
    top: 12%;
    width: 98px;
}

.cloud {
    animation: cloud-drift 18s linear infinite;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    height: 34px;
    position: absolute;
    width: 128px;
}

.cloud::before,
.cloud::after {
    background: inherit;
    border-radius: 50%;
    content: "";
    position: absolute;
}

.cloud::before {
    height: 56px;
    left: 22px;
    top: -24px;
    width: 56px;
}

.cloud::after {
    height: 44px;
    right: 20px;
    top: -15px;
    width: 44px;
}

.cloud-one {
    left: 42%;
    top: 24%;
}

.cloud-two {
    animation-delay: -9s;
    left: 12%;
    opacity: 0.72;
    top: 35%;
    transform: scale(0.78);
}

.mountain {
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    position: absolute;
}

.mountain-back {
    background: linear-gradient(135deg, #56745f, #233f38);
    bottom: 130px;
    height: 310px;
    left: 18%;
    opacity: 0.88;
    width: 520px;
}

.mountain-front {
    background: linear-gradient(135deg, #335948, #142f2f);
    bottom: 105px;
    height: 360px;
    right: -6%;
    width: 620px;
}

.mountain::after {
    background: rgba(255, 255, 255, 0.88);
    clip-path: polygon(50% 0, 66% 32%, 51% 24%, 37% 36%);
    content: "";
    inset: 0;
    position: absolute;
}

.river {
    animation: river-flow 7s linear infinite;
    background: repeating-linear-gradient(-12deg, rgba(255, 255, 255, 0.32) 0 16px, rgba(42, 145, 166, 0.92) 16px 42px);
    border-radius: 58% 42% 0 0;
    bottom: -40px;
    height: 210px;
    left: 18%;
    position: absolute;
    transform: skewX(-16deg);
    width: 46%;
}

.river-shine {
    animation: shine-move 3.8s ease-in-out infinite;
    background: rgba(255, 255, 255, 0.58);
    border-radius: 999px;
    bottom: 82px;
    height: 8px;
    position: absolute;
    transform: rotate(-16deg);
    width: 118px;
}

.shine-one {
    left: 28%;
}

.shine-two {
    animation-delay: -1.8s;
    left: 47%;
}

.forest {
    align-items: end;
    bottom: 50px;
    display: flex;
    gap: clamp(8px, 1.4vw, 18px);
    position: absolute;
}

.forest-back {
    left: 4%;
    opacity: 0.72;
}

.forest-front {
    bottom: 22px;
    right: 7%;
}

.forest span {
    animation: tree-rustle 2.6s ease-in-out infinite;
    background: linear-gradient(135deg, #1f6b43, #0f3c2c);
    clip-path: polygon(50% 0, 92% 82%, 62% 78%, 62% 100%, 38% 100%, 38% 78%, 8% 82%);
    display: block;
    height: 132px;
    transform-origin: 50% 100%;
    width: 66px;
}

.forest span:nth-child(2n) {
    animation-delay: -0.8s;
    height: 158px;
}

.forest span:nth-child(3n) {
    animation-delay: -1.4s;
    height: 112px;
}

.signup-panel {
    display: grid;
    gap: 12px;
    max-width: 390px;
    position: absolute;
    right: clamp(20px, 4vw, 46px);
    top: clamp(26px, 5vw, 58px);
    width: min(390px, calc(100% - 40px));
    z-index: 3;
}

.auth-card {
    background: rgba(255, 250, 243, 0.97);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 24px 70px rgba(30, 54, 39, 0.18);
    padding: 28px;
}

body:has(.home-landing) {
    overflow-x: hidden;
}

body:has(.home-landing) .container {
    padding-bottom: 0;
}

.auth-logo {
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 12px;
    text-align: center;
}

.auth-subtitle {
    color: var(--muted);
    font-weight: 700;
    margin: 0 0 20px;
    text-align: center;
}

.home-login-form p {
    margin: 0 0 8px;
}

.home-login-form input:not([type="checkbox"]):not([type="radio"]) {
    background: #fffdf9;
    border-radius: 4px;
    padding: 10px 12px;
}

.home-login-form .primary {
    border-radius: 10px;
    margin-top: 8px;
    width: 100%;
}

.auth-create-card {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 20px;
}

.auth-create-card a {
    color: var(--accent);
    font-weight: 800;
}

.social-login {
    margin-top: 18px;
}

.social-login-divider {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 13px;
    gap: 10px;
    margin-bottom: 12px;
    text-align: center;
}

.social-login-divider::before,
.social-login-divider::after {
    background: var(--line);
    content: "";
    flex: 1;
    height: 1px;
}

.social-login-buttons {
    display: grid;
    gap: 10px;
}

.social-login-button {
    align-items: center;
    border-radius: 12px;
    color: white;
    display: inline-flex;
    gap: 10px;
    font-weight: 800;
    justify-content: flex-start;
    min-height: 44px;
    padding: 10px 14px;
}

.social-login-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: var(--ink);
    display: inline-flex;
    flex: 0 0 28px;
    font-size: 13px;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.social-login-vk .social-login-icon {
    color: #0077ff;
    font-size: 11px;
}

.social-login-yandex .social-login-icon {
    color: #fc3f1d;
}

.social-login-button:hover {
    color: white;
    filter: brightness(0.94);
}

.social-login-yandex {
    background: #fc3f1d;
}

.social-login-vk {
    background: #0077ff;
}

@keyframes tree-rustle {
    0%,
    100% {
        transform: rotate(-1.4deg);
    }

    50% {
        transform: rotate(2.2deg);
    }
}

@keyframes river-flow {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 140px 0;
    }
}

@keyframes shine-move {
    0%,
    100% {
        opacity: 0.18;
        translate: -20px 0;
    }

    50% {
        opacity: 0.82;
        translate: 28px -8px;
    }
}

@keyframes cloud-drift {
    from {
        translate: -34px 0;
    }

    to {
        translate: 48px 0;
    }
}

@keyframes sun-glow {
    0%,
    100% {
        scale: 1;
    }

    50% {
        scale: 1.06;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sun,
    .cloud,
    .river,
    .river-shine,
    .forest span {
        animation: none;
    }
}

.hero h1,
.profile-head h1 {
    font-family: Georgia, serif;
    font-size: clamp(34px, 7vw, 70px);
    line-height: 0.95;
    margin: 8px 0 16px;
    max-width: 760px;
}

.eyebrow {
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.feed {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feed-instagram {
    grid-template-columns: minmax(0, 620px);
    justify-content: center;
}

.feed-catalog {
    align-items: start;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.feed-catalog .post-card {
    height: 100%;
}

.feed-catalog .post-header {
    min-height: 74px;
}

.feed-catalog .post-body {
    display: flex;
    flex-direction: column;
}

.feed-catalog .post-body > p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-grid {
    align-items: start;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.profile-grid .post-card {
    border-radius: 18px;
    width: min(289px, 100%);
}

.profile-grid .post-header,
.profile-grid .post-body,
.profile-grid .carousel-hint {
    display: none;
}

.profile-grid .post-media {
    border-radius: 18px;
}

.profile-grid .post-media img {
    aspect-ratio: 289 / 386;
}

.post-card,
.card-form,
.empty {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(61, 45, 32, 0.08);
    overflow: hidden;
    position: relative;
}

.profile-open-post {
    display: none;
}

.profile-grid .profile-open-post {
    background: transparent;
    border: 0;
    border-radius: 18px;
    display: block;
    inset: 0;
    padding: 0;
    position: absolute;
    width: 100%;
    z-index: 2;
}

.profile-post-delete {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 4;
}

.profile-post-delete button {
    background: rgba(143, 31, 31, 0.92);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 12px;
}

.profile-post-delete button:hover {
    background: #651313;
}

.profile-grid .profile-open-post:hover {
    background: rgba(0, 0, 0, 0.08);
}

.post-header {
    align-items: center;
    display: flex;
    gap: 12px;
    padding: 14px 16px;
}

.post-author {
    flex: 1;
}

.post-header p {
    color: var(--muted);
    font-size: 14px;
    margin: 3px 0 0;
}

.post-location {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.post-location::before {
    content: "";
    background: var(--accent);
    border-radius: 50% 50% 50% 0;
    display: inline-block;
    height: 10px;
    transform: rotate(-45deg);
    width: 10px;
}

.location-link {
    color: var(--accent-dark);
    font-weight: 700;
}

.location-link:hover {
    text-decoration: underline;
}

.avatar {
    align-items: center;
    background: linear-gradient(135deg, #b4492f, #2d4d3d);
    border-radius: 50%;
    color: white;
    display: flex;
    flex: 0 0 42px;
    font-weight: 700;
    height: 42px;
    justify-content: center;
    width: 42px;
}

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

.profile-avatar-large {
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    display: flex;
    flex: 0 0 130px;
    font-size: 44px;
    font-weight: 700;
    height: 130px;
    justify-content: center;
    overflow: hidden;
    width: 130px;
}

.profile-avatar-large img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.public-profile-head {
    align-items: center;
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 12px 0 18px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.social-link {
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    color: white;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    justify-content: center;
    min-height: 38px;
    min-width: 54px;
    padding: 8px 12px;
}

.social-link:hover {
    background: white;
    color: var(--accent-dark);
}

.edit-link {
    color: var(--accent-dark);
    font-size: 14px;
    font-weight: 700;
}

.post-media {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.post-media::-webkit-scrollbar {
    display: none;
}

.slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.post-media img {
    aspect-ratio: 1 / 1;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.carousel-hint {
    background: #f5eadb;
    color: var(--muted);
    font-size: 13px;
    padding: 8px 16px;
    text-align: center;
}

.post-body {
    padding: 18px;
}

.place-summary {
    background: #fff6e8;
    border: 1px solid var(--line);
    border-radius: 18px;
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
    padding: 14px;
}

.place-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.map-link {
    color: var(--accent-dark);
    font-weight: 800;
    width: fit-content;
}

.map-link:hover {
    text-decoration: underline;
}

.post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 10px;
}

.post-actions form {
    margin: 0;
}

.reaction-button {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    min-width: 44px;
    padding: 8px 12px;
    text-align: center;
}

.reaction-button:hover {
    background: #f1dfcc;
}

.reaction-button.is-active {
    background: #f1dfcc;
    border-color: var(--accent);
    color: var(--accent);
}

.reaction-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.post-rating {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-form {
    margin: 0;
}

.star-button {
    background: transparent;
    border: 0;
    color: #d7c4aa;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 0 1px;
}

.star-button:hover,
.star-button.is-filled {
    background: transparent;
    color: #d99b2b;
}

.star-button.is-user-rating {
    color: var(--accent);
}

.rating-summary {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.post-form-rating {
    margin: 18px 0;
}

.rating-radio {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rating-radio label {
    align-items: center;
    background: #f5eadb;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #d99b2b;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    gap: 6px;
    padding: 8px 12px;
}

.rating-radio input {
    width: auto;
}

.post-meta {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 14px;
    justify-content: flex-start;
    gap: 12px;
}

.location {
    color: var(--accent-dark);
    font-weight: 700;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tags a {
    background: #f1dfcc;
    border-radius: 999px;
    color: var(--accent-dark);
    padding: 6px 10px;
}

.tags a:hover {
    background: #ead4bd;
}

.comments {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 12px;
}

.comment {
    margin: 10px 0;
}

.comment p {
    margin: 8px 0;
}

.comment-actions {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 10px;
}

.comment-actions form {
    margin: 0;
}

.comment-action {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0;
}

.comment-action:hover,
.comment-action.is-active {
    background: transparent;
    color: var(--accent);
}

.danger-link,
.danger-link:hover {
    color: #9d1f1f;
}

.comment-likes {
    font-weight: 700;
}

.replies {
    border-left: 2px solid var(--line);
    margin: 10px 0 0 18px;
    padding-left: 14px;
}

.comment-form {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto;
    margin-top: 12px;
}

.comment-form button {
    border-radius: 14px;
}

.reply-form {
    margin-top: 10px;
}

.comment-edit-form {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto auto;
    margin-top: 10px;
}

.comment-edit-form button,
.secondary-action {
    border-radius: 14px;
}

.secondary-action {
    background: #f1dfcc;
    color: var(--ink);
}

.secondary-action:hover {
    background: #e0c7ad;
}

.comments-modal .modal-content {
    background: var(--card);
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

.modal-close {
    background-color: white;
    border-radius: 50%;
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 4;
}

.post-modal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
    min-height: 70vh;
}

.post-modal-media {
    align-items: center;
    background: #111;
    display: flex;
    min-width: 0;
}

.modal-media-carousel {
    width: 100%;
}

.modal-media-carousel img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.post-modal-comments {
    display: flex;
    flex-direction: column;
    max-height: 82vh;
    min-width: 0;
}

.modal-post-header {
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}

.modal-caption {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
}

.modal-caption p {
    margin: 0;
}

.modal-reaction-counts {
    margin: 12px 0 0;
}

.post-modal-comments .comments {
    border-top: 0;
    flex: 1;
    margin-top: 0;
    overflow-y: auto;
    padding: 14px 16px;
}

.modal-comment-compose {
    border-top: 1px solid var(--line);
    flex: 0 0 auto;
    padding: 14px 16px;
}

.modal-comment-compose .comment-form {
    margin-top: 0;
}

.form-page {
    margin: 0 auto;
    max-width: 680px;
}

.card-form,
.empty {
    padding: 24px;
}

.card-form p {
    display: grid;
    gap: 8px;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    border: 1px solid var(--line);
    border-radius: 14px;
    font: inherit;
    padding: 12px 14px;
    width: 100%;
}

input[type="checkbox"] {
    border-radius: 4px;
    flex: 0 0 18px;
    height: 18px;
    margin: 2px 0 0;
    padding: 0;
    width: 18px;
}

.checkbox-fields {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.checkbox-field {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    line-height: 1.35;
}

.checkbox-field span {
    flex: 1;
    min-width: 0;
}

.checkbox-field a,
.legal-page a {
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-page {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(61, 45, 32, 0.08);
    margin: 0 auto;
    max-width: 860px;
    padding: clamp(22px, 4vw, 42px);
}

.legal-page h1 {
    font-family: Georgia, serif;
    font-size: clamp(32px, 5vw, 52px);
    margin: 0 0 18px;
}

.legal-page h2 {
    margin: 28px 0 10px;
}

.legal-page p,
.legal-page li {
    line-height: 1.65;
}

.legal-page ul {
    padding-left: 22px;
}

.field-live-error {
    color: #8f1f1f;
    font-size: 14px;
    min-height: 19px;
}

.current-photos {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    margin-bottom: 16px;
}

.current-photo-card {
    background: #f5eadb;
    border-radius: 18px;
    overflow: hidden;
    padding: 8px;
}

.current-photo-card form {
    margin-top: 8px;
}

.current-photo-card img {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    object-fit: cover;
    width: 100%;
}

.profile-field-label {
    font-weight: 700;
    margin: 0 0 12px;
}

.avatar-edit-block {
    display: grid;
    justify-items: center;
    margin: 18px 0;
}

.avatar-edit {
    align-items: center;
    background: linear-gradient(135deg, #b4492f, #2d4d3d);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    font-size: 42px;
    font-weight: 700;
    height: 138px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 138px;
}

.avatar-edit img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.avatar-edit-overlay {
    align-items: center;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    display: flex;
    font-size: 16px;
    inset: 0;
    justify-content: center;
    opacity: 0;
    position: absolute;
    transition: opacity 0.2s ease;
}

.avatar-edit:hover .avatar-edit-overlay {
    opacity: 1;
}

.avatar-input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

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

.message {
    background: #e7f4df;
    border: 1px solid #c8e0ba;
    border-radius: 16px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

@media (max-width: 720px) {
    .hero,
    .profile-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .site-header {
        align-items: stretch;
        gap: 12px;
        padding-bottom: 12px;
        padding-top: 12px;
    }

    .header-search {
        flex: 1 1 auto;
        margin: 0;
        max-width: none;
        width: 100%;
    }

    .site-header .header-search input {
        font-size: 14px;
    }

    .header-search button {
        font-size: 14px;
        height: 34px;
        width: 34px;
    }

    .logo {
        font-size: 25px;
    }

    nav {
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        white-space: nowrap;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    nav > a,
    nav .whats-new-trigger,
    nav button {
        flex: 0 0 auto;
        font-size: 14px;
        padding: 9px 12px;
    }

    .home-landing {
        min-height: auto;
    }

    .russia-hero {
        min-height: auto;
        padding-bottom: 170px;
    }

    .landscape {
        bottom: 0;
        height: 220px;
        opacity: 0.55;
        pointer-events: none;
        top: auto;
        z-index: 1;
    }

    .hero-copy,
    .signup-panel {
        position: relative;
        z-index: 3;
    }

    .signup-panel {
        position: static;
        margin-top: 24px;
        width: 100%;
    }

    .mountain-back {
        bottom: 34px;
        left: -30%;
        width: 360px;
    }

    .mountain-front {
        bottom: 20px;
        right: -54%;
        width: 430px;
    }

    .river {
        left: 8%;
        width: 58%;
    }

    .forest span {
        height: 104px;
        width: 52px;
    }

    .post-media img {
        aspect-ratio: 1 / 1;
    }

    .post-body {
        padding: 14px;
    }

    .place-summary {
        border-radius: 14px;
        padding: 12px;
    }

    .post-actions {
        gap: 8px;
    }

    .reaction-button {
        font-size: 20px;
        padding: 8px 11px;
    }

    .post-modal-layout {
        grid-template-columns: 1fr;
    }

    .post-modal-comments {
        max-height: none;
    }

    .post-modal-comments .comments {
        max-height: 45vh;
    }
}
