:root {
    --bg: #f4f9fd;
    --bg-soft: #edf5fb;
    --paper: rgba(255, 255, 255, 0.9);
    --paper-strong: #ffffff;
    --ink: #143247;
    --muted: #5f7789;
    --accent: #4f9fdc;
    --accent-strong: #2e7fc3;
    --accent-soft: #dff0fd;
    --line: rgba(126, 157, 182, 0.2);
    --line-strong: rgba(95, 138, 170, 0.34);
    --ok: #2f7d69;
    --shadow: 0 18px 48px rgba(52, 101, 140, 0.09);
    --shadow-soft: 0 10px 28px rgba(52, 101, 140, 0.06);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 10px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 18px;
    --space-6: 22px;
    --space-7: 24px;
    --space-8: 28px;
    --space-9: 38px;
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --text-xs: 0.76rem;
    --text-sm: 0.86rem;
    --text-base: 0.95rem;
    --text-md: 1rem;
    --text-lg: 1.03rem;
    --title-spacing: -0.03em;
    --copy-line: 1.72;
    --card-padding: 22px;
    --card-gap: 18px;
    --section-gap: 28px;
    --page-title-size: 40pt;
}

* {
    box-sizing: border-box;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(125, 195, 245, 0.24), transparent 32%),
        radial-gradient(circle at top right, rgba(176, 223, 255, 0.2), transparent 26%),
        linear-gradient(180deg, #f8fbfe 0%, var(--bg) 46%, #eef6fb 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 108px;
    background: linear-gradient(180deg, #f8fbfe 0%, rgba(248, 251, 254, 0.98) 58%, rgba(248, 251, 254, 0) 100%);
    pointer-events: none;
    z-index: 18;
}

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

:focus-visible {
    outline: 3px solid rgba(79, 159, 220, 0.42);
    outline-offset: 3px;
}

img {
    max-width: 100%;
    display: block;
}

p {
    margin: 0;
    color: var(--muted);
    line-height: var(--copy-line);
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.04;
    letter-spacing: var(--title-spacing);
    font-weight: 700;
}

.shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: var(--space-6) 0 72px;
}

.topbar,
.card,
.hero,
.empty {
    backdrop-filter: blur(16px);
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.topbar {
    border-radius: calc(var(--radius) + 2px);
    padding: 14px var(--space-4);
    display: flex;
    gap: var(--space-4);
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    position: sticky;
    top: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.99);
    backdrop-filter: blur(22px);
    box-shadow: 0 14px 30px rgba(52, 101, 140, 0.12);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: var(--text-md);
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7cc5f2, #3d8fd4);
    display: grid;
    place-items: center;
    color: #fafdff;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.nav {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    font-size: var(--text-base);
    color: var(--muted);
}

.nav a {
    padding: 10px var(--space-3);
    border-radius: 10px;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.nav a:hover {
    background: rgba(79, 159, 220, 0.1);
    color: var(--accent-strong);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-left: auto;
}

.mobile-menu {
    display: none;
    position: relative;
}

.mobile-menu summary {
    list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
    display: none;
}

.mobile-menu-trigger {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(79, 159, 220, 0.16);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--muted);
    cursor: pointer;
}

.mobile-menu-trigger svg {
    width: 19px;
    height: 19px;
}

.mobile-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 50;
    display: grid;
    width: min(240px, calc(100vw - 28px));
    padding: 8px;
    gap: 3px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 18px 42px rgba(52, 101, 140, 0.18);
}

.mobile-menu-panel a,
.mobile-menu-panel button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.mobile-menu-panel a:hover,
.mobile-menu-panel button:hover,
.mobile-menu-panel a:focus-visible,
.mobile-menu-panel button:focus-visible {
    background: rgba(79, 159, 220, 0.1);
    color: var(--accent-strong);
}

.search-menu {
    position: relative;
}

.search-menu summary {
    list-style: none;
}

.search-menu summary::-webkit-details-marker {
    display: none;
}

.search-trigger,
.search-link-mobile {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(79, 159, 220, 0.16);
    background: rgba(255, 255, 255, 0.92);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.search-trigger:hover,
.search-link-mobile:hover {
    color: var(--accent-strong);
    border-color: rgba(79, 159, 220, 0.28);
    background: rgba(79, 159, 220, 0.08);
}

.search-trigger svg,
.search-link-mobile svg {
    width: 18px;
    height: 18px;
}

.search-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(360px, calc(100vw - 32px));
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 18px 42px rgba(52, 101, 140, 0.16);
    display: none;
}

.search-menu[open] .search-menu-panel {
    display: block;
}

.search-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: center;
}

.search-inline-form .field {
    padding: 12px 14px;
}

.search-inline-form .btn {
    min-width: 92px;
}

.search-link-mobile {
    display: none;
    flex: 0 0 auto;
}

.search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-4);
    align-items: end;
}

.search-page-field {
    gap: var(--space-3);
}

.auth-layout {
    display: grid;
    align-items: stretch;
    justify-items: stretch;
}

.auth-login-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 32px);
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
}

.auth-register-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 32px);
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
}

.auth-card {
    width: min(560px, 100%);
    height: 100%;
    box-sizing: border-box;
}

.auth-login-layout .auth-card {
    width: 100%;
}

.auth-register-layout .auth-card {
    width: 100%;
}

.auth-illustration {
    position: relative;
    min-height: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(126, 157, 182, 0.2);
    border-radius: calc(var(--radius) + 4px);
    background:
        radial-gradient(circle at 76% 22%, rgba(255, 255, 255, 0.96), transparent 34%),
        linear-gradient(145deg, #eef8ff 0%, #c6e7fb 48%, #78b9e7 100%);
    box-shadow: var(--shadow);
}

.auth-illustration::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(20, 50, 71, 0) 42%, rgba(20, 50, 71, 0.68) 100%);
    pointer-events: none;
}

.auth-illustration img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    mix-blend-mode: multiply;
}

.auth-illustration-caption {
    position: absolute;
    right: 24px;
    bottom: 22px;
    left: 24px;
    z-index: 1;
    color: #fafdff;
}

.auth-illustration-caption .eyebrow {
    color: rgba(250, 253, 255, 0.78);
}

.auth-illustration-caption strong {
    display: block;
    max-width: 360px;
    margin-top: 7px;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    line-height: 1.08;
}

