:root{--forum-r:14px}
.forum-wrap{max-width:680px;margin:0 auto;padding:0 16px 80px}
.forum-header{display:flex;align-items:center;justify-content:space-between;padding:28px 0 18px}
.forum-header h1{margin:0;font-size:1.35rem;letter-spacing:-.03em}
.forum-compose{background:var(--paper);border:1px solid var(--line);border-radius:var(--forum-r);padding:14px 16px;margin-bottom:20px}
.forum-compose textarea{width:100%;min-height:68px;border:none;background:none;font:inherit;font-size:.95rem;resize:none;outline:none;color:var(--ink)}
.forum-compose-bar{display:flex;align-items:center;gap:10px;margin-top:8px}
.forum-compose-bar label{cursor:pointer;color:var(--muted);font-size:.82rem;display:flex;align-items:center;gap:4px}
.forum-compose-bar label:hover{color:var(--orange)}
.forum-compose-bar input[type=file]{display:none}
.forum-img-thumb{width:64px;height:64px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
.btn-post{margin-left:auto;background:var(--orange);color:#fff;border:none;border-radius:9px;padding:8px 18px;font:inherit;font-size:.88rem;font-weight:850;cursor:pointer}
.btn-post:disabled{opacity:.5;cursor:not-allowed}
.forum-feed{display:flex;flex-direction:column;gap:10px}
.forum-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--forum-r);padding:16px 16px 10px}
.forum-card-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.f-avatar{width:38px;height:38px;border-radius:50%;object-fit:cover;background:var(--line);flex-shrink:0}
.f-avatar-ph{width:38px;height:38px;border-radius:50%;background:var(--orange);color:#fff;display:grid;place-items:center;font-weight:950;font-size:.88rem;flex-shrink:0}
.forum-card-meta{flex:1;min-width:0}
.forum-card-meta strong{display:block;font-size:.87rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.forum-card-meta time{color:var(--muted);font-size:.74rem}
.forum-body{font-size:.95rem;line-height:1.75;white-space:pre-wrap;word-break:break-word}
.forum-card-img{margin-top:10px}
.forum-card-img img{max-width:100%;border-radius:10px;border:1px solid var(--line);display:block}
.forum-card-foot{display:flex;align-items:center;gap:16px;margin-top:10px;padding-top:8px;border-top:1px solid var(--line)}
.btn-reply{background:none;border:none;color:var(--muted);font:inherit;font-size:.82rem;cursor:pointer;display:flex;align-items:center;gap:4px;padding:4px 0}
.btn-reply:hover{color:var(--orange)}
.forum-comments{margin-top:10px;display:flex;flex-direction:column;gap:9px}
.forum-comment{display:flex;gap:8px}
.fc-avatar{width:28px;height:28px;border-radius:50%;object-fit:cover;background:var(--line);flex-shrink:0}
.fc-avatar-ph{width:28px;height:28px;border-radius:50%;background:var(--orange);color:#fff;display:grid;place-items:center;font-size:.66rem;font-weight:950;flex-shrink:0}
.fc-bubble{background:#f5efeb;border-radius:0 10px 10px 10px;padding:7px 11px;flex:1;min-width:0}
.fc-bubble strong{font-size:.79rem}
.fc-bubble p{margin:2px 0 0;font-size:.86rem;line-height:1.6;white-space:pre-wrap;word-break:break-word}
.fc-bubble time{display:block;margin-top:3px;color:var(--muted);font-size:.7rem}
.forum-reply-form{display:flex;gap:8px;margin-top:9px}
.forum-reply-form textarea{flex:1;height:72px;min-height:72px;border:1px solid var(--line);border-radius:9px;padding:7px 10px;font:inherit;font-size:.86rem;resize:none;outline:none;background:#fff}
.forum-reply-form textarea:focus{border-color:var(--orange)}
.forum-reply-form button{background:var(--orange);color:#fff;border:none;border-radius:9px;padding:0 13px;font:inherit;font-size:.82rem;font-weight:850;cursor:pointer}
.forum-reply-form button:disabled{opacity:.5}
.forum-load-more{text-align:center;padding:20px 0}
.forum-load-more button{background:none;border:1px solid var(--line);border-radius:9px;padding:9px 22px;font:inherit;font-size:.87rem;color:var(--muted);cursor:pointer}
.forum-load-more button:hover{border-color:var(--orange);color:var(--orange)}
.forum-gate{text-align:center;padding:48px 16px;color:var(--muted)}
.forum-gate a.line-login-button{display:inline-flex;align-items:center;justify-content:center;margin-top:14px;padding:12px 22px}
@media(max-width:600px){.forum-wrap{padding:0 10px 60px}.forum-card{padding:13px 13px 9px}}

.forum-delete{flex-shrink:0;margin-left:auto;border:1px solid var(--line);border-radius:7px;background:transparent;color:#b91c1c;font:inherit;font-size:.75rem;padding:4px 8px;cursor:pointer}
.forum-delete:hover{background:#fef2f2;border-color:#fca5a5}
.forum-delete:disabled{opacity:.5;cursor:wait}
.forum-comment>.forum-delete{align-self:flex-start}

.forum-delete-request{color:var(--muted)}
.forum-delete-request:hover{background:var(--paper);border-color:var(--muted)}
.forum-moderation-title{font-size:1rem;margin:0 0 12px}
.forum-delete-review{padding:12px 0;border-top:1px solid var(--line)}
.forum-delete-review strong{font-size:.84rem}
.forum-delete-review p{max-height:150px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.85rem}
.forum-review-actions{display:flex;gap:8px;justify-content:flex-end}
.forum-review-actions .forum-delete{margin-left:0}
.forum-review-empty{color:var(--muted);font-size:.84rem}

.forum-reply-form{flex-wrap:wrap;align-items:center}
.forum-reply-form textarea{flex-basis:100%;min-width:0;box-sizing:border-box}
.reply-images-tools{width:100%}
.reply-file-label{display:inline-block;cursor:pointer;font-size:.82rem;color:var(--orange)}
.reply-files{display:block;max-width:100%;font:inherit;margin-top:5px}
.reply-images-tools small{display:block;font-size:.75rem;color:var(--muted);margin-top:4px}
.reply-previews{display:flex;flex-wrap:wrap;gap:7px;margin-top:7px}
.reply-preview{position:relative;width:64px;height:64px}
.reply-preview img{width:100%;height:100%;object-fit:cover;border-radius:7px}
.reply-preview button{position:absolute;right:-4px;top:-4px;padding:0;width:22px;height:22px;border-radius:50%;line-height:22px}
.reply-status{font-size:.8rem;color:#b91c1c;overflow-wrap:anywhere;margin:5px 0 0}
.reply-status:empty,.reply-previews:empty{display:none}
.fc-images{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:7px}
.fc-images a{display:block;min-width:0}
.fc-images img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:6px}

.compose-image-hint{display:block;color:var(--muted);font-size:.75rem;margin-top:9px}
.forum-compose-bar{flex-wrap:wrap}
.forum-card>.fc-images{margin-bottom:9px}

body.forum-viewing-image{overflow:hidden}
.forum-image-viewer{box-sizing:border-box;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:16px;border:0;background:rgba(15,23,42,.96);color:#fff}
.forum-image-viewer[open]{display:flex;flex-direction:column;gap:16px}
.forum-image-viewer::backdrop{background:#0f172a}
.image-viewer-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
.image-viewer-bar button{min-height:48px;padding:10px 18px;border:0;border-radius:8px;background:#fff;color:#172033;font:inherit;font-size:16px;font-weight:700;cursor:pointer}
.image-viewer-bar button:focus-visible{outline:3px solid #60a5fa;outline-offset:3px}
.image-viewer-body{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;cursor:zoom-out}
.image-viewer-body img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100vh - 112px);max-height:calc(100dvh - 112px);object-fit:contain;cursor:default}

.forum-edit-hint{font-size:.8rem;color:var(--muted);line-height:1.6}
.forum-edit{flex-shrink:0;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--ink);font:inherit;font-size:.75rem;padding:4px 8px;cursor:pointer}
.forum-edit:hover{background:var(--line)}
.forum-card-head>.forum-edit{margin-left:auto}
.forum-card-head>.forum-edit+.forum-delete{margin-left:0}
.forum-comment{flex-wrap:wrap}
.forum-comment>.forum-edit{align-self:flex-start}
.forum-comment>.forum-edit+.forum-delete{margin-left:0}
.forum-edit-form{flex-basis:100%;min-width:0;margin:10px 0}
.forum-edit-form label{display:block;font-size:.86rem}
.forum-edit-form textarea{display:block;box-sizing:border-box;width:100%;min-height:100px;margin-top:6px;padding:10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font:inherit;resize:vertical}
.forum-edit-form textarea:focus{outline:2px solid var(--orange);outline-offset:1px}
.forum-edit-actions{display:flex;gap:8px}
.forum-edit-actions button{border:0;border-radius:8px;padding:8px 12px;background:var(--orange);color:#fff;font:inherit;cursor:pointer}
.forum-edit-actions [data-cancel-edit]{background:var(--line);color:var(--ink)}
.forum-edit-actions button:disabled{opacity:.5;cursor:wait}

.forum-gate{padding:12px 0 24px}.forum-guest-preview .fp-card{padding:16px}.forum-guest-preview .fp-reply-bubble{background:var(--line)}
