* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
    background: #f5f5f5;
}

.container {
    max-width: 640px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1 {
    margin-bottom: 1.5rem;
}

h2 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.1rem;
}

/* Login page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #fafafa;
}

.login-box {
    text-align: center;
    padding: 3rem;
}

.login-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-style: italic;
    color: #888;
    margin-bottom: 2rem;
}

.login-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
}

.login-button:hover {
    background: #333;
}

/* Index page */
.index-page {
    background: var(--cream, #f5f0e8);
    min-height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

.index-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.index-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 3rem;
}

.index-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink, #2c2c2c);
}

.user-info {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.8rem;
    color: var(--ink-faint, #9a9488);
}

.user-info a {
    color: var(--ink-faint, #9a9488);
    text-decoration: none;
}

.user-info a:hover {
    color: var(--ink, #2c2c2c);
}

/* Create trip form */
.create-trip-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.create-trip-form input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1px solid var(--warm-line, #d8d2c8);
    border-radius: 4px;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.9rem;
    background: white;
    color: var(--ink, #2c2c2c);
}

.create-trip-form input::placeholder {
    color: var(--warm-grey, #c4bdb2);
}

.create-trip-form button {
    padding: 0.7rem 1.2rem;
    background: var(--ink, #2c2c2c);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.85rem;
    cursor: pointer;
}

.create-trip-form button:hover {
    background: var(--ink-light, #5a5549);
}

/* Trip cards */
.trip-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.trip-card {
    display: flex;
    align-items: center;
    padding: 1.2rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
    transition: background 0.15s;
}

.trip-card:first-child {
    border-radius: 4px 4px 0 0;
}

.trip-card:last-child {
    border-radius: 0 0 4px 4px;
}

.trip-card:only-child {
    border-radius: 4px;
}

.trip-card:hover {
    background: rgba(255, 255, 255, 0.9);
}

.trip-card-name {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.05rem;
    color: var(--ink, #2c2c2c);
    flex: 1;
}

.trip-card-date {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.8rem;
    color: var(--ink-faint, #9a9488);
    margin-right: 0.75rem;
}

.trip-card-arrow {
    font-size: 1.4rem;
    color: var(--warm-grey, #c4bdb2);
}

.index-empty {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-style: italic;
    color: var(--ink-faint, #9a9488);
    text-align: center;
    padding: 3rem 0;
}

/* Admin page */
.admin-page {
    background: var(--cream, #f5f0e8);
    min-height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

.admin-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

.admin-header {
    margin-bottom: 2rem;
}

.admin-back {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.85rem;
    color: var(--ink-faint, #9a9488);
    text-decoration: none;
}

.admin-back:hover {
    color: var(--ink, #2c2c2c);
}

.admin-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink, #2c2c2c);
    margin-top: 0.5rem;
}

.admin-info {
    margin-bottom: 2.5rem;
}

.admin-info-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-info-label {
    display: block;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint, #9a9488);
    margin-bottom: 0.3rem;
}

.admin-code {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--ink, #2c2c2c);
    color: var(--cream, #f5f0e8);
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    cursor: pointer;
}

.admin-code:hover {
    background: var(--ink-light, #5a5549);
}

.admin-code .admin-code-text {
    flex: 1;
    word-break: break-all;
    color: var(--cream, #f5f0e8);
    text-decoration: none;
}

.admin-code a.admin-code-text:hover {
    text-decoration: underline;
}

.copy-icon {
    flex-shrink: 0;
    opacity: 0.5;
}

.admin-code:hover .copy-icon {
    opacity: 1;
}

.admin-code.copied .copy-icon {
    opacity: 1;
}

.admin-code.copied .copy-icon::after {
    content: " Copied!";
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.7rem;
}

.admin-stats {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.85rem;
    color: var(--ink-faint, #9a9488);
}

.admin-section-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink, #2c2c2c);
    margin-bottom: 1rem;
}

.admin-entry-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.admin-entry-form .form-group label {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint, #9a9488);
}

.admin-entry-form textarea {
    font-family: 'Libre Baskerville', Georgia, serif;
    border-color: var(--warm-line, #d8d2c8);
}

.admin-entry-form button {
    align-self: flex-start;
    background: var(--ink, #2c2c2c);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.85rem;
}

.admin-entry-form button:hover {
    background: var(--ink-light, #5a5549);
}

.admin-entries .entry-card {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    box-shadow: none;
}

.admin-entries .entry-card p {
    font-family: 'Libre Baskerville', Georgia, serif;
    color: var(--ink, #2c2c2c);
    line-height: 1.6;
}

.admin-entries .entry-card-date {
    font-family: 'Libre Baskerville', Georgia, serif;
    color: var(--ink-faint, #9a9488);
}

/* Forms */
.create-trip form {
    display: flex;
    gap: 0.5rem;
}

.new-entry form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

input[type="text"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

/* Trip cards */
.trip-card {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.trip-card a {
    text-decoration: none;
    color: inherit;
}

.trip-card h3 {
    margin-bottom: 0.25rem;
}

.date {
    color: #666;
    font-size: 0.85rem;
}

/* Copyable code blocks */
code.copyable {
    display: block;
    background: #1a1a1a;
    color: #e5e5e5;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    word-break: break-all;
    margin: 0.5rem 0;
}

/* Entry cards (admin view) */
.entry-card {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.entry-card-date {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.entry-card p {
    margin: 0.5rem 0;
}

.entry-photos {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.entry-photo-wrap {
    position: relative;
    width: 120px;
    height: 90px;
}

.entry-thumb {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

.photo-delete-form {
    position: absolute;
    top: 4px;
    right: 4px;
}

.photo-delete-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.entry-photo-wrap:hover .photo-delete-btn {
    opacity: 1;
}

.photo-delete-btn:hover {
    background: #e53e3e;
}

.entry-photo-add {
    width: 120px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
    border-radius: 4px;
}

.photo-add-btn {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.photo-add-btn:hover {
    color: #555;
}


.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.entry-footer-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.entry-edit-btn {
    padding: 0.4rem 0.8rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

.entry-edit-btn:hover {
    background: #1d4ed8;
}

.entry-delete-btn {
    padding: 0.4rem 0.8rem;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

.entry-delete-btn:hover {
    background: #c53030;
}

.entry-text-wrap {
}

.entry-edit-datetime {
    margin-bottom: 0.5rem;
}

.entry-edit-datetime label {
    font-size: 0.8rem;
    color: #666;
    display: block;
    margin-bottom: 0.2rem;
}

.entry-edit-datetime input {
    padding: 0.4rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.entry-edit-form textarea {
    width: 100%;
    min-height: 150px;
}

.entry-edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.entry-edit-actions button[type="button"] {
    background: #eee;
    color: #333;
}

.photo-add-form {
    width: 100%;
    height: 100%;
}

/* ========================================
   Public trip view - split layout
   ======================================== */
:root {
    --cream: #f5f0e8;
    --cream-light: #faf7f2;
    --ink: #2c2c2c;
    --ink-light: #5a5549;
    --ink-faint: #9a9488;
    --warm-grey: #c4bdb2;
    --warm-line: #d8d2c8;
    --sienna: #b85c38;
    --sienna-light: rgba(184, 92, 56, 0.15);
    --sienna-faint: rgba(184, 92, 56, 0.08);
}

.trip-view {
    display: flex;
    height: 100vh;
}

#timeline {
    width: 60%;
    overflow-y: auto;
    background: var(--cream);
    border-right: 1px solid var(--warm-line);
    scrollbar-width: thin;
    scrollbar-color: var(--warm-grey) transparent;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

#map {
    width: 40%;
    min-width: 0;
    position: relative;
}

/* Stats pill */
.map-stats {
    position: absolute;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(44, 44, 44, 0.82);
    color: var(--cream-light);
    padding: 0.45rem 1.2rem;
    font-size: 0.75rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    display: flex;
    align-items: center;
    border-radius: 20px;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    letter-spacing: 0.03em;
}

.stats-sep {
    margin: 0 0.5rem;
    color: var(--ink-faint);
}

.stats-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--sienna);
    border-radius: 50%;
    margin-right: 0.4rem;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Timeline header */
.timeline-header {
    padding: 6rem 2rem 0 20rem;
    position: relative;
}

.admin-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.75rem;
    color: var(--ink-faint);
    text-decoration: none;
}

.admin-link:hover {
    color: var(--sienna);
}

.rss-link {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.75rem;
    color: var(--ink-faint);
    text-decoration: none;
}

.rss-link:hover {
    color: var(--sienna);
}

.timeline-header h1 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6rem;
    text-align: center;
    color: var(--ink);
}

/* Timeline vertical line */
.timeline-line {
    position: relative;
    padding: 0 5rem 2rem 20rem;
}

.timeline-line::before {
    content: "";
    position: absolute;
    left: 18rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--ink-light);
}

.timeline-line:has(.timeline-current)::before {
    bottom: var(--current-height, 0px);
}

/* Timeline entries */
.timeline-entry {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-entry:last-child {
    padding-bottom: 0;
}

.timeline-current {
    padding-top: 2rem;
    margin-bottom: 40vh;
}

/* Distance label */
.timeline-entry.has-distance {
    margin-top: 2.5rem;
}

.timeline-distance-label {
    position: absolute;
    left: -4.5rem;
    transform: rotate(-90deg);
    color: var(--ink-light);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    white-space: nowrap;
    z-index: 2;
}

/* Current location */
.timeline-dot-current {
    background: var(--sienna) !important;
    box-shadow: 0 0 0 2px var(--sienna), 0 0 0 6px var(--sienna-light) !important;
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--sienna), 0 0 0 6px var(--sienna-light); }
    50% { box-shadow: 0 0 0 2px var(--sienna), 0 0 0 12px rgba(184, 92, 56, 0); }
}

.timeline-current-coords {
    display: block;
    padding: 0.3rem 0 0;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.85rem;
    color: var(--ink-faint);
    letter-spacing: 0.05em;
}

/* Date label */
.timeline-date {
    position: absolute;
    right: calc(100% + 4rem);
    top: -0.5rem;
    text-align: right;
}

.timeline-date-day {
    display: block;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.6rem;
    white-space: nowrap;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.2;
}

.timeline-date-time {
    display: block;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    color: var(--ink-faint);
    line-height: 1.3;
}

/* Entry header (country + weather) */
.timeline-entry-header {
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0;
}

.entry-country {
    font-family: 'Libre Baskerville', Georgia, serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.entry-weather {
    font-family: 'Libre Baskerville', Georgia, serif;
}

.entry-header-sep {
    margin: 0 0.4rem;
    color: var(--warm-grey);
}

/* Dot on the line */
.timeline-dot {
    position: absolute;
    left: -2.35rem;
    top: 0.25rem;
    width: 10px;
    height: 10px;
    background: var(--ink-light);
    border: 2px solid var(--cream);
    border-radius: 50%;
    box-shadow: 0 0 0 1.5px var(--ink-light);
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-entry:first-child .timeline-dot {
    width: 14px;
    height: 14px;
    left: -2.45rem;
    top: 0.15rem;
    background: var(--ink);
    box-shadow: 0 0 0 1.5px var(--ink);
}

/* Entry content */
.timeline-content {
    overflow: hidden;
}

.timeline-entry.active .timeline-date-day {
    font-weight: 700;
}

.timeline-entry.active .timeline-dot {
    background: var(--sienna);
    box-shadow: 0 0 0 2px var(--sienna), 0 0 0 5px var(--sienna-light);
    transform: scale(1.2);
}

/* Photos */
.timeline-photos-wrap {
    position: relative;
    margin-bottom: 0.8rem;
}

.timeline-photos-wrap .scroll-arrow {
    position: absolute;
    top: 0;
    bottom: 0.5rem;
    width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s;
    font-size: 1.5rem;
    color: white;
    pointer-events: none;
}

.timeline-photos-wrap:hover .scroll-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}

.timeline-photos-wrap .scroll-arrow-left {
    left: 0;
    background: linear-gradient(to right, rgba(44,44,44,0.5), transparent);
}

.timeline-photos-wrap .scroll-arrow-right {
    right: 0;
    background: linear-gradient(to left, rgba(44,44,44,0.5), transparent);
}

.timeline-photos {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    height: 260px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--warm-grey) transparent;
    padding-bottom: 0.5rem;
}

.timeline-photos .video-wrap {
    position: relative;
    height: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.timeline-photos .video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(44, 44, 44, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1;
}

.timeline-photos .video-play-btn::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent white;
    margin-left: 3px;
}

.timeline-photos .video-wrap.playing .video-play-btn {
    opacity: 0;
}

.timeline-photos img,
.timeline-photos video {
    height: 100%;
    width: auto;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: 3px;
}

.timeline-photos img.hidden-photo {
    display: block;
}

.timeline-photos .photos-more {
    display: none;
}

/* Text content */
.timeline-body {
    padding: 0;
    font-family: 'Libre Baskerville', Georgia, serif;
    line-height: 1.8;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.timeline-meta {
    display: block;
    padding: 0.5rem 1rem 0.75rem;
    color: var(--ink-faint);
    font-size: 0.8rem;
}

/* Map markers */
.map-marker {
    width: 16px;
    height: 16px;
    background: var(--ink-light);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    transition: all 0.2s ease;
}

.map-marker:hover {
    transform: scale(1.4);
}

.map-marker-photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2.5px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-marker-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-marker-photo:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}

.map-marker-current {
    width: 36px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.map-marker-current svg {
    display: block;
    animation: pin-bounce 2s ease-in-out infinite;
}

@keyframes pin-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.map-marker-photo.map-marker-active {
    border-color: var(--sienna);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 0 0 3px var(--sienna-light);
    transform: scale(1.15);
}

.map-marker-active {
    background: var(--sienna);
    border-color: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25), 0 0 0 3px var(--sienna-light);
    transform: scale(1.4);
}

.muted {
    color: var(--ink-faint);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
    padding: 1rem 2rem;
}

/* ========================================
   Lightbox
   ======================================== */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#lightbox.active {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-media {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    width: 90vw;
    height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem;
    line-height: 1;
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
    color: #ccc;
    background: none;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #aaa;
    font-size: 0.85rem;
    z-index: 2;
}

/* ========================================
   Mobile: stack vertically
   ======================================== */
@media (max-width: 768px) {
    .trip-view {
        flex-direction: column;
    }

    #timeline {
        width: 100%;
        height: 50vh;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    #map {
        width: 100%;
        height: 50vh;
    }
}
