/* Forum (Kijiwe): forums.php (topics) and forum.php (chat room). Layout around it: public-base.css */
.fm-page { padding-bottom: 56px; --fm-blue: #0b3d91; --fm-blue2: #1565c0; --fm-gold: #facc15; --fm-ink: #0f172a; --fm-muted: #64748b; --fm-line: #e8edf5; --fm-card: #ffffff; --fm-soft: #f4f6fa; }

/* ================================================================ topics page */
.fm-hero2 { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 40px 40px 34px; margin-bottom: 26px; border-radius: 28px; color: #fff;
    background: radial-gradient(circle at 85% 15%, rgba(250, 204, 21, 0.28), transparent 38%), radial-gradient(circle at 10% 110%, rgba(56, 189, 248, 0.35), transparent 45%), linear-gradient(135deg, #0a2f6e 0%, #0b3d91 45%, #1565c0 100%);
    box-shadow: 0 18px 40px rgba(11, 61, 145, 0.25); }
.fm-hero2::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, 0.06); pointer-events: none; }
.fm-hero-text { position: relative; z-index: 1; max-width: 560px; }
.fm-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 30px; background: rgba(255, 255, 255, 0.14); font-size: 0.82rem; font-weight: 600; backdrop-filter: blur(6px); }
.fm-kicker i { font-size: 0.5rem; color: #4ade80; animation: fm-pulse 1.6s infinite; }
.fm-hero2 h1 { font-size: 3rem; font-weight: 800; letter-spacing: -0.5px; margin: 12px 0 6px; line-height: 1.05; }
.fm-hero2 p { font-size: 1.08rem; opacity: 0.9; line-height: 1.55; }
.fm-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.fm-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border: none; border-radius: 40px; background: var(--fm-gold); color: var(--fm-ink); font: inherit; font-weight: 800; font-size: 0.98rem; cursor: pointer; box-shadow: 0 8px 20px rgba(250, 204, 21, 0.35); transition: transform 0.15s, box-shadow 0.15s; }
.fm-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(250, 204, 21, 0.45); }
.fm-cta.ghost { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.35); }
.fm-cta.small { padding: 10px 18px; font-size: 0.9rem; }
.fm-cta.block { width: 100%; }
.fm-hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, auto); gap: 10px; }
.fm-hero-stats div { min-width: 104px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16); backdrop-filter: blur(6px); text-align: center; }
.fm-hero-stats strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--fm-gold); line-height: 1.1; }
.fm-hero-stats span { font-size: 0.78rem; opacity: 0.9; }

