/* Eternium forum. Loaded after the shared portal theme; view visibility stays with the SPA. */
#tab-forum {
  --ff-panel: #141d29;
  --ff-panel-raised: #1b2735;
  --ff-line: #596875;
  --ff-line-light: #81909a;
  --ff-gold: #dfc58b;
  --ff-text: #e2e4e4;
  --ff-muted: #adb9c4;
  color: var(--ff-text);
  min-width: 0;
}
#tab-forum :is(#forum-cats,#forum-threads,#forum-view,#forum-editor) { min-width: 0; }
#tab-forum :is(#forum-cats,#forum-threads,#forum-editor) > div:first-child {
  padding: 16px 18px;
  border: 1px solid var(--ff-line);
  border-radius: 3px;
  background: linear-gradient(100deg,#263443,#111b28 65%,#1c2836);
  box-shadow: inset 0 1px #adbac12a,inset 0 -3px #050a1199,0 3px 9px #0004;
}
#tab-forum :is(.pt,#forum-cat-title,#fv-title,#fe-title-label) {
  font-family: Georgia,'Times New Roman',serif;
  font-weight: 600;
  color: var(--ff-gold) !important;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 2px #0008;
}
#tab-forum .pt { font-size: 27px; letter-spacing: .025em; }
#tab-forum #forum-cat-title { font-size: 22px !important; }
#tab-forum #fv-title { font-size: clamp(24px,3vw,32px) !important; margin-top: 14px; }
#tab-forum :is(#fv-cat,#fv-meta,.ft-meta,.ft-stats,.forum-cat-desc,.forum-cat-stats,.fp-date) {
  color: var(--ff-muted);
  line-height: 1.55;
}
#tab-forum #fv-cat { color: #b9c5cf !important; }
#tab-forum #fv-meta { color: var(--ff-muted) !important; line-height: 1.65; }
#tab-forum .forum-cat {
  position: relative;
  grid-template-columns: 48px minmax(0,1fr) auto;
  gap: 17px;
  padding: 19px 23px;
  margin-bottom: 10px;
  border: 1px solid var(--ff-line);
  border-radius: 3px;
  background: linear-gradient(105deg,#263342dd,#172230 38%,#101925);
  box-shadow: inset 0 1px #ccd6df17,inset 3px 0 #8a969f50,inset 0 -2px #050a1266,0 3px 7px #0003;
  transition: border-color .15s,background-color .15s;
}
#tab-forum .forum-cat:nth-child(even) { background: linear-gradient(105deg,#202d3bd9,#131f2c 38%,#101925); }
#tab-forum .forum-cat:hover {
  background: linear-gradient(105deg,#314354,#1c2c3d 50%,#172331);
  border-color: #a9b2b3;
}
#tab-forum .forum-cat > div:nth-child(2) { min-width: 0; }
#tab-forum .forum-cat-name {
  color: #ead6a9;
  font: 600 19px/1.35 Georgia,'Times New Roman',serif;
  letter-spacing: .015em;
  overflow-wrap: anywhere;
}
#tab-forum .forum-cat-desc { font-size: 13px; margin-top: 5px; overflow-wrap: anywhere; }
#tab-forum .forum-cat-stats {
  min-width: 104px;
  padding-left: 20px;
  border-left: 1px solid #71839242;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#tab-forum .forum-cat-stats span { color: #8798a8; }
