/* MAASF classic forum theme. Logo olive + night-vision green, table layouts, mobile friendly. */
:root {
  --bg: #e6e2d3;
  --page: #fbfaf5;
  --ink: #23251d;
  --muted: #6b6c5d;
  --line: #c9c3ad;
  --line-soft: #e2ddca;
  --row: #f6f4ec;
  --row-alt: #eeebdf;
  --row-hover: #e7e9d6;
  --head-1: #0f2a13;
  --head-2: #06130a;
  --head-ink: #f3ecd2;
  --cat-1: #5c614a;
  --cat-2: #2e311e;
  --thead: #d8d2bb;
  --link: #3b5b12;
  --link-hover: #1f8a30;
  --accent: #2f9a3f;
  --accent-ink: #ffffff;
  --accent-soft: #d8eed6;
  --ok: #2f7a32;
  --ok-soft: #e1f0da;
  --warn-soft: #fff4cc;
  --err: #a32121;
  --err-soft: #f8dede;
  --info-soft: #e3ebf3;
  --quote: #efeddf;
  --code: #f1f0ea;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(0,0,0,.12);
  --font: Verdana, Tahoma, "Segoe UI", Geneva, sans-serif;
  --mono: Consolas, "Courier New", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15170f; --page: #1e2117; --ink: #e5e2d2; --muted: #a3a38f; --line: #3d422c; --line-soft: #2e3222;
    --row: #23271a; --row-alt: #1f2317; --row-hover: #2c3120; --head-1: #0d2310; --head-2: #050f07; --head-ink: #f0e8cc;
    --cat-1: #4d523d; --cat-2: #2a2d1b; --thead: #2b301e; --link: #b9cf7b; --link-hover: #6fdc7e; --accent: #36a448;
    --accent-soft: #173a1d; --ok-soft: #1f3a1f; --warn-soft: #3d3516; --err-soft: #4a1d1d; --info-soft: #1d2a38;
    --quote: #262a1c; --code: #191b13; --shadow: 0 1px 2px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.5 var(--font); }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1 { font-size: 18px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0 0 6px; }
h3 { font-size: 13px; margin: 0 0 4px; }
p { margin: 0 0 10px; }
code { font-family: var(--mono); background: var(--code); padding: 0 3px; border-radius: 2px; }
.small { font-size: 11px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--page); padding: 6px 10px; z-index: 10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 12px 24px; }

/* ---- Header ---- */
.masthead {
  position: relative; margin-top: 12px; padding: 0; text-align: center; color: var(--head-ink);
  background: #000; border: 1px solid #000; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
}
.banner { display: block; line-height: 0; }
.banner img { display: block; width: 100%; height: auto; }
.userbar { position: absolute; top: 10px; right: 12px; z-index: 2; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; font-size: 12px;
  padding: 3px 10px; background: rgba(0,0,0,.45); border-radius: 3px; }
