/* Polarsteps-inspired travel journal theme */

:root {
    --brand: #1aafa1;
    --brand-dark: #0f8f84;
    --brand-light: #e6f7f5;
    --ink: #1c1c1e;
    --ink-secondary: #636366;
    --ink-muted: #aeaeb2;
    --surface: #ffffff;
    --bg: #f2f2f7;
    --border: #e5e5ea;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-sm: 12px;
    --font: "Plus Jakarta Sans", system-ui, sans-serif;
    --max-read: 1080px;
    --max-wide: 1040px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-weight: 400;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
}

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

a {
    color: var(--brand-dark);
    text-decoration: none;
}

a:hover { color: var(--brand); }

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Top bar ── */

.topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar__inner {
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 0 1rem;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar__brand {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.topbar__brand:hover { color: var(--brand); }

.topbar__nav {
    display: none;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.topbar__link {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-secondary);
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.topbar__link:hover {
    background: var(--bg);
    color: var(--ink);
}

.topbar__link.is-active {
    background: var(--brand-light);
    color: var(--brand-dark);
}

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

.search {
    position: relative;
    display: none;
    margin-left: 0.5rem;
    flex: 0 1 220px;
}

.search__input {
    width: 100%;
    height: 36px;
    padding: 0 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.search__input::placeholder {
    color: var(--ink-muted);
}

.search__input:focus {
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(26, 175, 161, 0.15);
}

.search__results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(420px, 92vw);
    max-height: min(70vh, 480px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 250;
    padding: 0.35rem;
}

.search__results[hidden] {
    display: none;
}

.search__item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.65rem;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.search__item:hover,
.search__item:focus {
    background: var(--brand-light);
    color: inherit;
}

.search__thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--border);
}

.search__thumb--empty {
    display: block;
    background: linear-gradient(135deg, var(--brand) 0%, #0d6e66 100%);
}

.search__meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.search__top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    align-items: center;
}

.search__date,
.search__trip {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.search__trip {
    color: var(--ink-muted);
    font-weight: 600;
}

.search__title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
}

.search__excerpt {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--ink-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search__empty {
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--ink-muted);
    text-align: center;
}

.mobile-nav__search {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.mobile-nav__search .search__input {
    background: var(--bg);
}

.search__results--mobile {
    position: static;
    width: 100%;
    max-height: 40vh;
    margin-top: 0.65rem;
    box-shadow: none;
}

.topbar__menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
}

.topbar__menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--ink);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

body.nav-open .topbar__menu-btn span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .topbar__menu-btn span:nth-child(2) {
    opacity: 0;
}

body.nav-open .topbar__menu-btn span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

body.nav-open { overflow: hidden; }

/* ── Mobile nav drawer ── */

.mobile-nav[hidden] { display: none; }

.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 300;
}

.mobile-nav__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.mobile-nav__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    height: 100%;
    background: var(--surface);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.25s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.mobile-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.mobile-nav__title {
    font-weight: 700;
    font-size: 1rem;
}

.mobile-nav__close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink-secondary);
}

.mobile-nav__links {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
}

.mobile-nav__link {
    display: block;
    padding: 0.85rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
}

.mobile-nav__link.is-active {
    color: var(--brand-dark);
    background: var(--brand-light);
}

.mobile-nav__group {
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
}

.mobile-nav__trip {
    display: block;
    padding: 0.65rem 1.25rem 0.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ink);
}

.mobile-nav__trip.is-active { color: var(--brand-dark); }

.mobile-nav__sublink {
    display: block;
    padding: 0.35rem 1.25rem 0.35rem 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-secondary);
}

.mobile-nav__sublink:hover { color: var(--brand); }

/* ── Main ── */

.main {
    flex: 1;
    padding-bottom: 2rem;
}

/* ── Profile / home ── */

.profile {
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 1.5rem 1rem 0;
}

.profile__header {
    margin-bottom: 1.5rem;
}

.profile__name {
    margin: 0 0 0.35rem;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.profile__bio {
    margin: 0 0 0.85rem;
    color: var(--ink-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
}

.profile__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-dark);
}