#tab-forum .forum-cat-icon {
  width: 46px;
  height: 49px;
  opacity: 1;
  color: #edce88;
  border: 1px solid #81909a;
  border-radius: 3px 3px 13px 13px;
  background: radial-gradient(ellipse at 50% 12%,#60718266,transparent 65%),linear-gradient(#263746,#0b1520);
  box-shadow: inset 0 0 0 3px #060d155c,inset 0 0 0 4px #adbac129,0 2px 4px #0006;
}
#tab-forum .forum-cat-icon svg { width: 26px; height: 26px; stroke-width: 1.6; filter: drop-shadow(0 1px 1px #000); }
#tab-forum .forum-thread {
  grid-template-columns: minmax(0,1fr) auto;
  padding: 17px 20px;
  margin-bottom: 8px;
  border: 1px solid #4d5e6d;
  border-radius: 3px;
  background: linear-gradient(95deg,#1d2a38,#111c29);
  box-shadow: inset 0 1px #a9bfce16,inset 0 -2px #050a1255;
}
#tab-forum .forum-thread:hover { border-color: #98a5aa; background: linear-gradient(95deg,#293a4c,#1a2a3b); }
#tab-forum .forum-thread.pinned { border-left: 3px solid #c8aa6f; background: linear-gradient(95deg,#35404a,#182331); }
#tab-forum .forum-thread.locked { opacity: 1; }
#tab-forum .ft-title { color: #eadabd; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
#tab-forum .ft-meta { font-size: 12px; margin-top: 5px; }
#tab-forum .ft-stats { font-size: 12px; min-width: 90px; font-variant-numeric: tabular-nums; }
#tab-forum .ft-badge {
  border: 1px solid #8c959a66;
  border-radius: 2px;
  padding: 2px 7px;
  margin-right: 7px;
  font: 600 10px/1.55 'Segoe UI',sans-serif;
  vertical-align: 2px;
  letter-spacing: .035em;
}
#tab-forum .ft-badge.pin { background: #78623540; color: #f0cf8c; border-color: #ac905d88; }
#tab-forum .ft-badge.lock { background: #593e474f; color: #e3b7b1; border-color: #ae777d66; }
#tab-forum :is(#fv-op,.forum-post,#fv-reply-form,#forum-editor > div:nth-child(2),#forum-admin-cats,#forum-admin-bans) {
  border: 1px solid var(--ff-line) !important;
  border-radius: 3px !important;
  background: linear-gradient(120deg,#1b2937,#121c28) !important;
  box-shadow: inset 0 1px #afbfca1c,inset 0 0 0 4px #050c152b,0 3px 8px #0003;
}
#tab-forum #fv-op { border-top: 2px solid #a5aba6 !important; padding: 22px !important; }
#tab-forum :is(#fv-op > div:first-child,.forum-post > div:first-child) {
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid #63758450;
}
#tab-forum :is(#fv-op-author,.fp-author) { color: #e6cb91 !important; font-size: 14px; }
#tab-forum :is(#fv-op-date,.fp-date) { color: #a8b6c3 !important; font-size: 11px; }
#tab-forum :is(#fv-op-content,.fp-content) {
  color: #e2e4e4;
  font-size: 15px !important;
  line-height: 1.8 !important;
  overflow-wrap: anywhere;
  max-width: 100%;
}
#tab-forum :is(#fv-op-content,.fp-content) :is(p,ul,ol) { margin-top: .7em; margin-bottom: .7em; }
#tab-forum :is(#fv-op-content,.fp-content) a { color: #b5d7ec; text-underline-offset: 3px; }
#tab-forum :is(#fv-op-content,.fp-content) img { max-width: 100%; height: auto; border-radius: 2px; border: 1px solid #77899560; }
#tab-forum :is(#fv-op-content,.fp-content) blockquote {
  margin: 16px 0;
  padding: 10px 16px;
  border-left: 3px solid #c2ab7b;
  background: #040e1970;
  color: #c0ced7;
}
#tab-forum :is(#fv-op-content,.fp-content) pre { max-width: 100%; overflow-x: auto; background: #080f19; padding: 12px; border: 1px solid #536575; border-radius: 2px; }
#tab-forum :is(#fv-op-content,.fp-content) table { max-width: 100%; table-layout: fixed; }
#tab-forum :is(#fv-op-content,.fp-content) :is(td,th) { overflow-wrap: anywhere; }
#tab-forum #fv-replies-title { color: #d9c18f !important; letter-spacing: .035em; padding: 5px 0; }
#tab-forum .forum-post { padding: 18px 20px; margin-bottom: 12px; }
#tab-forum :is(.fp-actions,#fv-op-actions) { flex-wrap: wrap; gap: 6px; }
#tab-forum :is(.fp-btn,.fb) {
  min-height: 36px;
  border-radius: 3px;
  border: 1px solid #86949b;
  color: #f1e0b8;
  background: linear-gradient(#425363,#263746);
  box-shadow: inset 0 1px #dae2dc33,inset 0 -2px #07111b80,0 2px 3px #0004;
}
#tab-forum .fb { color: #f1e0b8 !important; }
#tab-forum :is(.fp-btn,.fb):hover { border-color: #d3c7a5; filter: brightness(1.1); }
#tab-forum .fp-btn { padding: 5px 11px; font-size: 12px; }
#tab-forum .fb[onclick^='forumBack'],#tab-forum .fb[onclick='forumCloseEditor()'],#tab-forum .fb[onclick='forumSearch()'] {
  background: linear-gradient(#2c3b48,#172530) !important;
  color: #d8e0e4 !important;
}
#tab-forum :is(.fi,.ned-body) { background: #0b1521; color: #e7e7df; border-color: #596c7c; border-radius: 3px; }
#tab-forum .fi::placeholder,#tab-forum .ned-body:empty::before { color: #94a7b8; }
#tab-forum .ned-tb { background: linear-gradient(#2b3a48,#182735); border-color: #596c7c; border-radius: 3px 3px 0 0; flex-wrap: wrap; }
#tab-forum .ned-tb button { color: #d9e2e8; border-radius: 2px; }
#tab-forum .ned-tb button:hover { background: #536578; color: #fff2d3; }
#tab-forum .ned-body { border-radius: 0 0 3px 3px; line-height: 1.7; }
#tab-forum :is(.ned-hint,.fl) { color: #adbdca; }
#tab-forum #forum-search { min-height: 38px; }
#tab-forum #forum-thread-pager { padding: 10px 0; }
#tab-forum #forum-thread-pager .fb { min-width: 38px; }
/* This portal is used only by the forum's existing context menu. */
.fctx { background: #152332; border-color: #788995; border-radius: 3px; box-shadow: inset 0 1px #b8c3c933,0 8px 24px #0008; }
.fctx-item { color: #d5dfe5; min-height: 38px; }
.fctx-item:hover { background: #344657; color: #f0d49b; }
.fctx-item.danger { color: #eea99e; }
@media(max-width:700px) {
  #tab-forum :is(#forum-cats,#forum-threads,#forum-editor) > div:first-child { padding: 12px; gap: 10px !important; }
  #tab-forum #forum-cats > div:first-child > div:last-child { flex: 1 1 220px; min-width: 0; }
  #tab-forum #forum-search { width: 100%; max-width: none !important; min-width: 0; }
  #tab-forum .forum-cat { grid-template-columns: 42px minmax(0,1fr) !important; padding: 14px 12px !important; gap: 12px !important; }
  #tab-forum .forum-cat-icon { width: 40px; height: 43px; }
  #tab-forum .forum-cat-icon svg { width: 23px; height: 23px; }
  #tab-forum .forum-cat-name { font-size: 17px; }
  #tab-forum .forum-cat-desc { font-size: 12px; }
  #tab-forum .forum-thread { padding: 14px !important; grid-template-columns: minmax(0,1fr) !important; }
  #tab-forum .ft-stats { text-align: left; min-width: 0; }
  #tab-forum :is(#fv-op,.forum-post) { padding: 14px !important; }
  #tab-forum :is(#fv-op-content,.fp-content) { font-size: 14px !important; }
  #tab-forum #forum-editor > div:nth-child(2) { padding: 14px !important; }
  #tab-forum :is(.fb,.fp-btn) { min-height: 40px; }
  #tab-forum .ned-tb button { min-height: 34px; }
}
@media(prefers-reduced-motion:reduce) {
  #tab-forum :is(.forum-cat,.forum-thread,.fb,.fp-btn) { transition: none; }
}/* Shared subtle leather grain, kept beneath an opaque-enough reading surface. */
#tab-forum :is(.forum-cat,.forum-cat:nth-child(even),.forum-thread,.forum-thread.pinned,#fv-op,.forum-post,#fv-reply-form,#forum-editor > div:nth-child(2),#forum-admin-cats,#forum-admin-bans) {
  background-image: linear-gradient(105deg,rgba(27,41,55,.76),rgba(10,19,30,.86)),url('/static/uo-v2-leather.webp') !important;
  background-size: auto,640px 640px !important;
}