.fm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.fm-main { min-width: 0; }
.fm-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.fm-tabs { display: flex; gap: 6px; padding: 5px; background: var(--fm-card); border-radius: 40px; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05); overflow-x: auto; max-width: 100%; }
.fm-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 30px; text-decoration: none; color: var(--fm-muted); font-weight: 700; font-size: 0.88rem; white-space: nowrap; transition: 0.15s; }
.fm-tabs a:hover { color: var(--fm-blue); }
.fm-tabs a.active { background: var(--fm-blue); color: #fff; }
.fm-tabs a.active i { color: var(--fm-gold); }
.fm-search { flex: 1 1 220px; max-width: 340px; position: relative; display: flex; align-items: center; }
.fm-search > i { position: absolute; left: 16px; color: #718096; }
.fm-search input { width: 100%; padding: 11px 78px 11px 42px; border: 1px solid var(--fm-line); border-radius: 40px; font: inherit; font-size: 0.92rem; background: var(--fm-card); color: var(--fm-ink); }
.fm-search input:focus { outline: none; border-color: var(--fm-blue); box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.1); }
.fm-clear { position: absolute; right: 50px; color: #718096; padding: 6px; }
.fm-search-go { position: absolute; right: 4px; width: 36px; height: 36px; border: none; border-radius: 50%; background: var(--fm-blue); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.fm-search-go:hover { background: #1565c0; }

.fm-new { background: var(--fm-card); border-radius: 22px; padding: 20px 22px; margin-bottom: 18px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); border: 2px solid var(--fm-gold); }
.fm-new[hidden] { display: none; }
.fm-new-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fm-new h3 { font-size: 1.1rem; color: var(--fm-ink); display: flex; align-items: center; gap: 8px; }
.fm-new h3 i { color: var(--fm-gold); }
.fm-x { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--fm-soft); color: var(--fm-muted); cursor: pointer; }
.fm-ideas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; font-size: 0.8rem; color: var(--fm-muted); }
.fm-ideas button { border: 1px dashed #cbd5e1; background: none; color: var(--fm-blue); border-radius: 20px; padding: 5px 11px; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.fm-ideas button:hover { background: #eef3fb; border-style: solid; }
.fm-new input, .fm-new textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--fm-line); border-radius: 14px; font: inherit; font-size: 0.95rem; margin-bottom: 10px; background: var(--fm-soft); color: var(--fm-ink); }
.fm-new input { font-weight: 700; font-size: 1.02rem; }
.fm-new textarea { min-height: 110px; resize: vertical; }
.fm-new input:focus, .fm-new textarea:focus { outline: none; border-color: var(--fm-blue); background: var(--fm-card); }
.fm-new-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fm-note { font-size: 0.82rem; color: var(--fm-muted); }
.fm-note i { color: #16a34a; }
.fm-send { padding: 11px 22px; border: none; border-radius: 30px; background: var(--fm-blue); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.fm-send:hover { background: var(--fm-blue2); }
.fm-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 12px; padding: 10px 14px; font-size: 0.9rem; margin: 0 0 12px; }

.fm-list { display: grid; gap: 12px; }
.fm-card { position: relative; display: grid; grid-template-columns: 48px 1fr 18px; gap: 16px; align-items: start; padding: 18px 20px; background: var(--fm-card); border-radius: 20px; text-decoration: none; color: inherit; box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05); border: 1px solid transparent; transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.fm-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1); border-color: rgba(11, 61, 145, 0.15); }
.fm-card.pinned { background: linear-gradient(100deg, #fffbeb 0%, var(--fm-card) 45%); }
.fm-card.hot::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(#f97316, #ef4444); }
.fm-card.is-hidden { opacity: 0.6; }
.fm-card-avatar { width: 48px; height: 48px; border-radius: 16px; object-fit: cover; }
.fm-card-main { min-width: 0; }
.fm-card-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.fm-card-flags:empty { display: none; }
.fm-card h3 { font-size: 1.08rem; font-weight: 800; color: var(--fm-ink); line-height: 1.35; overflow-wrap: anywhere; }
.fm-card:hover h3 { color: var(--fm-blue); }
.fm-card-preview { margin-top: 5px; font-size: 0.88rem; color: var(--fm-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fm-card-preview strong { color: #334155; }
.fm-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; font-size: 0.8rem; color: var(--fm-muted); }
.fm-card-foot i { margin-right: 3px; }
.fm-faces { display: inline-flex; align-items: center; }
.fm-faces img { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--fm-card); margin-left: -8px; }
.fm-faces img:first-child { margin-left: 0; }
.fm-faces em { margin-left: 4px; font-style: normal; font-weight: 700; font-size: 0.75rem; color: var(--fm-blue); }
.fm-when { margin-left: auto; }
.fm-card-go { color: #cbd5e1; align-self: center; transition: 0.18s; }
.fm-card:hover .fm-card-go { color: var(--fm-blue); transform: translateX(3px); }
.fm-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; padding: 3px 9px; border-radius: 20px; }
.fm-flag.pin { background: #fef3c7; color: #92400e; }
.fm-flag.hot { background: #ffedd5; color: #c2410c; }
.fm-flag.new { background: #dcfce7; color: #15803d; }
.fm-flag.closed { background: #e2e8f0; color: #475569; }
.fm-flag.hidden { background: #fee2e2; color: #b91c1c; }
.fm-empty { text-align: center; padding: 46px 20px; color: var(--fm-muted); background: var(--fm-card); border-radius: 20px; }
.fm-empty i { font-size: 2.6rem; color: #cbd5e1; margin-bottom: 10px; }
.fm-empty p { margin-bottom: 14px; }
.fm-pages { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 22px; font-size: 0.92rem; }
.fm-pages a { padding: 9px 18px; background: var(--fm-card); border-radius: 30px; text-decoration: none; color: var(--fm-blue); font-weight: 700; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06); }

.fm-side { display: grid; gap: 18px; position: sticky; top: 90px; }
.fm-side-card { background: var(--fm-card); border-radius: 22px; padding: 20px; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05); }
.fm-side-card h3 { font-size: 1rem; font-weight: 800; color: var(--fm-ink); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.fm-side-card h3 i { color: var(--fm-gold); }
.fm-join-card { background: linear-gradient(160deg, #fffbeb, var(--fm-card) 60%); border: 1px solid #fde68a; }
.fm-steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 9px; font-size: 0.86rem; color: #334155; }
.fm-steps li { display: flex; align-items: center; gap: 10px; }
.fm-steps li > span:first-child { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--fm-blue); color: var(--fm-gold); font-weight: 800; font-size: 0.8rem; display: inline-flex; align-items: center; justify-content: center; }
.fm-fans { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.fm-fans li { display: grid; grid-template-columns: 26px 34px 1fr auto; gap: 10px; align-items: center; }
.fm-rank { width: 26px; height: 26px; border-radius: 50%; background: var(--fm-soft); color: var(--fm-muted); font-weight: 800; font-size: 0.78rem; display: inline-flex; align-items: center; justify-content: center; }
.fm-rank.r1 { background: #facc15; color: #713f12; }
.fm-rank.r2 { background: #e2e8f0; color: #334155; }
.fm-rank.r3 { background: #fed7aa; color: #9a3412; }
.fm-fans img { width: 34px; height: 34px; border-radius: 50%; }
.fm-fan-name { font-weight: 700; font-size: 0.9rem; color: var(--fm-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-fan-name i { color: var(--fm-blue); font-size: 0.75rem; }
.fm-fan-n { font-size: 0.8rem; font-weight: 700; color: var(--fm-blue); }
.fm-side-empty { font-size: 0.85rem; color: var(--fm-muted); }
.fm-rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 0.86rem; color: #334155; }
.fm-rules li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.fm-rules i { color: #16a34a; margin-top: 3px; }
.fm-rules .fa-flag { color: #c53030; }

/* ================================================================ chat room */
.fm-room { background: var(--fm-card); border-radius: 26px; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.09); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.fm-room-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; color: #fff; background: radial-gradient(circle at 90% 0%, rgba(250, 204, 21, 0.25), transparent 40%), linear-gradient(135deg, #0a2f6e, #1565c0); }
.fm-back, .fm-share-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.14); color: #fff; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; flex-shrink: 0; cursor: pointer; font-size: 0.95rem; transition: 0.15s; }
.fm-back:hover, .fm-share-btn:hover { background: rgba(255, 255, 255, 0.26); }
.fm-share-btn.done { background: #16a34a; }
.fm-room-title { min-width: 0; flex: 1; }
.fm-room-title h1 { font-size: 1.22rem; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.fm-room-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 0.8rem; opacity: 0.88; margin-top: 3px; }
.fm-room-meta i { margin-right: 3px; }
.fm-here { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; background: rgba(255, 255, 255, 0.14); font-size: 0.8rem; white-space: nowrap; }
.fm-here i { font-size: 0.5rem; color: #4ade80; animation: fm-pulse 1.6s infinite; }
@keyframes fm-pulse { 50% { opacity: 0.3; } }
.fm-mod-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 20px; background: #fffbeb; border-bottom: 1px solid #fde68a; font-size: 0.85rem; color: #92400e; }
.fm-mod-bar button { border: 1px solid #fcd34d; background: #fff; color: #92400e; border-radius: 20px; padding: 5px 12px; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.fm-mod-bar button.danger { border-color: #fecaca; color: #b91c1c; }
.fm-mod-all { margin-left: auto; color: #92400e; font-weight: 600; font-size: 0.8rem; text-decoration: none; }
.fm-mod-all:hover { text-decoration: underline; }

.fm-messages { height: min(64vh, 660px); min-height: 360px; overflow-y: auto; padding: 18px 22px 10px; display: flex; flex-direction: column; gap: 2px;
    background-color: #f1f5fb; background-image: radial-gradient(rgba(11, 61, 145, 0.06) 1px, transparent 1px); background-size: 20px 20px; }
.fm-older { align-self: center; border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 20px; padding: 6px 14px; font: inherit; font-size: 0.8rem; cursor: pointer; margin-bottom: 8px; }
.fm-day { display: flex; justify-content: center; margin: 14px 0 8px; }
.fm-day span { padding: 4px 14px; border-radius: 20px; background: rgba(255, 255, 255, 0.92); color: #475569; font-size: 0.74rem; font-weight: 700; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); backdrop-filter: blur(4px); }
.fm-msg { display: flex; gap: 10px; align-items: flex-start; max-width: 80%; margin-top: 12px; }
.fm-msg.cont { margin-top: 3px; }
.fm-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.fm-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12); }
.fm-msg.cont .fm-avatar { visibility: hidden; height: 0; }
.fm-msg.mine .fm-avatar { display: none; }
.fm-body { min-width: 0; display: flex; flex-direction: column; }
.fm-msg.mine .fm-body { align-items: flex-end; }
.fm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0 4px 3px; }
.fm-msg.cont .fm-head, .fm-msg.mine .fm-head { display: none; }
.fm-name { font-size: 0.82rem; color: var(--fm-blue); }
.fm-badge { font-size: 0.66rem; font-weight: 700; color: #92400e; background: #fef3c7; border-radius: 10px; padding: 1px 7px; }
.fm-bubble { position: relative; background: #fff; border-radius: 6px 18px 18px 18px; padding: 9px 14px 7px; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); min-width: 0; max-width: 100%; }
.fm-msg.cont .fm-bubble { border-radius: 18px; }
.fm-msg.mine .fm-bubble { background: linear-gradient(135deg, #0b3d91, #1565c0); color: #fff; border-radius: 18px 6px 18px 18px; }
.fm-msg.mine.cont .fm-bubble { border-radius: 18px; }
.fm-msg.staff:not(.mine) .fm-bubble { box-shadow: 0 0 0 1.5px #facc15, 0 1px 3px rgba(15, 23, 42, 0.08); }
.fm-msg.is-hidden { opacity: 0.55; }
.fm-msg.flash .fm-bubble { animation: fm-flash 1.6s 2; }
@keyframes fm-flash { 50% { box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.7); } }
.fm-text { font-size: 0.95rem; line-height: 1.5; overflow-wrap: anywhere; color: inherit; }
.fm-text a { color: #1565c0; }
.fm-msg.mine .fm-text a { color: #fde68a; }
.fm-mention { font-weight: 700; color: var(--fm-blue); background: #e0eaff; border-radius: 6px; padding: 0 4px; }
.fm-mention.me { background: #fde047; color: #713f12; }
.fm-msg.mine .fm-mention { background: rgba(255, 255, 255, 0.2); color: #fff; }
.fm-time { display: block; text-align: right; font-size: 0.68rem; color: #718096; margin-top: 2px; }
.fm-msg.mine .fm-time { color: rgba(255, 255, 255, 0.7); }
.fm-quote { display: block; margin: 2px 0 6px; padding: 6px 10px; border-left: 3px solid var(--fm-gold); border-radius: 8px; background: rgba(11, 61, 145, 0.06); text-decoration: none; color: inherit; font-size: 0.82rem; line-height: 1.4; }
.fm-msg.mine .fm-quote { background: rgba(255, 255, 255, 0.14); }
.fm-quote strong { display: block; font-size: 0.75rem; color: var(--fm-blue); }
.fm-msg.mine .fm-quote strong { color: var(--fm-gold); }
.fm-quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: 0.85; }
.fm-hidden-note { font-size: 0.75rem; color: #b91c1c; margin-bottom: 2px; }
.fm-under { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 3px 4px 0; }
.fm-msg.mine .fm-under { flex-direction: row-reverse; }
.fm-reacts { display: flex; gap: 3px; }
.fm-react { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 14px; border: 1px solid transparent; background: none; color: #718096; font: inherit; font-size: 0.74rem; font-weight: 700; cursor: pointer; transition: 0.15s; }
.fm-react:not(.has) { opacity: 0; width: 26px; padding: 2px 0; justify-content: center; }
.fm-react-n:empty { display: none; }
.fm-msg:hover .fm-react, .fm-react:focus-visible { opacity: 1; }
.fm-react.has { background: #fff; border-color: var(--fm-line); color: #475569; }
.fm-react:hover { color: var(--fm-blue); transform: scale(1.1); }
.fm-react.on { background: #eef3fb; border-color: #bfd0ee; color: var(--fm-blue); }
.fm-react.on .fa-fire { color: #ea580c; }
.fm-react.on .fa-thumbs-up { color: var(--fm-blue); }
.fm-react.on .fa-face-laugh-squint { color: #ca8a04; }
.fm-react.on .fa-futbol { color: #15803d; }
.fm-react[disabled] { opacity: 0.5; }
.fm-tools { display: flex; gap: 10px; opacity: 0; transition: opacity 0.15s; }
.fm-msg:hover .fm-tools, .fm-tools:focus-within { opacity: 1; }
.fm-tool { background: none; border: none; padding: 0; font: inherit; font-size: 0.72rem; color: #718096; cursor: pointer; margin: 0 !important; }
.fm-tool:hover { color: var(--fm-blue); }
.fm-tool.report-link:hover { color: #c53030; }
.fm-jump { position: absolute; left: 50%; transform: translateX(-50%); bottom: 110px; border: none; background: var(--fm-gold); color: var(--fm-ink); font: inherit; font-weight: 800; font-size: 0.82rem; padding: 9px 18px; border-radius: 30px; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2); cursor: pointer; z-index: 2; }
.fm-jump[hidden] { display: none; }

/* room on the right for the round + and back-to-top buttons that float over the page corner */
.fm-compose { padding: 12px 84px 14px 20px; border-top: 1px solid var(--fm-line); background: var(--fm-card); }
.fm-replying { display: flex; align-items: center; gap: 10px; margin: 0 0 8px 46px; padding: 8px 12px; border-left: 3px solid var(--fm-gold); border-radius: 10px; background: #f8fafc; font-size: 0.82rem; color: #475569; }
.fm-replying[hidden] { display: none; }
.fm-replying > i { color: var(--fm-blue); }
.fm-replying div { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.fm-replying strong { color: var(--fm-blue); font-size: 0.78rem; }
.fm-replying div > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-replying button { border: none; background: none; color: #718096; cursor: pointer; font-size: 1rem; }
.fm-compose form { display: flex; gap: 10px; align-items: flex-end; }
.fm-me { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; margin-bottom: 5px; }
.fm-input { flex: 1; position: relative; display: flex; }
.fm-compose textarea { flex: 1; resize: none; overflow-y: hidden; min-height: 46px; max-height: 160px; padding: 12px 18px; border: 1px solid var(--fm-line); border-radius: 24px; font: inherit; font-size: 0.95rem; line-height: 1.4; background: var(--fm-soft); color: var(--fm-ink); }
.fm-compose textarea:focus { outline: none; border-color: var(--fm-blue); background: var(--fm-card); box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.08); }
.fm-count { position: absolute; right: 14px; bottom: -16px; font-size: 0.7rem; color: #718096; }
.fm-count.low { color: #dc2626; font-weight: 700; }
.fm-send-btn { width: 46px; height: 46px; border-radius: 50%; border: none; background: linear-gradient(135deg, #0b3d91, #1565c0); color: #fff; font-size: 1.02rem; cursor: pointer; flex-shrink: 0; box-shadow: 0 6px 14px rgba(11, 61, 145, 0.3); transition: transform 0.15s; }
.fm-send-btn:hover { transform: scale(1.06); }
.fm-send-btn[disabled] { opacity: 0.6; cursor: wait; }
.fm-compose-as { font-size: 0.74rem; color: #718096; margin: 8px 0 0 46px; }
.fm-closed-note { text-align: center; color: var(--fm-muted); font-size: 0.9rem; padding: 6px; }

/* ================================================================ smaller screens */
@media (max-width: 1080px) {
    .fm-layout { grid-template-columns: minmax(0, 1fr); }
    .fm-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 768px) {
    .fm-hero2 { padding: 28px 22px 24px; border-radius: 22px; }
    .fm-hero2 h1 { font-size: 2.3rem; }
    .fm-hero-stats { width: 100%; grid-template-columns: repeat(3, 1fr); }
    .fm-hero-stats div { min-width: 0; padding: 10px 6px; }
    .fm-search { max-width: none; }
    .fm-room-head { flex-wrap: wrap; }
    .fm-room-title { flex: 1 1 calc(100% - 60px); }
    .fm-here { order: 3; margin-left: 54px; }
    .fm-share-btn { order: 4; width: 34px; height: 34px; margin-left: auto; }
}
@media (max-width: 580px) {
    .fm-hero2 h1 { font-size: 2rem; }
    .fm-hero2 p { font-size: 0.95rem; }
    .fm-hero-stats strong { font-size: 1.25rem; }
    .fm-card { grid-template-columns: 40px 1fr; padding: 14px 14px; gap: 12px; }
    .fm-card-avatar { width: 40px; height: 40px; border-radius: 12px; }
    .fm-card-go { display: none; }
    .fm-when { margin-left: 0; }
    .fm-room { border-radius: 18px; margin: 0 -4px; }
    .fm-room-head { padding: 12px 14px; gap: 10px; }
    .fm-room-title h1 { font-size: 1.02rem; }
    .fm-messages { height: 62vh; padding: 12px 10px 8px; }
    .fm-msg { max-width: 92%; }
    .fm-avatar { width: 30px; height: 30px; }
    .fm-compose { padding: 10px 70px 12px 12px; }
    .fm-me { display: none; }
    .fm-replying, .fm-compose-as { margin-left: 0; }
    .fm-compose-as span:last-child { display: none; }
    .fm-mod-bar { padding: 8px 12px; }
    .fm-mod-all { margin-left: 0; }
    .fm-side { grid-template-columns: 1fr; }
}

/* touch screens: no hover, so empty reaction buttons show after tapping a message */
@media (hover: none) {
    .fm-tools { opacity: 1; }
    .fm-react:not(.has) { display: none; }
    .fm-msg.open .fm-react:not(.has) { display: inline-flex; opacity: 1; }
}