.userbar a, .userbar .linkbtn { color: var(--head-ink); }
.userbar .user-link { color: #fff; font-weight: bold; }
.userbar .has-unread { font-weight: bold; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10px; text-align: center; line-height: 16px; }

.navbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: linear-gradient(180deg, #3b3f2a, var(--cat-2)); border: 1px solid #000; border-top: 2px solid #278d34; padding: 0 8px; }
.navbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.navbar li a { display: block; padding: 8px 11px; color: var(--head-ink); font-weight: bold; font-size: 12px; }
.navbar li a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.navbar li a.active { background: var(--page); color: var(--ink); }
.nav-search input { width: 190px; padding: 4px 8px; border: 1px solid #000; border-radius: 3px; font: inherit; background: #f5f2e3; color: #222; }
.nav-toggle { display: none; }

.crumbs { margin: 10px 0 0; padding: 6px 10px; background: var(--page); border: 1px solid var(--line); font-size: 12px; }
.crumbs .sep { color: var(--muted); margin: 0 4px; }
.announcement { margin: 10px 0 0; padding: 10px 12px; background: var(--warn-soft); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
main { margin-top: 12px; }

/* ---- Flash ---- */
.flash { padding: 9px 12px; margin: 10px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--info-soft); }
.flash ul { margin: 0; padding-left: 18px; }
.flash-success { background: var(--ok-soft); border-color: #9fc79a; }
.flash-error { background: var(--err-soft); border-color: #dda; border-color: #d9a3a3; }
.flash-info { background: var(--info-soft); }
main > .flash:first-child { margin-top: 0; margin-bottom: 10px; }
.notice { padding: 8px 12px; background: var(--warn-soft); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 10px; }

/* ---- Panels ---- */
.panel, .cat { background: var(--page); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow); overflow: hidden; }
.panel.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.panel.narrow-left { max-width: 620px; }
.panel-head, .cat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin: 0; padding: 7px 12px; color: var(--head-ink); background: linear-gradient(180deg, var(--cat-1), var(--cat-2)); font-size: 13px;
}
.panel-head h1, .panel-head h2 { margin: 0; font-size: 14px; color: var(--head-ink); }
.panel-head a { color: var(--head-ink); }
.panel-head .muted { color: var(--head-ink); opacity: .75; }
.panel-body { padding: 12px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.page-head h1 { font-size: 20px; }
.page-head p { margin: 0; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar.right { justify-content: flex-end; }

/* ---- Buttons & forms ---- */
.btn {
  display: inline-block; padding: 6px 14px; border: 1px solid #1c6a28; border-radius: 3px; cursor: pointer;
  background: linear-gradient(180deg, #3fb04f, var(--accent)); color: var(--accent-ink); font: bold 12px var(--font); text-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.btn:hover { filter: brightness(1.06); color: #fff; text-decoration: none; }
.btn-small { padding: 3px 9px; font-size: 11px; }
.btn-ghost { background: var(--row); color: var(--ink); border-color: var(--line); text-shadow: none; }
.btn-ghost:hover { color: var(--ink); background: var(--row-hover); }
.btn-danger { background: linear-gradient(180deg, #c33, #a32121); border-color: #7d1818; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font: inherit; }
.linkbtn:hover { color: var(--link-hover); text-decoration: underline; }
.linkbtn.danger { color: var(--err); }
form.inline { display: inline; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.form .field { margin-bottom: 12px; display: flex; flex-direction: column; gap: 3px; }
.field label, .field legend { font-weight: bold; font-size: 12px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 160px; }
.field-row .field.grow, .grow { flex: 3 1 240px; }
fieldset { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 12px; }
legend { font-weight: bold; padding: 0 4px; }
input, select, textarea {
  font: 13px var(--font); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 6px 8px; max-width: 100%;
}
@media (prefers-color-scheme: dark) { input, select, textarea { background: #15170f; } .nav-search input { background: #2a2f1d; color: var(--ink); } }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }
textarea { width: 100%; resize: vertical; line-height: 1.5; }
textarea.mono { font-family: var(--mono); font-size: 12px; }
input.num { width: 80px; }
.hint { font-size: 11px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-weight: normal; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.rules { background: var(--row); border: 1px solid var(--line-soft); padding: 8px 12px; margin: 6px 0 10px; border-radius: var(--radius); }
.rules h2 { font-size: 13px; }
.rules ol { margin: 0; padding-left: 18px; font-size: 12px; }
.checks { list-style: none; padding: 0; margin: 0 0 12px; }
.checks .ok { color: var(--ok); } .checks .bad { color: var(--err); }

/* ---- Board tables ---- */
.board { width: 100%; border-collapse: collapse; background: var(--page); border: 1px solid var(--line); }
.cat .board { border: 0; }
.board th { background: var(--thead); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; padding: 5px 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
.board td { padding: 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; background: var(--row); }
.board tbody tr:nth-child(even) td { background: var(--row-alt); }
.board tbody tr:hover td { background: var(--row-hover); }
.board .col-icon { width: 38px; text-align: center; }
.board .col-num { width: 78px; text-align: center; }
.board .col-last { width: 200px; }
.board .col-date { width: 130px; }
.board .col-forum { width: 160px; }
.board .col-thumb { width: 70px; padding: 4px; }
.board .col-thumb img { width: 60px; height: 60px; object-fit: cover; border-radius: 3px; display: block; }
.board td.empty { text-align: center; color: var(--muted); padding: 24px; }
.board tr.sticky td { background: var(--warn-soft) !important; }
.board tr.unapproved td { opacity: .75; }
.board tr.sold .thread-title { text-decoration: line-through; color: var(--muted); }
.forum-name { font-size: 14px; font-weight: bold; }
.forum-desc { color: var(--muted); font-size: 12px; }
.thread-title { font-weight: normal; font-size: 13px; }
.thread-title.unread { font-weight: bold; }
.last-title { font-size: 12px; }
.price { font-weight: bold; color: var(--ok); white-space: nowrap; }
.mobile-stats, .mobile-only { display: none; }
.member-cell { display: flex; align-items: center; gap: 8px; }

.status-icon { display: inline-block; width: 22px; height: 18px; border-radius: 3px; border: 2px solid var(--line); background: var(--row-alt); position: relative; vertical-align: middle; }
.status-icon::after { content: ""; position: absolute; left: 3px; right: 3px; top: 3px; height: 2px; background: var(--line); box-shadow: 0 4px 0 var(--line); }
.status-icon.is-new { border-color: #1c6a28; background: var(--accent); }
.status-icon.is-new::after { background: #fff; box-shadow: 0 4px 0 #fff; }
.status-icon.is-hot { border-style: double; border-width: 3px; }
.status-icon.is-locked { background: repeating-linear-gradient(45deg, var(--row-alt), var(--row-alt) 3px, var(--line) 3px, var(--line) 5px); }
.status-icon.type-events::before, .status-icon.type-market::before, .status-icon.type-guides::before { position: absolute; right: -6px; bottom: -6px; font: bold 9px/12px var(--font); width: 12px; height: 12px; border-radius: 50%; background: var(--cat-2); color: #fff; text-align: center; }
.status-icon.type-events::before { content: "E"; }
.status-icon.type-market::before { content: "$"; }
.status-icon.type-guides::before { content: "G"; }
.legend { padding: 6px 12px; display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line-soft); }

.tag { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 10px; font-weight: bold; line-height: 17px; text-transform: uppercase; letter-spacing: .3px; background: var(--row-alt); border: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.tag-sticky { background: #f0d36a; border-color: #c8a83c; color: #3b2f00; }
.tag-locked, .tag-sold { background: #777; border-color: #555; color: #fff; }
.tag-pending, .tag-st-pending { background: var(--warn-soft); border-color: #d6c27a; }
.tag-wts { background: #2f7a32; border-color: #225a24; color: #fff; }
.tag-wtb { background: #2c5d8f; border-color: #21466c; color: #fff; }
.tag-wtt { background: #7a4f9a; border-color: #5b3a74; color: #fff; }
.tag-event { background: var(--accent); border-color: #1c6a28; color: #fff; }
.tag-type { font-weight: normal; text-transform: none; }
.tag-new { background: var(--accent); color: #fff; border-color: #1c6a28; }
.tag-st-active { background: var(--ok-soft); border-color: #9fc79a; }
.tag-st-banned { background: var(--err-soft); border-color: #d9a3a3; }

/* ---- Pager / filters / tabs ---- */
.pager { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; margin: 8px 0; font-size: 12px; }
.pager-label { padding: 3px 8px; background: var(--thead); border: 1px solid var(--line); border-radius: 3px; margin-right: 4px; }
.pager a, .pager .current, .pager .gap { padding: 3px 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--page); }
.pager .current { background: var(--cat-1); color: var(--head-ink); border-color: var(--head-2); font-weight: bold; }
.pager .gap { border: 0; background: none; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; font-size: 12px; }
.filters a { padding: 3px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); }
.filters a.on { background: var(--cat-1); color: var(--head-ink); border-color: var(--head-2); }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 2px solid var(--cat-2); margin-bottom: 12px; }
.tabs a { padding: 6px 12px; background: var(--row-alt); border: 1px solid var(--line); border-bottom: 0; border-radius: 3px 3px 0 0; font-weight: bold; font-size: 12px; }
.tabs a.on { background: var(--cat-2); color: var(--head-ink); }

/* ---- Posts ---- */
.post { background: var(--page); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 10px; }
.post:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.post.unapproved { border-style: dashed; }
.post.is-new { border-left: 4px solid var(--accent); }
.post-head { display: flex; justify-content: space-between; padding: 4px 10px; background: var(--thead); font-size: 11px; border-bottom: 1px solid var(--line); color: var(--muted); }
.post-num { font-weight: bold; }
.post-grid { display: grid; grid-template-columns: 170px 1fr; }
.postbit { padding: 12px 10px; background: var(--row-alt); border-right: 1px solid var(--line-soft); text-align: center; font-size: 11px; }
.postbit.compact { padding: 10px 6px; }
.pb-name { font-size: 13px; font-weight: bold; margin-top: 6px; word-break: break-word; }
.pb-rank { color: var(--muted); font-style: italic; }
.pb-role { display: inline-block; margin-top: 3px; padding: 0 6px; border-radius: 3px; font-weight: bold; font-size: 10px; text-transform: uppercase; color: #fff; background: var(--cat-1); }
.pb-role.role-admin, .role-admin.pb-role { background: #7a6200; }
.pb-meta { display: grid; grid-template-columns: auto 1fr; gap: 1px 6px; text-align: left; margin: 10px 0 0; }
.pb-meta dt { color: var(--muted); }
.pb-meta dd { margin: 0; word-break: break-word; }
.post-main { padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; }
.post-body { font-size: 13px; line-height: 1.6; word-wrap: break-word; overflow-wrap: anywhere; }
.guide-article .post-body { font-size: 14px; }
.post-actions { margin-top: auto; padding-top: 10px; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; font-size: 11px; font-weight: bold; }
.signature { margin-top: 14px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--muted); max-height: 140px; overflow: hidden; }
.signature img { max-height: 90px; }
.edited { margin-top: 10px; font-style: italic; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.attachments img { width: 180px; height: 180px; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; background: var(--row-alt); }
.att-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; }
.att-item img { width: 120px; height: 120px; }
.user-link.role-admin { color: #8a6a00; font-weight: bold; }
.user-link.role-mod { color: #2c6a2c; font-weight: bold; }
@media (prefers-color-scheme: dark) { .user-link.role-admin { color: #f0d34a; } .user-link.role-mod { color: #8fd48f; } }
.user-deleted { color: var(--muted); font-style: italic; }

/* BBCode */
.bb-u { text-decoration: underline; }
.bb-center { text-align: center; }
.bb-img { max-height: 700px; border-radius: 2px; }
.bb-attach img { max-height: 600px; border-radius: 3px; border: 1px solid var(--line); }
.bb-quote { margin: 8px 0; padding: 0; border: 1px solid var(--line); border-left: 4px solid var(--cat-1); background: var(--quote); border-radius: 3px; }
.bb-quote-head { padding: 3px 8px; font-size: 11px; font-weight: bold; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.bb-quote-body { padding: 6px 10px; }
.bb-code { margin: 8px 0; padding: 8px 10px; background: var(--code); border: 1px solid var(--line); border-radius: 3px; overflow-x: auto; font: 12px/1.45 var(--mono); white-space: pre-wrap; }
.bb-code code { background: none; padding: 0; }
.bb-list { margin: 6px 0; padding-left: 22px; }
.bb-spoiler { margin: 6px 0; border: 1px dashed var(--line); border-radius: 3px; padding: 4px 8px; background: var(--row-alt); }
.bb-spoiler summary { cursor: pointer; font-weight: bold; font-size: 11px; }
.bb-video { position: relative; max-width: 640px; aspect-ratio: 16 / 9; margin: 8px 0; }
.bb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bb-color-red { color: #c62828; } .bb-color-orange { color: #e8641b; } .bb-color-yellow { color: #c9a400; } .bb-color-green { color: #2e7d32; }
.bb-color-blue { color: #1f5fa8; } .bb-color-purple { color: #7b3fa0; } .bb-color-gray { color: #777; } .bb-color-olive { color: #6b7a2e; } .bb-color-tan { color: #a8885a; }
.bb-size-small { font-size: 11px; } .bb-size-large { font-size: 17px; } .bb-size-huge { font-size: 24px; line-height: 1.25; }
mark { background: #ffe28a; color: inherit; padding: 0 1px; }

/* Editor */
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; padding: 4px; background: var(--thead); border: 1px solid var(--line); border-bottom: 0; border-radius: 3px 3px 0 0; }
.editor-toolbar button { min-width: 30px; padding: 3px 7px; font: 11px var(--font); background: var(--page); color: var(--ink); border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.editor-toolbar button:hover { border-color: var(--accent); }
.editor-toolbar a { margin-left: auto; padding: 0 6px; }
.editor textarea { border-radius: 0 0 3px 3px; }
.editor-files { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; font-size: 12px; }
.editor-files label { font-weight: bold; }
.editor-preview { margin: 8px 0; padding: 10px; border: 1px dashed var(--accent); background: var(--page); border-radius: 3px; }
.quick-reply .editor-preview { background: var(--row); }

/* Info boxes (market/event) */
.infobox { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding: 10px 14px; margin-bottom: 12px; background: var(--page); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.infobox .label { display: block; font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: .4px; }
.status-open { color: var(--ok); font-weight: bold; } .status-pending { color: #b08900; font-weight: bold; } .status-sold { color: var(--muted); font-weight: bold; }
.event-box > div:nth-child(2) { display: flex; flex-wrap: wrap; gap: 8px 24px; flex: 1; }
.event-date { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 50px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--page); flex: none; }
.event-date .m { width: 100%; text-align: center; background: var(--accent); color: #fff; font-size: 10px; font-weight: bold; text-transform: uppercase; line-height: 16px; }
.event-date .d { font: bold 20px/32px Georgia, serif; }
.event-date.big { width: 60px; height: 64px; } .event-date.big .d { font-size: 28px; line-height: 46px; }
.event-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.event-chip { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line-soft); border-radius: 4px; background: var(--row); color: var(--ink); margin-bottom: 6px; }
.event-chip:hover { text-decoration: none; border-color: var(--accent); color: var(--ink); }
.event-info { display: flex; flex-direction: column; min-width: 0; }
.event-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Calendar */
.cal-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.cal-nav h2 { margin: 0; color: var(--head-ink); font-size: 15px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { padding: 4px; text-align: center; font-size: 11px; font-weight: bold; background: var(--thead); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 92px; padding: 3px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--row); overflow: hidden; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.empty { background: var(--row-alt); }
.cal-day.today { background: var(--accent-soft); }
.cal-num { display: block; font-size: 11px; font-weight: bold; color: var(--muted); }
.cal-event { display: block; margin-top: 2px; padding: 1px 4px; font-size: 10px; line-height: 1.35; background: var(--cat-1); color: var(--head-ink); border-radius: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event:hover { color: #fff; background: var(--accent); text-decoration: none; }

/* Market */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.listing-card { display: flex; flex-direction: column; background: var(--page); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow); }
.listing-card:hover { text-decoration: none; border-color: var(--accent); color: var(--ink); }
.listing-card.sold { opacity: .6; }
.listing-img { aspect-ratio: 4 / 3; background: var(--row-alt); display: flex; align-items: center; justify-content: center; }
.listing-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { color: var(--muted); font-size: 11px; }
.listing-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.form-filters input { width: 200px; }

/* Gallery */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.album-grid.small-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.album-card { display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.album-card img, .album-empty { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; box-shadow: 3px 3px 0 var(--line-soft); background: var(--row-alt); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.album-card:hover { text-decoration: none; color: var(--link-hover); }
.album-title { font-weight: bold; margin-top: 4px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; display: block; background: var(--row-alt); }
.photo-grid a:hover img { outline: 2px solid var(--accent); }
.photo-nav { font-weight: bold; }
.photo-full { max-height: 80vh; width: auto; border-radius: 3px; }
.caption { font-size: 14px; margin-top: 8px; }
.upload-box .panel-body { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Profile */
.profile { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; }
.profile-card h1 { margin-top: 8px; font-size: 20px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; padding: 10px 14px; border-top: 1px solid var(--line-soft); font-size: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; word-break: break-word; }
.plain-list { list-style: none; margin: 0; }
.plain-list li { padding: 4px 0; border-bottom: 1px dotted var(--line-soft); }
.plain-list li:last-child { border: 0; }
.review-item { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.review-item:last-child { border: 0; }
.review .panel.review-item { padding: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dot.on { background: #3fae3f; }
.avatar-field .row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* Avatars */
.avatar { display: inline-block; border-radius: 4px; object-fit: cover; border: 1px solid var(--line); vertical-align: middle; background: var(--row-alt); }
.avatar-sm { width: 28px; height: 28px; }
.avatar-md { width: 56px; height: 56px; }
.avatar-lg { width: 96px; height: 96px; }
.avatar-xl { width: 128px; height: 128px; }
.avatar-letter { display: inline-flex; align-items: center; justify-content: center; color: #fff; font: bold 16px Georgia, serif; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.avatar-sm.avatar-letter { font-size: 13px; } .avatar-lg.avatar-letter { font-size: 40px; } .avatar-xl.avatar-letter { font-size: 54px; }
.hue-0 { background: #8c3b2a; } .hue-30 { background: #95602a; } .hue-60 { background: #7f7a28; } .hue-90 { background: #5c7a2a; }
.hue-120 { background: #3b7a35; } .hue-150 { background: #2f7a5c; } .hue-180 { background: #2a7076; } .hue-210 { background: #2d5f86; }
.hue-240 { background: #3d4f8c; } .hue-270 { background: #5e468c; } .hue-300 { background: #7d3f7f; } .hue-330 { background: #8c3a5a; }

/* Home stats */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.stats-grid > div { padding: 10px 12px; }
.stats-grid > div + div { border-left: 1px solid var(--line-soft); }
.online-list { font-size: 12px; margin: 0; }

/* Admin */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--page); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; }
.tile-n { font: bold 22px Georgia, serif; }
.tile-l { font-size: 11px; color: var(--muted); }
.admin-forum { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.admin-forum:last-child { border: 0; }
.admin-forum .field { margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }
.admin-cat .panel-head input { background: #fff; }
.mod-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.kb-list { margin: 0; padding-left: 18px; }
.kb-list li { padding: 3px 0; }
.results-head { margin: 10px 0 0; }

/* Footer */
.footer { margin-top: 20px; padding: 12px; text-align: center; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; box-shadow: 0 4px 30px rgba(0,0,0,.6); }
.lightbox-close { position: absolute; top: 10px; right: 16px; font-size: 32px; color: #fff; background: none; border: 0; cursor: pointer; }

/* ---- Mobile ---- */
@media (max-width: 760px) {
  body { font-size: 14px; }
  .wrap { padding: 0 8px 20px; }
  .masthead { margin: 0 -8px; border-radius: 0; padding: 0; display: flex; flex-direction: column; }
  .userbar { position: static; order: -1; justify-content: center; border-radius: 0; gap: 14px; padding: 6px 8px; font-size: 13px; }
  .navbar { margin: 0 -8px; }
  .banner img { height: 150px; object-fit: cover; object-position: 50% 45%; }
  .navbar { flex-wrap: wrap; padding: 4px 8px; }
  .nav-toggle { display: block; background: none; border: 1px solid rgba(255,255,255,.3); color: var(--head-ink); padding: 5px 10px; border-radius: 3px; font: bold 13px var(--font); }
  .navbar ul { display: none; width: 100%; order: 3; flex-direction: column; }
  .navbar ul.open { display: flex; }
  .navbar li a { padding: 10px 6px; border-top: 1px solid rgba(255,255,255,.08); }
  .nav-search { flex: 1; }
  .nav-search input { width: 100%; }
  .board .col-num, .board .col-last, .board .col-hide, .board .col-forum, .board thead { display: none; }
  .board .col-date { width: auto; font-size: 11px; }
  .board td { padding: 10px 6px; }
  .mobile-stats, .mobile-only { display: block; font-size: 11px; color: var(--muted); }
  .mobile-only { display: inline; }
  .post-grid { grid-template-columns: 1fr; }
  .postbit { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 0 10px; text-align: left; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 8px 10px; align-items: center; }
  .postbit .avatar { grid-row: span 3; width: 44px; height: 44px; font-size: 20px; }
  .postbit .pb-name { margin: 0; }
  .postbit .pb-meta { display: none; }
  .postbit .pb-role { justify-self: start; }
  .post-actions { justify-content: flex-start; font-size: 13px; gap: 16px; }
  .attachments img { width: calc(50vw - 40px); height: calc(50vw - 40px); }
  .profile, .cal-wrap { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid > div + div { border-left: 0; border-top: 1px solid var(--line-soft); }
  .cal-day { min-height: 54px; }
  .cal-event { font-size: 0; height: 6px; padding: 0; margin-top: 3px; background: var(--accent); }
  input, select, textarea { font-size: 16px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}
