@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');
/* ==========================================================================
   Coven+ forum theme — "Classic" (Invision Community 4 / Insomnia.gr style)
   Flat colours, square-ish corners, no glow, no gradients, no decorative
   motion. One file for both palettes: <html data-theme="light|dark">.
   Loaded after styles.css / header.css; page <style> blocks come later, so
   rules are prefixed with "html body" where they need to win.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Palettes
   -------------------------------------------------------------------------- */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3eee3;
  --surface: #ffffff;
  --surface-2: #faf6ec;
  --border: #e1d7c1;
  --accent: #4a3a9c;
  --accent-2: #3b5bc2;
  --text: #2a2438;
  --muted: #6a6176;
  --success: #1f8a4c;
  --warning: #b7791f;
  --danger: #c53030;
  --radius: 4px;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-reading: var(--font-ui);
  --glass-bg: #faf6ec;
  --glass-bg-strong: #f3ecdc;
  --glass-border: #e1d7c1;
  --glass-highlight: #ffffff;
  --glass-blur: none;

  --i-box: #fffdf8;
  --i-box-head: #f7f1e3;
  --i-box-alt: #fbf7ee;
  --i-row-hover: #f8f2e4;
  --i-border: #e1d7c1;
  --i-border-soft: #ece4d2;
  --i-primary: #4a3a9c;
  --i-primary-hover: #3b2e80;
  --i-primary-soft: #ece8f7;
  --i-link: #4a3a9c;
  --i-header: #1c1838;
  --i-nav: #15122b;
  --i-nav-text: #d8d2ee;
  --i-tab-active-bg: #f3eee3;
  --i-tab-active-text: #1c1838;
  --i-section: #231e45;
  --i-gold: #96711a;
  --i-footer: #1c1838;
  --i-radius: 4px;
  --i-shadow: 0 1px 1px rgba(16, 24, 40, 0.04);
  --i-container: 1300px;
  --i-sun: #96711a;
  --i-sun-soft: #f8edd2;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #100e1a;
  --surface: #1a1727;
  --surface-2: #24232f;
  --border: #33324a;
  --accent: #8f83ff;
  --accent-2: #8fa6ff;
  --text: #e6e6ee;
  --muted: #a2a1b4;
  --success: #4ec27f;
  --warning: #e0b04a;
  --danger: #f06a6a;
  --glass-bg: #24232f;
  --glass-bg-strong: #2a2937;
  --glass-border: #33324a;
  --glass-highlight: #33324a;

  --i-box: #1a1727;
  --i-box-head: #221e33;
  --i-box-alt: #161322;
  --i-row-hover: #211d31;
  --i-border: #2f2a45;
  --i-border-soft: #262238;
  --i-primary: #7a68e0;
  --i-primary-hover: #5b4bd6;
  --i-primary-soft: #2a2747;
  --i-link: #c3b8ff;
  --i-header: #140f29;
  --i-nav: #0d0a1c;
  --i-nav-text: #b9b6d6;
  --i-tab-active-bg: #100e1a;
  --i-tab-active-text: #ffffff;
  --i-section: #1e1838;
  --i-gold: #d8b45a;
  --i-footer: #0d0a1c;
  --i-shadow: none;
  --i-sun: #e0b04a;
  --i-sun-soft: #2e2818;
}

html body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
}
html body::before { display: none; }
body a { color: var(--i-link); text-decoration: none; }
body a:hover { color: var(--i-link); text-decoration: underline; }
html body h1, html body h2, html body h3, html body h4 { font-family: var(--font-ui); letter-spacing: 0; }
::selection { background: rgba(76, 61, 181, 0.2); }

.ipsLayout_container { max-width: var(--i-container); margin: 0 auto; padding: 0 20px; }

/* --------------------------------------------------------------------------
   Header: logo bar + navigation bar with "folder" tabs
   -------------------------------------------------------------------------- */
body .topbar.ipsHeader {
  position: relative; top: auto; z-index: 120;
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; box-shadow: none;
}
html.ips-fixed-header body .topbar.ipsHeader { position: fixed; top: 0; left: 0; right: 0; }
.ips-header-spacer { flex-shrink: 0; }
body.messages-page .topbar.ipsHeader { position: relative; }

.ipsHeader__primary { position: relative; z-index: 5; background: var(--i-header); }
.ipsHeader__primary::before, .ipsHeader__primary::after { display: none; }
.ipsHeader__inner { display: flex; align-items: center; gap: 14px; min-height: 64px; }