.auth-illustration-caption p {
    max-width: 360px;
    margin-top: 8px;
    color: rgba(250, 253, 255, 0.82);
    font-size: 0.9rem;
}

.auth-card .page-title {
    margin-top: 8px;
}

.auth-lead,
.profile-email {
    margin-top: 12px;
    color: var(--muted);
}

.public-profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-7);
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid rgba(126, 157, 182, 0.2);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 10% 0%, rgba(124, 197, 242, 0.28), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 246, 252, 0.88));
    box-shadow: var(--shadow);
}

.profile-own-hero {
    margin-bottom: var(--section-gap);
}

.public-profile-identity {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    min-width: 0;
}

.public-profile-avatar {
    display: grid;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    place-items: center;
    border: 1px solid rgba(79, 159, 220, 0.24);
    border-radius: 22px;
    background: linear-gradient(135deg, #7cc5f2, #3d8fd4);
    color: #fafdff;
    font-size: 1.65rem;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(61, 143, 212, 0.2);
}

.public-profile-hero .page-title {
    margin-top: 8px;
}

.public-profile-caption {
    max-width: 560px;
    margin-top: 10px;
}

.public-profile-last-login {
    display: grid;
    gap: 6px;
    min-width: 150px;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: right;
}

.public-profile-last-login strong {
    color: var(--ink);
    font-size: 0.92rem;
}

.public-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--card-gap);
    margin-top: var(--section-gap);
}

.public-profile-stat {
    display: grid;
    gap: 5px;
}

.public-profile-stat strong {
    color: var(--accent-strong);
    font-size: 1.45rem;
}

.public-profile-stat span {
    color: var(--muted);
    font-size: 0.9rem;
}

.public-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: var(--section-gap);
    margin-top: var(--section-gap);
}

.public-profile-card {
    min-width: 0;
}

.public-profile-card h2 {
    margin-top: 8px;
}

.public-profile-route-list {
    display: grid;
    margin-top: var(--space-5);
    border-top: 1px solid var(--line);
}

.public-profile-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.public-profile-route strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-profile-route span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.82rem;
}

.public-profile-route:hover strong {
    color: var(--accent-strong);
}

.public-profile-pagination {
    margin-top: var(--space-5);
}

.public-profile-empty {
    margin-top: var(--space-5);
    box-shadow: none;
}

.public-profile-achievements {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 226, 0.76));
}

.public-profile-achievements-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.public-profile-achievements-heading > span {
    display: inline-grid;
    min-width: 28px;
    min-height: 28px;
    place-items: center;
    border-radius: 999px;
    background: rgba(218, 170, 68, 0.16);
    color: #86601c;
    font-size: 0.8rem;
    font-weight: 800;
}

.public-achievements-list {
    display: grid;
    gap: 10px;
    margin-top: var(--space-5);
}

.public-achievement-card {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(197, 148, 45, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
}

.public-achievement-art {
    width: 62px;
    height: 62px;
    overflow: hidden;
    border-radius: 12px;
    background: #f3e2b6;
}

.public-achievement-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-achievement-card h3 {
    font-size: 0.94rem;
}

.public-achievement-card p {
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.45;
}

.public-achievement-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.7rem;
}

.public-achievement-meta span {
    color: #86601c;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.auth-form {
    margin-top: var(--space-6);
}

.auth-switch {
    margin-top: var(--space-5);
    color: var(--muted);
}

.recaptcha-box {
    overflow-x: auto;
}

.auth-error {
    display: block;
    margin-top: 8px;
    color: #b14b22;
}

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

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--card-gap);
    margin-bottom: var(--section-gap);
}

.profile-stat {
    display: grid;
    gap: 5px;
}

.profile-stat strong {
    color: var(--accent-strong);
    font-size: 1.45rem;
}

.profile-stat span {
    color: var(--muted);
    font-size: 0.92rem;
}

.profile-section {
    margin-bottom: var(--section-gap);
}

.profile-section h2 {
    margin-top: 8px;
}

.profile-routes-empty {
    margin-top: var(--space-5);
}

.profile-route-list {
    display: grid;
    margin-top: var(--space-5);
    border-top: 1px solid var(--line);
}

.profile-route-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.profile-route-row span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-ban-card {
    margin-bottom: var(--section-gap);
    border-color: rgba(201, 83, 83, 0.28);
}

.profile-ban-card h2 {
    margin-top: 8px;
}

.achievements-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 226, 0.76));
}

.achievements-head {
    align-items: end;
    margin-bottom: var(--space-5);
}

.achievement-counter {
    color: var(--muted);
    font-size: 0.9rem;
}

.achievements-list {
    display: grid;
    gap: 12px;
}

.achievement-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: var(--space-4);
    align-items: center;
    min-height: 124px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    transition: border-color 180ms ease, transform 180ms ease;
}

.achievement-card.is-earned {
    border-color: rgba(32, 112, 149, 0.25);
}

.achievement-card.is-earned:hover {
    border-color: rgba(32, 112, 149, 0.48);
    transform: translateY(-1px);
}

.achievement-card.is-locked {
    background: rgba(222, 227, 230, 0.7);
    border-color: rgba(126, 139, 146, 0.22);
}

.achievement-art {
    width: 92px;
    height: 92px;
    overflow: hidden;
    border-radius: 14px;
    background: #d9e0e3;
}

.achievement-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.achievement-card.is-locked .achievement-art img {
    filter: grayscale(1);
    opacity: 0.42;
}

.achievement-card.is-locked .achievement-copy,
.achievement-card.is-locked .achievement-footer {
    color: #87939a;
}

.achievement-content {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.achievement-copy h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
}

.achievement-copy p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.achievement-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.78rem;
}

.achievement-rarity {
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.achievement-rarity.is-rare,
.public-achievement-meta span.is-rare {
    color: var(--accent-strong);
}

.achievement-rarity.is-epic,
.public-achievement-meta span.is-epic {
    color: #a335ee;
    text-shadow: 0 0 8px rgba(163, 53, 238, 0.2);
}

.admin-user-list {
    display: grid;
    margin-top: var(--space-5);
    border-top: 1px solid var(--line);
}

.admin-user-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 1.2fr);
    gap: var(--space-5);
    padding: var(--space-5) 0;
    border-bottom: 1px solid var(--line);
}

