/* Open Forum — warm, human-paced festival conversation */
#infoCardsContainer .forum-chat {
    --forum-ink: #293b40;
    --forum-muted: #718084;
    --forum-paper: #f7f4ed;
    --forum-surface: #fffefa;
    --forum-line: #e7e1d6;
    --forum-accent: #a34d38;
    --forum-own: #e7f0e9;
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 1020;
    top: 64px;
    left: max(12px, calc((100vw - 1000px) / 2));
    right: max(12px, calc((100vw - 1000px) / 2));
    height: calc(100dvh - 205px);
    min-height: 360px;
    max-height: 920px;
    overflow: hidden;
    color: var(--forum-ink);
    background: var(--forum-paper);
    border: 1px solid var(--forum-line);
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(61, 53, 39, .07);
}

.forum-chat__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px 13px;
    background: var(--forum-surface);
    border-bottom: 1px solid var(--forum-line);
    flex: 0 0 auto;
}
.forum-chat__title {
    margin: 0;
    color: var(--forum-ink);
    font-size: 1.03rem;
    font-weight: 700;
    letter-spacing: -.025em;
}
.forum-chat__subtitle {
    margin: 3px 0 0;
    color: var(--forum-muted);
    font-size: .78rem;
}
.forum-chat__mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 13px;
    color: #fffaf2;
    background: var(--forum-accent);
}
.forum-chat__feed {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 15px clamp(10px, 3vw, 30px) 18px;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}
.forum-chat__date {
    position: sticky;
    z-index: 1;
    top: 4px;
    width: max-content;
    max-width: 92%;
    margin: 8px auto 16px;
    padding: 5px 11px;
    border: 1px solid rgba(231, 225, 214, .9);
    border-radius: 20px;
    color: #647276;
    background: rgba(255, 254, 250, .94);
    box-shadow: 0 2px 8px rgba(41, 59, 64, .05);
    font-size: .69rem;
    font-weight: 650;
    letter-spacing: .025em;
}
.forum-chat__row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin: 0 0 9px;
    animation: forum-message-in .18s ease-out both;
}
.forum-chat__row--mine { justify-content: flex-end; }
.forum-chat__avatar {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    margin-bottom: 2px;
    border: 1px solid #d9dfd9;
    border-radius: 50%;
    color: #45605c;
    background: #e9eee6;
    font-size: .65rem;
    font-weight: 700;
}
.forum-chat__bubble {
    position: relative;
    max-width: min(76%, 590px);
    min-width: 105px;
    padding: 10px 12px 7px;
    border: 1px solid #e9e2d7;
    border-radius: 15px 15px 15px 4px;
    color: var(--forum-ink);
    background: var(--forum-surface);
    box-shadow: 0 2px 5px rgba(61, 53, 39, .035);
    overflow-wrap: anywhere;
}
.forum-chat__row--mine .forum-chat__bubble {
    border-color: #d9e5d9;
    border-radius: 15px 15px 4px 15px;
    background: var(--forum-own);
}
.forum-chat__byline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
    color: #687579;
    font-size: .69rem;
}
.forum-chat__name {
    color: #526365;
    font-size: .72rem;
    font-weight: 700;
}
.forum-chat__body {
    margin: 0;
    color: #293b40;
    font-size: .9rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.forum-chat__time {
    display: inline-block;
    float: right;
    margin: 5px 0 0 12px;
    color: #798889;
    font-size: .64rem;
    white-space: nowrap;
}
.forum-chat__delete {
    display: inline-flex;
    min-width: 72px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid #e7d8ce;
    border-radius: 16px;
    color: #875746;
    background: rgba(255, 254, 250, .8);
    font-size: .69rem;
    font-weight: 650;
    cursor: pointer;
    opacity: .92;
}
.forum-chat__delete:hover, .forum-chat__delete:focus-visible {
    color: #8f382c;
    border-color: #c98b77;
    background: #fffaf5;
    opacity: 1;
}
.forum-chat__delete:focus-visible,
.forum-chat__delete-cancel:focus-visible,
.forum-chat__delete-confirm-button:focus-visible {
    outline: 3px solid rgba(163, 77, 56, .28);
    outline-offset: 2px;
}
.forum-chat__delete-confirm[hidden] { display: none; }
.forum-chat__delete-confirm {
    z-index: 4;
    flex: 0 0 auto;
    padding: 10px 16px;
    border-bottom: 1px solid #ead9cd;
    background: #fbf0e7;
}
.forum-chat__delete-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 920px;
    margin: 0 auto;
}
.forum-chat__delete-copy { min-width: 0; }
.forum-chat__delete-copy strong {
    display: block;
    color: #57382f;
    font-size: .84rem;
}
.forum-chat__delete-copy p {
    margin: 3px 0 0;
    color: #70584f;
    font-size: .75rem;
    line-height: 1.4;
}
.forum-chat__delete-copy .forum-chat__delete-error {
    color: #9b342a;
    font-weight: 650;
}
.forum-chat__delete-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}
.forum-chat__delete-cancel,
.forum-chat__delete-confirm-button {
    min-height: 42px;
    padding: 8px 13px;
    border: 1px solid #d9c6b9;
    border-radius: 22px;
    color: #634c43;
    background: #fffdf9;
    font-size: .76rem;
    font-weight: 650;
}
.forum-chat__delete-confirm-button {
    border-color: #963f30;
    color: #fffaf4;
    background: #963f30;
}
.forum-chat__delete-confirm-button:hover:not(:disabled) { background: #7f3428; }
.forum-chat__delete-actions button:disabled { cursor: wait; opacity: .65; }
.forum-chat__media {
    display: block;
    position: relative;
    max-width: min(100%, 390px);
    margin: 7px 0 1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    background: #e6e1d8;
    cursor: pointer;
}
.forum-chat__media img {
    display: block;
    max-width: 100%;
    max-height: 300px;
    object-fit: cover;
}
.forum-chat__play {
    position: absolute;
    inset: 50% auto auto 50%;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: white;
    background: rgba(34, 48, 49, .72);
}
.forum-chat__thread {
    margin: 9px 0 0;
    padding-top: 8px;
    border-top: 1px solid rgba(86, 106, 101, .14);
}
.forum-chat__thread-toggle {
    margin-top: 8px;
    padding: 0;
    border: 0;
    color: #6e807a;
    background: none;
    font-size: .73rem;
    font-weight: 650;
}
.forum-chat__reply {
    margin: 0 0 9px;
    padding-left: 9px;
    border-left: 2px solid #c7d5c9;
}
.forum-chat__reply-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #758182;
    font-size: .68rem;
}
.forum-chat__reply-body {
    margin: 3px 0 0;
    color: #37494b;
    font-size: .81rem;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.forum-chat__reply-form {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
}
.forum-chat__reply-mention-wrap { flex: 1 1 auto; }
.forum-chat__reply-mention-wrap .forum-chat__mention-list {
    max-height: min(180px, 30dvh);
}
.forum-chat__reply-input {
    min-width: 0;
    border-color: #e2e4dc;
    border-radius: 18px;
    font-size: .8rem;
}
.forum-chat__send-reply {
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: var(--forum-accent);
}
.forum-chat__new {
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 13px;
    padding: 8px 13px;
    border: 0;
    border-radius: 22px;
    color: #fff;
    background: var(--forum-accent);
    box-shadow: 0 4px 14px rgba(70, 44, 32, .2);
    font-size: .77rem;
    font-weight: 650;
}
.forum-chat__composer {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    padding: 10px 14px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--forum-line);
    background: var(--forum-surface);
}
.forum-chat__compose-line {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    max-width: 920px;
    margin: 0 auto;
}
.forum-chat__mention-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.forum-chat__mention-wrap .forum-chat__draft,
.forum-chat__mention-wrap .forum-chat__reply-input { width: 100%; }
.forum-chat__mention-list[hidden] { display: none; }
.forum-chat__mention-list {
    position: absolute;
    z-index: 12;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    max-height: min(240px, 32dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 5px;
    border: 1px solid #e1d9cb;
    border-radius: 13px;
    background: #fffefa;
    box-shadow: 0 8px 24px rgba(41, 59, 64, .16);
}
.forum-chat__mention-option {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    color: var(--forum-ink);
    background: transparent;
    text-align: left;
    font-size: .86rem;
}
.forum-chat__mention-option:hover,
.forum-chat__mention-option[aria-selected="true"] {
    color: #733e32;
    background: #f5eae1;
}
.forum-chat__mention-highlight { animation: forum-mention-pulse 1.3s ease-in-out 2; }
@keyframes forum-mention-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(163, 77, 56, 0); }
    35%, 70% { box-shadow: 0 0 0 4px rgba(163, 77, 56, .24); }
}
.forum-chat__attach {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    margin: 0;
    border: 1px solid #e1ddd3;
    border-radius: 50%;
    color: #687977;
    background: #fbfaf6;
    cursor: pointer;
    font-size: 1.05rem;
}
.forum-chat__draft {
    max-height: 122px;
    min-height: 42px;
    resize: none;
    overflow-y: auto;
    padding: 10px 15px;
    border: 1px solid #e2dfd6;
    border-radius: 21px;
    color: var(--forum-ink);
    background: #fbfaf6;
    box-shadow: none !important;
    font-size: .9rem;
    line-height: 1.35;
}
.forum-chat__draft:focus { border-color: #c79b89; background: #fff; }
.forum-chat__send {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--forum-accent);
    box-shadow: 0 3px 9px rgba(163, 77, 56, .2);
    font-size: 1rem;
}
.forum-chat__send:hover:not(:disabled), .forum-chat__send-reply:hover { background: #8d3d2d; }
.forum-chat__send:disabled { cursor: wait; opacity: .55; }
.forum-chat__media-preview {
    position: relative;
    display: inline-flex;
    max-width: 100%;
    margin: 0 0 8px 51px;
    padding: 5px;
    border: 1px solid var(--forum-line);
    border-radius: 12px;
    background: #f8f6ef;
}
.forum-chat__media-preview img, .forum-chat__media-preview video {
    display: block;
    max-width: min(240px, 65vw);
    max-height: 100px;
    border-radius: 8px;
}
.forum-chat__remove-media {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid #fff;
    border-radius: 50%;
    color: white;
    background: #6b7775;
    font-size: .8rem;
}
.forum-chat__status {
    min-height: 18px;
    margin: 4px auto 0;
    max-width: 920px;
    color: #8a4b3e;
    font-size: .73rem;
}
.forum-chat__empty {
    max-width: 360px;
    margin: 11vh auto 0;
    padding: 28px 22px;
    border: 1px dashed #d9d3c8;
    border-radius: 18px;
    color: var(--forum-muted);
    background: rgba(255, 254, 250, .65);
    text-align: center;
}
.forum-chat__empty-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    margin: 0 auto 12px;
    border-radius: 15px;
    color: var(--forum-accent);
    background: #f2e6dc;
    font-size: 1.2rem;
}
.forum-chat__skeleton {
    width: min(72%, 460px);
    height: 66px;
    margin: 13px 0;
    border-radius: 15px;
    background: linear-gradient(90deg, #ebe8df 20%, #f4f1e9 42%, #ebe8df 65%);
    background-size: 250% 100%;
    animation: forum-skeleton 1.5s ease-in-out infinite;
}
.forum-chat__skeleton:nth-child(even) { margin-left: auto; width: 58%; }
.forum-chat__retry {
    margin-top: 10px;
    border: 0;
    color: #914532;
    background: transparent;
    font-weight: 650;
}
@keyframes forum-message-in {
    from { opacity: .65; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes forum-skeleton {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (max-width: 767.98px) {
    #infoCardsContainer .forum-chat {
        height: calc(100dvh - 210px - env(safe-area-inset-bottom));
        min-height: 300px;
        margin: 0;
        border-right: 0;
        border-left: 0;
        border-radius: 13px;
    }
    .forum-chat__heading { padding: 11px 13px; }
    .forum-chat__feed { padding: 12px 10px 16px; }
    .forum-chat__bubble { max-width: 84%; padding: 9px 10px 6px; }
    .forum-chat__composer { padding: 8px 9px max(10px, env(safe-area-inset-bottom)); }
    .forum-chat__attach, .forum-chat__send { width: 40px; height: 40px; flex-basis: 40px; }
    .forum-chat__draft { min-height: 40px; padding: 9px 13px; font-size: 16px; }
    .forum-chat__new { right: 12px; bottom: 10px; }
    .forum-chat__delete { min-width: 76px; min-height: 44px; padding: 6px 9px; }
    .forum-chat__delete-confirm {
        max-height: min(42vh, 260px);
        overflow-y: auto;
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    .forum-chat__delete-panel { align-items: stretch; flex-direction: column; gap: 10px; }
    .forum-chat__delete-actions { justify-content: flex-end; }
    .forum-chat__delete-cancel,
    .forum-chat__delete-confirm-button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .forum-chat__row, .forum-chat__skeleton { animation: none; }
    .forum-chat__mention-highlight { animation: none; outline: 3px solid rgba(163, 77, 56, .32); }
    .forum-chat__feed { scroll-behavior: auto; }
}
