/* === Variables === */
:root {
    --color-bg: #faf9f7;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #555555;
    --color-text-muted: #888888;
    --color-primary: #c41e3a;
    --color-primary-light: #fff0f3;
    --color-accent: #d4a574;
    --color-border: #e8e6e3;
    --color-border-light: #f3f1ef;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* === Base === */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Header === */
.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.logo-year {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-primary);
    background: var(--color-primary-light);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link.active {
    color: var(--color-text);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--color-primary);
}

.header-dates {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* === Main === */
.main {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* === Footer === */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 0.75rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* =============================================
   ITINERARY PAGE - Split View
   ============================================= */

.itinerary-page {
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
}

/* Mobile map container */
.mobile-map-container {
    display: none;
    position: relative;
}

.mobile-map {
    height: 200px;
    width: 100%;
}

.btn-fullscreen-map {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-fullscreen-map:hover {
    transform: scale(1.05);
}

/* Split container */
.split-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    min-height: calc(100vh - 150px);
}

/* Planning panel */
.planning-panel {
    overflow-y: auto;
    max-height: calc(100vh - 150px);
    padding: 1.5rem;
    background: var(--color-bg);
}

.planning-content {
    max-width: 700px;
    margin: 0 auto;
}

/* Stage sections */
.stage-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
    border: 1px solid var(--color-border-light);
}

.stage-section .stage-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--stage-color);
    color: white;
}