.admin-user-row.is-banned {
    background: rgba(255, 242, 242, 0.45);
}

.admin-user-main,
.admin-user-actions,
.admin-user-ban-form {
    display: grid;
    gap: 7px;
}

.admin-user-main > span {
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-user-ban-note {
    color: #b14b22 !important;
}

.admin-user-ban-form {
    grid-template-columns: 90px minmax(0, 1fr) auto;
    align-items: end;
}

.admin-user-ban-form label {
    display: grid;
    gap: 6px;
}

.admin-user-ban-form label > span {
    color: var(--muted);
    font-size: 0.82rem;
}

.btn-small {
    width: auto;
    min-height: 42px;
    padding: 9px 12px;
    font-size: 0.88rem;
}

.hero {
    border-radius: calc(var(--radius) + 4px);
    padding: var(--space-9);
    margin-bottom: var(--space-7);
    display: grid;
    gap: var(--space-7);
    grid-template-columns: 1.5fr 1fr;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(79, 159, 220, 0.08), transparent 44%),
        radial-gradient(circle at bottom right, rgba(196, 231, 255, 0.7), transparent 30%);
    pointer-events: none;
}

.eyebrow {
    color: var(--accent-strong);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: var(--text-xs);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.page-title {
    font-size: var(--page-title-size);
    max-width: 100%;
}

.page-title-wide {
    font-size: clamp(2.3rem, 6vw, 4.9rem);
    max-width: 11ch;
}

.lead {
    max-width: 66ch;
    font-size: var(--text-lg);
}

.stack-section {
    display: grid;
    gap: var(--section-gap);
}

.hero-grid,
.filters,
.grid,
.metrics,
.detail-grid,
.photo-grid,
.comment-list {
    display: grid;
    gap: var(--card-gap);
}

.hero-stat,
.metric,
.comment {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(243, 249, 254, 0.9));
    border-radius: var(--radius);
    padding: var(--space-5);
    border: 1px solid rgba(126, 157, 182, 0.16);
    box-shadow: var(--shadow-soft);
}

.hero-stat strong {
    display: block;
    font-size: 1.9rem;
    margin-bottom: 6px;
    color: var(--ink);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-7);
}

.btn {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: var(--space-3) var(--space-4);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
    box-shadow: none;
}

.btn:focus-visible,
.nav a:focus-visible,
.footer-link:focus-visible,
.footer-legal-link:focus-visible {
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fafdff;
    box-shadow: 0 12px 24px rgba(79, 159, 220, 0.22);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.82);
    border-color: var(--line);
    color: var(--ink);
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    align-items: flex-end;
    margin-bottom: var(--space-5);
}

.filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: var(--section-gap);
}

.card,
.empty {
    border-radius: var(--radius);
    padding: var(--card-padding);
}

.grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-card {
    display: grid;
    gap: var(--card-gap);
    content-visibility: auto;
    contain-intrinsic-size: auto 540px;
}

.route-cover-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.route-cover {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(208, 237, 255, 0.95), rgba(93, 160, 215, 0.78)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
    display: grid;
    place-items: end start;
    padding: var(--space-5);
    color: #fafdff;
    position: relative;
}

.route-cover-link:hover .route-cover-image {
    transform: scale(1.02);
}

.route-cover-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.18s ease;
}

.route-cover::after {
    content: "";
    position: absolute;
    inset: auto -10% -26% auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.36), transparent 62%);
    z-index: 1;
}

.route-cover .pill {
    position: relative;
    z-index: 2;
}

.route-card-copy {
    margin-top: var(--space-3);
}

.route-card-copy h3 {
    margin-bottom: var(--space-3);
}

.route-card .metrics {
    gap: var(--space-3);
}

.route-card .metric {
    padding: var(--space-3) 10px;
}

.route-card .metric-label {
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.82);
    color: var(--accent-strong);
    border: 1px solid rgba(79, 159, 220, 0.12);
    backdrop-filter: blur(8px);
}

.pill.is-active {
    background: linear-gradient(135deg, rgba(79, 159, 220, 0.18), rgba(79, 159, 220, 0.1));
    border-color: rgba(79, 159, 220, 0.34);
    color: var(--accent-strong);
}

.meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: var(--text-base);
}

.meta span,
.meta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(237, 245, 251, 0.88);
    border: 1px solid rgba(126, 157, 182, 0.14);
}

.route-author-name {
    color: var(--muted);
    font-weight: 700;
}

.route-author-name.is-registered {
    color: #86601c;
}

.route-author-link,
.comment-author-link {
    text-decoration: none;
}

