:root {
    --page-bg: #e5e5e5;
    --text-color: #666666;
    --section-color: #888888;
    --link-color: #f97316;
    --overlay-bg: #707070;
    --standard-width: 800px;
    --viewport-gap: 16px;
    --thumb-size: 64px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.gallery-open {
    overflow: hidden;
}

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

button {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.page {
    width: 100%;
}

.page__inner {
    width: min(calc(var(--standard-width) + 16px), calc(100% - (var(--viewport-gap) * 2)));
    margin: 0 auto;
    padding: 8px;
}

.hero-title {
    margin: 40px 0 32px;
    color: var(--text-color);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.hero-media {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1920 / 800;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
}

.copy {
    color: var(--text-color);
}

.intro {
    margin-top: 50px;
}

.copy p,
.copy ul,
.copy ol,
.copy blockquote {
    margin: 0;
}

.copy p + p,
.copy ul + p,
.copy ol + p,
.copy p + ul,
.copy p + ol,
.copy blockquote + p,
.copy p + blockquote {
    margin-top: 0.25em;
}

.copy ul,
.copy ol {
    padding-left: 1.3em;
}

.copy li + li {
    margin-top: 0.2em;
}

.copy a {
    color: var(--link-color);
    text-decoration: none;
}

.copy a:hover {
    text-decoration: underline;
}

.trip-section {
    width: 100%;
    margin-top: 36px;
}

.trip-section__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--section-color);
    cursor: pointer;
    text-align: left;
}

.trip-section__toggle:hover .trip-section__title,
.trip-section__toggle:focus-visible .trip-section__title {
    text-decoration: none;
}

.trip-section__toggle:focus-visible {
    outline: 2px solid rgba(249, 115, 22, 0.45);
    outline-offset: 2px;
    border-radius: 6px;
}

.trip-section__chevron {
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    color: currentColor;
    transform: scale(2, -2);
    transform-origin: center;
}

.trip-section.is-open .trip-section__chevron {
    transform: scale(2, 2);
}

.trip-section__title {
    width: 100%;
    color: var(--section-color);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    user-select: none;
}

.trip-section__panel {
    width: 100%;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 15px;
    width: 100%;
    padding: 30px;
}

.step__title,
.step__meta,
.step__copy,
.thumb-grid {
    width: 100%;
}

.step__title {
    margin: 0;
    color: var(--text-color);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.step__meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: stretch;
}

.step__date {
    flex: 0 0 auto;
    font-weight: 700;
    white-space: pre;
}

.step__address {
    min-width: 0;
}

.step__copy {
    margin-top: 0;
}

.thumb-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}

.thumb {
    appearance: none;
    border: 0;
    padding: 0;
    width: var(--thumb-size);
    height: var(--thumb-size);
    background: transparent;
    cursor: pointer;
}

.thumb:focus-visible {
    outline: 2px solid rgba(249, 115, 22, 0.45);
    outline-offset: 2px;
}

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

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--overlay-bg);
    color: #ffffff;
    overflow: hidden;
}

.lightbox__dialog {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: calc(24px + env(safe-area-inset-top, 0px)) calc(24px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) calc(24px + env(safe-area-inset-left, 0px));
}

.lightbox__close {
    position: absolute;
    top: calc(18px + env(safe-area-inset-top, 0px));
    right: calc(18px + env(safe-area-inset-right, 0px));
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    color: #ffffff;
    cursor: pointer;
}

.lightbox__close:hover,
.lightbox__close:focus-visible,
.lightbox__nav:hover,
.lightbox__nav:focus-visible {
    background: rgba(0, 0, 0, 0.28);
}

.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.45);
    outline-offset: 2px;
}

.lightbox__close svg {
    width: 30px;
    height: 30px;
}

.lightbox__slider {
    position: relative;
    width: 100%;
    min-height: 0;
    height: 100%;
    max-height: none;
    touch-action: pinch-zoom;
}

.lightbox__slider.swiper,
.lightbox__slider .swiper-wrapper,
.lightbox__slider .swiper-slide {
    width: 100%;
    height: 100%;
}

.lightbox__slider .swiper-wrapper {
    display: flex;
}

.lightbox__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 100%;
}

.lightbox__figure {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.lightbox__zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.lightbox__zoom > img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    color: #ffffff;
    cursor: pointer;
    transform: translateY(-50%);
}

.lightbox__nav[hidden] {
    display: none !important;
}

.lightbox__nav--prev {
    left: 12px;
}

.lightbox__nav--next {
    right: 12px;
}

.lightbox__nav svg {
    width: 26px;
    height: 26px;
}

.lightbox__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin-top: 2px;
    flex: 0 0 auto;
}

.lightbox__caption {
    width: 100%;
    margin: 5px;
    color: #ffffff;
    text-align: center;
    min-height: 24px;
}

.lightbox__caption.is-empty {
    min-height: 0;
}

.lightbox__counter {
    min-height: 20px;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.9;
}

.lightbox--fallback .swiper-wrapper {
    transition: transform 220ms ease;
    will-change: transform;
}

.lightbox--fallback .swiper-slide {
    flex: 0 0 100%;
}

@media (max-width: 900px) {
    .hero-title {
        font-size: 42px;
    }

    .trip-section__title {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .page__inner {
        width: calc(100% - (var(--viewport-gap) * 2));
    }

    .hero-title {
        margin-top: 30px;
        font-size: 36px;
        line-height: 1.12;
    }

    .intro {
        margin-top: 36px;
    }

    .trip-section {
        margin-top: 30px;
    }

    .trip-section__title {
        font-size: 26px;
    }

    .step {
        padding: 22px 8px 18px;
    }

    .step__meta {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .lightbox__dialog {
        padding: calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
    }

    .lightbox__nav {
        width: 40px;
        height: 40px;
    }

    .lightbox__nav--prev {
        left: 0;
    }

    .lightbox__nav--next {
        right: 0;
    }
}

@media (max-width: 520px) {
    :root {
        --thumb-size: 60px;
    }

    .hero-title {
        margin-top: 24px;
        font-size: 32px;
        letter-spacing: -0.3px;
    }

    .trip-section__toggle {
        gap: 12px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .trip-section__chevron {
        transform: scale(1.8, -1.8);
    }

    .trip-section.is-open .trip-section__chevron {
        transform: scale(1.8, 1.8);
    }

    .trip-section__title {
        font-size: 24px;
    }

    .step {
        padding-top: 18px;
    }

    .step__title {
        font-size: 22px;
    }

    .thumb-grid {
        gap: 8px;
    }

    .lightbox__close {
        top: calc(10px + env(safe-area-inset-top, 0px));
        right: calc(10px + env(safe-area-inset-right, 0px));
    }

    .lightbox__caption {
        font-size: 15px;
    }

    .lightbox__nav {
        width: 38px;
        height: 38px;
    }
}
