/* Find Musos boards: a modern take on the classic forum index */
.mb-section { padding-top: 1.5rem; }

/* Toolbar */
.mb-bar { display: flex; align-items: center; justify-content: flex-end; gap: .5rem 1rem; margin-bottom: 1.25rem; }
.mb-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; padding: .45rem .6rem; border-radius: 999px; }
.mb-link:hover { background: var(--grey-100); }
.mb-post { display: inline-flex; align-items: center; gap: .4rem; }

/* Groups */
.mb-group { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.75rem; box-shadow: 0 6px 20px rgba(9, 13, 21, .04); }
.mb-group[hidden], .mb-row[hidden] { display: none; }
.mb-group-head { display: grid; grid-template-columns: 1fr 5rem 12rem; align-items: center; gap: 1rem; padding: .9rem 1.25rem; background: var(--grey-100); border-bottom: 1px solid var(--line); border-left: 5px solid var(--voltage); }
.mb-group--available .mb-group-head { border-left-color: var(--electric); }
.mb-group-head h2 { margin: 0; font: 800 1.05rem var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--midnight); grid-column: 1; }
.mb-intro { grid-column: 1; grid-row: 2; color: var(--ink-soft); font-size: .92rem; }
.mb-col { font: 700 .75rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); grid-row: 1 / span 2; text-align: center; }
.mb-col--n { grid-column: 2; }
.mb-col--last { grid-column: 3; text-align: left; }

/* Rows */
.mb-list { list-style: none; margin: 0; padding: 0; }
.mb-row { position: relative; display: grid; grid-template-columns: 3rem 1fr 5rem 12rem; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); transition: background .15s ease; cursor: pointer; }
.mb-row:focus-within { background: var(--grey-50); outline: 2px solid var(--electric); outline-offset: -2px; }
.mb-row:last-child { border-bottom: 0; }
.mb-row:hover { background: var(--grey-50); }
.mb-ico { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--midnight); color: var(--white); }
.mb-group--wanted .mb-ico { background: linear-gradient(135deg, var(--voltage), var(--pulse)); }
.mb-group--available .mb-ico { background: linear-gradient(135deg, var(--pulse), var(--electric)); }
.mb-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.mb-name { font: 700 1.08rem var(--font-display); color: var(--ink); text-decoration: none; }
.mb-name::after { content: ''; position: absolute; inset: 0; }
.mb-row:hover .mb-name { color: var(--electric); }
.mb-blurb { color: var(--ink-soft); font-size: .95rem; }
.mb-n { text-align: center; color: var(--ink-soft); font-weight: 700; }
.mb-last { color: var(--ink-soft); font-size: .9rem; }

.mb-empty { text-align: center; color: var(--ink-soft); padding: 2rem 0; }

@media (max-width: 760px) {
  .mb-bar { flex-wrap: nowrap; justify-content: flex-end; gap: .5rem; }
  .mb-link { padding: .45rem .5rem; }
  .mb-link span { font-size: .9rem; }
  .mb-group-head { grid-template-columns: 1fr; border-left-width: 4px; }
  .mb-intro { grid-row: auto; }
  .mb-col { display: none; }
  .mb-row { grid-template-columns: 2.6rem 1fr; gap: .85rem; padding: .9rem 1rem; }
  .mb-ico { width: 2.6rem; height: 2.6rem; }
  .mb-n { display: none; }
  .mb-last { grid-column: 2; font-size: .82rem; }
}