.route-author-link:hover,
.comment-author-link:hover {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.metric {
    min-width: 0;
    overflow: hidden;
}

.metric-label {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: var(--space-2);
}

.star-meter {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.star-meter-star {
    color: rgba(95, 119, 137, 0.28);
    line-height: 1;
}

.star-meter-star.is-active {
    color: var(--accent-strong);
}

.star-meter-card .star-meter-star {
    font-size: 0.82rem;
}

.route-card .star-meter-card {
    width: 100%;
    justify-content: center;
    gap: 0;
}

.star-meter-detail .star-meter-star {
    font-size: 1.28rem;
}

.detail-grid {
    grid-template-columns: 1.7fr 1fr;
    align-items: start;
}

.photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.photo {
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: rgba(79, 159, 220, 0.1);
}

.field,
.textarea,
.select,
.file-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px var(--space-4);
    background: rgba(252, 254, 255, 0.98);
    color: var(--ink);
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.field:focus,
.textarea:focus,
.select:focus,
.file-input:focus {
    outline: none;
    border-color: rgba(79, 159, 220, 0.6);
    box-shadow: 0 0 0 4px rgba(79, 159, 220, 0.12);
    background: var(--paper-strong);
}

.textarea {
    min-height: 170px;
    resize: vertical;
}

.form-grid {
    display: grid;
    gap: var(--card-gap);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
    grid-column: span 2;
}

label {
    display: grid;
    gap: var(--space-2);
    font-size: var(--text-base);
}

label > span:first-child {
    font-weight: 600;
    color: var(--ink);
}

.hint {
    color: var(--muted);
    font-size: var(--text-sm);
}

.hint-link {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hint-link:hover {
    color: var(--ink);
}

.flash,
.error-box {
    border-radius: 14px;
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
}

.flash {
    background: rgba(47, 125, 105, 0.1);
    color: var(--ok);
    border: 1px solid rgba(47, 125, 105, 0.16);
}

.error-box {
    background: rgba(79, 159, 220, 0.1);
    color: #1e5d8f;
    border: 1px solid rgba(79, 159, 220, 0.16);
}

.rich-text {
    display: grid;
    gap: var(--space-4);
    color: var(--muted);
}

.rich-text p,
.rich-text h2,
.rich-text h3 {
    margin: 0;
}

.rich-text h2 {
    color: var(--ink);
    font-size: 1.32rem;
    letter-spacing: -0.025em;
}

.rich-text h3 {
    color: var(--ink);
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.rich-text a {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
    color: var(--muted);
    font-size: 0.92rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(124, 197, 242, 0.22), rgba(61, 143, 212, 0.16));
    color: var(--accent-strong);
    border: 1px solid rgba(79, 159, 220, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.comment-avatar svg {
    width: 18px;
    height: 18px;
}

.comment-registered .comment-avatar {
    background: linear-gradient(135deg, #ffe6a1, #d8a63d);
    color: #765314;
    border-color: rgba(197, 148, 45, 0.38);
    box-shadow: 0 0 0 3px rgba(218, 170, 68, 0.1), 0 0 16px rgba(218, 170, 68, 0.28);
    animation: registered-avatar-glow 2.8s ease-in-out infinite;
}

.comment-registered .comment-author-name {
    color: #86601c;
}

@keyframes registered-avatar-glow {
    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(218, 170, 68, 0.08), 0 0 13px rgba(218, 170, 68, 0.2);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(218, 170, 68, 0.14), 0 0 19px rgba(218, 170, 68, 0.34);
    }
}

.auth-comment-identity,
.auth-identity-field {
    display: grid;
    gap: 6px;
    padding: 13px 14px;
    border: 1px solid rgba(79, 159, 220, 0.18);
    border-radius: 12px;
    background: rgba(244, 249, 253, 0.7);
}

.auth-comment-identity span,
.auth-identity-field > span:first-child {
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-comment-identity strong,
.auth-identity-field strong {
    color: var(--accent-strong);
}

.comment-author-name {
    color: var(--ink);
    font-weight: 700;
}

.comment-reply-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.84rem;
    cursor: pointer;
    transition: color 0.16s ease;
}

.comment-reply-button:hover {
    color: var(--accent-strong);
}

.comment-meta-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.comment-image-block {
    margin-top: var(--space-4);
}

.comment-vote {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: var(--space-3);
    color: var(--muted);
}

.comment-vote-button {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #8da2b2;
    cursor: pointer;
}

.comment-vote-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.comment-vote-button:hover,
.comment-vote-button:focus-visible,
.comment-vote-button.is-active {
    color: var(--accent-strong);
    background: rgba(103, 181, 237, 0.1);
    border-color: rgba(79, 159, 220, 0.18);
}

.comment-vote-button:disabled {
    cursor: wait;
    opacity: 0.58;
}

.comment-rating {
    min-width: 20px;
    color: var(--muted);
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.comment-rating.is-positive {
    color: #2f9b62;
}

.comment-rating.is-negative {
    color: #c95353;
}

.comment-vote-error {
    flex-basis: 100%;
    max-width: 190px;
    margin-left: 0;
    color: #b14b22;
    font-size: 0.78rem;
    line-height: 1.25;
}

.comment-photo-trigger {
    width: auto;
    max-width: 220px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(79, 159, 220, 0.14);
}

.comment-photo-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.route-materials-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.route-materials-heading {
    min-width: 0;
}

.route-materials-heading h3 {
    margin-bottom: 0;
}

.route-favorite-wrap {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.favorite-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid rgba(79, 159, 220, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--muted);
    font: inherit;
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
}

.favorite-button:hover,
.favorite-button:focus-visible,
.favorite-button.is-active {
    border-color: rgba(203, 92, 105, 0.3);
    background: rgba(255, 244, 246, 0.95);
    color: #b34c64;
}

.favorite-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.favorite-button.is-active svg {
    fill: currentColor;
}

.admin-comment-image {
    margin-top: var(--space-4);
}

.admin-comment-image a {
    display: inline-flex;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(79, 159, 220, 0.12);
}

.admin-comment-image img {
    display: block;
    width: 160px;
    height: 106px;
    object-fit: cover;
}

.map-frame {
    height: 540px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #f8fbfe, #edf5fb);
}

.map-frame-lg {
    height: 540px;
}

.info-card {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-5);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(242, 249, 254, 0.9));
}

.panel-stack {
    display: grid;
    gap: var(--card-gap);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--card-gap);
}

.article-card {
    display: grid;
    gap: 16px;
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
}

.article-card-cover {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: linear-gradient(160deg, rgba(208, 237, 255, 0.95), rgba(93, 160, 215, 0.78));
    position: relative;
}

.article-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-copy {
    display: grid;
    gap: var(--space-3);
}

.article-card-copy h3 {
    margin: 0;
}

.article-card-actions {
    margin-top: auto;
}

.footer {
    margin-top: 34px;
    padding: var(--space-6) var(--space-7);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(238, 246, 252, 0.9));
    box-shadow: var(--shadow-soft);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: var(--space-7);
    align-items: start;
}

.footer-title {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: var(--space-3);
}

.footer-text {
    max-width: 62ch;
    font-size: var(--text-base);
}

.footer-links {
    display: grid;
    gap: 4px;
    justify-items: start;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: var(--muted);
    transition: color 0.18s ease;
}

.footer-link:hover {
    color: var(--accent-strong);
}

.footer-note {
    display: none;
}

.footer-legal {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(126, 157, 182, 0.12);
}

.footer-legal-link {
    font-size: 0.8rem;
    color: rgba(95, 119, 137, 0.74);
    transition: color 0.18s ease;
}

.footer-legal-link:hover {
    color: var(--muted);
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 var(--space-6);
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(79, 159, 220, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-tab:hover {
    transform: translateY(-1px);
    color: var(--accent-strong);
    border-color: rgba(79, 159, 220, 0.32);
}

.admin-tab.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fafdff;
    border-color: transparent;
    box-shadow: 0 14px 28px rgba(79, 159, 220, 0.22);
}

.desktop-only {
    display: inline-flex;
}

.button-row {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: var(--section-gap);
}

.pagination nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
    color: var(--muted);
}

.pagination [aria-current="page"] span,
.pagination .active span {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fafdff;
    border-color: transparent;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero-home-copy .lead {
    margin-top: var(--space-7);
}

.filter-card {
    display: grid;
    gap: var(--space-3);
}

.difficulty-filter {
    display: grid;
    gap: 10px;
}

.difficulty-filter-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.difficulty-filter-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
}

.difficulty-filter-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    min-height: auto;
    padding: 2px;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.difficulty-filter-option:hover {
    transform: translateY(-1px);
}

.difficulty-filter-star {
    font-size: 1.9rem;
    line-height: 1;
    color: rgba(95, 119, 137, 0.28);
    transition: color 0.15s ease;
}

.difficulty-filter-option:hover .difficulty-filter-star,
.difficulty-filter-option:hover ~ .difficulty-filter-option .difficulty-filter-star,
.difficulty-filter-input:checked + .difficulty-filter-option .difficulty-filter-star,
.difficulty-filter-input:checked + .difficulty-filter-option ~ .difficulty-filter-option .difficulty-filter-star {
    color: var(--accent-strong);
}

.difficulty-filter-reset {
    font-size: 0.88rem;
    color: var(--muted);
}

.difficulty-filter-reset:hover {
    color: var(--accent-strong);
}

.leaflet-control-layers {
    border: 1px solid var(--line-strong) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-soft) !important;
}

.leaflet-control-layers,
.leaflet-control-layers-expanded {
    background: rgba(255, 255, 255, 0.94) !important;
    color: var(--ink) !important;
}

.leaflet-control-layers label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
}