.profile__stats span {
    background: var(--brand-light);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
}

/* Trip cards — Polarsteps style */

.trip-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trip-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.trip-card:hover {
    transform: scale(1.01);
    color: #fff;
}

.trip-card__cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trip-card__cover--empty {
    background: linear-gradient(135deg, var(--brand) 0%, #0d6e66 100%);
}

.trip-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.1) 55%, transparent 100%);
}

.trip-card__location {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin-bottom: 0.25rem;
}

.trip-card__title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.trip-card__meta {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0.9;
}

/* ── Trip hero ── */

.trip-hero {
    position: relative;
    width: 100%;
    height: clamp(220px, 38vw, 440px);
    overflow: hidden;
    background: #111;
}

.trip-hero__cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trip-hero__cover--empty {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--brand) 0%, #0d6e66 100%);
}

.trip-hero__content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem max(1rem, calc((100% - var(--max-wide)) / 2 + 1rem)) 1.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.15) 50%, transparent 100%);
    color: #fff;
}

.trip-hero__location {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
}

.trip-hero__title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.trip-hero__stats {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

/* ── Trip body ── */

.trip-body {
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 1.25rem 1rem 0;
}

.trip-body--wide {
    max-width: var(--max-wide);
}

.trip-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.trip-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.trip-action:hover {
    border-color: var(--brand);
    box-shadow: 0 4px 16px rgba(26, 175, 161, 0.12);
    color: var(--ink);
}

.trip-action__icon { font-size: 1.25rem; margin-bottom: 0.35rem; }

.trip-action__label {
    font-weight: 700;
    font-size: 0.95rem;
}

.trip-action__count {
    font-size: 0.78rem;
    color: var(--ink-secondary);
    margin-top: 0.15rem;
}

.trip-about {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.section-label {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-dark);
}

.trip-about p {
    margin: 0;
    color: var(--ink-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ── Tabs ── */

.trip-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.25rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border);
}

.trip-tabs__tab {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink-secondary);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.trip-tabs__tab:hover {
    color: var(--ink);
    background: var(--bg);
}

.trip-tabs__tab.is-active {
    background: var(--brand);
    color: #fff;
}

/* ── Timeline (Polarsteps steps) ── */

.timeline {
    display: flex;
    flex-direction: column;
}

.timeline__step {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 0 0.85rem;
}

.timeline__marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.35rem;
}

.timeline__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand);
    border: 3px solid var(--brand-light);
    flex-shrink: 0;
}

.timeline__line {
    flex: 1;
    width: 2px;
    min-height: 24px;
    background: var(--border);
    margin-top: 4px;
}

.timeline__card {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    padding: 1.15rem 0 1.35rem;
    color: inherit;
    border-bottom: 1px solid var(--border);
}

.timeline__card:hover { color: inherit; }

.timeline__card:hover .timeline__title { color: var(--brand-dark); }

.timeline__thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--border);
}

.timeline__body { min-width: 0; }

.timeline__date {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-dark);
    margin-bottom: 0.2rem;
}

.timeline__title {
    margin: 0 0 0.3rem;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: color 0.15s;
}

.timeline__excerpt {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ink-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timeline__comments {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-muted);
}

/* Timeline without thumb */
.timeline__step:not(:has(.timeline__thumb)) .timeline__card {
    grid-template-columns: 1fr;
}

/* ── Photo mosaic ── */

.photo-section {
    margin-bottom: 2rem;
}

.photo-section__title {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.photo-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 4px;
}

.photo-mosaic__item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    cursor: zoom-in;
    background: var(--border);
}

.photo-mosaic__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.photo-mosaic__item:hover img { transform: scale(1.05); }

/* ── Step / post page ── */

.step-page {
    background: var(--bg);
}

.step-body {
    max-width: var(--max-read);
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    min-height: 50vh;
}

.step-body--page {
    padding-top: 2rem;
    margin-top: 0;
}

.step-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 1rem;
}

.step-breadcrumb a {
    color: var(--brand-dark);
}

.step-breadcrumb span { opacity: 0.5; }

.step-header {
    margin-bottom: 1.5rem;
}

.step-header time {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.4rem;
}

