/* Longhouse: dark mead-hall by default, parchment in light mode. Matches the Valheim map. */
:root {
  --bg: #f3ead6;
  --bg-2: #ebe0c7;
  --card: #fffaf0;
  --line: rgba(92, 66, 30, 0.16);
  --line-strong: rgba(92, 66, 30, 0.3);
  --text: #2b2117;
  --muted: #7a6a52;
  --gold: #a87a26;
  --gold-strong: #8a5f12;
  --on-gold: #fffaf0;
  --red: #b5452f;
  --hover: rgba(168, 122, 38, 0.1);
  --shadow: 0 1px 2px rgba(60, 40, 10, 0.06), 0 6px 20px rgba(60, 40, 10, 0.06);
  --radius: 14px;
  --serif: ui-serif, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --av-l: 42%;
  --av-s: 38%;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130f;
    --bg-2: #1c1813;
    --card: #211c15;
    --line: rgba(217, 179, 108, 0.14);
    --line-strong: rgba(217, 179, 108, 0.28);
    --text: #f1e6cf;
    --muted: #a99a7e;
    --gold: #d9b36c;
    --gold-strong: #ffd37a;
    --on-gold: #1c1711;
    --red: #e0735f;
    --hover: rgba(217, 179, 108, 0.1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --av-l: 62%;
    --av-s: 35%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); min-height: 100vh; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--gold-strong); }
[hidden] { display: none !important; }
h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 16px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-strong); background: transparent; font-weight: 550;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn.primary:hover { background: var(--gold-strong); border-color: var(--gold-strong); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn.danger { color: var(--red); }
.link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: 13px; }
.link:hover { color: var(--text); text-decoration: underline; }
.link.small { font-size: 12px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 16px; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- avatars ---------- */
.avatar {
  --h: 30;
  flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: hsl(var(--h) var(--av-s) var(--av-l)); color: #fff; font: 600 17px/1 var(--serif);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); user-select: none;
}
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.xs { width: 20px; height: 20px; font-size: 10px; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { border-radius: 8px; flex: none; }
.brand strong { display: block; font: 600 18px/1.1 var(--serif); letter-spacing: 0.02em; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 2px; margin-left: auto; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 550; }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.menu-wrap { position: relative; }
.avatar-btn { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; display: block; }
.avatar-btn .avatar { width: 36px; height: 36px; font-size: 15px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 220px; padding: 6px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow);
}
.menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.menu button:hover { background: var(--hover); }
.menu .danger { color: var(--red); }
.menu-who { margin: 4px 12px 8px; color: var(--muted); font-size: 13px; }

/* ---------- shared bits: photo thumbs, place chips, reactions ---------- */
.spacer { flex: 1; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.busy img { opacity: 0.45; }
.thumb.busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--gold); border-right-color: transparent; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.chip-x {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px; line-height: 24px; padding: 0;
}
.place-row { display: flex; align-items: center; gap: 6px; }
.place-row .chip-x { position: static; background: var(--bg-2); color: var(--muted); }
.place {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text); font-size: 13px; font-weight: 550;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.place:hover { border-color: var(--gold); }
.place svg { width: 15px; height: 15px; flex: none; fill: var(--gold); fill-rule: evenodd; }
.reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.reaction {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.reaction .emoji { font-size: 15px; }
.reaction[aria-pressed="true"] { background: color-mix(in srgb, var(--gold) 18%, transparent); border-color: var(--gold); }
.reaction:hover { background: var(--hover); }
.react-add { position: relative; }
.react-add summary {
  list-style: none; cursor: pointer; height: 30px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center;
  color: var(--muted); border: 1px dashed var(--line-strong); font-size: 13px;
}
.react-add summary::-webkit-details-marker { display: none; }
.react-add summary:hover { color: var(--text); border-color: var(--gold); }
.react-pick {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 10; display: flex; gap: 2px; padding: 5px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow);
}
.react-pick button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; cursor: pointer; font-size: 20px; transition: transform 0.12s; }
.react-pick button:hover { background: var(--hover); transform: scale(1.18); }