.map-style-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.map-style-button {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.map-style-button.is-active {
    background: rgba(79, 159, 220, 0.14);
    color: var(--accent-strong);
    border-color: rgba(79, 159, 220, 0.4);
}

.photo-upload-panel {
    display: grid;
    gap: var(--space-3);
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: var(--space-3);
}

.photo-preview-card {
    display: grid;
    gap: var(--space-2);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.photo-preview-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(79, 159, 220, 0.08);
}

.photo-preview-name {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-word;
}

.photo-feedback {
    display: none;
    gap: 6px;
    padding: var(--space-3) 14px;
    border-radius: 12px;
    background: rgba(79, 159, 220, 0.1);
    border: 1px solid rgba(79, 159, 220, 0.18);
    color: #1e5d8f;
    font-size: 0.88rem;
}

.photo-feedback.is-visible {
    display: grid;
}

.rating-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
}

.create-page-title {
    font-size: clamp(1.55rem, 3vw, 3rem);
    max-width: none;
    white-space: nowrap;
}

.rating-card {
    display: grid;
    gap: var(--space-3);
    align-content: start;
    min-height: 100%;
    padding: var(--space-4);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(242, 249, 254, 0.9));
}

.rating-card strong {
    font-size: 1rem;
}

.rating-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.rating-value {
    min-width: 50px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(79, 159, 220, 0.12);
    color: var(--accent-strong);
    text-align: center;
    font-size: 0.84rem;
    font-weight: 700;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
}

.star-rating input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
    color: rgba(95, 119, 137, 0.28);
    transition: transform 0.15s ease, color 0.15s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--accent-strong);
}

.star-rating label:hover {
    transform: translateY(-1px) scale(1.04);
}

.source-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.source-selector input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.source-option {
    display: grid;
    gap: var(--space-2);
    min-height: 132px;
    padding: 20px;
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 254, 0.94));
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.source-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(52, 101, 140, 0.08);
}

.source-option-top {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.source-option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(79, 159, 220, 0.1);
    color: var(--accent-strong);
    flex-shrink: 0;
}

.source-option-icon svg {
    width: 28px;
    height: 28px;
}

.source-option-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #1e1d1a;
}

.source-option-text {
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.55;
}

.source-selector input:checked + .source-option {
    border-color: rgba(79, 159, 220, 0.56);
    box-shadow: 0 18px 32px rgba(79, 159, 220, 0.14);
    background: linear-gradient(145deg, rgba(248, 252, 255, 1), rgba(223, 240, 253, 0.96));
}

.source-selector input:checked + .source-option .source-option-icon {
    background: rgba(79, 159, 220, 0.18);
    color: var(--accent-strong);
}

.source-selector input:checked + .source-option .source-option-title {
    color: var(--accent-strong);
}

.editor-shell {
    display: grid;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(252, 254, 255, 0.98);
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(237, 245, 251, 0.72);
}

.editor-button {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.editor-button[data-value="h2"],
.editor-button[data-value="h3"],
.editor-button[data-editor-toggle] {
    min-width: auto;
    font-size: 0.82rem;
    font-weight: 700;
}

.editor-button.is-active {
    background: rgba(79, 159, 220, 0.14);
    border-color: rgba(79, 159, 220, 0.36);
    color: var(--accent-strong);
}

.editor-area {
    min-height: 220px;
    padding: 16px;
    outline: none;
    color: var(--ink);
    line-height: 1.65;
}

.editor-area.is-hidden,
.editor-code.is-hidden {
    display: none;
}

.editor-area:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
}

.editor-area p,
.editor-area h2,
.editor-area h3 {
    margin: 0 0 12px;
    color: var(--ink);
}

.editor-area h2 {
    font-size: 1.35rem;
}

.editor-area h3 {
    font-size: 1.1rem;
}

.editor-area a {
    color: var(--accent-strong);
    text-decoration: underline;
}

.editor-code {
    min-height: 220px;
    border: 0;
    border-radius: 0;
    padding: 16px;
    background: rgba(252, 254, 255, 0.98);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    line-height: 1.6;
    resize: vertical;
}

.editor-road-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(237, 245, 251, 0.52);
}

.editor-road-picker-field {
    display: grid;
    gap: 8px;
}

.editor-road-picker .btn {
    width: auto;
    white-space: nowrap;
}

.editor-road-picker .hint {
    grid-column: 1 / -1;
    margin: 0;
}

.blog-article-form .editor-area {
    min-height: 280px;
    line-height: 1.7;
}

.blog-article-form .editor-code {
    min-height: 280px;
}

.editor-field {
    display: grid;
    gap: 8px;
    grid-column: span 2;
    font-size: 0.95rem;
}

