/* Feed and post */
.feed-intro {
    padding: 18px 20px 0;
}

.quick-compose {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.quick-compose > span:not(.avatar) {
    color: var(--color-text-muted);
}

.quick-compose i {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    font-style: normal;
}

.feed-list {
    padding-top: 10px;
}

.post-card {
    padding: 22px 20px;
    border-bottom: 1px solid var(--color-border);
}

.post-card--detail {
    border-bottom: 0;
}

.post-author {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 11px;
}

.post-author > div {
    display: grid;
    line-height: 1.35;
}

.post-author b {
    font-size: 14px;
}

.post-author > div > span:not(.verified-name) {
    color: var(--color-text-muted);
    font-size: 11px;
}

.post-menu-wrap {
    position: relative;
}

.post-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    right: 0;
    min-width: 132px;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    box-shadow: 0 12px 30px rgba(72, 52, 39, .14);
}

.post-menu[hidden] {
    display: none;
}

.post-menu button,
.post-menu a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text);
    text-align: left;
}

.post-menu button:hover,
.post-menu a:hover {
    background: var(--color-surface-muted);
    color: var(--color-primary-dark);
}

.post-menu button.is-danger {
    color: var(--color-tertiary);
}

.official-badge {
    display: inline-grid;
    place-items: center;
    width: 15px;
    height: 15px;
    margin-left: 3px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 9px;
    vertical-align: 1px;
}

.post-copy {
    margin: 11px 0 13px;
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-line;
    word-break: break-word;
}

.feed-more {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 10px 18px 22px;
}

.feed-more > span {
    min-height: 18px;
    color: var(--color-text-muted);
    font-size: 12px;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 42px;
    padding-top: 8px;
}

.post-actions button,
.post-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 12px;
}

.post-actions button:hover,
.post-actions a:hover,
.post-actions .is-active {
    color: var(--color-primary);
}

.post-actions [data-toggle-like].is-active .rs-icon,
.post-actions [data-post-like].is-active .rs-icon {
    fill: currentColor;
}

[data-toggle-bookmark].is-active .rs-icon,
[data-post-bookmark].is-active .rs-icon {
    fill: currentColor;
}

.post-note,
.post-metrics {
    color: var(--color-text-muted);
    font-size: 11px;
}

.post-media {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 15px;
}

.post-media--carousel {
    grid-auto-columns: min(86%, 520px);
    grid-auto-flow: column;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.post-media__item {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--color-surface-muted);
    scroll-snap-align: start;
}

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

.post-card:not(.post-card--detail) .post-media__item {
    display: grid;
    place-items: center;
    width: fit-content;
    max-width: 100%;
    max-height: 256px;
    aspect-ratio: auto;
    border-radius: 15px;
}

.post-card:not(.post-card--detail) .post-media:not(.post-media--carousel) {
    display: flex;
    justify-content: flex-start;
    border-radius: 0;
}

.post-card:not(.post-card--detail) .post-media--carousel {
    grid-auto-columns: max-content;
}

.post-card:not(.post-card--detail) .post-media__item img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 256px;
    border-radius: inherit;
}

.post-note b,
.post-metrics b {
    color: var(--color-text);
}

.post-metrics {
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
}

.placeholder-photo,
.event-card__visual,
.tour-card__visual,
.detail-hero,
.event-inline__visual,
.saved-card__visual,
.profile-cover,
.profile-post > .placeholder-photo {
    position: relative;
    display: block;
    overflow: hidden;
    background-color: #d8c4af;
    isolation: isolate;
}

.placeholder-photo::before,
.event-card__visual::before,
.tour-card__visual::before,
.detail-hero::before,
.event-inline__visual::before,
.saved-card__visual::before,
.profile-cover::before,
.profile-post > .placeholder-photo::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: inherit;
}

.placeholder-photo {
    aspect-ratio: 4 / 3;
    border-radius: 15px;
}

.placeholder-photo--detail {
    aspect-ratio: 16 / 11;
}