/* ---------- tasks (kanban) ---------- */
#tasks-view { padding: 18px 16px 40px; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 14px; max-width: 1200px; margin: 0 auto; align-items: start; }
.column { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.column.drop { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--bg-2)); }
.column-head { display: flex; align-items: baseline; gap: 8px; padding: 2px 4px 4px; }
.column-head h2 { margin: 0; font-size: 17px; }
.column-head small { color: var(--muted); font-variant-numeric: tabular-nums; }
.column-head .dot { width: 9px; height: 9px; border-radius: 50%; align-self: center; }
.column[data-status="todo"] .dot { background: var(--muted); }
.column[data-status="doing"] .dot { background: var(--gold); }
.column[data-status="done"] .dot { background: #6f9a4a; }
.cards { display: flex; flex-direction: column; gap: 8px; min-height: 8px; }
.task {
  background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; box-shadow: var(--shadow);
  cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  display: flex; flex-direction: column; gap: 7px; text-align: left; width: 100%; font: inherit; color: inherit;
}
.task:hover { border-color: var(--line-strong); }
.task:focus-visible { outline: 2px solid var(--gold); }
.task .title { font-weight: 600; overflow-wrap: anywhere; }
.column[data-status="done"] .task .title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.task-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 0; }
.task-foot:empty { display: none; }
.task-foot .place { font-size: 12px; padding: 1px 8px 1px 5px; }
.task-foot .notes-mark { color: var(--muted); font-size: 12px; }
.task-foot .people { display: flex; margin-left: auto; }
.task-foot .people .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--card); }
.task.ghost { position: fixed; z-index: 70; pointer-events: none; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); transform: rotate(2deg); opacity: 0.95; }
.task.placeholder { opacity: 0.35; border-style: dashed; box-shadow: none; }
.task.lifting { transform: scale(1.02); transition: transform 0.15s; }
.add-task { display: flex; gap: 6px; }
.add-task input { flex: 1; min-width: 0; height: 36px; border-radius: 9px; border: 1px dashed var(--line-strong); background: transparent; padding: 0 10px; outline: none; }
.add-task input:focus { border-style: solid; border-color: var(--gold); background: var(--card); }
.more-done { align-self: center; }
body.dragging, body.dragging * { cursor: grabbing !important; }