.editor-field > span:first-child {
    font-weight: 600;
    color: var(--ink);
}

.create-route-form .form-grid {
    gap: 20px;
}

.create-short-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.create-field,
.create-section {
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: 100%;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(242, 249, 254, 0.9));
}

.create-field > span:first-child,
.create-section-title {
    font-weight: 700;
    color: var(--ink);
}

.create-field .field,
.create-field .select,
.create-field .file-input {
    min-height: 52px;
}

.create-section-title {
    margin-bottom: 2px;
}

.route-share-card {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(79, 159, 220, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(242, 249, 254, 0.94));
    box-shadow: 0 10px 24px rgba(52, 101, 140, 0.06);
}

.route-share-card p {
    font-size: 0.92rem;
    line-height: 1.6;
}

.route-share-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.route-share-input {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-map-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    overflow-x: auto;
}

.route-freshness {
    margin-top: var(--space-5);
    padding: var(--space-4);
    border: 1px solid rgba(126, 157, 182, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(246, 251, 255, 0.72);
}

.route-surface-description {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(126, 157, 182, 0.2);
}

.route-surface-description .eyebrow {
    margin-bottom: 8px;
}

.route-freshness-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
}

.route-freshness-heading h4 {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: 0.98rem;
}

.route-freshness-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: var(--space-3);
}

.route-freshness-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.route-freshness-button:hover:not(:disabled),
.route-freshness-button:focus-visible {
    border-color: rgba(79, 159, 220, 0.45);
    color: var(--accent-strong);
}

.route-freshness-button:disabled {
    cursor: default;
    opacity: 0.58;
}

.route-freshness-button-icon,
.route-freshness-report-mark {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.route-freshness-button.is-confirmed .route-freshness-button-icon,
.route-freshness-report.is-ok .route-freshness-report-mark {
    background: rgba(47, 155, 98, 0.12);
    color: #2f9b62;
}

.route-freshness-button.is-changed .route-freshness-button-icon,
.route-freshness-report.is-changed .route-freshness-report-mark {
    background: rgba(201, 83, 83, 0.12);
    color: #c95353;
}

.route-freshness-feedback {
    max-width: 150px;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.3;
    text-align: right;
}

.route-freshness-feedback.is-success {
    color: #2f9b62;
}

.route-freshness-feedback.is-error {
    color: #c95353;
}

.route-freshness-list {
    display: grid;
    gap: 7px;
    margin-top: var(--space-4);
}

.route-freshness.is-public .route-freshness-list {
    margin-top: 0;
}

.route-freshness-guest-note {
    margin: var(--space-3) 0 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
}

.route-freshness-guest-note a {
    color: inherit;
    font: inherit;
}

.route-freshness-report {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 0.77rem;
}

.route-freshness-report-label {
    min-width: 0;
}

.route-freshness-report-meta {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.route-freshness-report-author {
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 700;
}

.route-freshness-report time {
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.72rem;
}

.route-map-source {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(237, 245, 251, 0.88);
    border: 1px solid rgba(126, 157, 182, 0.14);
    color: var(--muted);
    font-size: 0.92rem;
    white-space: nowrap;
}

.route-map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(79, 159, 220, 0.2);
    background: rgba(79, 159, 220, 0.08);
    color: var(--accent-strong);
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
}

.route-map-link:hover {
    background: rgba(79, 159, 220, 0.14);
    border-color: rgba(79, 159, 220, 0.34);
}

.route-title {
    font-size: clamp(1.2rem, 3vw, 2rem);
    max-width: none;
}

.route-region-highlight {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(79, 159, 220, 0.18);
    background: linear-gradient(135deg, rgba(232, 245, 254, 0.92), rgba(246, 251, 255, 0.98));
    box-shadow: 0 12px 26px rgba(52, 101, 140, 0.08);
    color: var(--ink);
}

.route-region-highlight strong {
    font-size: 0.78rem;
    line-height: 1;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.route-region-highlight span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
}

#route_show_map {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

#route_show_map .leaflet-pane,
#route_show_map .leaflet-top,
#route_show_map .leaflet-bottom,
#route_show_map .leaflet-control,
#route_show_map .leaflet-container {
    z-index: 1 !important;
}

.photo-trigger {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.photo-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.photo-trigger:hover img {
    transform: scale(1.02);
    filter: saturate(1.04);
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(18, 33, 46, 0.82);
    backdrop-filter: blur(10px);
    z-index: 120;
}

.photo-lightbox.is-open {
    display: flex;
}

.photo-lightbox-dialog {
    position: relative;
    width: min(100%, 1100px);
    max-height: min(90vh, 960px);
    display: grid;
    gap: 12px;
    justify-items: center;
}

.photo-lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 64px);
    border-radius: 16px;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.photo-lightbox-caption {
    color: rgba(248, 251, 254, 0.92);
    text-align: center;
    font-size: 0.96rem;
}

.photo-lightbox-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #143247;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.photo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #143247;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.photo-lightbox-nav.prev {
    left: 0;
}

.photo-lightbox-nav.next {
    right: 0;
}

.admin-edited-note {
    margin-top: 14px;
    font-size: 0.84rem;
    color: var(--muted);
    opacity: 0.88;
}

.route-map-page {
    display: grid;
    gap: 18px;
}

.route-map-frame {
    height: min(82vh, 920px);
}

.blog-hero-copy {
    display: grid;
    align-content: start;
}

.blog-hero-copy .page-title {
    margin-bottom: var(--space-5);
}

.blog-hero-illustration {
    align-self: stretch;
    min-height: 100%;
    border-radius: calc(var(--radius) + 2px);
    overflow: hidden;
    border: 1px solid rgba(126, 157, 182, 0.16);
    box-shadow: var(--shadow-soft);
    background: linear-gradient(160deg, rgba(208, 237, 255, 0.95), rgba(93, 160, 215, 0.78));
}

.blog-hero-illustration img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    display: block;
}

.blog-article-card {
    display: block;
    overflow: hidden;
}

.rich-text.blog-article-body {
    margin-top: var(--space-5);
    display: block !important;
}

.rich-text.blog-article-body::after {
    content: "";
    display: block;
    clear: both;
}

.rich-text.blog-article-body > *:last-child {
    margin-bottom: 0;
}

