/* Journey growth gallery refresh */
:root {
    --journey-ink: #163b32;
    --journey-leaf: #15966b;
    --journey-paper: #fffdf7;
}

body {
    background-color: #f5fbf7;
    background-image:
        radial-gradient(circle at 8% 18%, rgba(21, 150, 107, .09) 0 2px, transparent 3px),
        radial-gradient(circle at 92% 42%, rgba(238, 174, 63, .12) 0 2px, transparent 3px),
        linear-gradient(135deg, rgba(21, 150, 107, .025) 25%, transparent 25% 75%, rgba(21, 150, 107, .025) 75%);
    background-size: 42px 42px, 54px 54px, 68px 68px;
}

.journey-hero {
    min-height: 410px;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 15%, rgba(255,255,255,.82), transparent 23%),
        linear-gradient(125deg, #e9fbf1 0%, #d7f4e5 52%, #fff4d8 100%);
}

.journey-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46px;
    opacity: .2;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='46' viewBox='0 0 120 46'%3E%3Cpath d='M0 43c14-22 23-22 35 0C48 16 62 17 73 43c15-28 31-26 47 0' fill='none' stroke='%2315966b' stroke-width='2'/%3E%3C/svg%3E") repeat-x bottom;
}

.hero-copy { position: relative; z-index: 4; }
.hero-copy h1 { color: var(--journey-ink); }
.hero-copy h1 em { color: var(--journey-leaf); }

.hero-art {
    min-height: 330px;
    isolation: isolate;
}

.growth-board {
    position: absolute;
    inset: 0;
    filter: drop-shadow(0 22px 30px rgba(24, 68, 54, .12));
}

.growth-board::before {
    content: "";
    position: absolute;
    left: 5%; right: 3%; top: 48%;
    border-top: 2px dashed rgba(40, 105, 82, .27);
    transform: rotate(-4deg);
}

.growth-photo {
    --rotate: 0deg;
    position: absolute;
    width: 39%;
    margin: 0;
    padding: 9px 9px 36px;
    background: var(--journey-paper);
    border: 1px solid rgba(91, 72, 40, .09);
    border-radius: 3px;
    box-shadow: 0 14px 28px rgba(29, 58, 48, .18), 0 2px 3px rgba(29, 58, 48, .14);
    opacity: 0;
    transform: translate3d(70px,-28px,0) rotate(calc(var(--rotate) + 8deg)) scale(.82);
    animation: pinMemory .7s cubic-bezier(.2,.9,.25,1.15) forwards;
}

.growth-photo img {
    display: block;
    width: 100%;
    height: 178px;
    object-fit: cover;
    filter: saturate(.93) contrast(1.03);
}

.growth-photo figcaption {
    position: absolute;
    left: 12px; right: 12px; bottom: 7px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: #355448;
    font: 18px/1.1 "Patrick Hand", cursive;
}

