/* Pokeverse forum (forum.html + forum.js). Uses the colours and chunky borders of style.css. */
.fm-band { background: var(--mint); border-bottom: 3px solid var(--pine); }
.fm-band .wrap { padding-top: 26px; padding-bottom: 22px; }
.fm-crumbs { margin-bottom: 8px; flex-wrap: wrap; }
.fm-title { font: 700 40px/1.1 var(--pixel); color: var(--pine); margin: 0 0 6px; overflow-wrap: anywhere; }
.fm-sub { margin: 0; color: var(--soft); max-width: 70ch; }
.fm-main { padding-top: 28px; padding-bottom: 64px; }
.fm-loading { color: var(--soft); }

.fm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.fm-box { background: var(--paper); border: 3px solid var(--pine); border-radius: 6px; box-shadow: 5px 5px 0 var(--pine); margin-bottom: 26px; overflow: hidden; }
.fm-box-head { background: var(--pine); color: #fff; padding: 12px 18px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.fm-box-head h2 { font: 700 21px/1.2 var(--pixel); color: #fff; margin: 0; }
.fm-box-head p { margin: 0; color: #a9cbbb; font-size: 15px; }
.fm-box-head .fm-head-act { margin-left: auto; }

/* board rows (index) */
.fm-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 120px 240px; gap: 16px; align-items: center; padding: 14px 18px; border-top: 2px solid #d7eadf; }
.fm-row:first-of-type { border-top: 0; }
.fm-icon { width: 48px; height: 48px; border-radius: 6px; background: var(--emerald); border: 3px solid var(--pine); display: grid; place-items: center; }
.fm-icon svg { width: 24px; height: 24px; fill: #fff; }
.fm-icon.staff { background: var(--gold); }
.fm-icon.staff svg { fill: var(--pine); }
.fm-row h3 { font: 700 18px/1.25 var(--pixel); margin: 0 0 2px; }
.fm-row h3 a { color: var(--pine); text-decoration: none; }
.fm-row h3 a:hover { color: var(--emerald); text-decoration: underline; }
.fm-row p { margin: 0; color: var(--soft); font-size: 15px; }
.fm-counts { font-size: 14px; color: var(--soft); line-height: 1.4; }
.fm-counts b { font: 700 16px var(--pixel); color: var(--pine); }
.fm-last { display: flex; gap: 10px; align-items: center; min-width: 0; font-size: 14px; color: var(--soft); }
.fm-last img { width: 36px; height: 36px; border-radius: 4px; background: var(--mint); border: 2px solid #b9dcc8; flex: none; }
.fm-last div { min-width: 0; }
.fm-last a { display: block; color: var(--pine); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.fm-last a:hover { text-decoration: underline; }
.fm-none { color: #8aa79a; font-size: 14px; }

/* latest threads */
.fm-latest li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; border-top: 2px solid #d7eadf; }
.fm-latest li:first-child { border-top: 0; }
.fm-latest ul { list-style: none; margin: 0; padding: 0; }
.fm-latest img { width: 36px; height: 36px; border-radius: 4px; background: var(--mint); border: 2px solid #b9dcc8; }
.fm-latest a { color: var(--pine); font-weight: 700; text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-latest a:hover { text-decoration: underline; }
.fm-latest small { color: var(--soft); font-size: 13px; }
.fm-latest .fm-rep { font: 700 15px var(--pixel); color: var(--emerald); text-align: right; }
.fm-latest .fm-rep span { display: block; font: 400 12px var(--body); color: var(--soft); }

/* sidebar */
.fm-side .fm-box { box-shadow: 4px 4px 0 var(--pine); }
.fm-side-body { padding: 14px 18px 16px; }
.fm-side-body p { margin: 0 0 10px; font-size: 15px; color: var(--soft); }
.fm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fm-stats div { background: var(--mint); border-radius: 4px; padding: 10px 12px; }
.fm-stats b { display: block; font: 700 24px/1 var(--pixel); color: var(--pine); }
.fm-stats span { font-size: 13px; color: var(--soft); }
.fm-side .btn { width: 100%; text-align: center; }
.fm-side ul { margin: 0; padding-left: 18px; font-size: 15px; color: var(--soft); }
.fm-side li { margin-bottom: 4px; }

/* thread list (board) */
.fm-thread { display: grid; grid-template-columns: 40px minmax(0, 1fr) 90px 200px; gap: 14px; align-items: center; padding: 12px 18px; border-top: 2px solid #d7eadf; }
.fm-thread:first-of-type { border-top: 0; }
.fm-thread.pinned { background: #fff8e0; }
.fm-thread > img { width: 40px; height: 40px; border-radius: 4px; background: var(--mint); border: 2px solid #b9dcc8; }
.fm-thread h3 { margin: 0; font: 700 17px/1.3 var(--pixel); }
.fm-thread h3 a { color: var(--pine); text-decoration: none; }
.fm-thread h3 a:hover { text-decoration: underline; color: var(--emerald); }
.fm-thread small { color: var(--soft); font-size: 13px; }
.fm-tag { display: inline-block; font: 700 11px/1 var(--pixel); letter-spacing: .02em; padding: 3px 6px; border-radius: 3px; margin-right: 6px; vertical-align: 2px; }
.fm-tag.pin { background: var(--gold); color: var(--pine); }
.fm-tag.lock { background: #5b6b64; color: #fff; }
.fm-empty { padding: 28px 18px; color: var(--soft); text-align: center; }

/* posts (thread) */
.fm-post { display: grid; grid-template-columns: 170px minmax(0, 1fr); border-top: 3px solid var(--pine); }
.fm-post:first-of-type { border-top: 0; }
.fm-author { background: var(--mint); padding: 18px 14px; text-align: center; border-right: 2px solid #b9dcc8; }
.fm-author img { width: 72px; height: 72px; border-radius: 6px; background: #fff; border: 3px solid var(--pine); }
.fm-author b { display: block; font: 700 16px/1.2 var(--pixel); color: var(--pine); margin-top: 8px; overflow-wrap: anywhere; }
.fm-rank { display: inline-block; margin-top: 6px; font: 700 11px/1 var(--pixel); padding: 4px 7px; border-radius: 3px; background: #cfe3d8; color: var(--pine); }
.fm-rank.dev { background: #7b3fc4; color: #fff; }
.fm-rank.staff { background: var(--emerald); color: #fff; }
.fm-rank.monthly { background: var(--gold); color: var(--pine); }
.fm-body { padding: 14px 20px 16px; min-width: 0; display: flex; flex-direction: column; }
.fm-meta { display: flex; gap: 12px; align-items: center; color: var(--soft); font-size: 14px; border-bottom: 2px dotted #b9dcc8; padding-bottom: 8px; margin-bottom: 12px; }
.fm-meta .fm-num { margin-left: auto; color: #8aa79a; }
.fm-text { overflow-wrap: anywhere; white-space: pre-wrap; flex: 1; }
.fm-text a { word-break: break-all; }
.fm-edited { font-size: 13px; color: #8aa79a; margin-top: 10px; }
.fm-post-acts { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
.fm-link { background: none; border: 0; color: var(--emerald-dark); font: 700 14px var(--body); cursor: pointer; padding: 4px 6px; border-radius: 3px; }
.fm-link:hover { background: var(--mint); }
.fm-link.danger { color: var(--error); }

.fm-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.fm-tools .btn { padding: 9px 14px; font-size: 16px; }
.fm-pages { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.fm-pages a, .fm-pages span { min-width: 36px; text-align: center; padding: 6px 8px; border: 2px solid var(--pine); border-radius: 4px; font: 700 15px var(--pixel); color: var(--pine); text-decoration: none; }
.fm-pages span { background: var(--pine); color: #fff; }
.fm-pages a:hover { background: var(--mint); }

/* writing */
.fm-form { padding: 18px; display: grid; gap: 12px; }
.fm-form label { font: 700 15px var(--pixel); color: var(--pine); }
.fm-form input, .fm-form textarea, .fm-form select { width: 100%; font: 17px/1.5 var(--body); color: var(--ink); border: 3px solid var(--pine); border-radius: 4px; padding: 10px 12px; background: #fff; }
.fm-form textarea { min-height: 170px; resize: vertical; }
.fm-form .fm-hint { font-size: 14px; color: var(--soft); margin: -6px 0 0; }
.fm-form .row-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fm-msg { margin: 0; font-size: 15px; color: var(--error); }
.fm-gate { padding: 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.fm-gate p { margin: 0; flex: 1; min-width: 200px; color: var(--soft); }

@media (max-width: 960px) {
  .fm-layout { grid-template-columns: 1fr; }
  .fm-row { grid-template-columns: 44px minmax(0, 1fr); }
  .fm-row .fm-counts, .fm-row .fm-last { grid-column: 2; }
  .fm-thread { grid-template-columns: 40px minmax(0, 1fr); }
  .fm-thread .fm-counts, .fm-thread .fm-last { grid-column: 2; }
  .fm-title { font-size: 32px; }
}
@media (max-width: 600px) {
  .fm-post { grid-template-columns: 1fr; }
  .fm-author { display: flex; gap: 12px; align-items: center; text-align: left; border-right: 0; border-bottom: 2px solid #b9dcc8; padding: 12px 14px; }
  .fm-author img { width: 44px; height: 44px; }
  .fm-author b { margin-top: 0; }
  .fm-pages { margin-left: 0; }
}

.fm-main time, .fm-band time { font: inherit; color: inherit; }

/* staff rank colours (game name colours) */
.fm-rank.admin { background: #d83838; color: #fff; }
.fm-rank.dev { background: #d83838; color: #fff; }
.fm-rank.gmod { background: #3aa6e8; color: #fff; }
.fm-rank.mod, .fm-rank.staff { background: var(--emerald); color: #fff; }
.fm-rank.mapper { background: #f08a20; color: #fff; }
.fm-key { list-style: none; padding: 0 !important; margin: 0 0 10px !important; }
.fm-key li { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fm-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--pine); flex: none; }
.fm-dot.admin { background: #d83838; } .fm-dot.gmod { background: #3aa6e8; } .fm-dot.mod { background: var(--emerald); }
.fm-dot.mapper { background: #f08a20; } .fm-dot.monthly { background: var(--gold); }
.fm-pm-btn { margin-top: 10px; }
.fm-msg-link { display: inline-block; margin-top: 6px; }
.fm-thread.fm-unread { background: #eef8f2; }
.fm-thread.fm-unread h3 a { font-weight: 800; }

/* staff online + who's online */
.fm-staff-list { list-style: none; margin: 0; padding: 0; }
.fm-staff { display: flex; gap: 12px; padding: 12px 18px; border-top: 2px solid #d7eadf; }
.fm-staff:first-child { border-top: 0; }
.fm-staff img { width: 44px; height: 44px; border-radius: 4px; background: var(--mint); border: 2px solid #b9dcc8; flex: none; image-rendering: pixelated; }
.fm-staff b { display: block; font: 700 16px/1.2 var(--pixel); }
.fm-staff .fm-role { display: block; font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.fm-staff small { display: block; color: var(--soft); font-size: 13px; }
.fm-staff .fm-link { padding: 2px 0; margin-top: 2px; }
.fm-none-on { padding: 12px 18px; color: var(--soft); font-size: 15px; }
.fm-who { line-height: 1.7; font-size: 15px; }
.fm-name { color: var(--ink); }
.fm-name.monthly { color: #b88a00; font-weight: 700; }
.fm-name.mapper { color: #d9700c; font-weight: 700; }
.fm-name.mod, .fm-name.staff { color: #1f9a4c; font-weight: 700; }
.fm-name.gmod { color: #1e8fd6; font-weight: 700; }
.fm-name.admin, .fm-name.dev { color: #d02c2c; font-weight: 700; }