.stage-number {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.stage-section .stage-info {
    flex: 1;
}

.stage-section .stage-name {
    margin: 0;
    font-size: 1.35rem;
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.stage-jp {
    font-family: var(--font-jp);
    opacity: 0.5;
    font-size: 0.85rem;
    font-weight: 400;
}

.stage-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.25rem;
}

.stage-dates {
    font-size: 0.85rem;
    opacity: 0.9;
}

.stage-nights-badge {
    background: rgba(255,255,255,0.9);
    color: var(--stage-color);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.stage-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

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

/* Hotel event in day */
.day-event.hotel {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.hotel-event-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hotel-event-dates {
    font-size: 0.75rem;
    color: #92400e;
    font-weight: 500;
}

.hotel-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.hotel-link:hover {
    color: #b45309;
    text-decoration: underline;
}

/* Days */
.stage-days {
    padding: 0.5rem 0;
}

.day-row {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--color-border-light);
    gap: 1rem;
}

.day-row:last-child {
    border-bottom: none;
}

.day-row.arrival-day {
    background: rgba(42, 157, 143, 0.05);
}

.day-row.departure-day {
    background: rgba(231, 111, 81, 0.05);
}

.day-date {
    min-width: 50px;
    text-align: center;
    padding: 0.4rem;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}

.day-weekday {
    display: block;
    font-size: 0.65rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.day-number {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.day-month {
    display: block;
    font-size: 0.65rem;
    color: var(--color-text-muted);
}

.day-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.day-event {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-border);
    font-size: 0.9rem;
}

.day-event.excursion {
    border-left-color: var(--color-primary);
    background: var(--color-primary-light);
}

.day-event.arrival {
    border-left-color: #2a9d8f;
}

.day-event.free {
    opacity: 0.6;
}

.day-event.activity {
    border-left-color: #7209b7;
    background: #f8f0ff;
}

/* Hoverable events - highlight on map */
.hoverable-event {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hoverable-event:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-location {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-map-link {
    text-decoration: none;
    font-size: 1rem;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

.event-map-link:hover {
    opacity: 1;
    transform: scale(1.1);
}

.event-icon {
    font-size: 1rem;
}

.event-text {
    font-weight: 500;
}

.event-jp {
    font-family: var(--font-jp);
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* Transit inline */
.day-transit {
    background: linear-gradient(135deg, #fff5f3 0%, #fef3e8 100%);
    border: 1px solid #f4a261;
    border-left: 4px solid #e76f51;
    border-radius: var(--radius-md);
    padding: 0.6rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.transit-header-inline {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.transit-icon {
    font-size: 1.2rem;
}

.transit-route {
    font-weight: 600;
    font-size: 0.95rem;
}

.transit-duration-badge {
    background: #e76f51;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.transit-details-inline {
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    padding-left: 1.8rem;
}

.transit-via-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    background: rgba(244, 162, 97, 0.15);
    border: 1px dashed #f4a261;
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
}

.via-badge {
    font-weight: 600;
    color: #e76f51;
}

.via-name {
    font-weight: 600;
}

/* Map panel */
.map-panel {
    position: relative;
    background: var(--color-bg);
    padding: 1rem;
}

.map-wrapper {
    position: sticky;
    top: 1rem;
    height: calc(100vh - 50px);
    max-height: 800px;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

#map {
    flex: 1;
}

.map-controls {
    padding: 1rem;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
}

.timeline-slider-container {
    margin-bottom: 0.75rem;
}

.timeline-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-border-light);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.timeline-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.current-stage-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-dot {
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 50%;
}

#current-stage-name {
    font-weight: 600;
}

/* Fullscreen map overlay (mobile) */
.fullscreen-map-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    z-index: 2000;
    display: none;
    flex-direction: column;
}

.fullscreen-map-overlay.active {
    display: flex;
}

.fullscreen-map-header {
    padding: 1rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.btn-close-map {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
}

.fullscreen-map {
    flex: 1;
}

/* Map markers */
.custom-marker {
    background: none !important;
    border: none !important;
}

.marker-pin {
    width: 30px;
    height: 30px;
    background: #ffffff;
    border: 3px solid #c41e3a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #c41e3a;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.marker-pin.active {
    background: #c41e3a;
    color: white;
    transform: scale(1.2);
}

.marker-via {
    width: 24px;
    height: 24px;
    background: #ffffff;
    border: 2px solid #f4a261;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.leaflet-popup-content-wrapper {
    border-radius: var(--radius-sm);
}

.popup-content {
    text-align: center;
}

.popup-content strong {
    display: block;
    font-size: 0.95rem;
}

.popup-jp {
    font-family: var(--font-jp);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    display: block;
}

.popup-nights {
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
    display: inline-block;
}

.popup-location {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.popup-gmaps {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-primary);
    text-decoration: none;
}

.popup-gmaps:hover {
    text-decoration: underline;
}

/* =============================================
   JOURNAL PAGE - Polarsteps Style
   ============================================= */

.journal-page {
    max-width: 100%;
    overflow-x: hidden;
}

/* Hero Map */
.journal-hero-map {
    position: relative;
    height: 40vh;
    min-height: 300px;
    max-height: 450px;
}

#hero-map {
    height: 100%;
    width: 100%;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    pointer-events: none;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

.stat-dot {
    opacity: 0.6;
}

/* Navigation pills */
.journal-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-surface);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border-light);
    justify-content: center;
}

.journal-pill {
    padding: 0.5rem 1rem;
    background: color-mix(in srgb, var(--stage-color) 15%, white);
    color: var(--stage-color);
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.journal-pill:hover,
.journal-pill.active {
    background: var(--stage-color);
    color: white;
}

/* Journal content */
.journal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Stage section */
.journal-stage-section {
    margin-bottom: 4rem;
}

/* Stage card header */
.stage-card-header {
    display: flex;
    gap: 1rem;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.stage-mini-map-container {
    width: 120px;
    min-height: 100px;
    flex-shrink: 0;
}

.stage-mini-map {
    width: 100%;
    height: 100%;
}

.stage-card-info {
    flex: 1;
    padding: 1.25rem 1.25rem 1.25rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stage-card-title {
    margin: 0;
    font-size: 1.6rem;
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.stage-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.meta-dot {
    opacity: 0.5;
}

/* Day cards */
.journal-day-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.day-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border-light);
}

.day-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--stage-color);
    margin-bottom: 0.25rem;
}

.day-card-header .day-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.day-card-content {
    padding: 1.5rem;
}

.day-card-content p {
    margin: 0 0 1rem;
    line-height: 1.8;
}

.day-card-content h4,
.day-card-content h5 {
    margin: 1.5rem 0 0.75rem;
    color: var(--color-text);
}

/* Hero image (first image - full width, 16:10 ratio) */
.day-hero-image {
    margin: 0 -1.5rem 1.5rem;
}

.day-hero-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.day-hero-image figcaption {
    text-align: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Gallery images */
.journal-gallery-image {
    margin: 1.5rem 0;
}

.journal-gallery-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.journal-gallery-image figcaption {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Videos */
.journal-video {
    margin: 1.5rem 0;
}

.journal-video iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.video-caption {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Lists */
.journal-list {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.journal-list li {
    margin-bottom: 0.25rem;
}

/* Quotes */
.journal-quote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--stage-color, var(--color-primary));
    background: var(--color-bg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

/* Callouts */
.journal-callout {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: color-mix(in srgb, var(--stage-color, var(--color-primary)) 10%, white);
    border-radius: var(--radius-md);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.callout-emoji {
    font-size: 1.3rem;
    line-height: 1;
}

/* Divider */
.journal-divider {
    margin: 2rem 0;
    border: none;
    border-top: 2px dashed var(--color-border);
}

/* Empty state */
.journal-empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    margin: 2rem 1.5rem;
}

.journal-empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.journal-empty-state h2 {
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.journal-empty-state p {
    color: var(--color-text-muted);
    margin: 0;
}

.journal-empty-state .empty-hint {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* =============================================
   ACTIVITIES PAGE
   ============================================= */

.activities-page {
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
}

/* Filters bar */
.activities-filters {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
}

.filters-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.city-filter {
    flex-shrink: 0;
}

.city-select {
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--color-surface);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}

.city-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.distance-filter {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.geolocate-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.geolocate-btn:hover:not(:disabled) {
    background: var(--color-bg);
}

.geolocate-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.geolocate-btn.active {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.user-marker-dot {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--cat-color);
    background: white;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--cat-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-chip.active {
    background: var(--cat-color);
    color: white;
}

.category-chip:hover:not(.active) {
    background: color-mix(in srgb, var(--cat-color) 10%, white);
}

.chip-icon {
    font-size: 1rem;
}

/* Activities split view */
.activities-split {
    display: grid;
    grid-template-columns: 50% 50%;
    flex: 1;
    overflow: hidden;
}

.activities-list-panel {
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--color-bg);
}

.activities-list {
    max-width: 600px;
    margin: 0 auto;
}

.activity-category-group {
    margin-bottom: 1.5rem;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cat-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--cat-color);
}

.cat-icon {
    font-size: 1.2rem;
}

.category-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.activity-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.activity-item.highlighted {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.activity-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.activity-name {
    font-weight: 500;
}

.activity-location {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.activity-city {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.activity-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.activity-date-badge {
    font-size: 0.7rem;
    font-weight: 600;
    background: #2a9d8f;
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.activity-unplanned-badge {
    font-size: 0.7rem;
    font-weight: 500;
    background: var(--color-border-light);
    color: var(--color-text-muted);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.activity-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.activity-map-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.activity-map-link:hover {
    background: var(--color-primary-light);
    transform: scale(1.1);
}

.activity-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.activities-empty {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

.activities-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.activities-empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    margin: 2rem auto;
    max-width: 600px;
}

.activities-empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.activities-empty-state h2 {
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.activities-empty-state p {
    color: var(--color-text-muted);
    margin: 0.5rem 0;
}

.activities-empty-state .empty-hint {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.activities-empty-state code {
    background: var(--color-bg);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.85rem;
}

/* Activities map */
.activities-map-panel {
    position: relative;
    background: var(--color-bg);
    padding: 1rem;
}

.activities-map-wrapper {
    position: sticky;
    top: 1rem;
    height: calc(100vh - 100px);
    max-height: 700px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

#activities-map {
    height: 100%;
    width: 100%;
}

/* Activity markers */
.activity-marker {
    background: none !important;
    border: none !important;
}

.activity-marker-dot {
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.activity-popup {
    text-align: center;
}

.activity-popup .popup-icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.activity-popup .popup-city {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Activity Modal */
.activity-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.activity-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.activity-modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--color-border-light);
}

.modal-icon {
    font-size: 2rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    padding-right: 2rem;
}

.modal-body {
    padding: 1rem 1.5rem;
}

.modal-section {
    margin-bottom: 1rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.modal-value {
    font-size: 1rem;
    color: var(--color-text);
}

.modal-address {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

.modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
}

.badge-prepaid {
    background: #d4edda;
    color: #155724;
}

.badge-refundable {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-unplanned {
    background: var(--color-border-light);
    color: var(--color-text-muted);
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--color-border-light);
}

.modal-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.modal-btn-maps {
    background: var(--color-primary);
    color: white;
}

.modal-btn-maps:hover {
    background: #a61830;
}

.modal-btn-notion {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.modal-btn-notion:hover {
    background: var(--color-border-light);
}

/* =============================================
   JOURNAL CARDS GRID
   ============================================= */

.journal-cards-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.journal-section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

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

.journal-card {
    display: block;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.journal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, var(--stage-color) 0%, color-mix(in srgb, var(--stage-color) 70%, black) 100%);
}

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

.card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.card-overlay {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.card-days {
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.card-content {
    padding: 1rem 1.25rem;
}

.card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--stage-color);
}

.card-meta {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* =============================================
   JOURNAL STAGE PAGE - Compact Design
   ============================================= */

.journal-stage-page {
    max-width: 100%;
}

/* Hero header with city image */
.stage-hero {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--stage-color);
}

.stage-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
}

.back-link-hero {
    align-self: flex-start;
    padding: 0.4rem 0.8rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-sm);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
}

.back-link-hero:hover {
    background: rgba(255,255,255,0.3);
}

.stage-hero-content {
    margin-top: auto;
    color: white;
}

.stage-hero-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stage-hero-jp {
    font-family: var(--font-jp);
    opacity: 0.9;
    font-size: 1.1rem;
    margin-left: 0.5rem;
}

.stage-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.meta-separator {
    opacity: 0.6;
}

/* Compact journal content */
.stage-journal-compact {
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem;
}

.journal-day-section {
    margin-bottom: 0.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.journal-day-section:last-child {
    margin-bottom: 0;
}

/* Accordion header */
.day-header-accordion {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.day-header-accordion:hover {
    background: var(--color-bg);
}

.accordion-icon {
    margin-left: auto;
    width: 20px;
    height: 20px;
    position: relative;
}

.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    background: var(--color-text-muted);
    transition: transform 0.2s;
}

.accordion-icon::before {
    width: 12px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.accordion-icon::after {
    width: 2px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.journal-day-section.open .accordion-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

/* Accordion body - hidden by default */
.journal-day-section .day-body {
    display: none;
    padding: 0 1rem 1rem;
}

.journal-day-section.open .day-body {
    display: block;
}

.day-number-badge {
    width: 28px;
    height: 28px;
    background: var(--stage-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.day-title-compact {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.day-body {
    padding-left: 0;
}

.day-body p {
    margin: 0 0 1rem;
    line-height: 1.7;
    color: var(--color-text);
}

.day-body h4,
.day-body h5 {
    margin: 1.25rem 0 0.5rem;
    color: var(--color-text);
}

/* Journal images */
.journal-image-hero {
    margin: 0 0 1rem;
    position: relative;
}

.journal-image-hero img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.journal-image-hero figcaption,
.journal-image figcaption {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.journal-image {
    margin: 1rem 0;
    position: relative;
}

.journal-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* Gallery section */
.journal-gallery-section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Gallery masonry */
.gallery-masonry {
    column-count: 2;
    column-gap: 0.75rem;
    margin: 1rem 0;
}

.gallery-masonry.gallery-main {
    column-count: 3;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 0.75rem;
}

.gallery-item img {
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
}

.gallery-item figcaption {
    text-align: center;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .gallery-masonry.gallery-main {
        column-count: 2;
    }
}

@media (max-width: 500px) {
    .gallery-masonry {
        column-count: 1;
    }
    .gallery-masonry.gallery-main {
        column-count: 2;
    }
}

/* Zoomable images */
.zoomable {
    position: relative;
    cursor: zoom-in;
}

.zoomable img {
    transition: opacity 0.2s;
}

.zoomable:hover img {
    opacity: 0.9;
}

.photo-hint {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 1rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

/* Compact navigation */
.stage-nav-compact {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2rem;
}

.stage-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.stage-nav-btn:hover {
    box-shadow: var(--shadow-md);
    background: var(--stage-color);
    color: white;
}

.nav-arrow {
    font-size: 1rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
    /* Itinerary page mobile layout */
    .itinerary-page {
        height: auto;
    }

    .mobile-map-container {
        display: block;
    }

    .split-container {
        display: block;
        height: auto;
    }

    .planning-panel {
        overflow: visible;
        padding: 1rem;
    }

    .map-panel {
        display: none;
    }

    /* Activities page mobile */
    .activities-page {
        height: auto;
    }

    .activities-split {
        display: block;
    }

    .activities-list-panel {
        overflow: visible;
        min-height: 50vh;
    }

    .activities-map-panel {
        height: 400px;
    }

    .activities-map-wrapper {
        position: relative;
        top: 0;
        height: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }

    .header-inner {
        height: 56px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .logo-year {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
    }

    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .header-dates {
        display: none;
    }

    /* Itinerary */
    .day-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .day-date {
        flex-direction: row;
        display: flex;
        gap: 0.5rem;
        align-items: baseline;
        padding: 0.2rem 0.5rem;
    }

    .day-number {
        font-size: 1rem;
    }

    .transit-details-inline {
        padding-left: 0;
    }

    /* Journal */
    .journal-hero-map {
        height: 35vh;
        min-height: 250px;
    }

    .journal-pills {
        padding: 1rem;
    }

    .journal-pill {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .journal-content {
        padding: 1.5rem 1rem;
    }

    .stage-card-header {
        flex-direction: column;
    }

    .stage-mini-map-container {
        width: 100%;
        height: 120px;
    }

    .stage-card-info {
        padding: 1rem;
    }

    .stage-card-title {
        font-size: 1.3rem;
    }

    .day-card-content {
        padding: 1rem;
    }

    .day-hero-image {
        margin: 0 -1rem 1rem;
    }

    .day-hero-image figcaption {
        padding: 0.5rem 1rem;
    }

    /* Activities mobile */
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .city-select {
        width: 100%;
    }

    .category-filters {
        justify-content: center;
    }

    .category-chip {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    /* Journal stage page mobile */
    .stage-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .stage-page-title {
        font-size: 1.4rem;
    }

    .stage-info-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .stage-info-bar .stage-mini-map-container {
        width: 100%;
        height: 150px;
    }

    .stage-navigation {
        flex-direction: column;
    }

    .stage-nav-link {
        text-align: center !important;
    }

    /* Journal cards mobile */
    .journal-cards-grid {
        grid-template-columns: 1fr;
    }
}