.growth-photo figcaption small {
    color: #82938b;
    font: 500 9px/1.2 "Be Vietnam Pro", sans-serif;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.photo-pin {
    position: absolute;
    z-index: 2;
    top: -8px; left: 50%;
    width: 17px; height: 17px;
    border: 4px solid rgba(255,255,255,.7);
    border-radius: 50%;
    background: #e0584f;
    box-shadow: 0 3px 5px rgba(45,35,29,.3);
    transform: translateX(-50%) scale(0);
    animation: dropPin .3s ease-out forwards;
}

.growth-photo--baby { --rotate: -8deg; left: 0; top: 71px; z-index: 1; animation-delay: .15s; }
.growth-photo--child { --rotate: 5deg; left: 30%; top: 20px; z-index: 2; animation-delay: .65s; }
.growth-photo--graduate { --rotate: -2deg; right: 0; top: 79px; z-index: 3; animation-delay: 1.15s; }
.growth-photo--baby .photo-pin { animation-delay: .68s; }
.growth-photo--child .photo-pin { animation-delay: 1.18s; background: #e7ad37; }
.growth-photo--graduate .photo-pin { animation-delay: 1.68s; background: #168e68; }

.growth-arrow {
    position: absolute;
    z-index: 5;
    right: 2%; bottom: 1%;
    color: rgba(22, 83, 64, .62);
    font: 20px/1 "Patrick Hand", cursive;
    opacity: 0;
    animation: revealNote .55s ease 1.85s forwards;
}

@keyframes pinMemory {
    0% { opacity: 0; transform: translate3d(70px,-28px,0) rotate(calc(var(--rotate) + 8deg)) scale(.82); }
    70% { opacity: 1; transform: translate3d(-4px,3px,0) rotate(calc(var(--rotate) - 1deg)) scale(1.02); }
    100% { opacity: 1; transform: translate3d(0,0,0) rotate(var(--rotate)) scale(1); }
}
@keyframes dropPin { to { transform: translateX(-50%) scale(1); } }
@keyframes revealNote { to { opacity: 1; transform: rotate(-2deg); } }

.journey-main {
    position: relative;
    padding: 42px 25px 64px;
}
.journey-main::before,
.journey-main::after {
    content: "✦";
    position: absolute;
    color: rgba(21,150,107,.18);
    font-size: 48px;
    pointer-events: none;
}
.journey-main::before { top: 105px; left: -54px; transform: rotate(14deg); }
.journey-main::after { top: 44%; right: -52px; content: "❋"; }
.timeline-heading { margin-bottom: 24px; }
.timeline-entry { margin-bottom: 18px; }
.post-card { padding: 22px 25px; }
.load-wrap { margin-top: 22px; }

.journey-comments {
    margin: 22px -4px -4px;
    padding-top: 17px;
    border-top: 1px dashed rgba(22, 87, 67, .2);
}
.journey-comments__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #244d40;
    font-size: 13px;
}
.journey-comments__heading span { color: #84958e; font-size: 11px; font-weight: 600; }
.journey-comment-list { display: grid; gap: 9px; margin-bottom: 12px; }
.journey-comment {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) 25px;
    gap: 9px;
    align-items: start;
    padding: 9px 9px 9px 10px;
    border-radius: 13px;
    background: #f3f9f5;
}
.journey-comment__avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #cfeadd;
    color: #176247;
    font-weight: 800;
    box-shadow: 0 2px 7px rgba(31,91,70,.13);
}
.journey-comment__avatar img { width: 100%; height: 100%; object-fit: cover; }
.journey-comment__body > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; }
.journey-comment__body strong { color: #214b3e; font-size: 12px; }
.journey-comment__body time { color: #93a29c; font-size: 9px; }
.journey-comment__body p { margin: 2px 0 0; color: #496158; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.journey-comment__delete button {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9aaca5;
    font-size: 19px;
    line-height: 1;
}
.journey-comment__delete button:hover { background: #fee9e6; color: #c8584e; }
.journey-comment-composer { display: flex; gap: 8px; }
.journey-comment-composer input {
    min-width: 0;
    flex: 1;
    height: 39px;
    padding: 0 14px;
    border: 1px solid rgba(28,113,83,.18);
    border-radius: 999px;
    outline: 0;
    background: #fff;
    color: #294f42;
    font-size: 12px;
    transition: border-color .2s, box-shadow .2s;
}
.journey-comment-composer input:focus { border-color: #25a778; box-shadow: 0 0 0 3px rgba(37,167,120,.11); }
.journey-comment-composer button {
    flex: 0 0 auto;
    height: 39px;
    padding: 0 15px;
    border: 0;
    border-radius: 999px;
    background: #168b65;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 5px 13px rgba(22,139,101,.18);
}
.journey-comment-composer button:hover { background: #107454; transform: translateY(-1px); }
.journey-comment-login { display: inline-flex; color: #168b65; font-size: 11px; font-weight: 700; text-decoration: none; }

.timeline-entry[data-reveal-ready] .post-card,
.timeline-entry[data-reveal-ready] .date-side {
    opacity: 0;
    transform: translateY(28px) scale(.975);
    transition: opacity .65s ease, transform .65s cubic-bezier(.2,.75,.25,1);
}
.timeline-entry[data-reveal-ready] .date-side { transform: translateX(18px); transition-delay: .1s; }
.timeline-entry[data-reveal-ready].is-visible .post-card,
.timeline-entry[data-reveal-ready].is-visible .date-side { opacity: 1; transform: none; }
.timeline-entry[data-reveal-ready].is-visible .post-card:hover { transform: translateY(-3px); }

@media (max-width: 900px) {
    .journey-hero { min-height: 630px; padding-top: 45px; padding-bottom: 30px; }
    .hero-art { min-height: 310px; }
    .growth-photo { width: 38%; padding: 7px 7px 31px; }
    .growth-photo img { height: 158px; }
}

@media (max-width: 600px) {
    .journey-hero { min-height: 600px; padding: 34px 18px 20px; }
    .hero-art { min-height: 265px; margin-top: 12px; }
    .growth-photo { width: 43%; padding: 6px 6px 28px; }
    .growth-photo img { height: 128px; }
    .growth-photo figcaption { left: 8px; right: 8px; font-size: 14px; }
    .growth-photo figcaption small { display: none; }
    .growth-photo--baby { left: 1%; top: 68px; }
    .growth-photo--child { left: 28%; top: 15px; }
    .growth-photo--graduate { right: 0; top: 74px; }
    .growth-arrow { right: 4%; bottom: 0; font-size: 16px; }
    .journey-main { padding: 30px 15px 48px; }
    .timeline-heading { margin-bottom: 18px; }
    .timeline-entry { margin-bottom: 14px; }
    .post-card { padding: 19px 17px; }
    .journey-comments { margin-top: 17px; }
    .journey-comment-composer button span { display: none; }
}

/* Keep decorative layers and timeline cards inside narrow phone viewports. */
html, body { max-width: 100%; overflow-x: clip; }
.journey-main { min-width: 0; overflow-x: clip; }
.timeline, .timeline-entry, .post-card, .post-content,
.journey-post-gallery, .journey-comments { min-width: 0; max-width: 100%; }

@media (max-width: 480px) {
    .journey-main { padding-inline: 14px; }
    .timeline-heading h2 { font-size: clamp(1.65rem, 8vw, 2rem); line-height: 1.08; letter-spacing: -1.4px; }
    .timeline::before, .timeline-knot { display: none; }
    .timeline-entry { display: block; width: 100%; }
    .post-card { width: 100%; padding: 20px 16px; overflow: hidden; }
    .post-card::after { display: none; }
    .post-top { min-height: 43px; margin-left: 35px; padding-right: 58px; }
    .date-side { position: absolute; right: 8px; top: 10px; z-index: 3; display: block; width: 55px; min-height: 0; }
    .date-card { width: 55px; margin: 0; padding: 7px 5px; border-radius: 12px; }
    .date-card strong { font-size: 1.55rem; }
    .duplicate-date { display: none; }
    .journey-post-gallery .club-image-gallery { width: 100%; height: min(82vw, 320px); }
    .journey-comments { width: 100%; }
    .modal-dialog, .modal-content, .compose-modal { width: auto; max-width: calc(100vw - 12px); }
    .modal-body, .modal-header, .modal-footer { min-width: 0; padding-inline: 14px; }
    .editor-shell, .editor, .tags-input, .compose-grid { min-width: 0; max-width: 100%; }
    .editor-toolbar > * { max-width: 100%; }
    .sticker-board { left: 12px; right: 12px; width: auto; grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .growth-photo, .photo-pin, .growth-arrow { animation: none; opacity: 1; }
    .growth-photo { transform: rotate(var(--rotate)); }
    .photo-pin { transform: translateX(-50%) scale(1); }
    .timeline-entry[data-reveal-ready] .post-card,
    .timeline-entry[data-reveal-ready] .date-side { opacity: 1; transform: none; transition: none; }
}