.step-header h1 {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

/* ── Post content ── */

.post-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--ink);
}

.post-content p { margin: 0 0 1.25em; }
.post-content p:last-child { margin-bottom: 0; }
.post-content .text-center { text-align: center; }

.post-content ul, .post-content ol {
    margin: 0 0 1.25em;
    padding-left: 1.3em;
}

.post-content li { margin-bottom: 0.35em; }

.post-content img {
    width: 100%;
    margin: 1.25em 0;
    border-radius: var(--radius-sm);
}

.post-content h2, .post-content h3 {
    margin: 1.5em 0 0.5em;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.post-content a { color: var(--brand-dark); font-weight: 600; }
.post-content a:hover { color: var(--brand); }
.post-content a.inline-lightbox { font-weight: 400; }

/* Gallery in posts */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 4px;
    margin: 1.25rem 0;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    cursor: zoom-in;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.25rem 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.content-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    line-height: 1.45;
}

.content-table th,
.content-table td {
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.content-table th {
    background: var(--brand-light);
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.content-table tr:nth-child(even) td {
    background: var(--bg);
}

.content-table tr:last-child td {
    border-bottom: 0;
}

.content-table a {
    color: var(--brand-dark);
    font-weight: 600;
}

.content-table-missing {
    color: var(--ink-muted);
    font-size: 0.9rem;
}

/* ── Comments ── */

.comments {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.comments h2 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 700;
}

.comments__empty {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.9rem;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.comment__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
}

.comment__meta strong { color: var(--ink); }
.comment__meta time { color: var(--ink-muted); }

.comment p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ink-secondary);
    line-height: 1.55;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.post-nav__link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.post-nav__link:hover {
    border-color: var(--brand);
    box-shadow: 0 4px 16px rgba(26, 175, 161, 0.12);
    color: var(--ink);
}

.post-nav__link--next {
    text-align: right;
    align-items: flex-end;
}

.post-nav__link--empty {
    visibility: hidden;
    pointer-events: none;
}

.post-nav__dir {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-dark);
}

.post-nav__title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.back {
    margin: 1.5rem 0 0;
    font-size: 0.88rem;
    font-weight: 600;
}

.back a { color: var(--brand-dark); }

@media (max-width: 520px) {
    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav__link--empty {
        display: none;
    }

    .post-nav__link--next {
        text-align: left;
        align-items: flex-start;
    }
}

.empty, .empty-page {
    max-width: var(--max-read);
    margin: 0 auto;
    padding: 3rem 1rem;
    text-align: center;
}

.empty-page h1 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
}

.empty-page p { color: var(--ink-secondary); }

.error-detail {
    margin: 1rem auto;
    max-width: 32rem;
    padding: 0.85rem;
    font-size: 0.78rem;
    text-align: left;
    background: var(--bg);
    border-radius: 8px;
    overflow-x: auto;
}

/* ── Footer ── */

.footer {
    padding: 1.25rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer p {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-muted);
}

/* ── Lightbox ── */

body.lightbox-open { overflow: hidden; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox[hidden] { display: none; }

.lightbox-figure {
    margin: 0;
    max-width: min(96vw, 1100px);
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 2.5rem);
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-caption {
    margin-top: 0.65rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.75rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
}

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ── Desktop ── */

@media (min-width: 768px) {
    .topbar__nav { display: flex; }
    .topbar__menu-btn { display: none; }
    .search { display: block; }

    .profile { padding-top: 2rem; }
    .profile__name { font-size: 2rem; }

    .trip-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
    }

    .trip-card { aspect-ratio: 4 / 3; }

    .timeline__card {
        grid-template-columns: 140px 1fr;
        gap: 1.25rem;
        padding: 1.25rem 0 1.5rem;
    }

    .timeline__thumb {
        width: 140px;
        height: 140px;
    }

    .timeline__title { font-size: 1.2rem; }

    .photo-mosaic {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 6px;
    }
}

@media (min-width: 1024px) {
    .trip-hero { height: clamp(280px, 42vh, 480px); }

    .step-body {
        padding: 2rem 2.5rem 3rem;
    }
}