.blog-article-cover {
    float: right;
    width: min(42%, 420px);
    margin: 6px 0 var(--space-5) var(--space-7);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(52, 101, 140, 0.12);
    border: 1px solid rgba(126, 157, 182, 0.16);
}

.blog-article-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-article-body p,
.blog-article-body h2,
.blog-article-body h3 {
    color: var(--ink);
}

.blog-article-body > h2,
.blog-article-body > h3,
.blog-article-body > table,
.blog-article-body > img {
    margin-top: var(--space-5);
    margin-bottom: var(--space-5);
}

.blog-road-card {
    clear: both;
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: var(--space-5);
    width: 100%;
    margin: var(--space-6) 0;
    padding: var(--space-4);
    border: 1px solid rgba(79, 159, 220, 0.2);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(247, 252, 255, 0.98), rgba(232, 244, 253, 0.94));
    box-shadow: 0 12px 28px rgba(52, 101, 140, 0.08);
}

.blog-road-card-media {
    display: block;
    align-self: stretch;
    min-height: 150px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(79, 159, 220, 0.12);
}

.blog-road-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
}

.blog-road-card-content {
    display: grid;
    align-content: center;
    gap: var(--space-3);
    min-width: 0;
}

.blog-road-card.has-no-media .blog-road-card-content {
    grid-column: 1 / -1;
}

.blog-road-card-label {
    color: var(--accent-strong);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.blog-road-card h3,
.blog-road-card p {
    margin: 0;
}

.blog-road-card h3 {
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.15;
}

.blog-road-card h3 a {
    color: var(--ink);
    text-decoration: none;
}

.blog-road-card h3 a:hover {
    color: var(--accent-strong);
}

.blog-road-card p {
    color: var(--muted);
    line-height: 1.55;
}

.blog-road-card-meta {
    gap: 8px;
    font-size: 0.86rem;
}

.blog-road-card-meta span {
    padding: 5px 8px;
}

.blog-road-card-ratings {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--muted);
    font-size: 0.8rem;
}

.blog-road-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.blog-road-card-rating strong {
    display: inline-flex;
    gap: 1px;
    font-size: 0.92rem;
}

.blog-article-meta {
    margin-top: var(--space-5);
}

.gpx-hero {
    display: grid;
    gap: var(--card-gap);
}

.gpx-hero-illustration {
    width: min(100%, 760px);
    aspect-ratio: 16 / 9;
    border-radius: calc(var(--radius) + 8px);
    overflow: hidden;
    border: 1px solid rgba(79, 159, 220, 0.16);
    background: linear-gradient(180deg, rgba(240, 248, 254, 0.98), rgba(223, 240, 253, 0.94));
    box-shadow: var(--shadow-soft);
}

.gpx-hero-illustration img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.gpx-layout {
    display: grid;
    gap: 20px;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
}

.gpx-card-grid {
    display: grid;
    gap: var(--card-gap);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gpx-app-list {
    display: grid;
    gap: var(--space-4);
}

.gpx-app {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-5);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(241, 248, 253, 0.92));
}

.gpx-app-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.gpx-app-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.gpx-steps {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.gpx-steps li {
    line-height: 1.65;
}

.usage-hero {
    display: grid;
    gap: 20px;
}

.usage-layout {
    display: grid;
    gap: 20px;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
}

.usage-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.usage-steps {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.usage-steps li {
    line-height: 1.65;
}

.usage-apps {
    display: grid;
    gap: 14px;
}

.usage-app {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(241, 248, 253, 0.92));
}

.usage-app-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.usage-app-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.policy-page {
    display: grid;
    gap: var(--section-gap);
}

.policy-page .lead {
    max-width: 72ch;
}

.policy-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--card-gap);
    align-items: start;
}

.policy-list {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    display: grid;
    gap: 10px;
}

.policy-list li {
    line-height: 1.68;
}

.policy-note {
    font-size: 0.9rem;
}

.admin-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.admin-inline-actions form {
    margin: 0;
}

.admin-inline-button {
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.86rem;
    line-height: 1.1;
    box-shadow: none;
}

.inline-upload-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px dashed rgba(79, 159, 220, 0.3);
    border-radius: 14px;
    background: rgba(237, 245, 251, 0.42);
}

.inline-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.inline-upload-status {
    min-height: 1.3rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.inline-image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.inline-image-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
}

.inline-image-preview {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(79, 159, 220, 0.08);
}

.inline-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inline-image-code {
    width: 100%;
    min-height: 74px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(252, 254, 255, 0.98);
    color: var(--ink);
    font: inherit;
    font-size: 0.88rem;
    line-height: 1.45;
    resize: vertical;
}

.inline-image-copy {
    justify-self: start;
    min-height: 34px;
    padding: 8px 12px;
    font-size: 0.86rem;
    box-shadow: none;
}

/* Общие короткие отступы для страниц и компонентов. */
.u-mt-0 { margin-top: 0 !important; }
.u-mt-3 { margin-top: var(--space-3) !important; }
.u-mt-4 { margin-top: var(--space-4) !important; }
.u-mt-5 { margin-top: var(--space-5) !important; }
.u-mt-section { margin-top: var(--section-gap) !important; }
.u-mb-0 { margin-bottom: 0 !important; }
.u-mb-3 { margin-bottom: var(--space-3) !important; }
.u-mb-4 { margin-bottom: var(--space-4) !important; }
.u-mb-5 { margin-bottom: var(--space-5) !important; }

.filter-actions-card {
    align-content: end;
}

@media (min-width: 961px) {
    .route-overview-grid {
        align-items: stretch;
    }

    .route-overview-main,
    .route-overview-sidebar {
        height: 100%;
    }

    .route-overview-main {
        display: flex;
        flex-direction: column;
    }

    .route-overview-sidebar {
        display: flex;
        flex-direction: column;
        min-height: 900px;
    }

    #route_show_map {
        flex: 1 1 auto;
        min-height: 540px;
    }
}