/* Auth + forms */
.auth-wrap { max-width: 460px; }
.auth-wrap--wide { max-width: 680px; }
.auth-wrap.center { text-align: center; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; margin: 1.25rem 0; }
.auth-form small { color: var(--ink-soft); font-size: .82rem; font-weight: 400; }
.auth-h { margin: 2rem 0 0; font-size: 1.15rem; }
.auth-alt { color: var(--ink-soft); }
.auth-logout { margin-top: 2rem; }
.check { display: flex; align-items: center; gap: .6rem; font-size: .95rem; }
.form-error { margin: 1rem 0 0; padding: .7rem 1rem; border-radius: var(--radius); background: #fef2f2; border: 1px solid #fca5a5; color: #7f1d1d; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Boards, posts, messages */
.crumbs { margin: 0 0 .5rem; color: var(--ink-soft); font-size: .9rem; }
.crumbs a { color: inherit; }
.post-list { list-style: none; margin: 1.25rem 0 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.post-row { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-row.is-unread { background: var(--grey-50); }
.post-title { font: 700 1.08rem var(--font-display); color: var(--ink); text-decoration: none; }
.post-title:hover { color: var(--electric); }
.post-meta { color: var(--ink-soft); font-size: .88rem; }
.post-snip { color: var(--ink); font-size: .95rem; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.05rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; }
.reply-box { margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--grey-50); }
.reply-box h2 { margin-top: 0; font-size: 1.15rem; }
.thread { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.bubble { align-self: flex-start; max-width: 85%; padding: .7rem 1rem; border-radius: var(--radius-lg); background: var(--grey-100); display: flex; flex-direction: column; gap: .15rem; }
.bubble--me { align-self: flex-end; background: var(--midnight); color: var(--white); }
.bubble-who { font-size: .78rem; opacity: .7; }
.bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Listing page: one thread, like the old Melband forum ---------- */
.mp-section { padding-top: 1.5rem; }
.th-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; margin: 0 0 1rem; }
.th-bar-btns { display: flex; gap: .5rem; }
.th-nav { margin: 0 0 1rem; display: flex; gap: 1.25rem; font-weight: 700; font-size: .92rem; }
.th { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; overflow: clip; box-shadow: 0 6px 20px rgba(9, 13, 21, .05); }
.th-head { background: var(--midnight); color: var(--white); padding: 1.1rem 1.25rem; }
.th-head h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 .2rem; }
.th-head p { margin: 0; color: rgba(255, 255, 255, .7); font-size: .9rem; }
.th-posts { list-style: none; margin: 0; padding: 0; }
.th-post { display: grid; grid-template-columns: 250px minmax(0, 1fr); border-top: 1px solid var(--line); }
.th-post:first-child { border-top: 0; }
.th-post:not(:first-child) { background: var(--grey-50); }
.th-author { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; border-right: 1px solid var(--line); font-size: .82rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.th-author strong { font: 700 1rem var(--font-display); color: var(--ink); }
.th-op { color: var(--pulse); font-weight: 700; }
.th-main { display: flex; flex-direction: column; min-width: 0; }
.th-posted { margin: 0; padding: .55rem 1.1rem; border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--ink-soft); }
.th-body { padding: 1rem 1.1rem; flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.th-body blockquote { margin: 0 0 .75rem; padding: .5rem .9rem; border-left: 3px solid var(--electric); background: rgba(67, 97, 255, .07); color: var(--ink-soft); border-radius: 0 8px 8px 0; }
.th-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 1.1rem; border-top: 1px solid var(--line); font-size: .85rem; font-weight: 700; }
.th-foot > a { color: var(--electric); text-decoration: none; }
.th-foot > a:hover { color: var(--pulse); text-decoration: underline; }
.th-btn { display: inline-flex; align-items: center; padding: .3rem .85rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font: 700 .8rem var(--font-body); text-decoration: none; cursor: pointer; }
.th-btn:hover { background: var(--midnight); border-color: var(--midnight); color: var(--white); }
.th-btn--plain { border-color: transparent; background: none; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.th-btn--plain:hover { background: none; border-color: transparent; color: var(--pulse); }
.th-acts { display: flex; align-items: center; gap: .5rem; }
.th-acts form { margin: 0; }
.th-acts a.th-btn { text-decoration: none; }
.th-box { margin-top: 1.25rem; padding: 1.25rem 1.4rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); scroll-margin-top: calc(var(--header-h) + 16px); }
.th-box h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.th-box p { color: var(--ink-soft); }
.mp-form { display: flex; flex-direction: column; gap: .75rem; margin: 0; }
.mp-form .btn { align-self: flex-start; }
.mp-fine { margin: .75rem 0 0; font-size: .82rem; }

@media (max-width: 760px) {
  .th-post { grid-template-columns: 1fr; }
  .th-author { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .2rem .9rem; border-right: 0; border-bottom: 1px solid var(--line); padding: .7rem 1.1rem; }
}

/* Pop-ups (private message, reply) */
.dlg { width: min(520px, calc(100vw - 2rem)); border: 0; border-radius: var(--radius-lg); padding: 0; box-shadow: 0 30px 80px rgba(9, 13, 21, .45); color: var(--ink); }
.dlg::backdrop { background: rgba(9, 13, 21, .6); }
.dlg-form { display: flex; flex-direction: column; gap: .9rem; padding: 1.5rem; margin: 0; }
.dlg-form h2 { margin: 0; font-size: 1.25rem; }
.dlg-sub { margin: -.4rem 0 0; color: var(--ink-soft); font-size: .92rem; }
.dlg-btns { display: flex; justify-content: flex-end; gap: .6rem; }
.dlg-sent { margin: 0; padding: 2.5rem 1.5rem; text-align: center; font: 800 1.6rem var(--font-display); }
.form-error[hidden], .dlg-sent[hidden], .dlg-form[hidden] { display: none; }

/* Member profile */
.member-list { border: 0; border-radius: 0; margin: 0; }
.member-none { margin: 0; padding: 1.25rem; color: var(--ink-soft); }

/* Inline reply in the first post's footer */
.th-foot--op { flex-wrap: wrap; align-items: flex-start; }
.th-foot--op > a { padding-top: .45rem; }
.th-foot--op .th-acts { margin-left: auto; padding-top: .1rem; }
.th-reply { flex: 1 1 280px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem; margin: 0; max-width: 640px; }
.th-reply textarea { flex: 1 1 200px; min-width: 0; min-height: 2.4rem; max-height: 40vh; resize: vertical; padding: .5rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius); font: 500 .95rem/1.4 var(--font-body); color: var(--ink); background: var(--white); transition: box-shadow .15s ease, border-color .15s ease; }
.th-reply textarea:focus { outline: none; border-color: var(--electric); box-shadow: 0 0 0 3px rgba(67, 97, 255, .18); }
.th-reply .btn { align-self: flex-start; }
.th-reply-meta { flex-basis: 100%; margin: 0; font-size: .75rem; font-weight: 600; color: var(--ink-soft); text-align: right; }
.th-reply-meta[hidden] { display: none; }
.th-reply .form-error { flex-basis: 100%; margin: 0; }
.th-reply--login { display: inline-block; flex: none; padding: .45rem 0; font-weight: 700; color: var(--electric); text-decoration: none; }
.th-reply--login:hover { color: var(--pulse); text-decoration: underline; }
@media (max-width: 600px) { .th-foot--op .th-acts { margin-left: 0; } .th-reply { max-width: none; } }
.member-acts { margin: .6rem 0 0; }
.th-acts--author { flex-wrap: wrap; margin-top: .45rem; }
.th-foot { justify-content: flex-end; }
.th-foot--op { justify-content: space-between; }
.th-foot--op > .th-reply { flex: 1 1 auto; }
.th-btn { gap: .4rem; }
.th-ico { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Sticky composer at the bottom of the thread */
.th-compose { position: sticky; bottom: 0; z-index: 5; background: var(--white); border-top: 1px solid var(--line); padding: .7rem 1.1rem; box-shadow: 0 -6px 18px rgba(9, 13, 21, .08); }
.th-compose .th-reply { max-width: none; flex-wrap: nowrap; align-items: flex-end; }
.th-compose .th-reply textarea { flex: 1 1 auto; }
.th-compose .th-reply-meta, .th-compose .th-reply .form-error { position: static; }
.th-compose .th-reply { flex-wrap: wrap; }
.th-compose .th-reply textarea { flex: 1 1 0; }
.th-compose .th-reply .btn { flex: none; align-self: flex-end; height: 2.4rem; }
.th-compose-login { margin: 0; padding: .35rem 0; font-weight: 600; color: var(--ink-soft); }
.th-compose-login a { color: var(--electric); font-weight: 700; }

/* ---- Inbox: notification controls + sections ---- */
.inbox { display: grid; gap: 1.75rem; grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
@media (max-width: 800px) { .inbox { grid-template-columns: 1fr; } }
.notify-card { color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; position: sticky; top: 1rem; }
@media (max-width: 800px) { .notify-card { position: static; } }
.notify-card h2 { font: 700 1.05rem var(--font-display); margin: 0 0 .7rem; }
.notify-card .check { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 .8rem; }
.notify-card .check input { margin-top: .25rem; }
.notify-card .check small { display: block; color: var(--ink-soft); font-size: .82rem; line-height: 1.35; }
.notify-note { color: var(--ink-soft); font-size: .85rem; margin: .8rem 0 0; }
.inbox-h { font: 700 1.2rem var(--font-display); margin: 0 0 .25rem; display: flex; align-items: center; gap: .5rem; }
.inbox-main .inbox-h:not(:first-child) { margin-top: 2.25rem; }
.inbox-main .mb-empty { text-align: left; padding: 1rem 0; }
.auth-form .check { display: flex; gap: .6rem; align-items: flex-start; margin: .6rem 0; }
.auth-form .check small { display: block; color: var(--ink-soft); font-size: .85rem; }

/* ---------- Reporting ---------- */
.bubble-report { align-self: flex-end; font-size: .75rem; color: inherit; opacity: .55; text-decoration: underline; text-underline-offset: 3px; }
.bubble-report:hover { opacity: 1; }
.rep-quote { margin: 1.25rem 0; padding: .9rem 1.1rem; border: 1px solid var(--line); border-left: 4px solid var(--pulse); border-radius: var(--radius); background: var(--grey-50); }
.rep-quote p { margin: .25rem 0; }
.rep-label { font: 700 .75rem var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.rep-text, .rep-ctx { white-space: pre-wrap; overflow-wrap: anywhere; }
.rep-ctx { color: var(--ink-soft); font-size: .95rem; }
.rep-quote--big { background: var(--white); }
.rep-reasons { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.rep-reasons legend { font-weight: 700; margin-bottom: .5rem; padding: 0; }
.btn-danger { background: #b42318; color: var(--white); }
.btn-danger:hover { background: #912018; color: var(--white); }

/* ---------- Admin ---------- */
.adm h1 { margin-bottom: .75rem; }
.adm h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
.adm-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem; }
.adm-nav a, .adm-filter a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem 1rem; border-radius: 999px; background: var(--white); border: 1.5px solid var(--line); color: var(--ink); font-weight: 700; font-size: .9rem; text-decoration: none; }
.adm-nav a.is-on, .adm-filter a.is-on { background: var(--midnight); border-color: var(--midnight); color: var(--white); }
.adm-nav .badge { display: inline-block; min-width: 1.3rem; padding: 0 .4rem; border-radius: 999px; background: var(--voltage); color: var(--white); font-size: .75rem; text-align: center; line-height: 1.3rem; }
.adm-filter { display: flex; gap: .4rem; margin-bottom: 1rem; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.adm-stats div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: flex; flex-direction: column; }
.adm-stats strong { font: 800 1.8rem var(--font-display); color: var(--ink); line-height: 1.1; }
.adm-stats span { color: var(--ink-soft); font-size: .85rem; }
.adm-stats .is-alert { border-color: var(--voltage); }
.adm-stats .is-alert strong { color: var(--voltage); }
.adm-list { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.adm-list li { padding: .65rem 1rem; border-bottom: 1px solid var(--line); }
.adm-list li:last-child { border-bottom: 0; }
.adm-table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.adm-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .92rem; }
.adm-table th { text-align: left; padding: .65rem .9rem; background: var(--grey-100); font: 700 .75rem var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.adm-table td { padding: .65rem .9rem; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
.adm-row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.adm-row-actions form { margin: 0; }
.adm-pill { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--grey-100); color: var(--ink-soft); white-space: nowrap; }
.adm-pill--open { background: #fef2f2; color: #b42318; }
.adm-pill--actioned { background: #ecfdf3; color: #14532d; }
.adm-search { display: flex; gap: .5rem; margin-bottom: 1rem; max-width: 460px; }
.adm-search input { flex: 1; min-width: 0; padding: .6rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius); font: 500 1rem var(--font-body); }
.adm-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.25rem 0; }
.adm-actions form { margin: 0; }
.adm-done { padding: .75rem 1rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.contact-form { max-width: none; }
.contact-as { margin: 0 0 .25rem; color: var(--ink-soft); }
.contact-side { background: var(--grey-50); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.contact-side h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.contact-side ul { margin: 0 0 1rem; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .6rem; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.adm-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; }
.adm-msg { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.adm-msg p { margin: .3rem 0; }
.adm-msg .adm-actions { margin: .6rem 0; }

/* inbox: single column, with a help button beside the first heading */
.inbox--single { display: block; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .25rem; }
.inbox-head .inbox-h { margin: 0; }
.help-menu { position: relative; flex: none; }
.help-btn { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.help-btn::-webkit-details-marker { display: none; }
.help-btn:hover, .help-menu[open] .help-btn { border-color: var(--ink); background: var(--bg-soft, #f4f6fa); }
.help-btn:focus-visible { outline: 2px solid var(--electric, #4361FF); outline-offset: 2px; }
.help-pop { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 20; width: min(320px, calc(100vw - 2rem)); background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; box-shadow: 0 12px 32px rgba(9,13,21,.16); }
.help-pop h3 { font: 700 1.05rem var(--font-display); margin: 0 0 .4rem; }
.help-pop p { color: var(--ink-soft); font-size: .9rem; margin: 0 0 .85rem; }