body .ipsLogo { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 21px; font-weight: 700; text-decoration: none; }
body .ipsLogo:hover { color: #fff; text-decoration: none; }
.ipsLogo__badge { display: inline-flex; width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; animation: none; }
.ipsLogo__img, body .ipsLogo .ipsLogo__img { width: 36px; height: 36px; border-radius: 50%; box-shadow: none; }
.ipsLogo__text { color: #fff; text-shadow: none; letter-spacing: 0; }
.ipsLogo__plus { color: #f0c04a; font-weight: 700; text-shadow: none; animation: none; margin-left: 1px; }

body .ipsUserNav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
body .ipsUserNav .header-btn {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 4px; background: transparent; color: rgba(255, 255, 255, 0.85) !important; font-size: 16px;
  box-shadow: none; transform: none; transition: background 0.12s;
}
body .ipsUserNav .header-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff !important; transform: none; }
body .ipsUserNav .header-btn svg { width: 19px; height: 19px; stroke: currentColor; }
body .ipsUserNav .header-btn .btn-label { display: none; }
body .ipsUserNav .unread-badge,
body .ipsUserNav .header-btn .unread-badge {
  position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: #e5484d !important; color: #fff !important; font-size: 10.5px; font-weight: 700; line-height: 13px;
  border: 2px solid var(--i-header); animation: none;
}
.ipsUserNav__create {
  display: inline-flex; align-items: center; gap: 7px; margin-right: 6px; height: 34px; padding: 0 13px; border-radius: 4px;
  background: #f0c04a; border: 0; color: #2a1f00 !important; font-weight: 600; font-size: 13px;
  text-decoration: none !important; box-shadow: none;
}
.ipsUserNav__create:hover { background: #f5cd66; transform: none; }
.ipsUserNav__create::after { display: none; }

body .ipsUserNav .header-btn.ipsCoins {
  width: auto; height: 34px; padding: 0 10px 0 6px; gap: 6px; display: inline-flex; align-items: center;
  border-radius: 4px; background: rgba(255, 255, 255, 0.08); border: 0; color: #fff !important; font-weight: 700; font-size: 13px;
}
body .ipsUserNav .header-btn.ipsCoins .coven-coin { width: 20px; height: 20px; }
.coven-coin { display: inline-block; vertical-align: -0.2em; flex-shrink: 0; filter: none; transition: none; }

body .ipsUserMenu { position: relative; }
body .ipsUserMenu .profile-trigger {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px;
  background: transparent; border: 0; border-radius: 4px; color: #fff; box-shadow: none;
}
body .ipsUserMenu .profile-trigger:hover { background: rgba(255, 255, 255, 0.1); }
.ipsUserMenu__av { position: relative; display: inline-flex; flex-shrink: 0; }
body .ipsUserMenu__av .profile-avatar,
body .ipsUserMenu__av .profile-avatar-placeholder {
  width: 32px !important; height: 32px !important; padding: 0; background: #4b4592; border-radius: 50%;
  object-fit: cover; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700;
}
body .ipsUserMenu__av .ipsUserMenu__online {
  position: absolute; left: auto; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%;
  background: #2fb36b; border: 2px solid var(--i-header); animation: none;
}
body .ipsUserMenu .profile-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
body .ipsUserMenu .dropdown-arrow { color: rgba(255, 255, 255, 0.7); font-size: 11px; }
body .ipsUserNav__signin { background: transparent !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, 0.4) !important; }
body .ipsUserNav__signin:hover { background: rgba(255, 255, 255, 0.1) !important; }

/* Dropdowns and header pop-ups */
body .ipsUserMenu__menu,
body .dropdown-menu,
body .header-popup {
  background: var(--i-box); color: var(--text); border: 1px solid var(--i-border); border-radius: 4px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16); animation: none !important;
}
body .ipsUserMenu__menu { min-width: 230px; padding: 4px 0; z-index: 50; }
body .ipsUserMenu__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.ipsUserMenu__head { padding: 10px 14px 8px; border-bottom: 1px solid var(--i-border-soft); margin-bottom: 4px; }
.ipsUserMenu__head strong { display: block; color: var(--text); font-size: 14px; }
.ipsUserMenu__head span { color: var(--muted); font-size: 12px; }
body .ipsUserMenu__menu a { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 7px 14px; font-size: 13.5px; text-decoration: none; }
body .ipsUserMenu__menu a i { width: 16px; text-align: center; color: var(--muted); }
body .ipsUserMenu__menu a:hover { background: var(--i-row-hover); text-decoration: none; }
body .ipsUserMenu__menu a.text-danger, body .ipsUserMenu__menu a.text-danger i { color: var(--danger); }
body .ipsUserMenu__menu hr { border: 0; border-top: 1px solid var(--i-border-soft); margin: 4px 0; }
body .header-popup .popup-header { background: var(--i-box-head); border-bottom: 1px solid var(--i-border); color: var(--text); }
body .header-popup .popup-header i { color: var(--i-gold); }

/* Navigation bar */
.ipsNavBar { position: relative; z-index: 1; background: var(--i-nav); border-bottom: 0; box-shadow: none; }
body .ipsHeader .ipsNavBar { position: relative; top: auto; z-index: 1; }
.ipsNavBar__inner { display: flex; align-items: flex-end; gap: 16px; min-height: 46px; }
.ipsNavBar__primary {
  display: flex; align-items: flex-end; gap: 2px; list-style: none; margin: 0; padding: 6px 0 0;
  overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none;
}
.ipsNavBar__primary::-webkit-scrollbar { display: none; }
html body .ipsNavBar__link {
  display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px;
  color: var(--i-nav-text) !important; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  text-decoration: none !important; border: 0; border-radius: 4px 4px 0 0;
  background: transparent; background-image: none; box-shadow: none; animation: none; transform: none;
  transition: background 0.12s, color 0.12s;
}
html body .ipsNavBar__link i { font-size: 13px; opacity: 0.85; color: inherit; }
html body .ipsNavBar__link:hover { color: #fff !important; background: rgba(255, 255, 255, 0.07); transform: none; }
html body .ipsNavBar__link.is-active {
  color: var(--i-tab-active-text) !important; background: var(--i-tab-active-bg); background-image: none;
  border: 0; box-shadow: none; animation: none;
}
html body .ipsNavBar__link.is-active i { color: inherit; opacity: 1; }
body .ipsNavBar__search { margin: 0 0 6px auto; flex: 0 1 280px; max-width: 280px; align-self: center; }
html body .ipsNavBar .ipsNavBar__search input, html body .ipsNavBar__search input[type] {
  height: 32px; border-radius: 4px; padding: 0 34px 0 10px; font-size: 13px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14); color: #fff; box-shadow: none;
}
html body .ipsNavBar .ipsNavBar__search input::placeholder { color: rgba(255, 255, 255, 0.6); }
html body .ipsNavBar .ipsNavBar__search input:focus, html body .ipsNavBar__search input[type]:focus { background: #fff; color: #1f2430; border-color: #fff; box-shadow: none; outline: none; }
html body .ipsNavBar__search input:focus::placeholder { color: #8a909c; }
html body .ipsNavBar__search button { color: rgba(255, 255, 255, 0.7); }
body.messages-page .ipsNavBar { display: none; }
body.messages-page .ipsHeader__inner { min-height: 56px; }

/* --------------------------------------------------------------------------
   Page layout
   -------------------------------------------------------------------------- */
body .app-container { max-width: var(--i-container); padding: 18px 20px 100px; }
body .app-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
body .app-layout:not(:has(> .right-sidebar)) { grid-template-columns: minmax(0, 1fr); }
body .left-sidebar { display: none; }
body .announcement-bar { max-width: var(--i-container); margin: 14px auto 0; padding: 0 20px; }
body .announcement { border-radius: 4px; box-shadow: none; }

/* Remove decorative motion everywhere (content still renders immediately). */
html.ips-anim .ips-reveal, html.ips-anim .ips-enter, .ips-reveal, .ips-enter { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
body .welcome-card::after, body .sidebar-widget > h3::after, body .category-section .section-banner::after,
body .btn-primary::after { display: none !important; }

/* --------------------------------------------------------------------------
   Boxes
   -------------------------------------------------------------------------- */
html body .card,
html body .sidebar-widget,
html body .ipsBox {
  background: var(--i-box); border: 1px solid var(--i-border); border-radius: var(--i-radius); box-shadow: var(--i-shadow);
}
body .sidebar-widget { padding: 0; overflow: hidden; margin-bottom: 16px; }
body .sidebar-widget::before { display: none; }
html body .sidebar-widget > h3 {
  position: static; margin: 0; padding: 11px 14px; background: var(--i-box-head); border-bottom: 1px solid var(--i-border);
  font-size: 13.5px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--text);
}
body .sidebar-widget > *:not(h3) { margin-left: 14px; margin-right: 14px; }
body .sidebar-widget > *:last-child { margin-bottom: 12px; }
body .sidebar-widget > h3 + * { margin-top: 10px; }
body .latest-discussions .discussion-card {
  background: none; border: 0; border-bottom: 1px solid var(--i-border-soft); border-radius: 0; padding: 9px 0; margin: 0 14px; box-shadow: none;
}
body .latest-discussions .discussion-card:last-child { border-bottom: 0; }
body .latest-discussions .thread-title a { color: var(--text); font-weight: 600; }
body .latest-discussions .thread-title a:hover { color: var(--i-link); }
html body .category-tag { background: var(--i-primary-soft); color: var(--i-primary); border: 0; border-radius: 3px; font-weight: 600; }
html[data-theme="dark"] body .category-tag { color: #c9c2ff; }
body .contributor-item { padding: 6px 0; border-bottom: 1px solid var(--i-border-soft); }
body .contributor-item:last-child { border-bottom: 0; }
body .stat-list li { padding: 7px 0; border-bottom: 1px solid var(--i-border-soft); }
body .stat-list li:last-child { border-bottom: 0; }
html body .stat-list .value { color: var(--text); font-weight: 700; }
body .announcement-item { padding: 8px 0; border-bottom: 1px solid var(--i-border-soft); }
body .announcement-item:last-child { border-bottom: 0; }

/* --------------------------------------------------------------------------
   Forum index
   -------------------------------------------------------------------------- */
html body .welcome-card { position: relative; padding: 16px 18px; margin-bottom: 16px; background: var(--i-box); overflow: visible; }
html body .welcome-card h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
body .welcome-card .stat-grid { gap: 10px; }
html body .welcome-card .stat { background: var(--i-box-alt); border: 1px solid var(--i-border-soft); border-radius: 4px; }
html body .welcome-card .stat .value { color: var(--text); font-weight: 700; }

body .who-online-bar { max-width: none; margin: 0 0 14px; padding: 0; }
html body .who-online-trigger { border-radius: 4px; background: var(--i-box); border: 1px solid var(--i-border); box-shadow: none; }

html body .category-section {
  background: var(--i-box); border: 1px solid var(--i-border); border-radius: var(--i-radius); box-shadow: var(--i-shadow);
  overflow: hidden; margin-bottom: 18px;
}
html body .category-section .section-banner {
  position: relative; min-height: 0; height: auto; margin: 0; padding: 11px 16px; border-radius: 0; border: 0;
  background-color: var(--i-section); background-size: cover; background-position: center;
}
html body .category-section .section-banner::before {
  content: ""; position: absolute; inset: 0; background: var(--i-section); opacity: 0.9;
}
html body .category-section .banner-content { position: relative; padding: 0; }
html body .category-section .banner-title { margin: 0; font-size: 15px; font-weight: 700; color: #fff; text-shadow: none; }
html body .category-section .banner-subtitle { margin-top: 1px; font-size: 12.5px; color: rgba(255, 255, 255, 0.75); }
body .category-section .banner-meta { display: none; }
body .category-section .section-forums { padding: 0; background: none; border: 0; }

html body .forum-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 110px 250px; align-items: center; gap: 14px;
  padding: 13px 16px; margin: 0; background: none; border: 0; border-radius: 0; border-bottom: 1px solid var(--i-border-soft);
  box-shadow: none; transform: none; transition: background 0.12s;
}
html body .forum-row:last-child { border-bottom: 0; }
html body .forum-row:hover { background: var(--i-row-hover); transform: none; }
html body .forum-icon {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: var(--i-primary-soft); border: 1px solid transparent; color: var(--i-primary); font-size: 17px; transform: none; transition: none;
}
html[data-theme="dark"] body .forum-icon { color: #c9c2ff; }
html body .forum-row:hover .forum-icon { transform: none; border-color: transparent; color: var(--i-primary); }
html[data-theme="dark"] body .forum-row:hover .forum-icon { color: #c9c2ff; }
html body .forum-icon img { width: 100%; height: 100%; object-fit: cover; }
html body .forum-name a { color: var(--text); font-size: 15px; font-weight: 700; }
html body .forum-name a:hover { color: var(--i-link); text-decoration: underline; }
html body .forum-desc { color: var(--muted); font-size: 13px; margin-top: 1px; }
html body .forum-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12.5px; color: var(--muted); text-align: right; }
html body .forum-stats .stat-number { color: var(--text); font-weight: 700; font-size: 13.5px; }
.forum-lastpost { display: flex; align-items: center; gap: 10px; min-width: 0; }
html body .forum-lastpost__avatar img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; transform: none; transition: none; }
.forum-lastpost__body { min-width: 0; }
html body .forum-lastpost__title { display: block; color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .forum-lastpost__title:hover { color: var(--i-link); }
.forum-lastpost__meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .forum-lastpost__meta a { color: var(--muted); font-weight: 600; }
html body .subforum-chip { background: var(--i-box-alt); border: 1px solid var(--i-border-soft); border-radius: 3px; color: var(--muted); }
html body .subforum-chip:hover { color: var(--i-link); border-color: var(--i-border); }

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
html body .breadcrumbs,
html body .breadcrumb-nav { margin: 0 0 12px; padding: 0; background: none; border: 0; font-size: 13px; color: var(--muted); }
html body .breadcrumb { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; background: none; }
html body .breadcrumb li { display: flex; align-items: center; gap: 4px; }
html body .breadcrumb li + li::before { content: "\203A"; color: var(--muted); margin-right: 4px; }
html body .breadcrumbs a, html body .breadcrumb a { color: var(--muted); }
html body .breadcrumbs a:hover, html body .breadcrumb a:hover { color: var(--i-link); }
html body .breadcrumb li.active { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------------------
   Forum view (category.php)
   -------------------------------------------------------------------------- */
html body .fvHeader, html body .fvBox { border-radius: var(--i-radius); box-shadow: var(--i-shadow); background: var(--i-box); border-color: var(--i-border); }
html body .fvHeader::before { display: none; }
html body .fvHeader__body { background: none; padding: 18px 20px; }
html body .fvHeader__icon { border-radius: 50%; width: 52px; height: 52px; background: var(--i-primary-soft); border: 0; color: var(--i-primary); font-size: 22px; }
html body .fvHeader__title { font-family: var(--font-ui); font-size: 24px; font-weight: 700; letter-spacing: 0; }
html body .fvHeader__flag, html body .fvRules summary .fa-scroll { color: var(--i-gold); }
html body .fvBox__title, html body .fvBar { border-radius: 0; }
html body .fvBox__title { background: var(--i-section); color: #fff; font-size: 14px; letter-spacing: 0; text-transform: none; border: 0; }
html body .fvBar { background: var(--i-box-head); }
html body .fvBar--bottom { border-radius: 0; }
html body .fvSelect { border-radius: 4px; height: 32px; background: var(--i-box); }
html body .fvSelect select option { background: var(--i-box); color: var(--text); }
html body .fvModBar { background: var(--i-sun-soft); }
html body .fvModBar select { border-radius: 4px; background: var(--i-box); }
html body .fvRow { padding: 12px 16px; }
html body .fvRow.is-pinned { background: var(--i-sun-soft); }
html body .fvRow.is-pinned:hover, html body .fvRow:hover { background: var(--i-row-hover); }
html body .fvRow.is-selected { background: var(--i-primary-soft); }
html body .fvRow__title > a { color: var(--text); }
html body .fvRow__title > a:hover { color: var(--i-link); }
html body .fvRow__dot { background: var(--i-gold); border-color: var(--i-box); }
html body .fvNew { border-radius: 3px; background: var(--i-gold); color: #fff; }
html body .fvBadge { border-radius: 3px; }
html body .fvBadge--pinned { background: var(--i-sun-soft); color: var(--i-gold); }
html body .fvBadge--locked { background: var(--i-box-head); color: var(--muted); }
html body .fvBadge--hidden { background: #fde8e8; color: #b42318; }
html body .fvBadge--featured { background: var(--i-primary-soft); color: var(--i-primary); }
html body .fvPages a, html body .fvPages span { border-radius: 3px; }
html body .fvRow__author:hover, html body .fvRow__lastName:hover, html body .fvSubforum__chips a:hover { color: var(--i-link); }
html body .fvSubforum__icon, html body .fvEmpty__icon { border-radius: 50%; background: var(--i-primary-soft); color: var(--i-primary); }
html body .fvSubforum__chips a { border-radius: 3px; background: var(--i-box-alt); }
html body .follow-btn.is-following { border-color: var(--i-gold); color: var(--i-gold); }
html[data-theme="dark"] body .fvHeader__icon, html[data-theme="dark"] body .fvSubforum__icon,
html[data-theme="dark"] body .fvEmpty__icon, html[data-theme="dark"] body .fvBadge--featured { color: #c9c2ff; }

/* Old category markup still used by some pages */
html body .ipsPageHeader { border-radius: var(--i-radius); }
html body .ipsData--table { background: var(--i-box); border: 1px solid var(--i-border); border-radius: var(--i-radius); overflow: hidden; }
html body .ipsData--table .ipsData__item { border-bottom: 1px solid var(--i-border-soft); }
html body .ipsData--table .ipsData__item:hover { background: var(--i-row-hover); }
html body .ipsData__groupHeader { background: var(--i-box-head); }

/* --------------------------------------------------------------------------
   Topic view
   -------------------------------------------------------------------------- */
html body .topic-container { max-width: none; }
html body .topic-header {
  background: var(--i-box); border: 1px solid var(--i-border); border-top: 1px solid var(--i-border);
  border-radius: var(--i-radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--i-shadow);
}
html body .topic-header h1 { font-family: var(--font-ui); font-size: 22px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
html body .topic-meta { color: var(--muted); }
html body .topic-meta .badge { border-radius: 3px; color: #fff; }
html body .topic-meta .badge.danger { background: #c53030; border-color: #c53030; }
html body .topic-meta .badge.warning { background: #b7791f; border-color: #b7791f; }
html body .post-card {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0; padding: 0; margin-bottom: 12px;
  background: var(--i-box); border: 1px solid var(--i-border); border-radius: var(--i-radius); box-shadow: var(--i-shadow);
  overflow: visible; transition: none; transform: none;
}
html body .post-card:hover { border-color: var(--i-border); box-shadow: var(--i-shadow); }
html body .post-sidebar {
  background: var(--i-box-alt); border-right: 1px solid var(--i-border-soft); border-radius: var(--i-radius) 0 0 var(--i-radius);
  padding: 16px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
html body .post-sidebar .username { font-size: 14.5px; font-weight: 700; color: var(--text); order: -1; margin-bottom: 4px; }
html body .post-sidebar .user-avatar img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 0; transform: none !important; transition: none; }
html body .post-sidebar .user-role { color: var(--i-primary); font-weight: 600; font-size: 12.5px; }
html[data-theme="dark"] body .post-sidebar .user-role { color: #c9c2ff; }
html body .post-sidebar .user-stats { width: 100%; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--i-border-soft); font-size: 12px; color: var(--muted); }
html body .post-content { padding: 0; min-width: 0; display: flex; flex-direction: column; }
html body .post-header-compact { padding: 9px 16px; border-bottom: 1px solid var(--i-border-soft); color: var(--muted); font-size: 12px; }
html body .post-body { padding: 14px 16px; font-family: var(--font-ui); font-size: 15px; line-height: 1.7; flex: 1; color: var(--text); }
html body .post-body p, html body .post-body li, html body .post-body h1, html body .post-body h2,
html body .post-body h3, html body .post-body h4, html body .post-body strong { color: var(--text); }
html[data-theme="light"] body .post-body [style*="color: rgb(255, 255, 255)"], html[data-theme="light"] body .post-body [style*="color:#fff"],
html[data-theme="light"] body .post-body [style*="color: white"], html[data-theme="light"] body .post-body [style*="color:white"] { color: var(--text) !important; }
html body .post-reactions { padding: 8px 16px 12px; }
html body blockquote { background: var(--i-box-alt); border-left: 3px solid var(--i-primary); color: var(--text); border-radius: 0; }
html body code, html body pre { background: var(--i-box-alt); color: var(--text); border-radius: 3px; }

/* --------------------------------------------------------------------------
   Buttons — flat, 4px corners, one height system
   -------------------------------------------------------------------------- */
html body .btn,
html body a.btn,
html body button.btn,
html body .ipsButton {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 0 14px; border-radius: 4px !important;
  font: inherit; font-size: 13.5px; font-weight: 600 !important; line-height: 1.2; text-decoration: none;
  border: 1px solid var(--i-border); background: var(--i-box); color: var(--text);
  box-shadow: none; cursor: pointer; transform: none; transition: background 0.12s, border-color 0.12s, color 0.12s;
}
html body .btn::after, html body .ipsButton::after { display: none; }
html body .btn:hover, html body .ipsButton:hover { background: var(--i-box-head); border-color: var(--i-border); color: var(--text); text-decoration: none; transform: none; }
html body .btn:active, html body .ipsButton:active { transform: none; }
html body .btn-small, html body .btn.btn-small, html body .btn-sm { min-height: 30px; padding: 0 11px; font-size: 12.5px; }
html body .btn-block { width: 100%; }
html body .btn-primary, html body .btn.btn-primary, html body button.btn-primary {
  background: var(--i-primary); border-color: var(--i-primary); color: #fff; box-shadow: none;
}
html body .btn-primary:hover, html body .btn.btn-primary:hover { background: var(--i-primary-hover); border-color: var(--i-primary-hover); color: #fff; }
html body .btn-success, html body .btn.btn-success { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
html body .btn-success:hover { background: #18723e; border-color: #18723e; color: #fff; }
html body .btn-danger, html body .btn.btn-danger { background: #c53030; border-color: #c53030; color: #fff; }
html body .btn-danger:hover { background: #a82828; border-color: #a82828; color: #fff; }
html body .btn-ghost, html body .btn.btn-ghost { background: transparent; border-color: transparent; }
html body .btn-ghost:hover { background: var(--i-box-head); }
html body .btn[disabled], html body .btn:disabled, html body button:disabled { opacity: 0.55; cursor: not-allowed; }
html body .reply-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 11px; border-radius: 4px !important;
  border: 1px solid var(--i-border); background: var(--i-box); color: var(--text); font-weight: 600 !important; font-size: 12.5px;
}
html body .reply-btn:hover { background: var(--i-box-head); color: var(--text); border-color: var(--i-border); }
html body .reaction-btn { border-radius: 4px !important; min-height: 28px; padding: 0 10px; }

/* Forms */
html body input[type="text"], html body input[type="email"], html body input[type="password"], html body input[type="search"],
html body input[type="number"], html body input[type="url"], html body input[type="date"], html body input[type="tel"],
html body select, html body textarea {
  background: var(--i-box); color: var(--text); border: 1px solid var(--i-border); border-radius: 4px; box-shadow: none;
}
html body input:focus, html body select:focus, html body textarea:focus { border-color: var(--i-primary); box-shadow: 0 0 0 2px var(--i-primary-soft); outline: none; }
html body ::placeholder { color: var(--muted); opacity: 0.8; }
html body #title-editor, html body .forum-title-pill { background: var(--i-box) !important; border: 1px solid var(--i-border) !important; color: var(--text) !important; border-radius: 4px !important; }
html body .ql-toolbar, html body .ql-toolbar.ql-snow { background: var(--i-box-head) !important; border-color: var(--i-border) !important; border-radius: 4px 4px 0 0; }
html body .ql-container, html body .ql-container.ql-snow { background: var(--i-box) !important; border-color: var(--i-border) !important; border-radius: 0 0 4px 4px; }
html body .ql-editor { color: var(--text); }
html body .ql-snow .ql-stroke { stroke: var(--muted); }
html body .ql-snow .ql-fill { fill: var(--muted); }
html body .ql-snow .ql-picker { color: var(--muted); }

/* Keyboard focus */
html body a:focus-visible, html body button:focus-visible, html body input:focus-visible,
html body select:focus-visible, html body textarea:focus-visible, html body [tabindex]:focus-visible {
  outline: 2px solid var(--i-primary); outline-offset: 2px;
}

/* Small things */
.step-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border-radius: 50%; font-size: 12px; font-weight: 700; background: var(--i-primary); color: #fff; vertical-align: middle; }
.step-badge--done { background: #1f8a4c; }
body .follow-icon i { font-size: 13px; }
body .push-permission-icon i, body .hide-content.locked i { color: var(--i-gold); margin-right: 4px; }
.coin-balance-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 4px; border-radius: 4px;
  background: var(--i-sun-soft); border: 1px solid var(--i-border-soft); color: var(--i-gold); font-weight: 700; font-size: 13px;
}
html body .coin-stat-number { color: var(--i-gold) !important; }
html body .product-card-price { color: var(--i-gold); }
html body .product-card-cta { color: var(--i-link); }
html[data-theme="light"] body .earn-amount, html[data-theme="light"] body .tx-amount.positive { color: #1f8a4c; }
html[data-theme="light"] body .tx-amount.negative { color: #c53030; }
html[data-theme="light"] body .ipb-section { background: var(--i-box); border-color: var(--i-border); box-shadow: var(--i-shadow); }

/* --------------------------------------------------------------------------
   Footer — plain full-width bar
   -------------------------------------------------------------------------- */
html body .site-footer.ipsFooter {
  position: relative; z-index: 30; width: auto; max-width: none; margin: 32px 0 -20px !important; padding: 0 !important;
  border: 0; border-radius: 0; background: none; box-shadow: none; clip-path: none;
  border-image: linear-gradient(to bottom, var(--i-border) 0 1px, var(--i-footer) 1px) fill 0 / 0 / 0 100vmax;
}
body .ipsFooter .footer-inner {
  max-width: var(--i-container); margin: 0 auto; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.ipsFooter__brand { display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; color: var(--muted); }
.ipsFooter__brand b { color: var(--text); font-size: 14px; font-family: var(--font-ui); }
.ipsFooter__links { display: flex; gap: 16px; flex-wrap: wrap; }
html body .ipsFooter__links a { color: var(--muted); font-size: 12.5px; font-weight: 600; }
html body .ipsFooter__links a:hover { color: var(--i-link); }
.lang-menu { position: relative; }
html body .lang-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 4px;
  background: var(--i-box); border: 1px solid var(--i-border); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
html body .lang-btn:hover { border-color: var(--i-primary); }
html body .lang-btn .fa-globe { color: var(--muted); }
.lang-btn .lang-caret { font-size: 10px; opacity: 0.7; }
.lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
html body .lang-list {
  position: absolute; right: 0; bottom: calc(100% + 6px); min-width: 210px; max-height: 340px; overflow-y: auto; z-index: 1000;
  background: var(--i-box); border: 1px solid var(--i-border); border-radius: 4px; padding: 4px; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
}
.lang-list[hidden] { display: none; }
html body .lang-list a { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 3px; color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none; }
html body .lang-list a:hover { background: var(--i-row-hover); }
html body .lang-list a.is-active { background: var(--i-primary-soft); font-weight: 600; }
html body .lang-list a .fa-check { margin-left: auto; color: var(--i-primary); }
html body .lang-code { display: inline-grid; place-items: center; min-width: 28px; height: 18px; border-radius: 3px; background: var(--i-box-head); font-size: 10px; letter-spacing: 0.04em; color: var(--muted); }

/* --------------------------------------------------------------------------
   Mobile bottom bar + "More" sheet
   -------------------------------------------------------------------------- */
html body .bottom-tabbar {
  background: var(--i-box); border-top: 1px solid var(--i-border); box-shadow: none; border-radius: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none; animation: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
html body .bottom-tabbar.tabbar-hidden { transform: translateY(calc(100% + 24px + var(--safe-bottom))); opacity: 0; pointer-events: none; }
html body .bottom-tabbar .tab-item { color: var(--muted); }
html body .bottom-tabbar .tab-item-active { color: var(--i-primary); background: none; }
html body .tab-item .tab-icon { animation: none !important; }
html body .tab-more-menu { background: var(--i-box); border: 1px solid var(--i-border); border-radius: 4px; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.18); -webkit-backdrop-filter: none; backdrop-filter: none; animation: none !important; }
html body .tab-more-item { color: var(--text); animation: none !important; }
html body .tab-more-item:hover, html body .tab-more-item:active { background: var(--i-row-hover); }
html body .tab-more-item .coin-balance-pill svg { width: 16px; height: 16px; }

/* Theme toggle icon */
.cv-theme-toggle .fa-sun { display: none; }
html[data-theme="dark"] .cv-theme-toggle .fa-sun { display: inline-block; }
html[data-theme="dark"] .cv-theme-toggle .fa-moon { display: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  html body .forum-row { grid-template-columns: 40px minmax(0, 1fr) 100px; }
  body .forum-lastpost { display: none; }
}
@media (max-width: 1024px) {
  body .app-layout { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 820px) {
  body .app-layout { grid-template-columns: minmax(0, 1fr); }
  body .ipsNavBar__search { flex-basis: 200px; }
  html body .post-card { grid-template-columns: minmax(0, 1fr); }
  html body .post-sidebar {
    flex-direction: row; flex-wrap: wrap; text-align: left; border-right: 0; border-bottom: 1px solid var(--i-border-soft);
    border-radius: var(--i-radius) var(--i-radius) 0 0; padding: 9px 12px; gap: 4px 10px;
  }
  html body .post-sidebar .user-avatar { order: -2; }
  html body .post-sidebar .user-avatar img { width: 38px; height: 38px; }
  html body .post-sidebar .username { order: -1; margin: 0; }
  html body .post-sidebar .user-stats { display: none; }
}
@media (max-width: 720px) {
  .ipsLayout_container { padding: 0 12px; }
  .ipsHeader__inner { min-height: 56px; gap: 8px; }
  body .ipsLogo { font-size: 18px; }
  .ipsLogo__img, body .ipsLogo .ipsLogo__img { width: 30px; height: 30px; }
  body .ipsUserNav { gap: 2px; }
  body .ipsUserNav .header-btn { width: 36px; height: 36px; }
  body .ipsUserMenu .profile-trigger { padding: 3px; }
  .ipsNavBar { position: relative; }
  .ipsNavBar__inner { flex-wrap: wrap; gap: 0; padding-bottom: 0; }
  .ipsNavBar__primary { width: 100%; padding-top: 4px; }
  html body .ipsNavBar__link { height: 38px; padding: 0 12px; font-size: 13px; }
  body .ipsNavBar__search { order: -1; flex: 1 0 100%; max-width: none; margin: 8px 0 2px; }
  body .app-container { padding: 12px 10px calc(90px + var(--safe-bottom)); }
  body .announcement-bar { padding: 0 10px; }
  html body .forum-row { grid-template-columns: 36px minmax(0, 1fr); gap: 11px; padding: 11px 12px; }
  html body .forum-icon { width: 36px; height: 36px; font-size: 15px; }
  html body .forum-stats { flex-direction: row; grid-column: 2; justify-content: flex-start; gap: 12px; }
  html body .category-section .section-banner { padding: 10px 12px; }
  html body .category-section { margin-bottom: 14px; }
  body .ipsFooter .footer-inner {
    flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 6px 14px; padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .ipsFooter__brand { flex-direction: row; flex-basis: 100%; justify-content: center; gap: 6px; font-size: 12px; }
  .ipsFooter__brand b { font-size: 13px; }
  .ipsFooter__links { gap: 14px; }
  html body .ipsFooter__links a { font-size: 12px; }
  html body .lang-btn { height: 28px; padding: 0 9px; font-size: 12px; gap: 6px; }
  html body .lang-list { left: 50%; right: auto; transform: translateX(-50%); }
}
@media (hover: none) {
  html body .forum-row:hover, html body .fvRow:hover { background: none; }
}
.ipsNavBar__link, body .ipsUserNav .header-btn, body .ipsUserMenu .profile-trigger {
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
}

/* Welcome stats never overflow on phones */
html body .welcome-card .stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
html body .welcome-card .stat { min-width: 0; }
html body .welcome-card .stat .value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pagination + leftover primary buttons */
html body .coven-pagination { gap: 4px; }
html body .coven-page-btn { border-radius: 3px; border: 1px solid var(--i-border); background: var(--i-box); color: var(--text); box-shadow: none; }
html body .coven-page-btn:hover { background: var(--i-box-head); color: var(--text); text-decoration: none; }
html body .coven-page-btn.active { background: var(--i-primary); border-color: var(--i-primary); color: #fff; }
html body .coven-page-btn.disabled { opacity: 0.45; }
html body .search-form button, html body .search-page button[type="submit"],
html body .ipb-btn-primary, html body .ipb-btn.ipb-btn-primary {
  background: var(--i-primary); border-color: var(--i-primary); color: #fff; border-radius: 4px; box-shadow: none;
}
html body .ipb-btn-primary:hover { background: var(--i-primary-hover); }
html body .ipsNavBar__search button { background: none; border: 0; }


/* ==========================================================================
   Mystic layer — textures and type (static: no glow, no motion)
   ========================================================================== */
:root, html[data-theme="light"] {
  --cv-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --cv-stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='18' r='.8' opacity='.55'/%3E%3Ccircle cx='58' cy='64' r='.6' opacity='.4'/%3E%3Ccircle cx='97' cy='22' r='1' opacity='.6'/%3E%3Ccircle cx='142' cy='88' r='.7' opacity='.45'/%3E%3Ccircle cx='181' cy='36' r='.6' opacity='.5'/%3E%3Ccircle cx='219' cy='74' r='.9' opacity='.55'/%3E%3Ccircle cx='31' cy='101' r='.6' opacity='.35'/%3E%3Ccircle cx='121' cy='112' r='.5' opacity='.35'/%3E%3Ccircle cx='201' cy='8' r='.5' opacity='.4'/%3E%3C/g%3E%3Cg fill='%23e9cf8a'%3E%3Ccircle cx='76' cy='40' r='.8' opacity='.6'/%3E%3Ccircle cx='166' cy='58' r='.7' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
  --cv-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="dark"] {
  --cv-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='18' r='.6' opacity='.25'/%3E%3Ccircle cx='97' cy='22' r='.7' opacity='.3'/%3E%3Ccircle cx='181' cy='36' r='.5' opacity='.25'/%3E%3Ccircle cx='142' cy='88' r='.6' opacity='.2'/%3E%3Ccircle cx='31' cy='101' r='.5' opacity='.2'/%3E%3C/g%3E%3C/svg%3E");
}
/* Page texture: parchment grain (light) / faint stars (dark) */
html body { background-color: var(--bg); background-image: var(--cv-paper); background-attachment: fixed; }
/* Night-sky header + nav with a thin gold rule */
.ipsHeader__primary { background-color: var(--i-header); background-image: var(--cv-stars); }
.ipsNavBar { background-color: var(--i-nav); background-image: var(--cv-stars); background-position: 60px 30px; box-shadow: inset 0 -1px 0 rgba(216, 180, 90, 0.35); }
html body .ipsNavBar__link.is-active { box-shadow: inset 0 2px 0 var(--i-gold); }
.ipsLogo__text { font-family: var(--cv-serif); font-size: 25px; font-weight: 700; letter-spacing: 0.01em; }
.ipsLogo__plus { color: #e9cf8a; }

/* Section title bars: night strip, gold rule, serif title */
html body .category-section .section-banner::before { background: var(--i-section); background-image: var(--cv-stars); opacity: 0.93; }
html body .category-section .section-banner { box-shadow: inset 0 -2px 0 rgba(216, 180, 90, 0.55); }
html body .category-section .banner-title,
html body .fvBox__title { font-family: var(--cv-serif); font-size: 19px; font-weight: 700; letter-spacing: 0.01em; }
html body .fvBox__title { background-color: var(--i-section); background-image: var(--cv-stars); box-shadow: inset 0 -2px 0 rgba(216, 180, 90, 0.55); }
html body .sidebar-widget > h3 { font-family: var(--cv-serif); font-size: 17px; font-weight: 700; border-bottom: 1px solid var(--i-border); box-shadow: inset 3px 0 0 var(--i-gold); }

/* Serif display headings */
html body .welcome-card h2,
html body .topic-header h1,
html body .fvHeader__title,
html body .page-title,
html body .main-content > h1 { font-family: var(--cv-serif); font-weight: 700; letter-spacing: 0.005em; }
html body .welcome-card h2 { font-size: 24px; }
html body .topic-header h1 { font-size: 30px; line-height: 1.2; }
html body .fvHeader__title { font-size: 30px; }

/* Forum icons: sigil ring */
html body .forum-icon, html body .fvHeader__icon, html body .fvSubforum__icon {
  background: var(--i-box-alt); color: var(--i-primary); border: 1px solid var(--i-gold);
  box-shadow: inset 0 0 0 3px var(--i-box), inset 0 0 0 4px var(--i-border-soft);
}
html[data-theme="dark"] body .forum-icon, html[data-theme="dark"] body .fvHeader__icon, html[data-theme="dark"] body .fvSubforum__icon { color: #d9cffd; }

/* Topic: posts read like pages of a book */
html body .post-sidebar { background-color: var(--i-box-alt); }
html body .post-sidebar .user-avatar img { box-shadow: 0 0 0 2px var(--i-box), 0 0 0 3px var(--i-gold); }
html body .topic-header { box-shadow: inset 0 3px 0 var(--i-gold), var(--i-shadow); }
html body .post-body { font-size: 15.5px; }
html body .post-body h1, html body .post-body h2, html body .post-body h3 { font-family: var(--cv-serif); }
html body .post-header-compact { background: var(--i-box-head); }

/* Footer: night strip */
html body .site-footer.ipsFooter { border-image: linear-gradient(to bottom, rgba(216, 180, 90, 0.5) 0 1px, var(--i-footer) 1px) fill 0 / 0 / 0 100vmax; }
.ipsFooter__brand { color: #b9b2d3; }
.ipsFooter__brand b { color: #fff; font-family: var(--cv-serif); font-size: 17px; }
html body .ipsFooter__links a { color: #cfc8e6; }
html body .ipsFooter__links a:hover { color: #e9cf8a; }
html body .ipsFooter .lang-btn { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
html body .ipsFooter .lang-btn .fa-globe { color: #e9cf8a; }

/* Primary buttons: deep violet with a gold hairline */
html body .btn-primary, html body .btn.btn-primary { box-shadow: inset 0 0 0 1px rgba(233, 207, 138, 0.35); }
.ipsUserNav__create { background: #e2c372; color: #241a00 !important; }
.ipsUserNav__create:hover { background: #ecd28b; }

html body .welcome-card .stat .label { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
@media (max-width: 720px) { html body .welcome-card .stat { padding: 10px 6px; } html body .welcome-card .stat .label { font-size: 11px; } html body .welcome-card .stat .value { font-size: 17px; } }

html body .fvSubforum, html body .fvSubforum__link { min-width: 0; }
@media (max-width: 720px) { html body .fvSubforums__grid { grid-template-columns: minmax(0, 1fr); } }

/* Last-post avatar: fixed circle, never squeezed by long titles */
html body .forum-lastpost { overflow: hidden; }
html body .forum-lastpost__avatar { flex: 0 0 32px; width: 32px; height: 32px; display: block; }
html body .forum-lastpost__avatar img { width: 32px !important; height: 32px !important; min-width: 32px; max-width: none; }
html body .forum-lastpost__body { flex: 1 1 auto; min-width: 0; }

/* ==========================================================================
   Forum 2027 — tabs, discussion feed, composer
   ========================================================================== */
/* Tabs (index.php + feed.php) */
.cvTabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.cvTabs__list {
  display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--i-box); border: 1px solid var(--i-border);
  overflow-x: auto; scrollbar-width: none; max-width: 100%;
}
.cvTabs__list::-webkit-scrollbar { display: none; }
html body .cvTabs__tab {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 7px;
  color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none;
}
html body .cvTabs__tab i { font-size: 13px; opacity: 0.8; }
html body .cvTabs__tab:hover { color: var(--text); background: var(--i-row-hover); text-decoration: none; }
html body .cvTabs__tab.is-on { color: #fff; background: var(--i-primary); box-shadow: inset 0 -2px 0 rgba(233, 207, 138, 0.8); }
html body .cvTabs__tab.is-on i { opacity: 1; color: #f0d68f; }
.cvTabs__new { flex-shrink: 0; }

/* Feed */
.cvFeed { max-width: 900px; margin: 0 auto; }
.cvFeed__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cvPost {
  position: relative; padding: 16px 18px 14px; background: var(--i-box); border: 1px solid var(--i-border);
  border-radius: 10px; box-shadow: var(--i-shadow); transition: border-color 0.15s, transform 0.15s;
}
.cvPost:hover { border-color: var(--i-gold); }
.cvPost.is-unread { box-shadow: inset 3px 0 0 var(--i-gold), var(--i-shadow); }
.cvPost.is-hidden { opacity: 0.65; }
.cvPost__cover { position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.cvPost > *:not(.cvPost__cover) { position: relative; z-index: 1; }
.cvPost__cover ~ * a, .cvPost__cover ~ * button { position: relative; z-index: 2; }
.cvPost__head { display: flex; align-items: center; gap: 10px; }
.cvPost__av img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; }
.cvPost__who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
html body .cvPost__author { color: var(--text); font-weight: 700; font-size: 13.5px; }
.cvPost__meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .cvPost__cat { color: var(--i-primary); font-weight: 600; }
html[data-theme="dark"] body .cvPost__cat { color: #c9bdff; }
.cvPost__flags { margin-left: auto; display: flex; gap: 6px; }
.cvFlag { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 5px; font-size: 11px; background: var(--i-box-head); color: var(--muted); }
.cvFlag--pin { background: var(--i-sun-soft); color: var(--i-gold); }
.cvFlag--new { background: var(--i-gold); color: #fff; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.cvPost__title { margin: 10px 0 4px; font-family: var(--cv-serif); font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
html body .cvPost__title a { color: var(--text); text-decoration: none; }
html body .cvPost__title a:hover { color: var(--i-link); }
.cvPost__excerpt { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cvPost__foot { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--i-border-soft); font-size: 12.5px; color: var(--muted); }
.cvStat { display: inline-flex; align-items: center; gap: 6px; }
html body .cvPost__last { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; min-width: 0; }
.cvPost__last span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvPost__last b { color: var(--text); }
.cvPost__last--none { font-style: italic; opacity: 0.8; }
.cvStack { display: inline-flex; flex-shrink: 0; }
.cvStack img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 2px solid var(--i-box); margin-left: -7px; }
.cvStack img:first-child { margin-left: 0; }
.cvFeed__empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.cvFeed__empty i { font-size: 30px; color: var(--i-gold); display: block; margin-bottom: 10px; }
.cvFeed__pages { display: flex; justify-content: center; margin-top: 18px; }

/* Composer (new-topic.php) */
.ntc { max-width: 1120px; margin: 0 auto; }
.ntc__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.ntc__compose { padding: 22px 24px; background: var(--i-box); border: 1px solid var(--i-border); border-radius: 12px; box-shadow: var(--i-shadow); }
.ntc__eyebrow { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--i-gold); }
.ntc__h1 { margin: 4px 0 2px; font-family: var(--cv-serif); font-size: 30px; font-weight: 700; letter-spacing: 0; }
.ntc__in { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
html body #title-editor.ntc__title {
  min-height: 0 !important; padding: 10px 0 8px !important; border: 0 !important; border-bottom: 2px solid var(--i-border-soft) !important;
  border-radius: 0 !important; background: transparent !important; color: var(--text) !important;
  font-family: var(--cv-serif); font-size: 26px; font-weight: 700; line-height: 1.25; outline: none; box-shadow: none !important;
}
html body #title-editor.ntc__title:focus { border-bottom-color: var(--i-gold) !important; }
#title-editor.ntc__title:empty::before { content: attr(data-placeholder); color: var(--muted); opacity: 0.7; font-weight: 600; }
.ntc__count { display: flex; justify-content: flex-end; font-size: 11.5px; color: var(--muted); margin: 4px 0 14px; }
.ntc__count.is-over { color: var(--danger); font-weight: 700; }
.ntc__label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--text); }
.ntc .quill-editor { border-radius: 10px; overflow: visible; }
html body .ntc .ql-toolbar.ql-snow { position: sticky; top: var(--ips-header-h, 0px); z-index: 5; border-radius: 10px 10px 0 0; padding: 8px 10px; }
html body .ntc .ql-container.ql-snow { border-radius: 0 0 10px 10px; font-size: 15.5px; }
html body .ntc .ql-editor { min-height: 300px; line-height: 1.7; }
.ntc__poll { margin-top: 16px; border: 1px dashed var(--i-border); border-radius: 10px; padding: 4px 14px; }
.ntc__poll[open] { border-style: solid; padding-bottom: 14px; }
.ntc__poll summary { cursor: pointer; padding: 10px 0; font-weight: 700; color: var(--text); list-style: none; display: flex; align-items: center; gap: 8px; }
.ntc__poll summary::-webkit-details-marker { display: none; }
.ntc__poll summary i { color: var(--i-gold); }
.ntc__poll summary small { margin-left: auto; color: var(--muted); font-weight: 500; }
.ntc__side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--ips-header-h, 0px) + 14px); }
.ntc__card { padding: 16px; background: var(--i-box); border: 1px solid var(--i-border); border-radius: 12px; box-shadow: var(--i-shadow); }
.ntc__card h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-family: var(--font-ui); }
.ntc__where { display: flex; align-items: center; gap: 10px; }
.ntc__where .ntc__ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--i-box-alt); border: 1px solid var(--i-gold); color: var(--i-primary); overflow: hidden; }
.ntc__where .ntc__ico img, .ntc__where .ntc__ico svg { width: 24px; height: 24px; object-fit: contain; }
.ntc__where b { display: block; font-size: 14.5px; }
html body .ntc__where a { font-size: 12.5px; }
.ntc__opt { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: 13.5px; cursor: pointer; }
.ntc__opt input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--i-primary); }
.ntc__opt small { display: block; color: var(--muted); font-size: 12px; }
.ntc__publish .btn { width: 100%; min-height: 44px; font-size: 15px; }
.ntc__publish .ntc__cancel { display: block; text-align: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.ntc__tips { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.ntc__tips li + li { margin-top: 4px; }
.ntc #draftBanner:not(:empty) { margin-bottom: 14px; }

@media (max-width: 900px) {
  .ntc__grid { grid-template-columns: minmax(0, 1fr); }
  .ntc__side { position: static; }
  .ntc__tipsCard { display: none; }
  .ntc__publish { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
  .ntc__publish .ntc__cancel { display: none; }
}
@media (max-width: 720px) {
  .cvTabs { flex-direction: column; align-items: stretch; }
  .cvTabs__list { justify-content: space-between; }
  html body .cvTabs__tab { flex: 1; justify-content: center; padding: 0 10px; }
  html body .cvTabs__tab span { font-size: 12.5px; }
  .cvTabs__new { justify-content: center; }
  .cvPost { padding: 14px 14px 12px; }
  .cvPost__title { font-size: 19px; }
  .cvPost__foot { gap: 12px; }
  .cvPost__last span:last-child { display: none; }
  .ntc__compose { padding: 16px 14px; }
  .ntc__h1 { font-size: 25px; }
  html body #title-editor.ntc__title { font-size: 21px; }
  html body .ntc .ql-editor { min-height: 220px; }
}
@media (max-width: 420px) {
  html body .cvTabs__tab i { display: none; }
}

/* Welcome stats on phones: 3 even columns, labels wrap (beats old !important rules) */
@media (max-width: 720px) {
  html body .welcome-card .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  html body .welcome-card .stat .label { white-space: normal !important; overflow-wrap: anywhere; line-height: 1.25; font-size: 10.5px !important; }
  html body .welcome-card .stat { padding: 8px 4px !important; }
}
/* Editor toolbar on phones: one swipeable row instead of five */
@media (max-width: 720px) {
  html body .ntc .ql-toolbar.ql-snow { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  html body .ntc .ql-toolbar.ql-snow::-webkit-scrollbar { display: none; }
  html body .ntc .ql-toolbar.ql-snow .ql-formats, html body .ntc .ql-toolbar.ql-snow > * { flex-shrink: 0; }
}