.task-form { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field textarea { border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); padding: 8px 12px; outline: none; resize: vertical; }
.field input { height: 40px; }
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); align-self: flex-start; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 550; }
.seg button[aria-checked="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.who-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.who-pick button { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 4px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; cursor: pointer; font-size: 14px; font-weight: 550; }
.who-pick button[aria-pressed="true"] { background: color-mix(in srgb, var(--gold) 18%, transparent); border-color: var(--gold); }
.place-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.place-line .none { color: var(--muted); font-size: 14px; }
.task-actions { display: flex; gap: 8px; align-items: center; padding-top: 4px; }

@media (max-width: 760px) {
  #tasks-view { padding: 12px 0 30px; }
  .kanban { grid-template-columns: repeat(3, 84vw); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px; scroll-padding: 0 16px; gap: 10px; scrollbar-width: none; }
  .kanban::-webkit-scrollbar { display: none; }
  .column { scroll-snap-align: start; }
}

/* ---------- map ---------- */
#map-view { position: fixed; inset: 0; top: var(--bar-h, 61px); }
#map-frame { width: 100%; height: 100%; border: 0; display: block; background: #16130f; }
.map-post { min-height: 36px; padding: 0 14px; font-size: 14px; }
.map-post .short { display: none; }

/* ---------- dialogs ---------- */
dialog.sheet {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line-strong);
  border-radius: 16px; background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
dialog.sheet.small { width: min(420px, calc(100vw - 32px)); }
.hint.error { color: var(--red); margin: 8px 0 0; }
.hint.error:empty { display: none; }
dialog.sheet.wide { width: min(980px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(10, 8, 5, 0.55); backdrop-filter: blur(2px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); margin: 0; }
.sheet-head h2 { margin: 0; font-size: 19px; }
.sheet-body { padding: 4px 20px 20px; overflow: auto; }
.sheet-body h3 { font-size: 16px; margin: 18px 0 4px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 200px; min-width: 0; height: 38px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); padding: 0 12px; outline: none; }
.inline-form input:focus { border-color: var(--gold); }
.link-box { margin-top: 12px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 12%, transparent); border: 1px solid var(--gold); }
.link-box p { margin: 0 0 8px; font-size: 13.5px; }
.link-box input { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.people li.revoked { opacity: 0.55; }
.people .who small { color: var(--muted); font-size: 12.5px; }

.picker { position: relative; height: min(62dvh, 560px); background: #16130f; }
.picker iframe { width: 100%; height: 100%; border: 0; display: block; }
.picker-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px 16px; }
.picker-foot .hint { flex: 1 1 100%; margin: 0; }
.picker-foot input { flex: 1 1 220px; min-width: 0; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); padding: 0 12px; outline: none; }
.picker-foot input:focus { border-color: var(--gold); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(8, 6, 4, 0.94); display: grid; place-items: center; }
.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.lb-btn { position: absolute; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 26px; line-height: 1; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-close { top: max(14px, env(safe-area-inset-top)); right: 14px; font-size: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: #ddd; font-size: 14px; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); font-weight: 550;
}

/* ---------- locked page ---------- */
.locked { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; text-align: center; }
.locked img { border-radius: 18px; }
.locked h1 { font: 600 30px/1.2 var(--serif); margin: 18px 0 8px; }
.locked p { color: var(--muted); max-width: 360px; margin: 0 auto; }

/* "A new version is out" bar. */
.update-bar {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-weight: 550; max-width: calc(100vw - 32px);
}

/* ---------- narrow screens ---------- */
@media (max-width: 760px) { .map-post { padding: 0 10px; } .map-post .long { display: none; } .map-post .short { display: inline; } }
@media (max-width: 440px) { .brand > span { display: none; } }
@media (max-width: 400px) {
  .bar { gap: 6px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .brand img { width: 28px; height: 28px; }
  .tabs button { padding: 6px 7px; font-size: 14px; }
  .map-post { padding: 0 8px; font-size: 13px; }
  .avatar-btn .avatar { width: 32px; height: 32px; }
}
@media (max-width: 340px) { .brand { display: none; } } /* the Board tab is the way home */
@media (max-width: 520px) {
  .brand small { display: none; }
  .brand strong { font-size: 16px; }
  .tabs button { padding: 6px 9px; }
  .picker { height: 58dvh; }
}

/* ===================================================================================
   The board: a classic vBulletin 3 forum. Scoped to .vb so Tasks and Map keep their look.
   =================================================================================== */
.vb {
  --vb-page: #e1e1e2;
  --vb-text: #000000;
  --vb-alt1: #f5f5ff;
  --vb-alt2: #e1e4f2;
  --vb-panel: #e4e7f5;
  --vb-grid: #d1d1e1;
  --vb-border: #0b198c;
  --vb-link: #22229c;
  --vb-hover: #ff4400;
  --vb-tcat-1: #a9b8d6; --vb-tcat-2: #869bbf; --vb-tcat-3: #6d84b0;
  --vb-thead-1: #7f95bd; --vb-thead-2: #5c7099;
  --vb-control: #738fbf;
  --vb-muted: #555577;
  --vb-quote: #f2f2fa;
  --vb-btn-1: #6683b8; --vb-btn-2: #3d5a92; --vb-btn-border: #2b4374;
  --vb-plain-1: #ffffff; --vb-plain-2: #dcdfec; --vb-plain-border: #8f9cc2;
  --vb-new: #e88b16; --vb-old: #9aa3bd; --vb-admin: #b8160d;
  --vb-font: Verdana, Geneva, "Lucida Grande", Tahoma, Arial, sans-serif;
  background: var(--vb-page);
  color: var(--vb-text);
  font: 13px/1.45 var(--vb-font);
  min-height: calc(100vh - var(--bar-h, 61px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .vb {
    --vb-page: #0e1322; --vb-text: #dfe4f5; --vb-alt1: #161d33; --vb-alt2: #1d2642; --vb-panel: #18203a;
    --vb-grid: #2a3558; --vb-border: #4b63a6; --vb-link: #9fb5ff; --vb-hover: #ff9a5c;
    --vb-tcat-1: #46609a; --vb-tcat-2: #34497a; --vb-tcat-3: #283a63;
    --vb-thead-1: #314473; --vb-thead-2: #24345a; --vb-control: #2f4372; --vb-muted: #a3acc8; --vb-quote: #121a2e;
    --vb-btn-1: #4f6eaa; --vb-btn-2: #31497f; --vb-btn-border: #6b86c4;
    --vb-plain-1: #2a3352; --vb-plain-2: #1f2742; --vb-plain-border: #4b5a85;
    --vb-new: #f2a23a; --vb-old: #66708e; --vb-admin: #ff6b5e;
  }
}
.vb-wrap { max-width: 1120px; margin: 0 auto; padding: 14px 16px 60px; }
.vb a { color: var(--vb-link); text-decoration: none; }
.vb a:hover { color: var(--vb-hover); text-decoration: underline; }
.vb .smallfont { font-size: 11px; }
.vb .spacer { flex: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tables with 1px grid lines between cells, like vB's cellspacing="1". */
.vb .tborder { width: 100%; background: var(--vb-grid); border: 1px solid var(--vb-border); border-collapse: separate; border-spacing: 1px; margin: 0 0 10px; }
.vb .tborder td, .vb .tborder th { padding: 6px; text-align: left; vertical-align: middle; }
.vb .alt1 { background: var(--vb-alt1); }
.vb .alt2 { background: var(--vb-alt2); }
.vb .panel { background: var(--vb-panel); padding: 10px 12px; }
.vb .tcat { background: linear-gradient(var(--vb-tcat-1), var(--vb-tcat-2) 45%, var(--vb-tcat-3)); color: #fff; font: bold 13px var(--vb-font); padding: 6px 8px; }
.vb .tcat .tcat-title { margin-right: 10px; }
.vb .thead { background: linear-gradient(var(--vb-thead-1), var(--vb-thead-2)); color: #fff; font: bold 11px Tahoma, var(--vb-font); padding: 5px 6px; }
.vb .thead a { color: #fff; }
.vb .vbmenu_control { background: var(--vb-control); color: #fff; font: bold 11px Tahoma, var(--vb-font); white-space: nowrap; }

/* Navbar with breadcrumbs and the welcome box. */
.vb .navbar-box .crumbs { font-size: 13px; }
.vb .navbar-box .crumbs strong { font-size: 14px; }
.vb .crumb-sep { color: var(--vb-muted); }
.vb .navbar-box .welcome { width: 240px; white-space: nowrap; }
.vb-notice { background: #fffbe0; color: #333; border: 1px solid #e3c96b; padding: 7px 10px; margin: 0 0 10px; font-size: 12px; }
.vb-loading { padding: 30px; text-align: center; color: var(--vb-muted); }

/* Toolbars, buttons and the page navigator. */
.vb-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.vb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; white-space: nowrap;
  font: bold 11px Tahoma, var(--vb-font); padding: 5px 11px; border-radius: 3px;
  color: var(--vb-text); background: linear-gradient(var(--vb-plain-1), var(--vb-plain-2)); border: 1px solid var(--vb-plain-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.vb a.vb-btn { color: var(--vb-text); text-decoration: none; }
.vb-btn:hover, .vb a.vb-btn:hover { filter: brightness(1.05); color: var(--vb-text); text-decoration: none; }
.vb-btn.primary, .vb a.vb-btn.primary { color: #fff; background: linear-gradient(var(--vb-btn-1), var(--vb-btn-2)); border-color: var(--vb-btn-border); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); }
.vb-btn.small { padding: 3px 8px; font-size: 10px; }
.vb-btn:disabled { opacity: 0.5; cursor: default; filter: none; }
.vb-btn input[type="file"] { display: none; }
.vb .pagenav { width: auto; margin: 0; }
.vb .pagenav td { padding: 3px 7px; font-size: 11px; text-align: center; }
.vb .pagenav .current { font-weight: bold; }
.vb .by-filter select { font: 11px var(--vb-font); padding: 2px 4px; margin-left: 4px; background: var(--vb-alt1); color: var(--vb-text); border: 1px solid var(--vb-plain-border); }

/* The thread list. */
.vb .threads .icon-cell { width: 26px; text-align: center; padding: 4px; }
.vb .threads td.num, .vb .threads th.num { width: 64px; text-align: center; }
.vb .threads td.lastpost, .vb .threads th.lastpost { width: 190px; }
.vb .threads td.lastpost { text-align: right; white-space: nowrap; }
.vb .thread-title { font-weight: normal; font-size: 13px; }
.vb .thread-title.unread { font-weight: bold; }
.vb .attach { font-size: 11px; color: var(--vb-muted); }
.vb .starter { color: var(--vb-muted); margin-top: 2px; }
.vb .starter a { color: var(--vb-muted); }
.vb .linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--vb-link); cursor: pointer; }
.vb .linkish:hover { color: var(--vb-hover); text-decoration: underline; }
.vb .go-last { font-size: 10px; }
.vb .empty-row { text-align: center; padding: 24px; color: var(--vb-muted); }
.vb .only-narrow-vb { display: none; color: var(--vb-muted); }
.vb svg.folder { width: 20px; height: 20px; display: block; margin: auto; }
.vb svg.folder path { fill: var(--vb-old); }
.vb svg.folder.new path { fill: var(--vb-new); }
.vb svg.folder .flame { fill: #fff !important; }
.vb svg.folder.hot path:first-child { fill: #d0451b; }
.vb .stats .legend { margin-top: 6px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--vb-muted); }
.vb .stats .legend svg.folder { display: inline-block; width: 15px; height: 15px; margin: 0 0 0 8px; }
.vb .stats .legend svg.folder:first-child { margin-left: 0; }

/* A post: user info on the left, the message on the right. */
.vb .vbpost { table-layout: fixed; scroll-margin-top: calc(var(--bar-h, 61px) + 8px); }
.vb .vbpost .post-head { font-weight: normal; }
.vb .vbpost .post-head .postnum { float: right; font-weight: bold; }
.vb .vbpost .col-user { width: 180px; }
.vb .vbpost .userinfo { vertical-align: top; padding: 8px; }
.vb .username { font-weight: bold; font-size: 13px; }
.vb .username.admin { color: var(--vb-admin); }
.vb .usertitle { color: var(--vb-muted); margin-top: 1px; }
.vb .pips { color: var(--vb-new); font-size: 9px; letter-spacing: 1px; margin: 2px 0 6px; }
.vb .avatar.av-vb { width: 80px; height: 80px; border-radius: 2px; font-size: 38px; border: 1px solid var(--vb-grid); box-shadow: none; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.vb .userstats { margin-top: 6px; line-height: 1.6; }
.vb .vbpost .message { vertical-align: top; padding: 10px 12px; }
.vb .post-title strong { font-size: 13px; }
.vb .vbpost hr { border: 0; border-top: 1px solid var(--vb-grid); margin: 6px 0 10px; }
.vb .msg { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 48px; }
.vb-quote { margin: 4px 0 10px; white-space: normal; }
.vb-quote .quote-head { font-size: 11px; margin-bottom: 2px; }
.vb-quote .quote-body { background: var(--vb-quote); border: 1px inset var(--vb-grid); padding: 6px 8px; white-space: pre-wrap; font-size: 12px; }
.vb-quote .quote-by { margin-bottom: 4px; }
.vb .attachments { border: 1px solid var(--vb-grid); margin: 14px 0 4px; padding: 6px 8px 8px; }
.vb .attachments legend { padding: 0 4px; color: var(--vb-muted); }
.vb .attach-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.vb .attach-thumb { padding: 2px; border: 1px solid var(--vb-grid); background: var(--vb-alt2); cursor: zoom-in; }
.vb .attach-thumb img { display: block; height: 130px; width: auto; max-width: 240px; object-fit: cover; }
.vb .location { margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vb .edited { margin-top: 12px; font-style: italic; color: var(--vb-muted); }
.vb .post-foot-left { vertical-align: middle; }
.vb .post-foot-right { text-align: right; }
.vb .post-buttons { display: inline-flex; gap: 4px; }
.vb .reactions { margin: 0; }
.vb .reaction { height: 24px; border-radius: 3px; border-color: var(--vb-plain-border); color: var(--vb-text); background: var(--vb-alt1); font-size: 11px; }
.vb .reaction[aria-pressed="true"] { background: var(--vb-panel); border-color: var(--vb-btn-1); }
.vb .react-add summary { height: 24px; border-radius: 3px; color: var(--vb-muted); border-color: var(--vb-plain-border); }
.vb .react-pick { background: var(--vb-alt1); border-color: var(--vb-plain-border); border-radius: 4px; }

/* Places, photos and editing inside the board. */
.vb .place { background: var(--vb-alt1); border: 1px solid var(--vb-plain-border); color: var(--vb-link); border-radius: 3px; font: bold 11px var(--vb-font); padding: 2px 8px 2px 5px; }
.vb .place:hover { border-color: var(--vb-hover); }
.vb .place svg { fill: var(--vb-new); }
.vb .place-row .chip-x { background: var(--vb-alt2); color: var(--vb-muted); }
.vb textarea, .vb input[type="text"] {
  width: 100%; font: 13px/1.45 var(--vb-font); color: var(--vb-text); background: var(--vb-alt1);
  border: 1px solid var(--vb-plain-border); border-radius: 0; padding: 6px; outline: none; resize: vertical;
}
.vb textarea:focus, .vb input[type="text"]:focus { border-color: var(--vb-btn-1); box-shadow: 0 0 0 2px color-mix(in srgb, var(--vb-btn-1) 25%, transparent); }
.vb .vb-editor { display: flex; flex-direction: column; gap: 6px; }
.vb .qr-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.vb .qr-actions .hint-vb { flex: 1; }
.vb .hint-vb { color: var(--vb-muted); }
.vb .fieldset { border: 1px solid var(--vb-grid); background: var(--vb-alt1); margin: 0 0 10px; padding: 6px 10px 10px; }
.vb .fieldset legend { font: bold 11px Tahoma, var(--vb-font); color: var(--vb-muted); padding: 0 4px; }
.vb .fieldset .hint-vb { margin-top: 4px; }
.vb .thumbs { margin: 0 0 8px; }
.vb .thumbs:empty { display: none; }
.vb .thumb { border-radius: 2px; border: 1px solid var(--vb-grid); }
.vb .place-line { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; }
.vb .place-line .none { color: var(--vb-muted); }
.vb .submit-row { display: flex; gap: 8px; justify-content: center; padding-top: 4px; }
.vb .submit-row .vb-btn { padding: 6px 16px; font-size: 12px; }

@media (max-width: 700px) {
  .vb-wrap { padding: 10px 8px 40px; }
  .vb .navbar-box .welcome { display: none; }
  .vb .threads td.num, .vb .threads th.num { display: none; }
  .vb .threads td.lastpost, .vb .threads th.lastpost { width: 104px; white-space: normal; }
  .vb .only-narrow-vb { display: block; }
  .vb .vbpost, .vb .vbpost tbody, .vb .vbpost tr { display: block; }
  .vb .vbpost colgroup { display: none; }
  .vb .vbpost td { display: block; width: auto !important; }
  .vb .vbpost .post-head { display: block; }
  .vb .vbpost .userinfo { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 6px 8px; }
  .vb .vbpost .userinfo .avatar.av-vb { grid-row: 1 / span 3; grid-column: 1; width: 40px; height: 40px; font-size: 20px; order: -1; }
  .vb .vbpost .userinfo > :not(.avatar) { grid-column: 2; }
  .vb .vbpost .pips, .vb .vbpost .userstats div:first-child { display: none; }
  .vb .vbpost .userstats { margin: 0; }
  .vb .vbpost .post-foot-left, .vb .vbpost .post-foot-right { display: flex; }
  .vb .vbpost .post-foot-left:empty { display: none; }
  .vb .vbpost .post-foot-right { justify-content: flex-end; }
  .vb .attach-thumb img { height: 96px; }
  .vb .pagenav { width: 100%; }
}