.placeholder-photo--mountain {
    background:
        linear-gradient(165deg, transparent 50%, rgba(46, 62, 51, .76) 50.5% 70%, transparent 70.5%),
        linear-gradient(18deg, transparent 34%, rgba(100, 119, 95, .88) 34.5% 67%, transparent 67.5%),
        radial-gradient(circle at 78% 20%, #f2c071 0 8%, transparent 8.4%),
        linear-gradient(#78939a, #d9bd96 56%, #7c8d72);
}

.placeholder-photo--city,
.placeholder-photo--city-run {
    background:
        linear-gradient(90deg, transparent 0 12%, rgba(65, 57, 53, .45) 12% 22%, transparent 22% 28%, rgba(82, 68, 61, .62) 28% 44%, transparent 44% 49%, rgba(55, 57, 58, .5) 49% 64%, transparent 64% 70%, rgba(90, 70, 59, .5) 70% 83%, transparent 83%),
        linear-gradient(175deg, transparent 62%, rgba(177, 112, 66, .65) 62.5% 64%, rgba(69, 76, 70, .72) 64.5%),
        linear-gradient(#99acb4, #ebc79b 60%, #80736d);
}

.placeholder-photo--city-run {
    background:
        radial-gradient(ellipse at 47% 78%, rgba(246, 223, 196, .72) 0 7%, transparent 7.5%),
        linear-gradient(90deg, transparent 0 12%, rgba(65, 57, 53, .38) 12% 22%, transparent 22% 50%, rgba(55, 57, 58, .45) 50% 68%, transparent 68%),
        linear-gradient(170deg, transparent 58%, rgba(80, 75, 69, .67) 58.5%),
        linear-gradient(#8fa4ae, #e5bd8b 58%, #756d68);
}

.placeholder-photo--coast,
.placeholder-photo--island {
    background:
        linear-gradient(158deg, transparent 46%, rgba(68, 83, 69, .9) 46.5% 67%, transparent 67.5%),
        linear-gradient(176deg, transparent 57%, rgba(74, 138, 146, .75) 57.5% 76%, rgba(226, 208, 169, .9) 76.5%),
        linear-gradient(#95c2cb, #e7c899);
}

.placeholder-photo--temple {
    background:
        linear-gradient(90deg, transparent 28%, rgba(117, 52, 40, .8) 28% 34%, transparent 34% 66%, rgba(117, 52, 40, .8) 66% 72%, transparent 72%),
        linear-gradient(165deg, transparent 38%, rgba(152, 60, 39, .88) 38.5% 48%, transparent 48.5%),
        linear-gradient(195deg, transparent 38%, rgba(152, 60, 39, .88) 38.5% 48%, transparent 48.5%),
        linear-gradient(#d6b58e, #efe0c2 68%, #8b735f);
}

.placeholder-photo--kyoto {
    background:
        radial-gradient(circle at 16% 36%, rgba(153, 59, 42, .86) 0 3%, transparent 3.3%),
        radial-gradient(circle at 27% 24%, rgba(194, 86, 43, .78) 0 5%, transparent 5.3%),
        radial-gradient(circle at 78% 30%, rgba(122, 49, 42, .72) 0 7%, transparent 7.4%),
        linear-gradient(90deg, transparent 42%, rgba(81, 58, 44, .82) 42.5% 48%, transparent 48.5%),
        linear-gradient(169deg, transparent 58%, rgba(102, 85, 66, .72) 58.5%),
        linear-gradient(#d9b788, #edcf9d 60%, #7a6f5a);
}

.placeholder-photo--forest {
    background:
        repeating-linear-gradient(80deg, transparent 0 12%, rgba(42, 71, 53, .57) 12.5% 16%),
        linear-gradient(170deg, transparent 48%, rgba(72, 91, 59, .86) 48.5%),
        linear-gradient(#8fa89d, #c7bd8d 58%, #54624e);
}

.placeholder-photo--profile {
    background:
        radial-gradient(circle at 75% 28%, rgba(242, 186, 104, .65) 0 8%, transparent 8.5%),
        linear-gradient(168deg, transparent 60%, rgba(116, 93, 71, .47) 60.5%),
        linear-gradient(135deg, #b9c1a5, #e5b984 55%, #b66d48);
}

.placeholder-photo--coffee {
    background:
        radial-gradient(ellipse at 50% 56%, #604333 0 18%, #ede2d1 18.5% 28%, transparent 28.5%),
        radial-gradient(ellipse at 50% 58%, rgba(71, 47, 34, .24) 0 37%, transparent 37.5%),
        linear-gradient(145deg, #d8b790, #f0e3ce);
}

.placeholder-photo__badge,
.placeholder-photo__caption {
    position: absolute;
    z-index: 2;
    color: #fff;
}

.placeholder-photo__badge {
    top: 13px;
    left: 13px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 999px;
    background: rgba(43, 39, 36, .24);
    backdrop-filter: blur(8px);
    font-size: 10px;
    font-weight: 650;
}

.placeholder-photo__caption {
    right: 14px;
    bottom: 10px;
    font-size: clamp(22px, 5.5vw, 46px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.065em;
    opacity: .84;
}

.run-summary-card {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    min-height: 220px;
    padding: 22px;
    overflow: hidden;
    border-radius: 15px;
    background: #263a35;
    color: #f8efe4;
}

.run-summary-card > div:not(.run-route) {
    display: grid;
    align-content: start;
}

.run-summary-card small {
    color: rgba(255, 255, 255, .65);
    font-size: 10px;
    letter-spacing: .08em;
}

.run-summary-card b {
    font-size: 31px;
}

.run-summary-card b i {
    font-size: 12px;
    font-style: normal;
}

.run-route {
    position: absolute;
    inset: 36% 10% 11%;
}

.run-route::before,
.run-route::after,
.run-route span {
    position: absolute;
    height: 3px;
    border-radius: 999px;
    background: #e19a60;
    content: "";
    transform-origin: left;
}

.run-route::before { top: 55%; left: 4%; width: 42%; transform: rotate(-27deg); }
.run-route::after { top: 32%; left: 39%; width: 46%; transform: rotate(34deg); }
.run-route span { top: 59%; left: 76%; width: 22%; transform: rotate(-50deg); }

.post-card--event {
    background: rgba(239, 225, 209, .34);
}

.event-inline {
    display: grid;
    grid-template-columns: 138px 1fr;
    gap: 14px;
    padding: 11px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: var(--color-surface);
}

.event-inline__visual {
    min-height: 105px;
    border-radius: 11px;
}

.event-inline > div:last-child {
    display: grid;
    align-content: center;
    gap: 4px;
}

.event-inline small,
.event-inline p {
    color: var(--color-text-muted);
    font-size: 11px;
}

.event-inline h3 {
    font-size: 15px;
}

.end-note {
    padding: 26px 20px;
    color: var(--color-text-muted);
    font-size: 12px;
    text-align: center;
}

.composer-page {
    padding: 22px 20px 100px;
}

.composer-author {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
}

.composer-author > div {
    display: grid;
    line-height: 1.4;
}

.composer-author small {
    color: var(--color-text-muted);
}

.composer-text {
    display: grid;
    min-height: 140px;
    padding: 15px;
    border-color: transparent;
    background: transparent;
    font-size: 16px;
    line-height: 1.55;
}

.composer-text textarea {
    width: 100%;
    min-height: 118px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    line-height: inherit;
    resize: vertical;
}

.composer-text > small {
    justify-self: end;
    color: var(--color-text-muted);
    font-size: 10px;
}

.media-dropzone {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 210px;
    margin-top: 12px;
    padding: 26px;
    border: 1px dashed rgba(194, 101, 42, .34);
    border-radius: 16px;
    background: rgba(243, 223, 207, .3);
    color: var(--color-text-muted);
    text-align: center;
}

.media-dropzone .rs-icon {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.media-dropzone b {
    color: var(--color-text);
}

.composer-media-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.composer-media-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 12px;
    background: var(--color-surface-muted);
    cursor: grab;
}

.composer-media-item.is-dragging {
    opacity: .5;
}

.composer-media-item__preview {
    display: block;
    width: 100%;
    height: 100%;
}

.composer-media-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.composer-media-item button {
    position: absolute;
    top: 7px;
    right: 7px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(30, 27, 24, .78);
    color: white;
    font-size: 20px;
}

.composer-media-item > span {
    position: absolute;
    right: 6px;
    bottom: 6px;
    left: 6px;
    padding: 4px 6px;
    border-radius: 7px;
    background: rgba(30, 27, 24, .7);
    color: white;
    font-size: 10px;
    text-align: center;
}

.composer-settings {
    margin-top: 20px;
    border-top: 1px solid var(--color-border);
}

.setting-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 68px;
    padding: 11px 0;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    text-align: left;
}

.setting-row > span:not(.setting-row__icon) {
    display: grid;
    line-height: 1.4;
}

.setting-row small,
.setting-row em {
    color: var(--color-text-muted);
    font-size: 11px;
    font-style: normal;
}

.setting-row > .rs-icon {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
}

.sticky-form-action {
    position: sticky;
    z-index: 10;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding: 12px 0;
    border-top: 1px solid var(--color-border);
    background: rgba(255, 253, 249, .92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.sticky-form-action > span {
    color: var(--color-text-muted);
    font-size: 11px;
}

.comments-section {
    padding: 0 20px 28px;
    border-top: 8px solid rgba(239, 225, 209, .48);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 0 14px;
}

.section-heading h2 {
    font-size: 17px;
    letter-spacing: -.025em;
}

.section-heading > span {
    color: var(--color-text-muted);
    font-size: 11px;
}

.section-heading--spaced {
    padding-top: 30px;
}

.comment-list {
    display: grid;
}

.comment {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 13px 0;
}

.comment--reply {
    margin-left: 42px;
}

.comment p {
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.comment small {
    color: var(--color-text-muted);
    font-size: 10px;
}

.comment-actions {
    display: flex;
    align-items: flex-start;
    gap: 2px;
}

.comment-actions button {
    align-self: start;
    min-width: 34px;
    height: 34px;
    padding: 0 7px;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 10px;
}

.comment-actions button .rs-icon {
    width: 15px;
    height: 15px;
    margin: auto;
}

.comment-actions button:hover,
.comment-actions button.is-active {
    color: var(--color-primary);
}

.comment-actions button.is-active .rs-icon {
    fill: currentColor;
}

.comment-composer {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: rgba(255, 253, 249, .94);
    backdrop-filter: blur(12px);
}

.comment-reply-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 10px 0;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    font-size: 11px;
}

.comment-reply-state button {
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: inherit;
    font-weight: 700;
}

.comment-composer input {
    min-height: 40px;
    padding: 0 10px;
    border-color: transparent;
    background: transparent;
}

.comment-composer button {
    min-height: 38px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--color-primary-dark);
    font-weight: 700;
}

.comment-more {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 8px 12px 14px;
}

.comment-more > span {
    min-height: 18px;
    color: var(--color-text-muted);
    font-size: 11px;
}

.report-dialog {
    width: min(92vw, 460px);
    max-height: min(88vh, 680px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 24px 80px rgba(54, 36, 25, .28);
}

.report-dialog::backdrop {
    background: rgba(39, 28, 22, .48);
    backdrop-filter: blur(3px);
}

.report-dialog__panel {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.report-dialog__panel > header,
.report-dialog__panel > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.report-dialog__panel > header > div {
    display: grid;
    gap: 3px;
}

.report-dialog__panel > header span {
    color: var(--color-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.report-dialog__panel > header h2 {
    font-size: 20px;
}

.report-dialog__panel .field {
    display: grid;
    gap: 8px;
}

.report-dialog__panel .field > span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
}

.report-dialog__panel .field small {
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 500;
}

.report-dialog__panel select,
.report-dialog__panel textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background-color: var(--color-surface-muted);
}

.report-dialog__panel select {
    min-height: 44px;
    padding: 0 36px 0 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23756a63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
}

.report-dialog__panel textarea {
    min-height: 108px;
    padding: 12px;
    resize: vertical;
}

.report-dialog__panel > footer {
    justify-content: flex-end;
}

.media-lightbox {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    overflow: hidden;
    border: 0;
    background: rgba(24, 20, 18, .86);
    color: #fff;
}

.media-lightbox[open] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    place-items: center;
}

.media-lightbox::backdrop {
    background: rgba(24, 20, 18, .68);
    backdrop-filter: blur(5px);
}

.media-lightbox img {
    display: block;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.media-lightbox__close {
    position: fixed;
    z-index: 1;
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .36);
    border-radius: 50%;
    background: rgba(32, 27, 24, .66);
    color: #fff;
    font-size: 30px;
    line-height: 1;
}

.comment-login {
    margin: 10px 16px 0;
}


/* Brand-sponsored feed cards use independent metadata and never post controls. */
.feed-ad header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 20px; }
.feed-ad-label { font-size: 12px; padding: 4px 9px; border-radius: 6px; background: var(--surface-soft, #eef2eb); }
.feed-ad-link { display: block; color: inherit; text-decoration: none; }
.feed-ad-link img { display: block; width: 100%; max-height: 440px; object-fit: contain; background: var(--surface-soft, #eef2eb); }
.feed-ad-link h3, .feed-ad-link p { margin: 16px 20px; overflow-wrap: anywhere; }
.feed-ad-link > span { display: block; margin: 16px 20px 20px; font-weight: 600; }