@media (max-width: 960px) {
    .hero,
    .hero-grid,
    .detail-grid,
    .grid,
    .filters,
    .metrics,
    .photo-grid,
    .form-grid,
    .article-grid,
    .gpx-layout,
    .gpx-card-grid,
    .policy-grid,
    .usage-layout,
    .usage-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .hero {
        padding: 26px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        border-radius: var(--radius);
        top: 10px;
    }

    .blog-hero-illustration {
        order: -1;
    }

    .blog-article-cover {
        float: none;
        width: 100%;
        margin: 0 0 var(--space-5);
    }

    .blog-road-card {
        grid-template-columns: 1fr;
    }

    .blog-road-card-media,
    .blog-road-card-media img {
        min-height: 0;
    }

    .blog-road-card-media img {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .blog-road-card-content,
    .blog-road-card.has-no-media .blog-road-card-content {
        grid-column: 1;
    }

    .comment-meta-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .shell {
        width: min(1180px, calc(100% - 20px));
        padding-top: 12px;
    }

    body::before {
        height: 138px;
    }

    .topbar {
        align-items: center;
        flex-direction: row;
        gap: 4px;
        padding: 10px 12px;
        top: 8px;
        z-index: 1000;
    }

    .brand {
        gap: 7px;
        font-size: 0.88rem;
        min-width: 0;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        flex: 0 0 34px;
    }

    .nav {
        width: auto;
        margin-left: auto;
        gap: 0;
        flex-wrap: nowrap;
        flex: 1 1 auto;
        min-width: 0;
    }

    .nav a {
        flex: 0 1 auto;
        text-align: center;
        white-space: nowrap;
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .topbar-actions {
        gap: 3px;
        min-width: 0;
        flex: 0 0 auto;
    }

    .desktop-nav,
    .search-menu {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .search-menu {
        display: none;
    }

    .search-link-mobile {
        display: inline-flex;
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        border-radius: 11px;
    }

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

    .auth-login-layout {
        grid-template-columns: 1fr;
        gap: var(--section-gap);
    }

    .auth-register-layout {
        grid-template-columns: 1fr;
        gap: var(--section-gap);
    }

    .auth-illustration,
    .auth-illustration img {
        min-height: 280px;
    }

    .auth-card {
        height: auto;
    }

    .auth-illustration {
        height: 320px;
        min-height: 320px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-head {
        align-items: stretch;
    }

    .public-profile-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--space-5);
    }

    .public-profile-last-login {
        min-width: 0;
        text-align: left;
    }

    .public-profile-stats,
    .public-profile-layout {
        grid-template-columns: 1fr;
    }

    .public-profile-route {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .profile-route-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .achievements-head {
        align-items: flex-start;
        gap: 8px;
    }

    .achievement-card {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px;
        min-height: 96px;
        padding: 10px;
    }

    .achievement-art {
        width: 72px;
        height: 72px;
    }

    .achievement-content {
        gap: 10px;
    }

    .achievement-copy h3 {
        font-size: 0.98rem;
    }

    .achievement-copy p {
        font-size: 0.84rem;
    }

    .achievement-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .admin-user-row {
        grid-template-columns: 1fr;
    }

    .admin-user-ban-form {
        grid-template-columns: 1fr;
    }

    .card,
    .empty,
    .hero {
        padding: 18px;
    }

    .page-title,
    .page-title-wide {
        max-width: none;
    }

    .route-card .metrics {
        gap: 14px;
    }

    .route-card .metric {
        padding: 14px 12px;
    }

    .route-card .metric-label {
        font-size: 0.92rem;
        margin-bottom: 10px;
    }

    .route-card .star-meter-card {
        justify-content: flex-start;
        gap: 1px;
    }

    .route-card .star-meter-card .star-meter-star {
        font-size: 1.2rem;
    }

    .difficulty-filter-stars {
        gap: 1px;
    }

    .difficulty-filter-star {
        font-size: 1.7rem;
    }

    .create-route-form {
        padding: 16px;
    }

    .create-route-form .form-grid,
    .create-route-form .form-grid > * {
        grid-template-columns: 1fr;
        grid-column: span 1;
    }

    .create-field,
    .create-section,
    .rating-card,
    .info-card {
        padding: 14px;
    }

    .source-selector {
        grid-template-columns: 1fr;
    }

    .rating-grid {
        grid-template-columns: 1fr;
    }

    .create-short-grid {
        grid-template-columns: 1fr;
    }

    .editor-field {
        grid-column: span 1;
    }

    .editor-toolbar {
        gap: 6px;
        padding: 10px;
    }

    .editor-button {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
    }

    .editor-area {
        min-height: 200px;
        padding: 14px;
    }

    .source-option {
        min-height: auto;
        padding: 16px;
    }

    .source-option-top {
        gap: 12px;
    }

    .source-option-icon {
        width: 46px;
        height: 46px;
        border-radius: 12px;
    }

    .source-option-icon svg {
        width: 24px;
        height: 24px;
    }

    .map-style-switcher {
        display: grid;
        grid-template-columns: 1fr;
    }

    .map-style-button {
        width: 100%;
        justify-content: center;
    }

    .photo-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .route-share-row {
        grid-template-columns: 1fr;
    }

    .route-materials-head {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .route-favorite-wrap {
        justify-content: flex-start;
    }

    .route-freshness-actions {
        grid-template-columns: 1fr;
    }

    .route-freshness-button {
        justify-content: flex-start;
    }

    .comment-photo-trigger,
    .admin-comment-image img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .button-row,
    .actions {
        grid-template-columns: 1fr;
    }

    .button-row .btn,
    .actions .btn {
        width: 100%;
    }

    .meta {
        gap: 10px;
    }

    .create-page-title {
        white-space: normal;
    }

    .map-frame {
        height: 360px;
    }

    .map-frame-lg {
        height: 420px;
    }

    .desktop-only {
        display: none !important;
    }

    .btn {
        width: 100%;
    }

    .actions,
    .button-row {
        display: grid;
    }

    .photo-lightbox {
        padding: 16px;
    }

    .photo-lightbox-dialog {
        width: 100%;
    }

    .photo-lightbox-close {
        top: -4px;
        right: -4px;
    }

    .photo-lightbox-nav.prev {
        left: -2px;
    }

    .photo-lightbox-nav.next {
        right: -2px;
    }

    .inline-image-grid {
        grid-template-columns: 1fr;
    }

    .editor-road-picker {
        grid-template-columns: 1fr;
    }

    .editor-road-picker .btn {
        width: 100%;
    }

    .admin-inline-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 960px) and (min-width: 721px) {
    .rating-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .comment-registered .comment-avatar {
        animation: none;
    }
}
